Debian Codegraph @

server/net.h

raw symbols SCIP
1 /*******************************************************************************
2 *
3 * Copyright (c) 2004 Guillaume Cottenceau
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2, as
7 * published by the Free Software Foundation.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 ******************************************************************************/
19
20 #include <sys/types.h>
21 #include <sys/socket.h>
22 #include <stdlib.h>
23 #include <unistd.h>
24
25 #include <glib.h>
26
27 #ifndef MSG_NOSIGNAL
28 #define MSG_NOSIGNAL 0
29 #endif
30
31 extern const int proto_major;
32 extern const int proto_minor;
33
34 extern char* current_command;
35 extern char* pidfile;
36 extern char* user_to_switch;
37 extern GList* alert_words;
38 extern int interval_reregister;
39
40 extern int amount_talk_flood[256];
41
42 ssize_t send_line_log(int fd, char* dest_msg, char* inco_msg);
43 ssize_t send_line_log_push(int fd, char* dest_msg);
44 ssize_t send_line_log_push_binary(int fd, char* dest_msg, char* printable_msg);
45 ssize_t send_ok(int fd, char* inco_msg);
46
47 void connections_manager();
48 void conn_terminated(int fd, char* reason);
49 void create_server(int argc, char **argv);
50 void register_server(int silent);
51 void unregister_server();
52 void close_server();
53 void reread();
54
55 int conns_nb(void);
56 void add_prio(int fd);
57
58 #ifdef DEBUG
59 void net_debug(void);
60 #endif