X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=include%2Fsupport.h;h=09ce20d638c5ed395a42dcbb1ae3623cd25a6137;hb=06ea484c36fed98f69f86dcc573c2e6523b8f482;hp=3d07a303e5af52023237b423611c2d9407ce1cdb;hpb=033ec6d81a160aa5ae22cced29ed97fafe8b33f4;p=ircu2.10.12-pk.git diff --git a/include/support.h b/include/support.h index 3d07a30..09ce20d 100644 --- a/include/support.h +++ b/include/support.h @@ -17,9 +17,15 @@ #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, ...);