Description: Code
#ifndef _SYS_NPI_SCCP_H
#define _SYS_NPI_SCCP_H
#ident "@(#) npi_sccp.h,v openss7-0_9_2_G(0.9.2.7) Copyright (c) 2001-2008 OpenSS7 Corporation."
#ifndef N_VERSION_2
#define N_CURRENT_VERSION 0x02
#define N_VERSION_2 0x02
typedef uchar np_uchar;
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_info_ack_t __N_info_ack_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;
#define N_bind_ack_t __N_bind_ack_t
#endif
#define N_NOTICE_IND 32
typedef struct {
np_ulong PRIM_type;
np_ulong DEST_length;
np_ulong DEST_offset;
np_ulong SRC_length;
np_ulong SRC_offset;
np_ulong QOS_length;
np_ulong QOS_offset;
np_ulong RETURN_cause;
} N_notice_ind_t;
#define N_INFORM_REQ 33
typedef struct {
np_ulong PRIM_type;
np_ulong QOS_length;
np_ulong QOS_offset;
np_ulong REASON;
} N_inform_req_t;
#define N_INFORM_IND 34
typedef struct {
np_ulong PRIM_type;
np_ulong QOS_length;
np_ulong QOS_offset;
np_ulong REASON;
} N_inform_ind_t;
#define N_SCCP_INFR_NSP_FAILURE 1
#define N_SCCP_INFR_NSP_CONGESTION 2
#define N_SCCP_INFR_NSP_QOS_CHANGE 3
#define N_SCCP_INFR_NSU_FAILURE 4
#define N_SCCP_INFR_NSU_CONGESTION 5
#define N_SCCP_INFR_NSU_QOS_CHANGE 6
#define N_SCCP_INFR_UNSPECIFIED 7
#define N_COORD_REQ 35
typedef struct {
np_ulong PRIM_type;
np_ulong ADDR_length;
np_ulong ADDR_offset;
} N_coord_req_t;
#define N_COORD_RES 36
typedef struct {
np_ulong PRIM_type;
np_ulong ADDR_length;
np_ulong ADDR_offset;
} N_coord_res_t;
#define N_COORD_IND 37
typedef struct {
np_ulong PRIM_type;
np_ulong ADDR_length;
np_ulong ADDR_offset;
np_ulong SMI;
} N_coord_ind_t;
#define N_COORD_CON 38
typedef struct {
np_ulong PRIM_type;
np_ulong ADDR_length;
np_ulong ADDR_offset;
np_ulong SMI;
} N_coord_con_t;
#define N_STATE_REQ 39
typedef struct {
np_ulong PRIM_type;
np_ulong ADDR_length;
np_ulong ADDR_offset;
np_ulong STATUS;
} N_state_req_t;
#define N_STATE_IND 40
typedef struct {
np_ulong PRIM_type;
np_ulong ADDR_length;
np_ulong ADDR_offset;
np_ulong STATUS;
np_ulong SMI;
} N_state_ind_t;
#define N_PCSTATE_IND 41
typedef struct {
np_ulong PRIM_type;
np_ulong ADDR_length;
np_ulong ADDR_offset;
np_ulong STATUS;
} N_pcstate_ind_t;
#define N_TRAFFIC_IND 42
typedef struct {
np_ulong PRIM_type;
np_ulong ADDR_length;
np_ulong ADDR_offset;
np_ulong TRAFFIC_mix;
} N_traffic_ind_t;
#define N_SCCP_STATUS_USER_IN_SERVICE 1
#define N_SCCP_STATUS_USER_OUT_OF_SERVICE 2
#define N_SCCP_STATUS_REMOTE_SCCP_AVAILABLE 3
#define N_SCCP_STATUS_REMOTE_SCCP_UNAVAILABLE 4
#define N_SCCP_STATUS_REMOTE_SCCP_UNEQUIPPED 5
#define N_SCCP_STATUS_REMOTE_SCCP_INACCESSIBLE 6
#define N_SCCP_STATUS_REMOTE_SCCP_CONGESTED(_x) (7 + _x)
#define N_SCCP_STATUS_SIGNALLING_POINT_INACCESSIBLE 16
#define N_SCCP_STATUS_SIGNALLING_POINT_CONGESTED(_x) (17 + _x)
#define N_SCCP_STATUS_SIGNALLING_POINT_ACCESSIBLE 26
#define N_SCCP_TMIX_ALL_PREFFERED_NO_BACKUP 1
#define N_SCCP_TMIX_ALL_PREFERRED_SOME_BACKUP 2
#define N_SCCP_TMIX_ALL_PREFERRED_ALL_BACKUP 3
#define N_SCCP_TMIX_SOME_PREFERRED_NO_BACKUP 4
#define N_SCCP_TMIX_SOME_PREFERRED_SOME_BACKUP 5
#define N_SCCP_TMIX_NO_PREFERRED_NO_BACKUP 6
#define N_SCCP_TMIX_ALL 7
#define N_SCCP_TMIX_SOME 8
#define N_SCCP_TMIX_NONE 9
#ifndef NSF_UNBND
#define NSF_UNBND (1<<NS_UNBND )
#define NSF_WACK_BREQ (1<<NS_WACK_BREQ )
#define NSF_WACK_UREQ (1<<NS_WACK_UREQ )
#define NSF_IDLE (1<<NS_IDLE )
#define NSF_WACK_OPTREQ (1<<NS_WACK_OPTREQ)
#define NSF_WACK_RRES (1<<NS_WACK_RRES )
#define NSF_WCON_CREQ (1<<NS_WCON_CREQ )
#define NSF_WRES_CIND (1<<NS_WRES_CIND )
#define NSF_WACK_CRES (1<<NS_WACK_CRES )
#define NSF_DATA_XFER (1<<NS_DATA_XFER )
#define NSF_WCON_RREQ (1<<NS_WCON_RREQ )
#define NSF_WRES_RIND (1<<NS_WRES_RIND )
#define NSF_WACK_DREQ6 (1<<NS_WACK_DREQ6 )
#define NSF_WACK_DREQ7 (1<<NS_WACK_DREQ7 )
#define NSF_WACK_DREQ9 (1<<NS_WACK_DREQ9 )
#define NSF_WACK_DREQ10 (1<<NS_WACK_DREQ10)
#define NSF_WACK_DREQ11 (1<<NS_WACK_DREQ11)
#endif
typedef struct sccp_addr {
np_ulong ni;
np_ulong ri;
np_ulong pc;
np_ulong ssn;
np_ulong gtt;
np_ulong tt;
np_ulong es;
np_ulong nplan;
np_ulong nai;
np_ulong alen;
uchar addr[0];
} sccp_addr_t;
#define SCCP_MAX_ADDR_LENGTH 32
#define SCCP_RI_DPC_SSN 0
#define SCCP_RI_GT 1
#define SCCP_GTTTYPE_NONE 0
#define SCCP_GTTTYPE_NAI 1
#define SCCP_GTTTYPE_TT 2
#define SCCP_GTTTYPE_NP 3
#define SCCP_GTTTYPE_NP_NAI 4
#define N_QOS_SEL_DATA_SCCP 0x0901
typedef struct {
np_ulong n_qos_type;
np_ulong protocol_class;
np_ulong option_flags;
np_ulong sequence_selection;
np_ulong message_priority;
np_ulong importance;
} N_qos_sel_data_sccp_t;
#define N_QOS_SEL_CONN_SCCP 0x0902
typedef struct {
np_ulong n_qos_type;
np_ulong protocol_class;
np_ulong option_flags;
np_ulong sequence_selection;
np_ulong message_priority;
np_ulong importance;
} N_qos_sel_conn_sccp_t;
#define N_QOS_SEL_INFO_SCCP 0x0903
typedef struct {
np_ulong n_qos_type;
np_ulong protocol_class;
np_ulong option_flags;
np_ulong sequence_selection;
np_ulong message_priority;
np_ulong importance;
} N_qos_sel_info_sccp_t;
#define N_QOS_RANGE_INFO_SCCP 0x0904
typedef struct {
np_ulong n_qos_type;
np_ulong protocol_classes;
np_ulong sequence_selection;
} N_qos_range_info_sccp_t;
#define N_QOS_SEL_INFR_SCCP 0x0905
typedef struct {
np_ulong n_qos_type;
np_ulong protocol_class;
np_ulong option_flags;
np_ulong sequence_selection;
np_ulong message_priority;
np_ulong importance;
} N_qos_sel_infr_sccp_t;
typedef union {
np_ulong n_qos_type;
N_qos_sel_data_sccp_t sel_data;
N_qos_sel_conn_sccp_t sel_conn;
N_qos_sel_info_sccp_t sel_info;
N_qos_range_info_sccp_t range_info;
N_qos_sel_infr_sccp_t sel_infr;
} N_qos_sccp_t;
#define N_QOS_PCLASS_0 0x01
#define N_QOS_PLCASS_1 0x02
#define N_QOS_PCLASS_2 0x04
#define N_QOS_PCLASS_3 0x08
#define N_QOS_PCLASS_ALL 0x0f
#define SCCP_RELC_END_USER_ORIGINATED 0x1000
#define SCCP_RELC_END_USER_BUSY 0x1001
#define SCCP_RELC_END_USER_FAILURE 0x1002
#define SCCP_RELC_SCCP_USER_ORIGINATED 0x1003
#define SCCP_RELC_REMOTE_PROCEDURE_ERROR 0x1004
#define SCCP_RELC_INCONSISTENT_CONNECTION_DATA 0x1005
#define SCCP_RELC_ACCESS_FAILURE 0x1006
#define SCCP_RELC_ACCESS_CONGESTION 0x1007
#define SCCP_RELC_SUBSYSTEM_FAILURE 0x1008
#define SCCP_RELC_SUBSYSTEM_CONGESTION 0x1009
#define SCCP_RELC_MTP_FAILURE 0x100a
#define SCCP_RELC_NETWORK_CONGESTION 0x100b
#define SCCP_RELC_EXPIRATION_OF_RESET_TIMER 0x100c
#define SCCP_RELC_EXPIRATION_OF_RECEIVE_INACTIVITY_TIMER 0x100d
#define SCCP_RELC_RESERVED 0x100e
#define SCCP_RELC_UNQUALIFIED 0x100f
#define SCCP_RELC_SCCP_FAILURE 0x1010
#define SCCP_RETC_NO_ADDRESS_TYPE_TRANSLATION 0x2000
#define SCCP_RETC_NO_ADDRESS_TRANSLATION 0x2001
#define SCCP_RETC_SUBSYSTEM_CONGESTION 0x2002
#define SCCP_RETC_SUBSYSTEM_FAILURE 0x2003
#define SCCP_RETC_UNEQUIPPED_USER 0x2004
#define SCCP_RETC_MTP_FAILURE 0x2005
#define SCCP_RETC_NETWORK_CONGESTION 0x2006
#define SCCP_RETC_UNQUALIFIED 0x2007
#define SCCP_RETC_MESSAGE_TRANSPORT_ERROR 0x2008
#define SCCP_RETC_LOCAL_PROCESSING_ERROR 0x2009
#define SCCP_RETC_NO_REASSEMBLY_AT_DESTINATION 0x200a
#define SCCP_RETC_SCCP_FAILURE 0x200b
#define SCCP_RETC_SCCP_HOP_COUNTER_VIOLATION 0x200c
#define SCCP_RETC_SEGMENTATION_NOT_SUPPORTED 0x200d
#define SCCP_RETC_SEGMENTATION_FAILURE 0x200e
#define SCCP_RETC_MESSAGE_CHANGE_FAILURE 0x20f7
#define SCCP_RETC_INVALID_INS_ROUTING_REQUEST 0x20f8
#define SCCP_RETC_INVALID_INSI_ROUTING_REQUEST 0x20f9
#define SCCP_RETC_UNAUTHORIZED_MESSAGE 0x20fa
#define SCCP_RETC_MESSAGE_INCOMPATIBILITY 0x20fb
#define SCCP_RETC_CANNOT_PERFORM_ISNI_CONSTRAINED_ROUTING 0x20fc
#define SCCP_RETC_REDUNDANT_ISNI_CONSTRAINED_ROUTING_INFO 0x20fd
#define SCCP_RETC_UNABLE_TO_PERFORM_ISNI_IDENTIFICATION 0x20fe
#define SCCP_RESC_END_USER_ORIGINATED 0x3000
#define SCCP_RESC_SCCP_USER_ORIGINATED 0x3001
#define SCCP_RESC_MESSAGE_OUT_OF_ORDER_INCORRECT_PS 0x3002
#define SCCP_RESC_MESSAGE_OUT_OF_ORDER_INCORRECT_PR 0x3003
#define SCCP_RESC_REMOTE_PROC_ERROR_MESSAGE_OUT_OF_WINDOW 0x3004
#define SCCP_RESC_REMOTE_PROC_ERROR_INCORRECT_PS_AFTER_INIT 0x3005
#define SCCP_RESC_REMOTE_PROC_ERROR_GENERAL 0x3006
#define SCCP_RESC_REMOTE_END_USER_OPERATIONAL 0x3007
#define SCCP_RESC_NETWORK_OPERATIONAL 0x3008
#define SCCP_RESC_ACCESS_OPERATIONAL 0x3009
#define SCCP_RESC_NETWORK_CONGESTION 0x300a
#define SCCP_RESC_NOT_OBTAINABLE 0x300b
#define SCCP_RESC_UNQUALIFIED 0x300c
#define SCCP_ERRC_LRN_MISMATCH_UNASSIGNED_DEST_LRN 0x4000
#define SCCP_ERRC_LRN_MISMATCH_INCONSISTENT_SOURCE_LRN 0x4001
#define SCCP_ERRC_POINT_CODE_MISMATCH 0x4002
#define SCCP_ERRC_SERVICE_CLASS_MISMATCH 0x4003
#define SCCP_ERRC_UNQUALIFIED 0x4004
#define SCCP_REFC_END_USER_ORIGINATED 0x5000
#define SCCP_REFC_END_USER_CONGESTION 0x5001
#define SCCP_REFC_END_USER_FAILURE 0x5002
#define SCCP_REFC_SCCP_USER_ORIGINATED 0x5003
#define SCCP_REFC_DESTINATION_ADDRESS_UNKNOWN 0x5004
#define SCCP_REFC_DESTINATION_INACCESSIBLE 0x5005
#define SCCP_REFC_NETWORK_RESOURCE_QOS_NOT_AVAIL_PERM 0x5006
#define SCCP_REFC_NETWORK_RESOURCE_QOS_NOT_AVAIL_TRANS 0x5007
#define SCCP_REFC_ACCESS_FAILURE 0x5008
#define SCCP_REFC_ACCESS_CONGESTION 0x5009
#define SCCP_REFC_SUBSYSTEM_FAILURE 0x500a
#define SCCP_REFC_SUBSYSTEM_CONGESTION 0x500b
#define SCCP_REFC_EXPIRATION_OF_NC_ESTAB_TIMER 0x500c
#define SCCP_REFC_INCOMPATIBLE_USER_DATA 0x500d
#define SCCP_REFC_RESERVED 0x500e
#define SCCP_REFC_UNQUALIFIED 0x500f
#define SCCP_REFC_SCCP_HOP_COUNTER_VIOLATION 0x5010
#define SCCP_REFC_SCCP_FAILURE 0x5011
#define SCCP_REFC_NO_ADDRESS_TYPE_TRANSLATION 0x5012
#define SCCP_REFC_UNEQUIPPED_USER 0x5013
#endif