radius_attributes.h
Go to the documentation of this file.
1 /**
2  * @file radius_attributes.h
3  * @brief Formatting and parsing of RADIUS attributes
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2022-2024 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneEAP Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 2.4.4
29  **/
30 
31 #ifndef _RADIUS_ATTRIBUTES_H
32 #define _RADIUS_ATTRIBUTES_H
33 
34 //Dependencies
35 #include "radius/radius.h"
36 
37 //Maximum length of attribute value
38 #define RADIUS_MAX_ATTR_VALUE_LEN 253
39 
40 //C++ guard
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 
46 /**
47  * @brief Attribute types
48  **/
49 
50 typedef enum
51 {
52  RADIUS_ATTR_USER_NAME = 1, ///<User-Name
53  RADIUS_ATTR_USER_PASSWORD = 2, ///<User-Password
54  RADIUS_ATTR_CHAP_PASSWORD = 3, ///<CHAP-Password
55  RADIUS_ATTR_NAS_IP_ADDR = 4, ///<NAS-IP-Address
56  RADIUS_ATTR_NAS_PORT = 5, ///<NAS-Port
57  RADIUS_ATTR_SERVICE_TYPE = 6, ///<Service-Type
58  RADIUS_ATTR_FRAMED_PROTOCOL = 7, ///<Framed-Protocol
59  RADIUS_ATTR_FRAMED_IP_ADDR = 8, ///<Framed-IP-Address
60  RADIUS_ATTR_FRAMED_IP_NETMASK = 9, ///<Framed-IP-Netmask
61  RADIUS_ATTR_FRAMED_ROUTING = 10, ///<Framed-Routing
62  RADIUS_ATTR_FILTER_ID = 11, ///<Filter-Id
63  RADIUS_ATTR_FRAMED_MTU = 12, ///<Framed-MTU
64  RADIUS_ATTR_FRAMED_COMPRESSION = 13, ///<Framed-Compression
65  RADIUS_ATTR_LOGIN_IP_HOST = 14, ///<Login-IP-Host
66  RADIUS_ATTR_LOGIN_SERVICE = 15, ///<Login-Service
67  RADIUS_ATTR_LOGIN_TCP_PORT = 16, ///<Login-TCP-Port
68  RADIUS_ATTR_REPLY_MESSAGE = 18, ///<Reply-Message
69  RADIUS_ATTR_CALLBACK_NUMBER = 19, ///<Callback-Number
70  RADIUS_ATTR_CALLBACK_ID = 20, ///<Callback-Id
71  RADIUS_ATTR_FRAMED_ROUTE = 22, ///<Framed-Route
72  RADIUS_ATTR_FRAMED_IPX_NETWORK = 23, ///<Framed-IPX-Network
73  RADIUS_ATTR_STATE = 24, ///<State
74  RADIUS_ATTR_CLASS = 25, ///<Class
75  RADIUS_ATTR_VENDOR_SPECIFIC = 26, ///<Vendor-Specific
76  RADIUS_ATTR_SESSION_TIMEOUT = 27, ///<Session-Timeout
77  RADIUS_ATTR_IDLE_TIMEOUT = 28, ///<Idle-Timeout
78  RADIUS_ATTR_TERMINATION_ACTION = 29, ///<Termination-Action
79  RADIUS_ATTR_CALLED_STATION_ID = 30, ///<Called-Station-Id
80  RADIUS_ATTR_CALLING_STATION_ID = 31, ///<Calling-Station-Id
81  RADIUS_ATTR_NAS_IDENTIFIER = 32, ///<NAS-Identifier
82  RADIUS_ATTR_PROXY_STATE = 33, ///<Proxy-State
83  RADIUS_ATTR_LOGIN_LAT_SERVICE = 34, ///<Login-LAT-Service
84  RADIUS_ATTR_LOGIN_LAT_NODE = 35, ///<Login-LAT-Node
85  RADIUS_ATTR_LOGIN_LAT_GROUP = 36, ///<Login-LAT-Group
86  RADIUS_ATTR_FRAMED_APPLETALK_LINK = 37, ///<Framed-AppleTalk-Link
87  RADIUS_ATTR_FRAMED_APPLETALK_NETWORK = 38, ///<Framed-AppleTalk-Network
88  RADIUS_ATTR_FRAMED_APPLETALK_ZONE = 39, ///<Framed-AppleTalk-Zone
89  RADIUS_ATTR_ACCT_STATUS_TYPE = 40, ///<Acct-Status-Type
90  RADIUS_ATTR_ACCT_DELAY_TIME = 41, ///<Acct-Delay-Time
91  RADIUS_ATTR_ACCT_INPUT_OCTETS = 42, ///<Acct-Input-Octets
92  RADIUS_ATTR_ACCT_OUTPUT_OCTETS = 43, ///<Acct-Output-Octets
93  RADIUS_ATTR_ACCT_SESSION_ID = 44, ///<Acct-Session-Id
94  RADIUS_ATTR_ACCT_AUTHENTIC = 45, ///<Acct-Authentic
95  RADIUS_ATTR_ACCT_SESSION_TIME = 46, ///<Acct-Session-Time
96  RADIUS_ATTR_ACCT_INPUT_PACKETS = 47, ///<Acct-Input-Packets
97  RADIUS_ATTR_ACCT_OUTPUT_PACKETS = 48, ///<Acct-Output-Packets
98  RADIUS_ATTR_ACCT_TERMINATE_CAUSE = 49, ///<Acct-Terminate-Cause
99  RADIUS_ATTR_ACCT_MULTI_SESSION_ID = 50, ///<Acct-Multi-Session-Id
100  RADIUS_ATTR_ACCT_LINK_COUNT = 51, ///<Acct-Link-Count
101  RADIUS_ATTR_ACCT_INPUT_GIGAWORDS = 52, ///<Acct-Input-Gigawords
102  RADIUS_ATTR_ACCT_OUTPUT_GIGAWORDS = 53, ///<Acct-Output-Gigawords
103  RADIUS_ATTR_EVENT_TIMESTAMP = 55, ///<Event-Timestamp
104  RADIUS_ATTR_EGRESS_VLANID = 56, ///<Egress-VLANID
105  RADIUS_ATTR_INGRESS_FILTERS = 57, ///<Ingress-Filters
106  RADIUS_ATTR_EGRESS_VLAN_NAME = 58, ///<Egress-VLAN-Name
107  RADIUS_ATTR_USER_PRIORITY_TABLE = 59, ///<User-Priority-Table
108  RADIUS_ATTR_CHAP_CHALLENGE = 60, ///<CHAP-Challenge
109  RADIUS_ATTR_NAS_PORT_TYPE = 61, ///<NAS-Port-Type
110  RADIUS_ATTR_PORT_LIMIT = 62, ///<Port-Limit
111  RADIUS_ATTR_LOGIN_LAT_PORT = 63, ///<Login-LAT-Port
112  RADIUS_ATTR_TUNNEL_TYPE = 64, ///<Tunnel-Type
113  RADIUS_ATTR_TUNNEL_MEDIUM_TYPE = 65, ///<Tunnel-Medium-Type
114  RADIUS_ATTR_TUNNEL_CLIENT_ENDPOINT = 66, ///<Tunnel-Client-Endpoint
115  RADIUS_ATTR_TUNNEL_SERVER_ENDPOINT = 67, ///<Tunnel-Server-Endpoint
116  RADIUS_ATTR_ACCT_TUNNEL_CONNECTION = 68, ///<Acct-Tunnel-Connection
117  RADIUS_ATTR_TUNNEL_PASSWORD = 69, ///<Tunnel-Password
118  RADIUS_ATTR_ARAP_PASSWORD = 70, ///<ARAP-Password
119  RADIUS_ATTR_ARAP_FEATURES = 71, ///<ARAP-Features
120  RADIUS_ATTR_ARAP_ZONE_ACCESS = 72, ///<ARAP-Zone-Access
121  RADIUS_ATTR_ARAP_SECURITY = 73, ///<ARAP-Security
122  RADIUS_ATTR_ARAP_SECURITY_DATA = 74, ///<ARAP-Security-Data
123  RADIUS_ATTR_PASSWORD_RETRY = 75, ///<Password-Retry
124  RADIUS_ATTR_PROMPT = 76, ///<Prompt
125  RADIUS_ATTR_CONNECT_INFO = 77, ///<Connect-Info
126  RADIUS_ATTR_CONFIGURATION_TOKEN = 78, ///<Configuration-Token
127  RADIUS_ATTR_EAP_MESSAGE = 79, ///<EAP-Message
128  RADIUS_ATTR_MESSAGE_AUTHENTICATOR = 80, ///<Message-Authenticator
129  RADIUS_ATTR_TUNNEL_PRIVATE_GROUP_ID = 81, ///<Tunnel-Private-Group-ID
130  RADIUS_ATTR_TUNNEL_ASSIGNMENT_ID = 82, ///<Tunnel-Assignment-ID
131  RADIUS_ATTR_TUNNEL_PREFERENCE = 83, ///<Tunnel-Preference
132  RADIUS_ATTR_ARAP_CHALLENGE_RESPONSE = 84, ///<ARAP-Challenge-Response
133  RADIUS_ATTR_ACCT_INTERIM_INTERVAL = 85, ///<Acct-Interim-Interval
134  RADIUS_ATTR_ACCT_TUNNEL_PACKETS_LOST = 86, ///<Acct-Tunnel-Packets-Lost
135  RADIUS_ATTR_NAS_PORT_ID = 87, ///<NAS-Port-Id
136  RADIUS_ATTR_FRAMED_POOL = 88, ///<Framed-Pool
137  RADIUS_ATTR_CUI = 89, ///<CUI
138  RADIUS_ATTR_TUNNEL_CLIENT_AUTH_ID = 90, ///<Tunnel-Client-Auth-ID
139  RADIUS_ATTR_TUNNEL_SERVER_AUTH_ID = 91, ///<Tunnel-Server-Auth-ID
140  RADIUS_ATTR_NAS_FILTER_RULE = 92, ///<NAS-Filter-Rule
141  RADIUS_ATTR_ORIGINATING_LINE_INFO = 94, ///<Originating-Line-Info
142  RADIUS_ATTR_NAS_IPV6_ADDR = 95, ///<NAS-IPv6-Address
143  RADIUS_ATTR_FRAMED_INTERFACE_ID = 96, ///<Framed-Interface-Id
144  RADIUS_ATTR_FRAMED_IPV6_PREFIX = 97, ///<Framed-IPv6-Prefix
145  RADIUS_ATTR_LOGIN_IPV6_HOST = 98, ///<Login-IPv6-Host
146  RADIUS_ATTR_FRAMED_IPV6_ROUTE = 99, ///<Framed-IPv6-Route
147  RADIUS_ATTR_FRAMED_IPV6_POOL = 100, ///<Framed-IPv6-Pool
148  RADIUS_ATTR_ERROR_CAUSE = 101, ///<Error-Cause
149  RADIUS_ATTR_EAP_KEY_NAME = 102, ///<EAP-Key-Name
150  RADIUS_ATTR_DIGEST_RESPONSE = 103, ///<Digest-Response
151  RADIUS_ATTR_DIGEST_REALM = 104, ///<Digest-Realm
152  RADIUS_ATTR_DIGEST_NONCE = 105, ///<Digest-Nonce
153  RADIUS_ATTR_DIGEST_RESPONSE_AUTH = 106, ///<Digest-Response-Auth
154  RADIUS_ATTR_DIGEST_NEXTNONCE = 107, ///<Digest-Nextnonce
155  RADIUS_ATTR_DIGEST_METHOD = 108, ///<Digest-Method
156  RADIUS_ATTR_DIGEST_URI = 109, ///<Digest-URI
157  RADIUS_ATTR_DIGEST_QOP = 110, ///<Digest-Qop
158  RADIUS_ATTR_DIGEST_ALGORITHM = 111, ///<Digest-Algorithm
159  RADIUS_ATTR_DIGEST_ENTITY_BODY_HASH = 112, ///<Digest-Entity-Body-Hash
160  RADIUS_ATTR_DIGEST_CNONCE = 113, ///<Digest-CNonce
161  RADIUS_ATTR_DIGEST_NONCE_COUNT = 114, ///<Digest-Nonce-Count
162  RADIUS_ATTR_DIGEST_USERNAME = 115, ///<Digest-Username
163  RADIUS_ATTR_DIGEST_OPAQUE = 116, ///<Digest-Opaque
164  RADIUS_ATTR_DIGEST_AUTH_PARAM = 117, ///<Digest-Auth-Param
165  RADIUS_ATTR_DIGEST_AKA_AUTS = 118, ///<Digest-AKA-Auts
166  RADIUS_ATTR_DIGEST_DOMAIN = 119, ///<Digest-Domain
167  RADIUS_ATTR_DIGEST_STALE = 120, ///<Digest-Stale
168  RADIUS_ATTR_DIGEST_HA1 = 121, ///<Digest-HA1
169  RADIUS_ATTR_SIP_AOR = 122, ///<SIP-AOR
170  RADIUS_ATTR_DELEGATED_IPV6_PREFIX = 123, ///<Delegated-IPv6-Prefix
171  RADIUS_ATTR_MIP6_FEATURE_VECTOR = 124, ///<MIP6-Feature-Vector
172  RADIUS_ATTR_MIP6_HOME_LINK_PREFIX = 125, ///<MIP6-Home-Link-Prefix
173  RADIUS_ATTR_OPERATOR_NAME = 126, ///<Operator-Name
174  RADIUS_ATTR_LOCATION_INFORMATION = 127, ///<Location-Information
175  RADIUS_ATTR_LOCATION_DATA = 128, ///<Location-Data
176  RADIUS_ATTR_BASIC_LOCATION_POLICY_RULES = 129, ///<Basic-Location-Policy-Rules
177  RADIUS_ATTR_EXTENDED_LOCATION_POLICY_RULES = 130, ///<Extended-Location-Policy-Rules
178  RADIUS_ATTR_LOCATION_CAPABLE = 131, ///<Location-Capable
179  RADIUS_ATTR_REQUESTED_LOCATION_INFO = 132, ///<Requested-Location-Info
180  RADIUS_ATTR_FRAMED_MANAGEMENT_PROTOCOL = 133, ///<Framed-Management-Protocol
181  RADIUS_ATTR_MANAGEMENT_TRANSPORT_PROTECTION = 134, ///<Management-Transport-Protection
182  RADIUS_ATTR_MANAGEMENT_POLICY_ID = 135, ///<Management-Policy-Id
183  RADIUS_ATTR_MANAGEMENT_PRIVILEGE_LEVEL = 136, ///<Management-Privilege-Level
184  RADIUS_ATTR_PKM_SS_CERT = 137, ///<PKM-SS-Cert
185  RADIUS_ATTR_PKM_CA_CERT = 138, ///<PKM-CA-Cert
186  RADIUS_ATTR_PKM_CONFIG_SETTINGS = 139, ///<PKM-Config-Settings
187  RADIUS_ATTR_PKM_CRYPTOSUITE_LIST = 140, ///<PKM-Cryptosuite-List
188  RADIUS_ATTR_PKM_SAID = 141, ///<PKM-SAID
189  RADIUS_ATTR_PKM_SA_DESCRIPTOR = 142, ///<PKM-SA-Descriptor
190  RADIUS_ATTR_PKM_AUTH_KEY = 143, ///<PKM-Auth-Key
191  RADIUS_ATTR_DS_LITE_TUNNEL_NAME = 144, ///<DS-Lite-Tunnel-Name
192  RADIUS_ATTR_MOBILE_NODE_IDENTIFIER = 145, ///<Mobile-Node-Identifier
193  RADIUS_ATTR_SERVICE_SELECTION = 146, ///<Service-Selection
194  RADIUS_ATTR_PMIP6_HOME_LMA_IPV6_ADDR = 147, ///<PMIP6-Home-LMA-IPv6-Address
195  RADIUS_ATTR_PMIP6_VISITED_LMA_IPV6_ADDR = 148, ///<PMIP6-Visited-LMA-IPv6-Address
196  RADIUS_ATTR_PMIP6_HOME_LMA_IPV4_ADDR = 149, ///<PMIP6-Home-LMA-IPv4-Address
197  RADIUS_ATTR_PMIP6_VISITED_LMA_IPV4_ADDR = 150, ///<PMIP6-Visited-LMA-IPv4-Address
198  RADIUS_ATTR_PMIP6_HOME_HN_PREFIX = 151, ///<PMIP6-Home-HN-Prefix
199  RADIUS_ATTR_PMIP6_VISITED_HN_PREFIX = 152, ///<PMIP6-Visited-HN-Prefix
200  RADIUS_ATTR_PMIP6_HOME_INTERFACE_ID = 153, ///<PMIP6-Home-Interface-ID
201  RADIUS_ATTR_PMIP6_VISITED_INTERFACE_ID = 154, ///<PMIP6-Visited-Interface-ID
202  RADIUS_ATTR_PMIP6_HOME_IPV4_HOA = 155, ///<PMIP6-Home-IPv4-HoA
203  RADIUS_ATTR_PMIP6_VISITED_IPV4_HOA = 156, ///<PMIP6-Visited-IPv4-HoA
204  RADIUS_ATTR_PMIP6_HOME_DHCP4_SERVER_ADDR = 157, ///<PMIP6-Home-DHCP4-Server-Address
205  RADIUS_ATTR_PMIP6_VISITED_DHCP4_SERVER_ADDR = 158, ///<PMIP6-Visited-DHCP4-Server-Address
206  RADIUS_ATTR_PMIP6_HOME_DHCP6_SERVER_ADDR = 159, ///<PMIP6-Home-DHCP6-Server-Address
207  RADIUS_ATTR_PMIP6_VISITED_DHCP6_SERVER_ADDR = 160, ///<PMIP6-Visited-DHCP6-Server-Address
208  RADIUS_ATTR_PMIP6_HOME_IPV4_GATEWAY = 161, ///<PMIP6-Home-IPv4-Gateway
209  RADIUS_ATTR_PMIP6_VISITED_IPV4_GATEWAY = 162, ///<PMIP6-Visited-IPv4-Gateway
210  RADIUS_ATTR_EAP_LOWER_LAYER = 163, ///<EAP-Lower-Layer
211  RADIUS_ATTR_GSS_ACCEPTOR_SERVICE_NAME = 164, ///<GSS-Acceptor-Service-Name
212  RADIUS_ATTR_GSS_ACCEPTOR_HOST_NAME = 165, ///<GSS-Acceptor-Host-Name
213  RADIUS_ATTR_GSS_ACCEPTOR_SERVICE_SPECIFICS = 166, ///<GSS-Acceptor-Service-Specifics
214  RADIUS_ATTR_GSS_ACCEPTOR_REALM_NAME = 167, ///<GSS-Acceptor-Realm-Name
215  RADIUS_ATTR_FRAMED_IPV6_ADDR = 168, ///<Framed-IPv6-Address
216  RADIUS_ATTR_DNS_SERVER_IPV6_ADDR = 169, ///<DNS-Server-IPv6-Address
217  RADIUS_ATTR_ROUTE_IPV6_INFORMATION = 170, ///<Route-IPv6-Information
218  RADIUS_ATTR_DELEGATED_IPV6_PREFIX_POOL = 171, ///<Delegated-IPv6-Prefix-Pool
219  RADIUS_ATTR_STATEFUL_IPV6_ADDR_POOL = 172, ///<Stateful-IPv6-Address-Pool
220  RADIUS_ATTR_IPV6_6RD_CONFIGURATION = 173, ///<IPv6-6rd-Configuration
221  RADIUS_ATTR_ALLOWED_CALLED_STATION_ID = 174, ///<Allowed-Called-Station-Id
222  RADIUS_ATTR_EAP_PEER_ID = 175, ///<EAP-Peer-Id
223  RADIUS_ATTR_EAP_SERVER_ID = 176, ///<EAP-Server-Id
224  RADIUS_ATTR_MOBILITY_DOMAIN_ID = 177, ///<Mobility-Domain-Id
225  RADIUS_ATTR_PREAUTH_TIMEOUT = 178, ///<Preauth-Timeout
226  RADIUS_ATTR_NETWORK_ID_NAME = 179, ///<Network-Id-Name
227  RADIUS_ATTR_EAPOL_ANNOUNCEMENT = 180, ///<EAPoL-Announcement
228  RADIUS_ATTR_WLAN_HESSID = 181, ///<WLAN-HESSID
229  RADIUS_ATTR_WLAN_VENUE_INFO = 182, ///<WLAN-Venue-Info
230  RADIUS_ATTR_WLAN_VENUE_LANGUAGE = 183, ///<WLAN-Venue-Language
231  RADIUS_ATTR_WLAN_VENUE_NAME = 184, ///<WLAN-Venue-Name
232  RADIUS_ATTR_WLAN_REASON_CODE = 185, ///<WLAN-Reason-Code
233  RADIUS_ATTR_WLAN_PAIRWISE_CIPHER = 186, ///<WLAN-Pairwise-Cipher
234  RADIUS_ATTR_WLAN_GROUP_CIPHER = 187, ///<WLAN-Group-Cipher
235  RADIUS_ATTR_WLAN_AKM_SUITE = 188, ///<WLAN-AKM-Suite
236  RADIUS_ATTR_WLAN_GROUP_MGMT_CIPHER = 189, ///<WLAN-Group-Mgmt-Cipher
237  RADIUS_ATTR_WLAN_RF_BAND = 190, ///<WLAN-RF-Band
238  RADIUS_ATTR_EXTENDED_ATTR_1 = 241, ///<Extended-Attribute-1
239  RADIUS_ATTR_EXTENDED_ATTR_2 = 242, ///<Extended-Attribute-2
240  RADIUS_ATTR_EXTENDED_ATTR_3 = 243, ///<Extended-Attribute-3
241  RADIUS_ATTR_EXTENDED_ATTR_4 = 244, ///<Extended-Attribute-4
242  RADIUS_ATTR_EXTENDED_ATTR_5 = 245, ///<Extended-Attribute-5
243  RADIUS_ATTR_EXTENDED_ATTR_6 = 246 ///<Extended-Attribute-6
245 
246 
247 /**
248  * @brief Service types
249  **/
250 
251 typedef enum
252 {
255  RADIUS_SERVICE_TYPE_CALLBACK_LOGIN = 3, ///<Callback Login
256  RADIUS_SERVICE_TYPE_CALLBACK_FRAMED = 4, ///<Callback Framed
258  RADIUS_SERVICE_TYPE_ADMINISTRATIVE = 6, ///<Administrative
259  RADIUS_SERVICE_TYPE_NAS_PROMPT = 7, ///<NAS Prompt
260  RADIUS_SERVICE_TYPE_AUTHENTICATE_ONLY = 8, ///<Authenticate Only
261  RADIUS_SERVICE_TYPE_CALLBACK_NAS_PROMPT = 9, ///<Callback NAS Prompt
262  RADIUS_SERVICE_TYPE_CALL_CHECK = 10, ///<Call Check
263  RADIUS_SERVICE_TYPE_CALLBACK_ADMINISTRATIVE = 11 ///<Callback Administrative
265 
266 /**
267  * @brief Service types
268  **/
269 
270 typedef enum
271 {
272  RADIUS_PORT_TYPE_ASYNC = 0, ///<Async
273  RADIUS_PORT_TYPE_SYNC = 1, ///<Sync
274  RADIUS_PORT_TYPE_ISDN_SYNC = 2, ///<ISDN Sync
275  RADIUS_PORT_TYPE_ISDN_ASYNC_V120 = 3, ///<ISDN Async V.120
276  RADIUS_PORT_TYPE_ISDN_ASYNC_V110 = 4, ///<ISDN Async V.110
277  RADIUS_PORT_TYPE_VIRTUAL = 5, ///<Virtual
278  RADIUS_PORT_TYPE_PIAFS = 6, ///<PIAFS
279  RADIUS_PORT_TYPE_HDLC_CLEAR_CHANNEL = 7, ///<HDLC Clear Channel
280  RADIUS_PORT_TYPE_X25 = 8, ///<X.25
281  RADIUS_PORT_TYPE_X75 = 9, ///<X.75
282  RADIUS_PORT_TYPE_G3_FAX = 10, ///<G.3 Fax
283  RADIUS_PORT_TYPE_SDSL = 11, ///<SDSL
284  RADIUS_PORT_TYPE_ADSL_CAP = 12, ///<ADSL-CAP
285  RADIUS_PORT_TYPE_ADSL_DMT = 13, ///<ADSL-DMT
286  RADIUS_PORT_TYPE_IDSL = 14, ///<IDSL
287  RADIUS_PORT_TYPE_ETHERNET = 15, ///<Ethernet
288  RADIUS_PORT_TYPE_XDSL = 16, ///<xDSL
289  RADIUS_PORT_TYPE_CABLE = 17, ///<Cable
290  RADIUS_PORT_TYPE_WIRELESS_OTHER = 18, ///<Wireless - Other
291  RADIUS_PORT_TYPE_WIRELESS_IEEE_802_11 = 19 ///<Wireless - IEEE 802.11
293 
294 
295 //CC-RX, CodeWarrior or Win32 compiler?
296 #if defined(__CCRX__)
297  #pragma pack
298 #elif defined(__CWCC__) || defined(_WIN32)
299  #pragma pack(push, 1)
300 #endif
301 
302 
303 /**
304  * @brief Attribute
305  **/
306 
308 {
309  uint8_t type; //0
310  uint8_t length; //1
311  uint8_t value[]; //2
313 
314 
315 //CC-RX, CodeWarrior or Win32 compiler?
316 #if defined(__CCRX__)
317  #pragma unpack
318 #elif defined(__CWCC__) || defined(_WIN32)
319  #pragma pack(pop)
320 #endif
321 
322 //RADIUS related functions
323 void radiusAddAttribute(RadiusPacket *packet, uint8_t type, const void *value,
324  size_t length);
325 
326 const RadiusAttribute *radiusGetAttribute(const RadiusPacket *packet,
327  uint8_t type, uint_t index);
328 
329 //C++ guard
330 #ifdef __cplusplus
331 }
332 #endif
333 
334 #endif
@ RADIUS_ATTR_PKM_SA_DESCRIPTOR
PKM-SA-Descriptor.
@ RADIUS_ATTR_ALLOWED_CALLED_STATION_ID
Allowed-Called-Station-Id.
@ RADIUS_ATTR_PMIP6_HOME_LMA_IPV6_ADDR
PMIP6-Home-LMA-IPv6-Address.
@ RADIUS_ATTR_REQUESTED_LOCATION_INFO
Requested-Location-Info.
@ RADIUS_ATTR_FILTER_ID
Filter-Id.
@ RADIUS_ATTR_FRAMED_APPLETALK_LINK
Framed-AppleTalk-Link.
@ RADIUS_ATTR_FRAMED_IPV6_POOL
Framed-IPv6-Pool.
@ RADIUS_PORT_TYPE_SYNC
Sync.
@ RADIUS_ATTR_EAP_LOWER_LAYER
EAP-Lower-Layer.
@ RADIUS_ATTR_DELEGATED_IPV6_PREFIX
Delegated-IPv6-Prefix.
@ RADIUS_ATTR_ACCT_AUTHENTIC
Acct-Authentic.
@ RADIUS_ATTR_MANAGEMENT_PRIVILEGE_LEVEL
Management-Privilege-Level.
@ RADIUS_ATTR_CHAP_CHALLENGE
CHAP-Challenge.
@ RADIUS_ATTR_FRAMED_IPV6_ROUTE
Framed-IPv6-Route.
@ RADIUS_ATTR_LOGIN_IP_HOST
Login-IP-Host.
@ RADIUS_PORT_TYPE_ISDN_ASYNC_V120
ISDN Async V.120.
@ RADIUS_SERVICE_TYPE_FRAMED
Framed.
@ RADIUS_ATTR_LOGIN_TCP_PORT
Login-TCP-Port.
@ RADIUS_SERVICE_TYPE_CALL_CHECK
Call Check.
@ RADIUS_ATTR_FRAMED_COMPRESSION
Framed-Compression.
@ RADIUS_ATTR_MESSAGE_AUTHENTICATOR
Message-Authenticator.
@ RADIUS_ATTR_USER_PASSWORD
User-Password.
@ RADIUS_ATTR_LOGIN_IPV6_HOST
Login-IPv6-Host.
@ RADIUS_ATTR_DIGEST_AUTH_PARAM
Digest-Auth-Param.
@ RADIUS_ATTR_PKM_AUTH_KEY
PKM-Auth-Key.
@ RADIUS_ATTR_PMIP6_HOME_DHCP4_SERVER_ADDR
PMIP6-Home-DHCP4-Server-Address.
@ RADIUS_ATTR_TUNNEL_ASSIGNMENT_ID
Tunnel-Assignment-ID.
@ RADIUS_SERVICE_TYPE_CALLBACK_LOGIN
Callback Login.
@ RADIUS_ATTR_FRAMED_IPV6_PREFIX
Framed-IPv6-Prefix.
@ RADIUS_ATTR_ARAP_FEATURES
ARAP-Features.
@ RADIUS_ATTR_CONFIGURATION_TOKEN
Configuration-Token.
RadiusPacket
Definition: radius.h:89
@ RADIUS_PORT_TYPE_ISDN_ASYNC_V110
ISDN Async V.110.
@ RADIUS_ATTR_PMIP6_VISITED_HN_PREFIX
PMIP6-Visited-HN-Prefix.
@ RADIUS_ATTR_LOGIN_LAT_PORT
Login-LAT-Port.
@ RADIUS_ATTR_PKM_SAID
PKM-SAID.
void radiusAddAttribute(RadiusPacket *packet, uint8_t type, const void *value, size_t length)
Append an attribute to a RADIUS packet.
@ RADIUS_ATTR_ACCT_STATUS_TYPE
Acct-Status-Type.
@ RADIUS_ATTR_STATE
State.
@ RADIUS_ATTR_CHAP_PASSWORD
CHAP-Password.
@ RADIUS_ATTR_FRAMED_APPLETALK_ZONE
Framed-AppleTalk-Zone.
@ RADIUS_ATTR_ACCT_OUTPUT_GIGAWORDS
Acct-Output-Gigawords.
@ RADIUS_SERVICE_TYPE_NAS_PROMPT
NAS Prompt.
@ RADIUS_SERVICE_TYPE_CALLBACK_FRAMED
Callback Framed.
@ RADIUS_PORT_TYPE_WIRELESS_IEEE_802_11
Wireless - IEEE 802.11.
@ RADIUS_ATTR_DIGEST_RESPONSE_AUTH
Digest-Response-Auth.
@ RADIUS_ATTR_ARAP_PASSWORD
ARAP-Password.
@ RADIUS_ATTR_CONNECT_INFO
Connect-Info.
@ RADIUS_ATTR_ACCT_SESSION_ID
Acct-Session-Id.
@ RADIUS_ATTR_LOGIN_LAT_GROUP
Login-LAT-Group.
@ RADIUS_ATTR_ACCT_MULTI_SESSION_ID
Acct-Multi-Session-Id.
@ RADIUS_ATTR_NAS_PORT
NAS-Port.
uint8_t type
Definition: coap_common.h:176
@ RADIUS_ATTR_DNS_SERVER_IPV6_ADDR
DNS-Server-IPv6-Address.
@ RADIUS_SERVICE_TYPE_ADMINISTRATIVE
Administrative.
@ RADIUS_PORT_TYPE_X25
X.25.
@ RADIUS_ATTR_EXTENDED_ATTR_4
Extended-Attribute-4.
@ RADIUS_ATTR_FRAMED_ROUTE
Framed-Route.
@ RADIUS_PORT_TYPE_ASYNC
Async.
uint8_t length
@ RADIUS_ATTR_LOGIN_LAT_SERVICE
Login-LAT-Service.
@ RADIUS_PORT_TYPE_ADSL_DMT
ADSL-DMT.
@ RADIUS_ATTR_DIGEST_NONCE_COUNT
Digest-Nonce-Count.
@ RADIUS_ATTR_NAS_IPV6_ADDR
NAS-IPv6-Address.
@ RADIUS_ATTR_GSS_ACCEPTOR_SERVICE_SPECIFICS
GSS-Acceptor-Service-Specifics.
@ RADIUS_SERVICE_TYPE_CALLBACK_NAS_PROMPT
Callback NAS Prompt.
@ RADIUS_ATTR_PMIP6_VISITED_IPV4_HOA
PMIP6-Visited-IPv4-HoA.
@ RADIUS_ATTR_DS_LITE_TUNNEL_NAME
DS-Lite-Tunnel-Name.
@ RADIUS_ATTR_PORT_LIMIT
Port-Limit.
@ RADIUS_ATTR_PMIP6_VISITED_LMA_IPV4_ADDR
PMIP6-Visited-LMA-IPv4-Address.
@ RADIUS_PORT_TYPE_ISDN_SYNC
ISDN Sync.
@ RADIUS_PORT_TYPE_VIRTUAL
Virtual.
@ RADIUS_ATTR_MIP6_FEATURE_VECTOR
MIP6-Feature-Vector.
@ RADIUS_ATTR_WLAN_VENUE_NAME
WLAN-Venue-Name.
@ RADIUS_PORT_TYPE_HDLC_CLEAR_CHANNEL
HDLC Clear Channel.
@ RADIUS_ATTR_CALLBACK_ID
Callback-Id.
@ RADIUS_ATTR_PMIP6_VISITED_IPV4_GATEWAY
PMIP6-Visited-IPv4-Gateway.
@ RADIUS_ATTR_NAS_IDENTIFIER
NAS-Identifier.
@ RADIUS_ATTR_LOCATION_CAPABLE
Location-Capable.
@ RADIUS_ATTR_MOBILITY_DOMAIN_ID
Mobility-Domain-Id.
@ RADIUS_ATTR_PMIP6_HOME_LMA_IPV4_ADDR
PMIP6-Home-LMA-IPv4-Address.
@ RADIUS_ATTR_EXTENDED_ATTR_3
Extended-Attribute-3.
@ RADIUS_SERVICE_TYPE_LOGIN
Login.
@ RADIUS_ATTR_EXTENDED_LOCATION_POLICY_RULES
Extended-Location-Policy-Rules.
@ RADIUS_ATTR_ACCT_TUNNEL_PACKETS_LOST
Acct-Tunnel-Packets-Lost.
@ RADIUS_ATTR_EXTENDED_ATTR_6
Extended-Attribute-6.
@ RADIUS_ATTR_SERVICE_SELECTION
Service-Selection.
@ RADIUS_PORT_TYPE_ETHERNET
Ethernet.
@ RADIUS_ATTR_CUI
CUI.
@ RADIUS_ATTR_ACCT_DELAY_TIME
Acct-Delay-Time.
@ RADIUS_ATTR_PMIP6_HOME_INTERFACE_ID
PMIP6-Home-Interface-ID.
@ RADIUS_ATTR_ARAP_SECURITY_DATA
ARAP-Security-Data.
@ RADIUS_ATTR_EAP_MESSAGE
EAP-Message.
@ RADIUS_ATTR_EGRESS_VLAN_NAME
Egress-VLAN-Name.
@ RADIUS_ATTR_FRAMED_MTU
Framed-MTU.
@ RADIUS_ATTR_ARAP_SECURITY
ARAP-Security.
@ RADIUS_SERVICE_TYPE_CALLBACK_ADMINISTRATIVE
Callback Administrative.
@ RADIUS_ATTR_WLAN_PAIRWISE_CIPHER
WLAN-Pairwise-Cipher.
@ RADIUS_ATTR_CALLING_STATION_ID
Calling-Station-Id.
@ RADIUS_SERVICE_TYPE_OUTBOUND
Outbound.
const RadiusAttribute * radiusGetAttribute(const RadiusPacket *packet, uint8_t type, uint_t index)
Search a RADIUS packet for a given attribute.
@ RADIUS_ATTR_PMIP6_VISITED_INTERFACE_ID
PMIP6-Visited-Interface-ID.
@ RADIUS_ATTR_PASSWORD_RETRY
Password-Retry.
@ RADIUS_ATTR_ACCT_INPUT_PACKETS
Acct-Input-Packets.
@ RADIUS_ATTR_LOGIN_SERVICE
Login-Service.
@ RADIUS_ATTR_VENDOR_SPECIFIC
Vendor-Specific.
@ RADIUS_ATTR_ACCT_LINK_COUNT
Acct-Link-Count.
@ RADIUS_ATTR_SESSION_TIMEOUT
Session-Timeout.
@ RADIUS_ATTR_DIGEST_OPAQUE
Digest-Opaque.
@ RADIUS_ATTR_ORIGINATING_LINE_INFO
Originating-Line-Info.
@ RADIUS_ATTR_EXTENDED_ATTR_5
Extended-Attribute-5.
@ RADIUS_ATTR_DIGEST_USERNAME
Digest-Username.
@ RADIUS_ATTR_DIGEST_ALGORITHM
Digest-Algorithm.
@ RADIUS_ATTR_REPLY_MESSAGE
Reply-Message.
@ RADIUS_PORT_TYPE_CABLE
Cable.
@ RADIUS_ATTR_EGRESS_VLANID
Egress-VLANID.
@ RADIUS_ATTR_FRAMED_IPX_NETWORK
Framed-IPX-Network.
@ RADIUS_ATTR_TUNNEL_PASSWORD
Tunnel-Password.
@ RADIUS_ATTR_ACCT_OUTPUT_OCTETS
Acct-Output-Octets.
@ RADIUS_ATTR_DIGEST_DOMAIN
Digest-Domain.
typedef __packed_struct
Attribute.
@ RADIUS_ATTR_DIGEST_NEXTNONCE
Digest-Nextnonce.
@ RADIUS_ATTR_FRAMED_INTERFACE_ID
Framed-Interface-Id.
@ RADIUS_ATTR_TUNNEL_PRIVATE_GROUP_ID
Tunnel-Private-Group-ID.
@ RADIUS_ATTR_INGRESS_FILTERS
Ingress-Filters.
@ RADIUS_ATTR_TUNNEL_CLIENT_ENDPOINT
Tunnel-Client-Endpoint.
@ RADIUS_ATTR_USER_PRIORITY_TABLE
User-Priority-Table.
@ RADIUS_ATTR_EVENT_TIMESTAMP
Event-Timestamp.
@ RADIUS_ATTR_DIGEST_ENTITY_BODY_HASH
Digest-Entity-Body-Hash.
@ RADIUS_ATTR_IPV6_6RD_CONFIGURATION
IPv6-6rd-Configuration.
@ RADIUS_ATTR_NETWORK_ID_NAME
Network-Id-Name.
@ RADIUS_ATTR_ARAP_CHALLENGE_RESPONSE
ARAP-Challenge-Response.
@ RADIUS_ATTR_WLAN_AKM_SUITE
WLAN-AKM-Suite.
@ RADIUS_ATTR_GSS_ACCEPTOR_HOST_NAME
GSS-Acceptor-Host-Name.
@ RADIUS_ATTR_EXTENDED_ATTR_1
Extended-Attribute-1.
@ RADIUS_ATTR_OPERATOR_NAME
Operator-Name.
@ RADIUS_ATTR_FRAMED_POOL
Framed-Pool.
@ RADIUS_ATTR_PKM_SS_CERT
PKM-SS-Cert.
RadiusAttributeType
Attribute types.
@ RADIUS_ATTR_FRAMED_MANAGEMENT_PROTOCOL
Framed-Management-Protocol.
@ RADIUS_ATTR_DELEGATED_IPV6_PREFIX_POOL
Delegated-IPv6-Prefix-Pool.
@ RADIUS_ATTR_MOBILE_NODE_IDENTIFIER
Mobile-Node-Identifier.
RADIUS (Remote Authentication Dial In User Service)
@ RADIUS_ATTR_FRAMED_IP_ADDR
Framed-IP-Address.
@ RADIUS_ATTR_PMIP6_VISITED_DHCP6_SERVER_ADDR
PMIP6-Visited-DHCP6-Server-Address.
@ RADIUS_ATTR_NAS_PORT_TYPE
NAS-Port-Type.
@ RADIUS_ATTR_PKM_CRYPTOSUITE_LIST
PKM-Cryptosuite-List.
@ RADIUS_ATTR_DIGEST_METHOD
Digest-Method.
@ RADIUS_ATTR_ACCT_TUNNEL_CONNECTION
Acct-Tunnel-Connection.
@ RADIUS_ATTR_PMIP6_VISITED_LMA_IPV6_ADDR
PMIP6-Visited-LMA-IPv6-Address.
@ RADIUS_ATTR_TUNNEL_SERVER_AUTH_ID
Tunnel-Server-Auth-ID.
@ RADIUS_ATTR_WLAN_GROUP_CIPHER
WLAN-Group-Cipher.
@ RADIUS_ATTR_LOGIN_LAT_NODE
Login-LAT-Node.
@ RADIUS_ATTR_PMIP6_HOME_IPV4_GATEWAY
PMIP6-Home-IPv4-Gateway.
RadiusServiceType
Service types.
@ RADIUS_ATTR_ARAP_ZONE_ACCESS
ARAP-Zone-Access.
RadiusAttribute
@ RADIUS_ATTR_FRAMED_PROTOCOL
Framed-Protocol.
@ RADIUS_ATTR_WLAN_REASON_CODE
WLAN-Reason-Code.
@ RADIUS_ATTR_USER_NAME
User-Name.
@ RADIUS_ATTR_STATEFUL_IPV6_ADDR_POOL
Stateful-IPv6-Address-Pool.
@ RADIUS_SERVICE_TYPE_AUTHENTICATE_ONLY
Authenticate Only.
@ RADIUS_ATTR_TUNNEL_TYPE
Tunnel-Type.
@ RADIUS_ATTR_ACCT_INTERIM_INTERVAL
Acct-Interim-Interval.
@ RADIUS_PORT_TYPE_PIAFS
PIAFS.
@ RADIUS_ATTR_PMIP6_HOME_IPV4_HOA
PMIP6-Home-IPv4-HoA.
@ RADIUS_ATTR_TUNNEL_SERVER_ENDPOINT
Tunnel-Server-Endpoint.
@ RADIUS_ATTR_LOCATION_DATA
Location-Data.
@ RADIUS_ATTR_WLAN_HESSID
WLAN-HESSID.
uint8_t value[]
@ RADIUS_ATTR_FRAMED_APPLETALK_NETWORK
Framed-AppleTalk-Network.
@ RADIUS_ATTR_BASIC_LOCATION_POLICY_RULES
Basic-Location-Policy-Rules.
@ RADIUS_ATTR_DIGEST_URI
Digest-URI.
@ RADIUS_ATTR_FRAMED_IPV6_ADDR
Framed-IPv6-Address.
@ RADIUS_PORT_TYPE_X75
X.75.
@ RADIUS_ATTR_NAS_IP_ADDR
NAS-IP-Address.
@ RADIUS_ATTR_DIGEST_REALM
Digest-Realm.
@ RADIUS_ATTR_CALLED_STATION_ID
Called-Station-Id.
@ RADIUS_ATTR_DIGEST_AKA_AUTS
Digest-AKA-Auts.
@ RADIUS_ATTR_DIGEST_QOP
Digest-Qop.
@ RADIUS_ATTR_PMIP6_HOME_DHCP6_SERVER_ADDR
PMIP6-Home-DHCP6-Server-Address.
@ RADIUS_ATTR_TERMINATION_ACTION
Termination-Action.
@ RADIUS_ATTR_SERVICE_TYPE
Service-Type.
@ RADIUS_ATTR_ERROR_CAUSE
Error-Cause.
@ RADIUS_ATTR_ROUTE_IPV6_INFORMATION
Route-IPv6-Information.
@ RADIUS_ATTR_FRAMED_IP_NETMASK
Framed-IP-Netmask.
RadiusPortType
Service types.
@ RADIUS_ATTR_PROXY_STATE
Proxy-State.
@ RADIUS_ATTR_WLAN_VENUE_INFO
WLAN-Venue-Info.
@ RADIUS_PORT_TYPE_IDSL
IDSL.
@ RADIUS_ATTR_MANAGEMENT_TRANSPORT_PROTECTION
Management-Transport-Protection.
@ RADIUS_ATTR_EAP_SERVER_ID
EAP-Server-Id.
@ RADIUS_ATTR_MANAGEMENT_POLICY_ID
Management-Policy-Id.
@ RADIUS_PORT_TYPE_XDSL
xDSL
@ RADIUS_ATTR_FRAMED_ROUTING
Framed-Routing.
@ RADIUS_ATTR_ACCT_OUTPUT_PACKETS
Acct-Output-Packets.
@ RADIUS_ATTR_MIP6_HOME_LINK_PREFIX
MIP6-Home-Link-Prefix.
@ RADIUS_ATTR_PMIP6_VISITED_DHCP4_SERVER_ADDR
PMIP6-Visited-DHCP4-Server-Address.
@ RADIUS_ATTR_NAS_PORT_ID
NAS-Port-Id.
@ RADIUS_ATTR_NAS_FILTER_RULE
NAS-Filter-Rule.
@ RADIUS_ATTR_DIGEST_STALE
Digest-Stale.
@ RADIUS_ATTR_PROMPT
Prompt.
@ RADIUS_ATTR_GSS_ACCEPTOR_REALM_NAME
GSS-Acceptor-Realm-Name.
@ RADIUS_ATTR_SIP_AOR
SIP-AOR.
@ RADIUS_ATTR_TUNNEL_PREFERENCE
Tunnel-Preference.
@ RADIUS_ATTR_WLAN_GROUP_MGMT_CIPHER
WLAN-Group-Mgmt-Cipher.
@ RADIUS_ATTR_ACCT_INPUT_OCTETS
Acct-Input-Octets.
@ RADIUS_ATTR_TUNNEL_MEDIUM_TYPE
Tunnel-Medium-Type.
@ RADIUS_ATTR_DIGEST_RESPONSE
Digest-Response.
@ RADIUS_ATTR_DIGEST_HA1
Digest-HA1.
@ RADIUS_ATTR_ACCT_SESSION_TIME
Acct-Session-Time.
unsigned int uint_t
Definition: compiler_port.h:50
@ RADIUS_ATTR_IDLE_TIMEOUT
Idle-Timeout.
@ RADIUS_ATTR_PMIP6_HOME_HN_PREFIX
PMIP6-Home-HN-Prefix.
@ RADIUS_ATTR_CALLBACK_NUMBER
Callback-Number.
@ RADIUS_ATTR_CLASS
Class.
@ RADIUS_PORT_TYPE_ADSL_CAP
ADSL-CAP.
@ RADIUS_ATTR_WLAN_VENUE_LANGUAGE
WLAN-Venue-Language.
@ RADIUS_ATTR_PKM_CA_CERT
PKM-CA-Cert.
@ RADIUS_ATTR_WLAN_RF_BAND
WLAN-RF-Band.
@ RADIUS_PORT_TYPE_WIRELESS_OTHER
Wireless - Other.
@ RADIUS_PORT_TYPE_G3_FAX
G.3 Fax.
@ RADIUS_ATTR_TUNNEL_CLIENT_AUTH_ID
Tunnel-Client-Auth-ID.
@ RADIUS_ATTR_DIGEST_CNONCE
Digest-CNonce.
@ RADIUS_ATTR_LOCATION_INFORMATION
Location-Information.
@ RADIUS_ATTR_DIGEST_NONCE
Digest-Nonce.
@ RADIUS_ATTR_PKM_CONFIG_SETTINGS
PKM-Config-Settings.
@ RADIUS_PORT_TYPE_SDSL
SDSL.
@ RADIUS_ATTR_EAP_KEY_NAME
EAP-Key-Name.
@ RADIUS_ATTR_ACCT_INPUT_GIGAWORDS
Acct-Input-Gigawords.
@ RADIUS_ATTR_GSS_ACCEPTOR_SERVICE_NAME
GSS-Acceptor-Service-Name.
@ RADIUS_ATTR_EAPOL_ANNOUNCEMENT
EAPoL-Announcement.
@ RADIUS_ATTR_EXTENDED_ATTR_2
Extended-Attribute-2.
@ RADIUS_ATTR_EAP_PEER_ID
EAP-Peer-Id.
@ RADIUS_ATTR_ACCT_TERMINATE_CAUSE
Acct-Terminate-Cause.
@ RADIUS_ATTR_PREAUTH_TIMEOUT
Preauth-Timeout.