]> mj.ucw.cz Git - subauth.git/blob - server/subauthd.h
Split to directories
[subauth.git] / server / subauthd.h
1 /*
2  *      Sub-authentication Daemon
3  *
4  *      (c) 2017 Martin Mares <mj@ucw.cz>
5  */
6
7 #include "autoconf.h"
8
9 #include <ucw/mainloop.h>
10 #include <ucw-json/json.h>
11
12 #define SOCKET_TIMEOUT 60000            // in ms
13 #define MAX_PACKET_SIZE 16384
14 #define MAX_OOB_DATA_SIZE 4096
15
16 struct client {
17   struct main_file socket;
18   struct main_timer timer;
19   int uid;
20   struct json_context *json;
21   struct json_node *request;
22   struct json_node *reply;
23 };
24
25 /* cmd.c */
26
27 void cmd_error(struct client *c, const char *err);