⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aaa_peer_fsm.h

📁 Diameter协议栈
💻 H
📖 第 1 页 / 共 3 页
字号:
/* BEGIN_COPYRIGHT                                                        *//*                                                                        *//* Open Diameter: Open-source software for the Diameter and               *//*                Diameter related protocols                              *//*                                                                        *//* Copyright (C) 2002-2004 Open Diameter Project                          *//*                                                                        *//* This library is free software; you can redistribute it and/or modify   *//* it under the terms of the GNU Lesser General Public License as         *//* published by the Free Software Foundation; either version 2.1 of the   *//* License, or (at your option) any later version.                        *//*                                                                        *//* This library is distributed in the hope that it will be useful,        *//* but WITHOUT ANY WARRANTY; without even the implied warranty of         *//* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      *//* Lesser General Public License for more details.                        *//*                                                                        *//* You should have received a copy of the GNU Lesser General Public       *//* License along with this library; if not, write to the Free Software    *//* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307    *//* USA.                                                                   *//*                                                                        *//* In addition, when you copy and redistribute some or the entire part of *//* the source code of this software with or without modification, you     *//* MUST include this copyright notice in each copy.                       *//*                                                                        *//* If you make any changes that are appeared to be useful, please send    *//* sources that include the changed part to                               *//* diameter-developers@lists.sourceforge.net so that we can reflect your  *//* changes to one unified version of this software.                       *//*                                                                        *//* END_COPYRIGHT                                                          */#ifndef __AAA_PEER_FSM_H__#define __AAA_PEER_FSM_H__#include "aaa_peer_data.h"#define AAA_FSM_EVENT_DEBUG 0typedef enum {  AAA_PEER_ST_CLOSED,  AAA_PEER_ST_WAIT_CONN_ACK,  AAA_PEER_ST_WAIT_I_CEA,  AAA_PEER_ST_WAIT_CONN_ACK_ELECT,  AAA_PEER_ST_WAIT_RETURNS,  AAA_PEER_ST_I_OPEN,  AAA_PEER_ST_R_OPEN,  AAA_PEER_ST_CLOSING} AAA_PEER_ST;typedef enum {  AAA_PEER_EV_START,    AAA_PEER_EV_STOP,  AAA_PEER_EV_TIMEOUT,    AAA_PEER_EV_CONN_RETRY,    AAA_PEER_EV_R_CONN_CER,    AAA_PEER_EV_I_RCV_CONN_ACK,    AAA_PEER_EV_I_RCV_CONN_NACK,  AAA_PEER_EV_R_RCV_CEA,    AAA_PEER_EV_I_RCV_CEA,    AAA_PEER_EV_I_PEER_DISC,    AAA_PEER_EV_R_PEER_DISC,    AAA_PEER_EV_I_RCV_NON_CEA,    AAA_PEER_EV_WIN_ELECTION,    AAA_PEER_EV_SEND_MESSAGE,    AAA_PEER_EV_R_RCV_MESSAGE,    AAA_PEER_EV_I_RCV_MESSAGE,    AAA_PEER_EV_R_RCV_DWR,    AAA_PEER_EV_I_RCV_DWR,  AAA_PEER_EV_R_RCV_DWA,    AAA_PEER_EV_I_RCV_DWA,  AAA_PEER_EV_R_RCV_DPR,    AAA_PEER_EV_I_RCV_DPR,  AAA_PEER_EV_R_RCV_CER,  AAA_PEER_EV_I_RCV_CER,  AAA_PEER_EV_R_RCV_DPA,  AAA_PEER_EV_I_RCV_DPA,  AAA_PEER_EV_WATCHDOG,} AAA_PEER_EV;class AAA_PeerFsmException{   public:      typedef enum {          ALLOC_FAILURE = 0,          INVALID_ID_TYPE,      } ERROR_CODE;       public:      AAA_PeerFsmException(int code, std::string &desc) :        m_Code(code), m_Description(desc) {      }      AAA_PeerFsmException(int code, const char* desc) :        m_Code(code), m_Description(desc) {      }      int &Code() {          return m_Code;      }      std::string &Description() {          return m_Description;      }   private:      int m_Code;      std::string m_Description;};class AAA_PeerStateMachine;class AAA_PeerR_ISendConnReq : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_AcceptSendCEA : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerI_SendCER : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_Peer_ConnNack : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_Peer_Cleanup : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_Peer_Retry : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_Accept : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_Peer_Error : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_Peer_ProcessCEA : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_AcceptElect : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_Peer_Disconnect : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_Peer_DisconnectDPA : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerI_SendCERElect : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_SendCEA : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_SendCEAOpen : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_DisconnectResp : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_DisconnectIOpen : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_Reject : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerI_DisconnectSendCEA : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_SendMessage : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_Peer_Process : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerProcessDWRSendDWA : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_Peer_ProcessDWA : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerI_SendMessage : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerI_SendDPR : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_SendDPR : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerI_SendDPADisconnect : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerR_SendDPADisconnect : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerI_SendCEA : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_Peer_Watchdog : public AAA_Action<AAA_PeerStateMachine> {   public:      virtual void operator()(AAA_PeerStateMachine &fsm);};class AAA_PeerStateTable : public AAA_StateTable<AAA_PeerStateMachine>{   public:      AAA_PeerStateTable() {        // ------------- AAA_PEER_ST_CLOSED ----------------          AddStateTableEntry(AAA_PEER_ST_CLOSED,                           AAA_PEER_EV_START,                           AAA_PEER_ST_WAIT_CONN_ACK,                           m_acISendConnReq);         AddStateTableEntry(AAA_PEER_ST_CLOSED,                           AAA_PEER_EV_R_CONN_CER,                           AAA_PEER_ST_R_OPEN,                           m_acRAcceptSendCEA);                 AddStateTableEntry(AAA_PEER_ST_CLOSED,                           AAA_PEER_EV_CONN_RETRY,                           AAA_PEER_ST_CLOSED,                           m_acRetry);         AddWildcardStateTableEntry(AAA_PEER_ST_CLOSED,                                   AAA_PEER_ST_CLOSED,                                   m_acCleanup);                        // ------------- AAA_PEER_ST_WAIT_CONN_ACK ----------------          AddStateTableEntry(AAA_PEER_ST_WAIT_CONN_ACK,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -