X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ftpd.h;h=3d11bea8841e6554fdf66004c81ec5356fda1341;hb=HEAD;hp=3110b10dd853f6fa2cb245a616246534ac2ca240;hpb=054119ac0d47dfaff9d5f8a0ce397e674d205aaf;p=betaftpd diff --git a/ftpd.h b/ftpd.h index 3110b10..3d11bea 100644 --- a/ftpd.h +++ b/ftpd.h @@ -2,7 +2,7 @@ Copyright (C) 1999-2000 Steinar H. Gunderson This program is is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License, version 2 if the + it under the terms of the GNU General Public License, version 2 of the License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, @@ -19,9 +19,7 @@ #define _FTPD_H 1 /* - * This is the port you want BetaFTPD to listen on. The standard - * FTP port is 21 -- if you really want to use BetaFTPD as your - * primary FTP server, change FTP_PORT. + * This is the port you want BetaFTPD to listen on. */ #if WANT_NONROOT #define FTP_PORT 12121 @@ -78,6 +76,8 @@ #undef WANT_DCACHE #endif +extern char message_buf[]; + struct list_options { int recursive; int long_listing; @@ -117,6 +117,8 @@ struct conn { char username[17]; uid_t uid; + gid_t gid; + char root_dir[256]; char curr_dir[256]; @@ -128,6 +130,7 @@ struct conn { #endif time_t last_transfer; + int free_me; }; /* doubly linked list of file transfers */ @@ -184,6 +187,8 @@ void del_fd(const int fd); void destroy_conn(struct conn * const c); void destroy_ftran(struct ftran * const f); +void finish_transfer(struct ftran * const f); + #if HAVE_POLL int process_all_clients(const int num_ac); int process_all_sendfiles(const int num_ac); @@ -204,6 +209,7 @@ void time_out_sockets(); void remove_bytes(struct conn * const c, const int i); void numeric(struct conn * const c, const int numeric, const char * const format, ...); +void flush_numeric(struct conn * const c); void init_file_transfer(struct ftran * const f); int create_server_socket(); @@ -211,6 +217,10 @@ int create_server_socket(); void clear_bad_fds(int * const server_sock); #endif +#if HAVE_BSD_SENDFILE || HAVE_LINUX_SENDFILE +int mysendfile(int sock, int fd, off_t *offset, size_t count); +#endif + #if WANT_MESSAGE void dump_file(struct conn * const c, const int num, const char * const filename); void list_readmes(struct conn * const c);