Phil Mayers wrote:
I don't know the background, sorry. It's only recently I've looked at the server code code (as opposed to digging into the source for rlm_whatever, which I do a lot to find out how the things actually behave in edge cases). Alan can probably comment.
The stuff in src/lib/ is intended to be used by RADIUS clients and servers. The code in src/main is only for the server. That includes things like callbacks, module registration, etc.
I do know that some of the seemingly duplicate API points do subtly different things. It's probable they could be rationalised, although the resulting API calls might end up with "flags" arguments to control the behaviour, which might be worse, not better. You can argue that putting the behaviour in the function name is a lot more obvious than in a "flags" bitmask.
It's more than that. Clients need basic simple APIs. Servers need complex APIs. Merging the two is hard.
What do we think about the various API doc tool e.g. Doxygen? It might make navigating the source easier for people unfamiliar with it.
That would be wonderful. Alan DeKok.