]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/socket.h
Check for invalid characters in keys, will catch config errors earlier and closer...
[user/henk/code/inspircd.git] / include / socket.h
index 832523ba719d125f6b71402fb17bf6afbe9e145d..e6ea1615df0e79fe2adfa6b37090084e5c17dedb 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -34,7 +34,6 @@
 #endif
 
 #include <errno.h>
-#include "inspircd_config.h"
 #include "socketengine.h"
 
 /* Contains irc-specific definitions */
@@ -82,7 +81,7 @@ namespace irc
                 * @returns True if the first mask_bits of address matches the first
                 * mask_bits of mask.
                 */
-               CoreExport bool MatchCIDRBits(unsigned char* address, unsigned char* mask, unsigned int mask_bits);
+               CoreExport bool MatchCIDRBits(const unsigned char* address, const unsigned char* mask, unsigned int mask_bits);
 
                /** Match CIDR, without matching username/nickname parts.
                 *
@@ -93,7 +92,7 @@ namespace irc
                 * @param cidr_mask The human readable mask, e.g. 1.2.0.0/16
                 * @return True if the mask matches the address
                 */
-               CoreExport bool MatchCIDR(const char* address, const char* cidr_mask);
+               CoreExport bool MatchCIDR(const std::string &address, const std::string &cidr_mask);
 
                /** Match CIDR, including an optional username/nickname part.
                 *
@@ -106,7 +105,7 @@ namespace irc
                 * @param cidr_mask The human readable mask, e.g. *\@1.2.0.0/16
                 * @return True if the mask matches the address
                 */
-               CoreExport bool MatchCIDR(const char* address, const char* cidr_mask, bool match_with_username);
+               CoreExport bool MatchCIDR(const std::string &address, const std::string &cidr_mask, bool match_with_username);
 
                /** Convert an insp_inaddr into human readable form.
                 * 
@@ -158,6 +157,15 @@ class CoreExport ListenSocket : public EventHandler
        std::string bind_addr;
        /** Port socket is bound to */
        int bind_port;
+
+       static sockaddr *sock_us;
+
+       static sockaddr *client;
+
+       static sockaddr *raddr;
+
+       static unsigned int socketcount;
+
  public:
        /** Create a new listening socket
         */