/****************************************************************************/ /* */ /* **** 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: OSF/1 ** ** MODULE NAME: SS7MGTAPI.H ** ** DESCRIPTION: ** ** This module declares routine entrypoints and associated data ** structures which collectively define the DECss7 Management Application ** Programming Interface. ** ** REMARK: Usage: #include ** ** AUTHORS: Kevin MILES ** ** CREATION DATE: 2 August, 1994 ** ** MODIFICATION HISTORY: ** ** Name Date Comments ** ** P. Garnero 16-Jul-1996 Port on VMS ** G. Gasco 07-Oct-1996 Add the ss7_mgt_bin_timestamp_to_string routine. ** P. Gauthier 18-Mar-1997 SS7V31_PSI: Change ss7_mgt_associate routine. ** G. Gasco 27-Apr-1998 Add the ss7_gup_show_next callback routine. ** S. Vujnovic 8-JUN-1998 SURMER-SS7GENV31-QAR113: Changed *indic_handler to indic_handler in ss7_mgt_associate ** P. Garnero 16-Jul-1998 Port on WNT ** ******************************************************************************/ #ifdef WIN32 #include #endif #ifdef __unix__ #include #else #ifdef __cplusplus #ifndef _BEGIN_CPLUSPLUS #define _BEGIN_CPLUSPLUS extern "C" { #endif #ifndef _END_CPLUSPLUS #define _END_CPLUSPLUS } #endif #else #ifndef _BEGIN_CPLUSPLUS #define _BEGIN_CPLUSPLUS #endif #ifndef _END_CPLUSPLUS #define _END_CPLUSPLUS #endif #endif /* __cplusplus */ #endif /* __unix__ */ #ifndef _SS7MGTAPI_H_ #define _SS7MGTAPI_H_ _BEGIN_CPLUSPLUS #ifndef _SS7COMMON_H_ #define _SS7COMMON_H_ #ifdef WIN32 /* On Windows NT: */ /* -------------- */ /* DECss7 status codes use the most-significant two bits to */ /* indicate the severity of the status. This is Windows NT */ /* standard format for status codes. */ /* Error code format is: */ /* 31..30 29 28 27..16 15..0 */ /* Severity CustomerCode Reserved FacilityCode StatusCode */ #define SS7_K_INFO 1 #define SS7_K_WARNING 2 #define SS7_K_ERROR 3 #define SS7_K_SUCCESSFUL 0 #define SS7_K_SEVERE 4 /* never happens, set to 4 for compatibility with Unix/Vms */ #define SS7_F_SEVERITY(AI_code) (((AI_code)>>30)&3) #define SS7_F_SUCCESS(AI_code) (!(SS7_F_SEVERITY(AI_code)&2)) #else /* On VMS and Unix: */ /* DECss7 status codes use the least-significant three bits to */ /* indicate the severity of the status. The following definitions */ /* are an aid to analysing a message's severity. Note that the */ /* least-significant bit will be set if the status is success */ /* or information. So to determine whether a call succeeded, use */ /* something like: */ /* */ /* status = ss7_proc (...); */ /* if (status && SS7_M_SUCCESSFUL) */ /* okay(); */ /* else */ /* error(); */ /* */ /* Any other structure in DECss7 status values is platform-specific.*/ #define SS7_M_SEVERITY 7 #define SS7_M_SUCCESSFUL 1 #define SS7_K_WARNING 0 /* WARNING */ #define SS7_K_SUCCESSFUL 1 /* SUCCESSFUL COMPLETION */ #define SS7_K_ERROR 2 /* ERROR */ #define SS7_K_INFO 3 /* INFORMATION */ #define SS7_K_SEVERE 4 /* SEVERE ERROR */ #endif /* DECss7 API data type definitions and other stuff to help when */ /* processing constructed parameters. */ #ifndef _SS7_BOOLEAN_T_ #define _SS7_BOOLEAN_T_ typedef unsigned char ss7_boolean_t; enum {SS7_K_FALSE=0, SS7_K_TRUE}; #endif /* Used to perform DECss7 cleanup. */ #ifndef VMS void ss7_exit ( void ) ; #endif #endif /* _SS7COMMON_H_ */ typedef #if defined(VMS) unsigned int /* an event flag number */ #elif defined(WIN32) HANDLE /* an event handle */ #else int /* a file descriptor number */ #endif ss7_synch_var_t; typedef unsigned int (*callback) ( unsigned long user_param, unsigned char *output_list, unsigned long output_list_length ); typedef unsigned int (*event_callback) ( unsigned char *output_list, unsigned long output_list_length ); typedef unsigned int (*report_callback) ( unsigned char *output_list, unsigned long output_list_length ); typedef unsigned int (*indic_handler_callback) ( unsigned char *output_list, unsigned long output_list_length ); /************************ ** Routine prototypes ** ************************/ unsigned int ss7_mgt_action ( char *entity_name, unsigned long entity_name_length, char action_code, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_add ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_associate ( unsigned long option, unsigned long role, indic_handler_callback indic_handler, callback back_rtn, unsigned long user_param ); unsigned int ss7_mgt_create ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_delete ( char *entity_name, unsigned long entity_name_length, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_deliver_indication ( ); unsigned int ss7_mgt_disable_event ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_disassociate ( callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_enable_event ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, event_callback event_handler, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_get_synch_var ( ss7_synch_var_t *synchvar ); unsigned int ss7_mgt_modify ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_remove ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_show ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_show_next ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, callback back_rtn, unsigned long user_param, unsigned long association_id ); /************************* ** SCCP Management API ** ************************/ unsigned int ss7_mgt_sccp_disable_reports ( char *entity_name, unsigned long entity_name_length, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_sccp_enable_reports ( char *entity_name, unsigned long entity_name_length, report_callback report_rtn, callback back_rtn, unsigned long user_param, unsigned long association_id ); unsigned int ss7_mgt_sccp_send_primitive ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, callback back_rtn, unsigned long user_param, unsigned long association_id ); /********************************* ** Decoding timestamp function ** *********************************/ unsigned int ss7_mgt_bin_timestamp_to_string ( char *bin_timestamp, unsigned long string_timestamp_max_len, char *string_timestamp, unsigned long *string_timestamp_len ); /***************************** ** ANSI Specific functions ** *****************************/ unsigned int ss7_mgt_encode_ansi_dest_id ( unsigned long dest_type, char *dpc_fields, unsigned long dpc_fields_length, unsigned long *dest_id ); unsigned int ss7_mgt_decode_ansi_dest_id ( unsigned long dest_id, char *dpc_fields, unsigned long dpc_fields_max_length, unsigned long *dpc_fields_length, unsigned long *dest_type ); /************* ** GUP API ** *************/ typedef struct ss7_gup_callbacks_vector_s { unsigned int (*ss7_gup_action) ( char *entity_name, unsigned long entity_name_length, char action_code, void *request_context ) ; unsigned int (*ss7_gup_add) ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, void *request_context ) ; unsigned int (*ss7_gup_create) ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, void *request_context ) ; unsigned int (*ss7_gup_delete) ( char *entity_name, unsigned long entity_name_length, void *request_context ) ; unsigned int (*ss7_gup_delete_sink) ( void *sink ) ; unsigned int (*ss7_gup_disable_event) ( char *entity_name, unsigned long entity_name_length, void *sink_array[], unsigned char *input_list, unsigned long input_list_length, void *request_context ) ; unsigned int (*ss7_gup_enable_event) ( char *entity_name, unsigned long entity_name_length, void *sink, unsigned char *input_list, unsigned long input_list_length, void *request_context ) ; unsigned int (*ss7_gup_modify) ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, void *request_context ) ; unsigned int (*ss7_gup_remove) ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, void *request_context ) ; unsigned int (*ss7_gup_show) ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, void *request_context ) ; #ifdef SS7_GUP_V31P_API unsigned int (*ss7_gup_show_next) ( char *entity_name, unsigned long entity_name_length, unsigned char *input_list, unsigned long input_list_length, void *request_context ) ; #endif } ss7_gup_callbacks_vector_t; unsigned int ss7_user_delete ( char *identification, unsigned long identification_length ); unsigned int ss7_user_deliver_indication ( ); unsigned int ss7_user_get_synch_var ( ss7_synch_var_t *synchvar ); #ifdef SS7_GUP_V31P_API unsigned int ss7_user_init ( char *identification, unsigned long identification_length, unsigned long version, ss7_gup_callbacks_vector_t *list_of_callbacks ); #else unsigned int ss7_user_init ( char *identification, unsigned long identification_length, ss7_gup_callbacks_vector_t *list_of_callbacks ); #endif unsigned int ss7_user_report_event ( char *event_report, unsigned long event_report_length, void *sink ); unsigned int ss7_user_report_response ( char *response, unsigned long response_length, void *request_context ); #ifdef SS7_GUP_V31P_API #define ss7_user_init ss7_user_enable_indic #endif /*********************** ** GENERIC FUNCTIONS ** ***********************/ #ifndef VMS unsigned int ss7_get_message ( unsigned long status, char *error_string, unsigned long error_string_max_length, unsigned long *error_string_length ); #endif _END_CPLUSPLUS #endif /* _SS7MGTAPI_H_ */