Description: Code
#ifndef _SYS_TIHDR_H
#define _SYS_TIHDR_H
#ident "@(#) tihdr.h,v openss7-0_9_2_G(0.9.2.11) Copyright (c) 2001-2008 OpenSS7 Corporation."
#define T_CURRENT_VERSION 5
#ifndef t_scalar_t
typedef int32_t t_scalar_t;
#define t_scalar_t t_scalar_t
#endif
#ifndef t_uscalar_t
typedef u_int32_t t_uscalar_t;
#define t_uscalar_t t_uscalar_t
#endif
#include <sys/tpi.h>
#define TS_UNBND 0
#define TS_WACK_BREQ 1
#define TS_WACK_UREQ 2
#define TS_IDLE 3
#define TS_WACK_OPTREQ 4
#define TS_WACK_CREQ 5
#define TS_WCON_CREQ 6
#define TS_WRES_CIND 7
#define TS_WACK_CRES 8
#define TS_DATA_XFER 9
#define TS_WIND_ORDREL 10
#define TS_WREQ_ORDREL 11
#define TS_WACK_DREQ6 12
#define TS_WACK_DREQ7 13
#define TS_WACK_DREQ9 14
#define TS_WACK_DREQ10 15
#define TS_WACK_DREQ11 16
#define TS_NOSTATES 17
#define T_CONN_REQ 0
#define T_CONN_RES 1
#define T_DISCON_REQ 2
#define T_DATA_REQ 3
#define T_EXDATA_REQ 4
#define T_INFO_REQ 5
#define T_BIND_REQ 6
#define T_UNBIND_REQ 7
#define T_UNITDATA_REQ 8
#define T_OPTMGMT_REQ 9
#define T_ORDREL_REQ 10
#define T_OPTDATA_REQ 24
#define T_ADDR_REQ 25
#define T_CAPABILITY_REQ 28
#define T_CONN_IND 11
#define T_CONN_CON 12
#define T_DISCON_IND 13
#define T_DATA_IND 14
#define T_EXDATA_IND 15
#define T_INFO_ACK 16
#define T_BIND_ACK 17
#define T_ERROR_ACK 18
#define T_OK_ACK 19
#define T_UNITDATA_IND 20
#define T_UDERROR_IND 21
#define T_OPTMGMT_ACK 22
#define T_ORDREL_IND 23
#define T_OPTDATA_IND 26
#define T_ADDR_ACK 27
#define T_CAPABILITY_ACK 29
#define T_ODF_MORE T_MORE
#define T_ODF_EX T_EXPEDITED
struct T_info_req {
t_scalar_t PRIM_type;
};
struct T_bind_req {
t_scalar_t PRIM_type;
t_scalar_t ADDR_length;
t_scalar_t ADDR_offset;
t_uscalar_t CONIND_number;
};
struct T_unbind_req {
t_scalar_t PRIM_type;
};
struct T_optmgmt_req {
t_scalar_t PRIM_type;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
t_scalar_t MGMT_flags;
};
struct T_addr_req {
t_scalar_t PRIM_type;
};
struct T_info_ack {
t_scalar_t PRIM_type;
t_scalar_t TSDU_size;
t_scalar_t ETSDU_size;
t_scalar_t CDATA_size;
t_scalar_t DDATA_size;
t_scalar_t ADDR_size;
t_scalar_t OPT_size;
t_scalar_t TIDU_size;
t_scalar_t SERV_type;
t_scalar_t CURRENT_state;
t_scalar_t PROVIDER_flag;
};
struct T_bind_ack {
t_scalar_t PRIM_type;
t_scalar_t ADDR_length;
t_scalar_t ADDR_offset;
t_uscalar_t CONIND_number;
};
struct T_optmgmt_ack {
t_scalar_t PRIM_type;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
t_scalar_t MGMT_flags;
};
struct T_error_ack {
t_scalar_t PRIM_type;
t_scalar_t ERROR_prim;
t_scalar_t TLI_error;
t_scalar_t UNIX_error;
};
struct T_ok_ack {
t_scalar_t PRIM_type;
t_scalar_t CORRECT_prim;
};
struct T_addr_ack {
t_scalar_t PRIM_type;
t_scalar_t LOCADDR_length;
t_scalar_t LOCADDR_offset;
t_scalar_t REMADDR_length;
t_scalar_t REMADDR_offset;
};
struct T_conn_req {
t_scalar_t PRIM_type;
t_scalar_t DEST_length;
t_scalar_t DEST_offset;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
};
struct T_conn_res {
t_scalar_t PRIM_type;
t_scalar_t ACCEPTOR_id;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
t_scalar_t SEQ_number;
};
struct T_discon_req {
t_scalar_t PRIM_type;
t_scalar_t SEQ_number;
};
struct T_data_req {
t_scalar_t PRIM_type;
t_scalar_t MORE_flag;
};
struct T_exdata_req {
t_scalar_t PRIM_type;
t_scalar_t MORE_flag;
};
struct T_ordrel_req {
t_scalar_t PRIM_type;
};
struct T_conn_ind {
t_scalar_t PRIM_type;
t_scalar_t SRC_length;
t_scalar_t SRC_offset;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
t_scalar_t SEQ_number;
};
struct T_conn_con {
t_scalar_t PRIM_type;
t_scalar_t RES_length;
t_scalar_t RES_offset;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
};
struct T_discon_ind {
t_scalar_t PRIM_type;
t_scalar_t DISCON_reason;
t_scalar_t SEQ_number;
};
struct T_data_ind {
t_scalar_t PRIM_type;
t_scalar_t MORE_flag;
};
struct T_exdata_ind {
t_scalar_t PRIM_type;
t_scalar_t MORE_flag;
};
struct T_ordrel_ind {
t_scalar_t PRIM_type;
};
struct T_unitdata_req {
t_scalar_t PRIM_type;
t_scalar_t DEST_length;
t_scalar_t DEST_offset;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
};
struct T_unitdata_ind {
t_scalar_t PRIM_type;
t_scalar_t SRC_length;
t_scalar_t SRC_offset;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
};
struct T_uderror_ind {
t_scalar_t PRIM_type;
t_scalar_t DEST_length;
t_scalar_t DEST_offset;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
t_scalar_t ERROR_type;
};
struct T_optdata_req {
t_scalar_t PRIM_type;
t_scalar_t DATA_flag;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
};
struct T_optdata_ind {
t_scalar_t PRIM_type;
t_scalar_t DATA_flag;
t_scalar_t OPT_length;
t_scalar_t OPT_offset;
};
struct T_capability_req {
t_scalar_t PRIM_type;
t_uscalar_t CAP_bits1;
};
struct T_capability_ack {
t_scalar_t PRIM_type;
t_uscalar_t CAP_bits1;
struct T_info_ack INFO_ack;
t_uscalar_t ACCEPTOR_id;
};
#define TC1_INFO (1<<0)
#define TC1_ACCEPTOR_ID (1<<1)
#define TCI_CAP_BITS2 (1<<31)
union T_primitives {
t_scalar_t type;
struct T_addr_ack addr_ack;
struct T_addr_req addr_req;
struct T_bind_ack bind_ack;
struct T_bind_req bind_req;
struct T_conn_con conn_con;
struct T_conn_ind conn_ind;
struct T_conn_req conn_req;
struct T_conn_res conn_res;
struct T_data_ind data_ind;
struct T_data_req data_req;
struct T_discon_ind discon_ind;
struct T_discon_req discon_req;
struct T_error_ack error_ack;
struct T_exdata_ind exdata_ind;
struct T_exdata_req exdata_req;
struct T_info_ack info_ack;
struct T_info_req info_req;
struct T_ok_ack ok_ack;
struct T_optmgmt_ack optmgmt_ack;
struct T_optmgmt_req optmgmt_req;
struct T_ordrel_ind ordrel_ind;
struct T_ordrel_req ordrel_req;
struct T_uderror_ind uderror_ind;
struct T_unbind_req unbind_req;
struct T_unitdata_ind unitdata_ind;
struct T_unitdata_req unitdata_req;
struct T_optdata_req optdata_req;
struct T_optdata_ind optdata_ind;
struct T_capability_req capability_req;
struct T_capability_ack capability_ack;
};
#endif