00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef __h235PLUGIN_H
00042 #define __h235PLUGIN_H
00043
00044 #include <time.h>
00045
00046
00047 #ifdef __cplusplus
00048 extern "C" {
00049 #endif
00050
00052
00053
00054
00055 #define PWLIB_PLUGIN_API_VERSION 0
00056 #define PLUGIN_H235_VERSION 1
00057
00058
00059
00060 static const char H235_BuildClear[] = "Build_Clear";
00061 static const char H235_BuildCrypto[] = "Build_Crypto";
00062 static const char H235_FinaliseCrypto[] = "Finalise_Crypto";
00063 static const char H235_ValidateClear[] = "Validate_Clear";
00064 static const char H235_ValidateCrypto[] = "Validate_Crypto";
00065
00066
00067 static const char GET_PLUGINH235_SETTINGS[] = "get_h235_settings";
00068 static const char SET_PLUGINH235_SETTINGS[] = "set_h235_settings";
00069
00070
00071 #define Pluginh235_Val_OK 0
00072 #define Pluginh235_Val_Absent 1
00073 #define Pluginh235_Val_Error 2
00074 #define Pluginh235_Val_InvalidTime 3
00075 #define Pluginh235_Val_BadPassword 4
00076 #define Pluginh235_Val_ReplyAttack 5
00077 #define Pluginh235_Val_Disabled 6
00078
00079
00080
00081 #define Pluginh235_App_GKAdmission 0
00082 #define Pluginh235_App_EPAuthentication 1
00083 #define Pluginh235_App_LRQOnly 2
00084 #define Pluginh235_App_AnyApplication 3
00085
00086
00087
00088 static const char Pluginh235_Set_Application[] ="Application";
00089 static const char Pluginh235_Set_UseGkAndEpIdentifiers[] ="UseGkAndEpIdentifiers";
00090 static const char Pluginh235_Set_IsSecuredPDU[] ="IsSecuredPDU";
00091 static const char Pluginh235_Set_IsSecuredSignalPDU[] ="IsSecuredSignalPDU";
00092 static const char Pluginh235_Set_IsActive[] ="IsActive";
00093 static const char Pluginh235_Set_RemoteId[] ="RemoteId";
00094 static const char Pluginh235_Set_LocalId[] ="LocalId";
00095 static const char Pluginh235_Set_Password[] ="Password";
00096 static const char Pluginh235_Set_TimestampGracePeriod[] ="TimestampGracePeriod";
00097
00098
00099 #define Pluginh235_msg_gatekeeperRequest 0
00100 #define Pluginh235_msg_gatekeeperConfirm 1
00101 #define Pluginh235_msg_gatekeeperReject 2
00102 #define Pluginh235_msg_registrationRequest 3
00103 #define Pluginh235_msg_registrationConfirm 4
00104 #define Pluginh235_msg_registrationReject 5
00105 #define Pluginh235_msg_unregistrationRequest 6
00106 #define Pluginh235_msg_unregistrationConfirm 7
00107 #define Pluginh235_msg_unregistrationReject 8
00108 #define Pluginh235_msg_admissionRequest 9
00109 #define Pluginh235_msg_admissionConfirm 10
00110 #define Pluginh235_msg_admissionReject 11
00111 #define Pluginh235_msg_bandwidthRequest 12
00112 #define Pluginh235_msg_bandwidthConfirm 13
00113 #define Pluginh235_msg_bandwidthReject 14
00114 #define Pluginh235_msg_disengageRequest 15
00115 #define Pluginh235_msg_disengageConfirm 16
00116 #define Pluginh235_msg_disengageReject 17
00117 #define Pluginh235_msg_locationRequest 18
00118 #define Pluginh235_msg_locationConfirm 19
00119 #define Pluginh235_msg_locationReject 20
00120 #define Pluginh235_msg_infoRequest 21
00121 #define Pluginh235_msg_infoRequestResponse 22
00122
00123
00124 #define Pluginh235_msg_setup 0
00125 #define Pluginh235_msg_callProceeding 1
00126 #define Pluginh235_msg_connect 2
00127 #define Pluginh235_msg_alerting 3
00128 #define Pluginh235_msg_information 4
00129 #define Pluginh235_msg_releaseComplete 5
00130 #define Pluginh235_msg_facility 6
00131 #define Pluginh235_msg_progress 7
00132 #define Pluginh235_msg_empty 8
00133 #define Pluginh235_msg_status 9
00134 #define Pluginh235_msg_statusInquiry 10
00135 #define Pluginh235_msg_setupAcknowledge 11
00136 #define Pluginh235_msg_notify 12
00137
00138
00140
00141 enum Pluginh235_Flags {
00142
00143 Pluginh235_TokenTypeMask = 0x000f,
00144 Pluginh235_TokenTypeclear = 0x0000,
00145 Pluginh235_TokenTypecrypto = 0x0001,
00146 Pluginh235_TokenTypeBoth = 0x0002,
00147
00148
00149 Pluginh235_TokenStyleMask = 0x0010,
00150 Pluginh235_TokenStyleHash = 0x0010,
00151 Pluginh235_TokenStyleSigned = 0x0011,
00152 Pluginh235_TokenStyleEncrypted = 0x0012
00153 };
00154
00155 struct Pluginh235_Definition;
00156
00157 struct Pluginh235_ControlDefn {
00158 const char * name;
00159 int (*control)(const struct Pluginh235_Definition * def, void * context,
00160 const char * parm, const char * value);
00161 };
00162
00164
00165 struct Pluginh235_information {
00166
00167 time_t timestamp;
00168
00169 const char * sourceAuthor;
00170 const char * sourceVersion;
00171 const char * sourceEmail;
00172 const char * sourceURL;
00173 const char * sourceCopyright;
00174 const char * sourceLicense;
00175 unsigned char sourceLicenseCode;
00176
00177 const char * h235Description;
00178 const char * h235Manufacturer;
00179 const char * h235Model;
00180 const char * h235Email;
00181 const char * h235URL;
00182
00183 };
00184
00185 struct Pluginh235_Definition {
00186 unsigned int version;
00187
00188
00189 struct Pluginh235_information * info;
00190
00191 unsigned int flags;
00192 const char * desc;
00193 const char * identifier;
00194 const void * userData;
00195
00196 void *(*createh235)(const struct Pluginh235_Definition * def);
00197 void (*destroyh235)(const struct Pluginh235_Definition * def);
00198 int (*h235function)(const struct Pluginh235_Definition * def, void * context,
00199 const char * function,const void * data, unsigned * dataLen,
00200 const void * raw, unsigned * rawLen);
00201
00202 struct Pluginh235_ControlDefn * h235Controls;
00203
00204
00205 };
00206
00207 typedef struct Pluginh235_Definition * (* Pluginh235_Geth235Function)(unsigned int *, unsigned int);
00208 typedef unsigned (* Pluginh235_GetAPIVersionFunction)();
00209
00210
00212
00213
00214
00215
00216
00217 #define PLUGIN_H235_API_VER_FN PWLibPlugin_GetAPIVersion
00218 #define PLUGIN_H235_API_VER_FN_STR "PWLibPlugin_GetAPIVersion"
00219
00220
00221 #define PLUGIN_H235_GET_DEVICE_FN Opalh235Plugin_GetDevice
00222 #define PLUGIN_H235_GET_DEVICE_FN_STR "Opalh235Plugin_GetDevice"
00223
00224
00225 # define PLUGIN_H235_IMPLEMENT(name) \
00226 PLUGIN_CODEC_DLL_API unsigned int PLUGIN_H235_API_VER_FN() \
00227 { return PWLIB_PLUGIN_API_VERSION; } \
00228
00229
00230 #ifdef __cplusplus
00231 };
00232 #endif
00233
00234 #endif // __h235PLUGIN_H