There are three main types of handler functions for ProFTPD: configuration directive handlers, command handlers, and authentication handlers.
Configuration handlers are used to process the configuration directives encountered in the main
configuration file, any
Included configuration files, and any
.ftpaccess files encountered. The context in which these
functions operate is one without connected clients; much of the
"processing" entails syntax and availability checks of directive
arguments, and the setting of configuration records.
The command handlers are responsible for the processing of the client-sent FTP commands; these are the heart of the server, providing the services requested by the connecting user.
The last type, authentication handlers, are not really handlers so much as they are replacement functions, to be used by ProFTPD for the purposes of authentication in place of the system or library provided functions. These types of functions are not as frequently used as the other two types of functions. For the curious reader, however, the sources for
illustrate how these functions are implemented; note that the tracing of the
calling of these functions in the course of a live connection can be tricky.
While not quite true handlers, per se, the response functions are also important piece of module handler development. These functions deal with how ProFTPD sends its responses back to the connecting clients.
There are also several pre-defined macros to help in the checking of various handler argument conditions, such as argument number and syntax. These macros are described here.