OpenSS7 SS7 for the Common Man |
© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved. |
||||||||||||||||||||||||||
Home | Overview | Status | News | Documentation | Resources | About | |||||||||||||||||||||
File /code/strss7/drivers/slsi/slsi_ioctl.h#ifndef __SLSI_IOCTL_H__ #define __SLSI_IOCTL_H__ #ident "@(#) $RCSfile: slsi_ioctl.h,v $ $Name: $($Revision: 0.8.2.1 $) $Date: 2002/10/18 02:40:39 $" #include <linux/ioctl.h> /* * FIXME: these definitions are completely bogus right now.... */ #define SLS_IOC_MAGIC 'S' /* * PROTOCOL VARIANT AND OPTIONS */ #define SLS_IOCGOPTIONS _IOR( SLS_IOC_MAGIC, 0, lmi_option_t ) #define SLS_IOCSOPTIONS _IOW( SLS_IOC_MAGIC, 1, lmi_option_t ) /* * CONFIGURATION */ typedef struct sls_config { sls_ulong t1; /* timer t1 duration (ticks) */ sls_ulong t2; /* timer t2 duration (ticks) */ sls_ulong t2l; /* timer t2l duration (ticks) */ sls_ulong t2h; /* timer t2h duration (ticks) */ sls_ulong t3; /* timer t3 duration (ticks) */ sls_ulong t4n; /* timer t4n duration (ticks) */ sls_ulong t4e; /* timer t4e duration (ticks) */ sls_ulong t5; /* timer t5 duration (ticks) */ sls_ulong t6; /* timer t6 duration (ticks) */ sls_ulong t7; /* timer t7 duration (ticks) */ sls_ulong rb_abate; /* RB cong abatement (#msgs) */ sls_ulong rb_accept; /* RB cong onset accept (#msgs) */ sls_ulong rb_discard; /* RB cong discard (#msgs) */ sls_ulong tb_abate_1; /* lev 1 cong abate (#bytes) */ sls_ulong tb_onset_1; /* lev 1 cong onset (#bytes) */ sls_ulong tb_discd_1; /* lev 1 cong discard (#bytes) */ sls_ulong tb_abate_2; /* lev 1 cong abate (#bytes) */ sls_ulong tb_onset_2; /* lev 1 cong onset (#bytes) */ sls_ulong tb_discd_2; /* lev 1 cong discard (#bytes) */ sls_ulong tb_abate_3; /* lev 1 cong abate (#bytes) */ sls_ulong tb_onset_3; /* lev 1 cong onset (#bytes) */ sls_ulong tb_discd_3; /* lev 1 cong discard (#bytes) */ sls_ulong N1; /* PCR message thresh (#msg) */ sls_ulong N2; /* PCR octet thresh (#bytes) */ sls_ulong M; /* IAC normal proving periods */ } sls_config_t; #define SLS_IOCGCONFIG _IOWR( SLS_IOC_MAGIC, 2, sls_config_t ) #define SLS_IOCSCONFIG _IOWR( SLS_IOC_MAGIC, 3, sls_config_t ) #define SLS_IOCTCONFIG _IOWR( SLS_IOC_MAGIC, 4, sls_config_t ) #define SLS_IOCCCONFIG _IOWR( SLS_IOC_MAGIC, 5, sls_config_t ) /* * STATE */ typedef struct sls_statem { sls_ulong lsc_state; sls_ulong local_processor_outage; sls_ulong remote_processor_outage; sls_ulong processor_outage; sls_ulong emergency; sls_ulong l3_indication_received; sls_ulong failure_reason; /* added for event notification */ sls_ulong iac_state; sls_ulong further_proving; sls_ulong t4v; sls_ulong Cp; sls_ushort ib_mask; sls_ushort sn_mask; sls_ulong txc_state; tx_sni_t tx; /* transmit SN's and IB's */ sls_ulong msu_inhibited; sls_ulong lssu_available; sls_ulong rtb_full; sls_ulong clear_rtb; sls_ulong sib_received; sls_ulong retrans_cycle; sls_ulong forced_retransmission; sls_ulong Cm; sls_ulong cong_level; sls_ulong disc_level; sls_ulong Z; mblk_t *z_ptr; sls_ulong rc_state; rx_sni_t rx; /* receive SN's and IB's */ sls_ulong rtr; /* retransmission indicator */ sls_ulong unb; /* unreasonable BSN received */ sls_ulong unf; /* unreasonable FIB received */ sls_ulong msu_fisu_accepted; /* proving complete */ sls_ulong abnormal_bsnr; /* received abnormal BSN */ sls_ulong abnormal_fibr; /* received abnormal FIB */ sls_ulong congestion_discard; /* discarding under Rx congest */ sls_ulong congestion_accept; /* accepting under Rx congest */ sls_ulong l2_congestion_detect; /* congestion detected by L2 */ sls_ulong l3_congestion_detect; /* congestion detected by L3 */ sls_ulong cc_state; /* CC state variable */ sls_ulong poc_state; /* POC state variable */ } sls_statem_t; #define SLS_STATE_IDLE 0 /* txc, others */ #define SLS_STATE_NORMAL 0 /* cc */ #define SLS_STATE_POWER_OFF 0 /* lsc */ #define SLS_STATE_BUSY 1 /* cc */ #define SLS_STATE_IN_SERVICE 1 /* txc, others */ #define SLS_STATE_LOCAL_PROCESSOR_OUTAGE 1 /* poc */ #define SLS_STATE_PROVING 1 /* iac */ #define SLS_STATE_INITIAL_ALIGNMENT 2 /* lsc */ #define SLS_STATE_NOT_ALIGNED 2 /* iac */ #define SLS_STATE_REMOTE_PROCESSOR_OUTAGE 2 /* poc */ #define SLS_STATE_ALIGNED 3 /* iac */ #define SLS_STATE_ALIGNED_NOT_READY 3 /* lsc */ #define SLS_STATE_BOTH_PROCESSORS_OUT 3 /* poc */ #define SLS_STATE_ALIGNED_READY 4 /* lsc */ #define SLS_STATE_OUT_OF_SERVICE 5 /* lsc */ #define SLS_STATE_PROCESSOR_OUTAGE 6 /* lsc */ #define SLS_IOCGSTATEM _IOR( SLS_IOC_MAGIC, 6, sls_statem_t ) #define SLS_IOCCMRESET _IOR( SLS_IOC_MAGIC, 7, sls_statem_t ) /* * ----------------------------------------------------------------------- * * STATISTICS * * ----------------------------------------------------------------------- */ typedef struct sls_stats { lmi_sta_t header; /**/ sls_ulong sls_dur_in_service; /* Q.752 Table 1.1 30 min */ sls_ulong sls_fail_align_or_proving; /* Q.752 Table 1.7 5,30 min */ sls_ulong sls_nacks_received; /* Q.752 Table 1.9 5,30 min */ sls_ulong sls_dur_unavail; /* Q.752 Table 2.1 30 min */ sls_ulong sls_dur_unavail_failed; /* Q.752 Table 2.7 30 min */ sls_ulong sls_dur_unavail_rpo; /* Q.752 Table 2.9 30 min */ sls_ulong sls_sibs_sent; /* Q.752 Table 2.15 5,30 min */ sls_ulong sls_tran_sio_sif_octets; /* Q.752 Table 3.1 5,30 min *//* trasmitted first time */ sls_ulong sls_retrans_octets; /* Q.752 Table 3.2 5,30 min *//* includes opening flag and crc */ sls_ulong sls_tran_msus; /* Q.752 Table 3.3 5,30 min *//* transmitted first time */ sls_ulong sls_recv_sio_sif_octets; /* Q.752 Table 3.4 5,30 min */ sls_ulong sls_recv_msus; /* Q.752 Table 3.5 5,30 min *//* passed to L3 */ sls_ulong sls_cong_onset_ind[4]; /* Q.752 Table 3.6 5,30 min *//* and 3.9 */ sls_ulong sls_dur_cong_level[4]; /* Q.752 Table 3.7 30 min *//* rising only */ /* sls_ulong sls_msus_cong_discard; Q.752 Table 3.10 5,30 min *//* Not here in MTP or SLS */ sls_ulong sls_cong_discd_ind[4]; /* Q.752 Table 3.11 5,30 min *//* rising only when < onset */ } sls_stats_t; /* FIXME: read 3.11 and recheck congestion procedures */ #define SLS_IOCGSTATSP _IOR( SLS_IOC_MAGIC, 8, lmi_sta_t ) #define SLS_IOCSSTATSP _IORW( SLS_IOC_MAGIC, 9, lmi_sta_t ) #define SLS_IOCGSTATS _IOR( SLS_IOC_MAGIC, 10, sls_stats_t ) #define SLS_IOCCSTATS _IOW( SLS_IOC_MAGIC, 11, sls_stats_t ) /* * NOTIFICATIONS */ typedef struct sls_notify { sls_ulong events; } sls_notify_t; #define SLS_EVENT_HEADER_LEN 16 /* for now */ #define SLS_EVT_FAIL_UNSPECIFIED SLS_FAIL_UNSPECIFIED #define SLS_EVT_FAIL_CONG_TIMEOUT SLS_FAIL_CONG_TIMEOUT /* Q.752 Table 1.6 */ #define SLS_EVT_FAIL_ACK_TIMEOUT SLS_FAIL_ACK_TIMEOUT /* Q.752 Table 1.4 */ #define SLS_EVT_FAIL_ABNORMAL_BSNR SLS_FAIL_ABNORMAL_BSNR #define SLS_EVT_FAIL_ABNORMAL_FIBR SLS_FAIL_ABNORMAL_FIBR #define SLS_EVT_FAIL_ABORMAL SLS_FAIL_ABNORMAL_BSNR | \ SLS_FAIL_ABNORMAL_FIBR /* Q.752 Table 1.3 */ #define SLS_EVT_FAIL_SUERM_EIM SLS_FAIL_SUERM_EIM /* Q.752 Table 1.5 */ #define SLS_EVT_FAIL_ALIGNMENT SLS_FAIL_ASLIGNMENT_NOT_POSSIBLE #define SLS_EVT_FAIL_RECEIVED_SIO SLS_FAIL_RECEIVED_SIO #define SLS_EVT_FAIL_RECEIVED_SIN SLS_FAIL_RECEIVED_SIN #define SLS_EVT_FAIL_RECEIVED_SIE SLS_FAIL_RECEIVED_SIE #define SLS_EVT_FAIL_RECEIVED_SIOS SLS_FAIL_RECEIVED_SIOS #define SLS_EVT_FAIL_T1_TIMEOUT SLS_FAIL_T1_TIMEOUT #define SLS_EVT_RPO_BEGIN SLS_FAIL_T1_TIMEOUT <<1 /* Q.752 Table 2.10 */ #define SLS_EVT_RPO_END SLS_EVT_RPO_BEGIN <<1 /* Q.752 Table 2.11 */ #define SLS_EVT_CONGEST_ONSET_IND SLS_EVT_RPO_END <<1 /* Q.752 Table 3.6 1st&D */ #define SLS_EVT_CONGEST_DISCD_IND SLS_EVT_CONGEST_ONSET_IND<<1 /* Q.752 Table 3.11 1st&D */ #define SLS_EVT_FAIL_ALL_REASONS SLS_FAIL_UNSPECIFIED \ |SLS_FAIL_CONG_TIMEOUT \ |SLS_FAIL_ACK_TIMEOUT \ |SLS_FAIL_ABNORMAL_FIBR \ |SLS_FAIL_ABNORMAL_BSNR \ |SLS_FAIL_SUERM_EIM \ |SLS_FAIL_ALIGNMENT_NOT_POSSIBLE \ |SLS_FAIL_RECEIVED_SIO \ |SLS_FAIL_RECEIVED_SIN \ |SLS_FAIL_RECEIVED_SIE \ |SLS_FAIL_RECEIVED_SIOS \ |SLS_FAIL_T1_TIMEOUT /* Q.752 Table 1.2 */ #define SLS_IOCGNOTIFY _IOR( SLS_IOC_MAGIC, 12, sls_notify_t ) #define SLS_IOCSNOTIFY _IOW( SLS_IOC_MAGIC, 13, sls_notify_t ) #define SLS_IOCCNOTIFY _IOW( SLS_IOC_MAGIC, 14, sls_notify_t ) #define SLS_IOC_FIRST 0 #define SLS_IOC_LAST 14 #define SLS_IOC_PRIVATE 32 #define SLSL_IOC_MAGIC 'S' /* * PROTOCOL VARIANT AND OPTIONS */ #define SLSL_IOCGOPTIONS _IOR( SLSL_IOC_MAGIC, 0, lmi_option_t ) #define SLSL_IOCSOPTIONS _IOW( SLSL_IOC_MAGIC, 1, lmi_option_t ) /* * CONFIGURATION */ typedef struct slsl_config { sls_ulong t1; /* timer t1 duration (ticks) */ sls_ulong t2; /* timer t2 duration (ticks) */ sls_ulong t2l; /* timer t2l duration (ticks) */ sls_ulong t2h; /* timer t2h duration (ticks) */ sls_ulong t3; /* timer t3 duration (ticks) */ sls_ulong t4n; /* timer t4n duration (ticks) */ sls_ulong t4e; /* timer t4e duration (ticks) */ sls_ulong t5; /* timer t5 duration (ticks) */ sls_ulong t6; /* timer t6 duration (ticks) */ sls_ulong t7; /* timer t7 duration (ticks) */ sls_ulong rb_abate; /* RB cong abatement (#msgs) */ sls_ulong rb_accept; /* RB cong onset accept (#msgs) */ sls_ulong rb_discard; /* RB cong discard (#msgs) */ sls_ulong tb_abate_1; /* lev 1 cong abate (#bytes) */ sls_ulong tb_onset_1; /* lev 1 cong onset (#bytes) */ sls_ulong tb_discd_1; /* lev 1 cong discard (#bytes) */ sls_ulong tb_abate_2; /* lev 1 cong abate (#bytes) */ sls_ulong tb_onset_2; /* lev 1 cong onset (#bytes) */ sls_ulong tb_discd_2; /* lev 1 cong discard (#bytes) */ sls_ulong tb_abate_3; /* lev 1 cong abate (#bytes) */ sls_ulong tb_onset_3; /* lev 1 cong onset (#bytes) */ sls_ulong tb_discd_3; /* lev 1 cong discard (#bytes) */ sls_ulong N1; /* PCR message thresh (#msg) */ sls_ulong N2; /* PCR octet thresh (#bytes) */ sls_ulong M; /* IAC normal proving periods */ } slsl_config_t; #define SLSL_IOCGCONFIG _IOWR( SLSL_IOC_MAGIC, 2, slsl_config_t ) #define SLSL_IOCSCONFIG _IOWR( SLSL_IOC_MAGIC, 3, slsl_config_t ) #define SLSL_IOCTCONFIG _IOWR( SLSL_IOC_MAGIC, 4, slsl_config_t ) #define SLSL_IOCCCONFIG _IOWR( SLSL_IOC_MAGIC, 5, slsl_config_t ) /* * STATE */ typedef struct slsl_statem { sls_ulong lsc_state; sls_ulong local_processor_outage; sls_ulong remote_processor_outage; sls_ulong processor_outage; sls_ulong emergency; sls_ulong l3_indication_received; sls_ulong failure_reason; /* added for event notification */ sls_ulong iac_state; sls_ulong further_proving; sls_ulong t4v; sls_ulong Cp; sls_ushort ib_mask; sls_ushort sn_mask; sls_ulong txc_state; tx_sni_t tx; /* transmit SN's and IB's */ sls_ulong msu_inhibited; sls_ulong lssu_available; sls_ulong rtb_full; sls_ulong clear_rtb; sls_ulong sib_received; sls_ulong retrans_cycle; sls_ulong forced_retransmission; sls_ulong Cm; sls_ulong cong_level; sls_ulong disc_level; sls_ulong Z; mblk_t *z_ptr; sls_ulong rc_state; rx_sni_t rx; /* receive SN's and IB's */ sls_ulong rtr; /* retransmission indicator */ sls_ulong unb; /* unreasonable BSN received */ sls_ulong unf; /* unreasonable FIB received */ sls_ulong msu_fisu_accepted; /* proving complete */ sls_ulong abnormal_bsnr; /* received abnormal BSN */ sls_ulong abnormal_fibr; /* received abnormal FIB */ sls_ulong congestion_discard; /* discarding under Rx congest */ sls_ulong congestion_accept; /* accepting under Rx congest */ sls_ulong l2_congestion_detect; /* congestion detected by L2 */ sls_ulong l3_congestion_detect; /* congestion detected by L3 */ sls_ulong cc_state; /* CC state variable */ sls_ulong poc_state; /* POC state variable */ } slsl_statem_t; #define SLSL_STATE_IDLE 0 /* txc, others */ #define SLSL_STATE_NORMAL 0 /* cc */ #define SLSL_STATE_POWER_OFF 0 /* lsc */ #define SLSL_STATE_BUSY 1 /* cc */ #define SLSL_STATE_IN_SERVICE 1 /* txc, others */ #define SLSL_STATE_LOCAL_PROCESSOR_OUTAGE 1 /* poc */ #define SLSL_STATE_PROVING 1 /* iac */ #define SLSL_STATE_INITIAL_ALIGNMENT 2 /* lsc */ #define SLSL_STATE_NOT_ALIGNED 2 /* iac */ #define SLSL_STATE_REMOTE_PROCESSOR_OUTAGE 2 /* poc */ #define SLSL_STATE_ALIGNED 3 /* iac */ #define SLSL_STATE_ALIGNED_NOT_READY 3 /* lsc */ #define SLSL_STATE_BOTH_PROCESSORS_OUT 3 /* poc */ #define SLSL_STATE_ALIGNED_READY 4 /* lsc */ #define SLSL_STATE_OUT_OF_SERVICE 5 /* lsc */ #define SLSL_STATE_PROCESSOR_OUTAGE 6 /* lsc */ #define SLSL_IOCGSTATEM _IOR( SLSL_IOC_MAGIC, 6, slsl_statem_t ) #define SLSL_IOCCMRESET _IOR( SLSL_IOC_MAGIC, 7, slsl_statem_t ) /* * ----------------------------------------------------------------------- * * STATISTICS * * ----------------------------------------------------------------------- */ typedef struct slsl_stats { lmi_sta_t header; /**/ sls_ulong slsl_dur_in_service; /* Q.752 Table 1.1 30 min */ sls_ulong slsl_fail_align_or_proving; /* Q.752 Table 1.7 5,30 min */ sls_ulong slsl_nacks_received; /* Q.752 Table 1.9 5,30 min */ sls_ulong slsl_dur_unavail; /* Q.752 Table 2.1 30 min */ sls_ulong slsl_dur_unavail_failed; /* Q.752 Table 2.7 30 min */ sls_ulong slsl_dur_unavail_rpo; /* Q.752 Table 2.9 30 min */ sls_ulong slsl_sibs_sent; /* Q.752 Table 2.15 5,30 min */ sls_ulong slsl_tran_sio_sif_octets; /* Q.752 Table 3.1 5,30 min *//* trasmitted first time */ sls_ulong slsl_retrans_octets; /* Q.752 Table 3.2 5,30 min *//* includes opening flag and crc */ sls_ulong slsl_tran_msus; /* Q.752 Table 3.3 5,30 min *//* transmitted first time */ sls_ulong slsl_recv_sio_sif_octets; /* Q.752 Table 3.4 5,30 min */ sls_ulong slsl_recv_msus; /* Q.752 Table 3.5 5,30 min *//* passed to L3 */ sls_ulong slsl_cong_onset_ind[4]; /* Q.752 Table 3.6 5,30 min *//* and 3.9 */ sls_ulong slsl_dur_cong_level[4]; /* Q.752 Table 3.7 30 min *//* rising only */ /* sls_ulong slsl_msus_cong_discard; Q.752 Table 3.10 5,30 min *//* Not here in MTP or SLS */ sls_ulong slsl_cong_discd_ind[4]; /* Q.752 Table 3.11 5,30 min *//* rising only when < onset */ } slsl_stats_t; /* FIXME: read 3.11 and recheck congestion procedures */ #define SLSL_IOCGSTATSP _IOR( SLSL_IOC_MAGIC, 8, lmi_sta_t ) #define SLSL_IOCSSTATSP _IORW( SLSL_IOC_MAGIC, 9, lmi_sta_t ) #define SLSL_IOCGSTATS _IOR( SLSL_IOC_MAGIC, 10, slsl_stats_t ) #define SLSL_IOCCSTATS _IOW( SLSL_IOC_MAGIC, 11, slsl_stats_t ) /* * NOTIFICATIONS */ typedef struct slsl_notify { sls_ulong events; } slsl_notify_t; #define SLSL_EVENT_HEADER_LEN 16 /* for now */ #define SLSL_EVT_FAIL_UNSPECIFIED SLSL_FAIL_UNSPECIFIED #define SLSL_EVT_FAIL_CONG_TIMEOUT SLSL_FAIL_CONG_TIMEOUT /* Q.752 Table 1.6 */ #define SLSL_EVT_FAIL_ACK_TIMEOUT SLSL_FAIL_ACK_TIMEOUT /* Q.752 Table 1.4 */ #define SLSL_EVT_FAIL_ABNORMAL_BSNR SLSL_FAIL_ABNORMAL_BSNR #define SLSL_EVT_FAIL_ABNORMAL_FIBR SLSL_FAIL_ABNORMAL_FIBR #define SLSL_EVT_FAIL_ABORMAL SLSL_FAIL_ABNORMAL_BSNR | \ SLSL_FAIL_ABNORMAL_FIBR /* Q.752 Table 1.3 */ #define SLSL_EVT_FAIL_SUERM_EIM SLSL_FAIL_SUERM_EIM /* Q.752 Table 1.5 */ #define SLSL_EVT_FAIL_ALIGNMENT SLSL_FAIL_ASLIGNMENT_NOT_POSSIBLE #define SLSL_EVT_FAIL_RECEIVED_SIO SLSL_FAIL_RECEIVED_SIO #define SLSL_EVT_FAIL_RECEIVED_SIN SLSL_FAIL_RECEIVED_SIN #define SLSL_EVT_FAIL_RECEIVED_SIE SLSL_FAIL_RECEIVED_SIE #define SLSL_EVT_FAIL_RECEIVED_SIOS SLSL_FAIL_RECEIVED_SIOS #define SLSL_EVT_FAIL_T1_TIMEOUT SLSL_FAIL_T1_TIMEOUT #define SLSL_EVT_RPO_BEGIN SLSL_FAIL_T1_TIMEOUT <<1 /* Q.752 Table 2.10 */ #define SLSL_EVT_RPO_END SLSL_EVT_RPO_BEGIN <<1 /* Q.752 Table 2.11 */ #define SLSL_EVT_CONGEST_ONSET_IND SLSL_EVT_RPO_END <<1 /* Q.752 Table 3.6 1st&D */ #define SLSL_EVT_CONGEST_DISCD_IND SLSL_EVT_CONGEST_ONSET_IND<<1 /* Q.752 Table 3.11 1st&D */ #define SLSL_EVT_FAIL_ALL_REASONS SLSL_FAIL_UNSPECIFIED \ |SLSL_FAIL_CONG_TIMEOUT \ |SLSL_FAIL_ACK_TIMEOUT \ |SLSL_FAIL_ABNORMAL_FIBR \ |SLSL_FAIL_ABNORMAL_BSNR \ |SLSL_FAIL_SUERM_EIM \ |SLSL_FAIL_ALIGNMENT_NOT_POSSIBLE \ |SLSL_FAIL_RECEIVED_SIO \ |SLSL_FAIL_RECEIVED_SIN \ |SLSL_FAIL_RECEIVED_SIE \ |SLSL_FAIL_RECEIVED_SIOS \ |SLSL_FAIL_T1_TIMEOUT /* Q.752 Table 1.2 */ #define SLSL_IOCGNOTIFY _IOR( SLSL_IOC_MAGIC, 12, slsl_notify_t ) #define SLSL_IOCSNOTIFY _IOW( SLSL_IOC_MAGIC, 13, slsl_notify_t ) #define SLSL_IOCCNOTIFY _IOW( SLSL_IOC_MAGIC, 14, slsl_notify_t ) #define SLSL_IOC_FIRST 0 #define SLSL_IOC_LAST 14 #define SLSL_IOC_PRIVATE 32 #endif /* __SLSI_IOCTL_H__ */
|
|||||||||||||||||||||||||||
OpenSS7 SS7 for the Common Man |
Home | Overview | Status | News | Documentation | Resources | About | ||||||||||||||||||||
© Copyright 1997-2004,OpenSS7 Corporation, All Rights Reserved. |