| 1 |
pippijn |
1.1 |
/* |
| 2 |
|
|
* Copyright © 2005 William Pitcock, et al. |
| 3 |
pippijn |
1.2 |
* Rights to this code are as documented in doc/pod/license.pod. |
| 4 |
pippijn |
1.1 |
* |
| 5 |
|
|
* Data structures related to our uplink. |
| 6 |
|
|
* Modules usually don't need this. |
| 7 |
|
|
* |
| 8 |
pippijn |
1.2 |
* $Id: uplink.h,v 1.1 2007-07-19 08:24:51 pippijn Exp $ |
| 9 |
pippijn |
1.1 |
*/ |
| 10 |
|
|
|
| 11 |
|
|
#ifndef _UPLINK_H |
| 12 |
|
|
#define _UPLINK_H |
| 13 |
|
|
|
| 14 |
|
|
struct uplink_t |
| 15 |
|
|
{ |
| 16 |
|
|
char *name; |
| 17 |
|
|
char *host; |
| 18 |
|
|
char *pass; |
| 19 |
|
|
char *vhost; |
| 20 |
|
|
|
| 21 |
|
|
node_t *node; |
| 22 |
|
|
|
| 23 |
|
|
unsigned int port; |
| 24 |
|
|
|
| 25 |
|
|
connection_t *conn; |
| 26 |
|
|
|
| 27 |
|
|
unsigned int flags; |
| 28 |
|
|
}; |
| 29 |
|
|
|
| 30 |
|
|
#define UPF_ILLEGAL 0x80000000 /* not in conf anymore, delete when disconnected */ |
| 31 |
|
|
|
| 32 |
|
|
/* uplink.c */ |
| 33 |
|
|
E list_t uplinks; |
| 34 |
|
|
E uplink_t *curr_uplink; |
| 35 |
|
|
|
| 36 |
|
|
E void init_uplinks (void); |
| 37 |
|
|
E uplink_t *uplink_add (char *name, char *host, char *password, char *vhost, int port); |
| 38 |
|
|
E void uplink_delete (uplink_t *u); |
| 39 |
|
|
E uplink_t *uplink_find (char *name); |
| 40 |
|
|
E void uplink_connect (void); |
| 41 |
|
|
|
| 42 |
|
|
/* packet.c */ |
| 43 |
|
|
/* bursting timer */ |
| 44 |
|
|
#if HAVE_GETTIMEOFDAY |
| 45 |
|
|
E struct timeval burstime; |
| 46 |
|
|
#endif |
| 47 |
|
|
|
| 48 |
|
|
E void init_ircpacket (void); |
| 49 |
|
|
|
| 50 |
|
|
/* parse.c */ |
| 51 |
|
|
E void (*parse) (char *line); |
| 52 |
|
|
E void irc_parse (char *line); |
| 53 |
|
|
E void p10_parse (char *line); |
| 54 |
|
|
|
| 55 |
|
|
/* send.c */ |
| 56 |
|
|
E int sts (char *fmt, ...); |
| 57 |
|
|
E void reconn (void *arg); |
| 58 |
|
|
E void io_loop (void); |
| 59 |
|
|
|
| 60 |
|
|
#endif |