View Single Post
Old 10-13-2005, 03:47 PM  
neoxed
Too much time...
 
Join Date: May 2003
Posts: 1,326
Default

You have to resolve those functions yourself during module initialisation, using the GetProc function. There are four types of modules and each module has its own specific module structure and initialisation/deinitialisation functions. You have to export the appropriate initialisation functions (UserModuleInit, GroupModuleInit, EventInit, or MessageVariableInit), as well was as the appropriate deinitialisation function. ioFTPD will call the module initialisation function and will pass one of the following data structures:

USER_MODULE for user modules, store user files elsewhere (e.g. a SQL database backend).
GROUP_MODULE for group modules, store group files elsewhere (e.g. a SQL database backend).
EVENT_MODULE for event modules, triggered on events defined in ioFTPD.ini.
VARIABLE_MODULE for variable modules, add custom variables to message files.

Use the GetProc function (pointed to by the GetProc module structure member) to resolve the functions listed in ioFTPD’s headers. None of the functions in the ioFTPD’s headers are documented, although most are fairly self-explanatory. For more information see the following threads:

http://www.inicom.net/forum/showthread.php?t=11952
http://www.inicom.net/forum/showthread.php?t=11567
http://www.inicom.net/forum/showthread.php?t=11422

You should have a good understanding of C before writing an ioFTPD module; otherwise, you will probably be overwhelmed. Not that writing the module is complex, but it requires a fair bit of hacking (i.e. trial and error) and skill sets that beginners lack.
neoxed is offline