Debian Codegraph @

include/uplink.h

raw
1 /*
2 * Copyright (C) 2005 William Pitcock, et al.
3 * Rights to this code are as documented in doc/LICENSE.
4 *
5 * Data structures related to our uplink.
6 * Modules usually don't need this.
7 *
8 */
9
10 #ifndef ATHEME_UPLINK_H
11 #define ATHEME_UPLINK_H
12
13 typedef struct uplink_ uplink_t;
14
15 struct uplink_
16 {
17 mowgli_node_t node;
18
19 char *name;
20 char *host;
21 char *send_pass;
22 char *receive_pass;
23 char *vhost;
24
25 unsigned int port;
26
27 connection_t *conn;
28
29 unsigned int flags;
30 };
31
32 #define UPF_ILLEGAL 0x80000000 /* not in conf anymore, delete when disconnected */
33
34 /* uplink.c */
35 E mowgli_list_t uplinks;
36 E uplink_t *curr_uplink;
37
38 E void init_uplinks(void);
39 E uplink_t *uplink_add(const char *name, const char *host, const char *send_password, const char *receive_password, const char *vhost, int port);
40 E void uplink_delete(uplink_t *u);
41 E uplink_t *uplink_find(const char *name);
42 E void uplink_connect(void);
43
44 /* packet.c */
45 /* bursting timer */
46 #if HAVE_GETTIMEOFDAY
47 E struct timeval burstime;
48 #endif
49
50 E void (*parse)(char *line);
51 E void irc_handle_connect(connection_t *cptr);
52
53 /* send.c */
54 E int sts(const char *fmt, ...) PRINTFLIKE(1, 2);
55 E void io_loop(void);
56
57 #endif
58
59 /* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs
60 * vim:ts=8
61 * vim:sw=8
62 * vim:noexpandtab
63 */