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/cc7aae325059
branches: trunk
changeset: 773406:cc7aae325059
user: christos <christos%NetBSD.org@localhost>
date: Wed Feb 01 16:46:28 2012 +0000
description:
ansify
diffstat:
sys/dist/ipf/netinet/fil.c | 632 ++++++++-------------------------
sys/dist/ipf/netinet/ip_dns_pxy.c | 50 +--
sys/dist/ipf/netinet/ip_dstlist.c | 126 +-----
sys/dist/ipf/netinet/ip_ftp_pxy.c | 148 +------
sys/dist/ipf/netinet/ip_h323_pxy.c | 42 +-
sys/dist/ipf/netinet/ip_ipsec_pxy.c | 40 +-
sys/dist/ipf/netinet/ip_irc_pxy.c | 29 +-
sys/dist/ipf/netinet/ip_netbios_pxy.c | 14 +-
sys/dist/ipf/netinet/ip_pptp_pxy.c | 45 +-
sys/dist/ipf/netinet/ip_proxy.c | 87 +---
sys/dist/ipf/netinet/ip_raudio_pxy.c | 26 +-
sys/dist/ipf/netinet/ip_rcmd_pxy.c | 42 +-
sys/dist/ipf/netinet/ip_rpcb_pxy.c | 118 +----
sys/dist/ipf/netinet/ip_tftp_pxy.c | 35 +-
sys/dist/ipf/netinet/radix_ipf.c | 61 +--
15 files changed, 381 insertions(+), 1114 deletions(-)
diffs (truncated from 3810 to 300 lines):
diff -r e056c7c6855e -r cc7aae325059 sys/dist/ipf/netinet/fil.c
--- a/sys/dist/ipf/netinet/fil.c Wed Feb 01 14:35:03 2012 +0000
+++ b/sys/dist/ipf/netinet/fil.c Wed Feb 01 16:46:28 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fil.c,v 1.50 2012/02/01 10:18:04 he Exp $ */
+/* $NetBSD: fil.c,v 1.51 2012/02/01 16:46:28 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -138,7 +138,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.50 2012/02/01 10:18:04 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.51 2012/02/01 16:46:28 christos Exp $");
#else
static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: fil.c,v 2.443.2.36 2012/01/29 05:30:35 darrenr Exp";
@@ -440,9 +440,7 @@
/* for ipf_pr_short() for more details. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_short6(fin, xmin)
- fr_info_t *fin;
- int xmin;
+ipf_pr_short6(fr_info_t *fin, int xmin)
{
if (fin->fin_dlen < xmin)
@@ -462,8 +460,7 @@
/* of that possibility arising. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_ipv6hdr(fin)
- fr_info_t *fin;
+ipf_pr_ipv6hdr(fr_info_t *fin)
{
ip6_t *ip6 = (ip6_t *)fin->fin_ip;
int p, go = 1, i, hdrcount;
@@ -633,9 +630,7 @@
/* flag to indicate its presence. */
/* ------------------------------------------------------------------------ */
static INLINE struct ip6_ext *
-ipf_pr_ipv6exthdr(fin, multiple, proto)
- fr_info_t *fin;
- int multiple, proto;
+ipf_pr_ipv6exthdr(fr_info_t *fin, int multiple, int proto)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
struct ip6_ext *hdr;
@@ -710,8 +705,7 @@
/* This is function checks pending hop by hop options extension header */
/* ------------------------------------------------------------------------ */
static INLINE int
-ipf_pr_hopopts6(fin)
- fr_info_t *fin;
+ipf_pr_hopopts6(fr_info_t *fin)
{
struct ip6_ext *hdr;
@@ -731,8 +725,7 @@
/* This is function checks the IPv6 mobility extension header */
/* ------------------------------------------------------------------------ */
static INLINE int
-ipf_pr_mobility6(fin)
- fr_info_t *fin;
+ipf_pr_mobility6(fr_info_t *fin)
{
struct ip6_ext *hdr;
@@ -752,8 +745,7 @@
/* This is function checks pending routing extension header */
/* ------------------------------------------------------------------------ */
static INLINE int
-ipf_pr_routing6(fin)
- fr_info_t *fin;
+ipf_pr_routing6(fr_info_t *fin)
{
struct ip6_routing *hdr;
@@ -815,8 +807,7 @@
/* and no packet is allowed to overlay that where offset = 0. */
/* ------------------------------------------------------------------------ */
static INLINE int
-ipf_pr_fragment6(fin)
- fr_info_t *fin;
+ipf_pr_fragment6(fr_info_t *fin)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
struct ip6_frag *frag;
@@ -870,8 +861,7 @@
/* This is function checks pending destination options extension header */
/* ------------------------------------------------------------------------ */
static INLINE int
-ipf_pr_dstopts6(fin)
- fr_info_t *fin;
+ipf_pr_dstopts6(fr_info_t *fin)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
struct ip6_ext *hdr;
@@ -895,8 +885,7 @@
/* for an ICMPv6 packet. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_icmp6(fin)
- fr_info_t *fin;
+ipf_pr_icmp6(fr_info_t *fin)
{
int minicmpsz = sizeof(struct icmp6_hdr);
struct icmp6_hdr *icmp6;
@@ -974,8 +963,7 @@
/* Is not expected to be called for fragmented packets. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_udp6(fin)
- fr_info_t *fin;
+ipf_pr_udp6(fr_info_t *fin)
{
if (ipf_pr_udpcommon(fin) == 0) {
@@ -998,8 +986,7 @@
/* Is not expected to be called for fragmented packets. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_tcp6(fin)
- fr_info_t *fin;
+ipf_pr_tcp6(fr_info_t *fin)
{
if (ipf_pr_tcpcommon(fin) == 0) {
@@ -1025,8 +1012,7 @@
/* simple packet header. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_esp6(fin)
- fr_info_t *fin;
+ipf_pr_esp6(fr_info_t *fin)
{
if ((fin->fin_off == 0) && (ipf_pr_pullup(fin, 8) == -1)) {
@@ -1049,8 +1035,7 @@
/* header being present and no authentication data (null algorithm used.) */
/* ------------------------------------------------------------------------ */
static INLINE int
-ipf_pr_ah6(fin)
- fr_info_t *fin;
+ipf_pr_ah6(fr_info_t *fin)
{
authhdr_t *ah;
@@ -1082,8 +1067,7 @@
/* Analyse the packet for GRE properties. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_gre6(fin)
- fr_info_t *fin;
+ipf_pr_gre6(fr_info_t *fin)
{
grehdr_t *gre;
@@ -1120,9 +1104,7 @@
/* - fin_ip) to what is passed through. */
/* ------------------------------------------------------------------------ */
int
-ipf_pr_pullup(fin, plen)
- fr_info_t *fin;
- int plen;
+ipf_pr_pullup(fr_info_t *fin, int plen)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
@@ -1169,9 +1151,7 @@
/* entire layer 4 header must be present (min). */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_short(fin, xmin)
- fr_info_t *fin;
- int xmin;
+ipf_pr_short(fr_info_t *fin, int xmin)
{
if (fin->fin_off == 0) {
@@ -1197,8 +1177,7 @@
/* XXX - other ICMP sanity checks? */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_icmp(fin)
- fr_info_t *fin;
+ipf_pr_icmp(fr_info_t *fin)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
int minicmpsz = sizeof(struct icmp);
@@ -1310,8 +1289,7 @@
/* valid and mark the packet as bad if not. */
/* ------------------------------------------------------------------------ */
static INLINE int
-ipf_pr_tcpcommon(fin)
- fr_info_t *fin;
+ipf_pr_tcpcommon(fr_info_t *fin)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
int flags, tlen;
@@ -1479,8 +1457,7 @@
/* with IPFILTER_CKSUM, check to see if the UDP checksum is valid. */
/* ------------------------------------------------------------------------ */
static INLINE int
-ipf_pr_udpcommon(fin)
- fr_info_t *fin;
+ipf_pr_udpcommon(fr_info_t *fin)
{
udphdr_t *udp;
@@ -1514,8 +1491,7 @@
/* Analyse the packet for IPv4/TCP properties. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_tcp(fin)
- fr_info_t *fin;
+ipf_pr_tcp(fr_info_t *fin)
{
ipf_pr_short(fin, sizeof(tcphdr_t));
@@ -1534,8 +1510,7 @@
/* Analyse the packet for IPv4/UDP properties. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_udp(fin)
- fr_info_t *fin;
+ipf_pr_udp(fr_info_t *fin)
{
ipf_pr_short(fin, sizeof(udphdr_t));
@@ -1557,8 +1532,7 @@
/* simple packet header. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_esp(fin)
- fr_info_t *fin;
+ipf_pr_esp(fr_info_t *fin)
{
if (fin->fin_off == 0) {
@@ -1582,8 +1556,7 @@
/* header being present and no authentication data (null algorithm used.) */
/* ------------------------------------------------------------------------ */
static INLINE int
-ipf_pr_ah(fin)
- fr_info_t *fin;
+ipf_pr_ah(fr_info_t *fin)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
authhdr_t *ah;
@@ -1631,8 +1604,7 @@
/* Analyse the packet for GRE properties. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_gre(fin)
- fr_info_t *fin;
+ipf_pr_gre(fr_info_t *fin)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
grehdr_t *gre;
@@ -1665,8 +1637,7 @@
/* Check all options present and flag their presence if any exist. */
/* ------------------------------------------------------------------------ */
static INLINE void
-ipf_pr_ipv4hdr(fin)
- fr_info_t *fin;
+ipf_pr_ipv4hdr(fr_info_t *fin)
{
u_short optmsk = 0, secmsk = 0, auth = 0;
int hlen, ol, mv, p, i;
@@ -1865,8 +1836,7 @@
/* */
/* ------------------------------------------------------------------------ */
static u_32_t
-ipf_checkripso(s)
- u_char *s;
+ipf_checkripso(u_char *s)
{
const struct optlist *sp;
u_short secmsk = 0, auth = 0;
@@ -1910,10 +1880,7 @@
/* end nodes. */
/* ------------------------------------------------------------------------ */
static u_32_t
-ipf_checkcipso(fin, s, ol)
- fr_info_t *fin;
- u_char *s;
- int ol;
+ipf_checkcipso(fr_info_t *fin, u_char *s, int ol)
{
ipf_main_softc_t *softc = fin->fin_main_soft;
fr_ip_t *fi;
@@ -2005,10 +1972,7 @@
/* this function will be called with either an IPv4 or IPv6 packet. */
/* ------------------------------------------------------------------------ */
int
-ipf_makefrip(hlen, ip, fin)
- int hlen;
Home |
Main Index |
Thread Index |
Old Index