The libdir contains modules with the following prefixes. libfreeradius proto and rlm. I suppose rlm is the standard naming scheme for modules, since the command
ls -l rlm_*
is used in Dirk van der Walt's Freeradius Beginner's guide. What is the meaning of libfreeradius and proto?
libfreeradius_x
are utility libraries implementing internal APIs common to both rlm_
and proto_
modules, or which get used directly by the server core. There are lots of them:
bio
is an I/O framework we're migrating input and output modules to.
curl
are wrappers around libcurl to allow easy integration into our asyn I/O event loop.
eap
are common functions used in EAP authentication.
eap_aka_sim
are common functions used in EAP-SIM, EAP-AKA, and EAP-AKA'
io
is the old I/O framework (some of which will be retained). It has code for allowing inter-thread communication.
json
are wrappers are json-c.
kafka
are wrappers around Kafka functions. It's mainly there to allow easy config parsing.
ldap
async io code for LDAP and utility functions wrapping libldap.
redis
async io code for Redis, and cluster management.
server
core server APIs for manipulating tuples, managing connections, config parsing, and many other things.
tls
wrappers around OpenSSL to allow async certificate validation, set up TLS sessions and configurations in a standard way, etc...
sim
SIM card-specific algorithms like comp128 and milenage.
unlang
the policy language that runs in virtual server sections.
util
similar to server, but a lower-level API that is used by both the server and utilities like radclient.
You may also see libraries like libfreeradius-radius
which are functions that implement RADIUS encoding/decoding. There's one of these protocol libraries for each frontend the server implements.
proto_
these are frontend modules (see src/listen). They implement the state machine necessary to run the network side of a protocol. i.e. receive packets from a socket, and send them over to a worker thread for processing. Then send responses from worker threads back out onto the network.
process_
these are internal state machines (see src/process). They implement state machines used by the virtual servers. These state machines control which processing sections in a virtual server (recv foo {}
, authenticate bar {}
), they also do some behind the scenes manpulation of the request, copying IDs from requests to responses (for example).
rlm_
these are backend modules that communicate with a database, an API, or does some kind of lookup or manipulation of the request (see src/modules). rlm_radius
for example, sends outbound radius packets and has take the place the of the baked in proxying behaviour in earlier versions of FreeRADIUS.