/****************************************************************************/ /* */ /* **** COPYRIGHT NOTICE **** */ /* */ /* */ /* Copyright (c) Digital Equipment Corporation, 1994 */ /* */ /* All Rights Reserved. Unpublished rights reserved under the */ /* copyright laws of the United States. */ /* */ /* The software contained on this media is proprietary to and */ /* embodies the confidential technology of Digital Equipment */ /* Corporation. Possession, use, duplication or dissemination */ /* of the software and media is authorized only pursuant to a */ /* valid written license from Digital Equipment Corporation. */ /* */ /* */ /* The information in this software is subject to change without notice */ /* and should not be construed as a commitment by DIGITAL EQUIPMENT */ /* CORPORATION. */ /* */ /* DIGITAL assumes no responsibility for the use or reliability of its */ /* software on equipment which is not supplied by DIGITAL. */ /* */ /* */ /****************************************************************************/ /************************************************************************* ** ** FACILITY: DECss7 - Signalling System 7 ** ** ENVIRONMENT: ** ** MODULE NAME: SS7_COMMON_TCAP_USERAPIS.H ** ** DESCRIPTION: ** ** This module declares data structures common for all the API ** above the TCAP layer. ** ** AUTHORS: Jean-Francois Gardin ** ** CREATION DATE: 17 june, 1998 ** ** MODIFICATION HISTORY: ** ** Name (UserID) Date Comments ** ** *************************************************************************/ #ifndef _SS7TCAP_USERAPIS_H_ #define _SS7TCAP_USERAPIS_H_ /* global title short address maximum length */ #define SS7_K_SHRT_ADR_LEN 32 /* short address */ /* national international indicator */ #define SS7_K_NAT_IND 0x01 /* National Indication */ #define SS7_K_INAT_IND 0x00 /* International Indication */ /* routing indicators for sccp */ #define SS7_K_RTE_GT 0x00 /* route based on global title */ #define SS7_K_RTE_SSN 0x01 /* route based on ssn */ /* global title formats */ #define SS7_K_GTFRMT_1 1 /* global title format 1 */ #define SS7_K_GTFRMT_2 2 /* global title format 2 */ #ifndef _SS7_BOOLEAN_T_ #define _SS7_BOOLEAN_T_ typedef unsigned char ss7_boolean_t; enum {SS7_K_FALSE=0, SS7_K_TRUE}; #endif typedef #ifdef VMS unsigned int /* an event flag number */ #else int /* number of a file descriptor */ #endif ss7_synch_var_t; /* Basic type */ typedef unsigned char ss7_u8; typedef unsigned short ss7_u16; typedef unsigned int ss7_u32; typedef char ss7_s8; typedef short ss7_s16; /* Token typedefs */ typedef struct ss7_tkn_u8 /* token ss7_u8 */ { ss7_boolean_t pres; /* present flag */ ss7_u8 val; /* value */ ss7_u16 spare1; /* for alignment */ #ifdef ALIGN_64BIT ss7_u32 spare2; /* for 64 bit alignment */ #endif } ss7_tkn_u8; typedef struct ss7_tkn_u16 /* token ss7_u16 */ { ss7_boolean_t pres; /* present flag */ ss7_u8 spare1; /* for alignment */ ss7_u16 val; /* value */ #ifdef ALIGN_64BIT ss7_u32 spare2; /* for 64 bit alignment */ #endif } ss7_tkn_u16; typedef struct ss7_tkn_u32 /* token ss7_u32 */ { ss7_boolean_t pres; /* present flag */ ss7_u8 spare1; /* for alignment */ ss7_u16 spare2; /* for alignment */ ss7_u32 val; /* value */ } ss7_tkn_u32; typedef struct ss7_tkn_s8 /* token s8 */ { ss7_u8 pres; /* present flag */ ss7_s8 val; /* value */ ss7_u16 spare1; /* for alignment */ } ss7_tkn_s8; typedef struct ss7_tkn_str4 /* token string */ { ss7_boolean_t pres; /* present flag */ ss7_u8 len; /* length */ ss7_u16 spare1; /* for alignment */ #ifdef ALIGN_64BIT ss7_u32 spare2; /* for 64 bit alignment */ ss7_u8 val[8]; /* string value - 8 byte alligned */ #else ss7_u8 val[4]; /* string value - 4 byte aligned */ #endif /* ALIGN_64BIT */ } ss7_tkn_str4; typedef struct ss7_tkn_str12 /* token string */ { ss7_boolean_t pres; /* present flag */ ss7_u8 len; /* length */ ss7_u16 spare1; /* for alignment */ #ifdef ALIGN_64BIT ss7_u32 spare2; /* for 64 bit alignment */ ss7_u8 val[16]; /* string value - 8 byte alligned */ #else ss7_u8 val[12]; /* string value - 4 byte aligned */ #endif /* ALIGN_64BIT */ } ss7_tkn_str12; typedef struct ss7_tkn_str32 /* token string */ { ss7_boolean_t pres; /* present flag */ ss7_u8 len; /* length */ ss7_u16 spare1; /* for alignment */ #ifdef ALIGN_64BIT ss7_u32 spare2; /* for 64 bit alignment */ #endif ss7_u8 val[32]; /* string value - 4 byte aligned */ } ss7_tkn_str32; typedef struct ss7_tkn_str64 /* token string */ { ss7_boolean_t pres; /* present flag */ ss7_u8 len; /* length */ ss7_u16 spare1; /* for alignment */ #ifdef ALIGN_64BIT ss7_u32 spare2; /* for 64 bit alignment */ #endif ss7_u8 val[64]; /* string value - 4 byte aligned */ } ss7_tkn_str64; typedef struct ss7_tkn_str132 /* token string */ { ss7_boolean_t pres; /* present flag */ ss7_u8 len; /* length */ ss7_u16 spare1; /* for alignment */ #ifdef ALIGN_64BIT ss7_u32 spare2; /* for 64 bit alignment */ ss7_u8 val[136]; /* string value - 8 byte alligned */ #else ss7_u8 val[132]; /* string value - 4 byte aligned */ #endif /* ALIGN_64BIT */ } ss7_tkn_str132; typedef struct ss7_tkn_str256 /* token string */ { ss7_boolean_t pres; /* present flag */ ss7_u8 len; /* length */ ss7_u16 spare1; /* for alignment */ #ifdef ALIGN_64BIT ss7_u32 spare2; /* for 64 bit alignment */ #endif ss7_u8 val[256]; /* string value - 4 byte aligned */ } ss7_tkn_str256; /* Short address structure */ typedef struct ss7_shrt_addrs_t /* short address */ { ss7_u8 length; /* length bytes */ ss7_u8 strg[SS7_K_SHRT_ADR_LEN]; /* address */ } ss7_shrt_addrs_t; /* global title structure */ typedef struct ss7_glb_title_t { ss7_u8 gti; /* Global Title Indicator */ union { struct { ss7_boolean_t odd_even; /* odd/even indicator */ ss7_u8 nat_addr; /* nature of address */ }ss7_f1; struct { ss7_u8 t_type; /* translation type */ } ss7_f2; struct { ss7_u8 t_type; /* translation type */ ss7_u8 num_plan; /* numbering plan */ ss7_u8 enc_sch; /* encoding scheme */ } ss7_f3; struct { ss7_u8 t_type; /* translation type */ ss7_u8 num_plan; /* numbering plan */ ss7_u8 enc_sch; /* encoding scheme */ ss7_u8 nat_addr; /* nature of address */ } ss7_f4; } ss7_gt; ss7_shrt_addrs_t addr; /* address digits (bcd) */ } ss7_glb_title_t; typedef ss7_u32 ss7_dpc_t; typedef ss7_u8 ss7_ssn_t; typedef ss7_s16 ss7_swtch_t; typedef ss7_tkn_s8 ss7_invoke_id_t; /* invoke id */ /* SCCP address structure */ typedef struct ss7_sp_addr_t { ss7_boolean_t pres; /* address is present */ ss7_swtch_t sw; /* not used */ ss7_boolean_t ssf_pres; /* not used */ ss7_u8 ssf; /* not used */ ss7_boolean_t n_i_ind; /* national/international indicator */ ss7_u8 rtg_ind; /* routing indicator */ ss7_boolean_t ssn_ind; /* subsystem number indicator */ ss7_boolean_t pc_ind; /* point code indicator */ ss7_ssn_t ssn; /* subsystem number */ ss7_dpc_t pc; /* point code */ ss7_glb_title_t gt; /* global title */ } ss7_sp_addr_t; #endif /* _SS7TCAP_USERAPIS_H_ */