ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/s_bsd.h
Revision: 1632
Committed: Sun Nov 4 15:37:10 2012 UTC (11 years, 4 months ago) by michael
Content type: text/x-chdr
File size: 2494 byte(s)
Log Message:
- Initial rewrite of the configuration subsystem

File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 * s_bsd.h: A header for the network subsystem.
4 *
5 * Copyright (C) 2002 by the past and present ircd coders, and others.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 * USA
21 *
22 * $Id$
23 */
24
25 #ifndef INCLUDED_s_bsd_h
26 #define INCLUDED_s_bsd_h
27
28 #include "config.h"
29 #include "fdlist.h"
30 #include "hook.h"
31
32 /* Type of IO */
33 #define COMM_SELECT_READ 1
34 #define COMM_SELECT_WRITE 2
35
36 /* How long can comm_select() wait for network events [milliseconds] */
37 #define SELECT_DELAY 500
38
39 struct Client;
40 struct MaskItem;
41 struct Listener;
42
43 extern struct Callback *setup_socket_cb;
44
45 extern void add_connection(struct Listener *, struct irc_ssaddr *, int);
46 extern void close_connection(struct Client *);
47 extern void report_error(int, const char *, const char *, int);
48
49 extern int get_sockerr(int);
50 extern int ignoreErrno(int);
51
52 extern void comm_settimeout(fde_t *, time_t, PF *, void *);
53 extern void comm_setflush(fde_t *, time_t, PF *, void *);
54 extern void comm_checktimeouts(void *);
55 extern void comm_connect_tcp(fde_t *, const char *, u_short,
56 struct sockaddr *, int, CNCB *, void *, int, int);
57 extern const char * comm_errstr(int status);
58 extern int comm_open(fde_t *F, int family, int sock_type, int proto,
59 const char *note);
60 extern int comm_accept(struct Listener *, struct irc_ssaddr *pn);
61
62 /* These must be defined in the network IO loop code of your choice */
63 extern void init_netio(void);
64 extern void comm_setselect(fde_t *, unsigned int, PF *, void *, time_t);
65 extern void init_comm(void);
66 extern int read_message (time_t, unsigned char);
67 extern void comm_select(void);
68 extern void check_can_use_v6(void);
69 #ifdef IPV6
70 extern void remove_ipv6_mapping(struct irc_ssaddr *);
71 #endif
72
73 #endif /* INCLUDED_s_bsd_h */

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision