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

📄 diameter_mip4_parser.hxx

📁 Diameter协议栈
💻 HXX
📖 第 1 页 / 共 3 页
字号:
	MipNonce.CopyTo(*c, AAA_AVP_STRING_TYPE);	cl.add(c);      }    if (MipMnAaaSpi.IsSet())      {	c = cm.acquire("MIP-MN-AAA-SPI");	MipMnAaaSpi.CopyTo(*c, AAA_AVP_UINTEGER32_TYPE);	cl.add(c);      }	if (Avp.IsSet())      {	c = cm.acquire("AVP");	Avp.CopyTo(*c, AAA_AVP_CUSTOM_TYPE);	cl.add(c);      }  }  void CopyFrom(AAAAvpContainerList &cl)  {    AAAAvpContainer *c;     if ((c = cl.search("MIP-Algorithm-Type")))      {	MipAlgorithmType.CopyFrom(*c);      }   if ((c = cl.search("MIP-Replay-Mode")))      {	MipReplayMode.CopyFrom(*c);      }    if ((c = cl.search("MIP-Nonce")))      {	MipNonce.CopyFrom(*c);      }    if ((c = cl.search("MIP-MN-AAA-SPI")))      {	MipMnAaaSpi.CopyFrom(*c);      }   if ((c = cl.search("AVP")))      {	Avp.CopyFrom(*c);      }  }	    // Required AVPs  AAA_ScholarAttribute<diameter_enumerated_t> MipAlgorithmType;  AAA_ScholarAttribute<diameter_enumerated_t> MipReplayMode;  AAA_ScholarAttribute<diameter_octetstring_t> MipNonce;  AAA_ScholarAttribute<diameter_unsigned32_t> MipMnAaaSpi; // Optional AVPs  AAA_VectorAttribute<avp_t> Avp;};// Definition for MIP-FA-to-HA-MSA-Info AVP internal structure.class mip_fa_to_ha_msa_info_t{ public:  void CopyTo(AAAAvpContainerList &cl)  {    AAAAvpContainerManager cm;    AAAAvpContainer *c;    if (MipFaToHaSpi.IsSet())      {	c = cm.acquire("MIP-FA-to-HA-SPI");	MipFaToHaSpi.CopyTo(*c, AAA_AVP_UINTEGER32_TYPE);	cl.add(c);      }	if (MipAlgorithmType.IsSet())      {	c = cm.acquire("MIP-Algorithm-Type");	MipAlgorithmType.CopyTo(*c, AAA_AVP_ENUM_TYPE);	cl.add(c);      }    if (MipSessionKey.IsSet())      {	c = cm.acquire("MIP-Session-Key");	MipSessionKey.CopyTo(*c, AAA_AVP_STRING_TYPE);	cl.add(c);      }    if (Avp.IsSet())      {	c = cm.acquire("AVP");	Avp.CopyTo(*c, AAA_AVP_CUSTOM_TYPE);	cl.add(c);      }  }  void CopyFrom(AAAAvpContainerList &cl)  {    AAAAvpContainer *c;     if ((c = cl.search("MIP-FA-to-HA-SPI")))      {	MipFaToHaSpi.CopyFrom(*c);      }	if ((c = cl.search("MIP-Algorithm-Type")))      {	MipAlgorithmType.CopyFrom(*c);      }    if ((c = cl.search("MIP-Session-Key")))      {	MipSessionKey.CopyFrom(*c);      }     if ((c = cl.search("AVP")))      {	Avp.CopyFrom(*c);      }  }	    // Required AVPs  AAA_ScholarAttribute<diameter_unsigned32_t> MipFaToHaSpi;  AAA_ScholarAttribute<diameter_enumerated_t> MipAlgorithmType;  AAA_ScholarAttribute<diameter_octetstring_t> MipSessionKey; // Optional AVPs  AAA_VectorAttribute<avp_t> Avp;};// Definition for MIP-FA-to-MN-MSA-Info AVP internal structure.class mip_fa_to_mn_msa_info_t{ public:  void CopyTo(AAAAvpContainerList &cl)  {    AAAAvpContainerManager cm;    AAAAvpContainer *c;    if (MipFaToMnSpi.IsSet())      {	c = cm.acquire("MIP-FA-to-MN-SPI");	MipFaToMnSpi.CopyTo(*c, AAA_AVP_UINTEGER32_TYPE);	cl.add(c);      }	if (MipAlgorithmType.IsSet())      {	c = cm.acquire("MIP-Algorithm-Type");	MipAlgorithmType.CopyTo(*c, AAA_AVP_ENUM_TYPE);	cl.add(c);      }    if (MipSessionKey.IsSet())      {	c = cm.acquire("MIP-Session-Key");	MipSessionKey.CopyTo(*c, AAA_AVP_STRING_TYPE);	cl.add(c);      }    if (Avp.IsSet())      {	c = cm.acquire("AVP");	Avp.CopyTo(*c, AAA_AVP_CUSTOM_TYPE);	cl.add(c);      }  }  void CopyFrom(AAAAvpContainerList &cl)  {    AAAAvpContainer *c;     if ((c = cl.search("MIP-FA-to-MN-SPI")))      {	MipFaToMnSpi.CopyFrom(*c);      }	if ((c = cl.search("MIP-Algorithm-Type")))      {	MipAlgorithmType.CopyFrom(*c);      }    if ((c = cl.search("MIP-Session-Key")))      {	MipSessionKey.CopyFrom(*c);      }     if ((c = cl.search("AVP")))      {	Avp.CopyFrom(*c);      }  }	    // Required AVPs  AAA_ScholarAttribute<diameter_unsigned32_t> MipFaToMnSpi;  AAA_ScholarAttribute<diameter_enumerated_t> MipAlgorithmType;  AAA_ScholarAttribute<diameter_octetstring_t> MipSessionKey; // Optional AVPs  AAA_VectorAttribute<avp_t> Avp;};// Definition for MIP-HA-to-MN-MSA-Info AVP internal structure.class mip_ha_to_mn_msa_info_t{ public:  void CopyTo(AAAAvpContainerList &cl)  {    AAAAvpContainerManager cm;    AAAAvpContainer *c;    if (MipAlgorithmType.IsSet())      {	c = cm.acquire("MIP-Algorithm-Type");	MipAlgorithmType.CopyTo(*c, AAA_AVP_ENUM_TYPE);	cl.add(c);      }   if (MipReplayMode.IsSet())      {	c = cm.acquire("MIP-Replay-Mode");	MipReplayMode.CopyTo(*c, AAA_AVP_ENUM_TYPE);	cl.add(c);      }    if (MipSessionKey.IsSet())      {	c = cm.acquire("MIP-Session-Key");	MipSessionKey.CopyTo(*c, AAA_AVP_STRING_TYPE);	cl.add(c);      }	if (Avp.IsSet())      {	c = cm.acquire("AVP");	Avp.CopyTo(*c, AAA_AVP_CUSTOM_TYPE);	cl.add(c);      }  }  void CopyFrom(AAAAvpContainerList &cl)  {    AAAAvpContainer *c;     if ((c = cl.search("MIP-Algorithm-Type")))      {	MipAlgorithmType.CopyFrom(*c);      }   if ((c = cl.search("MIP-Replay-Mode")))      {	MipReplayMode.CopyFrom(*c);      }    if ((c = cl.search("MIP-Session-Key")))      {	MipSessionKey.CopyFrom(*c);      }   if ((c = cl.search("AVP")))      {	Avp.CopyFrom(*c);      }  }	    // Required AVPs  AAA_ScholarAttribute<diameter_enumerated_t> MipAlgorithmType;  AAA_ScholarAttribute<diameter_enumerated_t> MipReplayMode;  AAA_ScholarAttribute<diameter_octetstring_t> MipSessionKey; // Optional AVPs  AAA_VectorAttribute<avp_t> Avp;};// Definition for MIP-HA-to-FA-MSA-Info AVP internal structure.class mip_ha_to_fa_msa_info_t{ public:  void CopyTo(AAAAvpContainerList &cl)  {    AAAAvpContainerManager cm;    AAAAvpContainer *c;    if (MipHaToFaSpi.IsSet())      {	c = cm.acquire("MIP-HA-to-FA-SPI");	MipHaToFaSpi.CopyTo(*c, AAA_AVP_UINTEGER32_TYPE);	cl.add(c);      }	if (MipAlgorithmType.IsSet())      {	c = cm.acquire("MIP-Algorithm-Type");	MipAlgorithmType.CopyTo(*c, AAA_AVP_ENUM_TYPE);	cl.add(c);      }    if (MipSessionKey.IsSet())      {	c = cm.acquire("MIP-Session-Key");	MipSessionKey.CopyTo(*c, AAA_AVP_STRING_TYPE);	cl.add(c);      }    if (Avp.IsSet())      {	c = cm.acquire("AVP");	Avp.CopyTo(*c, AAA_AVP_CUSTOM_TYPE);	cl.add(c);      }  }  void CopyFrom(AAAAvpContainerList &cl)  {    AAAAvpContainer *c;     if ((c = cl.search("MIP-HA-to-FA-SPI")))      {	MipHaToFaSpi.CopyFrom(*c);      }	if ((c = cl.search("MIP-Algorithm-Type")))      {	MipAlgorithmType.CopyFrom(*c);      }    if ((c = cl.search("MIP-Session-Key")))      {	MipSessionKey.CopyFrom(*c);      }     if ((c = cl.search("AVP")))      {	Avp.CopyFrom(*c);      }  }	    // Required AVPs  AAA_ScholarAttribute<diameter_unsigned32_t> MipHaToFaSpi;  AAA_ScholarAttribute<diameter_enumerated_t> MipAlgorithmType;  AAA_ScholarAttribute<diameter_octetstring_t> MipSessionKey; // Optional AVPs  AAA_VectorAttribute<avp_t> Avp;};class MipFeatureVectorOperations {public:#define FV_MN_HOME_ADDR_REQUESTED      1#define FV_HOME_ADDR_ALLOC_ONLY_IN_HOME_REALM  2#define FV_MN_HA_REQUESTED          4#define FV_FOREIGN_HA_AVAILABLE     8#define FV_MN_HA_KEY_REQUESTED      16#define FV_MN_FA_KEY_REQUESTED      32#define FV_FA_HA_KEY_REQUESTED      64#define FV_HA_IN_FOREIGN_NET       128#define FV_CO_LOCATED_MN_BIT       256  static void SetMipFeatureVectorBits( AAA_ScholarAttribute<diameter_unsigned32_t> MipFeatureVector, int bitToSetOn )   {    if (bitToSetOn < 1 || bitToSetOn > 256)    {      AAA_LOG(LM_ERROR, "[%N] SetMipFeatureVectorBits: Wrong parameter.\n");      return;    }       diameter_unsigned32_t _mipFeatureVector =  MipFeatureVector();      _mipFeatureVector |=  bitToSetOn;      MipFeatureVector.Set( _mipFeatureVector);  }  static bool IsFeatureVectorSet(AAA_ScholarAttribute<diameter_unsigned32_t> MipFeatureVector, int bit )  {    diameter_unsigned32_t _mipFeatureVector =  MipFeatureVector();    if ( _mipFeatureVector & bit )      return true;    else      return false;  }};class AMR_Data{ public:  AMR_Data()  {}  void Clear()  {    SessionId.Clear();    AuthApplicationId.Clear();    UserName.Clear();    DestinationRealm.Clear();    OriginHost.Clear();    OriginRealm.Clear();       MipRegRequest.Clear();

⌨️ 快捷键说明

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