mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 10:42:45 +00:00
2a63c3be15
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
28 lines
418 B
C
28 lines
418 B
C
|
|
/*
|
|
* Copyright (C) 2012 by Darren Reed.
|
|
*
|
|
* See the IPFILTER.LICENCE file for details on licencing.
|
|
*
|
|
* $Id$
|
|
*/
|
|
|
|
#include "ipf.h"
|
|
|
|
|
|
void
|
|
printmask(int family, u_32_t *mask)
|
|
{
|
|
struct in_addr ipa;
|
|
int ones;
|
|
|
|
if (family == AF_INET6) {
|
|
PRINTF("/%d", count6bits(mask));
|
|
} else if ((ones = count4bits(*mask)) == -1) {
|
|
ipa.s_addr = *mask;
|
|
PRINTF("/%s", inet_ntoa(ipa));
|
|
} else {
|
|
PRINTF("/%d", ones);
|
|
}
|
|
}
|