Description: Code
#ifndef __SDTI_IOCTL_H__
#define __SDTI_IOCTL_H__
#ident "@(#) sdti_ioctl.h,v openss7-0_9_2_G(0.9.2.10) Copyright (c) 2001-2008 OpenSS7 Corporation."
#include <linux/ioctl.h>
#define SDT_IOC_MAGIC 't'
#define SDT_IOCGOPTIONS _IOR( SDT_IOC_MAGIC, 0, lmi_option_t )
#define SDT_IOCSOPTIONS _IOW( SDT_IOC_MAGIC, 1, lmi_option_t )
#ifdef __KERNEL__
#ifdef _MPS_SOURCE
typedef struct sdt_timers {
mblk_t *t8;
} sdt_timers_t;
#else
typedef struct sdt_timers {
toid_t t8;
} sdt_timers_t;
#endif
#endif
typedef struct sdt_config {
sdt_ulong t8;
sdt_ulong Tin;
sdt_ulong Tie;
sdt_ulong T;
sdt_ulong D;
sdt_ulong Te;
sdt_ulong De;
sdt_ulong Ue;
sdt_ulong N;
sdt_ulong m;
sdt_ulong b;
sdt_ulong f;
} sdt_config_t;
#define SDT_FLAGS_ONE 0
#define SDT_FLAGS_SHARED 1
#define SDT_FLAGS_TWO 2
#define SDT_FLAGS_THREE 3
#define SDT_IOCGCONFIG _IOWR( SDT_IOC_MAGIC, 2, sdt_config_t )
#define SDT_IOCSCONFIG _IOWR( SDT_IOC_MAGIC, 3, sdt_config_t )
#define SDT_IOCTCONFIG _IOWR( SDT_IOC_MAGIC, 4, sdt_config_t )
#define SDT_IOCCCONFIG _IOWR( SDT_IOC_MAGIC, 5, sdt_config_t )
typedef struct sdt_statem {
sdt_ulong aerm_state;
sdt_ulong aborted_proving;
sdt_long Ca;
sdt_ulong Ti;
sdt_ulong suerm_state;
sdt_long Cs;
sdt_ulong Ns;
sdt_ulong eim_state;
sdt_long Ce;
sdt_ulong su_received;
sdt_ulong interval_error;
sdt_ulong daedt_state;
sdt_ulong daedr_state;
sdt_ulong octet_counting_mode;
} sdt_statem_t;
#define SDT_STATE_IDLE 0x00
#define SDT_STATE_IN_SERVICE 0x01
#define SDT_STATE_MONITORING SDT_STATE_IN_SERVICE
#define SDT_STATE_CONGESTED 0x02
#define SDT_IOCGSTATEM _IOR( SDT_IOC_MAGIC, 6, sdt_statem_t )
#define SDT_IOCCMRESET _IOR( SDT_IOC_MAGIC, 7, sdt_statem_t )
typedef struct sdt_stats {
lmi_sta_t header;
sdt_ulong tx_bytes;
sdt_ulong tx_sus;
sdt_ulong tx_sus_repeated;
sdt_ulong tx_underruns;
sdt_ulong tx_aborts;
sdt_ulong tx_buffer_overflows;
sdt_ulong tx_sus_in_error;
sdt_ulong rx_bytes;
sdt_ulong rx_sus;
sdt_ulong rx_sus_compressed;
sdt_ulong rx_overruns;
sdt_ulong rx_aborts;
sdt_ulong rx_buffer_overflows;
sdt_ulong rx_sus_in_error;
sdt_ulong rx_sync_transitions;
sdt_ulong rx_bits_octet_counted;
sdt_ulong rx_crc_errors;
sdt_ulong rx_frame_errors;
sdt_ulong rx_frame_overflows;
sdt_ulong rx_frame_too_long;
sdt_ulong rx_frame_too_short;
sdt_ulong rx_residue_errors;
sdt_ulong rx_length_error;
sdt_ulong carrier_cts_lost;
sdt_ulong carrier_dcd_lost;
sdt_ulong carrier_lost;
} sdt_stats_t;
#define SDT_IOCGSTATSP _IOR( SDT_IOC_MAGIC, 8, lmi_sta_t )
#define SDT_IOCSSTATSP _IOWR( SDT_IOC_MAGIC, 9, lmi_sta_t )
#define SDT_IOCGSTATS _IOR( SDT_IOC_MAGIC, 10, sdt_stats_t )
#define SDT_IOCCSTATS _IOW( SDT_IOC_MAGIC, 11, sdt_stats_t )
typedef struct sdt_notify {
sdt_ulong events;
} sdt_notify_t;
#define SDT_EVT_LOST_SYNC 0x00000001
#define SDT_EVT_SU_ERROR 0x00000002
#define SDT_EVT_TX_FAIL 0x00000004
#define SDT_EVT_RX_FAIL 0x00000008
#define SDT_EVT_CARRIER 0x00000010
#define SDT_IOCGNOTIFY _IOR( SDT_IOC_MAGIC, 12, sdt_notify_t )
#define SDT_IOCSNOTIFY _IOW( SDT_IOC_MAGIC, 13, sdt_notify_t )
#define SDT_IOCCNOTIFY _IOW( SDT_IOC_MAGIC, 14, sdt_notify_t )
typedef struct sdt_pass {
sdt_long index;
sdt_ulong cmd;
} sdt_pass_t;
#define SDT_IOCCPASS _IOWR( SDT_IOC_MAGIC, 15, sdt_pass_t )
#define SDT_IOCCABORT _IO( SDT_IOC_MAGIC, 16 )
#define SDT_IOC_FIRST 0
#define SDT_IOC_LAST 16
#define SDT_IOC_PRIVATE 32
#endif