Adding UDP/TCP/Unix socket support to rlm_linelog
a.cudbardb at freeradius.org
Fri Mar 20 19:31:13 CET 2015
I've added UDP/TCP/Unix socket support to rlm_linelog in v3.1.x
It's currently write only. It discards all responses.
This support is intended to be used with things like carbon collector (graphite) and collectd,
and is the result of the discussion on adding a rlm_graphite.
The data written can be taken directly from octets type attributes, using an attribute ref as the format
I'd appreciate comments and feedback on the socket code. It was written the code editor open
in one window, and pubs.opengroup.org in the other, but that doesn't mean it will actually
work the way it was intended across multiple platforms.
Doing write(fd, NULL, 0); to check for socket connectedness seems like it's going to blow up somewhere
at some point, so suggestions for what to do to get pending errors would be very helpful.
I've merged a lot of the socket code back into v3.0.x, as the changes for TCP sockets were very minor,
and it'll allow us to implement timeouts easily for RADIUS+TCP/RADSEC/Radmin connections.
The main commits are:
I plan to fixup the config parsing a bit. Seems stupid to have to define the destination when it could
be inferred from the config sections that are present, but that can't be done currently because of
issues in the conf parser.
There also needs to be a connect_timeout distinct from the write timeout. But that should probably
be added to the connection pool section, as virtually every module that uses the connection pool supports
connection timeouts, and putting in the pool section helps with consistency, even if the actual timeout
is done by the library.
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the Freeradius-Devel