Extended Packet Types

RADIUSServer side:

The original RADIUS protocol only defined a few types of packet, Access-Request, Access-Reject, Access-Challenge, Accounting-Request, and Accounting Response.  Since then many more have been added.

The server, by default, only permits the basic packet types to be received and proxyied.  You may add to this list or remove the default value at any time during the RADIUS server's operation.

For example, if you need to add the request Disconnect-Request, and the responses Disconnect-Ack and Disconnect-Nak use this:

RADIUSServer rs = new RADIUSServer;
...
rs.addAcctPacketType(PacketType.Disconnect_Request, PacketType.Request);
rs.addAcctPacketType(PacketType.Disconnect_Ack, PacketType.Response);
rs.addAcctPacketType(PacketType.Disconnect_Nak, PacketType.Response);

Notice that the packet type and the 'direction' must be specified correctly. The implementation that will handle these requests is the ExtendedPacketImpl class.  All extended packet type requests will be handled by this class.

If, for example, you wanted to add a packet type like Accounting-Message  to the accounting implementation instead of the ExtendedPacketImpl you can use the divertExtendedPacket() method like this:

rs.addAcctPacketType(PacketType.Accounting_Message, PacketType.Request);
rs.divertExtendedPacket(PacketType.Accounting_Message);

// Also add the Password request to the Authentication port
// and divert it to the AccessImpl handler.
rs.addAuthPacketType(PacketType.Password_Request, PacketType.Request);
rs.divertExtendedPacket(PacketType.Password_Request);

Diverting the basic types like Accounting-Requests or Access-Requests has no effect as they're already handled by AccountingImpl and AccessImpl already.

Interface:

Normally extended packet types are handled by the ExtendedPacketImpl class.  There are only two methods to implement: logs() and packet();  The packet() receives the ExtendedInfo class which

 

Common Methods

getRequestAttributeList()

Get the request attributes.

getSourceAddress()

Get the origin address of this packet.

getRequestType()

Get the request packet type.

setResponseType()

Set the response packet type.

 

ExtendedPacketInfo specific methods

There are no particular methods currently available.