diff options
Diffstat (limited to 'sbin/ipf/common')
| -rw-r--r-- | sbin/ipf/common/genmask.c | 6 | ||||
| -rw-r--r-- | sbin/ipf/common/ipf.h | 16 | ||||
| -rw-r--r-- | sbin/ipf/common/ipf_y.y | 1 | ||||
| -rw-r--r-- | sbin/ipf/common/ipmon.h | 3 | ||||
| -rw-r--r-- | sbin/ipf/common/ipt.h | 1 | ||||
| -rw-r--r-- | sbin/ipf/common/kmem.h | 1 | ||||
| -rw-r--r-- | sbin/ipf/common/lexer.c | 11 | ||||
| -rw-r--r-- | sbin/ipf/common/lexer.h | 1 | ||||
| -rw-r--r-- | sbin/ipf/common/opts.h | 1 | ||||
| -rw-r--r-- | sbin/ipf/common/pcap-ipf.h | 1 |
10 files changed, 11 insertions, 31 deletions
diff --git a/sbin/ipf/common/genmask.c b/sbin/ipf/common/genmask.c index 5b715cf4c901..a3b912b67ef3 100644 --- a/sbin/ipf/common/genmask.c +++ b/sbin/ipf/common/genmask.c @@ -9,10 +9,8 @@ #include "ipf.h" -int genmask(family, msk, mskp) - int family; - char *msk; - i6addr_t *mskp; +int +genmask(int family, char *msk, i6addr_t *mskp) { char *endptr = 0L; u_32_t addr; diff --git a/sbin/ipf/common/ipf.h b/sbin/ipf/common/ipf.h index b278d8ec5d6c..3e6ee594b8b6 100644 --- a/sbin/ipf/common/ipf.h +++ b/sbin/ipf/common/ipf.h @@ -1,11 +1,8 @@ -/* $FreeBSD$ */ /* * Copyright (C) 2012 by Darren Reed. * * See the IPFILTER.LICENCE file for details on licencing. - * - * @(#)ipf.h 1.12 6/5/96 * $Id$ */ @@ -47,6 +44,7 @@ #include <errno.h> #include <limits.h> #include <netdb.h> +#include <stdarg.h> #include <stdlib.h> #include <stddef.h> #include <stdio.h> @@ -173,20 +171,14 @@ typedef struct proxyrule { } proxyrule_t; -#if defined(__NetBSD__) || defined(__FreeBSD__) || \ - SOLARIS -# include <stdarg.h> typedef int (* ioctlfunc_t)(int, ioctlcmd_t, ...); -#else -typedef int (* ioctlfunc_t)(dev_t, ioctlcmd_t, void *); -#endif typedef int (* addfunc_t)(int, ioctlfunc_t, void *); typedef int (* copyfunc_t)(void *, void *, size_t); extern char thishost[MAXHOSTNAMELEN]; extern char flagset[]; -extern u_char flags[]; +extern uint16_t flags[]; extern struct ipopt_names ionames[]; extern struct ipopt_names secclass[]; extern char *icmpcodes[MAX_ICMPCODE + 1]; @@ -318,7 +310,7 @@ extern ipf_dstnode_t *printdstlistnode(ipf_dstnode_t *, copyfunc_t, extern void printdstlistpolicy(ippool_policy_t); extern struct ip_pool_s *printpool(struct ip_pool_s *, copyfunc_t, char *, int, wordtab_t *); -extern struct ip_pool_s *printpool_live(struct ip_pool_s *, int, +extern void printpool_live(struct ip_pool_s *, int, char *, int, wordtab_t *); extern void printpooldata(ip_pool_t *, int); extern void printpoolfield(void *, int, int); @@ -338,7 +330,7 @@ extern int remove_hash(struct iphtable_s *, ioctlfunc_t); extern int remove_hashnode(int, char *, struct iphtent_s *, ioctlfunc_t); extern int remove_pool(ip_pool_t *, ioctlfunc_t); extern int remove_poolnode(int, char *, ip_pool_node_t *, ioctlfunc_t); -extern u_char tcpflags(char *); +extern uint16_t tcpflags(char *); extern void printc(struct frentry *); extern void printC(int); extern void emit(int, int, void *, struct frentry *); diff --git a/sbin/ipf/common/ipf_y.y b/sbin/ipf/common/ipf_y.y index ad4200023781..b3f7221672f3 100644 --- a/sbin/ipf/common/ipf_y.y +++ b/sbin/ipf/common/ipf_y.y @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* * Copyright (C) 2012 by Darren Reed. diff --git a/sbin/ipf/common/ipmon.h b/sbin/ipf/common/ipmon.h index 4807299c49d2..4d377027eb3d 100644 --- a/sbin/ipf/common/ipmon.h +++ b/sbin/ipf/common/ipmon.h @@ -1,11 +1,8 @@ -/* $FreeBSD$ */ /* * Copyright (C) 2012 by Darren Reed. * * See the IPFILTER.LICENCE file for details on licencing. - * - * @(#)ip_fil.h 1.35 6/5/96 * $Id$ */ diff --git a/sbin/ipf/common/ipt.h b/sbin/ipf/common/ipt.h index 9a4d75a85ccb..3ecdabdb61c5 100644 --- a/sbin/ipf/common/ipt.h +++ b/sbin/ipf/common/ipt.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* * Copyright (C) 2012 by Darren Reed. diff --git a/sbin/ipf/common/kmem.h b/sbin/ipf/common/kmem.h index c4b65ed63ce9..2adff4363b0b 100644 --- a/sbin/ipf/common/kmem.h +++ b/sbin/ipf/common/kmem.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* * Copyright (C) 2012 by Darren Reed. diff --git a/sbin/ipf/common/lexer.c b/sbin/ipf/common/lexer.c index 16fbb2272034..56ac3586af6e 100644 --- a/sbin/ipf/common/lexer.c +++ b/sbin/ipf/common/lexer.c @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* * Copyright (C) 2012 by Darren Reed. @@ -11,6 +10,7 @@ # include "netinet/ip_scan.h" #endif #include <sys/ioctl.h> +#include <sys/param.h> #include <syslog.h> #ifdef TEST_LEXER # define NO_YACC @@ -449,7 +449,7 @@ buildipv6: oc = c; if (prior == YY_NUMBER && c == ':') { - snprintf(s, sizeof(s), "%d", priornum); + snprintf(s, sizeof(ipv6buf), "%d", priornum); s += strlen(s); } @@ -603,8 +603,7 @@ done: } -static wordtab_t *yyfindkey(key) - char *key; +static wordtab_t *yyfindkey(char *key) { wordtab_t *w; @@ -677,7 +676,7 @@ yysetfixeddict(wordtab_t *newdict) if (yydebug) printf("yysetfixeddict(%lx)\n", (u_long)newdict); - if (yysavedepth == sizeof(yysavewords)/sizeof(yysavewords[0])) { + if (yysavedepth == nitems(yysavewords)) { fprintf(stderr, "%d: at maximum dictionary depth\n", yylineNum); return; @@ -696,7 +695,7 @@ yysetdict(wordtab_t *newdict) if (yydebug) printf("yysetdict(%lx)\n", (u_long)newdict); - if (yysavedepth == sizeof(yysavewords)/sizeof(yysavewords[0])) { + if (yysavedepth == nitems(yysavewords)) { fprintf(stderr, "%d: at maximum dictionary depth\n", yylineNum); return; diff --git a/sbin/ipf/common/lexer.h b/sbin/ipf/common/lexer.h index cc200f1cad41..c5f9a0c4183e 100644 --- a/sbin/ipf/common/lexer.h +++ b/sbin/ipf/common/lexer.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* * Copyright (C) 2012 by Darren Reed. diff --git a/sbin/ipf/common/opts.h b/sbin/ipf/common/opts.h index 17844e89ecfc..1281458c145a 100644 --- a/sbin/ipf/common/opts.h +++ b/sbin/ipf/common/opts.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* * Copyright (C) 2012 by Darren Reed. diff --git a/sbin/ipf/common/pcap-ipf.h b/sbin/ipf/common/pcap-ipf.h index b856760eaa53..ba596e795efa 100644 --- a/sbin/ipf/common/pcap-ipf.h +++ b/sbin/ipf/common/pcap-ipf.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* * Copyright (C) 2012 by Darren Reed. |
