# h225ras.h

Go to the documentation of this file.

    00001 /*
    00002  * h225ras.h
    00003  *
    00004  * H.225 RAS protocol handler
    00005  *
    00006  * Open H323 Library
    00007  *
    00008  * Copyright (c) 2001 Equivalence Pty. Ltd.
    00009  *
    00010  * The contents of this file are subject to the Mozilla Public License
    00011  * Version 1.0 (the "License"); you may not use this file except in
    00012  * compliance with the License. You may obtain a copy of the License at
    00013  * http://www.mozilla.org/MPL/
    00014  *
    00015  * Software distributed under the License is distributed on an "AS IS"
    00016  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
    00017  * the License for the specific language governing rights and limitations
    00018  * under the License.
    00019  *
    00020  * The Original Code is Open H323 Library.
    00021  *
    00022  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
    00023  *
    00024  * Portions of this code were written with the assisance of funding from
    00025  * iFace, Inc. http://www.iface.com
    00026  *
    00027  * Contributor(s): ______________________________________.
    00028  *
    00029  * $Revision: 26465 $
    00030  * $Author: rjongbloed $
    00031  * $Date: 2011-09-23 22:00:15 -0500 (Fri, 23 Sep 2011) $
    00032  */
    00033
    00034 #ifndef OPAL_H323_H225RAS_H
    00035 #define OPAL_H323_H225RAS_H
    00036
    00037 #ifdef P_USE_PRAGMA
    00038 #pragma interface
    00039 #endif
    00040
    00041 #include <opal/buildopts.h>
    00042
    00043 #if OPAL_H323
    00044
    00045 #include <h323/transaddr.h>
    00046 #include <h323/h235auth.h>
    00047 #include <h323/h323trans.h>
    00048 #include <h323/svcctrl.h>
    00049
    00050
    00051 class PASN_Sequence;
    00052 class PASN_Choice;
    00053
    00054 class H225_GatekeeperRequest;
    00055 class H225_GatekeeperConfirm;
    00056 class H225_GatekeeperReject;
    00057 class H225_RegistrationRequest;
    00058 class H225_RegistrationConfirm;
    00059 class H225_RegistrationReject;
    00060 class H225_UnregistrationRequest;
    00061 class H225_UnregistrationConfirm;
    00062 class H225_UnregistrationReject;
    00063 class H225_AdmissionRequest;
    00064 class H225_AdmissionConfirm;
    00065 class H225_AdmissionReject;
    00066 class H225_BandwidthRequest;
    00067 class H225_BandwidthConfirm;
    00068 class H225_BandwidthReject;
    00069 class H225_DisengageRequest;
    00070 class H225_DisengageConfirm;
    00071 class H225_DisengageReject;
    00072 class H225_LocationRequest;
    00073 class H225_LocationConfirm;
    00074 class H225_LocationReject;
    00075 class H225_InfoRequest;
    00076 class H225_InfoRequestResponse;
    00077 class H225_NonStandardMessage;
    00078 class H225_UnknownMessageResponse;
    00079 class H225_RequestInProgress;
    00080 class H225_ResourcesAvailableIndicate;
    00081 class H225_ResourcesAvailableConfirm;
    00082 class H225_InfoRequestAck;
    00083 class H225_InfoRequestNak;
    00084 class H225_ArrayOf_CryptoH323Token;
    00085 class H225_FeatureSet;
    00086
    00087 class H323EndPoint;
    00088 class H323Connection;
    00089 class H323RasPDU;
    00090
    00091
    00093
    00096 class H225_RAS : public H323Transactor
    00097 {
    00098   PCLASSINFO(H225_RAS, H323Transactor);
    00099   public:
    00102     enum {
    00103       DefaultRasMulticastPort = 1718,
    00104       DefaultRasUdpPort = 1719
    00105     };
    00106
    00109     H225_RAS(
    00110       H323EndPoint & endpoint,
    00111       H323Transport * transport
    00112     );
    00113
    00116     ~H225_RAS();
    00118
    00123     void PrintOn(
    00124       ostream & strm
    00125     ) const;
    00127
    00132     virtual H323TransactionPDU * CreateTransactionPDU() const;
    00133
    00136     virtual PBoolean HandleTransaction(
    00137       const PASN_Object & rawPDU
    00138     );
    00139
    00142     virtual void OnSendingPDU(
    00143       PASN_Object & rawPDU
    00144     );
    00146
    00149     virtual void OnSendGatekeeperRequest(H323RasPDU &, H225_GatekeeperRequest &);
    00150     virtual void OnSendGatekeeperConfirm(H323RasPDU &, H225_GatekeeperConfirm &);
    00151     virtual void OnSendGatekeeperReject(H323RasPDU &, H225_GatekeeperReject &);
    00152     virtual void OnSendGatekeeperRequest(H225_GatekeeperRequest &);
    00153     virtual void OnSendGatekeeperConfirm(H225_GatekeeperConfirm &);
    00154     virtual void OnSendGatekeeperReject(H225_GatekeeperReject &);
    00155     virtual PBoolean OnReceiveGatekeeperRequest(const H323RasPDU &, const H225_GatekeeperRequest &);
    00156     virtual PBoolean OnReceiveGatekeeperConfirm(const H323RasPDU &, const H225_GatekeeperConfirm &);
    00157     virtual PBoolean OnReceiveGatekeeperReject(const H323RasPDU &, const H225_GatekeeperReject &);
    00158     virtual PBoolean OnReceiveGatekeeperRequest(const H225_GatekeeperRequest &);
    00159     virtual PBoolean OnReceiveGatekeeperConfirm(const H225_GatekeeperConfirm &);
    00160     virtual PBoolean OnReceiveGatekeeperReject(const H225_GatekeeperReject &);
    00161
    00162     virtual void OnSendRegistrationRequest(H323RasPDU &, H225_RegistrationRequest &);
    00163     virtual void OnSendRegistrationConfirm(H323RasPDU &, H225_RegistrationConfirm &);
    00164     virtual void OnSendRegistrationReject(H323RasPDU &, H225_RegistrationReject &);
    00165     virtual void OnSendRegistrationRequest(H225_RegistrationRequest &);
    00166     virtual void OnSendRegistrationConfirm(H225_RegistrationConfirm &);
    00167     virtual void OnSendRegistrationReject(H225_RegistrationReject &);
    00168     virtual PBoolean OnReceiveRegistrationRequest(const H323RasPDU &, const H225_RegistrationRequest &);
    00169     virtual PBoolean OnReceiveRegistrationConfirm(const H323RasPDU &, const H225_RegistrationConfirm &);
    00170     virtual PBoolean OnReceiveRegistrationReject(const H323RasPDU &, const H225_RegistrationReject &);
    00171     virtual PBoolean OnReceiveRegistrationRequest(const H225_RegistrationRequest &);
    00172     virtual PBoolean OnReceiveRegistrationConfirm(const H225_RegistrationConfirm &);
    00173     virtual PBoolean OnReceiveRegistrationReject(const H225_RegistrationReject &);
    00174
    00175     virtual void OnSendUnregistrationRequest(H323RasPDU &, H225_UnregistrationRequest &);
    00176     virtual void OnSendUnregistrationConfirm(H323RasPDU &, H225_UnregistrationConfirm &);
    00177     virtual void OnSendUnregistrationReject(H323RasPDU &, H225_UnregistrationReject &);
    00178     virtual void OnSendUnregistrationRequest(H225_UnregistrationRequest &);
    00179     virtual void OnSendUnregistrationConfirm(H225_UnregistrationConfirm &);
    00180     virtual void OnSendUnregistrationReject(H225_UnregistrationReject &);
    00181     virtual PBoolean OnReceiveUnregistrationRequest(const H323RasPDU &, const H225_UnregistrationRequest &);
    00182     virtual PBoolean OnReceiveUnregistrationConfirm(const H323RasPDU &, const H225_UnregistrationConfirm &);
    00183     virtual PBoolean OnReceiveUnregistrationReject(const H323RasPDU &, const H225_UnregistrationReject &);
    00184     virtual PBoolean OnReceiveUnregistrationRequest(const H225_UnregistrationRequest &);
    00185     virtual PBoolean OnReceiveUnregistrationConfirm(const H225_UnregistrationConfirm &);
    00186     virtual PBoolean OnReceiveUnregistrationReject(const H225_UnregistrationReject &);
    00187
    00188     virtual void OnSendAdmissionRequest(H323RasPDU &, H225_AdmissionRequest &);
    00189     virtual void OnSendAdmissionConfirm(H323RasPDU &, H225_AdmissionConfirm &);
    00190     virtual void OnSendAdmissionReject(H323RasPDU &, H225_AdmissionReject &);
    00191     virtual void OnSendAdmissionRequest(H225_AdmissionRequest &);
    00192     virtual void OnSendAdmissionConfirm(H225_AdmissionConfirm &);
    00193     virtual void OnSendAdmissionReject(H225_AdmissionReject &);
    00194     virtual PBoolean OnReceiveAdmissionRequest(const H323RasPDU &, const H225_AdmissionRequest &);
    00195     virtual PBoolean OnReceiveAdmissionConfirm(const H323RasPDU &, const H225_AdmissionConfirm &);
    00196     virtual PBoolean OnReceiveAdmissionReject(const H323RasPDU &, const H225_AdmissionReject &);
    00197     virtual PBoolean OnReceiveAdmissionRequest(const H225_AdmissionRequest &);
    00198     virtual PBoolean OnReceiveAdmissionConfirm(const H225_AdmissionConfirm &);
    00199     virtual PBoolean OnReceiveAdmissionReject(const H225_AdmissionReject &);
    00200
    00201     virtual void OnSendBandwidthRequest(H323RasPDU &, H225_BandwidthRequest &);
    00202     virtual void OnSendBandwidthConfirm(H323RasPDU &, H225_BandwidthConfirm &);
    00203     virtual void OnSendBandwidthReject(H323RasPDU &, H225_BandwidthReject &);
    00204     virtual void OnSendBandwidthRequest(H225_BandwidthRequest &);
    00205     virtual void OnSendBandwidthConfirm(H225_BandwidthConfirm &);
    00206     virtual void OnSendBandwidthReject(H225_BandwidthReject &);
    00207     virtual PBoolean OnReceiveBandwidthRequest(const H323RasPDU &, const H225_BandwidthRequest &);
    00208     virtual PBoolean OnReceiveBandwidthConfirm(const H323RasPDU &, const H225_BandwidthConfirm &);
    00209     virtual PBoolean OnReceiveBandwidthReject(const H323RasPDU &, const H225_BandwidthReject &);
    00210     virtual PBoolean OnReceiveBandwidthRequest(const H225_BandwidthRequest &);
    00211     virtual PBoolean OnReceiveBandwidthConfirm(const H225_BandwidthConfirm &);
    00212     virtual PBoolean OnReceiveBandwidthReject(const H225_BandwidthReject &);
    00213
    00214     virtual void OnSendDisengageRequest(H323RasPDU &, H225_DisengageRequest &);
    00215     virtual void OnSendDisengageConfirm(H323RasPDU &, H225_DisengageConfirm &);
    00216     virtual void OnSendDisengageReject(H323RasPDU &, H225_DisengageReject &);
    00217     virtual void OnSendDisengageRequest(H225_DisengageRequest &);
    00218     virtual void OnSendDisengageConfirm(H225_DisengageConfirm &);
    00219     virtual void OnSendDisengageReject(H225_DisengageReject &);
    00220     virtual PBoolean OnReceiveDisengageRequest(const H323RasPDU &, const H225_DisengageRequest &);
    00221     virtual PBoolean OnReceiveDisengageConfirm(const H323RasPDU &, const H225_DisengageConfirm &);
    00222     virtual PBoolean OnReceiveDisengageReject(const H323RasPDU &, const H225_DisengageReject &);
    00223     virtual PBoolean OnReceiveDisengageRequest(const H225_DisengageRequest &);
    00224     virtual PBoolean OnReceiveDisengageConfirm(const H225_DisengageConfirm &);
    00225     virtual PBoolean OnReceiveDisengageReject(const H225_DisengageReject &);
    00226
    00227     virtual void OnSendLocationRequest(H323RasPDU &, H225_LocationRequest &);
    00228     virtual void OnSendLocationConfirm(H323RasPDU &, H225_LocationConfirm &);
    00229     virtual void OnSendLocationReject(H323RasPDU &, H225_LocationReject &);
    00230     virtual void OnSendLocationRequest(H225_LocationRequest &);
    00231     virtual void OnSendLocationConfirm(H225_LocationConfirm &);
    00232     virtual void OnSendLocationReject(H225_LocationReject &);
    00233     virtual PBoolean OnReceiveLocationRequest(const H323RasPDU &, const H225_LocationRequest &);
    00234     virtual PBoolean OnReceiveLocationConfirm(const H323RasPDU &, const H225_LocationConfirm &);
    00235     virtual PBoolean OnReceiveLocationReject(const H323RasPDU &, const H225_LocationReject &);
    00236     virtual PBoolean OnReceiveLocationRequest(const H225_LocationRequest &);
    00237     virtual PBoolean OnReceiveLocationConfirm(const H225_LocationConfirm &);
    00238     virtual PBoolean OnReceiveLocationReject(const H225_LocationReject &);
    00239
    00240     virtual void OnSendInfoRequest(H323RasPDU &, H225_InfoRequest &);
    00241     virtual void OnSendInfoRequestAck(H323RasPDU &, H225_InfoRequestAck &);
    00242     virtual void OnSendInfoRequestNak(H323RasPDU &, H225_InfoRequestNak &);
    00243     virtual void OnSendInfoRequestResponse(H323RasPDU &, H225_InfoRequestResponse &);
    00244     virtual void OnSendInfoRequest(H225_InfoRequest &);
    00245     virtual void OnSendInfoRequestAck(H225_InfoRequestAck &);
    00246     virtual void OnSendInfoRequestNak(H225_InfoRequestNak &);
    00247     virtual void OnSendInfoRequestResponse(H225_InfoRequestResponse &);
    00248     virtual PBoolean OnReceiveInfoRequest(const H323RasPDU &, const H225_InfoRequest &);
    00249     virtual PBoolean OnReceiveInfoRequestAck(const H323RasPDU &, const H225_InfoRequestAck &);
    00250     virtual PBoolean OnReceiveInfoRequestNak(const H323RasPDU &, const H225_InfoRequestNak &);
    00251     virtual PBoolean OnReceiveInfoRequestResponse(const H323RasPDU &, const H225_InfoRequestResponse &);
    00252     virtual PBoolean OnReceiveInfoRequest(const H225_InfoRequest &);
    00253     virtual PBoolean OnReceiveInfoRequestAck(const H225_InfoRequestAck &);
    00254     virtual PBoolean OnReceiveInfoRequestNak(const H225_InfoRequestNak &);
    00255     virtual PBoolean OnReceiveInfoRequestResponse(const H225_InfoRequestResponse &);
    00256
    00257     virtual void OnSendResourcesAvailableIndicate(H323RasPDU &, H225_ResourcesAvailableIndicate &);
    00258     virtual void OnSendResourcesAvailableConfirm(H323RasPDU &, H225_ResourcesAvailableConfirm &);
    00259     virtual void OnSendResourcesAvailableIndicate(H225_ResourcesAvailableIndicate &);
    00260     virtual void OnSendResourcesAvailableConfirm(H225_ResourcesAvailableConfirm &);
    00261     virtual PBoolean OnReceiveResourcesAvailableIndicate(const H323RasPDU &, const H225_ResourcesAvailableIndicate &);
    00262     virtual PBoolean OnReceiveResourcesAvailableConfirm(const H323RasPDU &, const H225_ResourcesAvailableConfirm &);
    00263     virtual PBoolean OnReceiveResourcesAvailableIndicate(const H225_ResourcesAvailableIndicate &);
    00264     virtual PBoolean OnReceiveResourcesAvailableConfirm(const H225_ResourcesAvailableConfirm &);
    00265
    00266     virtual void OnSendServiceControlIndication(H323RasPDU &, H225_ServiceControlIndication &);
    00267     virtual void OnSendServiceControlResponse(H323RasPDU &, H225_ServiceControlResponse &);
    00268     virtual void OnSendServiceControlIndication(H225_ServiceControlIndication &);
    00269     virtual void OnSendServiceControlResponse(H225_ServiceControlResponse &);
    00270     virtual PBoolean OnReceiveServiceControlIndication(const H323RasPDU &, const H225_ServiceControlIndication &);
    00271     virtual PBoolean OnReceiveServiceControlResponse(const H323RasPDU &, const H225_ServiceControlResponse &);
    00272     virtual PBoolean OnReceiveServiceControlIndication(const H225_ServiceControlIndication &);
    00273     virtual PBoolean OnReceiveServiceControlResponse(const H225_ServiceControlResponse &);
    00274
    00275     virtual void OnSendNonStandardMessage(H323RasPDU &, H225_NonStandardMessage &);
    00276     virtual void OnSendNonStandardMessage(H225_NonStandardMessage &);
    00277     virtual PBoolean OnReceiveNonStandardMessage(const H323RasPDU &, const H225_NonStandardMessage &);
    00278     virtual PBoolean OnReceiveNonStandardMessage(const H225_NonStandardMessage &);
    00279
    00280     virtual void OnSendUnknownMessageResponse(H323RasPDU &, H225_UnknownMessageResponse &);
    00281     virtual void OnSendUnknownMessageResponse(H225_UnknownMessageResponse &);
    00282     virtual PBoolean OnReceiveUnknownMessageResponse(const H323RasPDU &, const H225_UnknownMessageResponse &);
    00283     virtual PBoolean OnReceiveUnknownMessageResponse(const H225_UnknownMessageResponse &);
    00284
    00285     virtual void OnSendRequestInProgress(H323RasPDU &, H225_RequestInProgress &);
    00286     virtual void OnSendRequestInProgress(H225_RequestInProgress &);
    00287     virtual PBoolean OnReceiveRequestInProgress(const H323RasPDU &, const H225_RequestInProgress &);
    00288     virtual PBoolean OnReceiveRequestInProgress(const H225_RequestInProgress &);
    00289
    00290     virtual PBoolean OnSendFeatureSet(unsigned, H225_FeatureSet &) const { return false; }
    00291     virtual void OnReceiveFeatureSet(unsigned, const H225_FeatureSet &) const {}
    00292
    00293     virtual void DisableFeatureSet() const {}
    00294
    00295
    00298     virtual PBoolean OnReceiveUnknown(
    00299       const H323RasPDU & pdu
    00300     );
    00302
    00309     const PString & GetIdentifier() const { return gatekeeperIdentifier; }
    00310
    00315     void SetIdentifier(const PString & id) { gatekeeperIdentifier = id; }
    00317
    00318   protected:
    00319     // Option variables
    00320     PString gatekeeperIdentifier;
    00321 };
    00322
    00323
    00324 #endif // OPAL_H323
    00325
    00326 #endif // OPAL_H323_H225RAS_H
    00327
    00328