Description: Code
#ifndef __SLI_IOCTL_H__
#define __SLI_IOCTL_H__
#ident "@(#) sli_ioctl.h,v openss7-0_9_2_G(0.9.2.10) Copyright (c) 2001-2008 OpenSS7 Corporation."
#include <linux/ioctl.h>
#define SL_IOC_MAGIC 'l'
#define SL_IOCGOPTIONS _IOR( SL_IOC_MAGIC, 0, lmi_option_t )
#define SL_IOCSOPTIONS _IOW( SL_IOC_MAGIC, 1, lmi_option_t )
#ifdef __KERNEL__
#ifdef _MPS_SOURCE
typedef struct sl_timers {
mblk_t *t1;
mblk_t *t2;
mblk_t *t3;
mblk_t *t4;
mblk_t *t5;
mblk_t *t6;
mblk_t *t7;
} sl_timers_t;
#else
typedef struct sl_timers {
toid_t t1;
toid_t t2;
toid_t t3;
toid_t t4;
toid_t t5;
toid_t t6;
toid_t t7;
} sl_timers_t;
#endif
#endif
typedef struct sl_config {
sl_ulong t1;
sl_ulong t2;
sl_ulong t2l;
sl_ulong t2h;
sl_ulong t3;
sl_ulong t4n;
sl_ulong t4e;
sl_ulong t5;
sl_ulong t6;
sl_ulong t7;
sl_ulong rb_abate;
sl_ulong rb_accept;
sl_ulong rb_discard;
sl_ulong tb_abate_1;
sl_ulong tb_onset_1;
sl_ulong tb_discd_1;
sl_ulong tb_abate_2;
sl_ulong tb_onset_2;
sl_ulong tb_discd_2;
sl_ulong tb_abate_3;
sl_ulong tb_onset_3;
sl_ulong tb_discd_3;
sl_ulong N1;
sl_ulong N2;
sl_ulong M;
} sl_config_t;
#define SL_IOCGCONFIG _IOWR( SL_IOC_MAGIC, 2, sl_config_t )
#define SL_IOCSCONFIG _IOWR( SL_IOC_MAGIC, 3, sl_config_t )
#define SL_IOCTCONFIG _IOWR( SL_IOC_MAGIC, 4, sl_config_t )
#define SL_IOCCCONFIG _IOWR( SL_IOC_MAGIC, 5, sl_config_t )
struct sni {
unsigned short bib;
unsigned short bsn;
unsigned short fib;
unsigned short fsn;
};
typedef struct tx_sni {
struct sni N;
struct sni F;
struct sni L;
struct sni C;
struct sni X;
struct sni R;
unsigned char sio;
int len;
unsigned short ibmsk;
unsigned short snmsk;
} tx_sni_t;
typedef struct rx_sni {
struct sni X;
struct sni F;
struct sni R;
struct sni T;
unsigned char sio;
int len;
unsigned short ibmsk;
unsigned short snmsk;
} rx_sni_t;
enum {
LSSU_SIO = 0x0,
LSSU_SIN = 0x1,
LSSU_SIE = 0x2,
LSSU_SIOS = 0x3,
LSSU_SIPO = 0x4,
LSSU_SIB = 0x5
};
typedef struct sl_statem {
sl_ulong lsc_state;
sl_ulong local_processor_outage;
sl_ulong remote_processor_outage;
sl_ulong processor_outage;
sl_ulong emergency;
sl_ulong l3_indication_received;
sl_ulong failure_reason;
sl_ulong iac_state;
sl_ulong further_proving;
sl_ulong t4v;
sl_ulong Cp;
sl_ushort ib_mask;
sl_ushort sn_mask;
sl_ulong txc_state;
tx_sni_t tx;
sl_ulong msu_inhibited;
sl_ulong lssu_available;
sl_ulong rtb_full;
sl_ulong clear_rtb;
sl_ulong sib_received;
sl_ulong retrans_cycle;
sl_ulong forced_retransmission;
sl_ulong Cm;
sl_ulong Ct;
sl_ulong cong_status;
sl_ulong disc_status;
sl_ulong Z;
void *z_ptr;
sl_ulong rc_state;
rx_sni_t rx;
sl_ulong rtr;
sl_ulong unb;
sl_ulong unf;
sl_ulong msu_fisu_accepted;
sl_ulong abnormal_bsnr;
sl_ulong abnormal_fibr;
sl_ulong congestion_discard;
sl_ulong congestion_accept;
sl_ulong l2_congestion_detect;
sl_ulong l3_congestion_detect;
sl_ulong Cr;
sl_ulong cc_state;
sl_ulong poc_state;
} sl_statem_t;
#define SL_STATE_IDLE 0
#define SL_STATE_NORMAL 0
#define SL_STATE_POWER_OFF 0
#define SL_STATE_BUSY 1
#define SL_STATE_IN_SERVICE 1
#define SL_STATE_LOCAL_PROCESSOR_OUTAGE 1
#define SL_STATE_PROVING 1
#define SL_STATE_INITIAL_ALIGNMENT 2
#define SL_STATE_NOT_ALIGNED 2
#define SL_STATE_REMOTE_PROCESSOR_OUTAGE 2
#define SL_STATE_SLEEPING 2
#define SL_STATE_ALIGNED 3
#define SL_STATE_ALIGNED_NOT_READY 3
#define SL_STATE_BOTH_PROCESSORS_OUT 3
#define SL_STATE_ALIGNED_READY 4
#define SL_STATE_OUT_OF_SERVICE 5
#define SL_STATE_PROCESSOR_OUTAGE 6
#define SL_IOCGSTATEM _IOR( SL_IOC_MAGIC, 6, sl_statem_t )
#define SL_IOCCMRESET _IOR( SL_IOC_MAGIC, 7, sl_statem_t )
typedef struct sl_stats {
lmi_sta_t header;
sl_ulong sl_dur_in_service;
sl_ulong sl_fail_align_or_proving;
sl_ulong sl_nacks_received;
sl_ulong sl_dur_unavail;
sl_ulong sl_dur_unavail_failed;
sl_ulong sl_dur_unavail_rpo;
sl_ulong sl_sibs_sent;
sl_ulong sl_tran_sio_sif_octets;
sl_ulong sl_retrans_octets;
sl_ulong sl_tran_msus;
sl_ulong sl_recv_sio_sif_octets;
sl_ulong sl_recv_msus;
sl_ulong sl_cong_onset_ind[4];
sl_ulong sl_dur_cong_status[4];
sl_ulong sl_cong_discd_ind[4];
} sl_stats_t;
#define SL_IOCGSTATSP _IOR( SL_IOC_MAGIC, 8, lmi_sta_t )
#define SL_IOCSSTATSP _IOWR( SL_IOC_MAGIC, 9, lmi_sta_t )
#define SL_IOCGSTATS _IOR( SL_IOC_MAGIC, 10, sl_stats_t )
#define SL_IOCCSTATS _IOW( SL_IOC_MAGIC, 11, sl_stats_t )
typedef struct sl_notify {
sl_ulong events;
} sl_notify_t;
#define SL_EVENT_HEADER_LEN 16
#define SL_EVT_FAIL_UNSPECIFIED SL_FAIL_UNSPECIFIED
#define SL_EVT_FAIL_CONG_TIMEOUT SL_FAIL_CONG_TIMEOUT
#define SL_EVT_FAIL_ACK_TIMEOUT SL_FAIL_ACK_TIMEOUT
#define SL_EVT_FAIL_ABNORMAL_BSNR SL_FAIL_ABNORMAL_BSNR
#define SL_EVT_FAIL_ABNORMAL_FIBR SL_FAIL_ABNORMAL_FIBR
#define SL_EVT_FAIL_ABORMAL SL_FAIL_ABNORMAL_BSNR | \
SL_FAIL_ABNORMAL_FIBR
#define SL_EVT_FAIL_SUERM_EIM SL_FAIL_SUERM_EIM
#define SL_EVT_FAIL_ALIGNMENT SL_FAIL_ALIGNMENT_NOT_POSSIBLE
#define SL_EVT_FAIL_RECEIVED_SIO SL_FAIL_RECEIVED_SIO
#define SL_EVT_FAIL_RECEIVED_SIN SL_FAIL_RECEIVED_SIN
#define SL_EVT_FAIL_RECEIVED_SIE SL_FAIL_RECEIVED_SIE
#define SL_EVT_FAIL_RECEIVED_SIOS SL_FAIL_RECEIVED_SIOS
#define SL_EVT_FAIL_T1_TIMEOUT SL_FAIL_T1_TIMEOUT
#define SL_EVT_RPO_BEGIN SL_FAIL_T1_TIMEOUT <<1
#define SL_EVT_RPO_END SL_EVT_RPO_BEGIN <<1
#define SL_EVT_CONGEST_ONSET_IND SL_EVT_RPO_END <<1
#define SL_EVT_CONGEST_DISCD_IND SL_EVT_CONGEST_ONSET_IND<<1
#define SL_EVT_FAIL_ALL_REASONS SL_FAIL_UNSPECIFIED \
|SL_FAIL_CONG_TIMEOUT \
|SL_FAIL_ACK_TIMEOUT \
|SL_FAIL_ABNORMAL_FIBR \
|SL_FAIL_ABNORMAL_BSNR \
|SL_FAIL_SUERM_EIM \
|SL_FAIL_ALIGNMENT_NOT_POSSIBLE \
|SL_FAIL_RECEIVED_SIO \
|SL_FAIL_RECEIVED_SIN \
|SL_FAIL_RECEIVED_SIE \
|SL_FAIL_RECEIVED_SIOS \
|SL_FAIL_T1_TIMEOUT
#define SL_IOCGNOTIFY _IOR( SL_IOC_MAGIC, 12, sl_notify_t )
#define SL_IOCSNOTIFY _IOW( SL_IOC_MAGIC, 13, sl_notify_t )
#define SL_IOCCNOTIFY _IOW( SL_IOC_MAGIC, 14, sl_notify_t )
typedef struct sl_pass {
sl_long muxid;
sl_ulong cmd;
} sl_pass_t;
#define SL_IOCCPASS _IOWR( SL_IOC_MAGIC, 15, sl_pass_t )
#define SL_IOC_FIRST 0
#define SL_IOC_LAST 15
#define SL_IOC_PRIVATE 32
#endif