Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git] / include / support.h
index 3d07a303e5af52023237b423611c2d9407ce1cdb..09ce20d638c5ed395a42dcbb1ae3623cd25a6137 100644 (file)
 #endif /* 0 */
 
 /*
- * Prototypes
+ * Given a number of bits, make a netmask out of it.
  */
+#define NETMASK(bits) htonl((0xffffffff>>(32-(bits)))<<(32-(bits)))
+
 
+/*
+ * Prototypes
+ */
+  
 extern int check_if_ipmask(const char *mask);
 extern void write_log(const char *filename, const char *pattern, ...);