The idea of plugins is to provide a way for people to customize the behaviour of pppd without having to either apply local patches to each version or get their patches accepted into the standard distribution.
A plugin is a standard shared library object, typically with a name ending in .so. They are loaded using the standard dlopen() library
call, so plugins are only supported on systems which support shared libraries and the dlopen call. At present pppd is compiled with
plugin support only under Linux and Solaris.
Using gcc under Linux, a plugin called `xyz' could be compiled and linked with the following commands:
gcc -c -O xyz.c
gcc -shared -o xyz.so xyz.o
Plugins can access global variables within pppd, so it is useful for them to #include "pppd.h" from the pppd source directory.
Plugins can affect the behaviour of pppd in at least three ways:
1. They can add extra options which pppd will then recognize. This is done by calling the add_options() procedure with a pointer to an array of option_t structures. The last entry in the array must have its name field set to NULL.
2. Pppd contains `hook' variables which are