1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #ifndef anna_diameter_helpers_defines_hpp
10 #define anna_diameter_helpers_defines_hpp
14 #include <anna/diameter/defines.hpp>
15 #include <anna/config/defines.hpp>
19 * Define VENDORID__<context> with S32 value
21 #define anna_diameter_helpers_define_vendor(vendorname,code)\
22 /** vendor #vendorname */\
23 static const S32 VENDORID__##vendorname = code
26 * Define APPID__<context> with S32 value (top = 4294967295)
28 #define anna_diameter_helpers_define_appid(appname,code)\
29 static const S32 APPID__##appname = code
32 * Define AVPID__<avpname> for any <context> with AvpId value
34 #define anna_diameter_helpers_define_avp_in_context(avpname,code,context)\
35 static const AvpId AVPID__##avpname(code,VENDORID__##context)
38 * Define AVPID__<avpname> and AVPVALUES__<avpname> for any <context> with AvpId value and static struct
40 #define anna_diameter_helpers_define_avp_with_values_in_context(avpname,code,context)\
41 anna_diameter_helpers_define_avp_in_context(avpname,code,context);\
42 struct AVPVALUES__##avpname\
45 * Define COMMANDID__<commandname> for requests with CommandId value
47 #define anna_diameter_helpers_define_command_request(commandname,code)\
48 static const CommandId COMMANDID__##commandname(code,true)
51 * Define COMMANDID__<commandname> for answers with CommandId value
53 #define anna_diameter_helpers_define_command_answer(commandname,code)\
54 static const CommandId COMMANDID__##commandname(code,false)
64 static const AvpId AVPID__AVP(0, 0);
66 /** Reserved Generic COMMAND */
67 //static const AvpId COMMANDID__COMMAND(0, 0);
71 * http://www.iana.org/assignments/enterprise-numbers
73 anna_diameter_helpers_define_vendor(radius, 0); // VENDORID__radius
74 anna_diameter_helpers_define_vendor(base, 0); // VENDORID__base
75 anna_diameter_helpers_define_vendor(dcca, 0); // VENDORID__dcca
76 anna_diameter_helpers_define_vendor(ietf, 0); // VENDORID__ietf
77 anna_diameter_helpers_define_vendor(etsi, 13019); // VENDORID__etsi
78 anna_diameter_helpers_define_vendor(tgpp, 10415); // VENDORID__tgpp
79 anna_diameter_helpers_define_vendor(nokia, 94); // VENDORID__nokia
80 anna_diameter_helpers_define_vendor(ericsson, 193); // VENDORID__ericsson
81 anna_diameter_helpers_define_vendor(huawei, 2011); // VENDORID__huawei
82 anna_diameter_helpers_define_vendor(tid, 5189); // VENDORID__tid
83 anna_diameter_helpers_define_vendor(tme, 27640); // VENDORID__tme
86 * Application identifiers
87 * http://www.iana.org/assignments/aaa-parameters/aaa-parameters.xhtml
89 anna_diameter_helpers_define_appid(Diameter_Common_Message, 0); // APPID__Diameter_Common_Message
90 anna_diameter_helpers_define_appid(NASREQ, 1); // APPID__NASREQ
91 anna_diameter_helpers_define_appid(Mobile_IPv4, 2); // APPID__Mobile_IPv4
92 anna_diameter_helpers_define_appid(Diameter_Base_Accounting, 3); // APPID__Diameter_Base_Accounting
93 anna_diameter_helpers_define_appid(Diameter_Credit_Control, 4); // APPID__Diameter_Credit_Control
94 anna_diameter_helpers_define_appid(Diameter_EAP, 5); // APPID__Diameter_EAP
95 anna_diameter_helpers_define_appid(Diameter_Session_Initiation_Protocol_Application, 6); // APPID__Diameter_Session_Initiation_Protocol_Application
96 anna_diameter_helpers_define_appid(Diameter_Mobile_IPv6_IKE, 7); // APPID__Diameter_Mobile_IPv6_IKE
97 anna_diameter_helpers_define_appid(Diameter_Mobile_IPv6_Auth, 8); // APPID__Diameter_Mobile_IPv6_Auth
98 anna_diameter_helpers_define_appid(Diameter_QoS_Application, 9); // APPID__Diameter_QoS_Application
100 anna_diameter_helpers_define_appid(3GPP_Rx, 16777236); // APPID__3GPP_Rx
101 anna_diameter_helpers_define_appid(3GPP_Gx, 16777238); // APPID__3GPP_Gx
102 anna_diameter_helpers_define_appid(3GPP_Sy, 16777302); // APPID__3GPP_Sy