-/** Clients will be kicked if there are more than that many bytes pending. */
-#define MAX_BACKLOG 40000
-/** The list of connected clients. */
-static struct list_head clients;
-/** The whitelist/blacklist. */
-static struct list_head access_perm_list;
-
-/** Describes one client that connected the tcp port of the http sender. */
-struct http_client {
- /** The file descriptor of the client. */
- int fd;
- /** Address information about the client. */
- struct sockaddr_in addr;
- /** The client's current status. */
- enum http_status status;
- /** Non-zero if we included \a fd in the read set.*/
- int check_r;
- /** Non-zero if we included \a fd in the write set. */
- int check_w;
- /** The position of this client in the client list. */
- struct list_head node;
- /** The list of pending chunks for this client. */
- struct list_head chunk_queue;
- /** The number of pending bytes for this client. */
- unsigned long cq_bytes;
-};
-
-/**
- * Describes one queued chunk of the chunk queue.
- *
- * The send function of the http sender checks each client fd for writing. If a
- * client fd is not ready, it tries to queue that chunk for this client until
- * the number of queued bytes exceeds \p MAX_BACKLOG.
- */
-struct queued_chunk {
- /** The number of the queued chunk, -1U means header. */
- unsigned chunk_num;
- /** The number of bytes already sent. */
- unsigned sent;
- /** Position of the chunk in the chunk queue. */
- struct list_head node;
-};
-
-/**
- * Describes one entry in the blacklist/whitelist of the http sender.
- */
-struct access_info {
- /** The address to be black/whitelisted. */
- struct in_addr addr;
- /** The netmask for this entry. */
- unsigned netmask;
- /** The position of this entry in the access_perm_list. */
- struct list_head node;