Improve support for IPv4 vs IPv6 virtual hosts (fixes SF bugs #1087699, #1087668).
[ircu2.10.12-pk.git] / include / s_bsd.h
index db8bd3062843b9601df2cf1f5d6d60332d234a12..1518ff45b11c754d5594f4763b55893e09d42fef 100644 (file)
@@ -1,7 +1,6 @@
-/*
- * s_bsd.h
- *
- * $Id$
+/** @file s_bsd.h
+ * @brief Wrapper functions to avoid direct use of BSD APIs.
+ * @version $Id$
  */
 #ifndef INCLUDED_s_bsd_h
 #define INCLUDED_s_bsd_h
@@ -26,7 +25,9 @@ struct irc_in_addr;
  * set client to a smaller size to allow TCP flow control
  * to reduce flooding
  */
+/** Default TCP window size for server connections. */
 #define SERVER_TCP_WINDOW 61440
+/** Default TCP window size for client connections. */
 #define CLIENT_TCP_WINDOW 2048
 
 extern void report_error(const char* text, const char* who, int err);
@@ -48,32 +49,10 @@ extern const char* const SETBUFS_ERROR_MSG;
 extern const char* const TOS_ERROR_MSG;
 extern const char* const REGISTER_ERROR_MSG;
 
-
 extern int            HighestFd;
 extern struct Client* LocalClientArray[MAXCONNECTIONS];
-extern int            OpenFileDescriptorCount;
-
-extern struct irc_sockaddr VirtualHost;
-
-enum PollType {
-  PT_NONE,
-  PT_READ,
-  PT_WRITE
-};
-
-struct Pollable;
-
-typedef int (*PollReadyFn)(struct Pollable*);
-
-struct Pollable {
-  struct Pollable* next;
-  struct Pollable* prev;
-  int              fd;
-  int              index;
-  int              state;
-  PollReadyFn      r_handler;
-  PollReadyFn      w_handler;
-};
+extern struct irc_sockaddr VirtualHost_v4;
+extern struct irc_sockaddr VirtualHost_v6;
 
 /*
  * Proto types