ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/s_bsd.h
Revision: 2632
Committed: Sun Dec 8 18:33:48 2013 UTC (11 years, 8 months ago) by michael
Content type: text/x-chdr
File size: 2405 byte(s)
Log Message:
- Removed setup_socket callback
- Removed init_comm() as init_netio() can be called directly

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
31 /* Type of IO */
32 #define COMM_SELECT_READ 1
33 #define COMM_SELECT_WRITE 2
34
35 /* How long can comm_select() wait for network events [milliseconds] */
36 #define SELECT_DELAY 500
37
38 struct Client;
39 struct MaskItem;
40 struct Listener;
41
42 extern void add_connection(struct Listener *, struct irc_ssaddr *, int);
43 extern void close_connection(struct Client *);
44 extern void report_error(int, const char *, const char *, int);
45
46 extern int get_sockerr(int);
47 extern int ignoreErrno(int);
48
49 extern void comm_settimeout(fde_t *, time_t, PF *, void *);
50 extern void comm_setflush(fde_t *, time_t, PF *, void *);
51 extern void comm_checktimeouts(void *);
52 extern void comm_connect_tcp(fde_t *, const char *, u_short,
53 struct sockaddr *, int, CNCB *, void *, int, int);
54 extern const char * comm_errstr(int status);
55 extern int comm_open(fde_t *F, int family, int sock_type, int proto,
56 const char *note);
57 extern int comm_accept(struct Listener *, struct irc_ssaddr *pn);
58
59 /* These must be defined in the network IO loop code of your choice */
60 extern void init_netio(void);
61 extern void comm_setselect(fde_t *, unsigned int, PF *, void *, time_t);
62 extern int read_message (time_t, unsigned char);
63 extern void comm_select(void);
64 extern void check_can_use_v6(void);
65 #ifdef IPV6
66 extern void remove_ipv6_mapping(struct irc_ssaddr *);
67 #endif
68
69 #endif /* INCLUDED_s_bsd_h */

Properties

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