mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 12:53:33 +00:00
efeb8bffe3
Convert ipfilter userland function declarations from K&R to ANSI. This syncs our function declarations with NetBSD hg commit 75edcd7552a0 (apply our changes). Though not copied from NetBSD, this change was partially inspired by NetBSD's work and inspired by style(9). Reviewed by: glebius (for #network) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33595
41 lines
689 B
C
41 lines
689 B
C
/*
|
|
* Copyright (C) 2012 by Darren Reed.
|
|
*
|
|
* See the IPFILTER.LICENCE file for details on licencing.
|
|
*
|
|
* $Id$
|
|
*/
|
|
|
|
#include "ipf.h"
|
|
|
|
|
|
void
|
|
printlookup(char *base, i6addr_t *addr, i6addr_t *mask)
|
|
{
|
|
char name[32];
|
|
|
|
switch (addr->iplookuptype)
|
|
{
|
|
case IPLT_POOL :
|
|
PRINTF("pool/");
|
|
break;
|
|
case IPLT_HASH :
|
|
PRINTF("hash/");
|
|
break;
|
|
case IPLT_DSTLIST :
|
|
PRINTF("dstlist/");
|
|
break;
|
|
default :
|
|
PRINTF("lookup(%x)=", addr->iplookuptype);
|
|
break;
|
|
}
|
|
|
|
if (addr->iplookupsubtype == 0)
|
|
PRINTF("%u", addr->iplookupnum);
|
|
else if (addr->iplookupsubtype == 1) {
|
|
strncpy(name, base + addr->iplookupname, sizeof(name));
|
|
name[sizeof(name) - 1] = '\0';
|
|
PRINTF("%s", name);
|
|
}
|
|
}
|