Page MenuHomeFreeBSD

D33595.diff
No OneTemporary

D33595.diff

diff --git a/sbin/ipf/common/ipf_y.y b/sbin/ipf/common/ipf_y.y
--- a/sbin/ipf/common/ipf_y.y
+++ b/sbin/ipf/common/ipf_y.y
@@ -1983,11 +1983,8 @@
-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 @@
}
-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 @@
}
-static void newrule()
+static void
+newrule(void)
{
frentry_t *frn;
@@ -2086,7 +2081,8 @@
}
-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 frentry_t *addrule()
+static frentry_t *
+addrule(void)
{
frentry_t *f, *f1, *f2;
int count;
@@ -2141,9 +2138,7 @@
static int
-lookuphost(name, addrp)
- char *name;
- i6addr_t *addrp;
+lookuphost(char *name, i6addr_t *addrp)
{
int i;
@@ -2169,9 +2164,8 @@
}
-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 @@
}
-static void resetaddr()
+static void
+resetaddr(void)
{
hashed = 0;
pooled = 0;
@@ -2272,8 +2267,8 @@
}
-static alist_t *newalist(ptr)
-alist_t *ptr;
+static alist_t *
+newalist(alist_t *ptr)
{
alist_t *al;
@@ -2287,8 +2282,7 @@
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 @@
}
-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 @@
}
-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 @@
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 @@
}
-static void doipfexpr(line)
-char *line;
+static void
+doipfexpr(char *line)
{
int *array;
char *error;
@@ -2563,9 +2557,8 @@
}
-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 @@
}
-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 @@
}
-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 @@
}
-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 @@
}
-static frentry_t *allocfr()
+static frentry_t *
+allocfr(void)
{
frentry_t *fr;
@@ -2654,9 +2645,8 @@
}
-static void setgroup(frp, name)
-frentry_t **frp;
-char *name;
+static void
+setgroup(frentry_t **frp, char *name)
{
int pos;
@@ -2667,9 +2657,8 @@
}
-static void setgrhead(frp, name)
-frentry_t **frp;
-char *name;
+static void
+setgrhead(frentry_t **frp, char *name)
{
int pos;
@@ -2680,9 +2669,8 @@
}
-static void seticmphead(frp, name)
-frentry_t **frp;
-char *name;
+static void
+seticmphead(frentry_t **frp, char *name)
{
int pos;
@@ -2694,9 +2682,7 @@
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 @@
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
--- a/sbin/ipf/common/lexer.c
+++ b/sbin/ipf/common/lexer.c
@@ -60,8 +60,8 @@
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 void yyunputc(c)
- int c;
+static void
+yyunputc(int c)
{
if (c == '\n')
yylineNum--;
@@ -107,8 +107,8 @@
}
-static int yyswallow(last)
- int last;
+static int
+yyswallow(int last)
{
int c;
@@ -123,7 +123,8 @@
}
-static char *yytexttochar()
+static char *
+yytexttochar(void)
{
int i;
@@ -134,8 +135,8 @@
}
-static void yystrtotext(str)
- char *str;
+static void
+yystrtotext(char *str)
{
int len;
char *s;
@@ -150,8 +151,8 @@
}
-static char *yytexttostr(offset, max)
- int offset, max;
+static char *
+yytexttostr(int offset, int max)
{
char *str;
int i;
@@ -174,7 +175,8 @@
}
-int yylex()
+int
+yylex(void)
{
static int prior = 0;
static int priornum = 0;
@@ -616,8 +618,8 @@
}
-char *yykeytostr(num)
- int num;
+char *
+yykeytostr(int num)
{
wordtab_t *w;
@@ -631,8 +633,8 @@
}
-wordtab_t *yysettab(words)
- wordtab_t *words;
+wordtab_t *
+yysettab(wordtab_t *words)
{
wordtab_t *save;
@@ -642,8 +644,8 @@
}
-void yyerror(msg)
- char *msg;
+void
+yyerror(char *msg)
{
char *txt, letter[2];
int freetxt = 0;
@@ -669,8 +671,8 @@
}
-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 yysetdict(newdict)
- wordtab_t *newdict;
+void
+yysetdict(wordtab_t *newdict)
{
if (yydebug)
printf("yysetdict(%lx)\n", (u_long)newdict);
@@ -705,7 +707,8 @@
printf("yysavedepth++ => %d\n", yysavedepth);
}
-void yyresetdict()
+void
+yyresetdict(void)
{
if (yydebug)
printf("yyresetdict(%d)\n", yysavedepth);
@@ -720,9 +723,8 @@
#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
--- a/sbin/ipf/ipf/ipf.c
+++ b/sbin/ipf/ipf/ipf.c
@@ -66,9 +66,8 @@
}
-int main(argc,argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
int c, *filter = NULL;
@@ -171,9 +170,8 @@
}
-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 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 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 procfile(file)
- char *file;
+static void
+procfile(char *file)
{
(void) opendevice(ipfname, 1);
@@ -248,10 +248,8 @@
}
-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 void packetlogon(opt)
- char *opt;
+static void
+packetlogon(char *opt)
{
int flag, xfd, logopt, change = 0;
@@ -346,9 +344,8 @@
}
-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 swapactive()
+static void
+swapactive(void)
{
int in = 2;
@@ -452,7 +450,8 @@
}
-void ipf_frsync()
+void
+ipf_frsync(void)
{
int frsyn = 0;
@@ -463,7 +462,8 @@
}
-void zerostats()
+void
+zerostats(void)
{
ipfobj_t obj;
friostat_t fio;
@@ -488,8 +488,8 @@
/*
* 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 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
--- a/sbin/ipf/ipf/ipfcomp.c
+++ b/sbin/ipf/ipf/ipfcomp.c
@@ -62,8 +62,8 @@
* 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 @@
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 @@
}
-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 @@
}
-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 @@
* 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 @@
}
-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 @@
}
-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 @@
}
}
-static void emittail()
+static void
+emittail(void)
{
frgroup_t *g;
@@ -438,12 +430,9 @@
}
-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 @@
}
-void printC(dir)
- int dir;
+void
+printC(int dir)
{
static mc_t *m = NULL;
frgroup_t *g;
@@ -979,11 +968,8 @@
/*
* 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 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
--- a/sbin/ipf/ipfs/ipfs.c
+++ b/sbin/ipf/ipfs/ipfs.c
@@ -87,8 +87,7 @@
/*
* 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 @@
/*
* 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 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 opendevice(ipfdev)
- char *ipfdev;
+int opendevice(char *ipfdev)
{
int fd = -1;
@@ -353,15 +348,13 @@
}
-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 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 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 @@
}
-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 @@
}
-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 writeall(dirname)
- char *dirname;
+int writeall(char *dirname)
{
int fd, devfd;
@@ -828,8 +812,7 @@
}
-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
--- a/sbin/ipf/ipfstat/ipfstat.c
+++ b/sbin/ipf/ipfstat/ipfstat.c
@@ -183,9 +183,7 @@
}
-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 @@
* 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 @@
* 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 printside(side, frs)
- char *side;
- ipf_statistics_t *frs;
+static void printside(char *side, ipf_statistics_t *frs)
{
int i;
@@ -748,9 +736,7 @@
* 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 @@
* 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 @@
}
-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 @@
* 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 @@
/*
* 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 showstatestats(ipsp)
- ips_stat_t *ipsp;
+static void showstatestats(ips_stat_t *ipsp)
{
int minlen, maxlen, totallen;
ipftable_t table;
@@ -1301,17 +1277,8 @@
#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 @@
/*
* 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 @@
/*
* 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 @@
* 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 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 @@
#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 *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 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_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_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_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 @@
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 @@
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 @@
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 @@
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 @@
#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 @@
}
-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 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 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
--- a/sbin/ipf/ipftest/ipftest.c
+++ b/sbin/ipf/ipftest/ipftest.c
@@ -63,9 +63,7 @@
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 ipnattestioctl(int dev, ioctlcmd_t cmd, ...)
+int
+ipnattestioctl(int dev, ioctlcmd_t cmd, ...)
{
caddr_t data;
va_list ap;
@@ -377,7 +376,8 @@
}
-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 ipauthtestioctl(int dev, ioctlcmd_t cmd, ...)
+int
+ipauthtestioctl(int dev, ioctlcmd_t cmd, ...)
{
caddr_t data;
va_list ap;
@@ -423,7 +424,8 @@
}
-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 ipsynctestioctl(int dev, ioctlcmd_t cmd, ...)
+int
+ipsynctestioctl(int dev, ioctlcmd_t cmd, ...)
{
caddr_t data;
va_list ap;
@@ -469,7 +472,8 @@
}
-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 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 @@
/*
* 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 dumpgroups(softc)
- ipf_main_softc_t *softc;
+void
+dumpgroups(ipf_main_softc_t *softc)
{
frgroup_t *fg;
int i;
@@ -587,8 +587,8 @@
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 drain_log(filename)
- char *filename;
+void
+drain_log(char *filename)
{
char buffer[DEFAULT_IPFLOGSIZE];
struct iovec iov;
@@ -645,9 +645,8 @@
}
-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
--- a/sbin/ipf/ipftest/md5.c
+++ b/sbin/ipf/ipftest/md5.c
@@ -105,8 +105,7 @@
/* 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 @@
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 @@
/* 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 @@
/* 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
--- a/sbin/ipf/iplang/iplang_l.l
+++ b/sbin/ipf/iplang/iplang_l.l
@@ -185,7 +185,7 @@
}
-void push_proto()
+void push_proto(void)
{
numpr++;
if (!prstack)
@@ -197,7 +197,7 @@
}
-void pop_proto()
+void pop_proto(void)
{
numpr--;
ipproto = prstack[numpr];
@@ -210,7 +210,7 @@
}
-int save_token()
+int save_token(void)
{
yylval.str = strdup((char *)yytext);
@@ -218,8 +218,7 @@
}
-int next_item(nstate)
-int nstate;
+int next_item(int nstate)
{
struct lwordtab *wt;
@@ -244,8 +243,7 @@
}
-int next_state(nstate, fornext)
-int nstate, fornext;
+int next_state(int nstate, int fornext)
{
next = fornext;
@@ -304,7 +302,7 @@
}
-void swallow()
+void swallow(void)
{
int c;
diff --git a/sbin/ipf/iplang/iplang_y.y b/sbin/ipf/iplang/iplang_y.y
--- a/sbin/ipf/iplang/iplang_y.y
+++ b/sbin/ipf/iplang/iplang_y.y
@@ -615,9 +615,7 @@
}
-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 @@
}
-void *new_header(type)
-int type;
+void *new_header(int type)
{
aniphdr_t *aip, *oip = canip;
int sz = 0;
@@ -676,7 +673,7 @@
}
-void free_aniplist()
+void free_aniplist(void)
{
aniphdr_t *aip, **aipp = &aniphead;
@@ -688,8 +685,7 @@
}
-void inc_anipheaders(inc)
-int inc;
+void inc_anipheaders(int inc)
{
aniphdr_t *aip;
@@ -703,15 +699,14 @@
}
-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 @@
}
-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 @@
}
-void set_datafile(arg)
-char **arg;
+void set_datafile(char **arg)
{
struct stat sb;
char *file = *arg;
@@ -826,7 +819,7 @@
}
-void new_packet()
+void new_packet(void)
{
static u_short id = 0;
@@ -857,8 +850,7 @@
}
-void set_ipv4src(arg)
-char **arg;
+void set_ipv4src(char **arg)
{
ip->ip_src = getipv4addr(*arg);
free(*arg);
@@ -866,8 +858,7 @@
}
-void set_ipv4dst(arg)
-char **arg;
+void set_ipv4dst(char **arg)
{
ip->ip_dst = getipv4addr(*arg);
free(*arg);
@@ -875,8 +866,7 @@
}
-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 @@
}
-void set_ipv4v(arg)
-char **arg;
+void set_ipv4v(char **arg)
{
ip->ip_v = strtol(*arg, NULL, 0);
free(*arg);
@@ -893,8 +882,7 @@
}
-void set_ipv4hl(arg)
-char **arg;
+void set_ipv4hl(char **arg)
{
int newhl, inc;
@@ -908,8 +896,7 @@
}
-void set_ipv4ttl(arg)
-char **arg;
+void set_ipv4ttl(char **arg)
{
ip->ip_ttl = strtol(*arg, NULL, 0);
free(*arg);
@@ -917,8 +904,7 @@
}
-void set_ipv4tos(arg)
-char **arg;
+void set_ipv4tos(char **arg)
{
ip->ip_tos = strtol(*arg, NULL, 0);
free(*arg);
@@ -926,8 +912,7 @@
}
-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 @@
}
-void set_ipv4sum(arg)
-char **arg;
+void set_ipv4sum(char **arg)
{
ip->ip_sum = strtol(*arg, NULL, 0);
free(*arg);
@@ -944,8 +928,7 @@
}
-void set_ipv4len(arg)
-char **arg;
+void set_ipv4len(char **arg)
{
int len;
@@ -957,7 +940,7 @@
}
-void new_tcpheader()
+void new_tcpheader(void)
{
if ((ip->ip_p) && (ip->ip_p != IPPROTO_TCP)) {
@@ -972,8 +955,7 @@
}
-void set_tcpsport(arg)
-char **arg;
+void set_tcpsport(char **arg)
{
u_short *port;
char *pr;
@@ -992,8 +974,7 @@
}
-void set_tcpdport(arg)
-char **arg;
+void set_tcpdport(char **arg)
{
u_short *port;
char *pr;
@@ -1012,8 +993,7 @@
}
-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 @@
}
-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 @@
}
-void set_tcpoff(arg)
-char **arg;
+void set_tcpoff(char **arg)
{
int off;
@@ -1043,8 +1021,7 @@
}
-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 @@
}
-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 @@
}
-void set_tcpsum(arg)
-char **arg;
+void set_tcpsum(char **arg)
{
tcp->th_sum = strtol(*arg, NULL, 0);
free(*arg);
@@ -1070,8 +1045,7 @@
}
-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 @@
}
-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 @@
}
-void end_tcpopt()
+void end_tcpopt(void)
{
int pad;
char *s = (char *)tcp;
@@ -1205,7 +1177,7 @@
}
-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 @@
}
-void set_udpsum(arg)
-char **arg;
+void set_udpsum(char **arg)
{
udp->uh_sum = strtol(*arg, NULL, 0);
free(*arg);
@@ -1240,7 +1211,7 @@
}
-void prep_packet()
+void prep_packet(void)
{
iface_t *ifp;
struct in_addr gwip;
@@ -1265,7 +1236,7 @@
}
-void packet_done()
+void packet_done(void)
{
char outline[80];
int i, j, k;
@@ -1321,7 +1292,7 @@
}
-void new_interface()
+void new_interface(void)
{
cifp = (iface_t *)calloc(1, sizeof(iface_t));
*iftail = cifp;
@@ -1330,7 +1301,7 @@
}
-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 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 @@
}
-void set_ifeaddr(arg)
-char **arg;
+void set_ifeaddr(char **arg)
{
(void) geteaddr(*arg, &cifp->if_eaddr);
free(*arg);
@@ -1373,7 +1340,7 @@
}
-void new_arp()
+void new_arp(void)
{
carp = (arp_t *)calloc(1, sizeof(arp_t));
*arptail = carp;
@@ -1381,8 +1348,7 @@
}
-void set_arpeaddr(arg)
-char **arg;
+void set_arpeaddr(char **arg)
{
(void) geteaddr(*arg, &carp->arp_eaddr);
free(*arg);
@@ -1390,8 +1356,7 @@
}
-void set_arpv4addr(arg)
-char **arg;
+void set_arpv4addr(char **arg)
{
carp->arp_addr = getipv4addr(*arg);
free(*arg);
@@ -1399,9 +1364,7 @@
}
-int arp_getipv4(ip, addr)
-char *ip;
-char *addr;
+int arp_getipv4(char *ip, char *addr)
{
arp_t *a;
@@ -1414,15 +1377,14 @@
}
-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 @@
}
-void set_sendvia(arg)
-char **arg;
+void set_sendvia(char **arg)
{
sending.snd_gw = getipv4addr(*arg);
free(*arg);
@@ -1446,8 +1407,7 @@
}
-void set_defaultrouter(arg)
-char **arg;
+void set_defaultrouter(char **arg)
{
defrouter = getipv4addr(*arg);
free(*arg);
@@ -1455,7 +1415,7 @@
}
-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 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 @@
}
-void set_icmptypetok(type)
-char **type;
+void set_icmptypetok(char **type)
{
char *s;
int i, done = 0;
@@ -1518,51 +1474,43 @@
}
-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 @@
}
-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 end_ipopt()
+void end_ipopt(void)
{
int pad;
char *s, *buf = (char *)ip;
@@ -1679,15 +1624,14 @@
}
-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 end_ipv4()
+void end_ipv4(void)
{
aniphdr_t *aip;
@@ -1717,7 +1661,7 @@
}
-void end_icmp()
+void end_icmp(void)
{
aniphdr_t *aip;
@@ -1730,7 +1674,7 @@
}
-void end_udp()
+void end_udp(void)
{
u_long sum;
aniphdr_t *aip;
@@ -1751,7 +1695,7 @@
}
-void end_tcp()
+void end_tcp(void)
{
u_long sum;
aniphdr_t *aip;
@@ -1772,14 +1716,13 @@
}
-void end_data()
+void end_data(void)
{
free_anipheader();
}
-void iplang(fp)
-FILE *fp;
+void iplang(FILE *fp)
{
yyin = fp;
@@ -1790,10 +1733,7 @@
}
-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 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
--- a/sbin/ipf/ipmon/ipmon.c
+++ b/sbin/ipf/ipmon/ipmon.c
@@ -300,10 +300,8 @@
{ -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_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 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 char *getlocalproto(p)
- u_int p;
+static char *
+getlocalproto(u_int p)
{
static char pnum[4];
char *s;
@@ -454,9 +451,8 @@
}
-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 @@
}
-char *portlocalname(res, proto, port)
+char *
+portlocalname(res, proto, port)
int res;
char *proto;
u_int port;
@@ -497,9 +494,8 @@
}
-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 @@
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 @@
}
-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 @@
}
-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 @@
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_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_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_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 @@
}
-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 write_pid(file)
- char *file;
+static void
+write_pid(char *file)
{
FILE *fp = NULL;
int fd;
@@ -1466,9 +1449,8 @@
}
-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 logopts(turnon, options)
- int turnon;
- char *options;
+static void
+logopts(int turnon, char *options)
{
int flags = 0;
char *s;
@@ -1529,7 +1510,8 @@
ipmonopts &= ~(flags);
}
-static void initconfig(config_t *conf)
+static void
+initconfig(config_t *conf)
{
int i;
@@ -1557,9 +1539,8 @@
}
-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 @@
}
-static void openlogs(config_t *conf)
+static void
+openlogs(config_t *conf)
{
logsource_t *l;
struct stat sb;
@@ -1781,7 +1763,8 @@
}
-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
--- a/sbin/ipf/ipmon/ipmon_y.y
+++ b/sbin/ipf/ipmon/ipmon_y.y
@@ -302,8 +302,7 @@
};
static opt_t *
-new_opt(type)
- int type;
+new_opt(int type)
{
opt_t *o;
@@ -316,9 +315,7 @@
}
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 @@
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 @@
static void
-free_action(a)
- ipmon_action_t *a;
+free_action(ipmon_action_t *a)
{
ipmon_doing_t *d;
@@ -651,8 +645,7 @@
int
-load_config(file)
- char *file;
+load_config(char *file)
{
FILE *fp;
char *s;
@@ -683,7 +676,7 @@
void
-unload_config()
+unload_config(void)
{
ipmon_saver_int_t *sav, **imsip;
ipmon_saver_t *is;
@@ -716,7 +709,7 @@
void
-dump_config()
+dump_config(void)
{
ipmon_action_t *a;
@@ -729,8 +722,7 @@
static void
-print_action(a)
- ipmon_action_t *a;
+print_action(ipmon_action_t *a)
{
ipmon_doing_t *d;
@@ -752,8 +744,7 @@
void *
-add_doing(saver)
- ipmon_saver_t *saver;
+add_doing(ipmon_saver_t *saver)
{
ipmon_saver_int_t *it;
@@ -771,8 +762,7 @@
static int
-find_doing(string)
- char *string;
+find_doing(char *string)
{
ipmon_saver_int_t *it;
@@ -785,9 +775,7 @@
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 @@
static void
-print_match(a)
- ipmon_action_t *a;
+print_match(ipmon_action_t *a)
{
char *coma = "";
@@ -980,8 +967,7 @@
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
--- a/sbin/ipf/ipnat/ipnat.c
+++ b/sbin/ipf/ipnat/ipnat.c
@@ -80,17 +80,16 @@
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 @@
* 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 @@
* 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 @@
/*
* 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 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 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 @@
/*
* 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 @@
/*
* 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 @@
/*
* 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 @@
}
-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
--- a/sbin/ipf/ipnat/ipnat_y.y
+++ b/sbin/ipf/ipnat/ipnat_y.y
@@ -1294,11 +1294,8 @@
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 @@
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 @@
static void
-newnatrule()
+newnatrule(void)
{
ipnat_t *n;
@@ -1402,8 +1396,7 @@
static void
-setnatproto(p)
- int p;
+setnatproto(int p)
{
nat->in_pr[0] = p;
nat->in_pr[1] = p;
@@ -1466,10 +1459,7 @@
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 @@
static void
-setrdrifnames()
+setrdrifnames(void)
{
if ((suggest_port == 1) && (nat->in_flags & IPN_TCPUDP) == 0)
nat->in_flags |= IPN_TCPUDP;
@@ -1586,8 +1576,7 @@
static void
-proxy_setconfig(proxy)
- int proxy;
+proxy_setconfig(int proxy)
{
if (proxy == IPNY_DNS) {
yysetfixeddict(dnswords);
@@ -1596,15 +1585,14 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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
--- a/sbin/ipf/ippool/ippool.c
+++ b/sbin/ipf/ippool/ippool.c
@@ -65,8 +65,7 @@
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 @@
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int err = 1;
@@ -130,9 +127,7 @@
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 @@
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 @@
int
-loadpoolfile(argc, argv, infile)
- int argc;
- char *argv[], *infile;
+loadpoolfile(int argc, char *argv[], char *infile)
{
int c;
@@ -427,9 +418,7 @@
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 @@
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 @@
int
-getrole(rolename)
- char *rolename;
+getrole(char *rolename)
{
int role;
@@ -649,9 +635,7 @@
int
-gettype(typename, minor)
- char *typename;
- u_int *minor;
+gettype(char *typename, u_int *minor)
{
int type;
@@ -673,9 +657,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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
--- a/sbin/ipf/ippool/ippool_y.y
+++ b/sbin/ipf/ippool/ippool_y.y
@@ -609,10 +609,8 @@
};
-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 @@
}
-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 @@
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 @@
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 @@
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 @@
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
--- a/sbin/ipf/ipscan/ipscan_y.y
+++ b/sbin/ipf/ipscan/ipscan_y.y
@@ -197,9 +197,8 @@
};
-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 @@
}
-void printent(isc)
-ipscan_t *isc;
+void
+printent(ipscan_t *isc)
{
char buf[ISC_TLEN+1];
u_char *u;
@@ -334,10 +333,8 @@
}
-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 @@
}
-char **makepair(s1, s2)
-char *s1, *s2;
+char **
+makepair(char *s1, char *s2)
{
char **a;
@@ -418,8 +415,8 @@
}
-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 @@
}
-struct in_addr gethostip(host)
-char *host;
+struct in_addr
+gethostip(char *host)
{
struct hostent *hp;
struct in_addr in;
@@ -452,8 +449,8 @@
}
-int getportnum(port)
-char *port;
+int
+getportnum(char *port)
{
struct servent *s;
@@ -464,7 +461,8 @@
}
-void showlist()
+void
+showlist(void)
{
ipscanstat_t ipsc, *ipscp = &ipsc;
ipscan_t isc;
@@ -490,8 +488,8 @@
}
-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 @@
}
-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
--- 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 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
--- a/sbin/ipf/ipsend/arp.c
+++ b/sbin/ipf/ipsend/arp.c
@@ -34,8 +34,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;
diff --git a/sbin/ipf/ipsend/dlcommon.c b/sbin/ipf/ipsend/dlcommon.c
--- a/sbin/ipf/ipsend/dlcommon.c
+++ b/sbin/ipf/ipsend/dlcommon.c
@@ -38,8 +38,7 @@
void
-dlinforeq(fd)
- int fd;
+dlinforeq(int fd)
{
dl_info_req_t info_req;
struct strbuf ctl;
@@ -58,9 +57,7 @@
}
void
-dlinfoack(fd, bufp)
- int fd;
- char *bufp;
+dlinfoack(int fd, char *bufp)
{
union DL_primitives *dlp;
struct strbuf ctl;
@@ -87,9 +84,7 @@
}
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 @@
}
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 @@
}
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 @@
}
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 @@
}
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 @@
}
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 @@
}
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 @@
}
void
-dldetachreq(fd)
- int fd;
+dldetachreq(int fd)
{
dl_detach_req_t detach_req;
struct strbuf ctl;
@@ -283,13 +262,8 @@
}
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 @@
}
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 @@
}
void
-dlunbindreq(fd)
- int fd;
+dlunbindreq(int fd)
{
dl_unbind_req_t unbind_req;
struct strbuf ctl;
@@ -368,9 +336,7 @@
}
void
-dlokack(fd, bufp)
- int fd;
- char *bufp;
+dlokack(int fd, char *bufp)
{
union DL_primitives *dlp;
struct strbuf ctl;
@@ -397,9 +363,7 @@
}
void
-dlerrorack(fd, bufp)
- int fd;
- char *bufp;
+dlerrorack(int fd, char *bufp)
{
union DL_primitives *dlp;
struct strbuf ctl;
@@ -426,9 +390,7 @@
}
void
-dlbindack(fd, bufp)
- int fd;
- char *bufp;
+dlbindack(int fd, char *bufp)
{
union DL_primitives *dlp;
struct strbuf ctl;
@@ -452,9 +414,7 @@
}
void
-dlphysaddrack(fd, bufp)
- int fd;
- char *bufp;
+dlphysaddrack(int fd, char *bufp)
{
union DL_primitives *dlp;
struct strbuf ctl;
@@ -478,16 +438,13 @@
}
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 @@
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 @@
/*
* 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 @@
}
/* 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 @@
(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 @@
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 @@
(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 @@
(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 @@
(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 @@
}
/* 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 @@
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 @@
}
/* 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 @@
(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 @@
(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 @@
(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 @@
(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 @@
(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 @@
(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 @@
(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 @@
(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 @@
(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 @@
(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 @@
(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 @@
(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 @@
(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 @@
(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 @@
/*
* 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 @@
/*
* Return length
*/
-stringtoaddr(sp, addr)
- char *sp;
- char *addr;
+stringtoaddr(char *sp, char *addr)
{
int n = 0;
char *p;
@@ -1142,8 +1061,7 @@
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 @@
}
char*
-dlprim(prim)
- u_long prim;
+dlprim(u_long prim)
{
static char primbuf[80];
@@ -1195,8 +1112,7 @@
char*
-dlstate(state)
- u_long state;
+dlstate(u_long state)
{
static char statebuf[80];
@@ -1229,8 +1145,7 @@
}
char*
-dlerrno(errno)
- u_long errno;
+dlerrno(u_long errno)
{
static char errnobuf[80];
@@ -1271,8 +1186,7 @@
}
char*
-dlpromisclevel(level)
- u_long level;
+dlpromisclevel(u_long level)
{
static char levelbuf[80];
@@ -1287,8 +1201,7 @@
}
char*
-dlservicemode(servicemode)
- u_long servicemode;
+dlservicemode(u_long servicemode)
{
static char servicemodebuf[80];
@@ -1304,8 +1217,7 @@
}
char*
-dlstyle(style)
- long style;
+dlstyle(long style)
{
static char stylebuf[80];
@@ -1319,8 +1231,7 @@
}
char*
-dlmactype(media)
- u_long media;
+dlmactype(u_long media)
{
static char mediabuf[80];
@@ -1340,28 +1251,21 @@
}
/*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
--- a/sbin/ipf/ipsend/ip.c
+++ b/sbin/ipf/ipsend/ip.c
@@ -31,9 +31,8 @@
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 @@
}
-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_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 @@
/*
* 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 @@
/*
* 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 @@
/*
* 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_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
--- a/sbin/ipf/ipsend/ipresend.c
+++ b/sbin/ipf/ipsend/ipresend.c
@@ -64,9 +64,8 @@
}
-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
--- a/sbin/ipf/ipsend/ipsend.c
+++ b/sbin/ipf/ipsend/ipsend.c
@@ -71,9 +71,8 @@
}
-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 @@
}
-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 @@
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
--- a/sbin/ipf/ipsend/ipsopt.c
+++ b/sbin/ipf/ipsend/ipsopt.c
@@ -72,11 +72,8 @@
}
-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 @@
}
-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
--- a/sbin/ipf/ipsend/iptest.c
+++ b/sbin/ipf/ipsend/iptest.c
@@ -63,9 +63,8 @@
}
-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
--- a/sbin/ipf/ipsend/iptests.c
+++ b/sbin/ipf/ipsend/iptests.c
@@ -95,12 +95,8 @@
#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 @@
/*
* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
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
--- a/sbin/ipf/ipsend/resend.c
+++ b/sbin/ipf/ipsend/resend.c
@@ -33,8 +33,8 @@
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 @@
}
-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
--- a/sbin/ipf/ipsend/sbpf.c
+++ b/sbin/ipf/ipsend/sbpf.c
@@ -52,9 +52,8 @@
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 @@
/*
* 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
--- a/sbin/ipf/ipsend/sdlpi.c
+++ b/sbin/ipf/ipsend/sdlpi.c
@@ -52,9 +52,8 @@
* 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 @@
/*
* 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
--- a/sbin/ipf/ipsend/snit.c
+++ b/sbin/ipf/ipsend/snit.c
@@ -57,9 +57,8 @@
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 @@
/*
* 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
--- a/sbin/ipf/ipsend/sock.c
+++ b/sbin/ipf/ipsend/sock.c
@@ -99,10 +99,8 @@
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 @@
{ 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 @@
}
-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 @@
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
--- a/sbin/ipf/ipsend/sockraw.c
+++ b/sbin/ipf/ipsend/sockraw.c
@@ -34,7 +34,8 @@
#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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- a/sbin/ipf/libipf/facpri.c
+++ b/sbin/ipf/libipf/facpri.c
@@ -74,8 +74,7 @@
* 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 @@
* map a facility name to its number
*/
int
-fac_findname(name)
- char *name;
+fac_findname(char *name)
{
int i;
@@ -122,8 +120,7 @@
* map a facility name to its number
*/
int
-pri_findname(name)
- char *name;
+pri_findname(char *name)
{
int i;
@@ -138,8 +135,7 @@
* 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- a/sbin/ipf/libipf/getnattype.c
+++ b/sbin/ipf/libipf/getnattype.c
@@ -19,8 +19,7 @@
* 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- a/sbin/ipf/libipf/inet_addr.c
+++ b/sbin/ipf/libipf/inet_addr.c
@@ -92,9 +92,7 @@
* 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 @@
* 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
--- a/sbin/ipf/libipf/interror.c
+++ b/sbin/ipf/libipf/interror.c
@@ -520,8 +520,7 @@
static ipf_error_entry_t *
-find_error(errnum)
- int errnum;
+find_error(int errnum)
{
ipf_error_entry_t *ie;
@@ -544,9 +543,7 @@
}
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 @@
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
--- 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
--- 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 @@
}
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 @@
}
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
--- a/sbin/ipf/libipf/ipft_hx.c
+++ b/sbin/ipf/libipf/ipft_hx.c
@@ -27,8 +27,8 @@
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_close()
+static int
+hex_close(void)
{
int cfd = tfd;
@@ -56,10 +57,8 @@
}
-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 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
--- a/sbin/ipf/libipf/ipft_pc.c
+++ b/sbin/ipf/libipf/ipft_pc.c
@@ -67,8 +67,8 @@
#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 @@
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_close()
+static int
+ipcap_close(void)
{
return close(pfd);
}
@@ -134,8 +135,8 @@
* 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 @@
* 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 @@
/*
* 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
--- a/sbin/ipf/libipf/ipft_tx.c
+++ b/sbin/ipf/libipf/ipft_tx.c
@@ -44,9 +44,8 @@
* 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 @@
* 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 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_close()
+static int
+text_close(void)
{
int cfd = tfd;
@@ -113,10 +113,8 @@
}
-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 @@
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 @@
#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
--- a/sbin/ipf/libipf/ipoptsec.c
+++ b/sbin/ipf/libipf/ipoptsec.c
@@ -24,8 +24,8 @@
};
-u_char seclevel(slevel)
- char *slevel;
+u_char
+seclevel(char *slevel)
{
struct ipopt_names *so;
@@ -44,8 +44,8 @@
}
-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
--- a/sbin/ipf/libipf/kmem.c
+++ b/sbin/ipf/libipf/kmem.c
@@ -40,8 +40,8 @@
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 @@
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 @@
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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- a/sbin/ipf/libipf/mutex_emul.c
+++ b/sbin/ipf/libipf/mutex_emul.c
@@ -17,10 +17,7 @@
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 @@
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 @@
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 @@
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
--- 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
--- a/sbin/ipf/libipf/nat_setgroupmap.c
+++ b/sbin/ipf/libipf/nat_setgroupmap.c
@@ -11,8 +11,8 @@
#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
--- 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
--- 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
--- 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
--- 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
--- 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 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
--- 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
--- a/sbin/ipf/libipf/parseipfexpr.c
+++ b/sbin/ipf/libipf/parseipfexpr.c
@@ -32,9 +32,7 @@
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
--- a/sbin/ipf/libipf/parsewhoisline.c
+++ b/sbin/ipf/libipf/parsewhoisline.c
@@ -12,10 +12,7 @@
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
--- a/sbin/ipf/libipf/poolio.c
+++ b/sbin/ipf/libipf/poolio.c
@@ -16,7 +16,7 @@
int
-pool_open()
+pool_open(void)
{
if ((opts & OPT_DONTOPEN) != 0)
@@ -38,7 +38,7 @@
void
-pool_close()
+pool_close(void)
{
if (poolfd != -1) {
close(poolfd);
@@ -47,7 +47,7 @@
}
int
-pool_fd()
+pool_fd(void)
{
return poolfd;
}
diff --git a/sbin/ipf/libipf/prependmbt.c b/sbin/ipf/libipf/prependmbt.c
--- 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
--- 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
--- a/sbin/ipf/libipf/printactiveaddr.c
+++ b/sbin/ipf/libipf/printactiveaddr.c
@@ -15,10 +15,7 @@
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
--- a/sbin/ipf/libipf/printactivenat.c
+++ b/sbin/ipf/libipf/printactivenat.c
@@ -17,10 +17,7 @@
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
--- 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
--- a/sbin/ipf/libipf/printaps.c
+++ b/sbin/ipf/libipf/printaps.c
@@ -18,9 +18,7 @@
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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- a/sbin/ipf/libipf/printipfexpr.c
+++ b/sbin/ipf/libipf/printipfexpr.c
@@ -8,8 +8,7 @@
#endif
void
-printipfexpr(array)
- int *array;
+printipfexpr(int *array)
{
int i, nelems, j, not;
ipfexp_t *ipfe;
@@ -132,8 +131,7 @@
static void
-printsingle(array)
- int *array;
+printsingle(int *array)
{
ipfexp_t *ipfe = (ipfexp_t *)array;
int i;
@@ -148,8 +146,7 @@
static void
-printport(array)
- int *array;
+printport(int *array)
{
ipfexp_t *ipfe = (ipfexp_t *)array;
int i;
@@ -164,8 +161,7 @@
static void
-printhosts(array)
- int *array;
+printhosts(int *array)
{
ipfexp_t *ipfe = (ipfexp_t *)array;
int i, j;
@@ -182,8 +178,7 @@
#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
--- 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
--- 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
--- 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
--- 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
--- a/sbin/ipf/libipf/printnat.c
+++ b/sbin/ipf/libipf/printnat.c
@@ -21,9 +21,7 @@
* 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
--- a/sbin/ipf/libipf/printnataddr.c
+++ b/sbin/ipf/libipf/printnataddr.c
@@ -16,11 +16,7 @@
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
--- a/sbin/ipf/libipf/printnatfield.c
+++ b/sbin/ipf/libipf/printnatfield.c
@@ -48,9 +48,7 @@
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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- a/sbin/ipf/libipf/printpoolfield.c
+++ b/sbin/ipf/libipf/printpoolfield.c
@@ -21,10 +21,7 @@
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
--- 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
--- 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
--- a/sbin/ipf/libipf/printproto.c
+++ b/sbin/ipf/libipf/printproto.c
@@ -13,10 +13,7 @@
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
--- 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 @@
#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
--- a/sbin/ipf/libipf/printstatefields.c
+++ b/sbin/ipf/libipf/printstatefields.c
@@ -70,9 +70,7 @@
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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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
--- a/sbin/ipf/libipf/resetlexer.c
+++ b/sbin/ipf/libipf/resetlexer.c
@@ -16,7 +16,7 @@
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
--- 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_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_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 @@
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_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 @@
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_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 @@
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
--- a/sbin/ipf/libipf/save_execute.c
+++ b/sbin/ipf/libipf/save_execute.c
@@ -41,8 +41,7 @@
static void
-execute_print(ctx)
- void *ctx;
+execute_print(void *ctx)
{
execute_opts_t *exe = ctx;
@@ -51,8 +50,7 @@
static void
-execute_destroy(ctx)
- void *ctx;
+execute_destroy(void *ctx)
{
execute_opts_t *exe = ctx;
@@ -63,9 +61,7 @@
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
--- a/sbin/ipf/libipf/save_file.c
+++ b/sbin/ipf/libipf/save_file.c
@@ -27,8 +27,7 @@
static void *
-file_parse(strings)
- char **strings;
+file_parse(char **strings)
{
file_opts_t *ctx;
@@ -59,8 +58,7 @@
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 @@
static void *
-file_dup(ctx)
- void *ctx;
+file_dup(void *ctx)
{
file_opts_t *f = ctx;
@@ -84,8 +81,7 @@
static void
-file_print(ctx)
- void *ctx;
+file_print(void *ctx)
{
file_opts_t *file = ctx;
@@ -98,8 +94,7 @@
static void
-file_destroy(ctx)
- void *ctx;
+file_destroy(void *ctx)
{
file_opts_t *file = ctx;
@@ -114,9 +109,7 @@
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
--- a/sbin/ipf/libipf/save_nothing.c
+++ b/sbin/ipf/libipf/save_nothing.c
@@ -38,17 +38,14 @@
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
--- a/sbin/ipf/libipf/save_syslog.c
+++ b/sbin/ipf/libipf/save_syslog.c
@@ -86,8 +86,7 @@
static void
-syslog_print(ctx)
- void *ctx;
+syslog_print(void *ctx)
{
syslog_opts_t *sys = ctx;
@@ -106,17 +105,14 @@
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
--- a/sbin/ipf/libipf/save_v1trap.c
+++ b/sbin/ipf/libipf/save_v1trap.c
@@ -46,8 +46,7 @@
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 @@
static void *
-snmpv1_dup(ctx)
- void *ctx;
+snmpv1_dup(void *ctx)
{
snmpv1_opts_t *s = ctx;
@@ -84,8 +82,7 @@
static void
-snmpv1_print(ctx)
- void *ctx;
+snmpv1_print(void *ctx)
{
snmpv1_opts_t *snmpv1 = ctx;
@@ -200,8 +197,7 @@
static void
-snmpv1_destroy(ctx)
- void *ctx;
+snmpv1_destroy(void *ctx)
{
snmpv1_opts_t *v1 = ctx;
@@ -218,9 +214,7 @@
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 @@
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 @@
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 @@
* 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 @@
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
--- a/sbin/ipf/libipf/save_v2trap.c
+++ b/sbin/ipf/libipf/save_v2trap.c
@@ -50,8 +50,7 @@
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 @@
static void *
-snmpv2_dup(ctx)
- void *ctx;
+snmpv2_dup(void *ctx)
{
snmpv2_opts_t *s = ctx;
@@ -88,8 +86,7 @@
static void
-snmpv2_print(ctx)
- void *ctx;
+snmpv2_print(void *ctx)
{
snmpv2_opts_t *snmpv2 = ctx;
@@ -205,8 +202,7 @@
static void
-snmpv2_destroy(ctx)
- void *ctx;
+snmpv2_destroy(void *ctx)
{
snmpv2_opts_t *v2 = ctx;
@@ -223,9 +219,7 @@
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 @@
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 @@
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 @@
* 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 @@
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
--- a/sbin/ipf/libipf/tcp_flags.c
+++ b/sbin/ipf/libipf/tcp_flags.c
@@ -14,10 +14,7 @@
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
--- a/sbin/ipf/libipf/tcpflags.c
+++ b/sbin/ipf/libipf/tcpflags.c
@@ -25,8 +25,7 @@
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
--- 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 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
--- a/sbin/ipf/libipf/var.c
+++ b/sbin/ipf/libipf/var.c
@@ -36,9 +36,7 @@
}
-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 @@
}
-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 @@
}
-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
--- 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)
diff --git a/share/examples/ipfilter/l4check/l4check.c b/share/examples/ipfilter/l4check/l4check.c
--- a/share/examples/ipfilter/l4check/l4check.c
+++ b/share/examples/ipfilter/l4check/l4check.c
@@ -66,8 +66,8 @@
#endif
-char *copystr(dst, src)
- char *dst, *src;
+char *
+copystr(char *dst, char *src)
{
register char *s, *t, c;
register int esc = 0;
@@ -95,8 +95,8 @@
return dst;
}
-void addnat(l4)
- l4cfg_t *l4;
+void
+addnat(l4cfg_t *l4)
{
ipnat_t *ipn = &l4->l4_nat;
@@ -110,8 +110,8 @@
}
-void delnat(l4)
- l4cfg_t *l4;
+void
+delnat(l4cfg_t *l4)
{
ipnat_t *ipn = &l4->l4_nat;
@@ -125,8 +125,8 @@
}
-void connectl4(l4)
- l4cfg_t *l4;
+void
+connectl4(l4cfg_t *l4)
{
l4->l4_rw = 1;
l4->l4_rlen = 0;
@@ -139,9 +139,8 @@
}
-void closel4(l4, dead)
- l4cfg_t *l4;
- int dead;
+void
+closel4(l4cfg_t *l4, int dead)
{
close(l4->l4_fd);
l4->l4_fd = -1;
@@ -153,8 +152,8 @@
}
-void connectfd(l4)
- l4cfg_t *l4;
+void
+connectfd(l4cfg_t *l4)
{
if (connect(l4->l4_fd, (struct sockaddr *)&l4->l4_sin,
sizeof(l4->l4_sin)) == -1) {
@@ -175,8 +174,8 @@
}
-void writefd(l4)
- l4cfg_t *l4;
+void
+writefd(l4cfg_t *l4)
{
char buf[80], *ptr;
int n, i, fd;
@@ -207,8 +206,7 @@
}
-void readfd(l4)
- l4cfg_t *l4;
+void readfd(l4cfg_t *l4)
{
char buf[80], *ptr;
int n, i, fd;
@@ -271,7 +269,8 @@
}
-int runconfig()
+int
+runconfig(void)
{
int fd, opt, res, mfd, i;
struct timeval tv;
@@ -401,11 +400,8 @@
}
-int gethostport(str, lnum, ipp, portp)
- char *str;
- int lnum;
- u_32_t *ipp;
- u_short *portp;
+int
+gethostport(char *str, int lnum, u_32_t *ipp, u_short *portp)
{
struct servent *sp;
struct hostent *hp;
@@ -452,9 +448,8 @@
}
-char *mapfile(file, sizep)
- char *file;
- size_t *sizep;
+char *
+mapfile(char *file, size_t *sizep)
{
struct stat sb;
caddr_t addr;
@@ -484,8 +479,8 @@
}
-int readconfig(filename)
- char *filename;
+int
+readconfig(char *filename)
{
char c, buf[512], *s, *t, *errtxt = NULL, *line;
int num, err = 0;
@@ -752,17 +747,16 @@
}
-void usage(prog)
- char *prog;
+void
+usage(char *prog)
{
fprintf(stderr, "Usage: %s -f <configfile>\n", prog);
exit(1);
}
-int main(argc, argv)
- int argc;
- char *argv[];
+int
+main(int argc, char *argv[])
{
char *config = NULL;
int c;

File Metadata

Mime Type
text/plain
Expires
Tue, Sep 24, 4:20 AM (14 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12626679
Default Alt Text
D33595.diff (130 KB)

Event Timeline