diff options
author | nenolod <nenolod@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-08 01:35:02 +0000 |
---|---|---|
committer | nenolod <nenolod@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-08 01:35:02 +0000 |
commit | ab24f0dca4050e6bd11ace131b7ac7bb53d42bae (patch) | |
tree | bf75d042c2cd7a1ab146645ba3cc9bb1bca62dcc /include/socket.h | |
parent | ac6b0d3f1d2f5c389ba06629a8f2b26ca994d3f0 (diff) |
- first steps towards a working IPv6 port. I'll work more on this tomorrow. :-P
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3845 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/socket.h')
-rw-r--r-- | include/socket.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/include/socket.h b/include/socket.h index f8b15ae53..caa1490b5 100644 --- a/include/socket.h +++ b/include/socket.h @@ -24,6 +24,20 @@ #include <string> #include <deque> #include "dns.h" +#include "inspircd_config.h" + +/* macros to the relevant system address description structs */ +#ifdef IPV6 + +typedef struct sockaddr_in6 insp_sockaddr; +typedef struct in6_addr insp_inaddr; + +#else + +typedef struct sockaddr_in insp_sockaddr; +typedef struct in_addr insp_inaddr; + +#endif /** * States which a socket may be in @@ -84,13 +98,13 @@ private: * The host being connected to, * in sockaddr form */ - sockaddr_in addr; + insp_sockaddr addr; /** * The host being connected to, * in in_addr form */ - in_addr addy; + insp_inaddr addy; /** * When this time is reached, @@ -125,13 +139,13 @@ private: * Client sockaddr structure used * by accept() */ - sockaddr_in client; + insp_sockaddr client; /** * Server sockaddr structure used * by accept() */ - sockaddr_in server; + insp_sockaddr server; /** * Used by accept() to indicate the |