Main Page | Class List | Directories | File List | Class Members

diameter_mip4_ha_server_interface.hxx

00001 /* BEGIN_COPYRIGHT                                                        */
00002 /*                                                                        */
00003 /* OpenDiameter: Open-source software for the Diameter protocol           */
00004 /*                                                                        */
00005 /* Copyright (C) 2004 Open Diameter Project                               */
00006 /*                                                                        */
00007 /* This library is free software; you can redistribute it and/or modify   */
00008 /* it under the terms of the GNU Lesser General Public License as         */
00009 /* published by the Free Software Foundation; either version 2.1 of the   */
00010 /* License, or (at your option) any later version.                        */
00011 /*                                                                        */
00012 /* This library is distributed in the hope that it will be useful,        */
00013 /* but WITHOUT ANY WARRANTY; without even the implied warranty of         */
00014 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      */
00015 /* Lesser General Public License for more details.                        */
00016 /*                                                                        */
00017 /* You should have received a copy of the GNU Lesser General Public       */
00018 /* License along with this library; if not, write to the Free Software    */
00019 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307    */
00020 /* USA.                                                                   */
00021 /*                                                                        */
00022 /* In addition, when you copy and redistribute some or the entire part of */
00023 /* the source code of this software with or without modification, you     */
00024 /* MUST include this copyright notice in each copy.                       */
00025 /*                                                                        */
00026 /* If you make any changes that are appeared to be useful, please send    */
00027 /* sources that include the changed part to                               */
00028 /* diameter-developers@lists.sourceforge.net so that we can reflect your  */
00029 /* changes to one unified version of this software.                       */
00030 /*                                                                        */
00031 /* END_COPYRIGHT                                                          */
00032 /* 
00033    diameter_mip4_ha_server_interface.hxx
00034    Diameter MIP Home Agent server session interface
00035    Written by Miriam Tauil
00036    Created December 17, 2004.
00037 */
00038 
00039 #ifndef __DIAMETER_MIP_HA_SERVER_INTERFACE_H__
00040 #define __DIAMETER_MIP_HA_SERVER_INTERFACE_H__
00041 #include <unistd.h>
00042 #include "diameter_parser_api.h"
00043 #include "diameter_mip4_parser.hxx"
00044 
00045 //#include "diameter_mip4_ha_server_session.hxx"
00046 
00047 
00048 
00049 
00050 /*************************************************************************
00051   The DiameterMip4HaServer class specifies an interface for a MIP Home Agent
00052   Server implementation.
00053   Once the Home Agent server implementation is implemented with the following 
00054   interface, the Diameter MIP HA Server sample application, will provide a 
00055   HA server session implementation supporting the Diameter MIP Application.
00056 
00057  **************************************************************************/
00058 
00059 
00060 class DiameterMip4HaServer {
00061    private:
00062   HAR_Data _harData;
00063    public:
00064 
00065       DiameterMip4HaServer(){}
00066         
00067       virtual ~DiameterMip4HaServer(){}
00068 
00069       //  function to process reg request 
00070 
00071       // return 1 -  mip reg request accepted
00072       // return 2 -  mip reg request rejected
00073       // return 3 -  invalid mip reg request 
00074       // else error ... return values might be added/changed as needed
00075       virtual int ProcessMipRegRequest( diameter_octetstring_t & MipRegReq )=0;
00076 
00083       // called if FA-Ha-Key-Requested: generated by HA
00084       virtual int SetMipFaToHaSpi(diameter_unsigned32_t &faHaSpi)=0;  
00085  
00086       // called if MN-FA-Key-Requested: HA extract value from MipRegRequest
00087       virtual int SetMipFaToMnSpi(diameter_unsigned32_t &faMnSpi)=0;
00088 
00089       virtual int SetErrorMessage(diameter_utf8string_t &errorMessage){return 0;}
00090 
00091       virtual int SetMipRegReply(diameter_octetstring_t &reply)=0;
00092 
00093       // is called if MN address does not appear in HAR
00094       virtual int SetMipMnAddress(diameter_address_t &address)=0;
00095 
00096      // Must be populated by HA
00097       virtual int SetAcctMultiSessionId( diameter_utf8string_t &acctMultiSessionId)=0;
00098 
00099       virtual AAAReturnCode Reset(){ return AAA_ERR_SUCCESS; }
00100 
00101   /* this fn will be call to release local resource allocated to a session
00102      will be called in the session fn: HandleAbort(), 
00103      HandleAuthGracePeriodTimeout(), HandleDisconnect, HandleSessiontimeout()
00104      STR received (where this is captured??)
00105   */
00106 
00107   virtual void ReleaseSessionResources(){}
00108 
00109   
00110 };
00111  
00112 #endif  // __DIAMETER_MIP_HA_SERVER_INTERFACE_H__
00113  
00114  

Generated on Thu Apr 7 09:08:51 2005 for Diameter Mobile IP v4 C++ API by  doxygen 1.4.2