1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
17 #ifndef INSPIRCD_SOCKET_H
18 #define INSPIRCD_SOCKET_H
20 /* This is where we'll define wrappers for socket IO stuff, for neat winsock compatability */
22 #include <arpa/inet.h>
24 #include <sys/resource.h>
25 #include <sys/types.h>
26 #include <sys/socket.h>
28 #include <netinet/in.h>
34 #include "inspircd_config.h"
36 /* macros to the relevant system address description structs */
39 typedef struct sockaddr_in6 insp_sockaddr;
40 typedef struct in6_addr insp_inaddr;
44 typedef struct sockaddr_in insp_sockaddr;
45 typedef struct in_addr insp_inaddr;
50 bool BindSocket(int sockfd, insp_sockaddr client, insp_sockaddr server, int port, char* addr);
51 int BindPorts(bool bail);