Description: Code
#ifndef SYS_NPI_H
#define SYS_NPI_H
#ident "@(#) npi.h,v openss7-0_9_2_G(0.9.2.8) Copyright (c) 2001-2008 OpenSS7 Corporation."
typedef int32_t np_long;
typedef u_int32_t np_ulong;
typedef u_int16_t np_ushort;
#define N_CURRENT_VERSION 0x02
#define N_VERSION_2 0x02
#define N_CONN_REQ 0
#define N_CONN_RES 1
#define N_DISCON_REQ 2
#define N_DATA_REQ 3
#define N_EXDATA_REQ 4
#define N_INFO_REQ 5
#define N_BIND_REQ 6
#define N_UNBIND_REQ 7
#define N_UNITDATA_REQ 8
#define N_OPTMGMT_REQ 9
#define N_CONN_IND 11
#define N_CONN_CON 12
#define N_DISCON_IND 13
#define N_DATA_IND 14
#define N_EXDATA_IND 15
#define N_INFO_ACK 16
#define N_BIND_ACK 17
#define N_ERROR_ACK 18
#define N_OK_ACK 19
#define N_UNITDATA_IND 20
#define N_UDERROR_IND 21
#define N_DATACK_REQ 23
#define N_DATACK_IND 24
#define N_RESET_REQ 25
#define N_RESET_IND 26
#define N_RESET_RES 27
#define N_RESET_CON 28
#define NE_BIND_REQ 0
#define NE_UNBIND_REQ 1
#define NE_OPTMGMT_REQ 2
#define NE_BIND_ACK 3
#define NE_ERROR_ACK 5
#define NE_OK_ACK1 6
#define NE_OK_ACK2 7
#define NE_OK_ACK3 8
#define NE_OK_ACK4 9
#define NE_CONN_REQ 10
#define NE_CONN_RES 11
#define NE_DISCON_REQ 12
#define NE_DATA_REQ 13
#define NE_EXDATA_REQ 14
#define NE_CONN_IND 16
#define NE_CONN_CON 17
#define NE_DATA_IND 18
#define NE_EXDATA_IND 19
#define NE_DISCON_IND1 21
#define NE_DISCON_IND2 22
#define NE_DISCON_IND3 23
#define NE_PASS_CON 24
#define NE_RESET_REQ 28
#define NE_RESET_RES 29
#define NE_DATACK_REQ 30
#define NE_DATACK_IND 31
#define NE_RESET_IND 32
#define NE_RESET_CON 33
#define NE_UNITDATA_REQ 25
#define NE_UNITDATA_IND 26
#define NE_UDERROR_IND 27
#define NE_NOEVENTS 36
#define NS_UNBND 0
#define NS_WACK_BREQ 1
#define NS_WACK_UREQ 2
#define NS_IDLE 3
#define NS_WACK_OPTREQ 4
#define NS_WACK_RRES 5
#define NS_WCON_CREQ 6
#define NS_WRES_CIND 7
#define NS_WACK_CRES 8
#define NS_DATA_XFER 9
#define NS_WCON_RREQ 10
#define NS_WRES_RIND 11
#define NS_WACK_DREQ6 12
#define NS_WACK_DREQ7 13
#define NS_WACK_DREQ9 14
#define NS_WACK_DREQ10 15
#define NS_WACK_DREQ11 16
#define NS_NOSTATES 18
#define NBADADDR 1
#define NBADOPT 2
#define NACCESS 3
#define NNOADDR 5
#define NOUTSTATE 6
#define NBADSEQ 7
#define NSYSERR 8
#define NBADDATA 10
#define NBADFLAG 16
#define NNOTSUPPORT 18
#define NBOUND 19
#define NBADQOSPARAM 20
#define NBADQOSTYPE 21
#define NBADTOKEN 22
#define NNOPROTOID 23
#define N_UD_UNDEFINED 10
#define N_UD_TD_EXCEEDED 11
#define N_UD_CONGESTION 12
#define N_UD_QOS_UNAVAIL 13
#define N_UD_LIFE_EXCEEDED 14
#define N_UD_ROUTE_UNAVAIL 15
#define N_UD_SEG_REQUIRED 16
#define N_PROVIDER 0x0100
#define N_USER 0x0101
#define N_UNDEFINED 0x0102
#define N_REASON_UNDEFINED 0x0200
#define N_DISC_P 0x0300
#define N_DISC_T 0x0301
#define N_REJ_NSAP_UNKNOWN 0x0302
#define N_REJ_NSAP_UNREACH_P 0x0303
#define N_REJ_NSAP_UNREACH_T 0x0304
#define N_DISC_NORMAL 0x0400
#define N_DISC_ABNORMAL 0x0401
#define N_REJ_P 0x0402
#define N_REJ_T 0x0403
#define N_REJ_INCOMPAT_INFO 0x0406
#define N_REJ_QOS_UNAVAIL_P 0x0305
#define N_REJ_QOS_UNAVAIL_T 0x0306
#define N_REJ_UNSPECIFIED 0x0307
#define N_CONGESTION 0x0500
#define N_RESET_UNSPECIFIED 0x0501
#define N_USER_RESYNC 0x0600
#define REC_CONF_OPT 0x00000001L
#define EX_DATA_OPT 0x00000002L
#define DEFAULT_RC_SEL 0x00000004L
#define DEFAULT_LISTENER 0x00000001L
#define TOKEN_REQUEST 0x00000002L
#define DEFAULT_DEST 0x00000004L
typedef struct {
np_long thru_targ_value;
np_long thru_min_value;
} thru_values_t;
typedef struct {
np_long td_targ_value;
np_long td_max_value;
} td_values_t;
typedef struct {
np_long protect_targ_value;
np_long protect_min_value;
} protection_values_t;
typedef struct {
np_long priority_targ_value;
np_long priority_min_value;
} priority_values_t;
#define N_NO_PROT 0x00000000L
#define N_PASSIVE_PROT 0x00000001L
#define N_ACTIVE_PROT 0x00000002L
#define N_ACTIVE_PASSIVE_PROT 0x00000003L
#define N_LEAST_EXPENSIVE 0x00000000L
#define N_QOS_CO_RANGE1 0x0101
#define N_QOS_CO_SEL1 0x0102
#define N_QOS_CL_RANGE1 0x0103
#define N_QOS_CL_SEL1 0x0104
#define N_QOS_CO_OPT_RANGE1 0x0105
#define N_QOS_CO_OPT_SEL1 0x0106
#define QOS_UNKNOWN -1
typedef struct {
np_ulong n_qos_type;
thru_values_t src_throughput_range;
thru_values_t dest_throughput_range;
td_values_t transit_delay_range;
protection_values_t protection_range;
priority_values_t priority_range;
} N_qos_co_range_t;
typedef struct {
np_ulong n_qos_type;
np_long src_throughput_sel;
np_long dest_throughput_sel;
np_long transit_delay_sel;
np_long protection_sel;
np_long priority_sel;
} N_qos_co_sel_t;
typedef struct {
np_ulong n_qos_type;
td_values_t transit_delay_max;
np_ulong residual_error_rate;
protection_values_t protection_range;
priority_values_t priority_range;
np_long max_accept_cost;
} N_qos_cl_range_t;
typedef struct {
np_ulong n_qos_type;
np_long transit_delay_max;
np_ulong residual_error_rate;
np_long protection_sel;
np_long priority_sel;
np_long max_accept_cost;
} N_qos_cl_sel_t;
typedef struct {
np_ulong n_qos_type;
thru_values_t src_throughput;
thru_values_t dest_throughput;
td_values_t transit_delay_t;
np_long nc_estab_delay;
np_ulong nc_estab_fail_prob;
np_ulong residual_error_rate;
np_ulong xfer_fail_prob;
np_ulong nc_resilience;
np_long nc_rel_delay;
np_ulong nc_rel_fail_prob;
protection_values_t protection_range;
priority_values_t priority_range;
np_long max_accept_cost;
} N_qos_co_opt_range_t;
typedef struct {
np_ulong n_qos_type;
thru_values_t src_throughput;
thru_values_t dest_throughput;
td_values_t transit_delay_t;
np_long nc_estab_delay;
np_ulong nc_estab_fail_prob;
np_ulong residual_error_rate;
np_ulong xfer_fail_prob;
np_ulong nc_resilience;
np_long nc_rel_delay;
np_ulong nc_rel_fail_prob;
np_long protection_sel;
np_long priority_sel;
np_long max_accept_cost;
} N_qos_co_opt_sel_t;
typedef struct {
np_ulong PRIM_type;
} N_info_req_t;
typedef struct {
np_ulong PRIM_type;
np_ulong NSDU_size;
np_ulong ENSDU_size;
np_ulong CDATA_size;
np_ulong DDATA_size;
np_ulong ADDR_size;
np_ulong ADDR_length;
np_ulong ADDR_offset;
np_ulong QOS_length;
np_ulong QOS_offset;
np_ulong QOS_range_length;
np_ulong QOS_range_offset;
np_ulong OPTIONS_flags;
np_ulong NIDU_size;
np_long SERV_type;
np_ulong CURRENT_state;
np_ulong PROVIDER_type;
np_ulong NODU_size;
np_ulong PROTOID_length;
np_ulong PROTOID_offset;
np_ulong NPI_version;
} N_info_ack_t;
#define N_CONS 1
#define N_CLNS 2
#define N_SNICFP 1
#define N_SUBNET 2
typedef struct {
np_ulong PRIM_type;
np_ulong ADDR_length;
np_ulong ADDR_offset;
np_ulong CONIND_number;
np_ulong BIND_flags;
np_ulong PROTOID_length;
np_ulong PROTOID_offset;
} N_bind_req_t;
typedef struct {
np_ulong PRIM_type;
np_ulong ADDR_length;
np_ulong ADDR_offset;
np_ulong CONIND_number;
np_ulong TOKEN_value;
np_ulong PROTOID_length;
np_ulong PROTOID_offset;
} N_bind_ack_t;
typedef struct {
np_ulong PRIM_type;
} N_unbind_req_t;
typedef struct {
np_ulong PRIM_type;
np_ulong QOS_length;
np_ulong QOS_offset;
np_ulong OPTMGMT_flags;
} N_optmgmt_req_t;
typedef struct {
np_ulong PRIM_type;
np_ulong ERROR_prim;
np_ulong NPI_error;
np_ulong UNIX_error;
} N_error_ack_t;
typedef struct {
np_ulong PRIM_type;
np_ulong CORRECT_prim;
} N_ok_ack_t;
typedef struct {
np_ulong PRIM_type;
np_ulong DEST_length;
np_ulong DEST_offset;
np_ulong CONN_flags;
np_ulong QOS_length;
np_ulong QOS_offset;
} N_conn_req_t;
typedef struct {
np_ulong PRIM_type;
np_ulong DEST_length;
np_ulong DEST_offset;
np_ulong SRC_length;
np_ulong SRC_offset;
np_ulong SEQ_number;
np_ulong CONN_flags;
np_ulong QOS_length;
np_ulong QOS_offset;
} N_conn_ind_t;
typedef struct {
np_ulong PRIM_type;
np_ulong TOKEN_value;
np_ulong RES_length;
np_ulong RES_offset;
np_ulong SEQ_number;
np_ulong CONN_flags;
np_ulong QOS_length;
np_ulong QOS_offset;
} N_conn_res_t;
typedef struct {
np_ulong PRIM_type;
np_ulong RES_length;
np_ulong RES_offset;
np_ulong CONN_flags;
np_ulong QOS_length;
np_ulong QOS_offset;
} N_conn_con_t;
typedef struct {
np_ulong PRIM_type;
np_ulong DATA_xfer_flags;
} N_data_req_t;
#define N_MORE_DATA_FLAG 0x00000001L
#define N_RC_FLAG 0x00000002L
typedef struct {
np_ulong PRIM_type;
np_ulong DATA_xfer_flags;
} N_data_ind_t;
typedef struct {
np_ulong PRIM_type;
} N_datack_req_t;
typedef struct {
np_ulong PRIM_type;
} N_datack_ind_t;
typedef struct {
np_ulong PRIM_type;
} N_exdata_req_t;
typedef struct {
np_ulong PRIM_type;
} N_exdata_ind_t;
typedef struct {
np_ulong PRIM_type;
np_ulong RESET_reason;
} N_reset_req_t;
typedef struct {
np_ulong PRIM_type;
np_ulong RESET_orig;
np_ulong RESET_reason;
} N_reset_ind_t;
typedef struct {
np_ulong PRIM_type;
} N_reset_res_t;
typedef struct {
np_ulong PRIM_type;
} N_reset_con_t;
typedef struct {
np_ulong PRIM_type;
np_ulong DISCON_reason;
np_ulong RES_length;
np_ulong RES_offset;
np_ulong SEQ_number;
} N_discon_req_t;
typedef struct {
np_ulong PRIM_type;
np_ulong DISCON_orig;
np_ulong DISCON_reason;
np_ulong RES_length;
np_ulong RES_offset;
np_ulong SEQ_number;
} N_discon_ind_t;
typedef struct {
np_ulong PRIM_type;
np_ulong DEST_length;
np_ulong DEST_offset;
np_ulong RESERVED_field[2];
} N_unitdata_req_t;
typedef struct {
np_ulong PRIM_type;
np_ulong SRC_length;
np_ulong SRC_offset;
np_ulong DEST_length;
np_ulong DEST_offset;
np_ulong ERROR_type;
} N_unitdata_ind_t;
typedef struct {
np_ulong PRIM_type;
np_ulong DEST_length;
np_ulong DEST_offset;
np_ulong RESERVED_field;
np_ulong ERROR_type;
} N_uderror_ind_t;
union N_primitives {
np_ulong type;
N_info_req_t info_req;
N_info_ack_t info_ack;
N_bind_req_t bind_req;
N_bind_ack_t bind_ack;
N_unbind_req_t unbind_req;
N_optmgmt_req_t optmgmt_req;
N_error_ack_t error_ack;
N_uderror_ind_t uderror_ind;
N_ok_ack_t ok_ack;
N_conn_req_t conn_req;
N_conn_ind_t conn_ind;
N_conn_res_t conn_res;
N_conn_con_t conn_con;
N_data_req_t data_req;
N_data_ind_t data_ind;
N_datack_req_t datack_req;
N_datack_ind_t datack_ind;
N_exdata_req_t exdata_req;
N_exdata_ind_t exdata_ind;
N_reset_req_t reset_req;
N_reset_ind_t reset_ind;
N_reset_res_t reset_res;
N_reset_con_t reset_con;
N_discon_req_t discon_req;
N_discon_ind_t discon_ind;
N_unitdata_req_t unitdata_req;
N_unitdata_ind_t unitdata_ind;
};
#endif