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
00042 #ifndef __EAP_SERVER_SESSION_H__
00043 #define __EAP_SERVER_SESSION_H__
00044
00045 #include <string>
00046 #include <list>
00047 #include "ace/Synch.h"
00048 #include "diameter_api.h"
00049 #include "diameter_eap_server_fsm.hxx"
00050 #include "diameter_eap_parser.hxx"
00051
00052 class DiameterEapClientSession;
00053
00055 class DIAMETER_EAP_SERVER_EXPORTS DER_Handler : public AAASessionMessageHandler
00056 {
00057 public:
00058 DER_Handler(AAAApplicationCore &appCore, DiameterEapServerSession &s)
00059 : AAASessionMessageHandler(appCore, EapCommandCode),
00060 session(s)
00061 {}
00062 private:
00063 AAAReturnCode HandleMessage (AAAMessage &msg);
00064 DiameterEapServerSession &session;
00065 };
00066
00070 class DIAMETER_EAP_SERVER_EXPORTS DiameterEapServerSession :
00071 public AAAServerSession, public DiameterEapServerStateMachine
00072 {
00073 public:
00074
00076 DiameterEapServerSession
00077 (AAAApplicationCore &appCore,
00078 diameter_unsigned32_t appId=EapApplicationId);
00079
00081 ~DiameterEapServerSession() {}
00082
00084
00085 DiameterEapServerSession* Self() { return this; }
00086
00088 AAAReturnCode HandleMessage(AAAMessage &msg);
00089
00091 AAAReturnCode HandleDisconnect();
00092
00094 AAAReturnCode HandleSessionTimeout();
00095
00097 AAAReturnCode HandleAuthLifetimeTimeout();
00098
00100 AAAReturnCode HandleAuthGracePeriodTimeout();
00101
00103 AAAReturnCode HandleAbort() { return AAA_ERR_SUCCESS; }
00104
00107 AAAReturnCode HandleTimeout();
00108
00109 void Start() throw (AAA_Error)
00110 {
00111 DiameterEapServerStateMachine::Start();
00112 }
00113
00114 protected:
00115 private:
00116
00117 DER_Handler requestHandler;
00118 };
00119
00120 typedef DIAMETER_EAP_SERVER_EXPORTS
00121 AAAServerSessionClassFactory<DiameterEapServerSession>
00122 DiameterEapServerFactory;
00123
00124 #endif