Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / include / support.h
index 5629669589f8b482d4933156f25be328d06b7a5a..1ac7e78e3f149ff1076bc94efa4287954c11a507 100644 (file)
@@ -1,22 +1,22 @@
-#ifndef SUPPORT_H
-#define SUPPORT_H
-
-#include <netinet/in.h>
+/*
+ * support.h
+ *
+ * $Id$
+ */
+#ifndef INCLUDED_support_h
+#define INCLUDED_support_h
 
-/*=============================================================================
- * Proto types
+/*
+ * Given a number of bits, make a netmask out of it.
  */
+#define NETMASK(bits) htonl((0xffffffff>>(32-(bits)))<<(32-(bits)))
 
-#ifndef HAVE_STRTOKEN
-extern char *strtoken(char **save, char *str, char *fs);
-#endif
-#ifndef HAVE_STRERROR
-extern char *strerror(int err_no);
-#endif
-extern void dumpcore(const char *pattern, ...)
-    __attribute__ ((format(printf, 1, 2)));
-extern char *inetntoa(struct in_addr in);
+
+/*
+ * Prototypes
+ */
+  
 extern int check_if_ipmask(const char *mask);
 extern void write_log(const char *filename, const char *pattern, ...);
 
-#endif /* SUPPORT_H */
+#endif /* INCLUDED_support_h */