WU_FTPd LOG FORMAT DLL ====================== (For use with Serv-U32.exe v2.2a and later only!) This DLL provides logging in WU_FTPd log file format. The file format of this is as follows (from the UNIX docs): current-time transfer-time remote-host file-size filename transfer-type special-action-flag direction access-mode username service-name authentication-method authenticated-user-id current-time is the current local time in the form "DDD MMM dd hh:mm:ss YYYY". Where DDD is the day of the week, MMM is the month, dd is the day of the month, hh is the hour, mm is the minutes, ss is the seconds, and YYYY is the year. transfer-time is the total time in seconds for the transfer. remote-host is the remote host name. file-size is the size of the transfered file in bytes. filename is the name of the transfered file. transfer-type is a single character indicating the type of transfer. Can be one of: a for an ascii transfer b for a binary transfer special-action-flag is one or more single character flags indicating any special action taken. Can be one or more of: C file was compressed U file was uncompressed T file was tar'ed _ no action was taken access-mode is the method by which the user is logged in. Can be one of: a (anonymous) is for an anonymous guest user. g (guest) is for an passworded guest user (see the guestgroup command in ftpac- cess(5) ). r (real) is for a local authenticated user. username is the local username, or if guest, the ID string given. service-name is the name of the service being invoked, usually FTP. authentication-method is the method of authentication used. Can be one of: 0 none 1 RFC931 Authentication authenticated-user-id is the user id returned by the authen- tication method. A * is used if an authenticated user id is not avail- able. For Serv-U there are a few peculiarities: The "remote-host" will be either the IP number or IP name if the latter is available. Serv-U only does IP name lookups if this is switched on in the logging menu. The "transfer-type" is always set to 'b' since this information is not passed on to the event notification mechanism and thus not available. The "special-action-flag" is always '_', and the "access_mode" is either 'a' or 'r'. For the flag of "authentication-method" the value '0' is always used and thus "authenticated-user-id" is always '*'. Further peculiarities to keep in mind are that the Windows' file system uses backslashes rather than (UNIX's) forward slashes. Also, Windows' paths may contain spaces. If this will turn out to be a problem with existing log file parsing programs I'll add more code to change slashes and spaces, let me know. The setup info needed by this DLL should be put in a file named WULOG.INI. the file should have the following form (example): [LOG] FileName=c:\serv-u\wulog.txt The file WULOG.DLL should be placed in the Serv-U directory, and the SERV-U.INI file should be updated to make it load the DLL upon startup. This is done by adding a section to the .ini file reading (if it doesn't exist already): [EXTERNAL] EventHookDLL1=WULOG.DLL If other event hooking DLL's are already present in this section a new line like the above one should be added with the proper sequential number. The files are: WULOG.DLL - 32-bit WU_FTP log file format DLL WULOG.INI - sample .ini file for log file DLL README.TXT - this file SOURCE CODE =========== The full source code of the DLL is provided as an example of an event hooking DLL for Serv-U. It can be found in the file SOURCE.ZIP and was made for Borland C++ v5.01a (But no Borland specific extensions were used, so it should be easily portable to other platforms). The code is a mix between C++ and C. This was mostly for convenience of reusing existing utility code, and while not a pretty picture it works. The core code that deals with catching events is regular C, so it should be possible to use this for similar (event) DLL's in C only. The files are: WULOG.CPP - WU_FTP log file format DLL source code WULOG.H - header file for log DLL WULOG.DEF - module definition file for DLL WULOG.IDE - borland project file for DLL LIST.H - linked list C++ class library, used in filter DLL NOTE ==== As is usual with shareware, and Serv-U in particular: No warranty or support is provided with this DLL or the source code. Use is *completely* at your own risk.