1 #ifndef __BFTPD_BFTPDUTMP_H 2 #define __BFTPD_BFTPDUTMP_H 3 4 #include "commands.h" 5 #include <sys/types.h> 6 7 extern FILE *bftpdutmp; 8 9 struct bftpdutmp { 10 char bu_type; 11 pid_t bu_pid; 12 char bu_name[USERLEN + 1]; 13 char bu_host[256]; 14 time_t bu_time; 15 }; 16 17 void bftpdutmp_init(); 18 void bftpdutmp_end(); 19 void bftpdutmp_log(char type); 20 char bftpdutmp_pidexists(pid_t pid); 21 int bftpdutmp_usercount(char *username); 22 23 /* Count logins from the same machine. */ 24 int bftpdutmp_dup_ip_count(char *ip_address); 25 26 /* Remove a log entry of a client 27 matching the PID passed. This 28 makes it look like the client logged 29 out. 30 -- Jesse 31 */ 32 void bftpdutmp_remove_pid(int pid); 33 34 #endif 35 36