]>
Commit | Line | Data |
---|---|---|
212380e3 AC |
1 | /************************************************************************ |
2 | * IRC - Internet Relay Chat, servlink/control.h | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation; either version 1, or (at your option) | |
7 | * any later version. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, | |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | * GNU General Public License for more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License | |
15 | * along with this program; if not, write to the Free Software | |
16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
17 | * | |
18 | * $Id: control.h 1285 2006-05-05 15:03:53Z nenolod $ | |
19 | */ | |
20 | ||
21 | #ifndef INCLUDED_servlink_control_h | |
22 | #define INCLUDED_servlink_control_h | |
23 | ||
24 | #define CMD_SET_ZIP_OUT_LEVEL 1 /* data */ | |
25 | #define CMD_START_ZIP_OUT 2 | |
26 | #define CMD_START_ZIP_IN 3 | |
27 | #define CMD_INJECT_RECVQ 4 /* data */ | |
28 | #define CMD_INJECT_SENDQ 5 /* data */ | |
29 | #define CMD_INIT 6 | |
30 | #define CMD_ZIPSTATS 7 | |
31 | ||
32 | #define RPL_ERROR 1 /* data */ | |
33 | #define RPL_ZIPSTATS 2 /* data */ | |
34 | ||
35 | /* flags */ | |
36 | #define COMMAND_FLAG_DATA 0x0001 /* command has data | |
37 | following */ | |
38 | struct ctrl_command | |
39 | { | |
40 | int command; | |
41 | int datalen; | |
42 | int gotdatalen; | |
43 | int readdata; | |
44 | unsigned char *data; | |
45 | }; | |
46 | ||
47 | typedef void cmd_handler(struct ctrl_command *); | |
48 | ||
49 | struct command_def | |
50 | { | |
51 | unsigned int commandid; | |
52 | cmd_handler *handler; | |
53 | unsigned int flags; | |
54 | }; | |
55 | ||
56 | extern struct command_def command_table[]; | |
57 | #endif /* INCLUDED_servlink_control_h */ |