X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=send.h;h=8ec5e7baf3386d420b3cb97fdba173c5bfc74fb1;hb=bc8187d6a4ca3191b3c54226ba54e4f0c4cf4e6e;hp=69ebd377e0ea27c46932a1a1e5456349e9787360;hpb=7d30b7e68ff5219312622d6b5c3c2b8e8866585d;p=paraslash.git diff --git a/send.h b/send.h index 69ebd377..8ec5e7ba 100644 --- a/send.h +++ b/send.h @@ -104,7 +104,32 @@ struct sender_client { void *private_data; }; -int open_sender(unsigned l4type, int port); -void shutdown_client(struct sender_client *sc); -void send_chunk(struct sender_client *sc, size_t max_bytes_per_write, - long unsigned current_chunk, const char *buf, size_t len); +struct sender_status { + int listen_fd; + int port; + int num_clients; + int max_clients; + int default_deny; + /** The list of connected clients. */ + struct list_head client_list; + /** The whitelist/blacklist. */ + struct list_head acl; +}; + +void shutdown_client(struct sender_client *sc, struct sender_status *ss); +void shutdown_clients(struct sender_status *ss); +void send_chunk(struct sender_client *sc, struct sender_status *ss, + size_t max_bytes_per_write, long unsigned current_chunk, + const char *buf, size_t len); +void init_sender_status(struct sender_status *ss, char **access_arg, int num_access_args, + int port, int max_clients, int default_deny); +char *get_sender_info(struct sender_status *ss, char *name); + +void generic_com_allow(struct sender_command_data *scd, + struct sender_status *ss); +void generic_com_deny(struct sender_command_data *scd, + struct sender_status *ss); +int generic_com_on(struct sender_status *ss, unsigned protocol); +void generic_com_off(struct sender_status *ss); +char *generic_sender_help(void); +struct sender_client *accept_sender_client(struct sender_status *ss);