Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dist/ipf/netinet ansify
details: https://anonhg.NetBSD.org/src/rev/5755a8d29d74
branches: trunk
changeset: 773370:5755a8d29d74
user: christos <christos%NetBSD.org@localhost>
date: Wed Feb 01 02:21:19 2012 +0000
description:
ansify
diffstat:
sys/dist/ipf/netinet/ip_auth.c | 104 ++-----
sys/dist/ipf/netinet/ip_auth.h | 42 +-
sys/dist/ipf/netinet/ip_compat.h | 81 ++---
sys/dist/ipf/netinet/ip_dns_pxy.c | 20 +-
sys/dist/ipf/netinet/ip_dstlist.c | 70 ++--
sys/dist/ipf/netinet/ip_dstlist.h | 5 +-
sys/dist/ipf/netinet/ip_fil.h | 430 ++++++++++++++++-----------------
sys/dist/ipf/netinet/ip_fil_compat.c | 384 ++++++++++--------------------
sys/dist/ipf/netinet/ip_fil_netbsd.c | 177 ++++---------
sys/dist/ipf/netinet/ip_frag.c | 176 ++++---------
sys/dist/ipf/netinet/ip_frag.h | 56 ++--
sys/dist/ipf/netinet/ip_ftp_pxy.c | 83 +++---
sys/dist/ipf/netinet/ip_h323_pxy.c | 20 +-
sys/dist/ipf/netinet/ip_htable.c | 233 ++++++------------
sys/dist/ipf/netinet/ip_htable.h | 8 +-
sys/dist/ipf/netinet/ip_ipsec_pxy.c | 24 +-
sys/dist/ipf/netinet/ip_irc_pxy.c | 18 +-
sys/dist/ipf/netinet/ip_log.c | 61 +---
sys/dist/ipf/netinet/ip_lookup.c | 103 +------
sys/dist/ipf/netinet/ip_lookup.h | 94 +++---
sys/dist/ipf/netinet/ip_nat.c | 422 ++++++++-------------------------
sys/dist/ipf/netinet/ip_nat.h | 184 +++++++-------
sys/dist/ipf/netinet/ip_nat6.c | 245 +++++-------------
sys/dist/ipf/netinet/ip_netbios_pxy.c | 10 +-
sys/dist/ipf/netinet/ip_pool.c | 211 +++++-----------
sys/dist/ipf/netinet/ip_pool.h | 4 +-
sys/dist/ipf/netinet/ip_pptp_pxy.c | 26 +-
sys/dist/ipf/netinet/ip_proxy.h | 74 ++--
sys/dist/ipf/netinet/ip_raudio_pxy.c | 14 +-
sys/dist/ipf/netinet/ip_rcmd_pxy.c | 24 +-
sys/dist/ipf/netinet/ip_rpcb_pxy.c | 62 ++--
sys/dist/ipf/netinet/ip_scan.h | 18 +-
sys/dist/ipf/netinet/ip_state.c | 246 +++++--------------
sys/dist/ipf/netinet/ip_state.h | 70 ++--
sys/dist/ipf/netinet/ip_sync.c | 102 ++-----
sys/dist/ipf/netinet/ip_sync.h | 36 +-
sys/dist/ipf/netinet/ip_tftp_pxy.c | 22 +-
sys/dist/ipf/netinet/radix_ipf.c | 22 +-
sys/dist/ipf/netinet/radix_ipf.h | 24 +-
39 files changed, 1502 insertions(+), 2503 deletions(-)
diffs (truncated from 8021 to 300 lines):
diff -r b14e1cd3dc72 -r 5755a8d29d74 sys/dist/ipf/netinet/ip_auth.c
--- a/sys/dist/ipf/netinet/ip_auth.c Wed Feb 01 02:05:51 2012 +0000
+++ b/sys/dist/ipf/netinet/ip_auth.c Wed Feb 01 02:21:19 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_auth.c,v 1.17 2012/01/30 16:12:49 darrenr Exp $ */
+/* $NetBSD: ip_auth.c,v 1.18 2012/02/01 02:21:19 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -129,7 +129,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_auth.c,v 1.17 2012/01/30 16:12:49 darrenr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_auth.c,v 1.18 2012/02/01 02:21:19 christos Exp $");
#else
static const char rcsid[] = "@(#)Id: ip_auth.c,v 2.117.2.7 2012/01/29 05:30:35 darrenr Exp";
#endif
@@ -163,13 +163,13 @@
} ipf_auth_softc_t;
-static void ipf_auth_deref __P((frauthent_t **));
-static void ipf_auth_deref_unlocked __P((ipf_auth_softc_t *, frauthent_t **));
-static int ipf_auth_geniter __P((ipf_main_softc_t *, ipftoken_t *,
- ipfgeniter_t *, ipfobj_t *));
-static int ipf_auth_reply __P((ipf_main_softc_t *, ipf_auth_softc_t *, char *));
-static int ipf_auth_wait __P((ipf_main_softc_t *, ipf_auth_softc_t *, char *));
-static int ipf_auth_flush __P((void *));
+static void ipf_auth_deref(frauthent_t **);
+static void ipf_auth_deref_unlocked(ipf_auth_softc_t *, frauthent_t **);
+static int ipf_auth_geniter(ipf_main_softc_t *, ipftoken_t *,
+ ipfgeniter_t *, ipfobj_t *);
+static int ipf_auth_reply(ipf_main_softc_t *, ipf_auth_softc_t *, char *);
+static int ipf_auth_wait(ipf_main_softc_t *, ipf_auth_softc_t *, char *);
+static int ipf_auth_flush(void *);
/* ------------------------------------------------------------------------ */
@@ -181,7 +181,7 @@
/* other functions is obvious. */
/* ------------------------------------------------------------------------ */
int
-ipf_auth_main_load()
+ipf_auth_main_load(void)
{
return 0;
}
@@ -196,7 +196,7 @@
/* other functions is obvious. */
/* ------------------------------------------------------------------------ */
int
-ipf_auth_main_unload()
+ipf_auth_main_unload(void)
{
return 0;
}
@@ -211,8 +211,7 @@
/* and initialise some fields to their defaults. */
/* ------------------------------------------------------------------------ */
void *
-ipf_auth_soft_create(softc)
- ipf_main_softc_t *softc;
+ipf_auth_soft_create(ipf_main_softc_t *softc)
{
ipf_auth_softc_t *softa;
@@ -244,9 +243,7 @@
/* rules. */
/* ------------------------------------------------------------------------ */
int
-ipf_auth_soft_init(softc, arg)
- ipf_main_softc_t *softc;
- void *arg;
+ipf_auth_soft_init(ipf_main_softc_t *softc, void *arg)
{
ipf_auth_softc_t *softa = arg;
@@ -283,9 +280,7 @@
/* is free'd by _destroy(). */
/* ------------------------------------------------------------------------ */
int
-ipf_auth_soft_fini(softc, arg)
- ipf_main_softc_t *softc;
- void *arg;
+ipf_auth_soft_fini(ipf_main_softc_t *softc, void *arg)
{
ipf_auth_softc_t *softa = arg;
frauthent_t *fae, **faep;
@@ -343,9 +338,7 @@
/* Undo what was done in _create() - i.e. free the soft context data. */
/* ------------------------------------------------------------------------ */
void
-ipf_auth_soft_destroy(softc, arg)
- ipf_main_softc_t *softc;
- void *arg;
+ipf_auth_soft_destroy(ipf_main_softc_t *softc, void *arg)
{
ipf_auth_softc_t *softa = arg;
@@ -367,9 +360,7 @@
/* */
/* ------------------------------------------------------------------------ */
void
-ipf_auth_setlock(arg, tmp)
- void *arg;
- int tmp;
+ipf_auth_setlock(void *arg, int tmp)
{
ipf_auth_softc_t *softa = arg;
@@ -388,9 +379,7 @@
/* will end up returning FR_AUTH) then return FR_BLOCK instead. */
/* ------------------------------------------------------------------------ */
frentry_t *
-ipf_auth_check(fin, passp)
- fr_info_t *fin;
- u_32_t *passp;
+ipf_auth_check(fr_info_t *fin, u_32_t *passp)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
ipf_auth_softc_t *softa = softc->ipf_auth_soft;
@@ -511,9 +500,7 @@
/* waiting to hear about these events. */
/* ------------------------------------------------------------------------ */
int
-ipf_auth_new(m, fin)
- mb_t *m;
- fr_info_t *fin;
+ipf_auth_new(mb_t *m, fr_info_t *fin)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
ipf_auth_softc_t *softa = softc->ipf_auth_soft;
@@ -603,12 +590,8 @@
/* in IPFilter - ie ioctls called on an open fd for /dev/ipf_auth */
/* ------------------------------------------------------------------------ */
int
-ipf_auth_ioctl(softc, data, cmd, mode, uid, ctx)
- ipf_main_softc_t *softc;
- void *data;
- ioctlcmd_t cmd;
- int mode, uid;
- void *ctx;
+ipf_auth_ioctl(ipf_main_softc_t *softc, void *data, ioctlcmd_t cmd, int mode,
+ int uid, void *ctx)
{
ipf_auth_softc_t *softa = softc->ipf_auth_soft;
int error = 0, i;
@@ -709,8 +692,7 @@
/* this being called twice per second. */
/* ------------------------------------------------------------------------ */
void
-ipf_auth_expire(softc)
- ipf_main_softc_t *softc;
+ipf_auth_expire(ipf_main_softc_t *softc)
{
ipf_auth_softc_t *softa = softc->ipf_auth_soft;
frauthent_t *fae, **faep;
@@ -779,10 +761,8 @@
/* */
/* ------------------------------------------------------------------------ */
int
-ipf_auth_precmd(softc, cmd, fr, frptr)
- ipf_main_softc_t *softc;
- ioctlcmd_t cmd;
- frentry_t *fr, **frptr;
+ipf_auth_precmd(ipf_main_softc_t *softc, ioctlcmd_t cmd, frentry_t *fr,
+ frentry_t **frptr)
{
ipf_auth_softc_t *softa = softc->ipf_auth_soft;
frauthent_t *fae, **faep;
@@ -864,8 +844,7 @@
/* into these data structures. */
/* ------------------------------------------------------------------------ */
static int
-ipf_auth_flush(arg)
- void *arg;
+ipf_auth_flush(void *arg)
{
ipf_auth_softc_t *softa = arg;
int i, num_flushed;
@@ -910,8 +889,7 @@
/* queue. */
/* ------------------------------------------------------------------------ */
int
-ipf_auth_waiting(softc)
- ipf_main_softc_t *softc;
+ipf_auth_waiting(ipf_main_softc_t *softc)
{
ipf_auth_softc_t *softa = softc->ipf_auth_soft;
@@ -931,11 +909,8 @@
/* Stomping over various fields with new information will not harm anything */
/* ------------------------------------------------------------------------ */
static int
-ipf_auth_geniter(softc, token, itp, objp)
- ipf_main_softc_t *softc;
- ipftoken_t *token;
- ipfgeniter_t *itp;
- ipfobj_t *objp;
+ipf_auth_geniter(ipf_main_softc_t *softc, ipftoken_t *token, ipfgeniter_t *itp,
+ ipfobj_t *objp)
{
ipf_auth_softc_t *softa = softc->ipf_auth_soft;
frauthent_t *fae, *next, zero;
@@ -998,9 +973,7 @@
/* held. */
/* ------------------------------------------------------------------------ */
static void
-ipf_auth_deref_unlocked(softa, faep)
- ipf_auth_softc_t *softa;
- frauthent_t **faep;
+ipf_auth_deref_unlocked(ipf_auth_softc_t *softa, frauthent_t **faep)
{
WRITE_ENTER(&softa->ipf_authlk);
ipf_auth_deref(faep);
@@ -1019,8 +992,7 @@
/* the reference count on the structure by 1. If it reaches 0, free it up. */
/* ------------------------------------------------------------------------ */
static void
-ipf_auth_deref(faep)
- frauthent_t **faep;
+ipf_auth_deref(frauthent_t **faep)
{
frauthent_t *fae;
@@ -1046,10 +1018,7 @@
/* to sleep. */
/* ------------------------------------------------------------------------ */
static int
-ipf_auth_wait(softc, softa, data)
- ipf_main_softc_t *softc;
- ipf_auth_softc_t *softa;
- char *data;
+ipf_auth_wait(ipf_main_softc_t *softc, ipf_auth_softc_t *softa, char *data)
{
frauth_t auth, *au = &auth;
int error, len, i;
@@ -1177,10 +1146,7 @@
/* form of flags, the same as those used in each rule. */
/* ------------------------------------------------------------------------ */
static int
-ipf_auth_reply(softc, softa, data)
- ipf_main_softc_t *softc;
- ipf_auth_softc_t *softa;
- char *data;
+ipf_auth_reply(ipf_main_softc_t *softc, ipf_auth_softc_t *softa, char *data)
{
frauth_t auth, *au = &auth, *fra;
fr_info_t fin;
@@ -1291,10 +1257,7 @@
u_32_t
-ipf_auth_pre_scanlist(softc, fin, pass)
- ipf_main_softc_t *softc;
- fr_info_t *fin;
- u_32_t pass;
+ipf_auth_pre_scanlist(ipf_main_softc_t *softc, fr_info_t *fin, u_32_t pass)
{
ipf_auth_softc_t *softa = softc->ipf_auth_soft;
@@ -1306,8 +1269,7 @@
frentry_t **
-ipf_auth_rulehead(softc)
- ipf_main_softc_t *softc;
+ipf_auth_rulehead(ipf_main_softc_t *softc)
{
ipf_auth_softc_t *softa = softc->ipf_auth_soft;
diff -r b14e1cd3dc72 -r 5755a8d29d74 sys/dist/ipf/netinet/ip_auth.h
--- a/sys/dist/ipf/netinet/ip_auth.h Wed Feb 01 02:05:51 2012 +0000
+++ b/sys/dist/ipf/netinet/ip_auth.h Wed Feb 01 02:21:19 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_auth.h,v 1.7 2012/01/30 16:12:49 darrenr Exp $ */
+/* $NetBSD: ip_auth.h,v 1.8 2012/02/01 02:21:19 christos Exp $ */
/*
* Copyright (C) 2008 by Darren Reed.
@@ -49,25 +49,25 @@
} ipf_authstat_t;
-extern frentry_t *ipf_auth_check __P((fr_info_t *, u_32_t *));
-extern void ipf_auth_expire __P((ipf_main_softc_t *));
-extern int ipf_auth_ioctl __P((ipf_main_softc_t *, void *, ioctlcmd_t,
- int, int, void *));
-extern int ipf_auth_init __P((void));
-extern int ipf_auth_main_load __P((void));
-extern int ipf_auth_main_unload __P((void));
-extern void ipf_auth_soft_destroy __P((ipf_main_softc_t *, void *));
-extern void *ipf_auth_soft_create __P((ipf_main_softc_t *));
-extern int ipf_auth_new __P((mb_t *, fr_info_t *));
-extern int ipf_auth_precmd __P((ipf_main_softc_t *, ioctlcmd_t,
- frentry_t *, frentry_t **));
-extern void ipf_auth_unload __P((ipf_main_softc_t *));
-extern int ipf_auth_waiting __P((ipf_main_softc_t *));
-extern void ipf_auth_setlock __P((void *, int));
Home |
Main Index |
Thread Index |
Old Index