blob: 17c1a8fba75a095c31dbcc4b9871365038a4e2ea [file] [log] [blame] [raw]
/*
* Copyright (C) 2000-2005 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* $Id$
*/
#include "ipf.h"
void printmask(mask)
u_32_t *mask;
{
struct in_addr ipa;
int ones;
#ifdef USE_INET6
if (use_inet6)
printf("/%d", count6bits(mask));
else
#endif
if ((ones = count4bits(*mask)) == -1) {
ipa.s_addr = *mask;
printf("/%s", inet_ntoa(ipa));
} else
printf("/%d", ones);
}