Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / include / client.h
1 /*
2  * IRC - Internet Relay Chat, include/client.h
3  * Copyright (C) 1990 Jarkko Oikarinen and
4  *                    University of Oulu, Computing Center
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  *
21  * $Id$
22  */
23 #ifndef INCLUDED_client_h
24 #define INCLUDED_client_h
25 #ifndef INCLUDED_ircd_defs_h
26 #include "ircd_defs.h"
27 #endif
28 #ifndef INCLUDED_config_h
29 #include "config.h"
30 #endif
31 #ifndef INCLUDED_dbuf_h
32 #include "dbuf.h"
33 #endif
34 #ifndef INCLUDED_msgq_h
35 #include "msgq.h"
36 #endif
37 #ifndef INCLUDED_ircd_handler_h
38 #include "ircd_handler.h"
39 #endif
40 #ifndef INCLUDED_sys_types_h
41 #include <sys/types.h>          /* time_t, size_t */
42 #define INCLUDED_sys_types_h
43 #endif
44 #ifndef INCLUDED_netinet_in_h
45 #include <netinet/in.h>         /* in_addr */
46 #define INCLUDED_netinet_in_h
47 #endif
48
49 struct ConfItem;
50 struct Listener;
51 struct ListingArgs;
52 struct SLink;
53 struct Server;
54 struct User;
55 struct Whowas;
56 struct DNSReply;
57 struct hostent;
58
59 /*
60  * Structures
61  *
62  * Only put structures here that are being used in a very large number of
63  * source files. Other structures go in the header file of there corresponding
64  * source file, or in the source file itself (when only used in that file).
65  */
66
67 struct Connection {
68   /*
69    *  The following fields are allocated only for local clients
70    *  (directly connected to *this* server with a socket.
71    *  The first of them *MUST* be the "count"--it is the field
72    *  to which the allocation is tied to! *Never* refer to
73    *  these fields, if (from != self).
74    */
75   struct Connection*  con_next;  /* Next connection with queued data */
76   struct Connection** con_prev_p; /* What points to us */
77   struct Client*      con_client; /* Client associated with connection */
78   unsigned int        con_count; /* Amount of data in buffer */
79   int                 con_fd;    /* >= 0, for local clients */
80   int                 con_error; /* last socket level error for client */
81   unsigned int        con_snomask; /* mask for server messages */
82   time_t              con_nextnick; /* Next time a nick change is allowed */
83   time_t              con_nexttarget;/* Next time a target change is allowed */
84   unsigned int        con_cookie; /* Random number the user must PONG */
85   struct MsgQ         con_sendQ; /* Outgoing message queue--if socket full */
86   struct DBuf         con_recvQ; /* Hold for data incoming yet to be parsed */
87   unsigned int        con_sendM; /* Statistics: protocol messages send */
88   unsigned int        con_sendK; /* Statistics: total k-bytes send */
89   unsigned int        con_receiveM;/* Statistics: protocol messages received */
90   unsigned int        con_receiveK; /* Statistics: total k-bytes received */
91   unsigned short      con_sendB; /* counters to count upto 1-k lots of bytes */
92   unsigned short      con_receiveB; /* sent and received. */
93   struct Listener*    con_listener; /* listening client which we accepted
94                                        from */
95   struct SLink*       con_confs; /* Configuration record associated */
96   HandlerType         con_handler; /* message index into command table
97                                       for parsing */
98   struct DNSReply*    con_dns_reply; /* DNS reply used during client
99                                         registration */
100   struct ListingArgs* con_listing;
101   unsigned int        con_max_sendq; /* cached max send queue for client */
102   unsigned int        con_ping_freq; /* cached ping freq from client conf
103                                         class */
104   unsigned short      con_lastsq; /* # 2k blocks when sendqueued called last */
105   unsigned short      con_port;  /* and the remote port# too :-) */
106   unsigned char       con_targets[MAXTARGETS]; /* Hash values of current
107                                                   targets */
108   char con_sock_ip[SOCKIPLEN + 1]; /* this is the ip address as a string */
109   char con_sockhost[HOSTLEN + 1]; /* This is the host name from the socket and
110                                     after which the connection was accepted. */
111   char con_passwd[PASSWDLEN + 1];
112   char con_buffer[BUFSIZE];     /* Incoming message buffer; or the error that
113                                    caused this clients socket to be `dead' */
114 };
115
116 struct Client {
117   struct Client* cli_next;      /* link in GlobalClientList */
118   struct Client* cli_prev;      /* link in GlobalClientList */
119   struct Client* cli_hnext;     /* link in hash table bucket or this */
120   struct Connection* cli_connect; /* Connection structure associated with us */
121   struct User*   cli_user;      /* ...defined, if this is a User */
122   struct Server* cli_serv;      /* ...defined, if this is a server */
123   struct Whowas* cli_whowas;    /* Pointer to ww struct to be freed on quit */
124   char           cli_yxx[4];    /* Numeric Nick: YMM if this is a server,
125                                    XX0 if this is a user */
126   /*
127    * XXX - move these to local part for next release
128    * (lasttime, since)
129    */
130   time_t         cli_lasttime;  /* last time data read from socket */
131   time_t         cli_since;     /* last time we parsed something, flood control */
132                                 
133   time_t         cli_firsttime; /* time client was created */
134   time_t         cli_lastnick;  /* TimeStamp on nick */
135   int            cli_marker;    /* /who processing marker */
136   unsigned int   cli_flags;     /* client flags */
137   unsigned int   cli_hopcount;  /* number of servers to this 0 = local */
138   struct in_addr cli_ip;        /* Real ip# NOT defined for remote servers! */
139   short          cli_status;    /* Client type */
140   unsigned char  cli_local;     /* local or remote client */
141   char cli_name[HOSTLEN + 1];   /* Unique name of the client, nick or host */
142   char cli_username[USERLEN + 1]; /* username here now for auth stuff */
143   char cli_info[REALLEN + 1];   /* Free form additional client information */
144 };
145
146 #define cli_next(cli)           ((cli)->cli_next)
147 #define cli_prev(cli)           ((cli)->cli_prev)
148 #define cli_hnext(cli)          ((cli)->cli_hnext)
149 #define cli_connect(cli)        ((cli)->cli_connect)
150 #define cli_from(cli)           ((cli)->cli_connect->con_client)
151 #define cli_user(cli)           ((cli)->cli_user)
152 #define cli_serv(cli)           ((cli)->cli_serv)
153 #define cli_whowas(cli)         ((cli)->cli_whowas)
154 #define cli_yxx(cli)            ((cli)->cli_yxx)
155 #define cli_lasttime(cli)       ((cli)->cli_lasttime)
156 #define cli_since(cli)          ((cli)->cli_since)
157 #define cli_firsttime(cli)      ((cli)->cli_firsttime)
158 #define cli_lastnick(cli)       ((cli)->cli_lastnick)
159 #define cli_marker(cli)         ((cli)->cli_marker)
160 #define cli_flags(cli)          ((cli)->cli_flags)
161 #define cli_hopcount(cli)       ((cli)->cli_hopcount)
162 #define cli_ip(cli)             ((cli)->cli_ip)
163 #define cli_status(cli)         ((cli)->cli_status)
164 #define cli_local(cli)          ((cli)->cli_local)
165 #define cli_name(cli)           ((cli)->cli_name)
166 #define cli_username(cli)       ((cli)->cli_username)
167 #define cli_info(cli)           ((cli)->cli_info)
168
169 #define cli_count(cli)          ((cli)->cli_connect->con_count)
170 #define cli_fd(cli)             ((cli)->cli_connect->con_fd)
171 #define cli_error(cli)          ((cli)->cli_connect->con_error)
172 #define cli_snomask(cli)        ((cli)->cli_connect->con_snomask)
173 #define cli_nextnick(cli)       ((cli)->cli_connect->con_nextnick)
174 #define cli_nexttarget(cli)     ((cli)->cli_connect->con_nexttarget)
175 #define cli_cookie(cli)         ((cli)->cli_connect->con_cookie)
176 #define cli_sendQ(cli)          ((cli)->cli_connect->con_sendQ)
177 #define cli_recvQ(cli)          ((cli)->cli_connect->con_recvQ)
178 #define cli_sendM(cli)          ((cli)->cli_connect->con_sendM)
179 #define cli_sendK(cli)          ((cli)->cli_connect->con_sendK)
180 #define cli_receiveM(cli)       ((cli)->cli_connect->con_receiveM)
181 #define cli_receiveK(cli)       ((cli)->cli_connect->con_receiveK)
182 #define cli_sendB(cli)          ((cli)->cli_connect->con_sendB)
183 #define cli_receiveB(cli)       ((cli)->cli_connect->con_receiveB)
184 #define cli_listener(cli)       ((cli)->cli_connect->con_listener)
185 #define cli_confs(cli)          ((cli)->cli_connect->con_confs)
186 #define cli_handler(cli)        ((cli)->cli_connect->con_handler)
187 #define cli_dns_reply(cli)      ((cli)->cli_connect->con_dns_reply)
188 #define cli_listing(cli)        ((cli)->cli_connect->con_listing)
189 #define cli_max_sendq(cli)      ((cli)->cli_connect->con_max_sendq)
190 #define cli_ping_freq(cli)      ((cli)->cli_connect->con_ping_freq)
191 #define cli_lastsq(cli)         ((cli)->cli_connect->con_lastsq)
192 #define cli_port(cli)           ((cli)->cli_connect->con_port)
193 #define cli_targets(cli)        ((cli)->cli_connect->con_targets)
194 #define cli_sock_ip(cli)        ((cli)->cli_connect->con_sock_ip)
195 #define cli_sockhost(cli)       ((cli)->cli_connect->con_sockhost)
196 #define cli_passwd(cli)         ((cli)->cli_connect->con_passwd)
197 #define cli_buffer(cli)         ((cli)->cli_connect->con_buffer)
198
199 #define con_next(con)           ((con)->con_next)
200 #define con_prev_p(con)         ((con)->con_prev_p)
201 #define con_client(con)         ((con)->con_client)
202 #define con_count(con)          ((con)->con_count)
203 #define con_fd(con)             ((con)->con_fd)
204 #define con_error(con)          ((con)->con_error)
205 #define con_snomask(con)        ((con)->con_snomask)
206 #define con_nextnick(con)       ((con)->con_nextnick)
207 #define con_nexttarget(con)     ((con)->con_nexttarget)
208 #define con_cookie(con)         ((con)->con_cookie)
209 #define con_sendQ(con)          ((con)->con_sendQ)
210 #define con_recvQ(con)          ((con)->con_recvQ)
211 #define con_sendM(con)          ((con)->con_sendM)
212 #define con_sendK(con)          ((con)->con_sendK)
213 #define con_receiveM(con)       ((con)->con_receiveM)
214 #define con_receiveK(con)       ((con)->con_receiveK)
215 #define con_sendB(con)          ((con)->con_sendB)
216 #define con_receiveB(con)       ((con)->con_receiveB)
217 #define con_listener(con)       ((con)->con_listener)
218 #define con_confs(con)          ((con)->con_confs)
219 #define con_handler(con)        ((con)->con_handler)
220 #define con_dns_reply(con)      ((con)->con_dns_reply)
221 #define con_listing(con)        ((con)->con_listing)
222 #define con_max_sendq(con)      ((con)->con_max_sendq)
223 #define con_ping_freq(con)      ((con)->con_ping_freq)
224 #define con_lastsq(con)         ((con)->con_lastsq)
225 #define con_port(con)           ((con)->con_port)
226 #define con_targets(con)        ((con)->con_targets)
227 #define con_sock_ip(con)        ((con)->con_sock_ip)
228 #define con_sockhost(con)       ((con)->con_sockhost)
229 #define con_passwd(con)         ((con)->con_passwd)
230 #define con_buffer(con)         ((con)->con_buffer)
231
232 #define STAT_CONNECTING         0x001 /* connecting to another server */
233 #define STAT_HANDSHAKE          0x002 /* pass - server sent */
234 #define STAT_ME                 0x004 /* this server */
235 #define STAT_UNKNOWN            0x008 /* unidentified connection */
236 #define STAT_UNKNOWN_USER       0x010 /* Connect to client port */
237 #define STAT_UNKNOWN_SERVER     0x020 /* Connect to server port */
238 #define STAT_SERVER             0x040
239 #define STAT_USER               0x080
240
241 /*
242  * status macros.
243  */
244 #define IsRegistered(x)         (cli_status(x) & (STAT_SERVER | STAT_USER))
245 #define IsConnecting(x)         (cli_status(x) == STAT_CONNECTING)
246 #define IsHandshake(x)          (cli_status(x) == STAT_HANDSHAKE)
247 #define IsMe(x)                 (cli_status(x) == STAT_ME)
248 #define IsUnknown(x)            (cli_status(x) & \
249         (STAT_UNKNOWN | STAT_UNKNOWN_USER | STAT_UNKNOWN_SERVER))
250
251 #define IsServerPort(x)         (cli_status(x) == STAT_UNKNOWN_SERVER )
252 #define IsUserPort(x)           (cli_status(x) == STAT_UNKNOWN_USER )
253 #define IsClient(x)             (cli_status(x) & \
254         (STAT_HANDSHAKE | STAT_ME | STAT_UNKNOWN |\
255          STAT_UNKNOWN_USER | STAT_UNKNOWN_SERVER | STAT_SERVER | STAT_USER))
256
257 #define IsTrusted(x)            (cli_status(x) & \
258         (STAT_CONNECTING | STAT_HANDSHAKE | STAT_ME | STAT_SERVER))
259
260 #define IsServer(x)             (cli_status(x) == STAT_SERVER)
261 #define IsUser(x)               (cli_status(x) == STAT_USER)
262
263
264 #define SetConnecting(x)        (cli_status(x) = STAT_CONNECTING)
265 #define SetHandshake(x)         (cli_status(x) = STAT_HANDSHAKE)
266 #define SetServer(x)            (cli_status(x) = STAT_SERVER)
267 #define SetMe(x)                (cli_status(x) = STAT_ME)
268 #define SetUser(x)              (cli_status(x) = STAT_USER)
269
270 #define MyConnect(x)    (cli_from(x) == (x))
271 #define MyUser(x)       (MyConnect(x) && IsUser(x))
272 #define MyOper(x)       (MyConnect(x) && IsOper(x))
273 #define Protocol(x)     ((cli_serv(x))->prot)
274
275 #define PARSE_AS_SERVER(x) (cli_status(x) & \
276             (STAT_SERVER | STAT_CONNECTING | STAT_HANDSHAKE))
277
278 /*
279  * FLAGS macros
280  */
281 #define FLAGS_PINGSENT   0x0001 /* Unreplied ping sent */
282 #define FLAGS_DEADSOCKET 0x0002 /* Local socket is dead--Exiting soon */
283 #define FLAGS_KILLED     0x0004 /* Prevents "QUIT" from being sent for this */
284 #define FLAGS_OPER       0x0008 /* Operator */
285 #define FLAGS_LOCOP      0x0010 /* Local operator -- SRB */
286 #define FLAGS_INVISIBLE  0x0020 /* makes user invisible */
287 #define FLAGS_WALLOP     0x0040 /* send wallops to them */
288 #define FLAGS_SERVNOTICE 0x0080 /* server notices such as kill */
289 #define FLAGS_BLOCKED    0x0100 /* socket is in a blocked condition */
290 #define FLAGS_CLOSING    0x0400 /* set when closing to suppress errors */
291 #define FLAGS_UPING      0x0800 /* has active UDP ping request */
292 #define FLAGS_CHKACCESS  0x1000 /* ok to check clients access if set */
293 #define FLAGS_LOCAL     0x00010000      /* set for local clients */
294 #define FLAGS_GOTID     0x00020000      /* successful ident lookup achieved */
295 #define FLAGS_DOID      0x00040000      /* I-lines say must use ident return */
296 #define FLAGS_NONL      0x00080000      /* No \n in buffer */
297 #define FLAGS_TS8       0x00100000      /* Why do you want to know? */
298 #define FLAGS_MAP       0x00800000      /* Show server on the map */
299 #define FLAGS_JUNCTION  0x01000000      /* Junction causing the net.burst */
300 #define FLAGS_DEAF      0x02000000      /* Makes user deaf */
301 #define FLAGS_CHSERV    0x04000000      /* Disallow KICK or MODE -o on the user;
302                                            don't display channels in /whois */
303 #define FLAGS_BURST     0x08000000      /* Server is receiving a net.burst */
304 #define FLAGS_BURST_ACK 0x10000000      /* Server is waiting for eob ack */
305 #define FLAGS_DEBUG     0x20000000      /* send global debug/anti-hack info */
306 #define FLAGS_IPCHECK   0x40000000      /* Added or updated IPregistry data */
307
308 #define SEND_UMODES \
309     (FLAGS_INVISIBLE|FLAGS_OPER|FLAGS_WALLOP|FLAGS_DEAF|FLAGS_CHSERV|FLAGS_DEBUG)
310 #define ALL_UMODES (SEND_UMODES|FLAGS_SERVNOTICE|FLAGS_LOCOP)
311 #define FLAGS_ID (FLAGS_DOID|FLAGS_GOTID)
312
313 /*
314  * flags macros.
315  */
316 #define DoAccess(x)             (cli_flags(x) & FLAGS_CHKACCESS)
317 #define IsAnOper(x)             (cli_flags(x) & (FLAGS_OPER|FLAGS_LOCOP))
318 #define IsBlocked(x)            (cli_flags(x) & FLAGS_BLOCKED)
319 #define IsBurst(x)              (cli_flags(x) & FLAGS_BURST)
320 #define IsBurstAck(x)           (cli_flags(x) & FLAGS_BURST_ACK)
321 #define IsBurstOrBurstAck(x)    (cli_flags(x) & (FLAGS_BURST|FLAGS_BURST_ACK))
322 #define IsChannelService(x)     (cli_flags(x) & FLAGS_CHSERV)
323 #define IsDead(x)               (cli_flags(x) & FLAGS_DEADSOCKET)
324 #define IsDeaf(x)               (cli_flags(x) & FLAGS_DEAF)
325 #define IsIPChecked(x)          (cli_flags(x) & FLAGS_IPCHECK)
326 #define IsIdented(x)            (cli_flags(x) & FLAGS_GOTID)
327 #define IsInvisible(x)          (cli_flags(x) & FLAGS_INVISIBLE)
328 #define IsJunction(x)           (cli_flags(x) & FLAGS_JUNCTION)
329 #define IsLocOp(x)              (cli_flags(x) & FLAGS_LOCOP)
330 #define IsLocal(x)              (cli_flags(x) & FLAGS_LOCAL)
331 #define IsOper(x)               (cli_flags(x) & FLAGS_OPER)
332 #define IsUPing(x)              (cli_flags(x) & FLAGS_UPING)
333 #define NoNewLine(x)            (cli_flags(x) & FLAGS_NONL)
334 #define SendDebug(x)            (cli_flags(x) & FLAGS_DEBUG)
335 #define SendServNotice(x)       (cli_flags(x) & FLAGS_SERVNOTICE)
336 #define SendWallops(x)          (cli_flags(x) & FLAGS_WALLOP)
337
338 #define IsPrivileged(x)         (IsAnOper(x) || IsServer(x))
339
340 #define SetAccess(x)            (cli_flags(x) |= FLAGS_CHKACCESS)
341 #define SetBurst(x)             (cli_flags(x) |= FLAGS_BURST)
342 #define SetBurstAck(x)          (cli_flags(x) |= FLAGS_BURST_ACK)
343 #define SetChannelService(x)    (cli_flags(x) |= FLAGS_CHSERV)
344 #define SetDeaf(x)              (cli_flags(x) |= FLAGS_DEAF)
345 #define SetDebug(x)             (cli_flags(x) |= FLAGS_DEBUG)
346 #define SetGotId(x)             (cli_flags(x) |= FLAGS_GOTID)
347 #define SetIPChecked(x)         (cli_flags(x) |= FLAGS_IPCHECK)
348 #define SetInvisible(x)         (cli_flags(x) |= FLAGS_INVISIBLE)
349 #define SetJunction(x)          (cli_flags(x) |= FLAGS_JUNCTION)
350 #define SetLocOp(x)             (cli_flags(x) |= FLAGS_LOCOP)
351 #define SetOper(x)              (cli_flags(x) |= FLAGS_OPER)
352 #define SetUPing(x)             (cli_flags(x) |= FLAGS_UPING)
353 #define SetWallops(x)           (cli_flags(x) |= FLAGS_WALLOP)
354
355 #define ClearAccess(x)          (cli_flags(x) &= ~FLAGS_CHKACCESS)
356 #define ClearBurst(x)           (cli_flags(x) &= ~FLAGS_BURST)
357 #define ClearBurstAck(x)        (cli_flags(x) &= ~FLAGS_BURST_ACK)
358 #define ClearChannelService(x)  (cli_flags(x) &= ~FLAGS_CHSERV)
359 #define ClearDeaf(x)            (cli_flags(x) &= ~FLAGS_DEAF)
360 #define ClearDebug(x)           (cli_flags(x) &= ~FLAGS_DEBUG)
361 #define ClearIPChecked(x)       (cli_flags(x) &= ~FLAGS_IPCHECK)
362 #define ClearInvisible(x)       (cli_flags(x) &= ~FLAGS_INVISIBLE)
363 #define ClearLocOp(x)           (cli_flags(x) &= ~FLAGS_LOCOP)
364 #define ClearOper(x)            (cli_flags(x) &= ~FLAGS_OPER)
365 #define ClearUPing(x)           (cli_flags(x) &= ~FLAGS_UPING)
366 #define ClearWallops(x)         (cli_flags(x) &= ~FLAGS_WALLOP)
367
368 /* server notice stuff */
369
370 #define SNO_ADD         1
371 #define SNO_DEL         2
372 #define SNO_SET         3
373                                 /* DON'T CHANGE THESE VALUES ! */
374                                 /* THE CLIENTS DEPEND ON IT  ! */
375 #define SNO_OLDSNO      0x1     /* unsorted old messages */
376 #define SNO_SERVKILL    0x2     /* server kills (nick collisions) */
377 #define SNO_OPERKILL    0x4     /* oper kills */
378 #define SNO_HACK2       0x8     /* desyncs */
379 #define SNO_HACK3       0x10    /* temporary desyncs */
380 #define SNO_UNAUTH      0x20    /* unauthorized connections */
381 #define SNO_TCPCOMMON   0x40    /* common TCP or socket errors */
382 #define SNO_TOOMANY     0x80    /* too many connections */
383 #define SNO_HACK4       0x100   /* Uworld actions on channels */
384 #define SNO_GLINE       0x200   /* glines */
385 #define SNO_NETWORK     0x400   /* net join/break, etc */
386 #define SNO_IPMISMATCH  0x800   /* IP mismatches */
387 #define SNO_THROTTLE    0x1000  /* host throttle add/remove notices */
388 #define SNO_OLDREALOP   0x2000  /* old oper-only messages */
389 #define SNO_CONNEXIT    0x4000  /* client connect/exit (ugh) */
390 #define SNO_DEBUG       0x8000  /* debugging messages (DEBUGMODE only) */
391
392 #ifdef DEBUGMODE
393 # define SNO_ALL        0xffff  /* Don't make it larger then significant,
394                                  * that looks nicer */
395 #else
396 # define SNO_ALL        0x7fff
397 #endif
398
399 #define SNO_USER        (SNO_ALL & ~SNO_OPER)
400
401 #define SNO_DEFAULT (SNO_NETWORK|SNO_OPERKILL|SNO_GLINE)
402 #define SNO_OPERDEFAULT (SNO_DEFAULT|SNO_HACK2|SNO_HACK4|SNO_THROTTLE|SNO_OLDSNO)
403 #define SNO_OPER (SNO_CONNEXIT|SNO_OLDREALOP)
404 #define SNO_NOISY (SNO_SERVKILL|SNO_UNAUTH)
405
406 typedef enum ShowIPType {
407   HIDE_IP,
408   SHOW_IP,
409   MASK_IP
410 } ShowIPType;
411
412 extern const char* get_client_name(const struct Client* sptr, int showip);
413 extern int client_get_ping(const struct Client* local_client);
414 extern void client_drop_sendq(struct Connection* con);
415 extern void client_add_sendq(struct Connection* con,
416                              struct Connection** con_p);
417
418 #endif /* INCLUDED_client_h */
419