RADIUS-C Messages

Introduction

Any application may use RADIUS-C-… messages to the RadiusApp to request that an outbound RADIUS request be made to an external RADIUS server via the RadiusApp.

The following LuaApp agents from the core n2svcd module use RadiusApp.

The internal RADIUS-C-… messages are:

Note that this page uses the term “on-the-wire” to refer to the sending or receiving of RADIUS content by the RadiusApp. This term is also inclusive of the case where the message is sent by local loopback and does not physically transit a Network Interface Controller (NIC).

RADIUS-C-REQUEST

The RADIUS-C-REQUEST message is sent to RadiusApp by any application that wishes to perform an outbound RADIUS request.

Refer to the RadiusApp Configuration documentation for more information on setting default parameters.

The attributes of the RADIUS-C-REQUEST message are:

Field Type Description
radius Object [Required] Container for the parameters of the RADIUS request that we are to send.
.name String The name of the RADIUS packet type, e.g. Access-Request.
This must be the name of a supported packet type within N2::RADIUS::Codec.
If the packet type is not supported, you may instead specify .code.
.code Integer The identifier for the RADIUS packet type, e.g. 1 for Access-Request.
.attributes Array of Object Array of RADIUS attribute objects, each with the following fields.
[].name String The name of a RADIUS attribute, e.g. User-Name.
This must be the name of a supported attribute within N2::RADIUS::Codec.
If the attribute is not supported, you may instead specify [].type and [].data_type.
[].type Integer The type identifer of the RADIUS attribute, if not specifying by [].name.
[].vendor_id Integer The identifier of the vendor that defines the attribute if the attribute is a vendor-specific attribute.
This field is optional and can be used to disambiguate attribute definitions when [].name and/or [].type are not unique.
[].data_type String One of enum, ifid, integer, ipv4addr, ipv4prefix, ipv6addr, ipv6prefix, string, other, text, time.
This field is used only when the attribute is not supported in N2::RADIUS::Codec. For supported attributes the data type is pre-defined.
[].value Various The value for this attribute.
For most attributes this will be a SCALAR of the appropriate type.
For attributes with data type other this may be a table.
[].value_name String This field can be used to specify the value by constant name for attributes with [].data type value enum that have their value mapping defined in N2::RADIUS::Codec.
.ack_sent 0/1 Flag to indicate if a `RADIUS-C-SENT` message is sent to the requesting application once the original `RADIUS-C-REQUEST` is placed on-the-wire. (Default = 0)

RADIUS-C-SENT

The RADIUS-C-SENT message is sent by RadiusApp to the requesting application when the original RADIUS-C-REQUEST is placed on-the-wire.

The attributes of the RADIUS-C-SENT message are:

Field Type Description
bytes Object [Required] The raw on-the-wire RADIUS request bytes.
radius Object [Required] The attributes of the RADIUS message as encoded.

RADIUS-C-RESPONSE

The RADIUS-C-RESPONSE message is sent by RadiusApp to the requesting application when a RADIUS Response is received to the original RADIUS-C-REQUEST, or if a failure occurs which indicates that no RADIUS Response will be received.

The attributes of the RADIUS-C-RESPONSE message are:

Field Type Description
success 0/1 [Required] Indicates if the request was successful or not.
error String Indicates the reason why the request failed.
Present and applicable only if success == 0.
bytes Object The raw on-the-wire RADIUS response bytes.
Present only if success == 1.
radius Object [Required] Container for the RADIUS response parameters received.
Present only if success == 1.
.name String The name of the RADIUS packet type, e.g. Access-Accept.
This field will only be populated if the packet type is supported within N2::RADIUS::Codec.
.code Integer [Required] The packet type identifier from the received response.
.attributes Array of Object Array of RADIUS attribute objects, each with the fields described as for RADIUS-C-REQUEST.

Note that the decoded .attributes array will contain all fields, i.e. the [].name, [].type, [].data_type etc. will all be present.

The only exception will be when decoding attributes which are not part of the core fields defined within N2::RADIUS::Codec. In these cases, the [].name, [].vendor_id, and [].value_name fields will not be present, the [].data_type field value will be unknown, and the [].value will be the raw undecoded attribute value bytes without any interpretation.