00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _C_TRANSOCTCAP32_
00021 #define _C_TRANSOCTCAP32_
00022
00023 #include "C_Transport.hpp"
00024 #include "C_TcapStack.hpp"
00025
00026 #include "C_TCAPCnxInfo.hpp"
00027
00028
00029 class C_TransOCTcap32 : public C_Transport {
00030
00031 public:
00032 C_TransOCTcap32() ;
00033 ~C_TransOCTcap32() ;
00034
00035 int init (char* P_buf,
00036 T_logFunction P_logError,
00037 T_logFunction P_logInfo ) ;
00038
00039 int config (T_pConfigValueList P_config_param_list) ;
00040 int close () ;
00041
00042 int open (int P_channel_id,
00043 char* P_buf,
00044 T_pOpenStatus P_status,
00045 C_ProtocolFrame *P_protocol) ;
00046
00047 int close (int P_id) ;
00048
00049 int pre_select (int P_n,
00050 fd_set *P_readfds,
00051 fd_set *P_writefds,
00052 fd_set *P_exceptfds,
00053 struct timeval *P_timeout,
00054 int *P_cnx,
00055 size_t P_nb) ;
00056
00057
00058 int post_select (int P_n,
00059 fd_set *P_readfds,
00060 fd_set *P_writefds,
00061 fd_set *P_exceptfds,
00062 T_pC_TransportEvent P_eventTable,
00063 size_t *P_nb) ;
00064
00065 bool get_message(int P_id, T_pReceiveMsgContext P_ctxt) ;
00066 int send_message(int P_id, C_MessageFrame *P_msg) ;
00067
00068 T_SelectDef select_definition () ;
00069
00070
00071 protected:
00072 private:
00073
00074 typedef enum _flavour_t {
00075 E_FLAVOUR_ITU,
00076 E_FLAVOUR_ANSI,
00077 E_FLAVOUR_UNKNOWN
00078 } T_FlavourKey, *T_pFlavourKey ;
00079
00080 T_FlavourKey m_flavour ;
00081 char *m_library_name ;
00082
00083 C_TcapStack *m_stack ;
00084 int m_cnx_id ;
00085
00086
00087
00088
00089 T_logFunction m_log_error, m_log_info ;
00090
00091
00092 int analyze_init_string (char *P_buf);
00093 bool analyze_open_string (char *P_buf, T_pCnxInfo P_cnx_info) ;
00094
00095 char* find_value(char *P_buf, char *P_field);
00096
00097 T_FlavourKey analyze_flavour(char *P_name);
00098 int find_library(char *P_name, char *P_path, char *P_lib);
00099
00100 int determine_lib (char *P_name);
00101 char* verify_path (char * P_libPath, char * P_libName) ;
00102
00103
00104
00105
00106 } ;
00107
00108 extern "C" T_pTransport create_ctransoctcap_instance () ;
00109 extern "C" void delete_ctransoctcap_instance (T_ppTransport) ;
00110
00111
00112 #endif
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123