Behaviours: gen_server.
This module defines the eradius_server behaviour.
Required callback functions: radius_request/3.
This module implements a generic RADIUS server. A handler callback module is used to process requests. The handler module is selected based on the NAS that sent the request. Requests from unknown NASs are discarded.
It is also possible to run request handlers on remote nodes. If configured, the server process will balance load among connected nodes. Please see the Overview page for a detailed description of the server configuration.
There is only one callback at the moment.
This function is called for every RADIUS request that is received by the server. Its first argument is a request record which contains the request type and AVPs. The second argument is a NAS descriptor. The third argument is an opaque term from the server configuration.
Both records are defined in 'eradius_lib.hrl', but their definition is reproduced here for easy reference.
-record(radius_request, { reqid :: byte(), cmd :: 'request' | 'accept' | 'challenge' | 'reject' | 'accreq' | 'accresp' | 'coareq' | 'coaack' | 'coanak' | 'discreq' | 'discack' | 'discnak'm attrs :: eradius_lib:attribute_list(), secret :: eradius_lib:secret(), authenticator :: eradius_lib:authenticator(), msg_hmac :: boolean(), eap_msg :: binary() }). -record(nas_prop, { server_ip :: inet:ip_address(), server_port :: eradius_server:port_number(), nas_ip :: inet:ip_address(), nas_port :: eradius_server:port_number(), nas_id :: term(), metrics_info :: {atom_address(), atom_address()}, secret :: eradius_lib:secret(), trace :: boolean(), handler_nodes :: 'local' | list(atom()) }).
port_number() = 1..65535
req_id() = byte()
behaviour_info/1 | |
stats/2 |
behaviour_info(X1::callbacks) -> [{module(), non_neg_integer()}]
stats(Server, Function) -> any()
Generated by EDoc, Dec 12 2017, 15:41:17.