summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/lib/printhash.c
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2013-07-19 05:41:57 +0000
committercy <cy@FreeBSD.org>2013-07-19 05:41:57 +0000
commit672af8808c0e7c15f330b401482f9271c2eb3fa6 (patch)
tree225b5acf68c01bc6a260b386c2b2dbf4fa2839e3 /contrib/ipfilter/lib/printhash.c
parent71e82d94e82560b20789833f60056506de34de8b (diff)
downloadFreeBSD-src-672af8808c0e7c15f330b401482f9271c2eb3fa6.zip
FreeBSD-src-672af8808c0e7c15f330b401482f9271c2eb3fa6.tar.gz
As per the developers handbook (5.3.1 step 1), prepare the vendor trees for
import of new ipfilter vendor sources by flattening them. To keep the tags consistent with dist, the tags are also flattened. Approved by: glebius (Mentor)
Diffstat (limited to 'contrib/ipfilter/lib/printhash.c')
-rw-r--r--contrib/ipfilter/lib/printhash.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/contrib/ipfilter/lib/printhash.c b/contrib/ipfilter/lib/printhash.c
deleted file mode 100644
index 8e7948b..0000000
--- a/contrib/ipfilter/lib/printhash.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2002-2005 by Darren Reed.
- *
- * See the IPFILTER.LICENCE file for details on licencing.
- */
-
-#include "ipf.h"
-
-#define PRINTF (void)printf
-#define FPRINTF (void)fprintf
-
-
-iphtable_t *printhash(hp, copyfunc, name, opts)
-iphtable_t *hp;
-copyfunc_t copyfunc;
-char *name;
-int opts;
-{
- iphtent_t *ipep, **table;
- iphtable_t iph;
- int printed;
- size_t sz;
-
- if ((*copyfunc)((char *)hp, (char *)&iph, sizeof(iph)))
- return NULL;
-
- if ((name != NULL) && strncmp(name, iph.iph_name, FR_GROUPLEN))
- return iph.iph_next;
-
- printhashdata(hp, opts);
-
- if ((hp->iph_flags & IPHASH_DELETE) != 0)
- PRINTF("# ");
-
- if ((opts & OPT_DEBUG) == 0)
- PRINTF("\t{");
-
- sz = iph.iph_size * sizeof(*table);
- table = malloc(sz);
- if ((*copyfunc)((char *)iph.iph_table, (char *)table, sz))
- return NULL;
-
- for (printed = 0, ipep = iph.iph_list; ipep != NULL; ) {
- ipep = printhashnode(&iph, ipep, copyfunc, opts);
- printed++;
- }
- if (printed == 0)
- putchar(';');
-
- free(table);
-
- if ((opts & OPT_DEBUG) == 0)
- PRINTF(" };\n");
-
- return iph.iph_next;
-}
OpenPOWER on IntegriCloud