Description: Code
#ifndef _SYS_NPI_MTP_H
#define _SYS_NPI_MTP_H
#ident "@(#) npi_mtp.h,v openss7-0_9_2_G(0.9.2.6) Copyright (c) 2001-2008 OpenSS7 Corporation."
#ifndef N_VERSION_2
#define N_CURRENT_VERSION 0x02
#define N_VERSION_2 0x02
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
#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
#ifndef __HAVE_MTP_ADDR
typedef struct mtp_addr {
unsigned int family __attribute__ ((packed));
unsigned short int ni __attribute__ ((packed));
unsigned short int si __attribute__ ((packed));
unsigned int pc __attribute__ ((packed));
} mtp_addr_t;
#define __HAVE_MTP_ADDR
#endif
#define N_QOS_SEL_DATA_MTP 0x0801
typedef struct {
np_ulong n_qos_type;
np_ulong sls;
np_ulong mp;
} N_qos_sel_data_mtp_t;
#define N_QOS_SEL_CONN_MTP 0x0802
typedef struct {
np_ulong n_qos_type;
} N_qos_sel_conn_mtp_t;
#define N_QOS_SEL_INFO_MTP 0x0803
typedef struct {
np_ulong n_qos_type;
np_ulong pvar;
np_ulong popt;
np_ulong sls;
np_ulong mp;
} N_qos_sel_info_mtp_t;
#define N_QOS_RANGE_INFO_MTP 0x0804
typedef struct {
np_ulong n_qos_type;
np_ulong sls_range;
np_ulong mp_range;
} N_qos_range_info_mtp_t;
typedef union N_qos_mtp {
np_ulong n_qos_type;
N_qos_sel_conn_mtp_t n_qos_conn;
N_qos_sel_data_mtp_t n_qos_data;
N_qos_sel_info_mtp_t n_qos_info;
N_qos_range_info_mtp_t n_qos_range;
} N_qos_mtp_t;
#define N_MTP_M_CLUSTER (0x00000100)
#define N_MTP_M_MEMBER (0x00001000)
#define N_MTP_AVAILABLE (0x00000001)
#define N_MTP_PROHIBITED (0x00000002)
#define N_MTP_CONGESTED(__s) (0x00000003|((__s)<<16))
#define N_MTP_DEST_AVAILABLE (N_MTP_AVAILABLE|N_MTP_M_MEMBER )
#define N_MTP_DEST_PROHIBITED (N_MTP_PROHIBITED|N_MTP_M_MEMBER )
#define N_MTP_DEST_CONGESTED(__s) (N_MTP_CONGESTED(__s)|N_MTP_M_MEMBER )
#define N_MTP_CLUS_AVAILABLE (N_MTP_AVAILABLE|N_MTP_M_CLUSTER)
#define N_MTP_CLUS_PROHIBITED (N_MTP_PROHIBITED|N_MTP_M_CLUSTER)
#define N_MTP_CLUS_CONGESTED(__s) (N_MTP_CONGESTED(__s)|N_MTP_M_CLUSTER)
#define N_MTP_RESTARTING (0x00001004)
#define N_MTP_RESTARTED (0x00001005)
#define N_MTP_USER_PART_UNKNOWN (0x00001006)
#define N_MTP_USER_PART_UNEQUIPPED (0x00001007)
#define N_MTP_USER_PART_UNAVAILABLE (0x00001008)
#define N_MTP_CONGESTION_STATUS(__x) (((__x)>>16))
#endif