📄 npi.h
字号:
td_values_t transit_delay_t; /* transit delay values */ long nc_estab_delay; /* NC establishment delay */ np_ulong nc_estab_fail_prob; /* NC estab failure probability */ np_ulong residual_error_rate; /* residual error rate */ np_ulong xfer_fail_prob; /* transfer failure probability */ np_ulong nc_resilience; /* NC resilience */ long nc_rel_delay; /* NC release delay */ np_ulong nc_rel_fail_prob; /* NC release failure probability */ long protection_sel; /* protection selected */ long priority_sel; /* priority selected */ long max_accept_cost; /* maximum acceptable cost */} N_qos_co_opt_sel_t;/* * NPI Primitive Definitions *//* * Local management service primitives *//* * Information request */typedef struct{ np_ulong PRIM_type; /* always N_INFO_REQ */} N_info_req_t;/* * Information acknowledgement */typedef struct{ np_ulong PRIM_type; /* always N_INFO_ACK */ np_ulong NSDU_size; /* maximum NSDU size */ np_ulong ENSDU_size; /* maximum ENSDU size */ np_ulong CDATA_size; /* connect data size */ np_ulong DDATA_size; /* discon data size */ np_ulong ADDR_size; /* address size */ np_ulong ADDR_length; /* address length */ np_ulong ADDR_offset; /* address offset */ np_ulong QOS_length; /* QOS values length */ np_ulong QOS_offset; /* QOS values offset */ np_ulong QOS_range_length; /* length of QOS values' range */ np_ulong QOS_range_offset; /* offset of QOS values' range */ np_ulong OPTIONS_flags; /* bit masking for options supported */ np_ulong NIDU_size; /* network i/f data unit size */ long SERV_type; /* service type */ np_ulong CURRENT_state; /* current state */ np_ulong PROVIDER_type; /* type of NS provider */ np_ulong NODU_size; /* optimal NSDU size */ np_ulong PROTOID_length; /* length of bound protocol ids */ np_ulong PROTOID_offset; /* offset of bound protocol ids */ np_ulong NPI_version; /* version # of npi that is supported */} N_info_ack_t;/* * Service types supported by NS provider */#define N_CONS 1 /* Connection-mode network service supported */#define N_CLNS 2 /* Connection-less network service supported *//* * Valid provider types */#define N_SNICFP 1#define N_SUBNET 2/* * Bind request */typedef struct{ np_ulong PRIM_type; /* always N_BIND_REQ */ np_ulong ADDR_length; /* length of address */ np_ulong ADDR_offset; /* offset of address */ np_ulong CONIND_number; /* requested # of connect- */ /* indications to be queued */ np_ulong BIND_flags; /* bind flags */ np_ulong PROTOID_length; /* length of bound protocol ids */ np_ulong PROTOID_offset; /* offset of bound protocol ids */} N_bind_req_t;/* * Bind acknowledgement */typedef struct{ np_ulong PRIM_type; /* always N_BIND_ACK */ np_ulong ADDR_length; /* address length */ np_ulong ADDR_offset; /* offset of address */ np_ulong CONIND_number; /* connection indications */ np_ulong TOKEN_value; /* value of "token" assigned to stream */ np_ulong PROTOID_length; /* length of bound protocol ids */ np_ulong PROTOID_offset; /* offset of bound protocol ids */} N_bind_ack_t;/* * Unbind request */typedef struct{ np_ulong PRIM_type; /* always N_UNBIND_REQ */} N_unbind_req_t;/* * Options management request */typedef struct{ np_ulong PRIM_type; /* always N_OPTMGMT_REQ */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */ np_ulong OPTMGMT_flags; /* options management flags */} N_optmgmt_req_t;/* * Error acknowledgement for CONS services */typedef struct{ np_ulong PRIM_type; /* always N_ERROR_ACK */ np_ulong ERROR_prim; /* primitive in error */ np_ulong NPI_error; /* NPI error code */ np_ulong UNIX_error; /* UNIX error code */} N_error_ack_t;/* * Successful completion acknowledgement */typedef struct{ np_ulong PRIM_type; /* always N_OK_ACK */ np_ulong CORRECT_prim; /* primitive being acknowledged */} N_ok_ack_t;/* * CONS PRIMITIVES *//* * Network connection request */typedef struct{ np_ulong PRIM_type; /* always N_CONN_REQ */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */} N_conn_req_t;/* * Connection indication */typedef struct{ np_ulong PRIM_type; /* always N_CONN_IND */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong SRC_length; /* source address length */ np_ulong SRC_offset; /* source address offset */ np_ulong SEQ_number; /* sequence number */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */} N_conn_ind_t;/* * Connection response */typedef struct{ np_ulong PRIM_type; /* always N_CONN_RES */ np_ulong TOKEN_value; /* NC response token value */ np_ulong RES_length; /* responding address length */ np_ulong RES_offset; /* responding address offset */ np_ulong SEQ_number; /* sequence number */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */} N_conn_res_t;/* * Connection confirmation */typedef struct{ np_ulong PRIM_type; /* always N_CONN_CON */ np_ulong RES_length; /* responding address length */ np_ulong RES_offset; /* responding address offset */ np_ulong CONN_flags; /* bit masking for options flags */ np_ulong QOS_length; /* length of QOS parameter values */ np_ulong QOS_offset; /* offset of QOS parameter values */} N_conn_con_t;/* * Connection mode data transfer request */typedef struct{ np_ulong PRIM_type; /* always N_DATA_REQ */ np_ulong DATA_xfer_flags; /* data transfer flags */} N_data_req_t;/* * NPI MORE_DATA_FLAG for segmenting NSDU into more than 1 NIDUs */#define N_MORE_DATA_FLAG 0x00000001L /* Indicates that the next NIDU is */ /* part of this NSDU *//* * NPI Receipt confirmation request set flag */#define N_RC_FLAG 0x00000002L /* Indicates if receipt */ /* confirmation is required *//* * Incoming data indication for an NC */typedef struct{ np_ulong PRIM_type; /* always N_DATA_IND */ np_ulong DATA_xfer_flags; /* data transfer flags */} N_data_ind_t;/* * Data acknowledgement request */typedef struct{ np_ulong PRIM_type; /* always N_DATACK_REQ */} N_datack_req_t;/* * Data acknowledgement indication */typedef struct{ np_ulong PRIM_type; /* always N_DATACK_IND */} N_datack_ind_t;/* * Expedited data transfer request */typedef struct{ np_ulong PRIM_type; /* always N_EXDATA_REQ */} N_exdata_req_t;/* * Expedited data transfer indication */typedef struct{ np_ulong PRIM_type; /* always N_EXDATA_IND */} N_exdata_ind_t;/* * NC reset request */typedef struct{ np_ulong PRIM_type; /* always N_RESET_REQ */ np_ulong RESET_reason; /* reason for reset */} N_reset_req_t;/* * NC reset indication */typedef struct{ np_ulong PRIM_type; /* always N_RESET_IND */ np_ulong RESET_orig; /* reset originator */ np_ulong RESET_reason; /* reason for reset */} N_reset_ind_t;/* * NC reset response */typedef struct{ np_ulong PRIM_type; /* always N_RESET_RES */} N_reset_res_t;/* * NC reset confirmed */typedef struct{ np_ulong PRIM_type; /* always N_RESET_CON */} N_reset_con_t;/* * NC disconnection request */typedef struct{ np_ulong PRIM_type; /* always N_DISCON_REQ */ np_ulong DISCON_reason; /* reason */ np_ulong RES_length; /* responding address length */ np_ulong RES_offset; /* responding address offset */ np_ulong SEQ_number; /* sequence number */} N_discon_req_t;/* * NC disconnection indication */typedef struct{ np_ulong PRIM_type; /* always N_DISCON_IND */ np_ulong DISCON_orig; /* originator */ np_ulong DISCON_reason; /* reason */ np_ulong RES_length; /* address length */ np_ulong RES_offset; /* address offset */ np_ulong SEQ_number; /* sequence number */} N_discon_ind_t;/* * CLNS PRIMITIVES *//* * Unitdata transfer request */typedef struct{ np_ulong PRIM_type; /* always N_UNITDATA_REQ */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong RESERVED_field[2]; /* reserved field for DLPI compatibility */} N_unitdata_req_t;/* * Unitdata transfer indication */typedef struct{ np_ulong PRIM_type; /* always N_UNITDATA_IND */ np_ulong SRC_length; /* source address length */ np_ulong SRC_offset; /* source address offset */ np_ulong DEST_length; /* source address length */ np_ulong DEST_offset; /* source address offset */ np_ulong ERROR_type; /* reserved field for DLPI compatibility */} N_unitdata_ind_t;/* * Unitdata error indication for CLNS services */typedef struct{ np_ulong PRIM_type; /* always N_UDERROR_IND */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong RESERVED_field; /* reserved field for DLPI compatibility */ np_ulong ERROR_type; /* error type */} N_uderror_ind_t;/* * The following represents a union of all the NPI primitives */union N_primitives { np_ulong type; N_info_req_t info_req; /* information request */ N_info_ack_t info_ack; /* information acknowledgement */ N_bind_req_t bind_req; /* bind request */ N_bind_ack_t bind_ack; /* bind acknowledgement */ N_unbind_req_t unbind_req; /* unbind request */ N_optmgmt_req_t optmgmt_req; /* options management request */ N_error_ack_t error_ack; /* error acknowledgement */ N_uderror_ind_t uderror_ind; /* unitdata error indication */ N_ok_ack_t ok_ack; /* ok acknowledgement */ N_conn_req_t conn_req; /* connect request */ N_conn_ind_t conn_ind; /* connect indication */ N_conn_res_t conn_res; /* connect response */ N_conn_con_t conn_con; /* connect confirm */ N_data_req_t data_req; /* data request */ N_data_ind_t data_ind; /* data indication */ N_datack_req_t datack_req; /* data acknowledgement request */ N_datack_ind_t datack_ind; /* data acknowledgement indication */ N_exdata_req_t exdata_req; /* expedited data request */ N_exdata_ind_t exdata_ind; /* expedited data indication */ N_reset_req_t reset_req; /* reset request */ N_reset_ind_t reset_ind; /* reset indication */ N_reset_res_t reset_res; /* reset response */ N_reset_con_t reset_con; /* reset confirm */ N_discon_req_t discon_req; /* disconnect request */ N_discon_ind_t discon_ind; /* disconnect indication */ N_unitdata_req_t unitdata_req; /* unitdata request */ N_unitdata_ind_t unitdata_ind; /* unitdata indication */};#endif /* from top of file */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -