Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'maint'

* maint: (25 commits)
  Install example dictionaries
  Move example code to examples/code
  Move example dictionaries to examples/dict
  Set name/prefix at compilation, not in dictionaries
  Add RFC 4004 (MIP) dictionary
  Add RFC 4740 (SIP) dictionary
  Add RFC 4072 (EAP) dictionary
  Add RFC 4006 (CC) dictionary
  Add RFC 4005 (NAS) dictionary
  Add standards testcase to compiler suite
  Remove {init,end}_per_group workaround
  Use new syntax for specifying ct group properties
  Increase timetrap in compiler suite
  Minor capx suite tweaks
  Minor makefile tweak
  Remove trailing whitespace
  Update skip condition in gen_sctp suite
  Reintroduce gen_sctp suite
  Remove delay from connect in transport suite
  Add codec testcase for decode of unknown AVPs
  ...
  • Loading branch information...
commit 919565a8c1288cf56b0e421ca9fa4b53cac3910c 2 parents 981b5b2 + 58336ee
Anders Svensson authored

Showing 43 changed files with 2,860 additions and 209 deletions. Show diff stats Hide diff stats

  1. +5 5 lib/diameter/examples/{ → code}/GNUmakefile
  2. +1 1  lib/diameter/examples/{ → code}/client.erl
  3. 0  lib/diameter/examples/{ → code}/client_cb.erl
  4. 0  lib/diameter/examples/{ → code}/peer.erl
  5. 0  lib/diameter/examples/{ → code}/redirect.erl
  6. 0  lib/diameter/examples/{ → code}/redirect_cb.erl
  7. 0  lib/diameter/examples/{ → code}/relay.erl
  8. 0  lib/diameter/examples/{ → code}/relay_cb.erl
  9. +18 0 lib/diameter/examples/{ → code}/sctp.erl
  10. 0  lib/diameter/examples/{ → code}/server.erl
  11. 0  lib/diameter/examples/{ → code}/server_cb.erl
  12. +280 0 lib/diameter/examples/dict/rfc4004_mip.dia
  13. +740 0 lib/diameter/examples/dict/rfc4005_nas.dia
  14. +349 0 lib/diameter/examples/dict/rfc4006_cc.dia
  15. +150 0 lib/diameter/examples/dict/rfc4072_eap.dia
  16. +45 0 lib/diameter/examples/dict/rfc4590_digest.dia
  17. +446 0 lib/diameter/examples/dict/rfc4740_sip.dia
  18. +14 2 lib/diameter/src/Makefile
  19. +11 9 lib/diameter/src/base/diameter_service.erl
  20. +32 8 lib/diameter/src/base/diameter_watchdog.erl
  21. +17 2 lib/diameter/src/compiler/diameter_dict_util.erl
  22. +14 8 lib/diameter/src/modules.mk
  23. +11 5 lib/diameter/test/Makefile
  24. +23 35 lib/diameter/test/diameter_capx_SUITE.erl
  25. +26 2 lib/diameter/test/diameter_codec_SUITE.erl
  26. +25 0 lib/diameter/test/diameter_codec_SUITE_data/avps.dia
  27. +76 0 lib/diameter/test/diameter_codec_SUITE_data/diameter_test_unknown.erl
  28. +51 0 lib/diameter/test/diameter_codec_SUITE_data/recv.dia
  29. +56 0 lib/diameter/test/diameter_codec_SUITE_data/send.dia
  30. +55 7 lib/diameter/test/diameter_compiler_SUITE.erl
  31. +4 11 lib/diameter/test/diameter_dict_SUITE.erl
  32. +1 1  lib/diameter/test/diameter_failover_SUITE.erl
  33. +354 0 lib/diameter/test/diameter_gen_sctp_SUITE.erl
  34. +3 10 lib/diameter/test/diameter_reg_SUITE.erl
  35. +11 17 lib/diameter/test/diameter_relay_SUITE.erl
  36. +3 10 lib/diameter/test/diameter_stats_SUITE.erl
  37. +3 10 lib/diameter/test/diameter_sync_SUITE.erl
  38. +8 14 lib/diameter/test/diameter_tls_SUITE.erl
  39. +6 17 lib/diameter/test/diameter_traffic_SUITE.erl
  40. +8 29 lib/diameter/test/diameter_transport_SUITE.erl
  41. +1 1  lib/diameter/test/diameter_util.erl
  42. +6 5 lib/diameter/test/diameter_watchdog_SUITE.erl
  43. +7 0 lib/diameter/test/modules.mk
10 lib/diameter/examples/GNUmakefile → lib/diameter/examples/code/GNUmakefile
... ... @@ -1,19 +1,19 @@
1   -#
  1 +#
2 2 # %CopyrightBegin%
3   -#
  3 +#
4 4 # Copyright Ericsson AB 2010-2011. All Rights Reserved.
5   -#
  5 +#
6 6 # The contents of this file are subject to the Erlang Public License,
7 7 # Version 1.1, (the "License"); you may not use this file except in
8 8 # compliance with the License. You should have received a copy of the
9 9 # Erlang Public License along with this software. If not, it can be
10 10 # retrieved online at http://www.erlang.org/.
11   -#
  11 +#
12 12 # Software distributed under the License is distributed on an "AS IS"
13 13 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14 14 # the License for the specific language governing rights and limitations
15 15 # under the License.
16   -#
  16 +#
17 17 # %CopyrightEnd%
18 18 #
19 19
2  lib/diameter/examples/client.erl → lib/diameter/examples/code/client.erl
@@ -112,7 +112,7 @@ cast(Name) ->
112 112 {'Auth-Application-Id', 0},
113 113 {'Re-Auth-Request-Type', 1}],
114 114 diameter:call(Name, ?APP_ALIAS, RAR, [detach]).
115   -
  115 +
116 116 cast() ->
117 117 cast(?SVC_NAME).
118 118
0  lib/diameter/examples/client_cb.erl → lib/diameter/examples/code/client_cb.erl
File renamed without changes
0  lib/diameter/examples/peer.erl → lib/diameter/examples/code/peer.erl
File renamed without changes
0  lib/diameter/examples/redirect.erl → lib/diameter/examples/code/redirect.erl
File renamed without changes
0  lib/diameter/examples/redirect_cb.erl → lib/diameter/examples/code/redirect_cb.erl
File renamed without changes
0  lib/diameter/examples/relay.erl → lib/diameter/examples/code/relay.erl
File renamed without changes
0  lib/diameter/examples/relay_cb.erl → lib/diameter/examples/code/relay_cb.erl
File renamed without changes
18 lib/diameter/examples/sctp.erl → lib/diameter/examples/code/sctp.erl
... ... @@ -1,3 +1,21 @@
  1 +%%
  2 +%% %CopyrightBegin%
  3 +%%
  4 +%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
  5 +%%
  6 +%% The contents of this file are subject to the Erlang Public License,
  7 +%% Version 1.1, (the "License"); you may not use this file except in
  8 +%% compliance with the License. You should have received a copy of the
  9 +%% Erlang Public License along with this software. If not, it can be
  10 +%% retrieved online at http://www.erlang.org/.
  11 +%%
  12 +%% Software distributed under the License is distributed on an "AS IS"
  13 +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
  14 +%% the License for the specific language governing rights and limitations
  15 +%% under the License.
  16 +%%
  17 +%% %CopyrightEnd%
  18 +%%
1 19
2 20 -module(sctp).
3 21
0  lib/diameter/examples/server.erl → lib/diameter/examples/code/server.erl
File renamed without changes
0  lib/diameter/examples/server_cb.erl → lib/diameter/examples/code/server_cb.erl
File renamed without changes
280 lib/diameter/examples/dict/rfc4004_mip.dia
... ... @@ -0,0 +1,280 @@
  1 +;;
  2 +;; %CopyrightBegin%
  3 +;;
  4 +;; Copyright Ericsson AB 2010-2011. All Rights Reserved.
  5 +;;
  6 +;; The contents of this file are subject to the Erlang Public License,
  7 +;; Version 1.1, (the "License"); you may not use this file except in
  8 +;; compliance with the License. You should have received a copy of the
  9 +;; Erlang Public License along with this software. If not, it can be
  10 +;; retrieved online at http://www.erlang.org/.
  11 +;;
  12 +;; Software distributed under the License is distributed on an "AS IS"
  13 +;; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
  14 +;; the License for the specific language governing rights and limitations
  15 +;; under the License.
  16 +;;
  17 +;; %CopyrightEnd%
  18 +;;
  19 +
  20 +;;
  21 +;; RFC 4004, Diameter Mobile IPv4 Application
  22 +;;
  23 +;; Edits:
  24 +;;
  25 +;; - MIP-nonce -> MIP-Nonce
  26 +;; - Session-ID -> Session-Id
  27 +;; - Omit MIP-HA-to-MN-SPI, MIP-MN-FA-SPI and MIP-MN-HA-SPI, none of
  28 +;; which are defined.
  29 +;;
  30 +
  31 +@id 2
  32 +
  33 +@inherits rfc3588_base
  34 +
  35 +;; ===========================================================================
  36 +
  37 +@avp_types
  38 +
  39 + MIP-Reg-Request 320 OctetString M
  40 + MIP-Reg-Reply 321 OctetString M
  41 + MIP-MN-AAA-Auth 322 Grouped M
  42 + MIP-Mobile-Node-Address 333 Address M
  43 + MIP-Home-Agent-Address 334 Address M
  44 + MIP-Candidate-Home-Agent-Host 336 DiamIdent M
  45 + MIP-Feature-Vector 337 Unsigned32 M
  46 + MIP-Auth-Input-Data-Length 338 Unsigned32 M
  47 + MIP-Authenticator-Length 339 Unsigned32 M
  48 + MIP-Authenticator-Offset 340 Unsigned32 M
  49 + MIP-MN-AAA-SPI 341 Unsigned32 M
  50 + MIP-Filter-Rule 342 IPFilterRule M
  51 + MIP-FA-Challenge 344 OctetString M
  52 + MIP-Originating-Foreign-AAA 347 Grouped M
  53 + MIP-Home-Agent-Host 348 Grouped M
  54 +
  55 + MIP-FA-to-HA-SPI 318 Unsigned32 M
  56 + MIP-FA-to-MN-SPI 319 Unsigned32 M
  57 + MIP-HA-to-FA-SPI 323 Unsigned32 M
  58 + MIP-MN-to-FA-MSA 325 Grouped M
  59 + MIP-FA-to-MN-MSA 326 Grouped M
  60 + MIP-FA-to-HA-MSA 328 Grouped M
  61 + MIP-HA-to-FA-MSA 329 Grouped M
  62 + MIP-MN-to-HA-MSA 331 Grouped M
  63 + MIP-HA-to-MN-MSA 332 Grouped M
  64 + MIP-Nonce 335 OctetString M
  65 + MIP-Session-Key 343 OctetString M
  66 + MIP-Algorithm-Type 345 Enumerated M
  67 + MIP-Replay-Mode 346 Enumerated M
  68 + MIP-MSA-Lifetime 367 Unsigned32 M
  69 +
  70 +;; ===========================================================================
  71 +
  72 +@messages
  73 +
  74 + ;; 5.1. AA-Mobile-Node-Request
  75 +
  76 + AMR ::= < Diameter Header: 260, REQ, PXY >
  77 +
  78 + < Session-Id >
  79 + { Auth-Application-Id }
  80 + { User-Name }
  81 + { Destination-Realm }
  82 + { Origin-Host }
  83 + { Origin-Realm }
  84 + { MIP-Reg-Request }
  85 + { MIP-MN-AAA-Auth }
  86 + [ Acct-Multi-Session-Id ]
  87 + [ Destination-Host ]
  88 + [ Origin-State-Id ]
  89 + [ MIP-Mobile-Node-Address ]
  90 + [ MIP-Home-Agent-Address ]
  91 + [ MIP-Feature-Vector ]
  92 + [ MIP-Originating-Foreign-AAA ]
  93 + [ Authorization-Lifetime ]
  94 + [ Auth-Session-State ]
  95 + [ MIP-FA-Challenge ]
  96 + [ MIP-Candidate-Home-Agent-Host ]
  97 + [ MIP-Home-Agent-Host ]
  98 + [ MIP-HA-to-FA-SPI ]
  99 + * [ Proxy-Info ]
  100 + * [ Route-Record ]
  101 + * [ AVP ]
  102 +
  103 + ;; 5.2. AA-Mobile-Node-Answer
  104 +
  105 + AMA ::= < Diameter Header: 260, PXY >
  106 +
  107 + < Session-Id >
  108 + { Auth-Application-Id }
  109 + { Result-Code }
  110 + { Origin-Host }
  111 + { Origin-Realm }
  112 + [ Acct-Multi-Session-Id ]
  113 + [ User-Name ]
  114 + [ Authorization-Lifetime ]
  115 + [ Auth-Session-State ]
  116 + [ Error-Message ]
  117 + [ Error-Reporting-Host ]
  118 + [ Re-Auth-Request-Type ]
  119 + [ MIP-Feature-Vector ]
  120 + [ MIP-Reg-Reply ]
  121 + [ MIP-MN-to-FA-MSA ]
  122 + [ MIP-MN-to-HA-MSA ]
  123 + [ MIP-FA-to-MN-MSA ]
  124 + [ MIP-FA-to-HA-MSA ]
  125 + [ MIP-HA-to-MN-MSA ]
  126 + [ MIP-MSA-Lifetime ]
  127 + [ MIP-Home-Agent-Address ]
  128 + [ MIP-Mobile-Node-Address ]
  129 + * [ MIP-Filter-Rule ]
  130 + [ Origin-State-Id ]
  131 + * [ Proxy-Info ]
  132 + * [ AVP ]
  133 +
  134 + ;; 5.3. Home-Agent-MIP-Request
  135 +
  136 + HAR ::= < Diameter Header: 262, REQ, PXY >
  137 +
  138 + < Session-Id >
  139 + { Auth-Application-Id }
  140 + { Authorization-Lifetime }
  141 + { Auth-Session-State }
  142 + { MIP-Reg-Request }
  143 + { Origin-Host }
  144 + { Origin-Realm }
  145 + { User-Name }
  146 + { Destination-Realm }
  147 + { MIP-Feature-Vector }
  148 + [ Destination-Host ]
  149 + [ MIP-MN-to-HA-MSA ]
  150 + [ MIP-MN-to-FA-MSA ]
  151 + [ MIP-HA-to-MN-MSA ]
  152 + [ MIP-HA-to-FA-MSA ]
  153 + [ MIP-MSA-Lifetime ]
  154 + [ MIP-Originating-Foreign-AAA ]
  155 + [ MIP-Mobile-Node-Address ]
  156 + [ MIP-Home-Agent-Address ]
  157 + * [ MIP-Filter-Rule ]
  158 + [ Origin-State-Id ]
  159 + * [ Proxy-Info ]
  160 + * [ Route-Record ]
  161 + * [ AVP ]
  162 +
  163 + ;; 5.4. Home-Agent-MIP-Answer
  164 +
  165 + HAA ::= < Diameter Header: 262, PXY >
  166 +
  167 + < Session-Id >
  168 + { Auth-Application-Id }
  169 + { Result-Code }
  170 + { Origin-Host }
  171 + { Origin-Realm }
  172 + [ Acct-Multi-Session-Id ]
  173 + [ User-Name ]
  174 + [ Error-Reporting-Host ]
  175 + [ Error-Message ]
  176 + [ MIP-Reg-Reply ]
  177 + [ MIP-Home-Agent-Address ]
  178 + [ MIP-Mobile-Node-Address ]
  179 + [ MIP-FA-to-HA-SPI ]
  180 + [ MIP-FA-to-MN-SPI ]
  181 + [ Origin-State-Id ]
  182 + * [ Proxy-Info ]
  183 + * [ AVP ]
  184 +
  185 +;; ===========================================================================
  186 +
  187 +@grouped
  188 +
  189 + MIP-MN-AAA-Auth ::= < AVP Header: 322 >
  190 +
  191 + { MIP-MN-AAA-SPI }
  192 + { MIP-Auth-Input-Data-Length }
  193 + { MIP-Authenticator-Length }
  194 + { MIP-Authenticator-Offset }
  195 + * [ AVP ]
  196 +
  197 +
  198 + MIP-Originating-Foreign-AAA ::= < AVP Header: 347 >
  199 +
  200 + { Origin-Realm }
  201 + { Origin-Host }
  202 + * [ AVP ]
  203 +
  204 + MIP-Home-Agent-Host ::= < AVP Header: 348 >
  205 +
  206 + { Destination-Realm }
  207 + { Destination-Host }
  208 + * [ AVP ]
  209 +
  210 + MIP-FA-to-MN-MSA ::= < AVP Header: 326 >
  211 +
  212 + { MIP-FA-to-MN-SPI }
  213 + { MIP-Algorithm-Type }
  214 + { MIP-Session-Key }
  215 + * [ AVP ]
  216 +
  217 + MIP-FA-to-HA-MSA ::= < AVP Header: 328 >
  218 +
  219 + { MIP-FA-to-HA-SPI }
  220 + { MIP-Algorithm-Type }
  221 + { MIP-Session-Key }
  222 + * [ AVP ]
  223 +
  224 + MIP-HA-to-FA-MSA ::= < AVP Header: 329 >
  225 +
  226 + { MIP-HA-to-FA-SPI }
  227 + { MIP-Algorithm-Type }
  228 + { MIP-Session-Key }
  229 + * [ AVP ]
  230 +
  231 + MIP-HA-to-MN-MSA ::= < AVP Header: 332 >
  232 +
  233 + ; { MIP-HA-to-MN-SPI }
  234 + { MIP-Algorithm-Type }
  235 + { MIP-Replay-Mode }
  236 + { MIP-Session-Key }
  237 + * [ AVP ]
  238 +
  239 + MIP-MN-to-FA-MSA ::= < AVP Header: 325 >
  240 +
  241 + ; { MIP-MN-FA-SPI }
  242 + { MIP-Algorithm-Type }
  243 + { MIP-Nonce }
  244 + * [ AVP ]
  245 +
  246 + MIP-MN-to-HA-MSA ::= < AVP Header: 331 >
  247 +
  248 + ; { MIP-MN-HA-SPI }
  249 + { MIP-Algorithm-Type }
  250 + { MIP-Replay-Mode }
  251 + { MIP-Nonce }
  252 + * [ AVP ]
  253 +
  254 +;; ===========================================================================
  255 +
  256 +@enum MIP-Algorithm-Type
  257 +
  258 + HMAC-SHA-1 2
  259 +
  260 +@enum MIP-Replay-Mode
  261 +
  262 + NONE 1
  263 + TIMESTAMPS 2
  264 + NONCES 3
  265 +
  266 +;; ===========================================================================
  267 +
  268 +@define Result-Code
  269 +
  270 + ;; 6.1. Transient Failures
  271 +
  272 + MIP_REPLY_FAILURE 4005
  273 + HA_NOT_AVAILABLE 4006
  274 + BAD_KEY 4007
  275 + MIP_FILTER_NOT_SUPPORTED 4008
  276 +
  277 + ;; 6.2. Permanent Failures
  278 +
  279 + NO_FOREIGN_HA_SERVICE 5024
  280 + END_TO_END_MIP_KEY_ENCRYPTION 5025
740 lib/diameter/examples/dict/rfc4005_nas.dia
... ... @@ -0,0 +1,740 @@
  1 +;;
  2 +;; %CopyrightBegin%
  3 +;;
  4 +;; Copyright Ericsson AB 2010-2011. All Rights Reserved.
  5 +;;
  6 +;; The contents of this file are subject to the Erlang Public License,
  7 +;; Version 1.1, (the "License"); you may not use this file except in
  8 +;; compliance with the License. You should have received a copy of the
  9 +;; Erlang Public License along with this software. If not, it can be
  10 +;; retrieved online at http://www.erlang.org/.
  11 +;;
  12 +;; Software distributed under the License is distributed on an "AS IS"
  13 +;; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
  14 +;; the License for the specific language governing rights and limitations
  15 +;; under the License.
  16 +;;
  17 +;; %CopyrightEnd%
  18 +;;
  19 +
  20 +;;
  21 +;; RFC 4005, Diameter Network Access Server Application
  22 +;;
  23 +;; Edits:
  24 +;;
  25 +;; - Acounting-Auth-Method -> Accounting-Auth-Method
  26 +;; - Connection-Info -> ConnectInfo
  27 +;; - Framed-Appletalk-Link -> Framed-AppleTalk-Link
  28 +;; - Framed-Appletalk-Network -> Framed-AppleTalk-Network
  29 +;; - Framed-Appletalk-Zone -> Framed-AppleTalk-Zone
  30 +;; - Qos-Filter-Rule -> QoS-Filter-Rule
  31 +;; - Redirect-Host-Usase -> Redirect-Host-Usage
  32 +;; - Redirected-Host -> Redirect-Host
  33 +;; - Redirected-Host-Usage -> Redirect-Host-Usage
  34 +;; - Redirected-Host-Cache-Time -> Redirect-Max-Cache-Time
  35 +;; - Redirected-Max-Cache-Time -> Redirect-Max-Cache-Time
  36 +;;
  37 +
  38 +@id 1
  39 +
  40 +@inherits rfc3588_base
  41 +
  42 +;; ===========================================================================
  43 +
  44 +@avp_types
  45 +
  46 + ;; 4. NAS Session AVPs
  47 +
  48 + NAS-Port 5 Unsigned32 M
  49 + NAS-Port-Id 87 UTF8String M
  50 + NAS-Port-Type 61 Enumerated M
  51 + Called-Station-Id 30 UTF8String M
  52 + Calling-Station-Id 31 UTF8String M
  53 + Connect-Info 77 UTF8String M
  54 + Originating-Line-Info 94 OctetString -
  55 + Reply-Message 18 UTF8String M
  56 +
  57 + ;; 5. NAS Authentication AVPs
  58 +
  59 + User-Password 2 OctetString M
  60 + Password-Retry 75 Unsigned32 M
  61 + Prompt 76 Enumerated M
  62 + CHAP-Auth 402 Grouped M
  63 + CHAP-Algorithm 403 Enumerated M
  64 + CHAP-Ident 404 OctetString M
  65 + CHAP-Response 405 OctetString M
  66 + CHAP-Challenge 60 OctetString M
  67 + ARAP-Password 70 OctetString M
  68 + ARAP-Challenge-Response 84 OctetString M
  69 + ARAP-Security 73 Unsigned32 M
  70 + ARAP-Security-Data 74 OctetString M
  71 +
  72 + ;; 6. NAS Authorization AVPs
  73 +
  74 + Service-Type 6 Enumerated M
  75 + Callback-Number 19 UTF8String M
  76 + Callback-Id 20 UTF8String M
  77 + Idle-Timeout 28 Unsigned32 M
  78 + Port-Limit 62 Unsigned32 M
  79 + NAS-Filter-Rule 400 IPFilterRule M
  80 + Filter-Id 11 UTF8String M
  81 + Configuration-Token 78 OctetString M
  82 + QoS-Filter-Rule 407 QoSFilterRule -
  83 + Framed-Protocol 7 Enumerated M
  84 + Framed-Routing 10 Enumerated M
  85 + Framed-MTU 12 Unsigned32 M
  86 + Framed-Compression 13 Enumerated M
  87 + Framed-IP-Address 8 OctetString M
  88 + Framed-IP-Netmask 9 OctetString M
  89 + Framed-Route 22 UTF8String M
  90 + Framed-Pool 88 OctetString M
  91 + Framed-Interface-Id 96 Unsigned64 M
  92 + Framed-IPv6-Prefix 97 OctetString M
  93 + Framed-IPv6-Route 99 UTF8String M
  94 + Framed-IPv6-Pool 100 OctetString M
  95 + Framed-IPX-Network 23 UTF8String M
  96 + Framed-AppleTalk-Link 37 Unsigned32 M
  97 + Framed-AppleTalk-Network 38 Unsigned32 M
  98 + Framed-AppleTalk-Zone 39 OctetString M
  99 + ARAP-Features 71 OctetString M
  100 + ARAP-Zone-Access 72 Enumerated M
  101 + Login-IP-Host 14 OctetString M
  102 + Login-IPv6-Host 98 OctetString M
  103 + Login-Service 15 Enumerated M
  104 + Login-TCP-Port 16 Unsigned32 M
  105 + Login-LAT-Service 34 OctetString M
  106 + Login-LAT-Node 35 OctetString M
  107 + Login-LAT-Group 36 OctetString M
  108 + Login-LAT-Port 63 OctetString M
  109 +
  110 + ;; 7. NAS Tunneling
  111 +
  112 + Tunneling 401 Grouped M
  113 + Tunnel-Type 64 Enumerated M
  114 + Tunnel-Medium-Type 65 Enumerated M
  115 + Tunnel-Client-Endpoint 66 UTF8String M
  116 + Tunnel-Server-Endpoint 67 UTF8String M
  117 + Tunnel-Password 69 OctetString M
  118 + Tunnel-Private-Group-Id 81 OctetString M
  119 + Tunnel-Assignment-Id 82 OctetString M
  120 + Tunnel-Preference 83 Unsigned32 M
  121 + Tunnel-Client-Auth-Id 90 UTF8String M
  122 + Tunnel-Server-Auth-Id 91 UTF8String M
  123 +
  124 + ;; 8. NAS Accounting
  125 +
  126 + Accounting-Input-Octets 363 Unsigned64 M
  127 + Accounting-Output-Octets 364 Unsigned64 M
  128 + Accounting-Input-Packets 365 Unsigned64 M
  129 + Accounting-Output-Packets 366 Unsigned64 M
  130 + Acct-Session-Time 46 Unsigned32 M
  131 + Acct-Authentic 45 Enumerated M
  132 + Accounting-Auth-Method 406 Enumerated M
  133 + Acct-Delay-Time 41 Unsigned32 M
  134 + Acct-Link-Count 51 Unsigned32 M
  135 + Acct-Tunnel-Connection 68 OctetString M
  136 + Acct-Tunnel-Packets-Lost 86 Unsigned32 M
  137 +
  138 + ;; 9.3. AVPs Used Only for Compatibility
  139 +
  140 + NAS-Identifier 32 UTF8String M
  141 + NAS-IP-Address 4 OctetString M
  142 + NAS-IPv6-Address 95 OctetString M
  143 + State 24 OctetString M
  144 + ;;Termination-Cause 295 Enumerated M
  145 + Origin-AAA-Protocol 408 Enumerated M
  146 +
  147 +;; ===========================================================================
  148 +
  149 +@messages
  150 +
  151 + AAR ::= < Diameter Header: 265, REQ, PXY >
  152 +
  153 + < Session-Id >
  154 + { Auth-Application-Id }
  155 + { Origin-Host }
  156 + { Origin-Realm }
  157 + { Destination-Realm }
  158 + { Auth-Request-Type }
  159 + [ Destination-Host ]
  160 + [ NAS-Identifier ]
  161 + [ NAS-IP-Address ]
  162 + [ NAS-IPv6-Address ]
  163 + [ NAS-Port ]
  164 + [ NAS-Port-Id ]
  165 + [ NAS-Port-Type ]
  166 + [ Origin-AAA-Protocol ]
  167 + [ Origin-State-Id ]
  168 + [ Port-Limit ]
  169 + [ User-Name ]
  170 + [ User-Password ]
  171 + [ Service-Type ]
  172 + [ State ]
  173 + [ Authorization-Lifetime ]
  174 + [ Auth-Grace-Period ]
  175 + [ Auth-Session-State ]
  176 + [ Callback-Number ]
  177 + [ Called-Station-Id ]
  178 + [ Calling-Station-Id ]
  179 + [ Originating-Line-Info ]
  180 + [ Connect-Info ]
  181 + [ CHAP-Auth ]
  182 + [ CHAP-Challenge ]
  183 + * [ Framed-Compression ]
  184 + [ Framed-Interface-Id ]
  185 + [ Framed-IP-Address ]
  186 + * [ Framed-IPv6-Prefix ]
  187 + [ Framed-IP-Netmask ]
  188 + [ Framed-MTU ]
  189 + [ Framed-Protocol ]
  190 + [ ARAP-Password ]
  191 + [ ARAP-Security ]
  192 + * [ ARAP-Security-Data ]
  193 + * [ Login-IP-Host ]
  194 + * [ Login-IPv6-Host ]
  195 + [ Login-LAT-Group ]
  196 + [ Login-LAT-Node ]
  197 + [ Login-LAT-Port ]
  198 + [ Login-LAT-Service ]
  199 + * [ Tunneling ]
  200 + * [ Proxy-Info ]
  201 + * [ Route-Record ]
  202 + * [ AVP ]
  203 +
  204 + AAA ::= < Diameter Header: 265, PXY >
  205 +
  206 + < Session-Id >
  207 + { Auth-Application-Id }
  208 + { Auth-Request-Type }
  209 + { Result-Code }
  210 + { Origin-Host }
  211 + { Origin-Realm }
  212 + [ User-Name ]
  213 + [ Service-Type ]
  214 + * [ Class ]
  215 + * [ Configuration-Token ]
  216 + [ Acct-Interim-Interval ]
  217 + [ Error-Message ]
  218 + [ Error-Reporting-Host ]
  219 + * [ Failed-AVP ]
  220 + [ Idle-Timeout ]
  221 + [ Authorization-Lifetime ]
  222 + [ Auth-Grace-Period ]
  223 + [ Auth-Session-State ]
  224 + [ Re-Auth-Request-Type ]
  225 + [ Multi-Round-Time-Out ]
  226 + [ Session-Timeout ]
  227 + [ State ]
  228 + * [ Reply-Message ]
  229 + [ Origin-AAA-Protocol ]
  230 + [ Origin-State-Id ]
  231 + * [ Filter-Id ]
  232 + [ Password-Retry ]
  233 + [ Port-Limit ]
  234 + [ Prompt ]
  235 + [ ARAP-Challenge-Response ]
  236 + [ ARAP-Features ]
  237 + [ ARAP-Security ]
  238 + * [ ARAP-Security-Data ]
  239 + [ ARAP-Zone-Access ]
  240 + [ Callback-Id ]
  241 + [ Callback-Number ]
  242 + [ Framed-AppleTalk-Link ]
  243 + * [ Framed-AppleTalk-Network ]
  244 + [ Framed-AppleTalk-Zone ]
  245 + * [ Framed-Compression ]
  246 + [ Framed-Interface-Id ]
  247 + [ Framed-IP-Address ]
  248 + * [ Framed-IPv6-Prefix ]
  249 + [ Framed-IPv6-Pool ]
  250 + * [ Framed-IPv6-Route ]
  251 + [ Framed-IP-Netmask ]
  252 + * [ Framed-Route ]
  253 + [ Framed-Pool ]
  254 + [ Framed-IPX-Network ]
  255 + [ Framed-MTU ]
  256 + [ Framed-Protocol ]
  257 + [ Framed-Routing ]
  258 + * [ Login-IP-Host ]
  259 + * [ Login-IPv6-Host ]
  260 + [ Login-LAT-Group ]
  261 + [ Login-LAT-Node ]
  262 + [ Login-LAT-Port ]
  263 + [ Login-LAT-Service ]
  264 + [ Login-Service ]
  265 + [ Login-TCP-Port ]
  266 + * [ NAS-Filter-Rule ]
  267 + * [ QoS-Filter-Rule ]
  268 + * [ Tunneling ]
  269 + * [ Redirect-Host ]
  270 + [ Redirect-Host-Usage ]
  271 + [ Redirect-Max-Cache-Time ]
  272 + * [ Proxy-Info ]
  273 + * [ AVP ]
  274 +
  275 + RAR ::= < Diameter Header: 258, REQ, PXY >
  276 +
  277 + < Session-Id >
  278 + { Origin-Host }
  279 + { Origin-Realm }
  280 + { Destination-Realm }
  281 + { Destination-Host }
  282 + { Auth-Application-Id }
  283 + { Re-Auth-Request-Type }
  284 + [ User-Name ]
  285 + [ Origin-AAA-Protocol ]
  286 + [ Origin-State-Id ]
  287 + [ NAS-Identifier ]
  288 + [ NAS-IP-Address ]
  289 + [ NAS-IPv6-Address ]
  290 + [ NAS-Port ]
  291 + [ NAS-Port-Id ]
  292 + [ NAS-Port-Type ]
  293 + [ Service-Type ]
  294 + [ Framed-IP-Address ]
  295 + [ Framed-IPv6-Prefix ]
  296 + [ Framed-Interface-Id ]
  297 + [ Called-Station-Id ]
  298 + [ Calling-Station-Id ]
  299 + [ Originating-Line-Info ]
  300 + [ Acct-Session-Id ]
  301 + [ Acct-Multi-Session-Id ]
  302 + [ State ]
  303 + * [ Class ]
  304 + [ Reply-Message ]
  305 + * [ Proxy-Info ]
  306 + * [ Route-Record ]
  307 + * [ AVP ]
  308 +
  309 + RAA ::= < Diameter Header: 258, PXY >
  310 +
  311 + < Session-Id >
  312 + { Result-Code }
  313 + { Origin-Host }
  314 + { Origin-Realm }
  315 + [ User-Name ]
  316 + [ Origin-AAA-Protocol ]
  317 + [ Origin-State-Id ]
  318 + [ Error-Message ]
  319 + [ Error-Reporting-Host ]
  320 + * [ Failed-AVP ]
  321 + * [ Redirect-Host ]
  322 + [ Redirect-Host-Usage ]
  323 + [ Redirect-Max-Cache-Time ]
  324 + [ Service-Type ]
  325 + * [ Configuration-Token ]
  326 + [ Idle-Timeout ]
  327 + [ Authorization-Lifetime ]
  328 + [ Auth-Grace-Period ]
  329 + [ Re-Auth-Request-Type ]
  330 + [ State ]
  331 + * [ Class ]
  332 + * [ Reply-Message ]
  333 + [ Prompt ]
  334 + * [ Proxy-Info ]
  335 + * [ AVP ]
  336 +
  337 + STR ::= < Diameter Header: 275, REQ, PXY >
  338 +
  339 + < Session-Id >
  340 + { Origin-Host }
  341 + { Origin-Realm }
  342 + { Destination-Realm }
  343 + { Auth-Application-Id }
  344 + { Termination-Cause }
  345 + [ User-Name ]
  346 + [ Destination-Host ]
  347 + * [ Class ]
  348 + [ Origin-AAA-Protocol ]
  349 + [ Origin-State-Id ]
  350 + * [ Proxy-Info ]
  351 + * [ Route-Record ]
  352 + * [ AVP ]
  353 +
  354 + STA ::= < Diameter Header: 275, PXY >
  355 +
  356 + < Session-Id >
  357 + { Result-Code }
  358 + { Origin-Host }
  359 + { Origin-Realm }
  360 + [ User-Name ]
  361 + * [ Class ]
  362 + [ Error-Message ]
  363 + [ Error-Reporting-Host ]
  364 + * [ Failed-AVP ]
  365 + [ Origin-AAA-Protocol ]
  366 + [ Origin-State-Id ]
  367 + * [ Redirect-Host ]
  368 + [ Redirect-Host-Usage ]
  369 + [ Redirect-Max-Cache-Time ]
  370 + * [ Proxy-Info ]
  371 + * [ AVP ]
  372 +
  373 + ASR ::= < Diameter Header: 274, REQ, PXY >
  374 +
  375 + < Session-Id >
  376 + { Origin-Host }
  377 + { Origin-Realm }
  378 + { Destination-Realm }
  379 + { Destination-Host }
  380 + { Auth-Application-Id }
  381 + [ User-Name ]
  382 + [ Origin-AAA-Protocol ]
  383 + [ Origin-State-Id ]
  384 + [ NAS-Identifier ]
  385 + [ NAS-IP-Address ]
  386 + [ NAS-IPv6-Address ]
  387 + [ NAS-Port ]
  388 + [ NAS-Port-Id ]
  389 + [ NAS-Port-Type ]
  390 + [ Service-Type ]
  391 + [ Framed-IP-Address ]
  392 + [ Framed-IPv6-Prefix ]
  393 + [ Framed-Interface-Id ]
  394 + [ Called-Station-Id ]
  395 + [ Calling-Station-Id ]
  396 + [ Originating-Line-Info ]
  397 + [ Acct-Session-Id ]
  398 + [ Acct-Multi-Session-Id ]
  399 + [ State ]
  400 + * [ Class ]
  401 + * [ Reply-Message ]
  402 + * [ Proxy-Info ]
  403 + * [ Route-Record ]
  404 + * [ AVP ]
  405 +
  406 + ASA ::= < Diameter Header: 274, PXY >
  407 +
  408 + < Session-Id >
  409 + { Result-Code }
  410 + { Origin-Host }
  411 + { Origin-Realm }
  412 + [ User-Name ]
  413 + [ Origin-AAA-Protocol ]
  414 + [ Origin-State-Id ]
  415 + [ State]
  416 + [ Error-Message ]
  417 + [ Error-Reporting-Host ]
  418 + * [ Failed-AVP ]
  419 + * [ Redirect-Host ]
  420 + [ Redirect-Host-Usage ]
  421 + [ Redirect-Max-Cache-Time ]
  422 + * [ Proxy-Info ]
  423 + * [ AVP ]
  424 +
  425 + ACR ::= < Diameter Header: 271, REQ, PXY >
  426 +
  427 + < Session-Id >
  428 + { Origin-Host }
  429 + { Origin-Realm }
  430 + { Destination-Realm }
  431 + { Accounting-Record-Type }
  432 + { Accounting-Record-Number }
  433 + [ Acct-Application-Id ]
  434 + [ Vendor-Specific-Application-Id ]
  435 + [ User-Name ]
  436 + [ Accounting-Sub-Session-Id ]
  437 + [ Acct-Session-Id ]
  438 + [ Acct-Multi-Session-Id ]
  439 + [ Origin-AAA-Protocol ]
  440 + [ Origin-State-Id ]
  441 + [ Destination-Host ]
  442 + [ Event-Timestamp ]
  443 + [ Acct-Delay-Time ]
  444 + [ NAS-Identifier ]
  445 + [ NAS-IP-Address ]
  446 + [ NAS-IPv6-Address ]
  447 + [ NAS-Port ]
  448 + [ NAS-Port-Id ]
  449 + [ NAS-Port-Type ]
  450 + * [ Class ]
  451 + [ Service-Type ]
  452 + [ Termination-Cause ]
  453 + [ Accounting-Input-Octets ]
  454 + [ Accounting-Input-Packets ]
  455 + [ Accounting-Output-Octets ]
  456 + [ Accounting-Output-Packets ]
  457 + [ Acct-Authentic ]
  458 + [ Accounting-Auth-Method ]
  459 + [ Acct-Link-Count ]
  460 + [ Acct-Session-Time ]
  461 + [ Acct-Tunnel-Connection ]
  462 + [ Acct-Tunnel-Packets-Lost ]
  463 + [ Callback-Id ]
  464 + [ Callback-Number ]
  465 + [ Called-Station-Id ]
  466 + [ Calling-Station-Id ]
  467 + * [ Connect-Info ]
  468 + [ Originating-Line-Info ]
  469 + [ Authorization-Lifetime ]
  470 + [ Session-Timeout ]
  471 + [ Idle-Timeout ]
  472 + [ Port-Limit ]
  473 + [ Accounting-Realtime-Required ]
  474 + [ Acct-Interim-Interval ]
  475 + * [ Filter-Id ]
  476 + * [ NAS-Filter-Rule ]
  477 + * [ QoS-Filter-Rule ]
  478 + [ Framed-AppleTalk-Link ]
  479 + [ Framed-AppleTalk-Network ]
  480 + [ Framed-AppleTalk-Zone ]
  481 + [ Framed-Compression ]
  482 + [ Framed-Interface-Id ]
  483 + [ Framed-IP-Address ]
  484 + [ Framed-IP-Netmask ]
  485 + * [ Framed-IPv6-Prefix ]
  486 + [ Framed-IPv6-Pool ]
  487 + * [ Framed-IPv6-Route ]
  488 + [ Framed-IPX-Network ]
  489 + [ Framed-MTU ]
  490 + [ Framed-Pool ]
  491 + [ Framed-Protocol ]
  492 + * [ Framed-Route ]
  493 + [ Framed-Routing ]
  494 + * [ Login-IP-Host ]
  495 + * [ Login-IPv6-Host ]
  496 + [ Login-LAT-Group ]
  497 + [ Login-LAT-Node ]
  498 + [ Login-LAT-Port ]
  499 + [ Login-LAT-Service ]
  500 + [ Login-Service ]
  501 + [ Login-TCP-Port ]
  502 + * [ Tunneling ]
  503 + * [ Proxy-Info ]
  504 + * [ Route-Record ]
  505 + * [ AVP ]
  506 +
  507 + ACA ::= < Diameter Header: 271, PXY >
  508 +
  509 + < Session-Id >
  510 + { Result-Code }
  511 + { Origin-Host }
  512 + { Origin-Realm }
  513 + { Accounting-Record-Type }
  514 + { Accounting-Record-Number }
  515 + [ Acct-Application-Id ]
  516 + [ Vendor-Specific-Application-Id ]
  517 + [ User-Name ]
  518 + [ Accounting-Sub-Session-Id ]
  519 + [ Acct-Session-Id ]
  520 + [ Acct-Multi-Session-Id ]
  521 + [ Event-Timestamp ]
  522 + [ Error-Message ]
  523 + [ Error-Reporting-Host ]
  524 + * [ Failed-AVP ]
  525 + [ Origin-AAA-Protocol ]
  526 + [ Origin-State-Id ]
  527 + [ NAS-Identifier ]
  528 + [ NAS-IP-Address ]
  529 + [ NAS-IPv6-Address ]
  530 + [ NAS-Port ]
  531 + [ NAS-Port-Id ]
  532 + [ NAS-Port-Type ]
  533 + [ Service-Type ]
  534 + [ Termination-Cause ]
  535 + [ Accounting-Realtime-Required ]
  536 + [ Acct-Interim-Interval ]
  537 + * [ Class ]
  538 + * [ Proxy-Info ]
  539 + * [ Route-Record ]
  540 + * [ AVP ]
  541 +
  542 +;; ===========================================================================
  543 +
  544 +@grouped
  545 +
  546 + CHAP-Auth ::= < AVP Header: 402 >
  547 +
  548 + { CHAP-Algorithm }
  549 + { CHAP-Ident }
  550 + [ CHAP-Response ]
  551 + * [ AVP ]
  552 +
  553 + Tunneling ::= < AVP Header: 401 >
  554 +
  555 + { Tunnel-Type }
  556 + { Tunnel-Medium-Type }
  557 + { Tunnel-Client-Endpoint }
  558 + { Tunnel-Server-Endpoint }
  559 + [ Tunnel-Preference ]
  560 + [ Tunnel-Client-Auth-Id ]
  561 + [ Tunnel-Server-Auth-Id ]
  562 + [ Tunnel-Assignment-Id ]
  563 + [ Tunnel-Password ]
  564 + [ Tunnel-Private-Group-Id ]
  565 +
  566 +;; ===========================================================================
  567 +
  568 +@enum NAS-Port-Type
  569 +
  570 + ASYNC 0
  571 + SYNC 1
  572 + ISDN_SYNC 2
  573 + ISDN_ASYNC_V120 3
  574 + ISDN_ASYNC_V110 4
  575 + VIRTUAL 5
  576 + PIAFS 6
  577 + HDLC_CLEAR_CHANNEL 7
  578 + X25 8
  579 + X75 9
  580 + G3FAX 10
  581 + SDSL 11
  582 + ADSL-CAP 12
  583 + ADSL-DMT 13
  584 + IDSL 14
  585 + ETHERNET 15
  586 + XDSL 16
  587 + CABLE 17
  588 + WIRELESS_OTHER 18
  589 + 'WIRELESS_802.11' 19
  590 + TOKEN-RING 20
  591 + FDDI 21
  592 + WIRELESS_CDMA2000 22
  593 + WIRELESS_UMTS 23
  594 + WIRELESS_1X-EV 24
  595 + IAPP 25
  596 +
  597 +@enum Prompt
  598 +
  599 + NO_ECHO 0
  600 + ECHO 1
  601 +
  602 +@enum CHAP-Algorithm
  603 +
  604 + WITH_MD5 5
  605 +
  606 +@enum Service-Type
  607 +
  608 + LOGIN 1
  609 + FRAMED 2
  610 + CALLBACK_LOGIN 3
  611 + CALLBACK_FRAMED 4
  612 + OUTBOUND 5
  613 + ADMINISTRATIVE 6
  614 + NAS_PROMPT 7
  615 + AUTHENTICATE_ONLY 8
  616 + CALLBACK_NAS_PROMPT 9
  617 + CALL_CHECK 10
  618 + CALLBACK_ADMINISTRATIVE 11
  619 + VOICE 12
  620 + FAX 13
  621 + MODEM_RELAY 14
  622 + IAPP-REGISTER 15
  623 + IAPP-AP-CHECK 16
  624 + AUTHORIZE_ONLY 17
  625 +
  626 +@enum Framed-Protocol
  627 +
  628 + PPP 1
  629 + SLIP 2
  630 + ARAP 3
  631 + GANDALF 4
  632 + XYLOGICS 5
  633 + X75 6
  634 +
  635 +@enum Framed-Routing
  636 +
  637 + NONE 0
  638 + SEND 1
  639 + LISTEN 2
  640 + SEND_AND_LISTEN 3
  641 +
  642 +@enum Framed-Compression
  643 +
  644 + NONE 0
  645 + VJ 1
  646 + IPX 2
  647 + STAC-LZS 3
  648 +
  649 +@enum ARAP-Zone-Access
  650 +
  651 + DEFAULT 1
  652 + FILTER_INCLUSIVELY 2
  653 + FILTER_EXCLUSIVELY 4
  654 +
  655 +@enum Login-Service
  656 +
  657 + TELNET 0
  658 + RLOGIN 1
  659 + TCP_CLEAR 2
  660 + PORTMASTER 3
  661 + LAT 4
  662 + X25-PAD 5
  663 + X25-T3POS 6
  664 + TCP_CLEAR_QUIET 8
  665 +
  666 +@enum Tunnel-Type
  667 +
  668 + PPTP 1
  669 + L2F 2
  670 + L2TP 3
  671 + ATMP 4
  672 + VTP 5
  673 + AH 6
  674 + IP-IP 7
  675 + MIN-IP-IP 8
  676 + ESP 9
  677 + GRE 10
  678 + DVS 11
  679 + IP-IN-IP 12
  680 + VLAN 13
  681 +
  682 +@enum Tunnel-Medium-Type
  683 +
  684 + IPV4 1
  685 + IPV6 2
  686 + NSAP 3
  687 + HDLC 4
  688 + BBN_1822 5
  689 + '802' 6
  690 + E163 7
  691 + E164 8
  692 + F69 9
  693 + X121 10
  694 + IPX 11
  695 + APPLETALK 12
  696 + DECNET_IV 13
  697 + BANYAN_VINES 14
  698 + E164_NSAP 15
  699 +
  700 +
  701 +@enum Acct-Authentic
  702 +
  703 + RADIUS 1
  704 + LOCAL 2
  705 + REMOTE 3
  706 + DIAMETER 4
  707 +
  708 +@enum Accounting-Auth-Method
  709 +
  710 + PAP 1
  711 + CHAP 2
  712 + MS-CHAP-1 3
  713 + MS-CHAP-2 4
  714 + EAP 5
  715 + NONE 7
  716 +
  717 +@enum Termination-Cause
  718 +
  719 + USER_REQUEST 11
  720 + LOST_CARRIER 12
  721 + LOST_SERVICE 13
  722 + IDLE_TIMEOUT 14
  723 + SESSION_TIMEOUT 15
  724 + ADMIN_RESET 16
  725 + ADMIN_REBOOT 17
  726 + PORT_ERROR 18
  727 + NAS_ERROR 19
  728 + NAS_REQUEST 20
  729 + NAS_REBOOT 21
  730 + PORT_UNNEEDED 22
  731 + PORT_PREEMPTED 23
  732 + PORT_SUSPENDED 24
  733 + SERVICE_UNAVAILABLE 25
  734 + CALLBACK 26
  735 + USER_ERROR 27
  736 + HOST_REQUEST 28
  737 + SUPPLICANT_RESTART 29
  738 + REAUTHORIZATION_FAILURE 30
  739 + PORT_REINIT 31
  740 + PORT_DISABLED 32
349 lib/diameter/examples/dict/rfc4006_cc.dia
... ... @@ -0,0 +1,349 @@
  1 +;;
  2 +;; %CopyrightBegin%
  3 +;;
  4 +;; Copyright Ericsson AB 2010-2011. All Rights Reserved.
  5 +;;
  6 +;; The contents of this file are subject to the Erlang Public License,
  7 +;; Version 1.1, (the "License"); you may not use this file except in
  8 +;; compliance with the License. You should have received a copy of the
  9 +;; Erlang Public License along with this software. If not, it can be
  10 +;; retrieved online at http://www.erlang.org/.
  11 +;;
  12 +;; Software distributed under the License is distributed on an "AS IS"
  13 +;; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See