Description: Code
#ifndef _SYS_CDI_H
#define _SYS_CDI_H
#ident "@(#) cdi.h,v openss7-0_9_2_G(0.9.2.5) Copyright (c) 2001-2008 OpenSS7 Corporation."
#define CD_INFO_REQ 0x00
#define CD_INFO_ACK 0x01
#define CD_ATTACH_REQ 0x02
#define CD_DETACH_REQ 0x03
#define CD_ENABLE_REQ 0x04
#define CD_DISABLE_REQ 0x05
#define CD_OK_ACK 0x06
#define CD_ERROR_ACK 0x07
#define CD_ENABLE_CON 0x08
#define CD_DISABLE_CON 0x09
#define CD_ERROR_IND 0x0a
#define CD_ALLOW_INPUT_REQ 0x0b
#define CD_READ_REQ 0x0c
#define CD_UNITDATA_REQ 0x0d
#define CD_WRITE_READ_REQ 0x0e
#define CD_UNITDATA_ACK 0x0f
#define CD_UNITDATA_IND 0x10
#define CD_HALT_INPUT_REQ 0x11
#define CD_ABORT_OUTPUT_REQ 0x12
#define CD_MUX_NAME_REQ 0x13
#define CD_BAD_FRAME_IND 0x14
#define CD_MODEM_SIG_REQ 0x15
#define CD_MODEM_SIG_IND 0x16
#define CD_MODEM_SIG_POLL 0x17
#define CD_UNATTACHED 0x00
#define CD_UNUSABLE 0x01
#define CD_DISABLED 0x02
#define CD_ENABLE_PENDING 0x03
#define CD_ENABLED 0x04
#define CD_READ_ACTIVE 0x05
#define CD_INPUT_ALLOWED 0x06
#define CD_DISABLE_PENDING 0x07
#define CD_OUTPUT_ACTIVE 0x08
#define CD_XRAY 0x09
#define CD_NOT_AUTH 0x0A
#define CD_BADADDRESS 0x01
#define CD_BADADDRTYPE 0x02
#define CD_BADDIAL 0x03
#define CD_BADDIALTYPE 0x04
#define CD_BADDISPOSAL 0x05
#define CD_BADFRAME 0x06
#define CD_BADPPA 0x07
#define CD_BADPRIM 0x08
#define CD_DISC 0x09
#define CD_EVENT 0x0a
#define CD_FATALERR 0x0b
#define CD_INITFAILED 0x0c
#define CD_NOTSUPP 0x0d
#define CD_OUTSTATE 0x0e
#define CD_PROTOSHORT 0x0f
#define CD_READTIMEOUT 0x10
#define CD_SYSERR 0x11
#define CD_WRITEFAIL 0x12
#define CD_CRCERR 0x01
#define CD_DLE_EOT 0x02
#define CD_FORMAT 0x03
#define CD_HDLC_ABORT 0x04
#define CD_OVERRUN 0x05
#define CD_TOOSHORT 0x06
#define CD_INCOMPLETE 0x07
#define CD_BUSY 0x08
#define CD_NOANSWER 0x09
#define CD_CALLREJECT 0x0a
#define CD_HDLC_IDLE 0x0b
#define CD_HDLC_NOTIDLE 0x0c
#define CD_QUIESCENT 0x0d
#define CD_RESUMED 0x0e
#define CD_DSRTIMEOUT 0x0f
#define CD_LAN_COLLISIONS 0x10
#define CD_LAN_REFUSED 0x11
#define CD_LAN_NOSTATION 0x12
#define CD_LOSTCTS 0x13
#define CD_DEVERR 0x100
#define CD_HDLC 0x00
#define CD_BISYNC 0x01
#define CD_LAN 0x02
#define CD_NODEV 0x03
#define CD_FULLDUPLEX 0x00
#define CD_HALFDUPLEX 0x01
#define CD_UNACKEDOUTPUT 0x00
#define CD_ACKEDOUTPUT 0x01
#define CD_PACEDOUTPUT 0x02
#define CD_CANREAD 0x01
#define CD_CANDIAL 0x02
#define CD_AUTOALLOW 0x04
#define CD_KEEPALIVE 0x08
#define CD_STYLE1 0x00
#define CD_STYLE2 0x01
#define CD_STYLE_1 CD_STYLE1
#define CD_STYLE_2 CD_STYLE2
#define CD_NODIAL 0x00
#define CD_FLUSH 0x00
#define CD_WAIT 0x01
#define CD_DELIVER 0x02
#define CD_SPECIFIC 0x00
#define CD_BROADCAST 0x01
#define CD_IMPLICIT 0x02
#define CD_FRMTOOLONG 0xFFFF
#define CD_FRMNONOCTET 0xFFFE
#define CD_EMPTY_BFR 0xFFFD
#define CD_BAD_CRC 0xFFFC
#define CD_FRM_ABORTED 0xFFFB
#define CD_RCV_OVERRUN 0xFFFA
#define CD_DTR 0x01
#define CD_RTS 0x02
#define CD_DSR 0x04
#define CD_DCD 0x08
#define CD_CTS 0x10
#define CD_RI 0x20
typedef int32_t cd_long;
typedef u_int32_t cd_ulong;
typedef u_int16_t cd_ushort;
typedef struct {
cd_ulong cd_primitive;
} cd_info_req_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_state;
cd_ulong cd_max_sdu;
cd_ulong cd_min_sdu;
cd_ulong cd_class;
cd_ulong cd_duplex;
cd_ulong cd_output_style;
cd_ulong cd_features;
cd_ulong cd_addr_length;
cd_ulong cd_ppa_style;
} cd_info_ack_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_ppa;
} cd_attach_req_t;
typedef struct {
cd_ulong cd_primitive;
} cd_detach_req_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_dial_type;
cd_ulong cd_dial_length;
cd_ulong cd_dial_offset;
} cd_enable_req_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_disposal;
} cd_disable_req_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_state;
cd_ulong cd_correct_primitive;
} cd_ok_ack_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_state;
cd_ulong cd_error_primitive;
cd_ulong cd_errno;
cd_ulong cd_explanation;
} cd_error_ack_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_state;
} cd_enable_con_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_state;
} cd_disable_con_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_state;
cd_ulong cd_errno;
cd_ulong cd_explanation;
} cd_error_ind_t;
typedef struct {
cd_ulong cd_primitive;
} cd_allow_input_req_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_msec;
} cd_read_req_t;
typedef struct {
cd_ulong cd_primitive;
cd_ushort cd_addr_type;
cd_ushort cd_priority;
cd_ulong cd_dest_addr_length;
cd_ulong cd_dest_addr_offset;
} cd_unitdata_req_t;
typedef struct {
cd_ulong cd_primitive;
cd_unitdata_req_t cd_unitdata_req;
cd_read_req_t cd_read_req;
} cd_write_read_req_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_state;
} cd_unitdata_ack_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_state;
cd_ulong cd_src_addr_length;
cd_ulong cd_src_addr_offset;
cd_ushort cd_addr_type;
cd_ushort cd_priority;
cd_ulong cd_dest_addr_length;
cd_ulong cd_dest_addr_offset;
} cd_unitdata_ind_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_state;
cd_ulong cd_error;
} cd_bad_frame_ind_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_sigs;
} cd_modem_sig_req_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_sigs;
} cd_modem_sig_ind_t;
typedef struct {
cd_ulong cd_primitive;
} cd_modem_sig_poll_t;
typedef struct {
cd_ulong cd_primitive;
cd_ulong cd_disposal;
} cd_halt_input_req_t;
typedef struct {
cd_ulong cd_primitive;
} cd_abort_output_req_t;
union CD_primitives {
cd_ulong cd_primitive;
cd_info_req_t info_req;
cd_info_ack_t info_ack;
cd_attach_req_t attach_req;
cd_detach_req_t detach_req;
cd_enable_req_t enable_req;
cd_disable_req_t disable_req;
cd_ok_ack_t ok_ack;
cd_error_ack_t error_ack;
cd_allow_input_req_t allow_input_req;
cd_read_req_t read_req;
cd_unitdata_req_t unitdata_req;
cd_write_read_req_t write_read_req;
cd_unitdata_ack_t unitdata_ack;
cd_unitdata_ind_t unitdata_ind;
cd_halt_input_req_t halt_input_req;
cd_abort_output_req_t abort_output_req;
cd_error_ind_t error_ind;
cd_enable_con_t enable_con;
cd_disable_con_t disable_con;
cd_bad_frame_ind_t bad_frame_ind;
cd_modem_sig_req_t modem_sig_req;
cd_modem_sig_ind_t modem_sig_ind;
cd_modem_sig_poll_t modem_sig_poll;
};
#define CD_INFO_REQ_SIZE sizeof(cd_info_req_t)
#define CD_INFO_ACK_SIZE sizeof(cd_info_ack_t)
#define CD_ATTACH_REQ_SIZE sizeof(cd_attach_req_t)
#define CD_DETACH_REQ_SIZE sizeof(cd_detach_req_t)
#define CD_ENABLE_REQ_SIZE sizeof(cd_enable_req_t)
#define CD_DISABLE_REQ_SIZE sizeof(cd_disable_req_t)
#define CD_OK_ACK_SIZE sizeof(cd_ok_ack_t)
#define CD_ERROR_ACK_SIZE sizeof(cd_error_ack_t)
#define CD_ALLOW_INPUT_REQ_SIZE sizeof(cd_allow_input_req_t)
#define CD_READ_REQ_SIZE sizeof(cd_read_req_t)
#define CD_UNITDATA_REQ_SIZE sizeof(cd_unitdata_req_t)
#define CD_WRITE_READ_REQ_SIZE sizeof(cd_write_read_req_t)
#define CD_UNITDATA_ACK_SIZE sizeof(cd_unitdata_ack_t)
#define CD_UNITDATA_IND_SIZE sizeof(cd_unitdata_ind_t)
#define CD_HALT_INPUT_REQ_SIZE sizeof(cd_halt_input_req_t)
#define CD_ABORT_OUTPUT_REQ_SIZE sizeof(cd_abort_output_req_t)
#define CD_ERROR_IND_SIZE sizeof(cd_error_ind_t)
#define CD_ENABLE_CON_SIZE sizeof(cd_enable_con_t)
#define CD_DISABLE_CON_SIZE sizeof(cd_disable_con_t)
#define CD_BAD_FRAME_IND_SIZE sizeof(cd_bad_frame_ind_t)
#define CD_MODEM_SIG_REQ_SIZE sizeof(cd_modem_sig_req_t)
#define CD_MODEM_SIG_IND_SIZE sizeof(cd_modem_sig_ind_t)
#define CD_MODEM_SIG_POLL_SIZE sizeof(cd_modem_sig_poll_t)
#endif