Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

pana_paa.h

00001 /* BEGIN_COPYRIGHT                                                        */
00002 /*                                                                        */
00003 /* Open Diameter: Open-source software for the Diameter and               */
00004 /*                Diameter related protocols                              */
00005 /*                                                                        */
00006 /* Copyright (C) 2002-2004 Open Diameter Project                          */
00007 /*                                                                        */
00008 /* This library is free software; you can redistribute it and/or modify   */
00009 /* it under the terms of the GNU Lesser General Public License as         */
00010 /* published by the Free Software Foundation; either version 2.1 of the   */
00011 /* License, or (at your option) any later version.                        */
00012 /*                                                                        */
00013 /* This library is distributed in the hope that it will be useful,        */
00014 /* but WITHOUT ANY WARRANTY; without even the implied warranty of         */
00015 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      */
00016 /* Lesser General Public License for more details.                        */
00017 /*                                                                        */
00018 /* You should have received a copy of the GNU Lesser General Public       */
00019 /* License along with this library; if not, write to the Free Software    */
00020 /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307    */
00021 /* USA.                                                                   */
00022 /*                                                                        */
00023 /* In addition, when you copy and redistribute some or the entire part of */
00024 /* the source code of this software with or without modification, you     */
00025 /* MUST include this copyright notice in each copy.                       */
00026 /*                                                                        */
00027 /* If you make any changes that are appeared to be useful, please send    */
00028 /* sources that include the changed part to                               */
00029 /* diameter-developers@lists.sourceforge.net so that we can reflect your  */
00030 /* changes to one unified version of this software.                       */
00031 /*                                                                        */
00032 /* END_COPYRIGHT                                                          */
00033 
00034 #ifndef __PANA_PAA_H__
00035 #define __PANA_PAA_H__
00036 
00037 #include "pana_exports.h"
00038 #include "pana_session.h"
00039 #include "pana_provider_info.h"
00040 
00041 class PANA_EXPORT PANA_PaaEventInterface : public PANA_SessionEventInterface
00042 {
00043    public:
00044       virtual void EapStart(bool separate) = 0;
00045       virtual void EapResponse(AAAMessageBlock *request, bool separate) = 0;
00046 };
00047 
00048 class PANA_EXPORT PANA_Paa : public PANA_Session
00049 {
00050    public:
00051       PANA_Paa(PANA_SessionTxInterface &tp,
00052                PANA_SessionTimerInterface &tm,
00053                PANA_PaaEventInterface &ev) :
00054           PANA_Session(tp, tm, ev) { }
00055       virtual ~PANA_Paa() { }
00056 
00057       virtual void ReceiveDiscover();
00058       virtual void ReceiveStartAnswer();
00059       virtual void ReceiveEapResponse();
00060       virtual void ReceiveEapReAuth();
00061       virtual void Receive2ndEapStart();
00062       virtual void ReceiveBindAnswer();
00063     
00064       virtual void RetryBindRequest();
00065       
00066       virtual void SendStartRequest(AAAMessageBlock *request,
00067                                     PANA_PINFO type = PANA_PINFO_NONE);
00068       virtual void SendEapRequest(AAAMessageBlock *request,
00069                                   PANA_PINFO type = PANA_PINFO_NONE);
00070       virtual void SendBindRequest(AAAMessageBlock *request, 
00071                                    ACE_UINT32 resultCode);
00072 
00073       virtual void SendEapMessage(AAAMessageBlock *request,
00074                                   PANA_PINFO type = PANA_PINFO_NONE) {
00075           (m_InStatefulDiscovery) ? SendStartRequest(request) :
00076                                     SendEapRequest(request, type);
00077       }
00078 
00079       void MSK(diameter_octetstring_t &m) {
00080           m_SA.MSK(m, m_InitialPacTsec, m_InitialPaaTsec);
00081           m_SA.KeyId(m_SA.KeyId() + 1);
00082       }
00083 
00084       static void ValidateCookie(PANA_Message &psa) throw(PANA_Exception);
00085 
00086    private:
00087       virtual void DestinationAddressFormatting(PANA_Message &msg,
00088                                     AAAMessageBlock *eapPayload = NULL);
00089 };
00090 
00091 #endif /* __PANA_PAA_H__ */
00092 

Generated on Fri Jun 25 19:18:29 2004 for PANA by doxygen 1.3.5