First commit
[anna.git] / include / anna / diameter / helpers / nas / defines.hpp
1 // ANNA - Anna is Not 'N' Anymore
2 //
3 // (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo
4 //
5 // https://bitbucket.org/testillano/anna
6 //
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions
9 // are met:
10 //
11 //     * Redistributions of source code must retain the above copyright
12 // notice, this list of conditions and the following disclaimer.
13 //     * Redistributions in binary form must reproduce the above
14 // copyright notice, this list of conditions and the following disclaimer
15 // in the documentation and/or other materials provided with the
16 // distribution.
17 //     * Neither the name of Google Inc. nor the names of its
18 // contributors may be used to endorse or promote products derived from
19 // this software without specific prior written permission.
20 //
21 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 //
33 // Authors: eduardo.ramos.testillano@gmail.com
34 //          cisco.tierra@gmail.com
35
36
37 #ifndef anna_diameter_helpers_nas_defines_hpp
38 #define anna_diameter_helpers_nas_defines_hpp
39
40
41 // Local
42 #include <anna/diameter/helpers/defines.hpp>
43
44 // STL
45 #include <string>
46
47
48 /** Contextualized definitions (avp id) */
49 #define anna_diameter_helpers_define_avp(avpname,code)  anna_diameter_helpers_define_avp_in_context(avpname,code,nas)
50
51 /** Contextualized definitions (avp id and values) */
52 #define anna_diameter_helpers_define_avp_with_values(avpname,code)  anna_diameter_helpers_define_avp_with_values_in_context(avpname,code,nas)
53
54
55 namespace anna {
56
57 namespace diameter {
58
59 namespace helpers {
60
61 namespace nas {
62
63
64 /**
65 * Avps
66 */
67 /*
68 anna_diameter_helpers_define_avp(Host_IP_Address, 257);
69 anna_diameter_helpers_define_avp_with_values(Redirect_Host_Usage, 261) {
70    enum v_ {
71       DONT_CACHE = 0,
72       ALL_SESSION = 1,
73       ALL_REALM = 2,
74       REALM_AND_APPLICATION = 3,
75       ALL_APPLICATION = 4,
76       ALL_HOST = 5,
77       ALL_USER = 6
78    };
79 };
80 <AA-Request> ::= < Diameter Header: 265, REQ, PXY >
81              < Session-Id >
82              { Auth-Application-Id }
83              { Origin-Host }
84              { Origin-Realm }
85              { Destination-Realm }
86              [ Destination-Host ]
87              [ AF-Application-Identifier ]
88             *[ Media-Component-Description ]
89              [ Service-Info-Status ]
90              [ AF-Charging-Identifier ]
91              [ SIP-Forking-Indication ]
92             *[ Specific-Action ]
93             *[ Subscription-Id ]
94             *[ Supported-Features ]
95              [ Reservation-Priority ]
96              [ Framed-IP-Address ]
97              [ Framed-IPv6-Prefix ]
98                                  [ Called-Station-Id ]
99              [ Service-URN ]
100              [ Sponsored-Connectivity-Data ]
101              [ MPS-Identifier ]
102              [ Rx-Request-Type ]
103                                  [ Origin-State-Id ]
104             *[ Proxy-Info ]
105             *[ Route-Record ]
106             *[ AVP ]
107
108 <AA-Answer> ::=  < Diameter Header: 265, PXY >
109              < Session-Id >
110              { Auth-Application-Id }
111              { Origin-Host }
112              { Origin-Realm }
113              [ Result-Code ]
114              [ Experimental-Result ]
115             *[ Access-Network-Charging-Identifier ]
116              [ Access-Network-Charging-Address ]
117              [ Acceptable-Service-Info ]
118              [ IP-CAN-Type ]
119              [ RAT-Type ]
120             *[ Flows ]
121             *[ Supported-Features ]
122                   *[ Class ]
123              [ Error-Message ]
124              [ Error-Reporting-Host ]
125             *[ Failed-AVP ]
126              [ Origin-State-Id ]
127                                 *[ Redirect-Host ]
128                                  [ Redirect-Host-Usage ]
129                                  [ Redirect-Max-Cache-Time ]
130             *[ Proxy-Info ]
131             *[ AVP ]
132
133 */
134
135
136 /**
137 * Commands
138 */
139 anna_diameter_helpers_define_command_request(AA_Request, 265);
140 anna_diameter_helpers_define_command_answer(AA_Answer, 265);
141
142
143 }
144 }
145 }
146 }
147
148
149 #undef anna_diameter_helpers_define_avp
150 #undef anna_diameter_helpers_define_avp_with_values
151
152 #endif