/[svn]/ircd-hybrid-7.2/include/s_bsd.h
ViewVC logotype

Contents of /ircd-hybrid-7.2/include/s_bsd.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 999 - (show annotations)
Sun Aug 23 15:23:34 2009 UTC (10 years, 11 months ago) by michael
File MIME type: text/x-csrc
File size: 2608 byte(s)
- removed references to struct DNSReply

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 AccessItem;
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 int connect_server(struct AccessItem *, struct Client *,
48 struct DNSReply *);
49 extern void report_error(int, const char *, const char *, int);
50
51 extern int get_sockerr(int);
52 extern int ignoreErrno(int);
53
54 extern void comm_settimeout(fde_t *, time_t, PF *, void *);
55 extern void comm_setflush(fde_t *, time_t, PF *, void *);
56 extern void comm_checktimeouts(void *);
57 extern void comm_connect_tcp(fde_t *, const char *, u_short,
58 struct sockaddr *, int, CNCB *, void *, int, int);
59 extern const char * comm_errstr(int status);
60 extern int comm_open(fde_t *F, int family, int sock_type, int proto,
61 const char *note);
62 extern int comm_accept(struct Listener *, struct irc_ssaddr *pn);
63
64 /* These must be defined in the network IO loop code of your choice */
65 extern void init_netio(void);
66 extern void comm_setselect(fde_t *, unsigned int, PF *, void *, time_t);
67 extern void init_comm(void);
68 extern int read_message (time_t, unsigned char);
69 extern void comm_select(void);
70 extern void check_can_use_v6(void);
71 #ifdef IPV6
72 extern void remove_ipv6_mapping(struct irc_ssaddr *);
73 #endif
74
75 #endif /* INCLUDED_s_bsd_h */

Properties

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

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28