| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 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 |