From 6e09358b315c19c8666b28daa4f1a4578e200830 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Wed, 27 Aug 2003 11:02:14 +0000 Subject: [PATCH] remove oldstyle __P prototypes --- sys/contrib/dev/oltr/if_oltr.c | 70 +++---- sys/contrib/ipfilter/netinet/fil.c | 6 +- sys/contrib/ipfilter/netinet/ip_auth.h | 18 +- sys/contrib/ipfilter/netinet/ip_compat.h | 21 +- sys/contrib/ipfilter/netinet/ip_fil.c | 58 +++--- sys/contrib/ipfilter/netinet/ip_fil.h | 194 +++++++++--------- sys/contrib/ipfilter/netinet/ip_frag.c | 10 +- sys/contrib/ipfilter/netinet/ip_frag.h | 26 +-- sys/contrib/ipfilter/netinet/ip_ftp_pxy.c | 30 +-- sys/contrib/ipfilter/netinet/ip_h323_pxy.c | 22 +- sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c | 12 +- sys/contrib/ipfilter/netinet/ip_nat.c | 32 +-- sys/contrib/ipfilter/netinet/ip_nat.h | 50 ++--- sys/contrib/ipfilter/netinet/ip_netbios_pxy.c | 6 +- sys/contrib/ipfilter/netinet/ip_proxy.c | 4 +- sys/contrib/ipfilter/netinet/ip_proxy.h | 44 ++-- sys/contrib/ipfilter/netinet/ip_raudio_pxy.c | 10 +- sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c | 12 +- sys/contrib/ipfilter/netinet/ip_state.c | 30 +-- sys/contrib/ipfilter/netinet/ip_state.h | 24 +-- 20 files changed, 332 insertions(+), 347 deletions(-) diff --git a/sys/contrib/dev/oltr/if_oltr.c b/sys/contrib/dev/oltr/if_oltr.c index 8aa34a2c8e..afae5842b4 100644 --- a/sys/contrib/dev/oltr/if_oltr.c +++ b/sys/contrib/dev/oltr/if_oltr.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/contrib/dev/oltr/if_oltr.c,v 1.11.2.5 2001/10/20 04:15:21 mdodd Exp $ - * $DragonFly: src/sys/contrib/dev/oltr/Attic/if_oltr.c,v 1.6 2003/08/07 21:16:48 dillon Exp $ + * $DragonFly: src/sys/contrib/dev/oltr/Attic/if_oltr.c,v 1.7 2003/08/27 11:02:14 rob Exp $ */ #include @@ -117,25 +117,25 @@ char *AdapterName[] = { */ #ifndef TRlldInlineIO -static void DriverOutByte __P((unsigned short, unsigned char)); -static void DriverOutWord __P((unsigned short, unsigned short)); -static void DriverOutDword __P((unsigned short, unsigned long)); -static void DriverRepOutByte __P((unsigned short, unsigned char *, int)); -static void DriverRepOutWord __P((unsigned short, unsigned short *, int)); -static void DriverRepOutDword __P((unsigned short, unsigned long *, int)); -static unsigned char DriverInByte __P((unsigned short)); -static unsigned short DriverInWord __P((unsigned short)); -static unsigned long DriverInDword __P((unsigned short)); -static void DriverRepInByte __P((unsigned short, unsigned char *, int)); -static void DriverRepInWord __P((unsigned short, unsigned short *, int)); -static void DriverRepInDword __P((unsigned short, unsigned long *, int)); +static void DriverOutByte (unsigned short, unsigned char); +static void DriverOutWord (unsigned short, unsigned short); +static void DriverOutDword (unsigned short, unsigned long); +static void DriverRepOutByte (unsigned short, unsigned char *, int); +static void DriverRepOutWord (unsigned short, unsigned short *, int); +static void DriverRepOutDword (unsigned short, unsigned long *, int); +static unsigned char DriverInByte (unsigned short); +static unsigned short DriverInWord (unsigned short); +static unsigned long DriverInDword (unsigned short); +static void DriverRepInByte (unsigned short, unsigned char *, int); +static void DriverRepInWord (unsigned short, unsigned short *, int); +static void DriverRepInDword (unsigned short, unsigned long *, int); #endif /*TRlldInlineIO*/ -static void DriverSuspend __P((unsigned short)); -static void DriverStatus __P((void *, TRlldStatus_t *)); -static void DriverCloseCompleted __P((void *)); -static void DriverStatistics __P((void *, TRlldStatistics_t *)); -static void DriverTransmitFrameCompleted __P((void *, void *, int)); -static void DriverReceiveFrameCompleted __P((void *, int, int, void *, int)); +static void DriverSuspend (unsigned short); +static void DriverStatus (void *, TRlldStatus_t *); +static void DriverCloseCompleted (void *); +static void DriverStatistics (void *, TRlldStatistics_t *); +static void DriverTransmitFrameCompleted (void *, void *, int); +static void DriverReceiveFrameCompleted (void *, int, int, void *, int); static TRlldDriver_t LldDriver = { TRLLD_VERSION, @@ -216,24 +216,24 @@ struct oltr_softc { #define SELF_TEST_POLLS 32 -void oltr_poll __P((void *)); -/*void oltr_stat __P((void *));*/ +void oltr_poll (void *); +/*void oltr_stat (void *);*/ -static void oltr_start __P((struct ifnet *)); -static void oltr_stop __P((struct oltr_softc *)); -static void oltr_close __P((struct oltr_softc *)); -static void oltr_init __P((void *)); -static int oltr_ioctl __P((struct ifnet *, u_long, caddr_t)); -static void oltr_intr __P((void *)); -static int oltr_ifmedia_upd __P((struct ifnet *)); -static void oltr_ifmedia_sts __P((struct ifnet *, struct ifmediareq *)); +static void oltr_start (struct ifnet *); +static void oltr_stop (struct oltr_softc *); +static void oltr_close (struct oltr_softc *); +static void oltr_init (void *); +static int oltr_ioctl (struct ifnet *, u_long, caddr_t); +static void oltr_intr (void *); +static int oltr_ifmedia_upd (struct ifnet *); +static void oltr_ifmedia_sts (struct ifnet *, struct ifmediareq *); #if __FreeBSD_version > 400000 -static int oltr_pci_probe __P((device_t)); -static int oltr_pci_attach __P((device_t)); -static int oltr_pci_detach __P((device_t)); -static void oltr_pci_shutdown __P((device_t)); +static int oltr_pci_probe (device_t); +static int oltr_pci_attach (device_t); +static int oltr_pci_detach (device_t); +static void oltr_pci_shutdown (device_t); static device_method_t oltr_methods[] = { DEVMETHOD(device_probe, oltr_pci_probe), @@ -485,8 +485,8 @@ oltr_pci_shutdown(device_t dev) #else -static const char *oltr_pci_probe __P((pcici_t, pcidi_t)); -static void oltr_pci_attach __P((pcici_t, int)); +static const char *oltr_pci_probe (pcici_t, pcidi_t); +static void oltr_pci_attach (pcici_t, int); static unsigned long oltr_count = 0; diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index 54c72918d5..458d77a9b2 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -5,7 +5,7 @@ * * @(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed * $FreeBSD: src/sys/contrib/ipfilter/netinet/fil.c,v 1.23.2.6 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/fil.c,v 1.4 2003/08/07 21:16:48 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/fil.c,v 1.5 2003/08/27 11:02:14 rob Exp $ */ #if defined(__sgi) && (IRIX > 602) # include @@ -144,9 +144,9 @@ char ipfilter_version[] = IPL_VERSION; fr_info_t frcache[2]; -static int frflushlist __P((int, minor_t, int *, frentry_t **)); +static int frflushlist (int, minor_t, int *, frentry_t **); #ifdef _KERNEL -static void frsynclist __P((frentry_t *)); +static void frsynclist (frentry_t *); #endif diff --git a/sys/contrib/ipfilter/netinet/ip_auth.h b/sys/contrib/ipfilter/netinet/ip_auth.h index 44055e0731..0fe2615b80 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.h +++ b/sys/contrib/ipfilter/netinet/ip_auth.h @@ -5,7 +5,7 @@ * * $Id: ip_auth.h,v 2.1 1999/08/04 17:29:54 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_auth.h,v 1.10.2.4 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_auth.h,v 1.2 2003/06/17 04:28:20 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_auth.h,v 1.3 2003/08/27 11:02:14 rob Exp $ * */ #ifndef __IP_AUTH_H__ @@ -49,17 +49,17 @@ extern int fr_defaultauthage; extern int fr_authsize; extern int fr_authused; extern int fr_auth_lock; -extern u_32_t fr_checkauth __P((ip_t *, fr_info_t *)); -extern void fr_authexpire __P((void)); -extern void fr_authunload __P((void)); +extern u_32_t fr_checkauth (ip_t *, fr_info_t *); +extern void fr_authexpire (void); +extern void fr_authunload (void); extern mb_t *fr_authpkts[]; -extern int fr_newauth __P((mb_t *, fr_info_t *, ip_t *)); +extern int fr_newauth (mb_t *, fr_info_t *, ip_t *); #if defined(__NetBSD__) || defined(__OpenBSD__) || \ (__FreeBSD_version >= 300003) -extern int fr_preauthcmd __P((u_long, frentry_t *, frentry_t **)); -extern int fr_auth_ioctl __P((caddr_t, int, u_long)); +extern int fr_preauthcmd (u_long, frentry_t *, frentry_t **); +extern int fr_auth_ioctl (caddr_t, int, u_long); #else -extern int fr_preauthcmd __P((int, frentry_t *, frentry_t **)); -extern int fr_auth_ioctl __P((caddr_t, int, int)); +extern int fr_preauthcmd (int, frentry_t *, frentry_t **); +extern int fr_auth_ioctl (caddr_t, int, int); #endif #endif /* __IP_AUTH_H__ */ diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 2f943a1b87..07804ac944 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -6,19 +6,12 @@ * @(#)ip_compat.h 1.8 1/14/96 * $Id: ip_compat.h,v 2.26.2.46 2002/06/27 14:39:40 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.13.2.5 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.5 2003/08/25 19:50:25 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_compat.h,v 1.6 2003/08/27 11:02:14 rob Exp $ */ #ifndef __IP_COMPAT_H__ #define __IP_COMPAT_H__ -#ifndef __P -# ifdef __STDC__ -# define __P(x) x -# else -# define __P(x) () -# endif -#endif #ifndef __STDC__ # undef const # define const @@ -490,7 +483,7 @@ typedef struct { # define KMALLOC(a,b) (a) = (b)kmem_alloc(sizeof(*(a)), KM_NOSLEEP) # define KMALLOCS(a,b,c) (a) = (b)kmem_alloc((c), KM_NOSLEEP) # define GET_MINOR(x) getminor(x) -extern ill_t *get_unit __P((char *, int)); +extern ill_t *get_unit (char *, int); # define GETUNIT(n, v) get_unit(n, v) # define IFNAME(x) ((ill_t *)x)->ill_name # else /* SOLARIS */ @@ -548,7 +541,7 @@ extern ill_t *get_unit __P((char *, int)); # else # define USE_GETIFNAME 1 # define IFNAME(x) get_ifname((struct ifnet *)x) -extern char *get_ifname __P((struct ifnet *)); +extern char *get_ifname (struct ifnet *); # endif # endif # endif /* sun */ @@ -560,8 +553,8 @@ extern char *get_ifname __P((struct ifnet *)); # define KFREE(x) kmem_free((char *)(x), sizeof(*(x))) # define KFREES(x,s) kmem_free((char *)(x), (s)) # if !SOLARIS -extern void m_copydata __P((struct mbuf *, int, int, caddr_t)); -extern void m_copyback __P((struct mbuf *, int, int, caddr_t)); +extern void m_copydata (struct mbuf *, int, int, caddr_t); +extern void m_copyback (struct mbuf *, int, int, caddr_t); # endif # ifdef __sgi # include @@ -657,8 +650,8 @@ extern void m_copyback __P((struct mbuf *, int, int, caddr_t)); # define IFNAME(x) get_ifname((struct ifnet *)x) # define UIOMOVE(a,b,c,d) ipfuiomove(a,b,c,d) # include -extern void m_copydata __P((mb_t *, int, int, caddr_t)); -extern int ipfuiomove __P((caddr_t, int, int, struct uio *)); +extern void m_copydata (mb_t *, int, int, caddr_t); +extern int ipfuiomove (caddr_t, int, int, struct uio *); #endif /* KERNEL */ /* diff --git a/sys/contrib/ipfilter/netinet/ip_fil.c b/sys/contrib/ipfilter/netinet/ip_fil.c index f3cc8ce68a..2b50db53e8 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.c +++ b/sys/contrib/ipfilter/netinet/ip_fil.c @@ -6,7 +6,7 @@ * @(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed * @(#)$Id: ip_fil.c,v 2.42.2.60 2002/08/28 12:40:39 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.25.2.6 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.5 2003/08/07 21:16:48 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.6 2003/08/27 11:02:14 rob Exp $ */ #ifndef SOLARIS #define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) @@ -120,7 +120,7 @@ #endif #if !SOLARIS && defined(_KERNEL) && !defined(__sgi) # include -extern int ip_optcopy __P((struct ip *, struct ip *)); +extern int ip_optcopy (struct ip *, struct ip *); #endif #if defined(OpenBSD) && (OpenBSD >= 200211) && defined(_KERNEL) extern int ip6_getpmtu(struct route_in6 *, struct route_in6 *, @@ -150,18 +150,18 @@ int ipl_unreach = ICMP_UNREACH_FILTER; #endif u_long ipl_frouteok[2] = {0, 0}; -static int frzerostats __P((caddr_t)); +static int frzerostats (caddr_t); #if defined(__NetBSD__) || defined(__OpenBSD__) || (__FreeBSD_version >= 300003) -static int frrequest __P((int, u_long, caddr_t, int)); +static int frrequest (int, u_long, caddr_t, int); #else -static int frrequest __P((int, int, caddr_t, int)); +static int frrequest (int, int, caddr_t, int); #endif #ifdef _KERNEL -static int (*fr_savep) __P((ip_t *, int, void *, int, struct mbuf **)); -static int send_ip __P((ip_t *, fr_info_t *, struct mbuf **)); +static int (*fr_savep) (ip_t *, int, void *, int, struct mbuf **); +static int send_ip (ip_t *, fr_info_t *, struct mbuf **); # ifdef USE_INET6 -static int ipfr_fastroute6 __P((struct mbuf *, struct mbuf **, - fr_info_t *, frdest_t *)); +static int ipfr_fastroute6 (struct mbuf *, struct mbuf **, + fr_info_t *, frdest_t *); # endif # ifdef __sgi extern int tcp_mtudisc; @@ -169,17 +169,17 @@ extern kmutex_t ipf_rw; extern KRWLOCK_T ipf_mutex; # endif #else -void init_ifp __P((void)); +void init_ifp (void); # if defined(__sgi) && (IRIX < 605) -static int no_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *)); -static int write_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *)); +static int no_output (struct ifnet *, struct mbuf *, + struct sockaddr *); +static int write_output (struct ifnet *, struct mbuf *, + struct sockaddr *); # else -static int no_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *)); -static int write_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *)); +static int no_output (struct ifnet *, struct mbuf *, + struct sockaddr *, struct rtentry *); +static int write_output (struct ifnet *, struct mbuf *, + struct sockaddr *, struct rtentry *); # endif #endif int fr_running = 0; @@ -231,7 +231,7 @@ struct devsw iplsw = { /* * We provide the fr_checkp name just to minimize changes later. */ -int (*fr_checkp) __P((ip_t *ip, int hlen, void *ifp, int out, mb_t **mp)); +int (*fr_checkp) (ip_t *ip, int hlen, void *ifp, int out, mb_t **mp); # endif /* NETBSD_PF */ #endif /* __NetBSD__ */ @@ -1526,11 +1526,11 @@ int dst; # if !defined(IPFILTER_LKM) && !defined(__sgi) && \ (!defined(__FreeBSD_version) || (__FreeBSD_version < 300000)) # if (BSD < 199306) -int iplinit __P((void)); +int iplinit (void); int # else -void iplinit __P((void)); +void iplinit (void); void # endif @@ -2025,11 +2025,11 @@ frdest_t *fdp; # if defined(__sgi) && (IRIX < 605) -static int no_output __P((struct ifnet *ifp, struct mbuf *m, - struct sockaddr *s)) +static int no_output (struct ifnet *ifp, struct mbuf *m, + struct sockaddr *s) # else -static int no_output __P((struct ifnet *ifp, struct mbuf *m, - struct sockaddr *s, struct rtentry *rt)) +static int no_output (struct ifnet *ifp, struct mbuf *m, + struct sockaddr *s, struct rtentry *rt) # endif { return 0; @@ -2038,11 +2038,11 @@ static int no_output __P((struct ifnet *ifp, struct mbuf *m, # ifdef __STDC__ # if defined(__sgi) && (IRIX < 605) -static int write_output __P((struct ifnet *ifp, struct mbuf *m, - struct sockaddr *s)) +static int write_output (struct ifnet *ifp, struct mbuf *m, + struct sockaddr *s) # else -static int write_output __P((struct ifnet *ifp, struct mbuf *m, - struct sockaddr *s, struct rtentry *rt)) +static int write_output (struct ifnet *ifp, struct mbuf *m, + struct sockaddr *s, struct rtentry *rt) # endif { ip_t *ip = (ip_t *)m; diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 7d72a98273..2e99b2e0f9 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -6,7 +6,7 @@ * @(#)ip_fil.h 1.35 6/5/96 * $Id: ip_fil.h,v 2.29.2.33 2002/06/04 14:46:28 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.h,v 1.18.2.5 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_fil.h,v 1.3 2003/06/23 17:55:27 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_fil.h,v 1.4 2003/08/27 11:02:14 rob Exp $ */ #ifndef __IP_FIL_H__ @@ -28,14 +28,6 @@ # define _KERNEL #endif -#ifndef __P -# ifdef __STDC__ -# define __P(x) x -# else -# define __P(x) () -# endif -#endif - #ifndef offsetof # define offsetof(t,m) (int)((&((t *)0L)->m)) #endif @@ -244,7 +236,7 @@ typedef struct frentry { u_32_t fr_flags; /* per-rule flags && options (see below) */ u_int fr_skip; /* # of rules to skip */ u_int fr_loglevel; /* syslog log facility + priority */ - int (*fr_func) __P((int, ip_t *, fr_info_t *)); /* call this function */ + int (*fr_func) (int, ip_t *, fr_info_t *); /* call this function */ int fr_sap; /* For solaris only */ u_char fr_icode; /* return ICMP code */ char fr_ifnames[4][LIFNAMSIZ]; @@ -508,101 +500,101 @@ typedef struct ipflog { #ifndef _KERNEL struct ifnet; -extern char *get_ifname __P((struct ifnet *)); -extern int fr_check __P((ip_t *, int, void *, int, mb_t **)); -extern int (*fr_checkp) __P((ip_t *, int, void *, int, mb_t **)); -extern int send_reset __P((ip_t *, fr_info_t *)); -extern int send_icmp_err __P((ip_t *, int, fr_info_t *, int)); -extern int ipf_log __P((void)); -extern struct ifnet *get_unit __P((char *, int)); -extern int mbuflen __P((mb_t *)); +extern char *get_ifname (struct ifnet *); +extern int fr_check (ip_t *, int, void *, int, mb_t **); +extern int (*fr_checkp) (ip_t *, int, void *, int, mb_t **); +extern int send_reset (ip_t *, fr_info_t *); +extern int send_icmp_err (ip_t *, int, fr_info_t *, int); +extern int ipf_log (void); +extern struct ifnet *get_unit (char *, int); +extern int mbuflen (mb_t *); # if defined(__NetBSD__) || defined(__OpenBSD__) || \ (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) -extern int iplioctl __P((dev_t, u_long, caddr_t, int)); +extern int iplioctl (dev_t, u_long, caddr_t, int); # else -extern int iplioctl __P((dev_t, int, caddr_t, int)); +extern int iplioctl (dev_t, int, caddr_t, int); # endif -extern int iplopen __P((dev_t, int)); -extern int iplclose __P((dev_t, int)); +extern int iplopen (dev_t, int); +extern int iplclose (dev_t, int); #else /* #ifndef _KERNEL */ # if defined(__NetBSD__) && defined(PFIL_HOOKS) -extern void ipfilterattach __P((int)); +extern void ipfilterattach (int); # endif -extern int iplattach __P((void)); -extern int ipl_enable __P((void)); -extern int ipl_disable __P((void)); -extern int send_icmp_err __P((ip_t *, int, fr_info_t *, int)); -extern int send_reset __P((ip_t *, fr_info_t *)); +extern int iplattach (void); +extern int ipl_enable (void); +extern int ipl_disable (void); +extern int send_icmp_err (ip_t *, int, fr_info_t *, int); +extern int send_reset (ip_t *, fr_info_t *); # if SOLARIS -extern int fr_check __P((ip_t *, int, void *, int, qif_t *, mb_t **)); -extern int (*fr_checkp) __P((ip_t *, int, void *, - int, qif_t *, mb_t **)); +extern int fr_check (ip_t *, int, void *, int, qif_t *, mb_t **); +extern int (*fr_checkp) (ip_t *, int, void *, + int, qif_t *, mb_t **); # if SOLARIS2 >= 7 -extern int iplioctl __P((dev_t, int, intptr_t, int, cred_t *, int *)); +extern int iplioctl (dev_t, int, intptr_t, int, cred_t *, int *); # else -extern int iplioctl __P((dev_t, int, int *, int, cred_t *, int *)); +extern int iplioctl (dev_t, int, int *, int, cred_t *, int *); # endif -extern int iplopen __P((dev_t *, int, int, cred_t *)); -extern int iplclose __P((dev_t, int, int, cred_t *)); -extern int ipfsync __P((void)); -extern int ipfr_fastroute __P((ip_t *, mblk_t *, mblk_t **, - fr_info_t *, frdest_t *)); -extern void copyin_mblk __P((mblk_t *, size_t, size_t, char *)); -extern void copyout_mblk __P((mblk_t *, size_t, size_t, char *)); -extern int fr_qin __P((queue_t *, mblk_t *)); -extern int fr_qout __P((queue_t *, mblk_t *)); -extern int iplread __P((dev_t, struct uio *, cred_t *)); +extern int iplopen (dev_t *, int, int, cred_t *); +extern int iplclose (dev_t, int, int, cred_t *); +extern int ipfsync (void); +extern int ipfr_fastroute (ip_t *, mblk_t *, mblk_t **, + fr_info_t *, frdest_t *); +extern void copyin_mblk (mblk_t *, size_t, size_t, char *); +extern void copyout_mblk (mblk_t *, size_t, size_t, char *); +extern int fr_qin (queue_t *, mblk_t *); +extern int fr_qout (queue_t *, mblk_t *); +extern int iplread (dev_t, struct uio *, cred_t *); # else /* SOLARIS */ -extern int fr_check __P((ip_t *, int, void *, int, mb_t **)); -extern int (*fr_checkp) __P((ip_t *, int, void *, int, mb_t **)); -extern int ipfr_fastroute __P((mb_t *, mb_t **, fr_info_t *, frdest_t *)); -extern size_t mbufchainlen __P((mb_t *)); +extern int fr_check (ip_t *, int, void *, int, mb_t **); +extern int (*fr_checkp) (ip_t *, int, void *, int, mb_t **); +extern int ipfr_fastroute (mb_t *, mb_t **, fr_info_t *, frdest_t *); +extern size_t mbufchainlen (mb_t *); # ifdef __sgi # include -extern int iplioctl __P((dev_t, int, caddr_t, int, cred_t *, int *)); -extern int iplopen __P((dev_t *, int, int, cred_t *)); -extern int iplclose __P((dev_t, int, int, cred_t *)); -extern int iplread __P((dev_t, struct uio *, cred_t *)); -extern int ipfsync __P((void)); -extern int ipfilter_sgi_attach __P((void)); -extern void ipfilter_sgi_detach __P((void)); -extern void ipfilter_sgi_intfsync __P((void)); +extern int iplioctl (dev_t, int, caddr_t, int, cred_t *, int *); +extern int iplopen (dev_t *, int, int, cred_t *); +extern int iplclose (dev_t, int, int, cred_t *); +extern int iplread (dev_t, struct uio *, cred_t *); +extern int ipfsync (void); +extern int ipfilter_sgi_attach (void); +extern void ipfilter_sgi_detach (void); +extern void ipfilter_sgi_intfsync (void); # else # ifdef IPFILTER_LKM -extern int iplidentify __P((char *)); +extern int iplidentify (char *); # endif #ifdef __FreeBSD__ -extern int iplioctl __P((dev_t, u_long, caddr_t, int, struct thread *)); -extern int iplopen __P((dev_t, int, int, struct thread *)); -extern int iplclose __P((dev_t, int, int, struct thread *)); +extern int iplioctl (dev_t, u_long, caddr_t, int, struct thread *); +extern int iplopen (dev_t, int, int, struct thread *); +extern int iplclose (dev_t, int, int, struct thread *); #else # if (_BSDI_VERSION >= 199510) || (__FreeBSD_version >= 220000) || \ (NetBSD >= 199511) || defined(__OpenBSD__) # if defined(__NetBSD__) || (_BSDI_VERSION >= 199701) || \ defined(__OpenBSD__) || (__FreeBSD_version >= 300000) -extern int iplioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); +extern int iplioctl (dev_t, u_long, caddr_t, int, struct proc *); # else -extern int iplioctl __P((dev_t, int, caddr_t, int, struct proc *)); +extern int iplioctl (dev_t, int, caddr_t, int, struct proc *); # endif -extern int iplopen __P((dev_t, int, int, struct proc *)); -extern int iplclose __P((dev_t, int, int, struct proc *)); +extern int iplopen (dev_t, int, int, struct proc *); +extern int iplclose (dev_t, int, int, struct proc *); # else # ifndef linux -extern int iplopen __P((dev_t, int)); -extern int iplclose __P((dev_t, int)); -extern int iplioctl __P((dev_t, int, caddr_t, int)); +extern int iplopen (dev_t, int); +extern int iplclose (dev_t, int); +extern int iplioctl (dev_t, int, caddr_t, int); # else extern int iplioctl(struct inode *, struct file *, u_int, u_long); -extern int iplopen __P((struct inode *, struct file *)); -extern void iplclose __P((struct inode *, struct file *)); +extern int iplopen (struct inode *, struct file *); +extern void iplclose (struct inode *, struct file *); # endif /* !linux */ # endif /* (_BSDI_VERSION >= 199510) */ #endif # if BSD >= 199306 -extern int iplread __P((dev_t, struct uio *, int)); +extern int iplread (dev_t, struct uio *, int); # else # ifndef linux -extern int iplread __P((dev_t, struct uio *)); +extern int iplread (dev_t, struct uio *); # else extern int iplread(struct inode *, struct file *, char *, int); # endif /* !linux */ @@ -611,37 +603,37 @@ extern int iplread(struct inode *, struct file *, char *, int); # endif /* SOLARIS */ #endif /* #ifndef _KERNEL */ -extern char *memstr __P((char *, char *, int, int)); -extern void fixskip __P((frentry_t **, frentry_t *, int)); -extern int countbits __P((u_32_t)); -extern int ipldetach __P((void)); -extern u_short ipf_cksum __P((u_short *, int)); -extern int ircopyptr __P((void *, void *, size_t)); -extern int iwcopyptr __P((void *, void *, size_t)); - -extern void ipflog_init __P((void)); -extern int ipflog_clear __P((minor_t)); -extern int ipflog __P((u_int, ip_t *, fr_info_t *, mb_t *)); -extern int ipllog __P((int, fr_info_t *, void **, size_t *, int *, int)); -extern int ipflog_read __P((minor_t, struct uio *)); - -extern int frflush __P((minor_t, int, int)); -extern void frsync __P((void)); -extern frgroup_t *fr_addgroup __P((u_32_t, frentry_t *, minor_t, int)); -extern void fr_delgroup __P((u_32_t, u_32_t, minor_t, int)); -extern frgroup_t *fr_findgroup __P((u_32_t, u_32_t, minor_t, int, - frgroup_t ***)); - -extern int fr_copytolog __P((int, char *, int)); -extern void fr_forgetifp __P((void *)); -extern void fr_getstat __P((struct friostat *)); -extern int fr_ifpaddr __P((int, void *, struct in_addr *)); -extern int fr_lock __P((caddr_t, int *)); -extern void fr_makefrip __P((int, ip_t *, fr_info_t *)); -extern u_short fr_tcpsum __P((mb_t *, ip_t *, tcphdr_t *)); -extern int fr_scanlist __P((u_32_t, ip_t *, fr_info_t *, void *)); -extern int fr_tcpudpchk __P((frtuc_t *, fr_info_t *)); -extern int fr_verifysrc __P((struct in_addr, void *)); +extern char *memstr (char *, char *, int, int); +extern void fixskip (frentry_t **, frentry_t *, int); +extern int countbits (u_32_t); +extern int ipldetach (void); +extern u_short ipf_cksum (u_short *, int); +extern int ircopyptr (void *, void *, size_t); +extern int iwcopyptr (void *, void *, size_t); + +extern void ipflog_init (void); +extern int ipflog_clear (minor_t); +extern int ipflog (u_int, ip_t *, fr_info_t *, mb_t *); +extern int ipllog (int, fr_info_t *, void **, size_t *, int *, int); +extern int ipflog_read (minor_t, struct uio *); + +extern int frflush (minor_t, int, int); +extern void frsync (void); +extern frgroup_t *fr_addgroup (u_32_t, frentry_t *, minor_t, int); +extern void fr_delgroup (u_32_t, u_32_t, minor_t, int); +extern frgroup_t *fr_findgroup (u_32_t, u_32_t, minor_t, int, + frgroup_t ***); + +extern int fr_copytolog (int, char *, int); +extern void fr_forgetifp (void *); +extern void fr_getstat (struct friostat *); +extern int fr_ifpaddr (int, void *, struct in_addr *); +extern int fr_lock (caddr_t, int *); +extern void fr_makefrip (int, ip_t *, fr_info_t *); +extern u_short fr_tcpsum (mb_t *, ip_t *, tcphdr_t *); +extern int fr_scanlist (u_32_t, ip_t *, fr_info_t *, void *); +extern int fr_tcpudpchk (frtuc_t *, fr_info_t *); +extern int fr_verifysrc (struct in_addr, void *); extern int ipl_unreach; extern int fr_running; diff --git a/sys/contrib/ipfilter/netinet/ip_frag.c b/sys/contrib/ipfilter/netinet/ip_frag.c index 1741a63516..5a85f15ceb 100644 --- a/sys/contrib/ipfilter/netinet/ip_frag.c +++ b/sys/contrib/ipfilter/netinet/ip_frag.c @@ -6,7 +6,7 @@ * @(#)ip_frag.c 1.11 3/24/96 (C) 1993-2000 Darren Reed * @(#)$Id: ip_frag.c,v 2.10.2.24 2002/08/28 12:41:04 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_frag.c,v 1.15.2.6 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_frag.c,v 1.3 2003/08/07 21:16:48 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_frag.c,v 1.4 2003/08/27 11:02:14 rob Exp $ */ #if defined(KERNEL) && !defined(_KERNEL) # define _KERNEL @@ -121,9 +121,9 @@ extern kmutex_t ipf_rw; #endif -static ipfr_t *ipfr_new __P((ip_t *, fr_info_t *, ipfr_t **)); -static ipfr_t *ipfr_lookup __P((ip_t *, fr_info_t *, ipfr_t **)); -static void ipfr_delete __P((ipfr_t *)); +static ipfr_t *ipfr_new (ip_t *, fr_info_t *, ipfr_t **); +static ipfr_t *ipfr_lookup (ip_t *, fr_info_t *, ipfr_t **); +static void ipfr_delete (ipfr_t *); ipfrstat_t *ipfr_fragstats() @@ -568,7 +568,7 @@ void ipfr_fragexpire() # if defined(SOLARIS2) && (SOLARIS2 < 7) void ipfr_slowtimer() # else -void ipfr_slowtimer __P((void *ptr)) +void ipfr_slowtimer (void *ptr) # endif # else int ipfr_slowtimer() diff --git a/sys/contrib/ipfilter/netinet/ip_frag.h b/sys/contrib/ipfilter/netinet/ip_frag.h index ddbd4de770..bca48c4589 100644 --- a/sys/contrib/ipfilter/netinet/ip_frag.h +++ b/sys/contrib/ipfilter/netinet/ip_frag.h @@ -6,7 +6,7 @@ * @(#)ip_frag.h 1.5 3/24/96 * $Id: ip_frag.h,v 2.4.2.7 2002/07/06 14:17:51 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_frag.h,v 1.12.2.4 2002/08/31 16:24:52 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_frag.h,v 1.2 2003/06/17 04:28:20 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_frag.h,v 1.3 2003/08/27 11:02:14 rob Exp $ */ #ifndef __IP_FRAG_H__ @@ -49,27 +49,27 @@ typedef struct ipfrstat { extern int fr_ipfrttl; extern int fr_frag_lock; -extern ipfrstat_t *ipfr_fragstats __P((void)); -extern int ipfr_newfrag __P((ip_t *, fr_info_t *)); -extern int ipfr_nat_newfrag __P((ip_t *, fr_info_t *, struct nat *)); -extern nat_t *ipfr_nat_knownfrag __P((ip_t *, fr_info_t *)); -extern frentry_t *ipfr_knownfrag __P((ip_t *, fr_info_t *)); -extern void ipfr_forget __P((void *)); -extern void ipfr_unload __P((void)); -extern void ipfr_fragexpire __P((void)); +extern ipfrstat_t *ipfr_fragstats (void); +extern int ipfr_newfrag (ip_t *, fr_info_t *); +extern int ipfr_nat_newfrag (ip_t *, fr_info_t *, struct nat *); +extern nat_t *ipfr_nat_knownfrag (ip_t *, fr_info_t *); +extern frentry_t *ipfr_knownfrag (ip_t *, fr_info_t *); +extern void ipfr_forget (void *); +extern void ipfr_unload (void); +extern void ipfr_fragexpire (void); #ifdef _KERNEL # if (BSD >= 199306) || SOLARIS || defined(__sgi) # if defined(SOLARIS2) && (SOLARIS2 < 7) -extern void ipfr_slowtimer __P((void)); +extern void ipfr_slowtimer (void); # else -extern void ipfr_slowtimer __P((void *)); +extern void ipfr_slowtimer (void *); # endif # else -extern int ipfr_slowtimer __P((void)); +extern int ipfr_slowtimer (void); # endif /* (BSD >= 199306) || SOLARIS */ #else -extern void ipfr_slowtimer __P((void)); +extern void ipfr_slowtimer (void); #endif /* _KERNEL */ #endif /* __IP_FIL_H__ */ diff --git a/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c b/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c index c0b49c6e37..77578276db 100644 --- a/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c @@ -2,7 +2,7 @@ * Simple FTP transparent proxy for in-kernel use. For use with the NAT * code. * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c,v 1.17.2.5 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c,v 1.3 2003/07/26 14:07:18 rob Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c,v 1.4 2003/08/27 11:02:14 rob Exp $ */ #if SOLARIS && defined(_KERNEL) extern kmutex_t ipf_rw; @@ -44,20 +44,20 @@ extern kmutex_t ipf_rw; */ #define FTPXY_C_PASV 1000 -int ippr_ftp_client __P((fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int)); -int ippr_ftp_complete __P((char *, size_t)); -int ippr_ftp_in __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -int ippr_ftp_init __P((void)); -int ippr_ftp_new __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -int ippr_ftp_out __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -int ippr_ftp_pasv __P((fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int)); -int ippr_ftp_port __P((fr_info_t *, ip_t *, nat_t *, ftpside_t *, int)); -int ippr_ftp_process __P((fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int)); -int ippr_ftp_server __P((fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int)); -int ippr_ftp_valid __P((ftpinfo_t *, int, char *, size_t)); -int ippr_ftp_server_valid __P((ftpside_t *, char *, size_t)); -int ippr_ftp_client_valid __P((ftpside_t *, char *, size_t)); -u_short ippr_ftp_atoi __P((char **)); +int ippr_ftp_client (fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int); +int ippr_ftp_complete (char *, size_t); +int ippr_ftp_in (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +int ippr_ftp_init (void); +int ippr_ftp_new (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +int ippr_ftp_out (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +int ippr_ftp_pasv (fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int); +int ippr_ftp_port (fr_info_t *, ip_t *, nat_t *, ftpside_t *, int); +int ippr_ftp_process (fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int); +int ippr_ftp_server (fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int); +int ippr_ftp_valid (ftpinfo_t *, int, char *, size_t); +int ippr_ftp_server_valid (ftpside_t *, char *, size_t); +int ippr_ftp_client_valid (ftpside_t *, char *, size_t); +u_short ippr_ftp_atoi (char **); static frentry_t ftppxyfr; int ippr_ftp_pasvonly = 0; diff --git a/sys/contrib/ipfilter/netinet/ip_h323_pxy.c b/sys/contrib/ipfilter/netinet/ip_h323_pxy.c index 5b75890aea..edf53bd624 100644 --- a/sys/contrib/ipfilter/netinet/ip_h323_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_h323_pxy.c @@ -12,7 +12,7 @@ * For more details, see QNX_OCL.txt provided with this distribution. * * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_h323_pxy.c,v 1.2.2.2 2002/08/31 16:24:52 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_h323_pxy.c,v 1.2 2003/06/17 04:28:20 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_h323_pxy.c,v 1.3 2003/08/27 11:02:14 rob Exp $ */ /* @@ -31,23 +31,23 @@ #define IPF_H323_PROXY -int ippr_h323_init __P((void)); -int ippr_h323_new __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -void ippr_h323_del __P((ap_session_t *)); -int ippr_h323_out __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -int ippr_h323_in __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); +int ippr_h323_init (void); +int ippr_h323_new (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +void ippr_h323_del (ap_session_t *); +int ippr_h323_out (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +int ippr_h323_in (fr_info_t *, ip_t *, ap_session_t *, nat_t *); -int ippr_h245_init __P((void)); -int ippr_h245_new __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -int ippr_h245_out __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -int ippr_h245_in __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); +int ippr_h245_init (void); +int ippr_h245_new (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +int ippr_h245_out (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +int ippr_h245_in (fr_info_t *, ip_t *, ap_session_t *, nat_t *); static frentry_t h323_fr; #if (SOLARIS || defined(__sgi)) && defined(_KERNEL) extern KRWLOCK_T ipf_nat; #endif -static int find_port __P((int, u_char *, int datlen, int *, u_short *)); +static int find_port (int, u_char *, int datlen, int *, u_short *); static int find_port(ipaddr, data, datlen, off, port) diff --git a/sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c b/sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c index 5eb71ff46b..a6bc170c5e 100644 --- a/sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c @@ -4,17 +4,17 @@ * * $Id: ip_ipsec_pxy.c,v 1.1.2.10 2002/01/13 04:58:29 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c,v 1.1.1.1.2.1 2002/04/27 17:37:12 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c,v 1.2 2003/06/17 04:28:20 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c,v 1.3 2003/08/27 11:02:14 rob Exp $ * */ #define IPF_IPSEC_PROXY -int ippr_ipsec_init __P((void)); -int ippr_ipsec_new __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -void ippr_ipsec_del __P((ap_session_t *)); -int ippr_ipsec_out __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -int ippr_ipsec_match __P((fr_info_t *, ap_session_t *, nat_t *)); +int ippr_ipsec_init (void); +int ippr_ipsec_new (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +void ippr_ipsec_del (ap_session_t *); +int ippr_ipsec_out (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +int ippr_ipsec_match (fr_info_t *, ap_session_t *, nat_t *); static frentry_t ipsecfr; diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index 8fd7ea5b5d..66bc4074cc 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -8,7 +8,7 @@ * @(#)ip_nat.c 1.11 6/5/96 (C) 1995 Darren Reed * @(#)$Id: ip_nat.c,v 2.37.2.70 2002/08/28 12:45:48 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_nat.c,v 1.22.2.7 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_nat.c,v 1.4 2003/08/07 21:16:48 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_nat.c,v 1.5 2003/08/27 11:02:14 rob Exp $ */ #if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL) #define _KERNEL @@ -136,21 +136,21 @@ extern kmutex_t ipf_rw; extern KRWLOCK_T ipf_nat; #endif -static int nat_flushtable __P((void)); -static void nat_addnat __P((struct ipnat *)); -static void nat_addrdr __P((struct ipnat *)); -static void nat_delete __P((struct nat *)); -static void nat_delrdr __P((struct ipnat *)); -static void nat_delnat __P((struct ipnat *)); -static int fr_natgetent __P((caddr_t)); -static int fr_natgetsz __P((caddr_t)); -static int fr_natputent __P((caddr_t)); -static void nat_tabmove __P((fr_info_t *, nat_t *)); -static int nat_match __P((fr_info_t *, ipnat_t *, ip_t *)); -static hostmap_t *nat_hostmap __P((ipnat_t *, struct in_addr, - struct in_addr)); -static void nat_hostmapdel __P((struct hostmap *)); -static void nat_mssclamp __P((tcphdr_t *, u_32_t, fr_info_t *, u_short *)); +static int nat_flushtable (void); +static void nat_addnat (struct ipnat *); +static void nat_addrdr (struct ipnat *); +static void nat_delete (struct nat *); +static void nat_delrdr (struct ipnat *); +static void nat_delnat (struct ipnat *); +static int fr_natgetent (caddr_t); +static int fr_natgetsz (caddr_t); +static int fr_natputent (caddr_t); +static void nat_tabmove (fr_info_t *, nat_t *); +static int nat_match (fr_info_t *, ipnat_t *, ip_t *); +static hostmap_t *nat_hostmap (ipnat_t *, struct in_addr, + struct in_addr); +static void nat_hostmapdel (struct hostmap *); +static void nat_mssclamp (tcphdr_t *, u_32_t, fr_info_t *, u_short *); int nat_init() diff --git a/sys/contrib/ipfilter/netinet/ip_nat.h b/sys/contrib/ipfilter/netinet/ip_nat.h index 7d7216f9e2..c8f753f793 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.h +++ b/sys/contrib/ipfilter/netinet/ip_nat.h @@ -6,7 +6,7 @@ * @(#)ip_nat.h 1.5 2/4/96 * $Id: ip_nat.h,v 2.17.2.27 2002/08/28 12:45:51 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_nat.h,v 1.15.2.5 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_nat.h,v 1.2 2003/06/17 04:28:20 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_nat.h,v 1.3 2003/08/27 11:02:14 rob Exp $ */ #ifndef __IP_NAT_H__ @@ -288,7 +288,7 @@ extern u_int ipf_nattable_sz; extern u_int ipf_natrules_sz; extern u_int ipf_rdrrules_sz; extern int fr_nat_lock; -extern void ip_natsync __P((void *)); +extern void ip_natsync (void *); extern u_long fr_defnatage; extern u_long fr_defnaticmpage; extern nat_t **nat_table[2]; @@ -298,32 +298,32 @@ extern ipnat_t **rdr_rules; extern ipnat_t *nat_list; extern natstat_t nat_stats; #if defined(__OpenBSD__) -extern void nat_ifdetach __P((void *)); +extern void nat_ifdetach (void *); #endif #if defined(__NetBSD__) || defined(__OpenBSD__) || (__FreeBSD_version >= 300003) -extern int nat_ioctl __P((caddr_t, u_long, int)); +extern int nat_ioctl (caddr_t, u_long, int); #else -extern int nat_ioctl __P((caddr_t, int, int)); +extern int nat_ioctl (caddr_t, int, int); #endif -extern int nat_init __P((void)); -extern nat_t *nat_new __P((fr_info_t *, ip_t *, ipnat_t *, nat_t **, - u_int, int)); -extern nat_t *nat_outlookup __P((fr_info_t *, u_int, u_int, struct in_addr, - struct in_addr, int)); -extern nat_t *nat_inlookup __P((fr_info_t *, u_int, u_int, struct in_addr, - struct in_addr, int)); -extern nat_t *nat_lookupredir __P((natlookup_t *)); -extern nat_t *nat_icmplookup __P((ip_t *, fr_info_t *, int)); -extern nat_t *nat_icmp __P((ip_t *, fr_info_t *, u_int *, int)); -extern int nat_clearlist __P((void)); -extern void nat_insert __P((nat_t *)); - -extern int ip_natout __P((ip_t *, fr_info_t *)); -extern int ip_natin __P((ip_t *, fr_info_t *)); -extern void ip_natunload __P((void)), ip_natexpire __P((void)); -extern void nat_log __P((struct nat *, u_int)); -extern void fix_incksum __P((fr_info_t *, u_short *, u_32_t)); -extern void fix_outcksum __P((fr_info_t *, u_short *, u_32_t)); -extern void fix_datacksum __P((u_short *, u_32_t)); +extern int nat_init (void); +extern nat_t *nat_new (fr_info_t *, ip_t *, ipnat_t *, nat_t **, + u_int, int); +extern nat_t *nat_outlookup (fr_info_t *, u_int, u_int, struct in_addr, + struct in_addr, int); +extern nat_t *nat_inlookup (fr_info_t *, u_int, u_int, struct in_addr, + struct in_addr, int); +extern nat_t *nat_lookupredir (natlookup_t *); +extern nat_t *nat_icmplookup (ip_t *, fr_info_t *, int); +extern nat_t *nat_icmp (ip_t *, fr_info_t *, u_int *, int); +extern int nat_clearlist (void); +extern void nat_insert (nat_t *); + +extern int ip_natout (ip_t *, fr_info_t *); +extern int ip_natin (ip_t *, fr_info_t *); +extern void ip_natunload (void), ip_natexpire (void); +extern void nat_log (struct nat *, u_int); +extern void fix_incksum (fr_info_t *, u_short *, u_32_t); +extern void fix_outcksum (fr_info_t *, u_short *, u_32_t); +extern void fix_datacksum (u_short *, u_32_t); #endif /* __IP_NAT_H__ */ diff --git a/sys/contrib/ipfilter/netinet/ip_netbios_pxy.c b/sys/contrib/ipfilter/netinet/ip_netbios_pxy.c index 6c1996a706..0ac494e01d 100644 --- a/sys/contrib/ipfilter/netinet/ip_netbios_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_netbios_pxy.c @@ -3,7 +3,7 @@ * For use with the NAT code. * $Id: ip_netbios_pxy.c,v 1.1.2.3 2002/01/09 09:28:37 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_netbios_pxy.c,v 1.1.1.1.2.1 2002/04/27 17:37:12 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_netbios_pxy.c,v 1.2 2003/06/17 04:28:20 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_netbios_pxy.c,v 1.3 2003/08/27 11:02:14 rob Exp $ */ /*- @@ -36,8 +36,8 @@ #define IPF_NETBIOS_PROXY -int ippr_netbios_init __P((void)); -int ippr_netbios_out __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); +int ippr_netbios_init (void); +int ippr_netbios_out (fr_info_t *, ip_t *, ap_session_t *, nat_t *); static frentry_t netbiosfr; diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index c9ce93cb1a..0727645abd 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -5,7 +5,7 @@ * * @(#)$Id: ip_proxy.c,v 2.9.2.24 2002/08/28 12:45:51 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_proxy.c,v 1.11.2.5 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_proxy.c,v 1.5 2003/08/07 21:16:48 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_proxy.c,v 1.6 2003/08/27 11:02:14 rob Exp $ */ #if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL) # define _KERNEL @@ -82,7 +82,7 @@ extern KRWLOCK_T ipf_nat, ipf_state; #endif -static int appr_fixseqack __P((fr_info_t *, ip_t *, ap_session_t *, int )); +static int appr_fixseqack (fr_info_t *, ip_t *, ap_session_t *, int ); #define PROXY_DEBUG 0 diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.h b/sys/contrib/ipfilter/netinet/ip_proxy.h index 33c562e672..0bf877ca2d 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.h +++ b/sys/contrib/ipfilter/netinet/ip_proxy.h @@ -5,7 +5,7 @@ * * $Id: ip_proxy.h,v 2.8.2.13 2002/07/04 11:07:37 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_proxy.h,v 1.9.2.5 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_proxy.h,v 1.2 2003/06/17 04:28:20 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_proxy.h,v 1.3 2003/08/27 11:02:14 rob Exp $ */ #ifndef __IP_PROXY_H__ @@ -72,16 +72,16 @@ typedef struct aproxy { u_char apr_p; /* protocol */ int apr_ref; /* +1 per rule referencing it */ int apr_flags; - int (* apr_init) __P((void)); - void (* apr_fini) __P((void)); - int (* apr_new) __P((fr_info_t *, ip_t *, - ap_session_t *, struct nat *)); - void (* apr_del) __P((ap_session_t *)); - int (* apr_inpkt) __P((fr_info_t *, ip_t *, - ap_session_t *, struct nat *)); - int (* apr_outpkt) __P((fr_info_t *, ip_t *, - ap_session_t *, struct nat *)); - int (* apr_match) __P((fr_info_t *, ap_session_t *, struct nat *)); + int (* apr_init) (void); + void (* apr_fini) (void); + int (* apr_new) (fr_info_t *, ip_t *, + ap_session_t *, struct nat *); + void (* apr_del) (ap_session_t *); + int (* apr_inpkt) (fr_info_t *, ip_t *, + ap_session_t *, struct nat *); + int (* apr_outpkt) (fr_info_t *, ip_t *, + ap_session_t *, struct nat *); + int (* apr_match) (fr_info_t *, ap_session_t *, struct nat *); } aproxy_t; #define APR_DELETE 1 @@ -161,16 +161,16 @@ extern ap_session_t *ap_sess_list; extern aproxy_t ap_proxies[]; extern int ippr_ftp_pasvonly; -extern int appr_add __P((aproxy_t *)); -extern int appr_del __P((aproxy_t *)); -extern int appr_init __P((void)); -extern void appr_unload __P((void)); -extern int appr_ok __P((ip_t *, tcphdr_t *, struct ipnat *)); -extern int appr_match __P((fr_info_t *, struct nat *)); -extern void appr_free __P((aproxy_t *)); -extern void aps_free __P((ap_session_t *)); -extern int appr_check __P((ip_t *, fr_info_t *, struct nat *)); -extern aproxy_t *appr_lookup __P((u_int, char *)); -extern int appr_new __P((fr_info_t *, ip_t *, struct nat *)); +extern int appr_add (aproxy_t *); +extern int appr_del (aproxy_t *); +extern int appr_init (void); +extern void appr_unload (void); +extern int appr_ok (ip_t *, tcphdr_t *, struct ipnat *); +extern int appr_match (fr_info_t *, struct nat *); +extern void appr_free (aproxy_t *); +extern void aps_free (ap_session_t *); +extern int appr_check (ip_t *, fr_info_t *, struct nat *); +extern aproxy_t *appr_lookup (u_int, char *); +extern int appr_new (fr_info_t *, ip_t *, struct nat *); #endif /* __IP_PROXY_H__ */ diff --git a/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c b/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c index 51c680b051..9ec7885705 100644 --- a/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c,v 1.7.2.3 2002/04/27 17:37:12 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c,v 1.2 2003/06/17 04:28:20 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c,v 1.3 2003/08/27 11:02:14 rob Exp $ */ #if SOLARIS && defined(_KERNEL) extern kmutex_t ipf_rw; @@ -9,10 +9,10 @@ extern kmutex_t ipf_rw; #define IPF_RAUDIO_PROXY -int ippr_raudio_init __P((void)); -int ippr_raudio_new __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -int ippr_raudio_in __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -int ippr_raudio_out __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); +int ippr_raudio_init (void); +int ippr_raudio_new (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +int ippr_raudio_in (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +int ippr_raudio_out (fr_info_t *, ip_t *, ap_session_t *, nat_t *); static frentry_t raudiofr; diff --git a/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c b/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c index 058f1350e0..004da4630f 100644 --- a/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c @@ -5,7 +5,7 @@ * Simple RCMD transparent proxy for in-kernel use. For use with the NAT * code. * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c,v 1.8.2.3 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c,v 1.3 2003/07/26 14:07:18 rob Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c,v 1.4 2003/08/27 11:02:14 rob Exp $ */ #if SOLARIS && defined(_KERNEL) extern kmutex_t ipf_rw; @@ -16,11 +16,11 @@ extern kmutex_t ipf_rw; #define IPF_RCMD_PROXY -int ippr_rcmd_init __P((void)); -int ippr_rcmd_new __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -int ippr_rcmd_out __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); -u_short ipf_rcmd_atoi __P((char *)); -int ippr_rcmd_portmsg __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *)); +int ippr_rcmd_init (void); +int ippr_rcmd_new (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +int ippr_rcmd_out (fr_info_t *, ip_t *, ap_session_t *, nat_t *); +u_short ipf_rcmd_atoi (char *); +int ippr_rcmd_portmsg (fr_info_t *, ip_t *, ap_session_t *, nat_t *); static frentry_t rcmdfr; diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index 25524575db..110def2173 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -6,7 +6,7 @@ * @(#)ip_state.c 1.8 6/5/96 (C) 1993-2000 Darren Reed * @(#)$Id: ip_state.c,v 2.30.2.74 2002/07/27 15:58:10 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_state.c,v 1.21.2.5 2003/03/01 03:55:54 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_state.c,v 1.4 2003/08/07 21:16:48 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_state.c,v 1.5 2003/08/27 11:02:14 rob Exp $ */ #if defined(__sgi) && (IRIX > 602) @@ -115,21 +115,21 @@ extern kmutex_t ipf_rw; #endif #ifdef USE_INET6 -static frentry_t *fr_checkicmp6matchingstate __P((ip6_t *, fr_info_t *)); +static frentry_t *fr_checkicmp6matchingstate (ip6_t *, fr_info_t *); #endif -static int fr_matchsrcdst __P((ipstate_t *, union i6addr, union i6addr, - fr_info_t *, tcphdr_t *)); -static frentry_t *fr_checkicmpmatchingstate __P((ip_t *, fr_info_t *)); -static int fr_matchicmpqueryreply __P((int, ipstate_t *, icmphdr_t *, int)); -static int fr_state_flush __P((int, int)); -static ips_stat_t *fr_statetstats __P((void)); -static void fr_delstate __P((ipstate_t *)); -static int fr_state_remove __P((caddr_t)); -static void fr_ipsmove __P((ipstate_t **, ipstate_t *, u_int)); -static int fr_tcpoptions __P((tcphdr_t *)); -int fr_stputent __P((caddr_t)); -int fr_stgetent __P((caddr_t)); -void fr_stinsert __P((ipstate_t *)); +static int fr_matchsrcdst (ipstate_t *, union i6addr, union i6addr, + fr_info_t *, tcphdr_t *); +static frentry_t *fr_checkicmpmatchingstate (ip_t *, fr_info_t *); +static int fr_matchicmpqueryreply (int, ipstate_t *, icmphdr_t *, int); +static int fr_state_flush (int, int); +static ips_stat_t *fr_statetstats (void); +static void fr_delstate (ipstate_t *); +static int fr_state_remove (caddr_t); +static void fr_ipsmove (ipstate_t **, ipstate_t *, u_int); +static int fr_tcpoptions (tcphdr_t *); +int fr_stputent (caddr_t); +int fr_stgetent (caddr_t); +void fr_stinsert (ipstate_t *); #define FIVE_DAYS (2 * 5 * 86400) /* 5 days: half closed session */ diff --git a/sys/contrib/ipfilter/netinet/ip_state.h b/sys/contrib/ipfilter/netinet/ip_state.h index 60dc959d7e..1da1462f8d 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.h +++ b/sys/contrib/ipfilter/netinet/ip_state.h @@ -6,7 +6,7 @@ * @(#)ip_state.h 1.3 1/12/96 (C) 1995 Darren Reed * $Id: ip_state.h,v 2.13.2.13 2002/06/27 14:40:29 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_state.h,v 1.10.2.4 2002/08/31 16:24:52 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_state.h,v 1.2 2003/06/17 04:28:20 dillon Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_state.h,v 1.3 2003/08/27 11:02:14 rob Exp $ */ #ifndef __IP_STATE_H__ #define __IP_STATE_H__ @@ -195,19 +195,19 @@ extern u_long fr_icmptimeout; extern u_long fr_icmpacktimeout; extern ipstate_t *ips_list; extern int fr_state_lock; -extern int fr_stateinit __P((void)); -extern int fr_tcpstate __P((ipstate_t *, fr_info_t *, ip_t *, tcphdr_t *)); -extern ipstate_t *fr_addstate __P((ip_t *, fr_info_t *, ipstate_t **, u_int)); -extern frentry_t *fr_checkstate __P((ip_t *, fr_info_t *)); -extern void ip_statesync __P((void *)); -extern void fr_timeoutstate __P((void)); -extern int fr_tcp_age __P((u_long *, u_char *, fr_info_t *, int, int)); -extern void fr_stateunload __P((void)); -extern void ipstate_log __P((struct ipstate *, u_int)); +extern int fr_stateinit (void); +extern int fr_tcpstate (ipstate_t *, fr_info_t *, ip_t *, tcphdr_t *); +extern ipstate_t *fr_addstate (ip_t *, fr_info_t *, ipstate_t **, u_int); +extern frentry_t *fr_checkstate (ip_t *, fr_info_t *); +extern void ip_statesync (void *); +extern void fr_timeoutstate (void); +extern int fr_tcp_age (u_long *, u_char *, fr_info_t *, int, int); +extern void fr_stateunload (void); +extern void ipstate_log (struct ipstate *, u_int); #if defined(__NetBSD__) || defined(__OpenBSD__) -extern int fr_state_ioctl __P((caddr_t, u_long, int)); +extern int fr_state_ioctl (caddr_t, u_long, int); #else -extern int fr_state_ioctl __P((caddr_t, int, int)); +extern int fr_state_ioctl (caddr_t, int, int); #endif #endif /* __IP_STATE_H__ */ -- 2.41.0