aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2021-12-20 17:07:20 +0000
committerCy Schubert <cy@FreeBSD.org>2022-01-04 02:06:42 +0000
commitefeb8bffe34422937c7f8df836afb5b817366d16 (patch)
tree488c0bccb66ed43ceb0c87ec6c6c386f70ab4179 /sbin
parent064a5a95649d05ac084bcf2612cbac5575d76358 (diff)
downloadsrc-efeb8bffe34422937c7f8df836afb5b817366d16.tar.gz
src-efeb8bffe34422937c7f8df836afb5b817366d16.zip
ipflter: ANSIfy userland function declarations
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
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipf/common/ipf_y.y112
-rw-r--r--sbin/ipf/common/lexer.c54
-rw-r--r--sbin/ipf/ipf/ipf.c55
-rw-r--r--sbin/ipf/ipf/ipfcomp.c71
-rw-r--r--sbin/ipf/ipfs/ipfs.c41
-rw-r--r--sbin/ipf/ipfstat/ipfstat.c143
-rw-r--r--sbin/ipf/ipftest/ipftest.c55
-rw-r--r--sbin/ipf/ipftest/md5.c16
-rw-r--r--sbin/ipf/iplang/iplang_l.l14
-rw-r--r--sbin/ipf/iplang/iplang_y.y212
-rw-r--r--sbin/ipf/ipmon/ipmon.c109
-rw-r--r--sbin/ipf/ipmon/ipmon_y.y40
-rw-r--r--sbin/ipf/ipnat/ipnat.c53
-rw-r--r--sbin/ipf/ipnat/ipnat_y.y64
-rw-r--r--sbin/ipf/ippool/ippool.c61
-rw-r--r--sbin/ipf/ippool/ippool_y.y24
-rw-r--r--sbin/ipf/ipscan/ipscan_y.y43
-rw-r--r--sbin/ipf/ipsend/44arp.c6
-rw-r--r--sbin/ipf/ipsend/arp.c3
-rw-r--r--sbin/ipf/ipsend/dlcommon.c232
-rw-r--r--sbin/ipf/ipsend/ip.c39
-rw-r--r--sbin/ipf/ipsend/ipresend.c5
-rw-r--r--sbin/ipf/ipsend/ipsend.c17
-rw-r--r--sbin/ipf/ipsend/ipsopt.c10
-rw-r--r--sbin/ipf/ipsend/iptest.c5
-rw-r--r--sbin/ipf/ipsend/iptests.c48
-rw-r--r--sbin/ipf/ipsend/resend.c13
-rw-r--r--sbin/ipf/ipsend/sbpf.c10
-rw-r--r--sbin/ipf/ipsend/sdlpi.c8
-rw-r--r--sbin/ipf/ipsend/snit.c8
-rw-r--r--sbin/ipf/ipsend/sock.c21
-rw-r--r--sbin/ipf/ipsend/sockraw.c3
-rw-r--r--sbin/ipf/libipf/addipopt.c7
-rw-r--r--sbin/ipf/libipf/alist_free.c3
-rw-r--r--sbin/ipf/libipf/allocmbt.c3
-rw-r--r--sbin/ipf/libipf/assigndefined.c4
-rw-r--r--sbin/ipf/libipf/bcopywrap.c5
-rw-r--r--sbin/ipf/libipf/binprint.c5
-rw-r--r--sbin/ipf/libipf/buildopts.c5
-rw-r--r--sbin/ipf/libipf/checkrev.c4
-rw-r--r--sbin/ipf/libipf/count4bits.c4
-rw-r--r--sbin/ipf/libipf/count6bits.c4
-rw-r--r--sbin/ipf/libipf/dupmbt.c4
-rw-r--r--sbin/ipf/libipf/facpri.c12
-rw-r--r--sbin/ipf/libipf/familyname.c3
-rw-r--r--sbin/ipf/libipf/fill6bits.c5
-rw-r--r--sbin/ipf/libipf/findword.c5
-rw-r--r--sbin/ipf/libipf/freembt.c4
-rw-r--r--sbin/ipf/libipf/ftov.c3
-rw-r--r--sbin/ipf/libipf/gethost.c6
-rw-r--r--sbin/ipf/libipf/geticmptype.c5
-rw-r--r--sbin/ipf/libipf/getifname.c4
-rw-r--r--sbin/ipf/libipf/getnattype.c3
-rw-r--r--sbin/ipf/libipf/getport.c6
-rw-r--r--sbin/ipf/libipf/getportproto.c5
-rw-r--r--sbin/ipf/libipf/getproto.c6
-rw-r--r--sbin/ipf/libipf/getsumd.c4
-rw-r--r--sbin/ipf/libipf/icmptypename.c4
-rw-r--r--sbin/ipf/libipf/inet_addr.c7
-rw-r--r--sbin/ipf/libipf/interror.c10
-rw-r--r--sbin/ipf/libipf/ipf_dotuning.c5
-rw-r--r--sbin/ipf/libipf/ipf_perror.c13
-rw-r--r--sbin/ipf/libipf/ipft_hx.c17
-rw-r--r--sbin/ipf/libipf/ipft_pc.c26
-rw-r--r--sbin/ipf/libipf/ipft_tx.c36
-rw-r--r--sbin/ipf/libipf/ipoptsec.c8
-rw-r--r--sbin/ipf/libipf/kmem.c16
-rw-r--r--sbin/ipf/libipf/kmemcpywrap.c5
-rw-r--r--sbin/ipf/libipf/kvatoname.c5
-rw-r--r--sbin/ipf/libipf/load_dstlist.c5
-rw-r--r--sbin/ipf/libipf/load_dstlistnode.c7
-rw-r--r--sbin/ipf/libipf/load_hash.c5
-rw-r--r--sbin/ipf/libipf/load_hashnode.c8
-rw-r--r--sbin/ipf/libipf/load_pool.c4
-rw-r--r--sbin/ipf/libipf/load_poolnode.c8
-rw-r--r--sbin/ipf/libipf/mb_hexdump.c4
-rw-r--r--sbin/ipf/libipf/msgdsize.c3
-rw-r--r--sbin/ipf/libipf/mutex_emul.c18
-rw-r--r--sbin/ipf/libipf/nametokva.c5
-rw-r--r--sbin/ipf/libipf/nat_setgroupmap.c4
-rw-r--r--sbin/ipf/libipf/ntomask.c5
-rw-r--r--sbin/ipf/libipf/optname.c6
-rw-r--r--sbin/ipf/libipf/optprint.c5
-rw-r--r--sbin/ipf/libipf/optprintv6.c5
-rw-r--r--sbin/ipf/libipf/optvalue.c8
-rw-r--r--sbin/ipf/libipf/parsefields.c4
-rw-r--r--sbin/ipf/libipf/parseipfexpr.c4
-rw-r--r--sbin/ipf/libipf/parsewhoisline.c5
-rw-r--r--sbin/ipf/libipf/poolio.c6
-rw-r--r--sbin/ipf/libipf/prependmbt.c4
-rw-r--r--sbin/ipf/libipf/print_toif.c6
-rw-r--r--sbin/ipf/libipf/printactiveaddr.c5
-rw-r--r--sbin/ipf/libipf/printactivenat.c5
-rw-r--r--sbin/ipf/libipf/printaddr.c6
-rw-r--r--sbin/ipf/libipf/printaps.c4
-rw-r--r--sbin/ipf/libipf/printbuf.c4
-rw-r--r--sbin/ipf/libipf/printdstl_live.c8
-rw-r--r--sbin/ipf/libipf/printdstlist.c9
-rw-r--r--sbin/ipf/libipf/printdstlistdata.c4
-rw-r--r--sbin/ipf/libipf/printdstlistnode.c7
-rw-r--r--sbin/ipf/libipf/printdstlistpolicy.c3
-rw-r--r--sbin/ipf/libipf/printfieldhdr.c3
-rw-r--r--sbin/ipf/libipf/printfr.c4
-rw-r--r--sbin/ipf/libipf/printfraginfo.c4
-rw-r--r--sbin/ipf/libipf/printhash.c8
-rw-r--r--sbin/ipf/libipf/printhash_live.c7
-rw-r--r--sbin/ipf/libipf/printhashdata.c4
-rw-r--r--sbin/ipf/libipf/printhashnode.c8
-rw-r--r--sbin/ipf/libipf/printhost.c4
-rw-r--r--sbin/ipf/libipf/printhostmap.c4
-rw-r--r--sbin/ipf/libipf/printhostmask.c4
-rw-r--r--sbin/ipf/libipf/printifname.c4
-rw-r--r--sbin/ipf/libipf/printip.c4
-rw-r--r--sbin/ipf/libipf/printipfexpr.c15
-rw-r--r--sbin/ipf/libipf/printiphdr.c3
-rw-r--r--sbin/ipf/libipf/printlog.c3
-rw-r--r--sbin/ipf/libipf/printlookup.c4
-rw-r--r--sbin/ipf/libipf/printmask.c4
-rw-r--r--sbin/ipf/libipf/printnat.c4
-rw-r--r--sbin/ipf/libipf/printnataddr.c6
-rw-r--r--sbin/ipf/libipf/printnatfield.c4
-rw-r--r--sbin/ipf/libipf/printnatside.c4
-rw-r--r--sbin/ipf/libipf/printpacket.c4
-rw-r--r--sbin/ipf/libipf/printpacket6.c4
-rw-r--r--sbin/ipf/libipf/printpool.c8
-rw-r--r--sbin/ipf/libipf/printpool_live.c8
-rw-r--r--sbin/ipf/libipf/printpooldata.c4
-rw-r--r--sbin/ipf/libipf/printpoolfield.c5
-rw-r--r--sbin/ipf/libipf/printpoolnode.c5
-rw-r--r--sbin/ipf/libipf/printportcmp.c4
-rw-r--r--sbin/ipf/libipf/printproto.c5
-rw-r--r--sbin/ipf/libipf/printsbuf.c6
-rw-r--r--sbin/ipf/libipf/printstatefields.c4
-rw-r--r--sbin/ipf/libipf/printtcpflags.c3
-rw-r--r--sbin/ipf/libipf/printtqtable.c3
-rw-r--r--sbin/ipf/libipf/printtunable.c3
-rw-r--r--sbin/ipf/libipf/printunit.c3
-rw-r--r--sbin/ipf/libipf/remove_hash.c4
-rw-r--r--sbin/ipf/libipf/remove_hashnode.c6
-rw-r--r--sbin/ipf/libipf/remove_pool.c4
-rw-r--r--sbin/ipf/libipf/remove_poolnode.c7
-rw-r--r--sbin/ipf/libipf/resetlexer.c2
-rw-r--r--sbin/ipf/libipf/rwlock_emul.c32
-rw-r--r--sbin/ipf/libipf/save_execute.c10
-rw-r--r--sbin/ipf/libipf/save_file.c19
-rw-r--r--sbin/ipf/libipf/save_nothing.c7
-rw-r--r--sbin/ipf/libipf/save_syslog.c10
-rw-r--r--sbin/ipf/libipf/save_v1trap.c40
-rw-r--r--sbin/ipf/libipf/save_v2trap.c37
-rw-r--r--sbin/ipf/libipf/tcp_flags.c5
-rw-r--r--sbin/ipf/libipf/tcpflags.c3
-rw-r--r--sbin/ipf/libipf/v6optvalue.c6
-rw-r--r--sbin/ipf/libipf/var.c12
-rw-r--r--sbin/ipf/libipf/vtof.c3
154 files changed, 837 insertions, 1594 deletions
diff --git a/sbin/ipf/common/ipf_y.y b/sbin/ipf/common/ipf_y.y
index 2013fe5b9452..861d0ccd9a13 100644
--- a/sbin/ipf/common/ipf_y.y
+++ b/sbin/ipf/common/ipf_y.y
@@ -1983,11 +1983,8 @@ static struct wordtab logwords[] = {
-int ipf_parsefile(fd, addfunc, iocfuncs, filename)
-int fd;
-addfunc_t addfunc;
-ioctlfunc_t *iocfuncs;
-char *filename;
+int
+ipf_parsefile(int fd, addfunc_t addfunc, ioctlfunc_t *iocfuncs, char *filename)
{
FILE *fp = NULL;
char *s;
@@ -2019,11 +2016,8 @@ char *filename;
}
-int ipf_parsesome(fd, addfunc, iocfuncs, fp)
-int fd;
-addfunc_t addfunc;
-ioctlfunc_t *iocfuncs;
-FILE *fp;
+int
+ipf_parsesome(int fd, addfunc_t addfunc, ioctlfunc_t *iocfuncs, FILE *fp)
{
char *s;
int i;
@@ -2054,7 +2048,8 @@ FILE *fp;
}
-static void newrule()
+static void
+newrule(void)
{
frentry_t *frn;
@@ -2086,7 +2081,8 @@ static void newrule()
}
-static void setipftype()
+static void
+setipftype(void)
{
for (fr = frc; fr != NULL; fr = fr->fr_next) {
if (fr->fr_type == FR_T_NONE) {
@@ -2111,7 +2107,8 @@ static void setipftype()
}
-static frentry_t *addrule()
+static frentry_t *
+addrule(void)
{
frentry_t *f, *f1, *f2;
int count;
@@ -2141,9 +2138,7 @@ static frentry_t *addrule()
static int
-lookuphost(name, addrp)
- char *name;
- i6addr_t *addrp;
+lookuphost(char *name, i6addr_t *addrp)
{
int i;
@@ -2169,9 +2164,8 @@ lookuphost(name, addrp)
}
-static void dobpf(v, phrase)
-int v;
-char *phrase;
+static void
+dobpf(int v, char *phrase)
{
#ifdef IPFILTER_BPF
struct bpf_program bpf;
@@ -2264,7 +2258,8 @@ char *phrase;
}
-static void resetaddr()
+static void
+resetaddr(void)
{
hashed = 0;
pooled = 0;
@@ -2272,8 +2267,8 @@ static void resetaddr()
}
-static alist_t *newalist(ptr)
-alist_t *ptr;
+static alist_t *
+newalist(alist_t *ptr)
{
alist_t *al;
@@ -2287,8 +2282,7 @@ alist_t *ptr;
static int
-makepool(list)
- alist_t *list;
+makepool(alist_t *list)
{
ip_pool_node_t *n, *top;
ip_pool_t pool;
@@ -2344,8 +2338,8 @@ makepool(list)
}
-static u_int makehash(list)
-alist_t *list;
+static u_int
+makehash(alist_t *list)
{
iphtent_t *n, *top;
iphtable_t iph;
@@ -2393,10 +2387,8 @@ alist_t *list;
}
-int ipf_addrule(fd, ioctlfunc, ptr)
-int fd;
-ioctlfunc_t ioctlfunc;
-void *ptr;
+int
+ipf_addrule(int fd, ioctlfunc_t ioctlfunc, void *ptr)
{
ioctlcmd_t add, del;
frentry_t *fr;
@@ -2487,22 +2479,24 @@ void *ptr;
return 0;
}
-static void setsyslog()
+static void
+setsyslog(void)
{
yysetdict(logwords);
yybreakondot = 1;
}
-static void unsetsyslog()
+static void
+unsetsyslog(void)
{
yyresetdict();
yybreakondot = 0;
}
-static void fillgroup(fr)
-frentry_t *fr;
+static void
+fillgroup(frentry_t *fr)
{
frentry_t *f;
@@ -2544,8 +2538,8 @@ frentry_t *fr;
}
-static void doipfexpr(line)
-char *line;
+static void
+doipfexpr(char *line)
{
int *array;
char *error;
@@ -2563,9 +2557,8 @@ char *line;
}
-static void do_tuneint(varname, value)
-char *varname;
-int value;
+static void
+do_tuneint(char *varname, int value)
{
char buffer[80];
@@ -2577,8 +2570,8 @@ int value;
}
-static void do_tunestr(varname, value)
-char *varname, *value;
+static void
+do_tunestr(char *varname, char *value)
{
if (!strcasecmp(value, "true")) {
@@ -2591,10 +2584,8 @@ char *varname, *value;
}
-static void setifname(frp, idx, name)
-frentry_t **frp;
-int idx;
-char *name;
+static void
+setifname(frentry_t **frp, int idx, char *name)
{
int pos;
@@ -2605,9 +2596,8 @@ char *name;
}
-static int addname(frp, name)
-frentry_t **frp;
-char *name;
+static int
+addname(frentry_t **frp, char *name)
{
frentry_t *f;
int nlen;
@@ -2631,7 +2621,8 @@ char *name;
}
-static frentry_t *allocfr()
+static frentry_t *
+allocfr(void)
{
frentry_t *fr;
@@ -2654,9 +2645,8 @@ static frentry_t *allocfr()
}
-static void setgroup(frp, name)
-frentry_t **frp;
-char *name;
+static void
+setgroup(frentry_t **frp, char *name)
{
int pos;
@@ -2667,9 +2657,8 @@ char *name;
}
-static void setgrhead(frp, name)
-frentry_t **frp;
-char *name;
+static void
+setgrhead(frentry_t **frp, char *name)
{
int pos;
@@ -2680,9 +2669,8 @@ char *name;
}
-static void seticmphead(frp, name)
-frentry_t **frp;
-char *name;
+static void
+seticmphead(frentry_t **frp, char *name)
{
int pos;
@@ -2694,9 +2682,7 @@ char *name;
static void
-build_dstaddr_af(fp, ptr)
- frentry_t *fp;
- void *ptr;
+build_dstaddr_af(frentry_t *fp, void *ptr)
{
struct ipp_s *ipp = ptr;
frentry_t *f = fp;
@@ -2725,9 +2711,7 @@ build_dstaddr_af(fp, ptr)
static void
-build_srcaddr_af(fp, ptr)
- frentry_t *fp;
- void *ptr;
+build_srcaddr_af(frentry_t *fp, void *ptr)
{
struct ipp_s *ipp = ptr;
frentry_t *f = fp;
diff --git a/sbin/ipf/common/lexer.c b/sbin/ipf/common/lexer.c
index 2dc2c3e8fe8c..bb401612ad9d 100644
--- a/sbin/ipf/common/lexer.c
+++ b/sbin/ipf/common/lexer.c
@@ -60,8 +60,8 @@ static char *yytexttostr(int, int);
static void yystrtotext(char *);
static char *yytexttochar(void);
-static int yygetc(docont)
- int docont;
+static int
+yygetc(int docont)
{
int c;
@@ -98,8 +98,8 @@ static int yygetc(docont)
}
-static void yyunputc(c)
- int c;
+static void
+yyunputc(int c)
{
if (c == '\n')
yylineNum--;
@@ -107,8 +107,8 @@ static void yyunputc(c)
}
-static int yyswallow(last)
- int last;
+static int
+yyswallow(int last)
{
int c;
@@ -123,7 +123,8 @@ static int yyswallow(last)
}
-static char *yytexttochar()
+static char *
+yytexttochar(void)
{
int i;
@@ -134,8 +135,8 @@ static char *yytexttochar()
}
-static void yystrtotext(str)
- char *str;
+static void
+yystrtotext(char *str)
{
int len;
char *s;
@@ -150,8 +151,8 @@ static void yystrtotext(str)
}
-static char *yytexttostr(offset, max)
- int offset, max;
+static char *
+yytexttostr(int offset, int max)
{
char *str;
int i;
@@ -174,7 +175,8 @@ static char *yytexttostr(offset, max)
}
-int yylex()
+int
+yylex(void)
{
static int prior = 0;
static int priornum = 0;
@@ -616,8 +618,8 @@ static wordtab_t *yyfindkey(key)
}
-char *yykeytostr(num)
- int num;
+char *
+yykeytostr(int num)
{
wordtab_t *w;
@@ -631,8 +633,8 @@ char *yykeytostr(num)
}
-wordtab_t *yysettab(words)
- wordtab_t *words;
+wordtab_t *
+yysettab(wordtab_t *words)
{
wordtab_t *save;
@@ -642,8 +644,8 @@ wordtab_t *yysettab(words)
}
-void yyerror(msg)
- char *msg;
+void
+yyerror(char *msg)
{
char *txt, letter[2];
int freetxt = 0;
@@ -669,8 +671,8 @@ void yyerror(msg)
}
-void yysetfixeddict(newdict)
- wordtab_t *newdict;
+void
+yysetfixeddict(wordtab_t *newdict)
{
if (yydebug)
printf("yysetfixeddict(%lx)\n", (u_long)newdict);
@@ -688,8 +690,8 @@ void yysetfixeddict(newdict)
}
-void yysetdict(newdict)
- wordtab_t *newdict;
+void
+yysetdict(wordtab_t *newdict)
{
if (yydebug)
printf("yysetdict(%lx)\n", (u_long)newdict);
@@ -705,7 +707,8 @@ void yysetdict(newdict)
printf("yysavedepth++ => %d\n", yysavedepth);
}
-void yyresetdict()
+void
+yyresetdict(void)
{
if (yydebug)
printf("yyresetdict(%d)\n", yysavedepth);
@@ -720,9 +723,8 @@ void yyresetdict()
#ifdef TEST_LEXER
-int main(argc, argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
int n;
diff --git a/sbin/ipf/ipf/ipf.c b/sbin/ipf/ipf/ipf.c
index 406737e25d8e..3567a82484fb 100644
--- a/sbin/ipf/ipf/ipf.c
+++ b/sbin/ipf/ipf/ipf.c
@@ -66,9 +66,8 @@ static void usage()
}
-int main(argc,argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
int c, *filter = NULL;
@@ -171,9 +170,8 @@ int main(argc,argv)
}
-static int opendevice(ipfdev, check)
- char *ipfdev;
- int check;
+static int
+opendevice(char *ipfdev, int check)
{
if (opts & OPT_DONOTHING)
return -2;
@@ -194,14 +192,16 @@ static int opendevice(ipfdev, check)
}
-static void closedevice()
+static void
+closedevice(void)
{
close(fd);
fd = -1;
}
-static int get_flags()
+static int
+get_flags(void)
{
int i = 0;
@@ -214,8 +214,8 @@ static int get_flags()
}
-static void set_state(enable)
- u_int enable;
+static void
+set_state(u_int enable)
{
if (opendevice(ipfname, 0) != -2) {
if (ioctl(fd, SIOCFRENB, &enable) == -1) {
@@ -231,8 +231,8 @@ static void set_state(enable)
}
-static void procfile(file)
- char *file;
+static void
+procfile(char *file)
{
(void) opendevice(ipfname, 1);
@@ -248,10 +248,8 @@ static void procfile(file)
}
-static int ipf_interceptadd(fd, ioctlfunc, ptr)
- int fd;
- ioctlfunc_t ioctlfunc;
- void *ptr;
+static int
+ipf_interceptadd(int fd, ioctlfunc_t ioctlfunc, void *ptr)
{
if (outputc)
printc(ptr);
@@ -262,8 +260,8 @@ static int ipf_interceptadd(fd, ioctlfunc, ptr)
}
-static void packetlogon(opt)
- char *opt;
+static void
+packetlogon(char *opt)
{
int flag, xfd, logopt, change = 0;
@@ -346,9 +344,8 @@ static void packetlogon(opt)
}
-static void flushfilter(arg, filter)
- char *arg;
- int *filter;
+static void
+flushfilter(char *arg, int *filter)
{
int fl = 0, rem;
@@ -441,7 +438,8 @@ static void flushfilter(arg, filter)
}
-static void swapactive()
+static void
+swapactive(void)
{
int in = 2;
@@ -452,7 +450,8 @@ static void swapactive()
}
-void ipf_frsync()
+void
+ipf_frsync(void)
{
int frsyn = 0;
@@ -463,7 +462,8 @@ void ipf_frsync()
}
-void zerostats()
+void
+zerostats(void)
{
ipfobj_t obj;
friostat_t fio;
@@ -488,8 +488,8 @@ void zerostats()
/*
* read the kernel stats for packets blocked and passed
*/
-static void showstats(fp)
- friostat_t *fp;
+static void
+showstats(friostat_t *fp)
{
printf("bad packets:\t\tin %lu\tout %lu\n",
fp->f_st[0].fr_bad, fp->f_st[1].fr_bad);
@@ -508,7 +508,8 @@ static void showstats(fp)
}
-static int showversion()
+static int
+showversion(void)
{
struct friostat fio;
ipfobj_t ipfo;
diff --git a/sbin/ipf/ipf/ipfcomp.c b/sbin/ipf/ipf/ipfcomp.c
index 5bbb35c610fa..105ff2b852e8 100644
--- a/sbin/ipf/ipf/ipfcomp.c
+++ b/sbin/ipf/ipf/ipfcomp.c
@@ -62,8 +62,8 @@ static FILE *cfile = NULL;
* This is called once per filter rule being loaded to emit data structures
* required.
*/
-void printc(fr)
- frentry_t *fr;
+void
+printc(frentry_t *fr)
{
u_long *ulp;
char *and;
@@ -162,9 +162,8 @@ void printc(fr)
static frgroup_t *groups = NULL;
-static void addrule(fp, fr)
- FILE *fp;
- frentry_t *fr;
+static void
+addrule(FILE *fp, frentry_t *fr)
{
frentry_t *f, **fpp;
frgroup_t *g;
@@ -243,8 +242,8 @@ static u_long ipf%s_rule_data_%s_%u[] = {\n",
}
-int intcmp(c1, c2)
- const void *c1, *c2;
+int
+intcmp(const void *c1, const void *c2)
{
const mc_t *i1 = (const mc_t *)c1, *i2 = (const mc_t *)c2;
@@ -255,18 +254,15 @@ int intcmp(c1, c2)
}
-static void indent(fp, in)
- FILE *fp;
- int in;
+static void
+indent(FILE *fp, int in)
{
for (; in; in--)
fputc('\t', fp);
}
-static void printeq(fp, var, m, max, v)
- FILE *fp;
- char *var;
- int m, max, v;
+static void
+printeq(FILE *fp, char *var, int m, int max, int v)
{
if (m == max)
fprintf(fp, "%s == %#x) {\n", var, v);
@@ -280,10 +276,8 @@ static void printeq(fp, var, m, max, v)
* m - netmask
* v - required address
*/
-static void printipeq(fp, var, fl, m, v)
- FILE *fp;
- char *var;
- int fl, m, v;
+static void
+printipeq(FILE *fp, char *var, int fl, int m, int v)
{
if (m == 0xffffffff)
fprintf(fp, "%s ", var);
@@ -294,10 +288,8 @@ static void printipeq(fp, var, fl, m, v)
}
-void emit(num, dir, v, fr)
- int num, dir;
- void *v;
- frentry_t *fr;
+void
+emit(int num, int dir, void *v, frentry_t *fr)
{
u_int incnt, outcnt;
frgroup_t *g;
@@ -346,9 +338,8 @@ void emit(num, dir, v, fr)
}
-static void emitheader(grp, incount, outcount)
- frgroup_t *grp;
- u_int incount, outcount;
+static void
+emitheader(frgroup_t *grp, u_int incount, u_int outcount)
{
static FILE *fph = NULL;
frgroup_t *g;
@@ -401,7 +392,8 @@ extern int ipfrule_remove_out_%s(void));\n",
}
}
-static void emittail()
+static void
+emittail(void)
{
frgroup_t *g;
@@ -438,12 +430,9 @@ int ipfrule_remove()\n\
}
-static void emitGroup(num, dir, v, fr, group, incount, outcount)
- int num, dir;
- void *v;
- frentry_t *fr;
- char *group;
- u_int incount, outcount;
+static void
+emitGroup(int num, int dir, void *v, frentry_t *fr, char *group,
+ u_int incount, u_int outcount)
{
static FILE *fp = NULL;
static int header[2] = { 0, 0 };
@@ -956,8 +945,8 @@ static void emitGroup(num, dir, v, fr, group, incount, outcount)
}
-void printC(dir)
- int dir;
+void
+printC(int dir)
{
static mc_t *m = NULL;
frgroup_t *g;
@@ -979,11 +968,8 @@ void printC(dir)
/*
* Now print out code to implement all of the rules.
*/
-static void printCgroup(dir, top, m, group)
- int dir;
- frentry_t *top;
- mc_t *m;
- char *group;
+static void
+printCgroup(int dir, frentry_t *top, mc_t *m, char *group)
{
frentry_t *fr, *fr1;
int i, n, rn;
@@ -1229,11 +1215,8 @@ static void printCgroup(dir, top, m, group)
}
}
-static void printhooks(fp, in, out, grp)
- FILE *fp;
- int in;
- int out;
- frgroup_t *grp;
+static void
+printhooks(FILE *fp, int in, int out, frgroup_t *grp)
{
frentry_t *fr;
char *group;
diff --git a/sbin/ipf/ipfs/ipfs.c b/sbin/ipf/ipfs/ipfs.c
index e9a535977bd9..680d2659ca51 100644
--- a/sbin/ipf/ipfs/ipfs.c
+++ b/sbin/ipf/ipfs/ipfs.c
@@ -87,8 +87,7 @@ void usage()
/*
* Change interface names in state information saved out to disk.
*/
-int changestateif(ifs, fname)
- char *ifs, *fname;
+int changestateif(char *ifs, char *fname)
{
int fd, olen, nlen, rw;
ipstate_save_t ips;
@@ -150,8 +149,7 @@ int changestateif(ifs, fname)
/*
* Change interface names in NAT information saved out to disk.
*/
-int changenatif(ifs, fname)
- char *ifs, *fname;
+int changenatif(char *ifs, char *fname)
{
int fd, olen, nlen, rw;
nat_save_t ipn;
@@ -204,9 +202,7 @@ int changenatif(ifs, fname)
}
-int main(argc,argv)
- int argc;
- char *argv[];
+int main(int argc, char *argv[])
{
int c, lock = -1, devfd = -1, err = 0, rw = -1, ns = -1, set = 0;
char *dirname = NULL, *filename = NULL, *ifs = NULL;
@@ -335,8 +331,7 @@ int main(argc,argv)
}
-int opendevice(ipfdev)
- char *ipfdev;
+int opendevice(char *ipfdev)
{
int fd = -1;
@@ -353,15 +348,13 @@ int opendevice(ipfdev)
}
-void closedevice(fd)
- int fd;
+void closedevice(int fd)
{
close(fd);
}
-int setlock(fd, lock)
- int fd, lock;
+int setlock(int fd, int lock)
{
if (opts & OPT_VERBOSE)
printf("Turn lock %s\n", lock ? "on" : "off");
@@ -377,9 +370,7 @@ int setlock(fd, lock)
}
-int writestate(fd, file)
- int fd;
- char *file;
+int writestate(int fd, char *file)
{
ipstate_save_t ips, *ipsp;
ipfobj_t obj;
@@ -429,9 +420,7 @@ int writestate(fd, file)
}
-int readstate(fd, file)
- int fd;
- char *file;
+int readstate(int fd, char *file)
{
ipstate_save_t ips, *is, *ipshead = NULL, *is1, *ipstail = NULL;
int sfd = -1, i;
@@ -546,9 +535,7 @@ freeipshead:
}
-int readnat(fd, file)
- int fd;
- char *file;
+int readnat(int fd, char *file)
{
nat_save_t ipn, *in, *ipnhead = NULL, *in1, *ipntail = NULL;
ipfobj_t obj;
@@ -693,9 +680,7 @@ freenathead:
}
-int writenat(fd, file)
- int fd;
- char *file;
+int writenat(int fd, char *file)
{
nat_save_t *ipnp = NULL, *next = NULL;
ipfobj_t obj;
@@ -777,8 +762,7 @@ int writenat(fd, file)
}
-int writeall(dirname)
- char *dirname;
+int writeall(char *dirname)
{
int fd, devfd;
@@ -828,8 +812,7 @@ bad:
}
-int readall(dirname)
- char *dirname;
+int readall(char *dirname)
{
int fd, devfd;
diff --git a/sbin/ipf/ipfstat/ipfstat.c b/sbin/ipf/ipfstat/ipfstat.c
index 4517d3e857b4..93345a79e007 100644
--- a/sbin/ipf/ipfstat/ipfstat.c
+++ b/sbin/ipf/ipfstat/ipfstat.c
@@ -183,9 +183,7 @@ static void usage(name)
}
-int main(argc,argv)
- int argc;
- char *argv[];
+int main(int argc, char *argv[])
{
ipf_authstat_t frauthst;
ipf_authstat_t *frauthstp = &frauthst;
@@ -453,13 +451,9 @@ int main(argc,argv)
* Fill in the stats structures from the live kernel, using a combination
* of ioctl's and copying directly from kernel memory.
*/
-static void ipfstate_live(device, fiopp, ipsstpp, ifrstpp, frauthstpp, frfp)
- char *device;
- friostat_t **fiopp;
- ips_stat_t **ipsstpp;
- ipfrstat_t **ifrstpp;
- ipf_authstat_t **frauthstpp;
- u_32_t *frfp;
+static void ipfstate_live(char *device, friostat_t **fiopp,
+ ips_stat_t **ipsstpp, ipfrstat_t **ifrstpp,
+ ipf_authstat_t **frauthstpp, u_32_t *frfp)
{
ipfobj_t ipfo;
@@ -538,13 +532,9 @@ static void ipfstate_live(device, fiopp, ipsstpp, ifrstpp, frauthstpp, frfp)
* This is mainly useful when looking at data in crash dumps and ioctl's
* just won't work any more.
*/
-static void ipfstate_dead(kernel, fiopp, ipsstpp, ifrstpp, frauthstpp, frfp)
- char *kernel;
- friostat_t **fiopp;
- ips_stat_t **ipsstpp;
- ipfrstat_t **ifrstpp;
- ipf_authstat_t **frauthstpp;
- u_32_t *frfp;
+static void ipfstate_dead( char *kernel, friostat_t **fiopp,
+ ips_stat_t **ipsstpp, ipfrstat_t **ifrstpp,
+ ipf_authstat_t **frauthstpp, u_32_t *frfp)
{
static ipf_authstat_t frauthst, *frauthstp;
static ipftq_t ipstcptab[IPF_TCP_NSTATES];
@@ -710,9 +700,7 @@ static void ipfstate_dead(kernel, fiopp, ipsstpp, ifrstpp, frauthstpp, frfp)
}
-static void printside(side, frs)
- char *side;
- ipf_statistics_t *frs;
+static void printside(char *side, ipf_statistics_t *frs)
{
int i;
@@ -748,9 +736,7 @@ static void printside(side, frs)
* Display the kernel stats for packets blocked and passed and other
* associated running totals which are kept.
*/
-static void showstats(fp, frf)
- struct friostat *fp;
- u_32_t frf;
+static void showstats( struct friostat *fp, u_32_t frf)
{
printside("input", &fp->f_st[0]);
printside("output", &fp->f_st[1]);
@@ -781,11 +767,8 @@ static void showstats(fp, frf)
* Print out a list of rules from the kernel, starting at the one passed.
*/
static int
-printlivelist(fiop, out, set, fp, group, comment)
- struct friostat *fiop;
- int out, set;
- frentry_t *fp;
- char *group, *comment;
+printlivelist( struct friostat *fiop, int out, int set, frentry_t *fp,
+ char *group, char *comment)
{
struct frentry fb;
ipfruleiter_t rule;
@@ -912,11 +895,8 @@ printlivelist(fiop, out, set, fp, group, comment)
}
-static void printdeadlist(fiop, out, set, fp, group, comment)
- friostat_t *fiop;
- int out, set;
- frentry_t *fp;
- char *group, *comment;
+static void printdeadlist(friostat_t *fiop, int out, int set, frentry_t *fp,
+ char *group, char *comment)
{
frgroup_t *grtop, *grtail, *g;
struct frentry fb;
@@ -1022,8 +1002,7 @@ static void printdeadlist(fiop, out, set, fp, group, comment)
* print out all of the asked for rule sets, using the stats struct as
* the base from which to get the pointers.
*/
-static void showlist(fiop)
- struct friostat *fiop;
+static void showlist(struct friostat *fiop)
{
struct frentry *fp = NULL;
int i, set;
@@ -1082,9 +1061,7 @@ static void showlist(fiop)
/*
* Display ipfilter stateful filtering information
*/
-static void showipstates(ipsp, filter)
- ips_stat_t *ipsp;
- int *filter;
+static void showipstates(ips_stat_t *ipsp, int *filter)
{
ipstate_t *is;
int i;
@@ -1136,8 +1113,7 @@ static void showipstates(ipsp, filter)
}
-static void showstatestats(ipsp)
- ips_stat_t *ipsp;
+static void showstatestats(ips_stat_t *ipsp)
{
int minlen, maxlen, totallen;
ipftable_t table;
@@ -1301,17 +1277,8 @@ static void showstatestats(ipsp)
#ifdef STATETOP
static int handle_resize = 0, handle_break = 0;
-static void topipstates(saddr, daddr, sport, dport, protocol, ver,
- refreshtime, topclosed, filter)
- i6addr_t saddr;
- i6addr_t daddr;
- int sport;
- int dport;
- int protocol;
- int ver;
- int refreshtime;
- int topclosed;
- int *filter;
+static void topipstates(i6addr_t saddr, i6addr_t daddr, int sport, int dport,
+ int protocol, int ver, int refreshtime, int topclosed, int *filter)
{
char str1[STSTRSIZE], str2[STSTRSIZE], str3[STSTRSIZE], str4[STSTRSIZE];
int maxtsentries = 0, reverse = 0, sorting = STSORT_DEFAULT;
@@ -1747,9 +1714,7 @@ out:
/*
* Show fragment cache information that's held in the kernel.
*/
-static void showfrstates(ifsp, ticks)
- ipfrstat_t *ifsp;
- u_long ticks;
+static void showfrstates(ipfrstat_t *ifsp, u_long ticks)
{
struct ipfr *ipfrtab[IPFT_SIZE], ifr;
int i;
@@ -1829,8 +1794,7 @@ static void showfrstates(ifsp, ticks)
/*
* Show stats on how auth within IPFilter has been used
*/
-static void showauthstates(asp)
- ipf_authstat_t *asp;
+static void showauthstates(ipf_authstat_t *asp)
{
frauthent_t *frap, fra;
ipfgeniter_t auth;
@@ -1880,8 +1844,7 @@ static void showauthstates(asp)
* Display groups used for each of filter rules, accounting rules and
* authentication, separately.
*/
-static void showgroups(fiop)
- struct friostat *fiop;
+static void showgroups(struct friostat *fiop)
{
static char *gnames[3] = { "Filter", "Accounting", "Authentication" };
static int gnums[3] = { IPL_LOGIPF, IPL_LOGCOUNT, IPL_LOGAUTH };
@@ -1910,10 +1873,7 @@ static void showgroups(fiop)
}
-static void parse_ipportstr(argument, ip, port)
- const char *argument;
- i6addr_t *ip;
- int *port;
+static void parse_ipportstr(const char *argument, i6addr_t *ip, int *port)
{
char *s, *comma;
int ok = 0;
@@ -1964,21 +1924,17 @@ static void parse_ipportstr(argument, ip, port)
#ifdef STATETOP
-static void sig_resize(s)
- int s;
+static void sig_resize(int s)
{
handle_resize = 1;
}
-static void sig_break(s)
- int s;
+static void sig_break(int s)
{
handle_break = 1;
}
-static char *getip(v, addr)
- int v;
- i6addr_t *addr;
+static char *getip(int v, i6addr_t *addr)
{
#ifdef USE_INET6
static char hostbuf[MAXHOSTNAMELEN+1];
@@ -2000,8 +1956,7 @@ static char *getip(v, addr)
}
-static char *ttl_to_string(ttl)
- long int ttl;
+static char *ttl_to_string(long int ttl)
{
static char ttlbuf[STSTRSIZE];
int hours, minutes, seconds;
@@ -2022,9 +1977,7 @@ static char *ttl_to_string(ttl)
}
-static int sort_pkts(a, b)
- const void *a;
- const void *b;
+static int sort_pkts(const void *a, const void *b)
{
register const statetop_t *ap = a;
@@ -2038,9 +1991,7 @@ static int sort_pkts(a, b)
}
-static int sort_bytes(a, b)
- const void *a;
- const void *b;
+static int sort_bytes(const void *a, const void *b)
{
register const statetop_t *ap = a;
register const statetop_t *bp = b;
@@ -2053,9 +2004,7 @@ static int sort_bytes(a, b)
}
-static int sort_p(a, b)
- const void *a;
- const void *b;
+static int sort_p(const void *a, const void *b)
{
register const statetop_t *ap = a;
register const statetop_t *bp = b;
@@ -2068,9 +2017,7 @@ static int sort_p(a, b)
}
-static int sort_ttl(a, b)
- const void *a;
- const void *b;
+static int sort_ttl(const void *a, const void *b)
{
register const statetop_t *ap = a;
register const statetop_t *bp = b;
@@ -2082,9 +2029,7 @@ static int sort_ttl(a, b)
return -1;
}
-static int sort_srcip(a, b)
- const void *a;
- const void *b;
+static int sort_srcip(const void *a, const void *b)
{
register const statetop_t *ap = a;
register const statetop_t *bp = b;
@@ -2108,9 +2053,7 @@ static int sort_srcip(a, b)
return -1;
}
-static int sort_srcpt(a, b)
- const void *a;
- const void *b;
+static int sort_srcpt(const void *a, const void *b)
{
register const statetop_t *ap = a;
register const statetop_t *bp = b;
@@ -2122,9 +2065,7 @@ static int sort_srcpt(a, b)
return -1;
}
-static int sort_dstip(a, b)
- const void *a;
- const void *b;
+static int sort_dstip(const void *a, const void *b)
{
register const statetop_t *ap = a;
register const statetop_t *bp = b;
@@ -2148,9 +2089,7 @@ static int sort_dstip(a, b)
return -1;
}
-static int sort_dstpt(a, b)
- const void *a;
- const void *b;
+static int sort_dstpt(const void *a, const void *b)
{
register const statetop_t *ap = a;
register const statetop_t *bp = b;
@@ -2165,8 +2104,7 @@ static int sort_dstpt(a, b)
#endif
-ipstate_t *fetchstate(src, dst)
- ipstate_t *src, *dst;
+ipstate_t *fetchstate(ipstate_t *src, ipstate_t *dst)
{
if (live_kernel == 1) {
@@ -2196,9 +2134,7 @@ ipstate_t *fetchstate(src, dst)
}
-static int fetchfrag(fd, type, frp)
- int fd, type;
- ipfr_t *frp;
+static int fetchfrag( int fd, int type, ipfr_t *frp)
{
ipfgeniter_t frag;
ipfobj_t obj;
@@ -2218,9 +2154,7 @@ static int fetchfrag(fd, type, frp)
}
-static int state_matcharray(stp, array)
- ipstate_t *stp;
- int *array;
+static int state_matcharray(ipstate_t *stp, int *array)
{
int i, n, *x, rv, p;
ipfexp_t *e;
@@ -2365,8 +2299,7 @@ static int state_matcharray(stp, array)
}
-static void showtqtable_live(fd)
- int fd;
+static void showtqtable_live(int fd)
{
ipftq_t table[IPF_TCP_NSTATES];
ipfobj_t obj;
diff --git a/sbin/ipf/ipftest/ipftest.c b/sbin/ipf/ipftest/ipftest.c
index d7f97c1fa66b..df77dd650ffa 100644
--- a/sbin/ipf/ipftest/ipftest.c
+++ b/sbin/ipf/ipftest/ipftest.c
@@ -63,9 +63,7 @@ static ipf_main_softc_t *softc = NULL;
int
-main(argc,argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
char *datain, *iface, *ifname, *logout;
int fd, i, dir, c, loaded, dump, hlen;
@@ -354,7 +352,8 @@ int ipftestioctl(int dev, ioctlcmd_t cmd, ...)
}
-int ipnattestioctl(int dev, ioctlcmd_t cmd, ...)
+int
+ipnattestioctl(int dev, ioctlcmd_t cmd, ...)
{
caddr_t data;
va_list ap;
@@ -377,7 +376,8 @@ int ipnattestioctl(int dev, ioctlcmd_t cmd, ...)
}
-int ipstatetestioctl(int dev, ioctlcmd_t cmd, ...)
+int
+ipstatetestioctl(int dev, ioctlcmd_t cmd, ...)
{
caddr_t data;
va_list ap;
@@ -400,7 +400,8 @@ int ipstatetestioctl(int dev, ioctlcmd_t cmd, ...)
}
-int ipauthtestioctl(int dev, ioctlcmd_t cmd, ...)
+int
+ipauthtestioctl(int dev, ioctlcmd_t cmd, ...)
{
caddr_t data;
va_list ap;
@@ -423,7 +424,8 @@ int ipauthtestioctl(int dev, ioctlcmd_t cmd, ...)
}
-int ipscantestioctl(int dev, ioctlcmd_t cmd, ...)
+int
+ipscantestioctl(int dev, ioctlcmd_t cmd, ...)
{
caddr_t data;
va_list ap;
@@ -446,7 +448,8 @@ int ipscantestioctl(int dev, ioctlcmd_t cmd, ...)
}
-int ipsynctestioctl(int dev, ioctlcmd_t cmd, ...)
+int
+ipsynctestioctl(int dev, ioctlcmd_t cmd, ...)
{
caddr_t data;
va_list ap;
@@ -469,7 +472,8 @@ int ipsynctestioctl(int dev, ioctlcmd_t cmd, ...)
}
-int ipooltestioctl(int dev, ioctlcmd_t cmd, ...)
+int
+ipooltestioctl(int dev, ioctlcmd_t cmd, ...)
{
caddr_t data;
va_list ap;
@@ -492,20 +496,16 @@ int ipooltestioctl(int dev, ioctlcmd_t cmd, ...)
}
-int kmemcpy(addr, offset, size)
- char *addr;
- long offset;
- int size;
+int
+kmemcpy(char *addr, long offset, int size)
{
bcopy((char *)offset, addr, size);
return 0;
}
-int kstrncpy(buf, pos, n)
- char *buf;
- long pos;
- int n;
+int
+kstrncpy(char *buf, long pos, int n)
{
char *ptr;
@@ -520,8 +520,8 @@ int kstrncpy(buf, pos, n)
/*
* Display the built up NAT table rules and mapping entries.
*/
-void dumpnat(arg)
- void *arg;
+void
+dumpnat(void *arg)
{
ipf_nat_softc_t *softn = arg;
hostmap_t *hm;
@@ -544,8 +544,8 @@ void dumpnat(arg)
}
-void dumpgroups(softc)
- ipf_main_softc_t *softc;
+void
+dumpgroups(ipf_main_softc_t *softc)
{
frgroup_t *fg;
int i;
@@ -587,8 +587,8 @@ void dumpgroups(softc)
dumprules(softc->ipf_acct[1][1]);
}
-void dumprules(rulehead)
- frentry_t *rulehead;
+void
+dumprules(frentry_t *rulehead)
{
frentry_t *fr;
@@ -603,8 +603,8 @@ void dumprules(rulehead)
}
-void drain_log(filename)
- char *filename;
+void
+drain_log(char *filename)
{
char buffer[DEFAULT_IPFLOGSIZE];
struct iovec iov;
@@ -645,9 +645,8 @@ void drain_log(filename)
}
-void fixv4sums(m, ip)
- mb_t *m;
- ip_t *ip;
+void
+fixv4sums(mb_t *m, ip_t *ip)
{
u_char *csump, *hdr, p;
fr_info_t tmp;
diff --git a/sbin/ipf/ipftest/md5.c b/sbin/ipf/ipftest/md5.c
index 899bb91700ba..b9e8ff99de82 100644
--- a/sbin/ipf/ipftest/md5.c
+++ b/sbin/ipf/ipftest/md5.c
@@ -105,8 +105,7 @@ static unsigned char PADDING[64] = {
/* The routine MD5Init initializes the message-digest context
mdContext. All fields are set to zero.
*/
-void MD5Init (mdContext)
-MD5_CTX *mdContext;
+void MD5Init (MD5_CTX *mdContext)
{
mdContext->i[0] = mdContext->i[1] = (UINT4)0;
@@ -122,10 +121,7 @@ MD5_CTX *mdContext;
account for the presence of each of the characters inBuf[0..inLen-1]
in the message whose digest is being computed.
*/
-void MD5Update (mdContext, inBuf, inLen)
-MD5_CTX *mdContext;
-unsigned char *inBuf;
-unsigned int inLen;
+void MD5Update (MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen)
{
UINT4 in[16];
int mdi;
@@ -160,9 +156,7 @@ unsigned int inLen;
/* The routine MD5Final terminates the message-digest computation and
ends with the desired message digest in mdContext->digest[0...15].
*/
-void MD5Final (hash, mdContext)
-unsigned char hash[];
-MD5_CTX *mdContext;
+void MD5Final (unsigned char hash[], MD5_CTX *mdContext)
{
UINT4 in[16];
int mdi;
@@ -203,9 +197,7 @@ MD5_CTX *mdContext;
/* Basic MD5 step. Transforms buf based on in.
*/
-static void Transform (buf, in)
-UINT4 *buf;
-UINT4 *in;
+static void Transform (UINT4 *buf, UINT4 *in)
{
UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
diff --git a/sbin/ipf/iplang/iplang_l.l b/sbin/ipf/iplang/iplang_l.l
index f8b1b82d4707..ba807edb9a70 100644
--- a/sbin/ipf/iplang/iplang_l.l
+++ b/sbin/ipf/iplang/iplang_l.l
@@ -185,7 +185,7 @@ char *msg;
}
-void push_proto()
+void push_proto(void)
{
numpr++;
if (!prstack)
@@ -197,7 +197,7 @@ void push_proto()
}
-void pop_proto()
+void pop_proto(void)
{
numpr--;
ipproto = prstack[numpr];
@@ -210,7 +210,7 @@ void pop_proto()
}
-int save_token()
+int save_token(void)
{
yylval.str = strdup((char *)yytext);
@@ -218,8 +218,7 @@ int save_token()
}
-int next_item(nstate)
-int nstate;
+int next_item(int nstate)
{
struct lwordtab *wt;
@@ -244,8 +243,7 @@ int nstate;
}
-int next_state(nstate, fornext)
-int nstate, fornext;
+int next_state(int nstate, int fornext)
{
next = fornext;
@@ -304,7 +302,7 @@ int nstate, fornext;
}
-void swallow()
+void swallow(void)
{
int c;
diff --git a/sbin/ipf/iplang/iplang_y.y b/sbin/ipf/iplang/iplang_y.y
index 484fe1951d52..c098b98d6a75 100644
--- a/sbin/ipf/iplang/iplang_y.y
+++ b/sbin/ipf/iplang/iplang_y.y
@@ -615,9 +615,7 @@ char *pr, *name;
}
-struct ether_addr *geteaddr(arg, buf)
-char *arg;
-struct ether_addr *buf;
+struct ether_addr *geteaddr(char *arg, struct ether_addr *buf)
{
struct ether_addr *e;
@@ -635,8 +633,7 @@ struct ether_addr *buf;
}
-void *new_header(type)
-int type;
+void *new_header(int type)
{
aniphdr_t *aip, *oip = canip;
int sz = 0;
@@ -676,7 +673,7 @@ int type;
}
-void free_aniplist()
+void free_aniplist(void)
{
aniphdr_t *aip, **aipp = &aniphead;
@@ -688,8 +685,7 @@ void free_aniplist()
}
-void inc_anipheaders(inc)
-int inc;
+void inc_anipheaders(int inc)
{
aniphdr_t *aip;
@@ -703,15 +699,14 @@ int inc;
}
-void new_data()
+void new_data(void)
{
(void) new_header(-1);
canip->ah_len = 0;
}
-void set_datalen(arg)
-char **arg;
+void set_datalen(char **arg)
{
int len;
@@ -722,8 +717,7 @@ char **arg;
}
-void set_data(arg)
-char **arg;
+void set_data(char **arg)
{
u_char *s = (u_char *)*arg, *t = (u_char *)canip->ah_data, c;
int len = 0, todo = 0, quote = 0, val = 0;
@@ -793,8 +787,7 @@ char **arg;
}
-void set_datafile(arg)
-char **arg;
+void set_datafile(char **arg)
{
struct stat sb;
char *file = *arg;
@@ -826,7 +819,7 @@ char **arg;
}
-void new_packet()
+void new_packet(void)
{
static u_short id = 0;
@@ -857,8 +850,7 @@ char **arg;
}
-void set_ipv4src(arg)
-char **arg;
+void set_ipv4src(char **arg)
{
ip->ip_src = getipv4addr(*arg);
free(*arg);
@@ -866,8 +858,7 @@ char **arg;
}
-void set_ipv4dst(arg)
-char **arg;
+void set_ipv4dst(char **arg)
{
ip->ip_dst = getipv4addr(*arg);
free(*arg);
@@ -875,8 +866,7 @@ char **arg;
}
-void set_ipv4off(arg)
-char **arg;
+void set_ipv4off(char **arg)
{
ip->ip_off = htons(strtol(*arg, NULL, 0));
free(*arg);
@@ -884,8 +874,7 @@ char **arg;
}
-void set_ipv4v(arg)
-char **arg;
+void set_ipv4v(char **arg)
{
ip->ip_v = strtol(*arg, NULL, 0);
free(*arg);
@@ -893,8 +882,7 @@ char **arg;
}
-void set_ipv4hl(arg)
-char **arg;
+void set_ipv4hl(char **arg)
{
int newhl, inc;
@@ -908,8 +896,7 @@ char **arg;
}
-void set_ipv4ttl(arg)
-char **arg;
+void set_ipv4ttl(char **arg)
{
ip->ip_ttl = strtol(*arg, NULL, 0);
free(*arg);
@@ -917,8 +904,7 @@ char **arg;
}
-void set_ipv4tos(arg)
-char **arg;
+void set_ipv4tos(char **arg)
{
ip->ip_tos = strtol(*arg, NULL, 0);
free(*arg);
@@ -926,8 +912,7 @@ char **arg;
}
-void set_ipv4id(arg)
-char **arg;
+void set_ipv4id(char **arg)
{
ip->ip_id = htons(strtol(*arg, NULL, 0));
free(*arg);
@@ -935,8 +920,7 @@ char **arg;
}
-void set_ipv4sum(arg)
-char **arg;
+void set_ipv4sum(char **arg)
{
ip->ip_sum = strtol(*arg, NULL, 0);
free(*arg);
@@ -944,8 +928,7 @@ char **arg;
}
-void set_ipv4len(arg)
-char **arg;
+void set_ipv4len(char **arg)
{
int len;
@@ -957,7 +940,7 @@ char **arg;
}
-void new_tcpheader()
+void new_tcpheader(void)
{
if ((ip->ip_p) && (ip->ip_p != IPPROTO_TCP)) {
@@ -972,8 +955,7 @@ void new_tcpheader()
}
-void set_tcpsport(arg)
-char **arg;
+void set_tcpsport(char **arg)
{
u_short *port;
char *pr;
@@ -992,8 +974,7 @@ char **arg;
}
-void set_tcpdport(arg)
-char **arg;
+void set_tcpdport(char **arg)
{
u_short *port;
char *pr;
@@ -1012,8 +993,7 @@ char **arg;
}
-void set_tcpseq(arg)
-char **arg;
+void set_tcpseq(char **arg)
{
tcp->th_seq = htonl(strtol(*arg, NULL, 0));
free(*arg);
@@ -1021,8 +1001,7 @@ char **arg;
}
-void set_tcpack(arg)
-char **arg;
+void set_tcpack(char **arg)
{
tcp->th_ack = htonl(strtol(*arg, NULL, 0));
free(*arg);
@@ -1030,8 +1009,7 @@ char **arg;
}
-void set_tcpoff(arg)
-char **arg;
+void set_tcpoff(char **arg)
{
int off;
@@ -1043,8 +1021,7 @@ char **arg;
}
-void set_tcpurp(arg)
-char **arg;
+void set_tcpurp(char **arg)
{
tcp->th_urp = htons(strtol(*arg, NULL, 0));
free(*arg);
@@ -1052,8 +1029,7 @@ char **arg;
}
-void set_tcpwin(arg)
-char **arg;
+void set_tcpwin(char **arg)
{
tcp->th_win = htons(strtol(*arg, NULL, 0));
free(*arg);
@@ -1061,8 +1037,7 @@ char **arg;
}
-void set_tcpsum(arg)
-char **arg;
+void set_tcpsum(char **arg)
{
tcp->th_sum = strtol(*arg, NULL, 0);
free(*arg);
@@ -1070,8 +1045,7 @@ char **arg;
}
-void set_tcpflags(arg)
-char **arg;
+void set_tcpflags(char **arg)
{
static char flags[] = "ASURPF";
static int flagv[] = { TH_ACK, TH_SYN, TH_URG, TH_RST, TH_PUSH,
@@ -1093,9 +1067,7 @@ char **arg;
}
-void set_tcpopt(state, arg)
-int state;
-char **arg;
+void set_tcpopt(int state, char **arg)
{
u_char *s;
int val, len, val2, pad, optval;
@@ -1173,7 +1145,7 @@ char **arg;
}
-void end_tcpopt()
+void end_tcpopt(void)
{
int pad;
char *s = (char *)tcp;
@@ -1205,7 +1177,7 @@ void end_tcpopt()
}
-void new_udpheader()
+void new_udpheader(void)
{
if ((ip->ip_p) && (ip->ip_p != IPPROTO_UDP)) {
fprintf(stderr, "protocol %d specified with UDP!\n", ip->ip_p);
@@ -1231,8 +1203,7 @@ char **arg;
}
-void set_udpsum(arg)
-char **arg;
+void set_udpsum(char **arg)
{
udp->uh_sum = strtol(*arg, NULL, 0);
free(*arg);
@@ -1240,7 +1211,7 @@ char **arg;
}
-void prep_packet()
+void prep_packet(void)
{
iface_t *ifp;
struct in_addr gwip;
@@ -1265,7 +1236,7 @@ void prep_packet()
}
-void packet_done()
+void packet_done(void)
{
char outline[80];
int i, j, k;
@@ -1321,7 +1292,7 @@ void packet_done()
}
-void new_interface()
+void new_interface(void)
{
cifp = (iface_t *)calloc(1, sizeof(iface_t));
*iftail = cifp;
@@ -1330,7 +1301,7 @@ void new_interface()
}
-void check_interface()
+void check_interface(void)
{
if (!cifp->if_name || !*cifp->if_name)
fprintf(stderr, "No interface name given!\n");
@@ -1340,23 +1311,20 @@ void check_interface()
}
-void set_ifname(arg)
-char **arg;
+void set_ifname(char **arg)
{
cifp->if_name = *arg;
*arg = NULL;
}
-void set_ifmtu(arg)
-int arg;
+void set_ifmtu(int arg)
{
cifp->if_MTU = arg;
}
-void set_ifv4addr(arg)
-char **arg;
+void set_ifv4addr(char **arg)
{
cifp->if_addr = getipv4addr(*arg);
free(*arg);
@@ -1364,8 +1332,7 @@ char **arg;
}
-void set_ifeaddr(arg)
-char **arg;
+void set_ifeaddr(char **arg)
{
(void) geteaddr(*arg, &cifp->if_eaddr);
free(*arg);
@@ -1373,7 +1340,7 @@ char **arg;
}
-void new_arp()
+void new_arp(void)
{
carp = (arp_t *)calloc(1, sizeof(arp_t));
*arptail = carp;
@@ -1381,8 +1348,7 @@ void new_arp()
}
-void set_arpeaddr(arg)
-char **arg;
+void set_arpeaddr(char **arg)
{
(void) geteaddr(*arg, &carp->arp_eaddr);
free(*arg);
@@ -1390,8 +1356,7 @@ char **arg;
}
-void set_arpv4addr(arg)
-char **arg;
+void set_arpv4addr(char **arg)
{
carp->arp_addr = getipv4addr(*arg);
free(*arg);
@@ -1399,9 +1364,7 @@ char **arg;
}
-int arp_getipv4(ip, addr)
-char *ip;
-char *addr;
+int arp_getipv4(char *ip, char *addr)
{
arp_t *a;
@@ -1414,15 +1377,14 @@ char *addr;
}
-void reset_send()
+void reset_send(void)
{
sending.snd_if = iflist;
sending.snd_gw = defrouter;
}
-void set_sendif(arg)
-char **arg;
+void set_sendif(char **arg)
{
iface_t *ifp;
@@ -1437,8 +1399,7 @@ char **arg;
}
-void set_sendvia(arg)
-char **arg;
+void set_sendvia(char **arg)
{
sending.snd_gw = getipv4addr(*arg);
free(*arg);
@@ -1446,8 +1407,7 @@ char **arg;
}
-void set_defaultrouter(arg)
-char **arg;
+void set_defaultrouter(char **arg)
{
defrouter = getipv4addr(*arg);
free(*arg);
@@ -1455,7 +1415,7 @@ char **arg;
}
-void new_icmpheader()
+void new_icmpheader(void)
{
if ((ip->ip_p) && (ip->ip_p != IPPROTO_ICMP)) {
fprintf(stderr, "protocol %d specified with ICMP!\n",
@@ -1467,22 +1427,19 @@ void new_icmpheader()
}
-void set_icmpcode(code)
-int code;
+void set_icmpcode(int code)
{
icmp->icmp_code = code;
}
-void set_icmptype(type)
-int type;
+void set_icmptype(int type)
{
icmp->icmp_type = type;
}
-void set_icmpcodetok(code)
-char **code;
+void set_icmpcodetok(char **code)
{
char *s;
int i;
@@ -1499,8 +1456,7 @@ char **code;
}
-void set_icmptypetok(type)
-char **type;
+void set_icmptypetok(char **type)
{
char *s;
int i, done = 0;
@@ -1518,51 +1474,43 @@ char **type;
}
-void set_icmpid(arg)
-int arg;
+void set_icmpid(int arg)
{
icmp->icmp_id = htons(arg);
}
-void set_icmpseq(arg)
-int arg;
+void set_icmpseq(int arg)
{
icmp->icmp_seq = htons(arg);
}
-void set_icmpotime(arg)
-int arg;
+void set_icmpotime(int arg)
{
icmp->icmp_otime = htonl(arg);
}
-void set_icmprtime(arg)
-int arg;
+void set_icmprtime(int arg)
{
icmp->icmp_rtime = htonl(arg);
}
-void set_icmpttime(arg)
-int arg;
+void set_icmpttime(int arg)
{
icmp->icmp_ttime = htonl(arg);
}
-void set_icmpmtu(arg)
-int arg;
+void set_icmpmtu(int arg)
{
icmp->icmp_nextmtu = htons(arg);
}
-void set_redir(redir, arg)
-int redir;
-char **arg;
+void set_redir(int redir, char **arg)
{
icmp->icmp_code = redir;
icmp->icmp_gwaddr = getipv4addr(*arg);
@@ -1571,22 +1519,19 @@ char **arg;
}
-void set_icmppprob(num)
-int num;
+void set_icmppprob(int num)
{
icmp->icmp_pptr = num;
}
-void new_ipv4opt()
+void new_ipv4opt(void)
{
new_header(-2);
}
-void add_ipopt(state, ptr)
-int state;
-void *ptr;
+void add_ipopt(int state, void *ptr)
{
struct ipopt_names *io;
struct statetoopt *sto;
@@ -1644,7 +1589,7 @@ void *ptr;
}
-void end_ipopt()
+void end_ipopt(void)
{
int pad;
char *s, *buf = (char *)ip;
@@ -1679,15 +1624,14 @@ void end_ipopt()
}
-void set_secclass(arg)
-char **arg;
+void set_secclass(char **arg)
{
sclass = *arg;
*arg = NULL;
}
-void free_anipheader()
+void free_anipheader(void)
{
aniphdr_t *aip;
@@ -1702,7 +1646,7 @@ void free_anipheader()
}
-void end_ipv4()
+void end_ipv4(void)
{
aniphdr_t *aip;
@@ -1717,7 +1661,7 @@ void end_ipv4()
}
-void end_icmp()
+void end_icmp(void)
{
aniphdr_t *aip;
@@ -1730,7 +1674,7 @@ void end_icmp()
}
-void end_udp()
+void end_udp(void)
{
u_long sum;
aniphdr_t *aip;
@@ -1751,7 +1695,7 @@ void end_udp()
}
-void end_tcp()
+void end_tcp(void)
{
u_long sum;
aniphdr_t *aip;
@@ -1772,14 +1716,13 @@ void end_tcp()
}
-void end_data()
+void end_data(void)
{
free_anipheader();
}
-void iplang(fp)
-FILE *fp;
+void iplang(FILE *fp)
{
yyin = fp;
@@ -1790,10 +1733,7 @@ FILE *fp;
}
-u_short c_chksum(buf, len, init)
-u_short *buf;
-u_int len;
-u_long init;
+u_short c_chksum(u_short *buf, u_int len, u_long init)
{
u_long sum = init;
int nwords = len >> 1;
@@ -1806,9 +1746,7 @@ u_long init;
}
-u_long p_chksum(buf,len)
-u_short *buf;
-u_int len;
+u_long p_chksum(u_short *buf, u_int len)
{
u_long sum = 0;
int nwords = len >> 1;
diff --git a/sbin/ipf/ipmon/ipmon.c b/sbin/ipf/ipmon/ipmon.c
index 9022f12b6149..c5dd8828d6d2 100644
--- a/sbin/ipf/ipmon/ipmon.c
+++ b/sbin/ipf/ipmon/ipmon.c
@@ -300,10 +300,8 @@ static icmp_type_t icmptypes6[] = {
{ -2, NULL, 0, NULL }
};
-static icmp_subtype_t *find_icmpsubtype(type, table, tablesz)
- int type;
- icmp_subtype_t *table;
- size_t tablesz;
+static icmp_subtype_t *
+find_icmpsubtype(int type, icmp_subtype_t *table, size_t tablesz)
{
icmp_subtype_t *ist;
int i;
@@ -325,10 +323,8 @@ static icmp_subtype_t *find_icmpsubtype(type, table, tablesz)
}
-static icmp_type_t *find_icmptype(type, table, tablesz)
- int type;
- icmp_type_t *table;
- size_t tablesz;
+static icmp_type_t *
+find_icmptype(int type, icmp_type_t *table, size_t tablesz)
{
icmp_type_t *it;
int i;
@@ -350,15 +346,16 @@ static icmp_type_t *find_icmptype(type, table, tablesz)
}
-static void handlehup(sig)
- int sig;
+static void
+handlehup(int sig)
{
signal(SIGHUP, handlehup);
donehup = 1;
}
-static void init_tabs()
+static void
+init_tabs(void)
{
struct protoent *p;
struct servent *s;
@@ -438,8 +435,8 @@ static void init_tabs()
}
-static char *getlocalproto(p)
- u_int p;
+static char *
+getlocalproto(u_int p)
{
static char pnum[4];
char *s;
@@ -454,9 +451,8 @@ static char *getlocalproto(p)
}
-static int read_log(fd, lenp, buf, bufsize)
- int fd, bufsize, *lenp;
- char *buf;
+static int
+read_log(int fd, int *lenp, char *buf, int bufsize)
{
int nr;
@@ -473,7 +469,8 @@ static int read_log(fd, lenp, buf, bufsize)
}
-char *portlocalname(res, proto, port)
+char *
+portlocalname(res, proto, port)
int res;
char *proto;
u_int port;
@@ -497,9 +494,8 @@ char *portlocalname(res, proto, port)
}
-static char *icmpname(type, code)
- u_int type;
- u_int code;
+static char *
+icmpname(u_int type, u_int code)
{
static char name[80];
icmp_subtype_t *ist;
@@ -528,9 +524,8 @@ static char *icmpname(type, code)
return name;
}
-static char *icmpname6(type, code)
- u_int type;
- u_int code;
+static char *
+icmpname6(u_int type, u_int code)
{
static char name[80];
icmp_subtype_t *ist;
@@ -560,11 +555,8 @@ static char *icmpname6(type, code)
}
-void dumphex(log, dopts, buf, len)
- FILE *log;
- int dopts;
- char *buf;
- int len;
+void
+dumphex(FILE *log, int dopts, char *buf, int len)
{
char hline[80];
int i, j, k;
@@ -624,8 +616,8 @@ void dumphex(log, dopts, buf, len)
}
-static struct tm *get_tm(sec)
- time_t sec;
+static struct tm *
+get_tm(time_t sec)
{
struct tm *tm;
time_t t;
@@ -635,10 +627,8 @@ static struct tm *get_tm(sec)
return tm;
}
-static void print_natlog(conf, buf, blen)
- config_t *conf;
- char *buf;
- int blen;
+static void
+print_natlog(config_t *conf, char *buf, int blen)
{
static u_32_t seqnum = 0;
int res, i, len, family;
@@ -824,10 +814,8 @@ static void print_natlog(conf, buf, blen)
}
-static void print_statelog(conf, buf, blen)
- config_t *conf;
- char *buf;
- int blen;
+static void
+print_statelog(config_t *conf, char *buf, int blen)
{
static u_32_t seqnum = 0;
int res, i, len, family;
@@ -979,11 +967,8 @@ static void print_statelog(conf, buf, blen)
}
-static void print_log(conf, log, buf, blen)
- config_t *conf;
- logsource_t *log;
- char *buf;
- int blen;
+static void
+print_log(config_t *conf, logsource_t *log, char *buf, int blen)
{
char *bp, *bpo;
iplog_t *ipl;
@@ -1038,10 +1023,8 @@ static void print_log(conf, log, buf, blen)
}
-static void print_ipflog(conf, buf, blen)
- config_t *conf;
- char *buf;
- int blen;
+static void
+print_ipflog(config_t *conf, char *buf, int blen)
{
static u_32_t seqnum = 0;
int i, f, lvl, res, len, off, plen, ipoff, defaction;
@@ -1435,8 +1418,8 @@ printipflog:
}
-static void usage(prog)
- char *prog;
+static void
+usage(char *prog)
{
fprintf(stderr, "Usage: %s [ -abDFhnpstvxX ] [ -B <binary-logfile> ] [ -C <config-file> ]\n"
"\t[ -f <device> ] [ -L <facility> ] [ -N <device> ]\n"
@@ -1446,8 +1429,8 @@ static void usage(prog)
}
-static void write_pid(file)
- char *file;
+static void
+write_pid(char *file)
{
FILE *fp = NULL;
int fd;
@@ -1466,9 +1449,8 @@ static void write_pid(file)
}
-static void flushlogs(file, log)
- char *file;
- FILE *log;
+static void
+flushlogs(char *file, FILE *log)
{
int fd, flushed = 0;
@@ -1497,9 +1479,8 @@ static void flushlogs(file, log)
}
-static void logopts(turnon, options)
- int turnon;
- char *options;
+static void
+logopts(int turnon, char *options)
{
int flags = 0;
char *s;
@@ -1529,7 +1510,8 @@ static void logopts(turnon, options)
ipmonopts &= ~(flags);
}
-static void initconfig(config_t *conf)
+static void
+initconfig(config_t *conf)
{
int i;
@@ -1557,9 +1539,8 @@ static void initconfig(config_t *conf)
}
-int main(argc, argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
int doread, c, make_daemon = 0;
char *prog;
@@ -1741,7 +1722,8 @@ int main(argc, argv)
}
-static void openlogs(config_t *conf)
+static void
+openlogs(config_t *conf)
{
logsource_t *l;
struct stat sb;
@@ -1781,7 +1763,8 @@ static void openlogs(config_t *conf)
}
-static int read_loginfo(config_t *conf)
+static int
+read_loginfo(config_t *conf)
{
iplog_t buf[DEFAULT_IPFLOGSIZE/sizeof(iplog_t)+1];
int n, tr, nr, i;
diff --git a/sbin/ipf/ipmon/ipmon_y.y b/sbin/ipf/ipmon/ipmon_y.y
index 0aeb20a32519..d94bb1151af8 100644
--- a/sbin/ipf/ipmon/ipmon_y.y
+++ b/sbin/ipf/ipmon/ipmon_y.y
@@ -302,8 +302,7 @@ static int macflags[17][2] = {
};
static opt_t *
-new_opt(type)
- int type;
+new_opt(int type)
{
opt_t *o;
@@ -316,9 +315,7 @@ new_opt(type)
}
static void
-build_action(olist, todo)
- opt_t *olist;
- ipmon_doing_t *todo;
+build_action(opt_t *olist, ipmon_doing_t *todo)
{
ipmon_action_t *a;
opt_t *o;
@@ -430,9 +427,7 @@ build_action(olist, todo)
int
-check_action(buf, log, opts, lvl)
- char *buf, *log;
- int opts, lvl;
+check_action(char *buf, char *log, int opts, int lvl)
{
ipmon_action_t *a;
struct timeval tv;
@@ -630,8 +625,7 @@ check_action(buf, log, opts, lvl)
static void
-free_action(a)
- ipmon_action_t *a;
+free_action(ipmon_action_t *a)
{
ipmon_doing_t *d;
@@ -651,8 +645,7 @@ free_action(a)
int
-load_config(file)
- char *file;
+load_config(char *file)
{
FILE *fp;
char *s;
@@ -683,7 +676,7 @@ load_config(file)
void
-unload_config()
+unload_config(void)
{
ipmon_saver_int_t *sav, **imsip;
ipmon_saver_t *is;
@@ -716,7 +709,7 @@ unload_config()
void
-dump_config()
+dump_config(void)
{
ipmon_action_t *a;
@@ -729,8 +722,7 @@ dump_config()
static void
-print_action(a)
- ipmon_action_t *a;
+print_action(ipmon_action_t *a)
{
ipmon_doing_t *d;
@@ -752,8 +744,7 @@ print_action(a)
void *
-add_doing(saver)
- ipmon_saver_t *saver;
+add_doing(ipmon_saver_t *saver)
{
ipmon_saver_int_t *it;
@@ -771,8 +762,7 @@ add_doing(saver)
static int
-find_doing(string)
- char *string;
+find_doing(char *string)
{
ipmon_saver_int_t *it;
@@ -785,9 +775,7 @@ find_doing(string)
static ipmon_doing_t *
-build_doing(target, options)
- char *target;
- char *options;
+build_doing(char *target, char *options)
{
ipmon_saver_int_t *it;
char *strarray[2];
@@ -844,8 +832,7 @@ build_doing(target, options)
static void
-print_match(a)
- ipmon_action_t *a;
+print_match(ipmon_action_t *a)
{
char *coma = "";
@@ -980,8 +967,7 @@ print_match(a)
static int
-install_saver(name, path)
- char *name, *path;
+install_saver(char *name, char *path)
{
ipmon_saver_int_t *isi;
ipmon_saver_t *is;
diff --git a/sbin/ipf/ipnat/ipnat.c b/sbin/ipf/ipnat/ipnat.c
index 1ca6e776ffdf..54c770e1db26 100644
--- a/sbin/ipf/ipnat/ipnat.c
+++ b/sbin/ipf/ipnat/ipnat.c
@@ -80,17 +80,16 @@ int opts;
int nohdrfields = 0;
wordtab_t *nat_fields = NULL;
-void usage(name)
- char *name;
+void
+usage(char *name)
{
fprintf(stderr, "Usage: %s [-CFhlnrRsv] [-f filename]\n", name);
exit(1);
}
-int main(argc, argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
int fd, c, mode, *natfilter;
char *file, *core, *kernel;
@@ -234,9 +233,8 @@ int main(argc, argv)
* Read NAT statistic information in using a symbol table and memory file
* rather than doing ioctl's.
*/
-void natstat_dead(nsp, kernel)
- natstat_t *nsp;
- char *kernel;
+void
+natstat_dead(natstat_t *nsp, char *kernel)
{
struct nlist nat_nlist[10] = {
{ "nat_table" }, /* 0 */
@@ -286,8 +284,8 @@ void natstat_dead(nsp, kernel)
* Issue an ioctl to flush either the NAT rules table or the active mapping
* table or both.
*/
-void flushtable(fd, opts, match)
- int fd, opts, *match;
+void
+flushtable(int fd, int opts, int *match)
{
int n = 0;
@@ -329,9 +327,8 @@ void flushtable(fd, opts, match)
/*
* Display NAT statistics.
*/
-void dostats_dead(nsp, opts, filter)
- natstat_t *nsp;
- int opts, *filter;
+void
+dostats_dead(natstat_t *nsp, int opts, int *filter)
{
nat_t *np, nat;
ipnat_t ipn;
@@ -395,10 +392,8 @@ void dostats_dead(nsp, opts, filter)
}
-void dotable(nsp, fd, alive, which, side)
- natstat_t *nsp;
- int fd, alive, which;
- char *side;
+void
+dotable(natstat_t *nsp, int fd, int alive, int which, char *side)
{
int sz, i, used, maxlen, minlen, totallen;
ipftable_t table;
@@ -466,9 +461,8 @@ void dotable(nsp, fd, alive, which, side)
}
-void dostats(fd, nsp, opts, alive, filter)
- natstat_t *nsp;
- int fd, opts, alive, *filter;
+void
+dostats(int fd, natstat_t *nsp, int opts, int alive, int *filter)
{
/*
* Show statistics ?
@@ -521,9 +515,8 @@ void dostats(fd, nsp, opts, alive, filter)
/*
* Display NAT statistics.
*/
-void dostats_live(fd, nsp, opts, filter)
- natstat_t *nsp;
- int fd, opts, *filter;
+void
+dostats_live(int fd, natstat_t *nsp, int opts, int *filter)
{
ipfgeniter_t iter;
char buffer[2000];
@@ -616,8 +609,8 @@ void dostats_live(fd, nsp, opts, filter)
/*
* Display the active host mapping table.
*/
-void showhostmap_dead(nsp)
- natstat_t *nsp;
+void
+showhostmap_dead(natstat_t *nsp)
{
hostmap_t hm, *hmp, **maptable;
u_int hv;
@@ -652,9 +645,8 @@ void showhostmap_dead(nsp)
/*
* Display the active host mapping table.
*/
-void showhostmap_live(fd, nsp)
- int fd;
- natstat_t *nsp;
+void
+showhostmap_live(int fd, natstat_t *nsp)
{
ipfgeniter_t iter;
hostmap_t hm;
@@ -685,9 +677,8 @@ void showhostmap_live(fd, nsp)
}
-int nat_matcharray(nat, array)
- nat_t *nat;
- int *array;
+int
+nat_matcharray(nat_t *nat, int *array)
{
int i, n, *x, rv, p;
ipfexp_t *e;
diff --git a/sbin/ipf/ipnat/ipnat_y.y b/sbin/ipf/ipnat/ipnat_y.y
index a6a5a0e49d76..51f13d5fc6a1 100644
--- a/sbin/ipf/ipnat/ipnat_y.y
+++ b/sbin/ipf/ipnat/ipnat_y.y
@@ -1294,11 +1294,8 @@ static wordtab_t yywords[] = {
int
-ipnat_parsefile(fd, addfunc, ioctlfunc, filename)
- int fd;
- addfunc_t addfunc;
- ioctlfunc_t ioctlfunc;
- char *filename;
+ipnat_parsefile(int fd, addfunc_t addfunc, ioctlfunc_t ioctlfunc,
+ char *filename)
{
FILE *fp = NULL;
int rval;
@@ -1337,11 +1334,8 @@ ipnat_parsefile(fd, addfunc, ioctlfunc, filename)
int
-ipnat_parsesome(fd, addfunc, ioctlfunc, fp)
- int fd;
- addfunc_t addfunc;
- ioctlfunc_t ioctlfunc;
- FILE *fp;
+ipnat_parsesome(int fd, addfunc_t addfunc, ioctlfunc_t ioctlfunc,
+ FILE *fp)
{
char *s;
int i;
@@ -1373,7 +1367,7 @@ ipnat_parsesome(fd, addfunc, ioctlfunc, fp)
static void
-newnatrule()
+newnatrule(void)
{
ipnat_t *n;
@@ -1402,8 +1396,7 @@ newnatrule()
static void
-setnatproto(p)
- int p;
+setnatproto(int p)
{
nat->in_pr[0] = p;
nat->in_pr[1] = p;
@@ -1466,10 +1459,7 @@ setnatproto(p)
int
-ipnat_addrule(fd, ioctlfunc, ptr)
- int fd;
- ioctlfunc_t ioctlfunc;
- void *ptr;
+ipnat_addrule(int fd, ioctlfunc_t ioctlfunc, void *ptr)
{
ioctlcmd_t add, del;
ipfobj_t obj;
@@ -1571,7 +1561,7 @@ setmapifnames()
static void
-setrdrifnames()
+setrdrifnames(void)
{
if ((suggest_port == 1) && (nat->in_flags & IPN_TCPUDP) == 0)
nat->in_flags |= IPN_TCPUDP;
@@ -1586,8 +1576,7 @@ setrdrifnames()
static void
-proxy_setconfig(proxy)
- int proxy;
+proxy_setconfig(int proxy)
{
if (proxy == IPNY_DNS) {
yysetfixeddict(dnswords);
@@ -1596,15 +1585,14 @@ proxy_setconfig(proxy)
static void
-proxy_unsetconfig()
+proxy_unsetconfig(void)
{
yyresetdict();
}
static namelist_t *
-proxy_dns_add_pass(prefix, name)
- char *prefix, *name;
+proxy_dns_add_pass(char *prefix, char *name)
{
namelist_t *n;
@@ -1623,8 +1611,7 @@ proxy_dns_add_pass(prefix, name)
static namelist_t *
-proxy_dns_add_block(prefix, name)
- char *prefix, *name;
+proxy_dns_add_block(char *prefix, char *name)
{
namelist_t *n;
@@ -1644,10 +1631,7 @@ proxy_dns_add_block(prefix, name)
static void
-proxy_addconfig(proxy, proto, conf, list)
- char *proxy, *conf;
- int proto;
- namelist_t *list;
+proxy_addconfig(char *proxy, int proto, char *conf, namelist_t *list)
{
proxyrule_t *pr;
@@ -1664,10 +1648,7 @@ proxy_addconfig(proxy, proto, conf, list)
static void
-proxy_loadrules(fd, ioctlfunc, rules)
- int fd;
- ioctlfunc_t ioctlfunc;
- proxyrule_t *rules;
+proxy_loadrules(int fd, ioctlfunc_t ioctlfunc, proxyrule_t *rules)
{
proxyrule_t *pr;
@@ -1682,12 +1663,8 @@ proxy_loadrules(fd, ioctlfunc, rules)
static void
-proxy_loadconfig(fd, ioctlfunc, proxy, proto, conf, list)
- int fd;
- ioctlfunc_t ioctlfunc;
- char *proxy, *conf;
- int proto;
- namelist_t *list;
+proxy_loadconfig(int fd, ioctlfunc_t ioctlfunc, char *proxy, int proto,
+ char *conf, namelist_t *list)
{
namelist_t *na;
ipfobj_t obj;
@@ -1733,10 +1710,7 @@ proxy_loadconfig(fd, ioctlfunc, proxy, proto, conf, list)
static void
-setifname(np, idx, name)
- ipnat_t **np;
- int idx;
- char *name;
+setifname(ipnat_t **np, int idx, char *name)
{
int pos;
@@ -1748,9 +1722,7 @@ setifname(np, idx, name)
static int
-addname(np, name)
- ipnat_t **np;
- char *name;
+addname(ipnat_t **np, char *name)
{
ipnat_t *n;
int nlen;
diff --git a/sbin/ipf/ippool/ippool.c b/sbin/ipf/ippool/ippool.c
index 98666f9868fd..b339c617c3de 100644
--- a/sbin/ipf/ippool/ippool.c
+++ b/sbin/ipf/ippool/ippool.c
@@ -65,8 +65,7 @@ int nohdrfields = 0;
void
-usage(prog)
- char *prog;
+usage(char *prog)
{
fprintf(stderr, "Usage:\t%s\n", prog);
fprintf(stderr, "\t-a [-dnv] -m <name> [-o <role>] [-t type] [-T ttl] -i <ipaddr>[/netmask]\n");
@@ -82,9 +81,7 @@ usage(prog)
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int err = 1;
@@ -130,9 +127,7 @@ main(argc, argv)
int
-poolnodecommand(remove, argc, argv)
- int remove, argc;
- char *argv[];
+poolnodecommand(int remove, int argc, char *argv[])
{
int err = 0, c, ipset, role, type = IPLT_POOL, ttl = 0;
char *poolname = NULL;
@@ -252,9 +247,7 @@ poolnodecommand(remove, argc, argv)
int
-poolcommand(remove, argc, argv)
- int remove, argc;
- char *argv[];
+poolcommand(int remove, int argc, char *argv[])
{
int type, role, c, err;
char *poolname, *typearg = NULL;
@@ -375,9 +368,7 @@ poolcommand(remove, argc, argv)
int
-loadpoolfile(argc, argv, infile)
- int argc;
- char *argv[], *infile;
+loadpoolfile(int argc, char *argv[], char *infile)
{
int c;
@@ -427,9 +418,7 @@ loadpoolfile(argc, argv, infile)
int
-poolstats(argc, argv)
- int argc;
- char *argv[];
+poolstats(int argc, char *argv[])
{
int c, type, role;
ipf_pool_stat_t plstat;
@@ -544,9 +533,7 @@ poolstats(argc, argv)
int
-poolflush(argc, argv)
- int argc;
- char *argv[];
+poolflush(int argc, char *argv[])
{
int c, role, type, arg;
iplookupflush_t flush;
@@ -617,8 +604,7 @@ poolflush(argc, argv)
int
-getrole(rolename)
- char *rolename;
+getrole(char *rolename)
{
int role;
@@ -649,9 +635,7 @@ getrole(rolename)
int
-gettype(typename, minor)
- char *typename;
- u_int *minor;
+gettype(char *typename, u_int *minor)
{
int type;
@@ -673,9 +657,7 @@ gettype(typename, minor)
int
-poollist(argc, argv)
- int argc;
- char *argv[];
+poollist(int argc, char *argv[])
{
char *kernel, *core, *poolname;
int c, role, type, live_kernel;
@@ -767,9 +749,7 @@ poollist(argc, argv)
void
-poollist_dead(role, poolname, type, kernel, core)
- int role, type;
- char *poolname, *kernel, *core;
+poollist_dead(int role, char *poolname, int type, char *kernel, char *core)
{
iphtable_t *hptr;
ip_pool_t *ptr;
@@ -838,9 +818,7 @@ poollist_dead(role, poolname, type, kernel, core)
void
-poollist_live(role, poolname, type, fd)
- int role, type, fd;
- char *poolname;
+poollist_live(int role, char *poolname, int type, int fd)
{
ipf_pool_stat_t plstat;
iplookupop_t op;
@@ -951,10 +929,7 @@ poollist_live(role, poolname, type, fd)
void
-showpools_live(fd, role, plstp, poolname)
- int fd, role;
- ipf_pool_stat_t *plstp;
- char *poolname;
+showpools_live(int fd, int role, ipf_pool_stat_t *plstp, char *poolname)
{
ipflookupiter_t iter;
ip_pool_t pool;
@@ -990,10 +965,7 @@ showpools_live(fd, role, plstp, poolname)
void
-showhashs_live(fd, role, htstp, poolname)
- int fd, role;
- iphtstat_t *htstp;
- char *poolname;
+showhashs_live(int fd, int role, iphtstat_t *htstp, char *poolname)
{
ipflookupiter_t iter;
iphtable_t table;
@@ -1026,10 +998,7 @@ showhashs_live(fd, role, htstp, poolname)
void
-showdstls_live(fd, role, dlstp, poolname)
- int fd, role;
- ipf_dstl_stat_t *dlstp;
- char *poolname;
+showdstls_live(int fd, int role, ipf_dstl_stat_t *dlstp, char *poolname)
{
ipflookupiter_t iter;
ippool_dst_t table;
diff --git a/sbin/ipf/ippool/ippool_y.y b/sbin/ipf/ippool/ippool_y.y
index 03ee1731f24f..5ec9b6ef0083 100644
--- a/sbin/ipf/ippool/ippool_y.y
+++ b/sbin/ipf/ippool/ippool_y.y
@@ -609,10 +609,8 @@ static wordtab_t yywords[] = {
};
-int ippool_parsefile(fd, filename, iocfunc)
-int fd;
-char *filename;
-ioctlfunc_t iocfunc;
+int
+ippool_parsefile(int fd, char *filename, ioctlfunc_t iocfunc)
{
FILE *fp = NULL;
char *s;
@@ -644,10 +642,8 @@ ioctlfunc_t iocfunc;
}
-int ippool_parsesome(fd, fp, iocfunc)
-int fd;
-FILE *fp;
-ioctlfunc_t iocfunc;
+int
+ippool_parsesome(int fd, FILE *fp, ioctlfunc_t iocfunc)
{
char *s;
int i;
@@ -676,8 +672,7 @@ ioctlfunc_t iocfunc;
static iphtent_t *
-add_htablehosts(url)
-char *url;
+add_htablehosts(char *url)
{
iphtent_t *htop, *hbot, *h;
alist_t *a, *hlist;
@@ -722,8 +717,7 @@ char *url;
static ip_pool_node_t *
-add_poolhosts(url)
-char *url;
+add_poolhosts(char *url)
{
ip_pool_node_t *ptop, *pbot, *p;
alist_t *a, *hlist;
@@ -777,8 +771,7 @@ char *url;
ip_pool_node_t *
-read_whoisfile(file)
- char *file;
+read_whoisfile(char *file)
{
ip_pool_node_t *ntop, *ipn, node, *last;
char line[1024];
@@ -812,8 +805,7 @@ read_whoisfile(file)
static void
-setadflen(afp)
- addrfamily_t *afp;
+setadflen(addrfamily_t *afp)
{
afp->adf_len = offsetof(addrfamily_t, adf_addr);
switch (afp->adf_family)
diff --git a/sbin/ipf/ipscan/ipscan_y.y b/sbin/ipf/ipscan/ipscan_y.y
index b36b66db2b97..134dbc70f048 100644
--- a/sbin/ipf/ipscan/ipscan_y.y
+++ b/sbin/ipf/ipscan/ipscan_y.y
@@ -197,9 +197,8 @@ static struct wordtab yywords[] = {
};
-int cram(dst, src)
-char *dst;
-char *src;
+int
+cram(char *dst, char *src)
{
char c, *s, *t, *u;
int i, j, k;
@@ -256,8 +255,8 @@ char *src;
}
-void printent(isc)
-ipscan_t *isc;
+void
+printent(ipscan_t *isc)
{
char buf[ISC_TLEN+1];
u_char *u;
@@ -334,10 +333,8 @@ ipscan_t *isc;
}
-void addtag(tstr, cp, sp, act)
-char *tstr;
-char **cp, **sp;
-struct action *act;
+void
+addtag(char *tstr, char **cp, char **sp, struct action *act)
{
ipscan_t isc, *iscp;
@@ -406,8 +403,8 @@ struct action *act;
}
-char **makepair(s1, s2)
-char *s1, *s2;
+char **
+makepair(char *s1, char *s2)
{
char **a;
@@ -418,8 +415,8 @@ char *s1, *s2;
}
-struct in_addr combine(a1, a2, a3, a4)
-int a1, a2, a3, a4;
+struct in_addr
+combine(int a1, int a2, int a3, int a4)
{
struct in_addr in;
@@ -436,8 +433,8 @@ int a1, a2, a3, a4;
}
-struct in_addr gethostip(host)
-char *host;
+struct in_addr
+gethostip(char *host)
{
struct hostent *hp;
struct in_addr in;
@@ -452,8 +449,8 @@ char *host;
}
-int getportnum(port)
-char *port;
+int
+getportnum(char *port)
{
struct servent *s;
@@ -464,7 +461,8 @@ char *port;
}
-void showlist()
+void
+showlist(void)
{
ipscanstat_t ipsc, *ipscp = &ipsc;
ipscan_t isc;
@@ -490,8 +488,8 @@ void showlist()
}
-void usage(prog)
-char *prog;
+void
+usage(char *prog)
{
fprintf(stderr, "Usage:\t%s [-dnrv] -f <filename>\n", prog);
fprintf(stderr, "\t%s [-dlv]\n", prog);
@@ -499,9 +497,8 @@ char *prog;
}
-int main(argc, argv)
-int argc;
-char *argv[];
+int
+main(int argc, char *argv[])
{
FILE *fp = NULL;
int c;
diff --git a/sbin/ipf/ipsend/44arp.c b/sbin/ipf/ipsend/44arp.c
index 80521ad15084..9f82ed6a741d 100644
--- a/sbin/ipf/ipsend/44arp.c
+++ b/sbin/ipf/ipsend/44arp.c
@@ -35,8 +35,7 @@
* its IP address in address
* (4 bytes)
*/
-int resolve(host, address)
- char *host, *address;
+int resolve(char *host, char *address)
{
struct hostent *hp;
u_long add;
@@ -57,8 +56,7 @@ int resolve(host, address)
}
-int arp(addr, eaddr)
- char *addr, *eaddr;
+int arp(char *addr, char *eaddr)
{
int mib[6];
size_t needed;
diff --git a/sbin/ipf/ipsend/arp.c b/sbin/ipf/ipsend/arp.c
index 31b70d3e8987..e6bbedb9ec50 100644
--- a/sbin/ipf/ipsend/arp.c
+++ b/sbin/ipf/ipsend/arp.c
@@ -34,8 +34,7 @@ static const char rcsid[] = "@(#)$Id$";
* its IP address in address
* (4 bytes)
*/
-int resolve(host, address)
- char *host, *address;
+int resolve(char *host, char *address)
{
struct hostent *hp;
u_long add;
diff --git a/sbin/ipf/ipsend/dlcommon.c b/sbin/ipf/ipsend/dlcommon.c
index efb82df9ad32..86554660240d 100644
--- a/sbin/ipf/ipsend/dlcommon.c
+++ b/sbin/ipf/ipsend/dlcommon.c
@@ -38,8 +38,7 @@ typedef unsigned long ulong;
void
-dlinforeq(fd)
- int fd;
+dlinforeq(int fd)
{
dl_info_req_t info_req;
struct strbuf ctl;
@@ -58,9 +57,7 @@ dlinforeq(fd)
}
void
-dlinfoack(fd, bufp)
- int fd;
- char *bufp;
+dlinfoack(int fd, char *bufp)
{
union DL_primitives *dlp;
struct strbuf ctl;
@@ -87,9 +84,7 @@ dlinfoack(fd, bufp)
}
void
-dlattachreq(fd, ppa)
- int fd;
- u_long ppa;
+dlattachreq(int fd, u_long ppa)
{
dl_attach_req_t attach_req;
struct strbuf ctl;
@@ -109,10 +104,7 @@ dlattachreq(fd, ppa)
}
void
-dlenabmultireq(fd, addr, length)
- int fd;
- char *addr;
- int length;
+dlenabmultireq(int fd, char *addr, int length)
{
long buf[MAXDLBUF];
union DL_primitives *dlp;
@@ -138,10 +130,7 @@ dlenabmultireq(fd, addr, length)
}
void
-dldisabmultireq(fd, addr, length)
- int fd;
- char *addr;
- int length;
+dldisabmultireq(int fd, char *addr, int length)
{
long buf[MAXDLBUF];
union DL_primitives *dlp;
@@ -167,9 +156,7 @@ dldisabmultireq(fd, addr, length)
}
void
-dlpromisconreq(fd, level)
- int fd;
- u_long level;
+dlpromisconreq(int fd, u_long level)
{
dl_promiscon_req_t promiscon_req;
struct strbuf ctl;
@@ -190,9 +177,7 @@ dlpromisconreq(fd, level)
}
void
-dlpromiscoff(fd, level)
- int fd;
- u_long level;
+dlpromiscoff(int fd, u_long level)
{
dl_promiscoff_req_t promiscoff_req;
struct strbuf ctl;
@@ -212,9 +197,7 @@ dlpromiscoff(fd, level)
}
void
-dlphysaddrreq(fd, addrtype)
- int fd;
- u_long addrtype;
+dlphysaddrreq(int fd, u_long addrtype)
{
dl_phys_addr_req_t phys_addr_req;
struct strbuf ctl;
@@ -234,10 +217,7 @@ dlphysaddrreq(fd, addrtype)
}
void
-dlsetphysaddrreq(fd, addr, length)
- int fd;
- char *addr;
- int length;
+dlsetphysaddrreq(int fd, char *addr, int length)
{
long buf[MAXDLBUF];
union DL_primitives *dlp;
@@ -263,8 +243,7 @@ dlsetphysaddrreq(fd, addr, length)
}
void
-dldetachreq(fd)
- int fd;
+dldetachreq(int fd)
{
dl_detach_req_t detach_req;
struct strbuf ctl;
@@ -283,13 +262,8 @@ dldetachreq(fd)
}
void
-dlbindreq(fd, sap, max_conind, service_mode, conn_mgmt, xidtest)
- int fd;
- u_long sap;
- u_long max_conind;
- u_long service_mode;
- u_long conn_mgmt;
- u_long xidtest;
+dlbindreq(int fd, u_long sap, u_long max_conind, u_long service_mode,
+ u_long conn_mgmt, u_long xidtest)
{
dl_bind_req_t bind_req;
struct strbuf ctl;
@@ -313,13 +287,8 @@ dlbindreq(fd, sap, max_conind, service_mode, conn_mgmt, xidtest)
}
void
-dlunitdatareq(fd, addrp, addrlen, minpri, maxpri, datap, datalen)
- int fd;
- u_char *addrp;
- int addrlen;
- u_long minpri, maxpri;
- u_char *datap;
- int datalen;
+dlunitdatareq(int fd, u_char *addrp, int addrlen, u_long minpri,
+ u_long maxpri, u_char *datap, int datalen)
{
long buf[MAXDLBUF];
union DL_primitives *dlp;
@@ -348,8 +317,7 @@ dlunitdatareq(fd, addrp, addrlen, minpri, maxpri, datap, datalen)
}
void
-dlunbindreq(fd)
- int fd;
+dlunbindreq(int fd)
{
dl_unbind_req_t unbind_req;
struct strbuf ctl;
@@ -368,9 +336,7 @@ dlunbindreq(fd)
}
void
-dlokack(fd, bufp)
- int fd;
- char *bufp;
+dlokack(int fd, char *bufp)
{
union DL_primitives *dlp;
struct strbuf ctl;
@@ -397,9 +363,7 @@ dlokack(fd, bufp)
}
void
-dlerrorack(fd, bufp)
- int fd;
- char *bufp;
+dlerrorack(int fd, char *bufp)
{
union DL_primitives *dlp;
struct strbuf ctl;
@@ -426,9 +390,7 @@ dlerrorack(fd, bufp)
}
void
-dlbindack(fd, bufp)
- int fd;
- char *bufp;
+dlbindack(int fd, char *bufp)
{
union DL_primitives *dlp;
struct strbuf ctl;
@@ -452,9 +414,7 @@ dlbindack(fd, bufp)
}
void
-dlphysaddrack(fd, bufp)
- int fd;
- char *bufp;
+dlphysaddrack(int fd, char *bufp)
{
union DL_primitives *dlp;
struct strbuf ctl;
@@ -478,16 +438,13 @@ dlphysaddrack(fd, bufp)
}
void
-sigalrm()
+sigalrm(void)
{
(void) err("sigalrm: TIMEOUT");
}
-strgetmsg(fd, ctlp, datap, flagsp, caller)
- int fd;
- struct strbuf *ctlp, *datap;
- int *flagsp;
- char *caller;
+strgetmsg(int fd, struct strbuf *ctlp, struct strbuf *datap, int *flagsp,
+ char *caller)
{
int rc;
static char errmsg[80];
@@ -535,9 +492,7 @@ strgetmsg(fd, ctlp, datap, flagsp, caller)
err("getmsg: control portion length < sizeof (long): %d", ctlp->len);
}
-expecting(prim, dlp)
- int prim;
- union DL_primitives *dlp;
+expecting(int prim, union DL_primitives *dlp)
{
if (dlp->dl_primitive != (u_long)prim) {
printdlprim(dlp);
@@ -550,8 +505,7 @@ expecting(prim, dlp)
/*
* Print any DLPI msg in human readable format.
*/
-printdlprim(dlp)
- union DL_primitives *dlp;
+printdlprim(union DL_primitives *dlp)
{
switch (dlp->dl_primitive) {
case DL_INFO_REQ:
@@ -654,14 +608,12 @@ printdlprim(dlp)
}
/* ARGSUSED */
-printdlinforeq(dlp)
- union DL_primitives *dlp;
+printdlinforeq(union DL_primitives *dlp)
{
(void) printf("DL_INFO_REQ\n");
}
-printdlinfoack(dlp)
- union DL_primitives *dlp;
+printdlinfoack(union DL_primitives *dlp)
{
u_char addr[MAXDLADDR];
u_char brdcst[MAXDLADDR];
@@ -697,22 +649,20 @@ printdlinfoack(dlp)
(void) printf("brdcst_addr %s\n", brdcst);
}
-printdlattachreq(dlp)
- union DL_primitives *dlp;
+printdlattachreq(union DL_primitives *dlp)
{
(void) printf("DL_ATTACH_REQ: ppa %d\n",
dlp->attach_req.dl_ppa);
}
-printdlokack(dlp)
+printdlokack(union DL_primitives* dlp)
union DL_primitives *dlp;
{
(void) printf("DL_OK_ACK: correct_primitive %s\n",
dlprim(dlp->ok_ack.dl_correct_primitive));
}
-printdlerrorack(dlp)
- union DL_primitives *dlp;
+printdlerrorack(union DL_primitives *dlp)
{
(void) printf("DL_ERROR_ACK: error_primitive %s errno %s unix_errno %d: %s\n",
dlprim(dlp->error_ack.dl_error_primitive),
@@ -721,8 +671,7 @@ printdlerrorack(dlp)
strerror(dlp->error_ack.dl_unix_errno));
}
-printdlenabmultireq(dlp)
- union DL_primitives *dlp;
+printdlenabmultireq(union DL_primitives *dlp)
{
u_char addr[MAXDLADDR];
@@ -735,8 +684,7 @@ printdlenabmultireq(dlp)
(void) printf("addr %s\n", addr);
}
-printdldisabmultireq(dlp)
- union DL_primitives *dlp;
+printdldisabmultireq(union DL_primitives *dlp)
{
u_char addr[MAXDLADDR];
@@ -749,29 +697,25 @@ printdldisabmultireq(dlp)
(void) printf("addr %s\n", addr);
}
-printdlpromisconreq(dlp)
- union DL_primitives *dlp;
+printdlpromisconreq(union DL_primitives *dlp)
{
(void) printf("DL_PROMISCON_REQ: level %s\n",
dlpromisclevel(dlp->promiscon_req.dl_level));
}
-printdlpromiscoffreq(dlp)
- union DL_primitives *dlp;
+printdlpromiscoffreq(union DL_primitives *dlp)
{
(void) printf("DL_PROMISCOFF_REQ: level %s\n",
dlpromisclevel(dlp->promiscoff_req.dl_level));
}
-printdlphysaddrreq(dlp)
- union DL_primitives *dlp;
+printdlphysaddrreq(union DL_primitives *dlp)
{
(void) printf("DL_PHYS_ADDR_REQ: addr_type 0x%x\n",
dlp->physaddr_req.dl_addr_type);
}
-printdlphysaddrack(dlp)
- union DL_primitives *dlp;
+printdlphysaddrack(union DL_primitives *dlp)
{
u_char addr[MAXDLADDR];
@@ -784,8 +728,7 @@ printdlphysaddrack(dlp)
(void) printf("addr %s\n", addr);
}
-printdlsetphysaddrreq(dlp)
- union DL_primitives *dlp;
+printdlsetphysaddrreq(union DL_primitives *dlp)
{
u_char addr[MAXDLADDR];
@@ -799,14 +742,12 @@ printdlsetphysaddrreq(dlp)
}
/* ARGSUSED */
-printdldetachreq(dlp)
- union DL_primitives *dlp;
+printdldetachreq(union DL_primitives *dlp)
{
(void) printf("DL_DETACH_REQ\n");
}
-printdlbindreq(dlp)
- union DL_primitives *dlp;
+printdlbindreq(union DL_primitives *dlp)
{
(void) printf("DL_BIND_REQ: sap %d max_conind %d\n",
dlp->bind_req.dl_sap,
@@ -817,8 +758,7 @@ printdlbindreq(dlp)
dlp->bind_req.dl_xidtest_flg);
}
-printdlbindack(dlp)
- union DL_primitives *dlp;
+printdlbindack(union DL_primitives *dlp)
{
u_char addr[MAXDLADDR];
@@ -836,14 +776,12 @@ printdlbindack(dlp)
}
/* ARGSUSED */
-printdlunbindreq(dlp)
- union DL_primitives *dlp;
+printdlunbindreq(union DL_primitives *dlp)
{
(void) printf("DL_UNBIND_REQ\n");
}
-printdlsubsbindreq(dlp)
- union DL_primitives *dlp;
+printdlsubsbindreq(union DL_primitives *dlp)
{
u_char sap[MAXDLADDR];
@@ -856,8 +794,7 @@ printdlsubsbindreq(dlp)
(void) printf("sap %s\n", sap);
}
-printdlsubsbindack(dlp)
- union DL_primitives *dlp;
+printdlsubsbindack(union DL_primitives *dlp)
{
u_char sap[MAXDLADDR];
@@ -870,8 +807,7 @@ printdlsubsbindack(dlp)
(void) printf("sap %s\n", sap);
}
-printdlsubsunbindreq(dlp)
- union DL_primitives *dlp;
+printdlsubsunbindreq(union DL_primitives *dlp)
{
u_char sap[MAXDLADDR];
@@ -884,8 +820,7 @@ printdlsubsunbindreq(dlp)
(void) printf("sap %s\n", sap);
}
-printdlunitdatareq(dlp)
- union DL_primitives *dlp;
+printdlunitdatareq(union DL_primitives *dlp)
{
u_char addr[MAXDLADDR];
@@ -901,8 +836,7 @@ printdlunitdatareq(dlp)
(void) printf("addr %s\n", addr);
}
-printdlunitdataind(dlp)
- union DL_primitives *dlp;
+printdlunitdataind(union DL_primitives *dlp)
{
u_char dest[MAXDLADDR];
u_char src[MAXDLADDR];
@@ -924,8 +858,7 @@ printdlunitdataind(dlp)
(void) printf("src %s\n", src);
}
-printdluderrorind(dlp)
- union DL_primitives *dlp;
+printdluderrorind(union DL_primitives *dlp)
{
u_char addr[MAXDLADDR];
@@ -941,8 +874,7 @@ printdluderrorind(dlp)
(void) printf("addr %s\n", addr);
}
-printdltestreq(dlp)
- union DL_primitives *dlp;
+printdltestreq(union DL_primitives *dlp)
{
u_char addr[MAXDLADDR];
@@ -956,8 +888,7 @@ printdltestreq(dlp)
(void) printf("dest_addr %s\n", addr);
}
-printdltestind(dlp)
- union DL_primitives *dlp;
+printdltestind(union DL_primitives *dlp)
{
u_char dest[MAXDLADDR];
u_char src[MAXDLADDR];
@@ -978,8 +909,7 @@ printdltestind(dlp)
(void) printf("src_addr %s\n", src);
}
-printdltestres(dlp)
- union DL_primitives *dlp;
+printdltestres(union DL_primitives *dlp)
{
u_char dest[MAXDLADDR];
@@ -993,8 +923,7 @@ printdltestres(dlp)
(void) printf("dest_addr %s\n", dest);
}
-printdltestcon(dlp)
- union DL_primitives *dlp;
+printdltestcon(union DL_primitives *dlp)
{
u_char dest[MAXDLADDR];
u_char src[MAXDLADDR];
@@ -1015,8 +944,7 @@ printdltestcon(dlp)
(void) printf("src_addr %s\n", src);
}
-printdlxidreq(dlp)
- union DL_primitives *dlp;
+printdlxidreq(union DL_primitives *dlp)
{
u_char dest[MAXDLADDR];
@@ -1030,8 +958,7 @@ printdlxidreq(dlp)
(void) printf("dest_addr %s\n", dest);
}
-printdlxidind(dlp)
- union DL_primitives *dlp;
+printdlxidind(dlpunion DL_primitives *)
{
u_char dest[MAXDLADDR];
u_char src[MAXDLADDR];
@@ -1052,8 +979,7 @@ printdlxidind(dlp)
(void) printf("src_addr %s\n", src);
}
-printdlxidres(dlp)
- union DL_primitives *dlp;
+printdlxidres(union DL_primitives *dlp)
{
u_char dest[MAXDLADDR];
@@ -1067,8 +993,7 @@ printdlxidres(dlp)
(void) printf("dest_addr %s\n", dest);
}
-printdlxidcon(dlp)
- union DL_primitives *dlp;
+printdlxidcon(union DL_primitives *dlp)
{
u_char dest[MAXDLADDR];
u_char src[MAXDLADDR];
@@ -1089,8 +1014,7 @@ printdlxidcon(dlp)
(void) printf("src_addr %s\n", src);
}
-printdludqosreq(dlp)
- union DL_primitives *dlp;
+printdludqosreq(union DL_primitives *dlp)
{
(void) printf("DL_UDQOS_REQ: qos_length %d qos_offset %d\n",
dlp->udqos_req.dl_qos_length,
@@ -1100,10 +1024,7 @@ printdludqosreq(dlp)
/*
* Return string.
*/
-addrtostring(addr, length, s)
- u_char *addr;
- u_long length;
- u_char *s;
+addrtostring(u_char *addr, u_long length, u_char *s)
{
int i;
@@ -1118,9 +1039,7 @@ addrtostring(addr, length, s)
/*
* Return length
*/
-stringtoaddr(sp, addr)
- char *sp;
- char *addr;
+stringtoaddr(char *sp, char *addr)
{
int n = 0;
char *p;
@@ -1142,8 +1061,7 @@ stringtoaddr(sp, addr)
static char
-hexnibble(c)
- char c;
+hexnibble(char c)
{
static char hextab[] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
@@ -1154,8 +1072,7 @@ hexnibble(c)
}
char*
-dlprim(prim)
- u_long prim;
+dlprim(u_long prim)
{
static char primbuf[80];
@@ -1195,8 +1112,7 @@ dlprim(prim)
char*
-dlstate(state)
- u_long state;
+dlstate(u_long state)
{
static char statebuf[80];
@@ -1229,8 +1145,7 @@ dlstate(state)
}
char*
-dlerrno(errno)
- u_long errno;
+dlerrno(u_long errno)
{
static char errnobuf[80];
@@ -1271,8 +1186,7 @@ dlerrno(errno)
}
char*
-dlpromisclevel(level)
- u_long level;
+dlpromisclevel(u_long level)
{
static char levelbuf[80];
@@ -1287,8 +1201,7 @@ dlpromisclevel(level)
}
char*
-dlservicemode(servicemode)
- u_long servicemode;
+dlservicemode(u_long servicemode)
{
static char servicemodebuf[80];
@@ -1304,8 +1217,7 @@ dlservicemode(servicemode)
}
char*
-dlstyle(style)
- long style;
+dlstyle(long style)
{
static char stylebuf[80];
@@ -1319,8 +1231,7 @@ dlstyle(style)
}
char*
-dlmactype(media)
- u_long media;
+dlmactype(u_long media)
{
static char mediabuf[80];
@@ -1340,28 +1251,21 @@ dlmactype(media)
}
/*VARARGS1*/
-err(fmt, a1, a2, a3, a4)
- char *fmt;
- char *a1, *a2, *a3, *a4;
+err(char *fmt, char *a1, char *a2, char *a3, char *a4)
{
(void) fprintf(stderr, fmt, a1, a2, a3, a4);
(void) fprintf(stderr, "\n");
(void) exit(1);
}
-syserr(s)
+syserr(char *s)
char *s;
{
(void) perror(s);
exit(1);
}
-strioctl(fd, cmd, timout, len, dp)
- int fd;
- int cmd;
- int timout;
- int len;
- char *dp;
+strioctl(int fd, int cmd, int timout, int len, char *dp)
{
struct strioctl sioc;
int rc;
diff --git a/sbin/ipf/ipsend/ip.c b/sbin/ipf/ipsend/ip.c
index c1bb73f0b169..8a474704e3ab 100644
--- a/sbin/ipf/ipsend/ip.c
+++ b/sbin/ipf/ipsend/ip.c
@@ -31,9 +31,8 @@ static const char rcsid[] = "@(#)$Id$";
static char *ipbuf = NULL, *ethbuf = NULL;
-u_short chksum(buf,len)
- u_short *buf;
- int len;
+u_short
+chksum(u_short *buf, int len)
{
u_long sum = 0;
int nwords = len >> 1;
@@ -46,10 +45,8 @@ u_short chksum(buf,len)
}
-int send_ether(nfd, buf, len, gwip)
- int nfd, len;
- char *buf;
- struct in_addr gwip;
+int
+send_ether(int nfd, char *buf, int len, struct in_addr gwip)
{
static struct in_addr last_gw;
static char last_arp[6] = { 0, 0, 0, 0, 0, 0};
@@ -81,11 +78,8 @@ int send_ether(nfd, buf, len, gwip)
/*
*/
-int send_ip(nfd, mtu, ip, gwip, frag)
- int nfd, mtu;
- ip_t *ip;
- struct in_addr gwip;
- int frag;
+int
+send_ip(int nfd, int mtu, ip_t *ip, struct in_addr gwip, int frag)
{
static struct in_addr last_gw, local_ip;
static char local_arp[6] = { 0, 0, 0, 0, 0, 0};
@@ -242,10 +236,8 @@ int send_ip(nfd, mtu, ip, gwip, frag)
/*
* send a tcp packet.
*/
-int send_tcp(nfd, mtu, ip, gwip)
- int nfd, mtu;
- ip_t *ip;
- struct in_addr gwip;
+int
+send_tcp(int nfd, int mtu, ip_t *ip, struct in_addr gwip)
{
static tcp_seq iss = 2;
tcphdr_t *t, *t2;
@@ -295,10 +287,8 @@ int send_tcp(nfd, mtu, ip, gwip)
/*
* send a udp packet.
*/
-int send_udp(nfd, mtu, ip, gwip)
- int nfd, mtu;
- ip_t *ip;
- struct in_addr gwip;
+int
+send_udp(int nfd, int mtu, ip_t *ip, struct in_addr gwip)
{
struct tcpiphdr *ti;
int thlen;
@@ -327,10 +317,8 @@ int send_udp(nfd, mtu, ip, gwip)
/*
* send an icmp packet.
*/
-int send_icmp(nfd, mtu, ip, gwip)
- int nfd, mtu;
- ip_t *ip;
- struct in_addr gwip;
+int
+send_icmp(int nfd, int mtu, ip_t *ip, in_addr gwip)
{
struct icmp *ic;
@@ -343,7 +331,8 @@ int send_icmp(nfd, mtu, ip, gwip)
}
-int send_packet(nfd, mtu, ip, gwip)
+int
+send_packet(int nfd, int mtu, ip_t *ip, struct in_addr gwip)
int nfd, mtu;
ip_t *ip;
struct in_addr gwip;
diff --git a/sbin/ipf/ipsend/ipresend.c b/sbin/ipf/ipsend/ipresend.c
index d9a5f92cbe2c..2efb2eb4eeed 100644
--- a/sbin/ipf/ipsend/ipresend.c
+++ b/sbin/ipf/ipsend/ipresend.c
@@ -64,9 +64,8 @@ static void usage(prog)
}
-int main(argc, argv)
- int argc;
- char **argv;
+int
+main(int argc, char **argv)
{
struct in_addr gwip;
struct ipread *ipr = NULL;
diff --git a/sbin/ipf/ipsend/ipsend.c b/sbin/ipf/ipsend/ipsend.c
index d77081bd8b71..b8111806397f 100644
--- a/sbin/ipf/ipsend/ipsend.c
+++ b/sbin/ipf/ipsend/ipsend.c
@@ -71,9 +71,8 @@ static void usage(prog)
}
-static void do_icmp(ip, args)
- ip_t *ip;
- char *args;
+static
+void do_icmp(ip_t *ip, char *args)
{
struct icmp *ic;
char *s;
@@ -122,11 +121,8 @@ static void do_icmp(ip, args)
}
-int send_packets(dev, mtu, ip, gwip)
- char *dev;
- int mtu;
- ip_t *ip;
- struct in_addr gwip;
+int
+send_packets(char *dev, int mtu, ip_t *ip, struct in_addr gwip)
{
int wfd;
@@ -168,9 +164,8 @@ udpcksum(ip_t *ip, struct udphdr *udp, int len)
udp->uh_sum = 0xffff;
}
-int main(argc, argv)
- int argc;
- char **argv;
+int
+main(int argc, char **argv)
{
FILE *langfile = NULL;
struct in_addr gwip;
diff --git a/sbin/ipf/ipsend/ipsopt.c b/sbin/ipf/ipsend/ipsopt.c
index ce6616525ca1..e5585d906d7f 100644
--- a/sbin/ipf/ipsend/ipsopt.c
+++ b/sbin/ipf/ipsend/ipsopt.c
@@ -72,11 +72,8 @@ u_short ipseclevel(slevel)
}
-int addipopt(op, io, len, class)
- char *op;
- struct ipopt_names *io;
- int len;
- char *class;
+int
+addipopt(char *op, struct ipopt_names *io, int len, char *class)
{
struct in_addr ipadr;
int olen = len, srr = 0;
@@ -143,7 +140,8 @@ int addipopt(op, io, len, class)
}
-u_32_t buildopts(cp, op, len)
+u_32_t
+buildopts(char *cp, char *op, int len)
char *cp, *op;
int len;
{
diff --git a/sbin/ipf/ipsend/iptest.c b/sbin/ipf/ipsend/iptest.c
index df2efb96a32a..e6c57c3cdbbd 100644
--- a/sbin/ipf/ipsend/iptest.c
+++ b/sbin/ipf/ipsend/iptest.c
@@ -63,9 +63,8 @@ static void usage(prog)
}
-int main(argc, argv)
- int argc;
- char **argv;
+int
+main(int argc, char **argv)
{
struct tcpiphdr *ti;
struct in_addr gwip;
diff --git a/sbin/ipf/ipsend/iptests.c b/sbin/ipf/ipsend/iptests.c
index a4e1a99b2885..cbda02893162 100644
--- a/sbin/ipf/ipsend/iptests.c
+++ b/sbin/ipf/ipsend/iptests.c
@@ -95,12 +95,8 @@ typedef int boolean_t;
#endif
-void ip_test1(dev, mtu, ip, gwip, ptest)
- char *dev;
- int mtu;
- ip_t *ip;
- struct in_addr gwip;
- int ptest;
+void
+ip_test1(char *dev, int mtu, ip_t *ip, struct in_addr gwip, int ptest)
{
#ifdef USE_NANOSLEEP
struct timespec ts;
@@ -542,12 +538,8 @@ void ip_test2(dev, mtu, ip, gwip, ptest)
/*
* test 3 (ICMP)
*/
-void ip_test3(dev, mtu, ip, gwip, ptest)
- char *dev;
- int mtu;
- ip_t *ip;
- struct in_addr gwip;
- int ptest;
+void
+ip_test3(char *dev, int mtu, ip_t *ip, struct in_addr gwip, int ptest)
{
static int ict1[10] = { 8, 9, 10, 13, 14, 15, 16, 17, 18, 0 };
static int ict2[8] = { 3, 9, 10, 13, 14, 17, 18, 0 };
@@ -743,12 +735,8 @@ void ip_test3(dev, mtu, ip, gwip, ptest)
/* Perform test 4 (UDP) */
-void ip_test4(dev, mtu, ip, gwip, ptest)
- char *dev;
- int mtu;
- ip_t *ip;
- struct in_addr gwip;
- int ptest;
+void
+ip_test4(char *dev, int mtu, ip_t *ip, struct in_addr gwip, int ptest)
{
#ifdef USE_NANOSLEEP
struct timespec ts;
@@ -908,12 +896,8 @@ void ip_test4(dev, mtu, ip, gwip, ptest)
/* Perform test 5 (TCP) */
-void ip_test5(dev, mtu, ip, gwip, ptest)
- char *dev;
- int mtu;
- ip_t *ip;
- struct in_addr gwip;
- int ptest;
+void
+ip_test5(char *dev, int mtu, ip_t *ip, struct in_addr gwip, int ptest)
{
#ifdef USE_NANOSLEEP
struct timespec ts;
@@ -1256,12 +1240,8 @@ skip_five_and_six:
/* Perform test 6 (exhaust mbuf test) */
-void ip_test6(dev, mtu, ip, gwip, ptest)
- char *dev;
- int mtu;
- ip_t *ip;
- struct in_addr gwip;
- int ptest;
+void
+ip_test6(char *dev, int mtu, ip_t *ip, struct in_addr gwip, int ptest)
{
#ifdef USE_NANOSLEEP
struct timespec ts;
@@ -1338,12 +1318,8 @@ void ip_test6(dev, mtu, ip, gwip, ptest)
static u_long tbuf[64];
-void ip_test7(dev, mtu, ip, gwip, ptest)
- char *dev;
- int mtu;
- ip_t *ip;
- struct in_addr gwip;
- int ptest;
+void
+ip_test7(char *dev, int mtu, ip_t *ip, struct in_addr gwip, int ptest)
{
ip_t *pip;
#ifdef USE_NANOSLEEP
diff --git a/sbin/ipf/ipsend/resend.c b/sbin/ipf/ipsend/resend.c
index 5d01bb78e5e5..537eb0a262b7 100644
--- a/sbin/ipf/ipsend/resend.c
+++ b/sbin/ipf/ipsend/resend.c
@@ -33,8 +33,8 @@ extern int opts;
void dumppacket(ip_t *);
-void dumppacket(ip)
- ip_t *ip;
+void
+dumppacket(ip_t *ip)
{
tcphdr_t *t;
int i, j;
@@ -63,12 +63,9 @@ void dumppacket(ip)
}
-int ip_resend(dev, mtu, r, gwip, datain)
- char *dev;
- int mtu;
- struct in_addr gwip;
- struct ipread *r;
- char *datain;
+int
+ip_resend(char *dev, int mtu, struct ipread *r, struct in_addr gwip,
+ char *datain)
{
ether_header_t *eh;
char dhost[6];
diff --git a/sbin/ipf/ipsend/sbpf.c b/sbin/ipf/ipsend/sbpf.c
index 27f239185d37..c1b8cc546961 100644
--- a/sbin/ipf/ipsend/sbpf.c
+++ b/sbin/ipf/ipsend/sbpf.c
@@ -52,9 +52,8 @@ static u_char *buf = NULL;
static int bufsize = 0, timeout = 1;
-int initdevice(device, tout)
- char *device;
- int tout;
+int
+initdevice(char *device, int tout)
{
struct bpf_version bv;
struct timeval to;
@@ -136,9 +135,8 @@ int initdevice(device, tout)
/*
* output an IP packet onto a fd opened for /dev/bpf
*/
-int sendip(fd, pkt, len)
- int fd, len;
- char *pkt;
+int
+sendip(int fd, char *pkt, int len)
{
if (write(fd, pkt, len) == -1)
{
diff --git a/sbin/ipf/ipsend/sdlpi.c b/sbin/ipf/ipsend/sdlpi.c
index cd540337b2fa..10ef87ed509d 100644
--- a/sbin/ipf/ipsend/sdlpi.c
+++ b/sbin/ipf/ipsend/sdlpi.c
@@ -52,9 +52,8 @@ static const char rcsid[] = "@(#)$Id$";
* Be careful to only include those defined in the flags option for the
* interface are included in the header size.
*/
-int initdevice(device, tout)
- char *device;
- int tout;
+int
+initdevice(char *device, int tout)
{
char devname[16], *s, buf[256];
int i, fd;
@@ -127,7 +126,8 @@ int initdevice(device, tout)
/*
* output an IP packet onto a fd opened for /dev/nit
*/
-int sendip(fd, pkt, len)
+int
+sendip(int fd, char *pkt, int len)
int fd, len;
char *pkt;
{
diff --git a/sbin/ipf/ipsend/snit.c b/sbin/ipf/ipsend/snit.c
index 0d75b4e616f5..ae7491fcf54d 100644
--- a/sbin/ipf/ipsend/snit.c
+++ b/sbin/ipf/ipsend/snit.c
@@ -57,9 +57,8 @@ static const char rcsid[] = "@(#)$Id$";
static int timeout;
-int initdevice(device, tout)
- char *device;
- int tout;
+int
+initdevice(char *device, int tout)
{
struct strioctl si;
struct timeval to;
@@ -114,7 +113,8 @@ int initdevice(device, tout)
/*
* output an IP packet onto a fd opened for /dev/nit
*/
-int sendip(fd, pkt, len)
+int
+sendip(int fd, char *pkt, int len)
int fd, len;
char *pkt;
{
diff --git a/sbin/ipf/ipsend/sock.c b/sbin/ipf/ipsend/sock.c
index 51418d64d1fe..4228b8f6b2d2 100644
--- a/sbin/ipf/ipsend/sock.c
+++ b/sbin/ipf/ipsend/sock.c
@@ -99,10 +99,8 @@ struct proc *proc;
static struct kinfo_proc *getproc(void);
-int kmemcpy(buf, pos, n)
- char *buf;
- void *pos;
- int n;
+int
+kmemcpy(char *buf, void *pos, int n)
{
static int kfd = -1;
off_t offset = (u_long)pos;
@@ -130,7 +128,8 @@ struct nlist names[4] = {
{ NULL }
};
-static struct kinfo_proc *getproc()
+static struct
+kinfo_proc *getproc(void)
{
static struct kinfo_proc kp;
pid_t pid = getpid();
@@ -152,9 +151,8 @@ static struct kinfo_proc *getproc()
}
-struct tcpcb *find_tcp(tfd, ti)
- int tfd;
- struct tcpiphdr *ti;
+struct tcpcb *
+find_tcp(int tfd, struct tcpiphdr *ti)
{
struct tcpcb *t;
struct inpcb *i;
@@ -247,11 +245,8 @@ finderror:
return NULL;
}
-int do_socket(dev, mtu, ti, gwip)
- char *dev;
- int mtu;
- struct tcpiphdr *ti;
- struct in_addr gwip;
+int
+do_socket(char *dev, int mtu, struct tcpiphdr *ti, struct in_addr gwip)
{
struct sockaddr_in rsin, lsin;
struct tcpcb *t, tcb;
diff --git a/sbin/ipf/ipsend/sockraw.c b/sbin/ipf/ipsend/sockraw.c
index c9232273ee86..1fd04a91002b 100644
--- a/sbin/ipf/ipsend/sockraw.c
+++ b/sbin/ipf/ipsend/sockraw.c
@@ -34,7 +34,8 @@ static char sirix[] = "@(#)sirix.c 1.0 10/9/97 (C)1997 Marc Boucher";
#endif
-int initdevice(char *device, int tout)
+int
+initdevice(char *device, int tout)
{
struct sockaddr s;
struct ifreq ifr;
diff --git a/sbin/ipf/libipf/addipopt.c b/sbin/ipf/libipf/addipopt.c
index 26aff83f31b6..81429fbb84b7 100644
--- a/sbin/ipf/libipf/addipopt.c
+++ b/sbin/ipf/libipf/addipopt.c
@@ -11,11 +11,8 @@
#include "ipf.h"
-int addipopt(op, io, len, class)
- char *op;
- struct ipopt_names *io;
- int len;
- char *class;
+int
+addipopt(char *op, struct ipopt_names *io, int len, char *class)
{
int olen = len;
struct in_addr ipadr;
diff --git a/sbin/ipf/libipf/alist_free.c b/sbin/ipf/libipf/alist_free.c
index 44dea1330f81..4b2e17aba84b 100644
--- a/sbin/ipf/libipf/alist_free.c
+++ b/sbin/ipf/libipf/alist_free.c
@@ -8,8 +8,7 @@
#include "ipf.h"
void
-alist_free(hosts)
- alist_t *hosts;
+alist_free(alist_t *hosts)
{
alist_t *a, *next;
diff --git a/sbin/ipf/libipf/allocmbt.c b/sbin/ipf/libipf/allocmbt.c
index df776842736c..ec00cb09b31e 100644
--- a/sbin/ipf/libipf/allocmbt.c
+++ b/sbin/ipf/libipf/allocmbt.c
@@ -8,7 +8,8 @@
#include "ipf.h"
-mb_t *allocmbt(size_t len)
+mb_t *
+allocmbt(size_t len)
{
mb_t *m;
diff --git a/sbin/ipf/libipf/assigndefined.c b/sbin/ipf/libipf/assigndefined.c
index 34f8d9af3acc..991ca70736d9 100644
--- a/sbin/ipf/libipf/assigndefined.c
+++ b/sbin/ipf/libipf/assigndefined.c
@@ -8,8 +8,8 @@
#include "ipf.h"
-void assigndefined(env)
- char *env;
+void
+assigndefined(char *env)
{
char *s, *t;
diff --git a/sbin/ipf/libipf/bcopywrap.c b/sbin/ipf/libipf/bcopywrap.c
index 453c0464846f..c704ef04e5ee 100644
--- a/sbin/ipf/libipf/bcopywrap.c
+++ b/sbin/ipf/libipf/bcopywrap.c
@@ -10,9 +10,8 @@
#include "ipf.h"
-int bcopywrap(from, to, size)
- void *from, *to;
- size_t size;
+int
+bcopywrap(void *from, void *to, size_t size)
{
bcopy((caddr_t)from, (caddr_t)to, size);
return 0;
diff --git a/sbin/ipf/libipf/binprint.c b/sbin/ipf/libipf/binprint.c
index f826721e0d21..131e3f62d481 100644
--- a/sbin/ipf/libipf/binprint.c
+++ b/sbin/ipf/libipf/binprint.c
@@ -11,9 +11,8 @@
#include "ipf.h"
-void binprint(ptr, size)
- void *ptr;
- size_t size;
+void
+binprint(void *ptr, size_t size)
{
u_char *s;
int i, j;
diff --git a/sbin/ipf/libipf/buildopts.c b/sbin/ipf/libipf/buildopts.c
index 1d1de8c36784..2f16fcda049b 100644
--- a/sbin/ipf/libipf/buildopts.c
+++ b/sbin/ipf/libipf/buildopts.c
@@ -11,9 +11,8 @@
#include "ipf.h"
-u_32_t buildopts(cp, op, len)
- char *cp, *op;
- int len;
+u_32_t
+buildopts(char *cp, char *op, int len)
{
struct ipopt_names *io;
u_32_t msk = 0;
diff --git a/sbin/ipf/libipf/checkrev.c b/sbin/ipf/libipf/checkrev.c
index b6f8eeec1fc2..6f73ec0c9573 100644
--- a/sbin/ipf/libipf/checkrev.c
+++ b/sbin/ipf/libipf/checkrev.c
@@ -14,8 +14,8 @@
#include "ipf.h"
#include "netinet/ipl.h"
-int checkrev(ipfname)
- char *ipfname;
+int
+checkrev(char *ipfname)
{
static int vfd = -1;
struct friostat fio;
diff --git a/sbin/ipf/libipf/count4bits.c b/sbin/ipf/libipf/count4bits.c
index a847388fad8e..f374928e7b0e 100644
--- a/sbin/ipf/libipf/count4bits.c
+++ b/sbin/ipf/libipf/count4bits.c
@@ -16,8 +16,8 @@
* consecutive 1's is different to that passed, return -1, else return #
* of bits.
*/
-int count4bits(ip)
- u_int ip;
+int
+count4bits(u_int ip)
{
int cnt = 0, i, j;
u_int ipn;
diff --git a/sbin/ipf/libipf/count6bits.c b/sbin/ipf/libipf/count6bits.c
index b8f43206a8bd..ba624f4d8719 100644
--- a/sbin/ipf/libipf/count6bits.c
+++ b/sbin/ipf/libipf/count6bits.c
@@ -11,8 +11,8 @@
#include "ipf.h"
-int count6bits(msk)
- u_32_t *msk;
+int
+count6bits(u_32_t *msk)
{
int i = 0, k;
u_32_t j;
diff --git a/sbin/ipf/libipf/dupmbt.c b/sbin/ipf/libipf/dupmbt.c
index 0929eeb54229..5a009d8e5a62 100644
--- a/sbin/ipf/libipf/dupmbt.c
+++ b/sbin/ipf/libipf/dupmbt.c
@@ -8,8 +8,8 @@
#include "ipf.h"
-mb_t *dupmbt(orig)
- mb_t *orig;
+mb_t *
+dupmbt(mb_t *orig)
{
mb_t *m;
diff --git a/sbin/ipf/libipf/facpri.c b/sbin/ipf/libipf/facpri.c
index c9b47746b3ac..d892050f20d9 100644
--- a/sbin/ipf/libipf/facpri.c
+++ b/sbin/ipf/libipf/facpri.c
@@ -74,8 +74,7 @@ table_t facs[] = {
* map a facility number to its name
*/
char *
-fac_toname(facpri)
- int facpri;
+fac_toname(int facpri)
{
int i, j, fac;
@@ -97,8 +96,7 @@ fac_toname(facpri)
* map a facility name to its number
*/
int
-fac_findname(name)
- char *name;
+fac_findname(char *name)
{
int i;
@@ -122,8 +120,7 @@ table_t pris[] = {
* map a facility name to its number
*/
int
-pri_findname(name)
- char *name;
+pri_findname(char *name)
{
int i;
@@ -138,8 +135,7 @@ pri_findname(name)
* map a priority number to its name
*/
char *
-pri_toname(facpri)
- int facpri;
+pri_toname(int facpri)
{
int i, pri;
diff --git a/sbin/ipf/libipf/familyname.c b/sbin/ipf/libipf/familyname.c
index 891c6715ed0b..10cd0eaa1e83 100644
--- a/sbin/ipf/libipf/familyname.c
+++ b/sbin/ipf/libipf/familyname.c
@@ -1,6 +1,7 @@
#include "ipf.h"
-const char *familyname(int family)
+const char *
+familyname(int family)
{
if (family == AF_INET)
return "inet";
diff --git a/sbin/ipf/libipf/fill6bits.c b/sbin/ipf/libipf/fill6bits.c
index 39ec735f8ee9..b8f5914ef426 100644
--- a/sbin/ipf/libipf/fill6bits.c
+++ b/sbin/ipf/libipf/fill6bits.c
@@ -11,9 +11,8 @@
#include "ipf.h"
-void fill6bits(bits, msk)
- int bits;
- u_int *msk;
+void
+fill6bits(int bits, u_int *msk)
{
if (bits == 0) {
msk[0] = 0;
diff --git a/sbin/ipf/libipf/findword.c b/sbin/ipf/libipf/findword.c
index e06f213c0540..8e836267db22 100644
--- a/sbin/ipf/libipf/findword.c
+++ b/sbin/ipf/libipf/findword.c
@@ -9,9 +9,8 @@
#include "ipf.h"
-wordtab_t *findword(words, name)
- wordtab_t *words;
- char *name;
+wordtab_t *
+findword(wordtab_t *words, char *name)
{
wordtab_t *w;
diff --git a/sbin/ipf/libipf/freembt.c b/sbin/ipf/libipf/freembt.c
index 0fc748decd65..68daea842cd8 100644
--- a/sbin/ipf/libipf/freembt.c
+++ b/sbin/ipf/libipf/freembt.c
@@ -8,8 +8,8 @@
#include "ipf.h"
-void freembt(m)
- mb_t *m;
+void
+freembt(mb_t *m)
{
free(m);
diff --git a/sbin/ipf/libipf/ftov.c b/sbin/ipf/libipf/ftov.c
index cb9715de450f..082a50e1c397 100644
--- a/sbin/ipf/libipf/ftov.c
+++ b/sbin/ipf/libipf/ftov.c
@@ -1,8 +1,7 @@
#include "ipf.h"
int
-ftov(version)
- int version;
+ftov(int version)
{
#ifdef USE_INET6
if (version == AF_INET6)
diff --git a/sbin/ipf/libipf/gethost.c b/sbin/ipf/libipf/gethost.c
index 14099e25c372..a66247701683 100644
--- a/sbin/ipf/libipf/gethost.c
+++ b/sbin/ipf/libipf/gethost.c
@@ -10,10 +10,8 @@
#include "ipf.h"
-int gethost(family, name, hostp)
- int family;
- char *name;
- i6addr_t *hostp;
+int
+gethost(int family, char *name, i6addr_t *hostp)
{
struct hostent *h;
struct netent *n;
diff --git a/sbin/ipf/libipf/geticmptype.c b/sbin/ipf/libipf/geticmptype.c
index 5c962e949526..aa62d0a41909 100644
--- a/sbin/ipf/libipf/geticmptype.c
+++ b/sbin/ipf/libipf/geticmptype.c
@@ -7,9 +7,8 @@
*/
#include "ipf.h"
-int geticmptype(family, name)
- int family;
- char *name;
+int
+geticmptype(int family, char *name)
{
icmptype_t *i;
diff --git a/sbin/ipf/libipf/getifname.c b/sbin/ipf/libipf/getifname.c
index 518950acd1a2..beb3795fbbb9 100644
--- a/sbin/ipf/libipf/getifname.c
+++ b/sbin/ipf/libipf/getifname.c
@@ -16,8 +16,8 @@
* Given a pointer to an interface in the kernel, return a pointer to a
* string which is the interface name.
*/
-char *getifname(ptr)
- struct ifnet *ptr;
+char *
+getifname(struct ifnet *ptr)
{
#if SOLARIS
# include <sys/mutex.h>
diff --git a/sbin/ipf/libipf/getnattype.c b/sbin/ipf/libipf/getnattype.c
index 81364738e94a..44e1134a7f06 100644
--- a/sbin/ipf/libipf/getnattype.c
+++ b/sbin/ipf/libipf/getnattype.c
@@ -19,8 +19,7 @@ static const char rcsid[] = "@(#)$Id$";
* Get a nat filter type given its kernel address.
*/
char *
-getnattype(nat)
- nat_t *nat;
+getnattype(nat_t *nat)
{
static char unknownbuf[20];
char *which;
diff --git a/sbin/ipf/libipf/getport.c b/sbin/ipf/libipf/getport.c
index 0981ff172b96..d2a4ba7f9c1f 100644
--- a/sbin/ipf/libipf/getport.c
+++ b/sbin/ipf/libipf/getport.c
@@ -11,10 +11,8 @@
#include "ipf.h"
#include <ctype.h>
-int getport(fr, name, port, proto)
- frentry_t *fr;
- char *name, *proto;
- u_short *port;
+int
+getport(frentry_t *fr, char *name, u_short *port, char *proto)
{
struct protoent *p;
struct servent *s;
diff --git a/sbin/ipf/libipf/getportproto.c b/sbin/ipf/libipf/getportproto.c
index 69fecff157fd..7835748175b7 100644
--- a/sbin/ipf/libipf/getportproto.c
+++ b/sbin/ipf/libipf/getportproto.c
@@ -11,9 +11,8 @@
#include <ctype.h>
#include "ipf.h"
-int getportproto(name, proto)
- char *name;
- int proto;
+int
+getportproto(char *name, int proto)
{
struct servent *s;
struct protoent *p;
diff --git a/sbin/ipf/libipf/getproto.c b/sbin/ipf/libipf/getproto.c
index f57fe06358fb..5432a60434f3 100644
--- a/sbin/ipf/libipf/getproto.c
+++ b/sbin/ipf/libipf/getproto.c
@@ -11,8 +11,10 @@
#include "ipf.h"
#include <ctype.h>
-int getproto(name)
- char *name;
+int getproto(char *name);
+
+int
+getproto(char *name)
{
struct protoent *p;
char *s;
diff --git a/sbin/ipf/libipf/getsumd.c b/sbin/ipf/libipf/getsumd.c
index 53869131e694..d353e1189e34 100644
--- a/sbin/ipf/libipf/getsumd.c
+++ b/sbin/ipf/libipf/getsumd.c
@@ -10,8 +10,8 @@
#include "ipf.h"
-char *getsumd(sum)
- u_32_t sum;
+char *
+getsumd(u_32_t sum)
{
static char sumdbuf[17];
diff --git a/sbin/ipf/libipf/icmptypename.c b/sbin/ipf/libipf/icmptypename.c
index d7eb3bd3ab73..304b902a00e5 100644
--- a/sbin/ipf/libipf/icmptypename.c
+++ b/sbin/ipf/libipf/icmptypename.c
@@ -7,8 +7,8 @@
*/
#include "ipf.h"
-char *icmptypename(family, type)
- int family, type;
+char *
+icmptypename(int family, int type)
{
icmptype_t *i;
diff --git a/sbin/ipf/libipf/inet_addr.c b/sbin/ipf/libipf/inet_addr.c
index 2b192ae19eff..0a29c775b964 100644
--- a/sbin/ipf/libipf/inet_addr.c
+++ b/sbin/ipf/libipf/inet_addr.c
@@ -92,9 +92,7 @@ int inet_aton(const char *, struct in_addr *);
* cannot distinguish between failure and a local broadcast address.
*/
int
-inet_aton(cp, addr)
- register const char *cp;
- struct in_addr *addr;
+inet_aton(register const char *cp, struct in_addr *addr)
{
register u_long val;
register int base, n;
@@ -192,8 +190,7 @@ inet_aton(cp, addr)
* The value returned is in network order.
*/
#if 0
-inet_addr(cp)
- const char *cp;
+inet_addr(const char *cp)
{
struct in_addr val;
diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c
index 78ae4bf37849..c6e2e3dc03c3 100644
--- a/sbin/ipf/libipf/interror.c
+++ b/sbin/ipf/libipf/interror.c
@@ -520,8 +520,7 @@ log" },
static ipf_error_entry_t *
-find_error(errnum)
- int errnum;
+find_error(int errnum)
{
ipf_error_entry_t *ie;
@@ -544,9 +543,7 @@ find_error(errnum)
}
char *
-ipf_geterror(fd, func)
- int fd;
- ioctlfunc_t *func;
+ipf_geterror(int fd, ioctlfunc_t *func)
{
static char text[80];
ipf_error_entry_t *ie;
@@ -566,8 +563,7 @@ ipf_geterror(fd, func)
char *
-ipf_strerror(errnum)
- int errnum;
+ipf_strerror(int errnum)
{
static char text[80];
ipf_error_entry_t *ie;
diff --git a/sbin/ipf/libipf/ipf_dotuning.c b/sbin/ipf/libipf/ipf_dotuning.c
index b0ac8b42a2f8..c7064cfbefef 100644
--- a/sbin/ipf/libipf/ipf_dotuning.c
+++ b/sbin/ipf/libipf/ipf_dotuning.c
@@ -12,10 +12,7 @@
#include "netinet/ipl.h"
#include <sys/ioctl.h>
-void ipf_dotuning(fd, tuneargs, iocfn)
- int fd;
- char *tuneargs;
- ioctlfunc_t iocfn;
+void ipf_dotuning(int fd, char *tuneargs, ioctlfunc_t iocfn)
{
ipfobj_t obj;
ipftune_t tu;
diff --git a/sbin/ipf/libipf/ipf_perror.c b/sbin/ipf/libipf/ipf_perror.c
index 08e31648b053..13fc5f0296e4 100644
--- a/sbin/ipf/libipf/ipf_perror.c
+++ b/sbin/ipf/libipf/ipf_perror.c
@@ -3,9 +3,7 @@
#include "ipf.h"
void
-ipf_perror(err, string)
- int err;
- char *string;
+ipf_perror(int err, char *string)
{
if (err == 0)
fprintf(stderr, "%s\n", string);
@@ -14,10 +12,7 @@ ipf_perror(err, string)
}
int
-ipf_perror_fd(fd, iocfunc, string)
- int fd;
- ioctlfunc_t iocfunc;
- char *string;
+ipf_perror_fd( int fd, ioctlfunc_t iocfunc, char *string)
{
int save;
int realerr;
@@ -34,9 +29,7 @@ ipf_perror_fd(fd, iocfunc, string)
}
void
-ipferror(fd, msg)
- int fd;
- char *msg;
+ipferror(int fd, char *msg)
{
if (fd >= 0) {
ipf_perror_fd(fd, ioctl, msg);
diff --git a/sbin/ipf/libipf/ipft_hx.c b/sbin/ipf/libipf/ipft_hx.c
index e424c3929c79..8b27ddd33bd6 100644
--- a/sbin/ipf/libipf/ipft_hx.c
+++ b/sbin/ipf/libipf/ipft_hx.c
@@ -27,8 +27,8 @@ struct ipread iphex = { hex_open, hex_close, hex_readip, 0 };
static FILE *tfp = NULL;
static int tfd = -1;
-static int hex_open(fname)
- char *fname;
+static int
+hex_open(char *fname)
{
if (tfp && tfd != -1) {
rewind(tfp);
@@ -47,7 +47,8 @@ static int hex_open(fname)
}
-static int hex_close()
+static int
+hex_close(void)
{
int cfd = tfd;
@@ -56,10 +57,8 @@ static int hex_close()
}
-static int hex_readip(mb, ifn, dir)
- mb_t *mb;
- char **ifn;
- int *dir;
+static int
+hex_readip(mb_t *mb, char **ifn, int *dir)
{
register char *s, *t, *u;
char line[513];
@@ -153,8 +152,8 @@ static int hex_readip(mb, ifn, dir)
}
-static char *readhex(src, dst)
-register char *src, *dst;
+static char
+*readhex(register char *src, register char *dst)
{
int state = 0;
char c;
diff --git a/sbin/ipf/libipf/ipft_pc.c b/sbin/ipf/libipf/ipft_pc.c
index 65eee078bd06..9fab5234d18c 100644
--- a/sbin/ipf/libipf/ipft_pc.c
+++ b/sbin/ipf/libipf/ipft_pc.c
@@ -67,8 +67,8 @@ struct ipread pcap = { ipcap_open, ipcap_close, ipcap_readip, 0 };
#define SWAPSHORT(y) \
( (((y)&0xff)<<8) | (((y)&0xff00)>>8) )
-static void iswap_hdr(p)
- fileheader_t *p;
+static void
+iswap_hdr(fileheader_t *p)
{
p->major = SWAPSHORT(p->major);
p->minor = SWAPSHORT(p->minor);
@@ -78,8 +78,8 @@ static void iswap_hdr(p)
p->type = SWAPLONG(p->type);
}
-static int ipcap_open(fname)
- char *fname;
+static int
+ipcap_open(char *fname)
{
fileheader_t ph;
int fd, i;
@@ -124,7 +124,8 @@ static int ipcap_open(fname)
}
-static int ipcap_close()
+static int
+ipcap_close(void)
{
return close(pfd);
}
@@ -134,8 +135,8 @@ static int ipcap_close()
* read in the header (and validate) which should be the first record
* in a pcap file.
*/
-static int ipcap_read_rec(rec)
- packetheader_t *rec;
+static int
+ipcap_read_rec(packetheader_t *rec)
{
int n, p, i;
@@ -170,9 +171,8 @@ static int ipcap_read_rec(rec)
* read an entire pcap packet record. only the data part is copied into
* the available buffer, with the number of bytes copied returned.
*/
-static int ipcap_read(buf, cnt)
- char *buf;
- int cnt;
+static int
+ipcap_read(char *buf, int cnt)
{
packetheader_t rec;
static char *bufp = NULL;
@@ -199,10 +199,8 @@ static int ipcap_read(buf, cnt)
/*
* return only an IP packet read into buf
*/
-static int ipcap_readip(mb, ifn, dir)
- mb_t *mb;
- char **ifn;
- int *dir;
+static int
+ipcap_readip(mb_t *mb, char **ifn, int *dir)
{
static char *bufp = NULL;
packetheader_t rec;
diff --git a/sbin/ipf/libipf/ipft_tx.c b/sbin/ipf/libipf/ipft_tx.c
index 3499afedf854..3b6b580c705b 100644
--- a/sbin/ipf/libipf/ipft_tx.c
+++ b/sbin/ipf/libipf/ipft_tx.c
@@ -44,9 +44,8 @@ int parseipv6(char **, ip6_t *, char **, int *);
* returns an ip address as a long var as a result of either a DNS lookup or
* straight inet_addr() call
*/
-static u_32_t tx_hostnum(host, resolved)
- char *host;
- int *resolved;
+static u_32_t
+tx_hostnum(char *host, int *resolved)
{
i6addr_t ipa;
@@ -69,8 +68,8 @@ static u_32_t tx_hostnum(host, resolved)
* find the port number given by the name, either from getservbyname() or
* straight atoi()
*/
-static u_short tx_portnum(name)
- char *name;
+static u_short
+tx_portnum(char *name)
{
struct servent *sp;
@@ -84,8 +83,8 @@ static u_short tx_portnum(name)
}
-static int text_open(fname)
- char *fname;
+static int
+text_open(char *fname)
{
if (tfp && tfd != -1) {
rewind(tfp);
@@ -104,7 +103,8 @@ static int text_open(fname)
}
-static int text_close()
+static int
+text_close(void)
{
int cfd = tfd;
@@ -113,10 +113,8 @@ static int text_close()
}
-static int text_readip(mb, ifn, dir)
- mb_t *mb;
- char **ifn;
- int *dir;
+static int
+text_readip(mb_t *mb, char **ifn, int *dir)
{
register char *s;
char line[513];
@@ -159,11 +157,8 @@ static int text_readip(mb, ifn, dir)
return -1;
}
-static int parseline(line, ip, ifn, out)
- char *line;
- ip_t *ip;
- char **ifn;
- int *out;
+static int
+parseline(char *line, ip_t *ip, char **ifn, int *out)
{
tcphdr_t th, *tcp = &th;
struct icmp icmp, *ic = &icmp;
@@ -337,11 +332,8 @@ static int parseline(line, ip, ifn, out)
#ifdef USE_INET6
-int parseipv6(cpp, ip6, ifn, out)
- char **cpp;
- ip6_t *ip6;
- char **ifn;
- int *out;
+int
+parseipv6(char **cpp, ip6_t *ip6, char **ifn, int *out)
{
tcphdr_t th, *tcp = &th;
struct icmp6_hdr icmp, *ic6 = &icmp;
diff --git a/sbin/ipf/libipf/ipoptsec.c b/sbin/ipf/libipf/ipoptsec.c
index 5e585ba57ef8..e6c8f042748c 100644
--- a/sbin/ipf/libipf/ipoptsec.c
+++ b/sbin/ipf/libipf/ipoptsec.c
@@ -24,8 +24,8 @@ struct ipopt_names secclass[] = {
};
-u_char seclevel(slevel)
- char *slevel;
+u_char
+seclevel(char *slevel)
{
struct ipopt_names *so;
@@ -44,8 +44,8 @@ u_char seclevel(slevel)
}
-u_char secbit(class)
- int class;
+u_char
+secbit(int class)
{
struct ipopt_names *so;
diff --git a/sbin/ipf/libipf/kmem.c b/sbin/ipf/libipf/kmem.c
index 26252a02f0bf..635f84507d1a 100644
--- a/sbin/ipf/libipf/kmem.c
+++ b/sbin/ipf/libipf/kmem.c
@@ -40,8 +40,8 @@ static const char rcsid[] = "@(#)$Id$";
static kvm_t *kvm_f = NULL;
-int openkmem(kern, core)
- char *kern, *core;
+int
+openkmem(char *kern, char *core)
{
kvm_f = kvm_open(kern, core, NULL, O_RDONLY, NULL);
if (kvm_f == NULL)
@@ -52,10 +52,8 @@ int openkmem(kern, core)
return kvm_f != NULL;
}
-int kmemcpy(buf, pos, n)
- register char *buf;
- long pos;
- register int n;
+int
+kmemcpy(register char *buf, long pos, register int n)
{
register int r;
@@ -82,10 +80,8 @@ int kmemcpy(buf, pos, n)
return 0;
}
-int kstrncpy(buf, pos, n)
- register char *buf;
- long pos;
- register int n;
+int
+kstrncpy(register char *buf, long pos, register int n)
{
register int r;
diff --git a/sbin/ipf/libipf/kmemcpywrap.c b/sbin/ipf/libipf/kmemcpywrap.c
index 6c398d6d39f3..c5c5739a33ba 100644
--- a/sbin/ipf/libipf/kmemcpywrap.c
+++ b/sbin/ipf/libipf/kmemcpywrap.c
@@ -11,9 +11,8 @@
#include "ipf.h"
#include "kmem.h"
-int kmemcpywrap(from, to, size)
- void *from, *to;
- size_t size;
+int
+kmemcpywrap(void *from, void *to, size_t size)
{
int ret;
diff --git a/sbin/ipf/libipf/kvatoname.c b/sbin/ipf/libipf/kvatoname.c
index 65b524082df4..bc59960a51b0 100644
--- a/sbin/ipf/libipf/kvatoname.c
+++ b/sbin/ipf/libipf/kvatoname.c
@@ -13,9 +13,8 @@
#include <fcntl.h>
#include <sys/ioctl.h>
-char *kvatoname(func, iocfunc)
- ipfunc_t func;
- ioctlfunc_t iocfunc;
+char *
+kvatoname(ipfunc_t func, ioctlfunc_t iocfunc)
{
static char funcname[40];
ipfunc_resolve_t res;
diff --git a/sbin/ipf/libipf/load_dstlist.c b/sbin/ipf/libipf/load_dstlist.c
index 760699dafeae..484968532a3c 100644
--- a/sbin/ipf/libipf/load_dstlist.c
+++ b/sbin/ipf/libipf/load_dstlist.c
@@ -14,10 +14,7 @@
int
-load_dstlist(dst, iocfunc, nodes)
- ippool_dst_t *dst;
- ioctlfunc_t iocfunc;
- ipf_dstnode_t *nodes;
+load_dstlist(ippool_dst_t *dst, ioctlfunc_t iocfunc, ipf_dstnode_t *nodes)
{
iplookupop_t op;
ipf_dstnode_t *a;
diff --git a/sbin/ipf/libipf/load_dstlistnode.c b/sbin/ipf/libipf/load_dstlistnode.c
index d8160ebaea9c..a09c7a614468 100644
--- a/sbin/ipf/libipf/load_dstlistnode.c
+++ b/sbin/ipf/libipf/load_dstlistnode.c
@@ -14,11 +14,8 @@
int
-load_dstlistnode(role, name, node, iocfunc)
- int role;
- char *name;
- ipf_dstnode_t *node;
- ioctlfunc_t iocfunc;
+load_dstlistnode(int role, char *name, ipf_dstnode_t *node,
+ ioctlfunc_t iocfunc)
{
iplookupop_t op;
frdest_t *dst;
diff --git a/sbin/ipf/libipf/load_hash.c b/sbin/ipf/libipf/load_hash.c
index 7ec79a91258f..390195c02d72 100644
--- a/sbin/ipf/libipf/load_hash.c
+++ b/sbin/ipf/libipf/load_hash.c
@@ -16,10 +16,7 @@
int
-load_hash(iphp, list, iocfunc)
- iphtable_t *iphp;
- iphtent_t *list;
- ioctlfunc_t iocfunc;
+load_hash(iphtable_t *iphp, iphtent_t *list, ioctlfunc_t iocfunc)
{
iplookupop_t op;
iphtable_t iph;
diff --git a/sbin/ipf/libipf/load_hashnode.c b/sbin/ipf/libipf/load_hashnode.c
index 203d75484ec3..2ccd8a181ac8 100644
--- a/sbin/ipf/libipf/load_hashnode.c
+++ b/sbin/ipf/libipf/load_hashnode.c
@@ -16,12 +16,8 @@
int
-load_hashnode(unit, name, node, ttl, iocfunc)
- int unit;
- char *name;
- iphtent_t *node;
- int ttl;
- ioctlfunc_t iocfunc;
+load_hashnode(int unit, char *name, iphtent_t *node, int ttl,
+ ioctlfunc_t iocfunc)
{
iplookupop_t op;
iphtent_t ipe;
diff --git a/sbin/ipf/libipf/load_pool.c b/sbin/ipf/libipf/load_pool.c
index 190a2dff2520..74048388c21a 100644
--- a/sbin/ipf/libipf/load_pool.c
+++ b/sbin/ipf/libipf/load_pool.c
@@ -16,9 +16,7 @@
int
-load_pool(plp, iocfunc)
- ip_pool_t *plp;
- ioctlfunc_t iocfunc;
+load_pool(ip_pool_t *plp, ioctlfunc_t iocfunc)
{
iplookupop_t op;
ip_pool_node_t *a;
diff --git a/sbin/ipf/libipf/load_poolnode.c b/sbin/ipf/libipf/load_poolnode.c
index 0dfc1d25a8f7..d72321d06b6c 100644
--- a/sbin/ipf/libipf/load_poolnode.c
+++ b/sbin/ipf/libipf/load_poolnode.c
@@ -16,12 +16,8 @@
int
-load_poolnode(role, name, node, ttl, iocfunc)
- int role;
- char *name;
- ip_pool_node_t *node;
- int ttl;
- ioctlfunc_t iocfunc;
+load_poolnode(int role, char *name, ip_pool_node_t *node, int ttl,
+ ioctlfunc_t iocfunc)
{
ip_pool_node_t pn;
iplookupop_t op;
diff --git a/sbin/ipf/libipf/mb_hexdump.c b/sbin/ipf/libipf/mb_hexdump.c
index 6da65633191c..91351c3f815e 100644
--- a/sbin/ipf/libipf/mb_hexdump.c
+++ b/sbin/ipf/libipf/mb_hexdump.c
@@ -9,9 +9,7 @@
#include "ipf.h"
void
-mb_hexdump(m, fp)
- mb_t *m;
- FILE *fp;
+mb_hexdump(mb_t *m, FILE *fp)
{
u_char *s;
int len;
diff --git a/sbin/ipf/libipf/msgdsize.c b/sbin/ipf/libipf/msgdsize.c
index 9bdc584bc008..e0e57ce5e8e3 100644
--- a/sbin/ipf/libipf/msgdsize.c
+++ b/sbin/ipf/libipf/msgdsize.c
@@ -8,8 +8,7 @@
#include "ipf.h"
-size_t msgdsize(orig)
- mb_t *orig;
+size_t msgdsize(mb_t *orig)
{
size_t sz = 0;
mb_t *m;
diff --git a/sbin/ipf/libipf/mutex_emul.c b/sbin/ipf/libipf/mutex_emul.c
index 1846701fa40a..3152d2e47013 100644
--- a/sbin/ipf/libipf/mutex_emul.c
+++ b/sbin/ipf/libipf/mutex_emul.c
@@ -17,10 +17,7 @@ static FILE *mutex_file = NULL;
static int initcount = 0;
void
-eMmutex_enter(mtx, file, line)
- eMmutex_t *mtx;
- char *file;
- int line;
+eMmutex_enter(eMmutex_t *mtx, char *file, int line)
{
if (mutex_debug & 2)
fprintf(mutex_file, "%s:%d:eMmutex_enter(%s)\n", file, line,
@@ -42,10 +39,7 @@ eMmutex_enter(mtx, file, line)
void
-eMmutex_exit(mtx, file, line)
- eMmutex_t *mtx;
- char *file;
- int line;
+eMmutex_exit(eMmutex_t *mtx, char *file, int line)
{
if (mutex_debug & 2)
fprintf(mutex_file, "%s:%d:eMmutex_exit(%s)\n", file, line,
@@ -67,11 +61,7 @@ eMmutex_exit(mtx, file, line)
void
-eMmutex_init(mtx, who, file, line)
- eMmutex_t *mtx;
- char *who;
- char *file;
- int line;
+eMmutex_init(eMmutex_t *mtx, char *who, char *file, int line)
{
if (mutex_file == NULL && mutex_debug)
mutex_file = fopen("ipf_mutex_log", "w");
@@ -123,7 +113,7 @@ eMmutex_destroy(mtx, file, line)
void
-ipf_mutex_clean()
+ipf_mutex_clean(void)
{
if (initcount != 0) {
if (mutex_file)
diff --git a/sbin/ipf/libipf/nametokva.c b/sbin/ipf/libipf/nametokva.c
index 8e7af944d508..c1467e21eac2 100644
--- a/sbin/ipf/libipf/nametokva.c
+++ b/sbin/ipf/libipf/nametokva.c
@@ -13,9 +13,8 @@
#include <sys/ioctl.h>
#include <fcntl.h>
-ipfunc_t nametokva(name, iocfunc)
- char *name;
- ioctlfunc_t iocfunc;
+ipfunc_t
+nametokva(char *name, ioctlfunc_t iocfunc)
{
ipfunc_resolve_t res;
int fd;
diff --git a/sbin/ipf/libipf/nat_setgroupmap.c b/sbin/ipf/libipf/nat_setgroupmap.c
index 15c21f6ced12..8a4b461c5a88 100644
--- a/sbin/ipf/libipf/nat_setgroupmap.c
+++ b/sbin/ipf/libipf/nat_setgroupmap.c
@@ -11,8 +11,8 @@ static const char rcsid[] = "@(#)$Id$";
#include "ipf.h"
-void nat_setgroupmap(n)
- ipnat_t *n;
+void
+nat_setgroupmap(ipnat_t *n)
{
if (n->in_nsrcmsk == n->in_osrcmsk)
n->in_ippip = 1;
diff --git a/sbin/ipf/libipf/ntomask.c b/sbin/ipf/libipf/ntomask.c
index 98e3b26119b0..0f0887fe1f7f 100644
--- a/sbin/ipf/libipf/ntomask.c
+++ b/sbin/ipf/libipf/ntomask.c
@@ -10,9 +10,8 @@
#include "ipf.h"
-int ntomask(family, nbits, ap)
- int family, nbits;
- u_32_t *ap;
+int
+ntomask(int family, int nbits, u_32_t *ap)
{
u_32_t mask;
diff --git a/sbin/ipf/libipf/optname.c b/sbin/ipf/libipf/optname.c
index 2bc811b8dbe5..adf12e9c5fc3 100644
--- a/sbin/ipf/libipf/optname.c
+++ b/sbin/ipf/libipf/optname.c
@@ -11,10 +11,8 @@
#include "ipf.h"
-u_32_t optname(cp, sp, linenum)
- char ***cp;
- u_short *sp;
- int linenum;
+u_32_t
+optname(char ***cp, u_short *sp, int linenum)
{
struct ipopt_names *io, *so;
u_long msk = 0;
diff --git a/sbin/ipf/libipf/optprint.c b/sbin/ipf/libipf/optprint.c
index 8b1f5cd9d042..f18ad00dba2a 100644
--- a/sbin/ipf/libipf/optprint.c
+++ b/sbin/ipf/libipf/optprint.c
@@ -10,9 +10,8 @@
#include "ipf.h"
-void optprint(sec, optmsk, optbits)
- u_short *sec;
- u_long optmsk, optbits;
+void
+optprint(u_short *sec, u_long optmsk, u_long optbits)
{
u_short secmsk = sec[0], secbits = sec[1];
struct ipopt_names *io, *so;
diff --git a/sbin/ipf/libipf/optprintv6.c b/sbin/ipf/libipf/optprintv6.c
index 752d1b353485..d043ff774031 100644
--- a/sbin/ipf/libipf/optprintv6.c
+++ b/sbin/ipf/libipf/optprintv6.c
@@ -12,9 +12,8 @@
#ifdef USE_INET6
-void optprintv6(sec, optmsk, optbits)
- u_short *sec;
- u_long optmsk, optbits;
+void
+optprintv6(u_short *sec, u_long optmsk, u_long optbits)
{
u_short secmsk = sec[0], secbits = sec[1];
struct ipopt_names *io;
diff --git a/sbin/ipf/libipf/optvalue.c b/sbin/ipf/libipf/optvalue.c
index 5bc1f4298a25..896d5fb7185f 100644
--- a/sbin/ipf/libipf/optvalue.c
+++ b/sbin/ipf/libipf/optvalue.c
@@ -10,8 +10,8 @@
#include "ipf.h"
-u_32_t getoptbyname(optname)
- char *optname;
+u_32_t
+getoptbyname(char *optname)
{
struct ipopt_names *io;
@@ -22,8 +22,8 @@ u_32_t getoptbyname(optname)
}
-u_32_t getoptbyvalue(optval)
- int optval;
+u_32_t
+getoptbyvalue(int optval)
{
struct ipopt_names *io;
diff --git a/sbin/ipf/libipf/parsefields.c b/sbin/ipf/libipf/parsefields.c
index 93c3601c9557..f79159f5419b 100644
--- a/sbin/ipf/libipf/parsefields.c
+++ b/sbin/ipf/libipf/parsefields.c
@@ -3,9 +3,7 @@
extern int nohdrfields;
-wordtab_t *parsefields(table, arg)
- wordtab_t *table;
- char *arg;
+wordtab_t *parsefields(wordtab_t *table, char *arg)
{
wordtab_t *f, *fields;
char *s, *t;
diff --git a/sbin/ipf/libipf/parseipfexpr.c b/sbin/ipf/libipf/parseipfexpr.c
index b4b00f91bfca..415c4b543a8e 100644
--- a/sbin/ipf/libipf/parseipfexpr.c
+++ b/sbin/ipf/libipf/parseipfexpr.c
@@ -32,9 +32,7 @@ static ipfopentry_t opwords[17] = {
int *
-parseipfexpr(line, errorptr)
- char *line;
- char **errorptr;
+parseipfexpr(char *line, char **errorptr)
{
int not, items, asize, *oplist, osize, i;
char *temp, *arg, *s, *t, *ops, *error;
diff --git a/sbin/ipf/libipf/parsewhoisline.c b/sbin/ipf/libipf/parsewhoisline.c
index 526935ca23a5..eb26a3efa348 100644
--- a/sbin/ipf/libipf/parsewhoisline.c
+++ b/sbin/ipf/libipf/parsewhoisline.c
@@ -12,10 +12,7 @@ Microsoft Corp MICROSOFT19 (NET-198-136-97-0-1) 198.137.97.0 - 198.137.97.255
Microsoft Corp SAVV-S233053-6 (NET-206-79-74-32-1) 206.79.74.32 - 206.79.74.47
*/
int
-parsewhoisline(line, addrp, maskp)
- char *line;
- addrfamily_t *addrp;
- addrfamily_t *maskp;
+parsewhoisline(char *line, addrfamily_t *addrp, addrfamily_t *maskp)
{
struct in_addr a1, a2;
char *src = line;
diff --git a/sbin/ipf/libipf/poolio.c b/sbin/ipf/libipf/poolio.c
index 18cf698222a8..83cfb8cf5047 100644
--- a/sbin/ipf/libipf/poolio.c
+++ b/sbin/ipf/libipf/poolio.c
@@ -16,7 +16,7 @@ static int poolfd = -1;
int
-pool_open()
+pool_open(void)
{
if ((opts & OPT_DONTOPEN) != 0)
@@ -38,7 +38,7 @@ pool_ioctl(iocfunc, cmd, ptr)
void
-pool_close()
+pool_close(void)
{
if (poolfd != -1) {
close(poolfd);
@@ -47,7 +47,7 @@ pool_close()
}
int
-pool_fd()
+pool_fd(void)
{
return poolfd;
}
diff --git a/sbin/ipf/libipf/prependmbt.c b/sbin/ipf/libipf/prependmbt.c
index 4f7220ba236a..871e46be15a2 100644
--- a/sbin/ipf/libipf/prependmbt.c
+++ b/sbin/ipf/libipf/prependmbt.c
@@ -8,9 +8,7 @@
#include "ipf.h"
-int prependmbt(fin, m)
- fr_info_t *fin;
- mb_t *m;
+int prependmbt( fr_info_t *fin, mb_t *m)
{
m->mb_next = *fin->fin_mp;
*fin->fin_mp = m;
diff --git a/sbin/ipf/libipf/print_toif.c b/sbin/ipf/libipf/print_toif.c
index fb4a266318b4..438207bf7e72 100644
--- a/sbin/ipf/libipf/print_toif.c
+++ b/sbin/ipf/libipf/print_toif.c
@@ -12,11 +12,7 @@
void
-print_toif(family, tag, base, fdp)
- int family;
- char *tag;
- char *base;
- frdest_t *fdp;
+print_toif(int family, char *tag, char *base, frdest_t *fdp)
{
switch (fdp->fd_type)
{
diff --git a/sbin/ipf/libipf/printactiveaddr.c b/sbin/ipf/libipf/printactiveaddr.c
index 531cdc1fc782..66b5b00aaf98 100644
--- a/sbin/ipf/libipf/printactiveaddr.c
+++ b/sbin/ipf/libipf/printactiveaddr.c
@@ -15,10 +15,7 @@ static const char rcsid[] = "@(#)$Id: printactiveaddr.c,v 1.3.2.2 2012/07/22 08:
void
-printactiveaddress(v, fmt, addr, ifname)
- int v;
- char *fmt, *ifname;
- i6addr_t *addr;
+printactiveaddress(int v, char *fmt, i6addr_t *addr, char *ifname)
{
switch (v)
{
diff --git a/sbin/ipf/libipf/printactivenat.c b/sbin/ipf/libipf/printactivenat.c
index c696c0b2cacd..fcef19a4efa7 100644
--- a/sbin/ipf/libipf/printactivenat.c
+++ b/sbin/ipf/libipf/printactivenat.c
@@ -17,10 +17,7 @@ static const char rcsid[] = "@(#)$Id$";
void
-printactivenat(nat, opts, ticks)
- nat_t *nat;
- int opts;
- u_long ticks;
+printactivenat(nat_t *nat, int opts, u_long ticks)
{
PRINTF("%s", getnattype(nat));
diff --git a/sbin/ipf/libipf/printaddr.c b/sbin/ipf/libipf/printaddr.c
index 03fbacbcce74..461f62bcad55 100644
--- a/sbin/ipf/libipf/printaddr.c
+++ b/sbin/ipf/libipf/printaddr.c
@@ -9,10 +9,8 @@
#include "ipf.h"
void
-printaddr(family, type, base, ifidx, addr, mask)
- int family, type, ifidx;
- char *base;
- u_32_t *addr, *mask;
+printaddr(int family, int type, char *base, int ifidx, u_32_t *addr,
+ u_32_t *mask)
{
char *suffix;
diff --git a/sbin/ipf/libipf/printaps.c b/sbin/ipf/libipf/printaps.c
index 47c8def6106b..00e4db4cb2b8 100644
--- a/sbin/ipf/libipf/printaps.c
+++ b/sbin/ipf/libipf/printaps.c
@@ -18,9 +18,7 @@ static const char rcsid[] = "@(#)$Id$";
void
-printaps(aps, opts, proto)
- ap_session_t *aps;
- int opts, proto;
+printaps(ap_session_t *aps, int opts, int proto)
{
ipsec_pxy_t ipsec;
ap_session_t ap;
diff --git a/sbin/ipf/libipf/printbuf.c b/sbin/ipf/libipf/printbuf.c
index 4e9236f0d02d..3a9281217f6a 100644
--- a/sbin/ipf/libipf/printbuf.c
+++ b/sbin/ipf/libipf/printbuf.c
@@ -14,9 +14,7 @@
void
-printbuf(buf, len, zend)
- char *buf;
- int len, zend;
+printbuf(char *buf, int len, int zend)
{
char *s;
int c;
diff --git a/sbin/ipf/libipf/printdstl_live.c b/sbin/ipf/libipf/printdstl_live.c
index c8741ed4005a..684da8f0003a 100644
--- a/sbin/ipf/libipf/printdstl_live.c
+++ b/sbin/ipf/libipf/printdstl_live.c
@@ -14,12 +14,8 @@
* the size may be larger than just sizeof().
*/
ippool_dst_t *
-printdstl_live(d, fd, name, opts, fields)
- ippool_dst_t *d;
- int fd;
- char *name;
- int opts;
- wordtab_t *fields;
+printdstl_live( ippool_dst_t *d, int fd, char *name, int opts,
+ wordtab_t *fields)
{
ipf_dstnode_t *entry, *zero;
ipflookupiter_t iter;
diff --git a/sbin/ipf/libipf/printdstlist.c b/sbin/ipf/libipf/printdstlist.c
index 829a1d2e69ce..6468e6ca8ef6 100644
--- a/sbin/ipf/libipf/printdstlist.c
+++ b/sbin/ipf/libipf/printdstlist.c
@@ -8,13 +8,8 @@
ippool_dst_t *
-printdstlist(pp, copyfunc, name, opts, nodes, fields)
- ippool_dst_t *pp;
- copyfunc_t copyfunc;
- char *name;
- int opts;
- ipf_dstnode_t *nodes;
- wordtab_t *fields;
+printdstlist( ippool_dst_t *pp, copyfunc_t copyfunc, char *name, int opts,
+ ipf_dstnode_t *nodes, wordtab_t *fields)
{
ipf_dstnode_t *node;
ippool_dst_t dst;
diff --git a/sbin/ipf/libipf/printdstlistdata.c b/sbin/ipf/libipf/printdstlistdata.c
index 8b55afdb57c7..7940d2ae021b 100644
--- a/sbin/ipf/libipf/printdstlistdata.c
+++ b/sbin/ipf/libipf/printdstlistdata.c
@@ -9,9 +9,7 @@
void
-printdstlistdata(pool, opts)
- ippool_dst_t *pool;
- int opts;
+printdstlistdata( ippool_dst_t *pool, int opts)
{
if ((opts & OPT_DEBUG) == 0) {
diff --git a/sbin/ipf/libipf/printdstlistnode.c b/sbin/ipf/libipf/printdstlistnode.c
index 898986d1c066..1728a5b88594 100644
--- a/sbin/ipf/libipf/printdstlistnode.c
+++ b/sbin/ipf/libipf/printdstlistnode.c
@@ -8,11 +8,8 @@
ipf_dstnode_t *
-printdstlistnode(inp, copyfunc, opts, fields)
- ipf_dstnode_t *inp;
- copyfunc_t copyfunc;
- int opts;
- wordtab_t *fields;
+printdstlistnode(ipf_dstnode_t *inp, copyfunc_t copyfunc, int opts,
+ wordtab_t *fields)
{
ipf_dstnode_t node, *np;
int i;
diff --git a/sbin/ipf/libipf/printdstlistpolicy.c b/sbin/ipf/libipf/printdstlistpolicy.c
index 4873b95e207f..96df1bc0bce1 100644
--- a/sbin/ipf/libipf/printdstlistpolicy.c
+++ b/sbin/ipf/libipf/printdstlistpolicy.c
@@ -8,8 +8,7 @@
void
-printdstlistpolicy(policy)
- ippool_policy_t policy;
+printdstlistpolicy(ippool_policy_t policy)
{
switch (policy)
{
diff --git a/sbin/ipf/libipf/printfieldhdr.c b/sbin/ipf/libipf/printfieldhdr.c
index f796f6fed62f..ba14af40499c 100644
--- a/sbin/ipf/libipf/printfieldhdr.c
+++ b/sbin/ipf/libipf/printfieldhdr.c
@@ -11,8 +11,7 @@
void
-printfieldhdr(words, field)
- wordtab_t *words, *field;
+printfieldhdr(wordtab_t *words, wordtab_t *field)
{
wordtab_t *w;
char *s, *t;
diff --git a/sbin/ipf/libipf/printfr.c b/sbin/ipf/libipf/printfr.c
index 9883df48f8f4..2ffb65f69207 100644
--- a/sbin/ipf/libipf/printfr.c
+++ b/sbin/ipf/libipf/printfr.c
@@ -15,9 +15,7 @@
* print the filter structure in a useful way
*/
void
-printfr(fp, iocfunc)
- struct frentry *fp;
- ioctlfunc_t iocfunc;
+printfr( struct frentry *fp, ioctlfunc_t iocfunc)
{
struct protoent *p;
u_short sec[2];
diff --git a/sbin/ipf/libipf/printfraginfo.c b/sbin/ipf/libipf/printfraginfo.c
index dd2966fc05b5..fcafdde707be 100644
--- a/sbin/ipf/libipf/printfraginfo.c
+++ b/sbin/ipf/libipf/printfraginfo.c
@@ -12,9 +12,7 @@
void
-printfraginfo(prefix, ifr)
- char *prefix;
- struct ipfr *ifr;
+printfraginfo(char *prefix, struct ipfr *ifr)
{
frentry_t fr;
int family;
diff --git a/sbin/ipf/libipf/printhash.c b/sbin/ipf/libipf/printhash.c
index 37796620fc1d..6961cb170f60 100644
--- a/sbin/ipf/libipf/printhash.c
+++ b/sbin/ipf/libipf/printhash.c
@@ -10,12 +10,8 @@
iphtable_t *
-printhash(hp, copyfunc, name, opts, fields)
- iphtable_t *hp;
- copyfunc_t copyfunc;
- char *name;
- int opts;
- wordtab_t *fields;
+printhash( iphtable_t *hp, copyfunc_t copyfunc, char *name, int opts,
+ wordtab_t *fields)
{
iphtent_t *ipep, **table;
iphtable_t iph;
diff --git a/sbin/ipf/libipf/printhash_live.c b/sbin/ipf/libipf/printhash_live.c
index 6003a63f60d2..edf85675474a 100644
--- a/sbin/ipf/libipf/printhash_live.c
+++ b/sbin/ipf/libipf/printhash_live.c
@@ -10,12 +10,7 @@
iphtable_t *
-printhash_live(hp, fd, name, opts, fields)
- iphtable_t *hp;
- int fd;
- char *name;
- int opts;
- wordtab_t *fields;
+printhash_live(iphtable_t *hp, int fd, char *name, int opts, wordtab_t *fields)
{
iphtent_t entry, zero;
ipflookupiter_t iter;
diff --git a/sbin/ipf/libipf/printhashdata.c b/sbin/ipf/libipf/printhashdata.c
index ea2d41636e46..690243d63f1e 100644
--- a/sbin/ipf/libipf/printhashdata.c
+++ b/sbin/ipf/libipf/printhashdata.c
@@ -9,9 +9,7 @@
void
-printhashdata(hp, opts)
- iphtable_t *hp;
- int opts;
+printhashdata(iphtable_t *hp, int opts)
{
if ((opts & OPT_DEBUG) == 0) {
diff --git a/sbin/ipf/libipf/printhashnode.c b/sbin/ipf/libipf/printhashnode.c
index 8a45d86c5134..18cd7a1d9f84 100644
--- a/sbin/ipf/libipf/printhashnode.c
+++ b/sbin/ipf/libipf/printhashnode.c
@@ -10,12 +10,8 @@
iphtent_t *
-printhashnode(iph, ipep, copyfunc, opts, fields)
- iphtable_t *iph;
- iphtent_t *ipep;
- copyfunc_t copyfunc;
- int opts;
- wordtab_t *fields;
+printhashnode(iphtable_t *iph, iphtent_t *ipep, copyfunc_t copyfunc, int opts,
+ wordtab_t *fields)
{
iphtent_t ipe;
u_int hv;
diff --git a/sbin/ipf/libipf/printhost.c b/sbin/ipf/libipf/printhost.c
index 009a9bb1803e..e04882ffe614 100644
--- a/sbin/ipf/libipf/printhost.c
+++ b/sbin/ipf/libipf/printhost.c
@@ -10,9 +10,7 @@
void
-printhost(family, addr)
- int family;
- u_32_t *addr;
+printhost(int family, u_32_t *addr)
{
#ifdef USE_INET6
char ipbuf[64];
diff --git a/sbin/ipf/libipf/printhostmap.c b/sbin/ipf/libipf/printhostmap.c
index 714bc416932b..bdb15d84995f 100644
--- a/sbin/ipf/libipf/printhostmap.c
+++ b/sbin/ipf/libipf/printhostmap.c
@@ -11,9 +11,7 @@
#include "ipf.h"
void
-printhostmap(hmp, hv)
- hostmap_t *hmp;
- u_int hv;
+printhostmap(hostmap_t *hmp, u_int hv)
{
printactiveaddress(hmp->hm_v, "%s", &hmp->hm_osrcip6, NULL);
diff --git a/sbin/ipf/libipf/printhostmask.c b/sbin/ipf/libipf/printhostmask.c
index b1e41f9c0a87..f5495458fa04 100644
--- a/sbin/ipf/libipf/printhostmask.c
+++ b/sbin/ipf/libipf/printhostmask.c
@@ -12,9 +12,7 @@
void
-printhostmask(family, addr, mask)
- int family;
- u_32_t *addr, *mask;
+printhostmask( int family, u_32_t *addr, u_32_t *mask)
{
#ifdef USE_INET6
char ipbuf[64];
diff --git a/sbin/ipf/libipf/printifname.c b/sbin/ipf/libipf/printifname.c
index 2e554d950aed..e6a38a8692ad 100644
--- a/sbin/ipf/libipf/printifname.c
+++ b/sbin/ipf/libipf/printifname.c
@@ -12,9 +12,7 @@
void
-printifname(format, name, ifp)
- char *format, *name;
- void *ifp;
+printifname(char *format, char *name, void *ifp)
{
PRINTF("%s%s", format, name);
if ((ifp == NULL) && strcmp(name, "-") && strcmp(name, "*"))
diff --git a/sbin/ipf/libipf/printip.c b/sbin/ipf/libipf/printip.c
index a0b8bd37f277..7cf55f04afec 100644
--- a/sbin/ipf/libipf/printip.c
+++ b/sbin/ipf/libipf/printip.c
@@ -12,9 +12,7 @@
void
-printip(family, addr)
- int family;
- u_32_t *addr;
+printip(int family, u_32_t *addr)
{
struct in_addr ipa;
diff --git a/sbin/ipf/libipf/printipfexpr.c b/sbin/ipf/libipf/printipfexpr.c
index 6fb74c1e2e26..535bee6f6b3e 100644
--- a/sbin/ipf/libipf/printipfexpr.c
+++ b/sbin/ipf/libipf/printipfexpr.c
@@ -8,8 +8,7 @@ static void printhostsv6(int *);
#endif
void
-printipfexpr(array)
- int *array;
+printipfexpr(int *array)
{
int i, nelems, j, not;
ipfexp_t *ipfe;
@@ -132,8 +131,7 @@ printipfexpr(array)
static void
-printsingle(array)
- int *array;
+printsingle(int *array)
{
ipfexp_t *ipfe = (ipfexp_t *)array;
int i;
@@ -148,8 +146,7 @@ printsingle(array)
static void
-printport(array)
- int *array;
+printport(int *array)
{
ipfexp_t *ipfe = (ipfexp_t *)array;
int i;
@@ -164,8 +161,7 @@ printport(array)
static void
-printhosts(array)
- int *array;
+printhosts(int *array)
{
ipfexp_t *ipfe = (ipfexp_t *)array;
int i, j;
@@ -182,8 +178,7 @@ printhosts(array)
#ifdef USE_INET6
static void
-printhostsv6(array)
- int *array;
+printhostsv6(int *array)
{
ipfexp_t *ipfe = (ipfexp_t *)array;
int i, j;
diff --git a/sbin/ipf/libipf/printiphdr.c b/sbin/ipf/libipf/printiphdr.c
index fdf0f75f9079..500b4dcb6ad4 100644
--- a/sbin/ipf/libipf/printiphdr.c
+++ b/sbin/ipf/libipf/printiphdr.c
@@ -10,8 +10,7 @@
void
-printiphdr(ip)
- ip_t *ip;
+printiphdr(ip_t *ip)
{
PRINTF("ip(v=%d,hl=%d,len=%d,tos=%#x,off=%#x,sum=%#x,src=%#x,dst=%#x",
ip->ip_v, ip->ip_hl, ntohs(ip->ip_len), ip->ip_tos,
diff --git a/sbin/ipf/libipf/printlog.c b/sbin/ipf/libipf/printlog.c
index c5278cdfdd6a..a04842530504 100644
--- a/sbin/ipf/libipf/printlog.c
+++ b/sbin/ipf/libipf/printlog.c
@@ -14,8 +14,7 @@
void
-printlog(fp)
- frentry_t *fp;
+printlog(frentry_t *fp)
{
char *s, *u;
diff --git a/sbin/ipf/libipf/printlookup.c b/sbin/ipf/libipf/printlookup.c
index 51f8d6e3b2df..c18faf61fbbb 100644
--- a/sbin/ipf/libipf/printlookup.c
+++ b/sbin/ipf/libipf/printlookup.c
@@ -10,9 +10,7 @@
void
-printlookup(base, addr, mask)
- char *base;
- i6addr_t *addr, *mask;
+printlookup(char *base, i6addr_t *addr, i6addr_t *mask)
{
char name[32];
diff --git a/sbin/ipf/libipf/printmask.c b/sbin/ipf/libipf/printmask.c
index 365d7ffeba14..1130c5190f58 100644
--- a/sbin/ipf/libipf/printmask.c
+++ b/sbin/ipf/libipf/printmask.c
@@ -12,9 +12,7 @@
void
-printmask(family, mask)
- int family;
- u_32_t *mask;
+printmask(int family, u_32_t *mask)
{
struct in_addr ipa;
int ones;
diff --git a/sbin/ipf/libipf/printnat.c b/sbin/ipf/libipf/printnat.c
index a94d4ee6105e..e778d9393d9a 100644
--- a/sbin/ipf/libipf/printnat.c
+++ b/sbin/ipf/libipf/printnat.c
@@ -21,9 +21,7 @@ static const char rcsid[] = "@(#)$Id$";
* Print out a NAT rule
*/
void
-printnat(np, opts)
- ipnat_t *np;
- int opts;
+printnat(ipnat_t *np, int opts)
{
struct protoent *pr;
char *base;
diff --git a/sbin/ipf/libipf/printnataddr.c b/sbin/ipf/libipf/printnataddr.c
index 89faa624193c..ee00b5b14d6c 100644
--- a/sbin/ipf/libipf/printnataddr.c
+++ b/sbin/ipf/libipf/printnataddr.c
@@ -16,11 +16,7 @@ static const char rcsid[] = "@(#)$Id: printnataddr.c,v 1.4.2.2 2012/07/22 08:04:
void
-printnataddr(v, base, addr, ifidx)
- int v;
- char *base;
- nat_addr_t *addr;
- int ifidx;
+printnataddr( int v, char *base, nat_addr_t *addr, int ifidx)
{
switch (v)
{
diff --git a/sbin/ipf/libipf/printnatfield.c b/sbin/ipf/libipf/printnatfield.c
index 49596f607170..7a4986ac8e72 100644
--- a/sbin/ipf/libipf/printnatfield.c
+++ b/sbin/ipf/libipf/printnatfield.c
@@ -48,9 +48,7 @@ wordtab_t natfields[] = {
void
-printnatfield(n, fieldnum)
- nat_t *n;
- int fieldnum;
+printnatfield( nat_t *n, int fieldnum)
{
int i;
diff --git a/sbin/ipf/libipf/printnatside.c b/sbin/ipf/libipf/printnatside.c
index 37e1cb8d1e3a..9329623d03e5 100644
--- a/sbin/ipf/libipf/printnatside.c
+++ b/sbin/ipf/libipf/printnatside.c
@@ -8,9 +8,7 @@
#include "ipf.h"
void
-printnatside(side, ns)
- char *side;
- nat_stat_side_t *ns;
+printnatside(char *side, nat_stat_side_t *ns)
{
PRINTF("%lu\tproxy create fail %s\n", ns->ns_appr_fail, side);
PRINTF("%lu\tproxy fail %s\n", ns->ns_ipf_proxy_fail, side);
diff --git a/sbin/ipf/libipf/printpacket.c b/sbin/ipf/libipf/printpacket.c
index 5c4a74975cb6..9444f93fe840 100644
--- a/sbin/ipf/libipf/printpacket.c
+++ b/sbin/ipf/libipf/printpacket.c
@@ -16,9 +16,7 @@
void
-printpacket(dir, m)
- int dir;
- mb_t *m;
+printpacket(int dir, mb_t *m)
{
u_short len, off;
tcphdr_t *tcp;
diff --git a/sbin/ipf/libipf/printpacket6.c b/sbin/ipf/libipf/printpacket6.c
index 6363e55fc76d..42d1a36b96b3 100644
--- a/sbin/ipf/libipf/printpacket6.c
+++ b/sbin/ipf/libipf/printpacket6.c
@@ -15,9 +15,7 @@
* the inet_ntop() library.
*/
void
-printpacket6(dir, m)
- int dir;
- mb_t *m;
+printpacket6(int dir, mb_t *m)
{
u_char *buf, p;
u_short plen, *addrs;
diff --git a/sbin/ipf/libipf/printpool.c b/sbin/ipf/libipf/printpool.c
index 8d8cdccea59f..ccbfd84d3b67 100644
--- a/sbin/ipf/libipf/printpool.c
+++ b/sbin/ipf/libipf/printpool.c
@@ -10,12 +10,8 @@
ip_pool_t *
-printpool(pp, copyfunc, name, opts, fields)
- ip_pool_t *pp;
- copyfunc_t copyfunc;
- char *name;
- int opts;
- wordtab_t *fields;
+printpool(ip_pool_t *pp, copyfunc_t copyfunc, char *name, int opts,
+ wordtab_t *fields)
{
ip_pool_node_t *ipnp, *ipnpn, ipn, **pnext;
ip_pool_t ipp;
diff --git a/sbin/ipf/libipf/printpool_live.c b/sbin/ipf/libipf/printpool_live.c
index 2aabf32bc14a..15f563277309 100644
--- a/sbin/ipf/libipf/printpool_live.c
+++ b/sbin/ipf/libipf/printpool_live.c
@@ -10,12 +10,8 @@
ip_pool_t *
-printpool_live(pool, fd, name, opts, fields)
- ip_pool_t *pool;
- int fd;
- char *name;
- int opts;
- wordtab_t *fields;
+printpool_live(ip_pool_t *pool, int fd, char *name, int opts,
+ wordtab_t *fields)
{
ip_pool_node_t entry;
ipflookupiter_t iter;
diff --git a/sbin/ipf/libipf/printpooldata.c b/sbin/ipf/libipf/printpooldata.c
index a1591774b4df..ce754f9a89bb 100644
--- a/sbin/ipf/libipf/printpooldata.c
+++ b/sbin/ipf/libipf/printpooldata.c
@@ -9,9 +9,7 @@
void
-printpooldata(pool, opts)
- ip_pool_t *pool;
- int opts;
+printpooldata(ip_pool_t *pool, int opts)
{
if ((opts & OPT_DEBUG) == 0) {
diff --git a/sbin/ipf/libipf/printpoolfield.c b/sbin/ipf/libipf/printpoolfield.c
index 9254ab844615..2a461239ad91 100644
--- a/sbin/ipf/libipf/printpoolfield.c
+++ b/sbin/ipf/libipf/printpoolfield.c
@@ -21,10 +21,7 @@ wordtab_t poolfields[] = {
void
-printpoolfield(p, ptype, fieldnum)
- void *p;
- int ptype;
- int fieldnum;
+printpoolfield(void *p, int ptype, int fieldnum)
{
addrfamily_t *a;
char abuf[80];
diff --git a/sbin/ipf/libipf/printpoolnode.c b/sbin/ipf/libipf/printpoolnode.c
index 6b58b8459327..4198603c7548 100644
--- a/sbin/ipf/libipf/printpoolnode.c
+++ b/sbin/ipf/libipf/printpoolnode.c
@@ -10,10 +10,7 @@
ip_pool_node_t *
-printpoolnode(np, opts, fields)
- ip_pool_node_t *np;
- int opts;
- wordtab_t *fields;
+printpoolnode(ip_pool_node_t *np, int opts, wordtab_t *fields)
{
int i;
diff --git a/sbin/ipf/libipf/printportcmp.c b/sbin/ipf/libipf/printportcmp.c
index 2a5bd0229201..556a3ac2fb0b 100644
--- a/sbin/ipf/libipf/printportcmp.c
+++ b/sbin/ipf/libipf/printportcmp.c
@@ -12,9 +12,7 @@
void
-printportcmp(pr, frp)
- int pr;
- frpcmp_t *frp;
+printportcmp(int pr, frpcmp_t *frp)
{
static char *pcmp1[] = { "*", "=", "!=", "<", ">", "<=", ">=",
"<>", "><", ":" };
diff --git a/sbin/ipf/libipf/printproto.c b/sbin/ipf/libipf/printproto.c
index 879da12d7857..7bc4952b3b7c 100644
--- a/sbin/ipf/libipf/printproto.c
+++ b/sbin/ipf/libipf/printproto.c
@@ -13,10 +13,7 @@ static const char rcsid[] = "@(#)$Id$";
void
-printproto(pr, p, np)
- struct protoent *pr;
- int p;
- ipnat_t *np;
+printproto(struct protoent *pr, int p, ipnat_t *np)
{
if (np != NULL) {
if ((np->in_flags & IPN_TCPUDP) == IPN_TCPUDP)
diff --git a/sbin/ipf/libipf/printsbuf.c b/sbin/ipf/libipf/printsbuf.c
index efda99e856b8..c9c89ef6eb01 100644
--- a/sbin/ipf/libipf/printsbuf.c
+++ b/sbin/ipf/libipf/printsbuf.c
@@ -16,8 +16,7 @@
#include "netinet/ip_scan.h"
void
-printsbuf(buf)
- char *buf;
+printsbuf(char *buf)
{
u_char *s;
int i;
@@ -32,8 +31,7 @@ printsbuf(buf)
#else
void printsbuf(char *buf);
-void printsbuf(buf)
- char *buf;
+void printsbuf(char *buf)
{
#if 0
buf = buf; /* gcc -Wextra */
diff --git a/sbin/ipf/libipf/printstatefields.c b/sbin/ipf/libipf/printstatefields.c
index 5632d8416c47..c928c637480b 100644
--- a/sbin/ipf/libipf/printstatefields.c
+++ b/sbin/ipf/libipf/printstatefields.c
@@ -70,9 +70,7 @@ wordtab_t statefields[] = {
void
-printstatefield(sp, fieldnum)
- ipstate_t *sp;
- int fieldnum;
+printstatefield(ipstate_t *sp, int fieldnum)
{
int i;
diff --git a/sbin/ipf/libipf/printtcpflags.c b/sbin/ipf/libipf/printtcpflags.c
index 9860780307a8..d134fb4a3120 100644
--- a/sbin/ipf/libipf/printtcpflags.c
+++ b/sbin/ipf/libipf/printtcpflags.c
@@ -2,8 +2,7 @@
void
-printtcpflags(tcpf, tcpfm)
- u_32_t tcpf, tcpfm;
+printtcpflags(u_32_t tcpf, u_32_t tcpfm)
{
u_char *t;
char *s;
diff --git a/sbin/ipf/libipf/printtqtable.c b/sbin/ipf/libipf/printtqtable.c
index ffb512dac42e..aff8724eff60 100644
--- a/sbin/ipf/libipf/printtqtable.c
+++ b/sbin/ipf/libipf/printtqtable.c
@@ -10,8 +10,7 @@
void
-printtqtable(table)
- ipftq_t *table;
+printtqtable(ipftq_t *table)
{
int i;
diff --git a/sbin/ipf/libipf/printtunable.c b/sbin/ipf/libipf/printtunable.c
index aa82841b2fe1..b748efd5129a 100644
--- a/sbin/ipf/libipf/printtunable.c
+++ b/sbin/ipf/libipf/printtunable.c
@@ -11,8 +11,7 @@
#include "ipf.h"
void
-printtunable(tup)
- ipftune_t *tup;
+printtunable(ipftune_t *tup)
{
PRINTF("%s\tmin %lu\tmax %lu\tcurrent ",
tup->ipft_name, tup->ipft_min, tup->ipft_max);
diff --git a/sbin/ipf/libipf/printunit.c b/sbin/ipf/libipf/printunit.c
index bac3d45d34c5..935faf0f303a 100644
--- a/sbin/ipf/libipf/printunit.c
+++ b/sbin/ipf/libipf/printunit.c
@@ -8,8 +8,7 @@
void
-printunit(unit)
- int unit;
+printunit(int unit)
{
switch (unit)
diff --git a/sbin/ipf/libipf/remove_hash.c b/sbin/ipf/libipf/remove_hash.c
index a60c1fddc7e9..e76a4aca612b 100644
--- a/sbin/ipf/libipf/remove_hash.c
+++ b/sbin/ipf/libipf/remove_hash.c
@@ -16,9 +16,7 @@
int
-remove_hash(iphp, iocfunc)
- iphtable_t *iphp;
- ioctlfunc_t iocfunc;
+remove_hash(iphtable_t *iphp, ioctlfunc_t iocfunc)
{
iplookupop_t op;
iphtable_t iph;
diff --git a/sbin/ipf/libipf/remove_hashnode.c b/sbin/ipf/libipf/remove_hashnode.c
index 58e9125015b6..f9d796472b1e 100644
--- a/sbin/ipf/libipf/remove_hashnode.c
+++ b/sbin/ipf/libipf/remove_hashnode.c
@@ -16,11 +16,7 @@
int
-remove_hashnode(unit, name, node, iocfunc)
- int unit;
- char *name;
- iphtent_t *node;
- ioctlfunc_t iocfunc;
+remove_hashnode(int unit, char *name, iphtent_t *node, ioctlfunc_t iocfunc)
{
iplookupop_t op;
iphtent_t ipe;
diff --git a/sbin/ipf/libipf/remove_pool.c b/sbin/ipf/libipf/remove_pool.c
index 8e7554963afd..157ab52179e0 100644
--- a/sbin/ipf/libipf/remove_pool.c
+++ b/sbin/ipf/libipf/remove_pool.c
@@ -16,9 +16,7 @@
int
-remove_pool(poolp, iocfunc)
- ip_pool_t *poolp;
- ioctlfunc_t iocfunc;
+remove_pool(ip_pool_t *poolp, ioctlfunc_t iocfunc)
{
iplookupop_t op;
ip_pool_t pool;
diff --git a/sbin/ipf/libipf/remove_poolnode.c b/sbin/ipf/libipf/remove_poolnode.c
index 0b78118ec582..78085c8041a4 100644
--- a/sbin/ipf/libipf/remove_poolnode.c
+++ b/sbin/ipf/libipf/remove_poolnode.c
@@ -16,11 +16,8 @@
int
-remove_poolnode(unit, name, node, iocfunc)
- int unit;
- char *name;
- ip_pool_node_t *node;
- ioctlfunc_t iocfunc;
+remove_poolnode(int unit, char *name, ip_pool_node_t *node,
+ ioctlfunc_t iocfunc)
{
ip_pool_node_t pn;
iplookupop_t op;
diff --git a/sbin/ipf/libipf/resetlexer.c b/sbin/ipf/libipf/resetlexer.c
index 558db98603ed..e6fbbce4ccc0 100644
--- a/sbin/ipf/libipf/resetlexer.c
+++ b/sbin/ipf/libipf/resetlexer.c
@@ -16,7 +16,7 @@ char *string_val = NULL;
long pos = 0;
-void resetlexer()
+void resetlexer(void)
{
string_start = -1;
string_end = -1;
diff --git a/sbin/ipf/libipf/rwlock_emul.c b/sbin/ipf/libipf/rwlock_emul.c
index f2f2ed19532a..e15d9610887f 100644
--- a/sbin/ipf/libipf/rwlock_emul.c
+++ b/sbin/ipf/libipf/rwlock_emul.c
@@ -12,10 +12,7 @@
#define EMM_MAGIC 0x97dd8b3a
-void eMrwlock_read_enter(rw, file, line)
- eMrwlock_t *rw;
- char *file;
- int line;
+void eMrwlock_read_enter(eMrwlock_t *rw, char *file, int line)
{
if (rw->eMrw_magic != EMM_MAGIC) {
fprintf(stderr, "%s:eMrwlock_read_enter(%p): bad magic: %#x\n",
@@ -34,10 +31,7 @@ void eMrwlock_read_enter(rw, file, line)
}
-void eMrwlock_write_enter(rw, file, line)
- eMrwlock_t *rw;
- char *file;
- int line;
+void eMrwlock_write_enter(eMrwlock_t *rw, char *file, int line)
{
if (rw->eMrw_magic != EMM_MAGIC) {
fprintf(stderr, "%s:eMrwlock_write_enter(%p): bad magic: %#x\n",
@@ -56,10 +50,7 @@ void eMrwlock_write_enter(rw, file, line)
}
-void eMrwlock_try_upgrade(rw, file, line)
- eMrwlock_t *rw;
- char *file;
- int line;
+void eMrwlock_try_upgrade(eMrwlock_t *rw, char *file, int line)
{
if (rw->eMrw_magic != EMM_MAGIC) {
fprintf(stderr, "%s:eMrwlock_write_enter(%p): bad magic: %#x\n",
@@ -77,10 +68,7 @@ void eMrwlock_try_upgrade(rw, file, line)
rw->eMrw_heldat = line;
}
-void eMrwlock_downgrade(rw, file, line)
- eMrwlock_t *rw;
- char *file;
- int line;
+void eMrwlock_downgrade(eMrwlock_t *rw, char *file, int line)
{
if (rw->eMrw_magic != EMM_MAGIC) {
fprintf(stderr, "%s:eMrwlock_write_enter(%p): bad magic: %#x\n",
@@ -100,8 +88,7 @@ void eMrwlock_downgrade(rw, file, line)
}
-void eMrwlock_exit(rw)
- eMrwlock_t *rw;
+void eMrwlock_exit(eMrwlock_t *rw)
{
if (rw->eMrw_magic != EMM_MAGIC) {
fprintf(stderr, "%s:eMrwlock_exit(%p): bad magic: %#x\n",
@@ -124,9 +111,7 @@ void eMrwlock_exit(rw)
static int initcount = 0;
-void eMrwlock_init(rw, who)
- eMrwlock_t *rw;
- char *who;
+void eMrwlock_init(eMrwlock_t *rw, char *who)
{
if (rw->eMrw_magic == EMM_MAGIC) { /* safe bet ? */
fprintf(stderr,
@@ -145,8 +130,7 @@ void eMrwlock_init(rw, who)
}
-void eMrwlock_destroy(rw)
- eMrwlock_t *rw;
+void eMrwlock_destroy(eMrwlock_t *rw)
{
if (rw->eMrw_magic != EMM_MAGIC) {
fprintf(stderr, "%s:eMrwlock_destroy(%p): bad magic: %#x\n",
@@ -159,7 +143,7 @@ void eMrwlock_destroy(rw)
initcount--;
}
-void ipf_rwlock_clean()
+void ipf_rwlock_clean(void)
{
if (initcount != 0)
abort();
diff --git a/sbin/ipf/libipf/save_execute.c b/sbin/ipf/libipf/save_execute.c
index 68a3a3754900..0f46ec4ee3c7 100644
--- a/sbin/ipf/libipf/save_execute.c
+++ b/sbin/ipf/libipf/save_execute.c
@@ -41,8 +41,7 @@ execute_parse(char **strings)
static void
-execute_print(ctx)
- void *ctx;
+execute_print(void *ctx)
{
execute_opts_t *exe = ctx;
@@ -51,8 +50,7 @@ execute_print(ctx)
static void
-execute_destroy(ctx)
- void *ctx;
+execute_destroy(void *ctx)
{
execute_opts_t *exe = ctx;
@@ -63,9 +61,7 @@ execute_destroy(ctx)
static int
-execute_send(ctx, msg)
- void *ctx;
- ipmon_msg_t *msg;
+execute_send(void *ctx, ipmon_msg_t *msg)
{
execute_opts_t *exe = ctx;
FILE *fp;
diff --git a/sbin/ipf/libipf/save_file.c b/sbin/ipf/libipf/save_file.c
index 84ef157009f5..1ebcb45430af 100644
--- a/sbin/ipf/libipf/save_file.c
+++ b/sbin/ipf/libipf/save_file.c
@@ -27,8 +27,7 @@ ipmon_saver_t filesaver = {
static void *
-file_parse(strings)
- char **strings;
+file_parse(char **strings)
{
file_opts_t *ctx;
@@ -59,8 +58,7 @@ file_parse(strings)
static int
-file_match(ctx1, ctx2)
- void *ctx1, *ctx2;
+file_match(void *ctx1, void *ctx2)
{
file_opts_t *f1 = ctx1, *f2 = ctx2;
@@ -73,8 +71,7 @@ file_match(ctx1, ctx2)
static void *
-file_dup(ctx)
- void *ctx;
+file_dup(void *ctx)
{
file_opts_t *f = ctx;
@@ -84,8 +81,7 @@ file_dup(ctx)
static void
-file_print(ctx)
- void *ctx;
+file_print(void *ctx)
{
file_opts_t *file = ctx;
@@ -98,8 +94,7 @@ file_print(ctx)
static void
-file_destroy(ctx)
- void *ctx;
+file_destroy(void *ctx)
{
file_opts_t *file = ctx;
@@ -114,9 +109,7 @@ file_destroy(ctx)
static int
-file_send(ctx, msg)
- void *ctx;
- ipmon_msg_t *msg;
+file_send(void *ctx, ipmon_msg_t *msg)
{
file_opts_t *file = ctx;
diff --git a/sbin/ipf/libipf/save_nothing.c b/sbin/ipf/libipf/save_nothing.c
index 39158cf51ddb..6cb8948ab8ac 100644
--- a/sbin/ipf/libipf/save_nothing.c
+++ b/sbin/ipf/libipf/save_nothing.c
@@ -38,17 +38,14 @@ nothing_parse(char **strings)
static void
-nothing_destroy(ctx)
- void *ctx;
+nothing_destroy(void *ctx)
{
free(ctx);
}
static int
-nothing_send(ctx, msg)
- void *ctx;
- ipmon_msg_t *msg;
+nothing_send(void *ctx, ipmon_msg_t *msg)
{
#if 0
ctx = ctx; /* gcc -Wextra */
diff --git a/sbin/ipf/libipf/save_syslog.c b/sbin/ipf/libipf/save_syslog.c
index 37d428bdb4aa..ce75d428d186 100644
--- a/sbin/ipf/libipf/save_syslog.c
+++ b/sbin/ipf/libipf/save_syslog.c
@@ -86,8 +86,7 @@ syslog_parse(char **strings)
static void
-syslog_print(ctx)
- void *ctx;
+syslog_print(void *ctx)
{
syslog_opts_t *sys = ctx;
@@ -106,17 +105,14 @@ syslog_print(ctx)
static void
-syslog_destroy(ctx)
- void *ctx;
+syslog_destroy(void *ctx)
{
free(ctx);
}
static int
-syslog_send(ctx, msg)
- void *ctx;
- ipmon_msg_t *msg;
+syslog_send(void *ctx, ipmon_msg_t *msg)
{
syslog_opts_t *sys = ctx;
int facpri;
diff --git a/sbin/ipf/libipf/save_v1trap.c b/sbin/ipf/libipf/save_v1trap.c
index cca61ac600e5..cbd555739462 100644
--- a/sbin/ipf/libipf/save_v1trap.c
+++ b/sbin/ipf/libipf/save_v1trap.c
@@ -46,8 +46,7 @@ ipmon_saver_t snmpv1saver = {
static int
-snmpv1_match(ctx1, ctx2)
- void *ctx1, *ctx2;
+snmpv1_match(void *ctx1, void *ctx2)
{
snmpv1_opts_t *s1 = ctx1, *s2 = ctx2;
@@ -73,8 +72,7 @@ snmpv1_match(ctx1, ctx2)
static void *
-snmpv1_dup(ctx)
- void *ctx;
+snmpv1_dup(void *ctx)
{
snmpv1_opts_t *s = ctx;
@@ -84,8 +82,7 @@ snmpv1_dup(ctx)
static void
-snmpv1_print(ctx)
- void *ctx;
+snmpv1_print(void *ctx)
{
snmpv1_opts_t *snmpv1 = ctx;
@@ -200,8 +197,7 @@ snmpv1_parse(char **strings)
static void
-snmpv1_destroy(ctx)
- void *ctx;
+snmpv1_destroy(void *ctx)
{
snmpv1_opts_t *v1 = ctx;
@@ -218,9 +214,7 @@ snmpv1_destroy(ctx)
static int
-snmpv1_send(ctx, msg)
- void *ctx;
- ipmon_msg_t *msg;
+snmpv1_send(void *ctx, ipmon_msg_t *msg)
{
snmpv1_opts_t *v1 = ctx;
@@ -231,9 +225,7 @@ snmpv1_send(ctx, msg)
static char def_community[] = "public"; /* ublic */
static int
-writelength(buffer, value)
- u_char *buffer;
- u_int value;
+writelength(u_char *buffer, u_int value)
{
u_int n = htonl(value);
int len;
@@ -260,9 +252,7 @@ writelength(buffer, value)
static int
-writeint(buffer, value)
- u_char *buffer;
- int value;
+writeint(u_char *buffer, int value)
{
u_char *s = buffer;
u_int n = value;
@@ -296,14 +286,8 @@ writeint(buffer, value)
* 1.3.6.1.4.1.9932.1.1
*/
static int
-maketrap_v1(community, buffer, bufsize, msg, msglen, ipaddr, when)
- char *community;
- u_char *buffer;
- int bufsize;
- u_char *msg;
- int msglen;
- u_32_t ipaddr;
- time_t when;
+maketrap_v1(char *community, u_char *buffer, int bufsize, u_char *msg,
+ int msglen, u_32_t ipaddr, time_t when)
{
u_char *s = buffer, *t, *pdulen, *varlen;
int basesize = 73;
@@ -443,11 +427,7 @@ maketrap_v1(community, buffer, bufsize, msg, msglen, ipaddr, when)
int
-sendtrap_v1_0(fd, community, msg, msglen, when)
- int fd;
- char *community, *msg;
- int msglen;
- time_t when;
+sendtrap_v1_0(int fd, char *community, char *msg, int msglen, time_t when)
{
u_char buffer[1500];
diff --git a/sbin/ipf/libipf/save_v2trap.c b/sbin/ipf/libipf/save_v2trap.c
index 480f4290851d..4572d5c267ed 100644
--- a/sbin/ipf/libipf/save_v2trap.c
+++ b/sbin/ipf/libipf/save_v2trap.c
@@ -50,8 +50,7 @@ ipmon_saver_t snmpv2saver = {
static int
-snmpv2_match(ctx1, ctx2)
- void *ctx1, *ctx2;
+snmpv2_match(void *ctx1, void *ctx2)
{
snmpv2_opts_t *s1 = ctx1, *s2 = ctx2;
@@ -77,8 +76,7 @@ snmpv2_match(ctx1, ctx2)
static void *
-snmpv2_dup(ctx)
- void *ctx;
+snmpv2_dup(void *ctx)
{
snmpv2_opts_t *s = ctx;
@@ -88,8 +86,7 @@ snmpv2_dup(ctx)
static void
-snmpv2_print(ctx)
- void *ctx;
+snmpv2_print(void *ctx)
{
snmpv2_opts_t *snmpv2 = ctx;
@@ -205,8 +202,7 @@ snmpv2_parse(char **strings)
static void
-snmpv2_destroy(ctx)
- void *ctx;
+snmpv2_destroy(void *ctx)
{
snmpv2_opts_t *v2 = ctx;
@@ -223,9 +219,7 @@ snmpv2_destroy(ctx)
static int
-snmpv2_send(ctx, msg)
- void *ctx;
- ipmon_msg_t *msg;
+snmpv2_send(void *ctx, ipmon_msg_t *msg)
{
snmpv2_opts_t *v2 = ctx;
@@ -233,9 +227,7 @@ snmpv2_send(ctx, msg)
msg->imm_msg, msg->imm_msglen);
}
static int
-writelength(buffer, value)
- u_char *buffer;
- u_int value;
+writelength(u_char *buffer, u_int value)
{
u_int n = htonl(value);
int len;
@@ -262,9 +254,7 @@ writelength(buffer, value)
static int
-writeint(buffer, value)
- u_char *buffer;
- int value;
+writeint(u_char *buffer, int value)
{
u_char *s = buffer;
u_int n = value;
@@ -298,12 +288,8 @@ writeint(buffer, value)
* 1.3.6.1.4.1.9932.1.1
*/
static int
-maketrap_v2(community, buffer, bufsize, msg, msglen)
- char *community;
- u_char *buffer;
- int bufsize;
- u_char *msg;
- int msglen;
+maketrap_v2(char *community, u_char *buffer, int bufsize, u_char *msg,
+ int msglen)
{
u_char *s = buffer, *t, *pdulen;
u_char *varlen;
@@ -442,10 +428,7 @@ maketrap_v2(community, buffer, bufsize, msg, msglen)
int
-sendtrap_v2_0(fd, community, msg, msglen)
- int fd;
- char *community, *msg;
- int msglen;
+sendtrap_v2_0(int fd, char *community, char *msg, int msglen)
{
u_char buffer[1500];
diff --git a/sbin/ipf/libipf/tcp_flags.c b/sbin/ipf/libipf/tcp_flags.c
index 0b602e66ab30..9dfe96d17fe8 100644
--- a/sbin/ipf/libipf/tcp_flags.c
+++ b/sbin/ipf/libipf/tcp_flags.c
@@ -14,10 +14,7 @@ extern char flagset[];
extern u_char flags[];
-u_char tcp_flags(flgs, mask, linenum)
-char *flgs;
-u_char *mask;
-int linenum;
+u_char tcp_flags(char *flgs, u_char *mask, int linenum)
{
u_char tcpf = 0, tcpfm = 0;
char *s;
diff --git a/sbin/ipf/libipf/tcpflags.c b/sbin/ipf/libipf/tcpflags.c
index feb3e8af04ac..86f7631abf80 100644
--- a/sbin/ipf/libipf/tcpflags.c
+++ b/sbin/ipf/libipf/tcpflags.c
@@ -25,8 +25,7 @@ extern char flagset[];
extern u_char flags[];
-u_char tcpflags(flgs)
- char *flgs;
+u_char tcpflags(char *flgs)
{
u_char tcpf = 0;
char *s, *t;
diff --git a/sbin/ipf/libipf/v6optvalue.c b/sbin/ipf/libipf/v6optvalue.c
index a6eff9221256..39757bc849b1 100644
--- a/sbin/ipf/libipf/v6optvalue.c
+++ b/sbin/ipf/libipf/v6optvalue.c
@@ -11,8 +11,7 @@
-u_32_t getv6optbyname(optname)
- char *optname;
+u_32_t getv6optbyname(char *optname)
{
#ifdef USE_INET6
struct ipopt_names *io;
@@ -25,8 +24,7 @@ u_32_t getv6optbyname(optname)
}
-u_32_t getv6optbyvalue(optval)
- int optval;
+u_32_t getv6optbyvalue(int optval)
{
#ifdef USE_INET6
struct ipopt_names *io;
diff --git a/sbin/ipf/libipf/var.c b/sbin/ipf/libipf/var.c
index 22d5b2ac1b1a..d864117e5df9 100644
--- a/sbin/ipf/libipf/var.c
+++ b/sbin/ipf/libipf/var.c
@@ -36,9 +36,7 @@ static variable_t *find_var(name)
}
-char *get_variable(string, after, line)
- char *string, **after;
- int line;
+char *get_variable(char *string, char **after, int line)
{
char c, *s, *t, *value;
variable_t *v;
@@ -83,9 +81,7 @@ char *get_variable(string, after, line)
}
-static char *expand_string(oldstring, line)
- char *oldstring;
- int line;
+static char *expand_string(char *oldstring, int line)
{
char c, *s, *p1, *p2, *p3, *newstring, *value;
int len;
@@ -143,9 +139,7 @@ static char *expand_string(oldstring, line)
}
-void set_variable(name, value)
- char *name;
- char *value;
+void set_variable(char *name, char *value)
{
variable_t *v;
int len;
diff --git a/sbin/ipf/libipf/vtof.c b/sbin/ipf/libipf/vtof.c
index fd1a98432aa8..2d624ac64d45 100644
--- a/sbin/ipf/libipf/vtof.c
+++ b/sbin/ipf/libipf/vtof.c
@@ -1,8 +1,7 @@
#include "ipf.h"
int
-vtof(version)
- int version;
+vtof(int version)
{
#ifdef USE_INET6
if (version == 6)