4 * (c) 2007 Martin Mares <mj@ucw.cz>
10 #include "lib/clists.h"
11 #include "lib/ipaccess.h"
12 #include "lib/fastbuf.h"
14 #include <gnutls/gnutls.h>
15 #include <gnutls/x509.h>
19 struct ip_addrmask addrmask;
26 // Set up by the master process
29 byte *ip_string; // (xmalloced)
32 struct access_rule *rule; // Rule matched by this connection
33 int sk; // Client socket
34 byte *cert_name; // Client name from the certificate (NULL if no TLS) (xmalloced)
36 // Used by the child process
37 gnutls_session_t tls; // TLS session
38 struct fastbuf rx_fb, tx_fb; // Fastbufs for communication with the client (either plain-text or TLS)
42 struct odes *task_status;
47 extern uns max_request_size, max_attachment_size, trace_commands;
51 void NONRET client_error(char *msg, ...);
55 int process_init(struct conn *c);
56 int process_command(struct conn *c);
65 extern clist task_list;
66 extern struct cf_section tasks_conf;
68 struct task *task_find(byte *name);
69 int user_exists_p(byte *user);
70 void task_lock_status(struct conn *c);
71 void task_unlock_status(struct conn *c, uns write_back);
72 void task_submit(struct conn *c, struct task *t, struct fastbuf *fb, byte *filename);
73 struct odes *task_status_find_task(struct conn *c, struct task *t);