Date: Tue, 2 Feb 2021 01:19:21 GMT From: Cy Schubert <cy@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 7071734fae60 - main - Indentation cleanup resulting from the cleanup of #ifdefs. Message-ID: <202102020119.1121JL4e079540@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=7071734fae6019d1e3e44daf7deb4478582081cc commit 7071734fae6019d1e3e44daf7deb4478582081cc Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2021-01-27 15:25:00 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2021-02-02 01:19:15 +0000 Indentation cleanup resulting from the cleanup of #ifdefs. The conscious decision was made not to perform any indentation or whitespace cleanup while cleaning out old redunant #ifdefs. The reason for this was to avoid confusing future readers of history and diffs with cosmetic changes, making bisection of any possible bugs introduced more difficult. This commit cleans up the whitespace detritus left behind from the previous #ifdef cleanup commits. MFC after: 1 week --- sys/contrib/ipfilter/netinet/fil.c | 12 +- sys/contrib/ipfilter/netinet/ip_auth.c | 18 +- sys/contrib/ipfilter/netinet/ip_compat.h | 282 +++++++++++++------------- sys/contrib/ipfilter/netinet/ip_dstlist.c | 2 +- sys/contrib/ipfilter/netinet/ip_fil.h | 94 ++++----- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 21 +- sys/contrib/ipfilter/netinet/ip_pool.c | 2 +- 7 files changed, 215 insertions(+), 216 deletions(-) diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index 7402437d98c7..a79d441284bf 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -48,7 +48,7 @@ #if !defined(__SVR4) # include <sys/mbuf.h> #else -# include <sys/byteorder.h> +# include <sys/byteorder.h> # if (SOLARIS2 < 5) && defined(sun) # include <sys/dditypes.h> # endif @@ -4117,11 +4117,11 @@ ipf_sync(softc, ifp) { int i; -# if !SOLARIS +#if !SOLARIS ipf_nat_sync(softc, ifp); ipf_state_sync(softc, ifp); ipf_lookup_sync(softc, ifp); -# endif +#endif WRITE_ENTER(&softc->ipf_mutex); (void) ipf_synclist(softc, softc->ipf_acct[0][softc->ipf_active], ifp); @@ -4168,13 +4168,13 @@ copyinptr(softc, src, dst, size) caddr_t ca; int error; -# if SOLARIS +#if SOLARIS error = COPYIN(src, &ca, sizeof(ca)); if (error != 0) return error; -# else +#else bcopy(src, (caddr_t)&ca, sizeof(ca)); -# endif +#endif error = COPYIN(ca, dst, size); if (error != 0) { IPFERROR(3); diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c index 18b8f3a65641..4864a8128494 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.c +++ b/sys/contrib/ipfilter/netinet/ip_auth.c @@ -81,13 +81,13 @@ # undef KERNEL #endif #include <netinet/tcp.h> -# if defined(__FreeBSD_version) -# include <net/if_var.h> -# define IF_QFULL _IF_QFULL -# define IF_DROP _IF_DROP -# endif -# include <netinet/in_var.h> -# include <netinet/tcp_fsm.h> +#if defined(__FreeBSD_version) +# include <net/if_var.h> +# define IF_QFULL _IF_QFULL +# define IF_DROP _IF_DROP +#endif +#include <netinet/in_var.h> +#include <netinet/tcp_fsm.h> #include <netinet/udp.h> #include <netinet/ip_icmp.h> #include "netinet/ip_compat.h" @@ -298,9 +298,9 @@ ipf_auth_soft_destroy(softc, arg) { ipf_auth_softc_t *softa = arg; -# if SOLARIS && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) cv_destroy(&softa->ipf_auth_wait); -# endif +#endif MUTEX_DESTROY(&softa->ipf_auth_mx); RW_DESTROY(&softa->ipf_authlk); diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 4394b732e10c..756731480836 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -56,16 +56,16 @@ /* * This is a workaround for <sys/uio.h> troubles on FreeBSD and OpenBSD. */ -# ifndef _KERNEL -# define ADD_KERNEL -# define _KERNEL -# define KERNEL -# endif -# include <sys/uio.h> -# ifdef ADD_KERNEL -# undef _KERNEL -# undef KERNEL -# endif +#ifndef _KERNEL +# define ADD_KERNEL +# define _KERNEL +# define KERNEL +#endif +#include <sys/uio.h> +#ifdef ADD_KERNEL +# undef _KERNEL +# undef KERNEL +#endif #define NETBSD_GE_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ >= (x))) @@ -78,108 +78,108 @@ /* ----------------------------------------------------------------------- */ /* F R E E B S D */ /* ----------------------------------------------------------------------- */ -# define HAS_SYS_MD5_H 1 -# if defined(_KERNEL) -# include "opt_bpf.h" -# include "opt_inet6.h" -# if defined(INET6) && !defined(USE_INET6) -# define USE_INET6 -# endif -# else -# if !defined(USE_INET6) && !defined(NOINET6) -# define USE_INET6 -# endif +#define HAS_SYS_MD5_H 1 +#if defined(_KERNEL) +# include "opt_bpf.h" +# include "opt_inet6.h" +# if defined(INET6) && !defined(USE_INET6) +# define USE_INET6 # endif +#else +# if !defined(USE_INET6) && !defined(NOINET6) +# define USE_INET6 +# endif +#endif -# if defined(_KERNEL) -# include <netinet/ip_var.h> -# define p_cred td_ucred -# define p_uid td_ucred->cr_ruid +#if defined(_KERNEL) +# include <netinet/ip_var.h> +# define p_cred td_ucred +# define p_uid td_ucred->cr_ruid /* * When #define'd, the 5.2.1 kernel panics when used with the ftp proxy. * There may be other, safe, kernels but this is not extensively tested yet. */ -# define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) -# include "opt_ipfilter.h" -# endif -# define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) -# define COPYOUT(a,b,c) copyout((caddr_t)(a), (caddr_t)(b), (c)) +# define HAVE_M_PULLDOWN +# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) +# include "opt_ipfilter.h" +# endif +# define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) +# define COPYOUT(a,b,c) copyout((caddr_t)(a), (caddr_t)(b), (c)) -# else -# include <inttypes.h> -# endif /* _KERNEL */ +#else +# include <inttypes.h> +#endif /* _KERNEL */ -# include <sys/selinfo.h> -# include <sys/lock.h> -# include <sys/malloc.h> -# include <sys/mutex.h> -# define KRWLOCK_FILL_SZ 56 -# define KMUTEX_FILL_SZ 56 -# include <sys/rwlock.h> -# define KMUTEX_T struct mtx -# define KRWLOCK_T struct rwlock +#include <sys/selinfo.h> +#include <sys/lock.h> +#include <sys/malloc.h> +#include <sys/mutex.h> +#define KRWLOCK_FILL_SZ 56 +#define KMUTEX_FILL_SZ 56 +#include <sys/rwlock.h> +#define KMUTEX_T struct mtx +#define KRWLOCK_T struct rwlock #ifdef _KERNEL -# define READ_ENTER(x) rw_rlock(&(x)->ipf_lk) -# define WRITE_ENTER(x) rw_wlock(&(x)->ipf_lk) -# define MUTEX_DOWNGRADE(x) rw_downgrade(&(x)->ipf_lk) -# define MUTEX_TRY_UPGRADE(x) rw_try_upgrade(&(x)->ipf_lk) -# define RWLOCK_INIT(x,y) rw_init(&(x)->ipf_lk, (y)) -# define RW_DESTROY(x) rw_destroy(&(x)->ipf_lk) -# define RWLOCK_EXIT(x) do { \ +# define READ_ENTER(x) rw_rlock(&(x)->ipf_lk) +# define WRITE_ENTER(x) rw_wlock(&(x)->ipf_lk) +# define MUTEX_DOWNGRADE(x) rw_downgrade(&(x)->ipf_lk) +# define MUTEX_TRY_UPGRADE(x) rw_try_upgrade(&(x)->ipf_lk) +# define RWLOCK_INIT(x,y) rw_init(&(x)->ipf_lk, (y)) +# define RW_DESTROY(x) rw_destroy(&(x)->ipf_lk) +# define RWLOCK_EXIT(x) do { \ if (rw_wowned(&(x)->ipf_lk)) \ rw_wunlock(&(x)->ipf_lk); \ else \ rw_runlock(&(x)->ipf_lk); \ } while (0) -# include <net/if_var.h> -# define GETKTIME(x) microtime((struct timeval *)x) -# define if_addrlist if_addrhead - -# include <netinet/in_systm.h> -# include <netinet/ip.h> -# include <machine/in_cksum.h> - -# define USE_MUTEXES -# define MUTEX_ENTER(x) mtx_lock(&(x)->ipf_lk) -# define MUTEX_EXIT(x) mtx_unlock(&(x)->ipf_lk) -# define MUTEX_INIT(x,y) mtx_init(&(x)->ipf_lk, (y), NULL,\ +# include <net/if_var.h> +# define GETKTIME(x) microtime((struct timeval *)x) +# define if_addrlist if_addrhead + +# include <netinet/in_systm.h> +# include <netinet/ip.h> +# include <machine/in_cksum.h> + +# define USE_MUTEXES +# define MUTEX_ENTER(x) mtx_lock(&(x)->ipf_lk) +# define MUTEX_EXIT(x) mtx_unlock(&(x)->ipf_lk) +# define MUTEX_INIT(x,y) mtx_init(&(x)->ipf_lk, (y), NULL,\ MTX_DEF) -# define MUTEX_DESTROY(x) mtx_destroy(&(x)->ipf_lk) -# define MUTEX_NUKE(x) bzero((x), sizeof(*(x))) +# define MUTEX_DESTROY(x) mtx_destroy(&(x)->ipf_lk) +# define MUTEX_NUKE(x) bzero((x), sizeof(*(x))) /* * Whilst the sx(9) locks on FreeBSD have the right semantics and interface * for what we want to use them for, despite testing showing they work - * with a WITNESS kernel, it generates LOR messages. */ -# include <machine/atomic.h> -# define ATOMIC_INC(x) { mtx_lock(&softc->ipf_rw.ipf_lk); (x)++; \ +# include <machine/atomic.h> +# define ATOMIC_INC(x) { mtx_lock(&softc->ipf_rw.ipf_lk); (x)++; \ mtx_unlock(&softc->ipf_rw.ipf_lk); } -# define ATOMIC_DEC(x) { mtx_lock(&softc->ipf_rw.ipf_lk); (x)--; \ +# define ATOMIC_DEC(x) { mtx_lock(&softc->ipf_rw.ipf_lk); (x)--; \ mtx_unlock(&softc->ipf_rw.ipf_lk); } -# define ATOMIC_INCL(x) atomic_add_long(&(x), 1) -# define ATOMIC_INC64(x) ATOMIC_INC(x) -# define ATOMIC_INC32(x) atomic_add_32((u_int *)&(x), 1) -# define ATOMIC_DECL(x) atomic_add_long(&(x), -1) -# define ATOMIC_DEC64(x) ATOMIC_DEC(x) -# define ATOMIC_DEC32(x) atomic_add_32((u_int *)&(x), -1) -# define SPL_X(x) ; -# define SPL_NET(x) ; -# define SPL_IMP(x) ; -# define SPL_SCHED(x) ; -# define GET_MINOR dev2unit -# define MSGDSIZE(m) mbufchainlen(m) -# define M_LEN(m) (m)->m_len -# define M_ADJ(m,x) m_adj(m, x) -# define M_COPY(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) -# define M_DUP(m) m_dup(m, M_NOWAIT) -# define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } +# define ATOMIC_INCL(x) atomic_add_long(&(x), 1) +# define ATOMIC_INC64(x) ATOMIC_INC(x) +# define ATOMIC_INC32(x) atomic_add_32((u_int *)&(x), 1) +# define ATOMIC_DECL(x) atomic_add_long(&(x), -1) +# define ATOMIC_DEC64(x) ATOMIC_DEC(x) +# define ATOMIC_DEC32(x) atomic_add_32((u_int *)&(x), -1) +# define SPL_X(x) ; +# define SPL_NET(x) ; +# define SPL_IMP(x) ; +# define SPL_SCHED(x) ; +# define GET_MINOR dev2unit +# define MSGDSIZE(m) mbufchainlen(m) +# define M_LEN(m) (m)->m_len +# define M_ADJ(m,x) m_adj(m, x) +# define M_COPY(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) +# define M_DUP(m) m_dup(m, M_NOWAIT) +# define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } typedef struct mbuf mb_t; #else /* !_KERNEL */ -#ifndef _NET_IF_VAR_H_ +# ifndef _NET_IF_VAR_H_ /* * Userland emulation of struct ifnet. */ @@ -191,14 +191,14 @@ struct ifnet { int (*if_output)(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); }; -#endif /* _NET_IF_VAR_H_ */ +# endif /* _NET_IF_VAR_H_ */ #endif /* _KERNEL */ -# define IFNAME(x) ((struct ifnet *)x)->if_xname -# define COPYIFNAME(v, x, b) \ - (void) strncpy(b, \ - ((struct ifnet *)x)->if_xname, \ - LIFNAMSIZ) +#define IFNAME(x) ((struct ifnet *)x)->if_xname +#define COPYIFNAME(v, x, b) \ + (void) strncpy(b, \ + ((struct ifnet *)x)->if_xname, \ + LIFNAMSIZ) typedef u_long ioctlcmd_t; typedef struct uio uio_t; @@ -226,12 +226,12 @@ typedef u_int32_t u_32_t; * Userland locking primitives */ #ifndef _KERNEL -#if !defined(KMUTEX_FILL_SZ) -# define KMUTEX_FILL_SZ 1 -#endif -#if !defined(KRWLOCK_FILL_SZ) -# define KRWLOCK_FILL_SZ 1 -#endif +# if !defined(KMUTEX_FILL_SZ) +# define KMUTEX_FILL_SZ 1 +# endif +# if !defined(KRWLOCK_FILL_SZ) +# define KRWLOCK_FILL_SZ 1 +# endif #endif typedef struct { @@ -455,54 +455,54 @@ typedef struct ip6_hdr ip6_t; # define COPYDATA m_copydata # define COPYBACK m_copyback # endif -# if (defined(__NetBSD_Version__) && (__NetBSD_Version__ < 105180000)) || \ - defined(__FreeBSD__) -# include <vm/vm.h> -# endif -# if NETBSD_GE_REV(105180000) -# include <uvm/uvm_extern.h> -# else -# include <vm/vm_extern.h> +# if (defined(__NetBSD_Version__) && (__NetBSD_Version__ < 105180000)) || \ + defined(__FreeBSD__) +# include <vm/vm.h> +# endif +# if NETBSD_GE_REV(105180000) +# include <uvm/uvm_extern.h> +# else +# include <vm/vm_extern.h> extern vm_map_t kmem_map; -# endif -# include <sys/proc.h> +# endif +# include <sys/proc.h> -# ifdef IPFILTER_M_IPFILTER -# include <sys/malloc.h> +# ifdef IPFILTER_M_IPFILTER +# include <sys/malloc.h> MALLOC_DECLARE(M_IPFILTER); +# define _M_IPF M_IPFILTER +# else /* IPFILTER_M_IPFILTER */ +# ifdef M_PFIL +# define _M_IPF M_PFIL +# else +# ifdef M_IPFILTER # define _M_IPF M_IPFILTER -# else /* IPFILTER_M_IPFILTER */ -# ifdef M_PFIL -# define _M_IPF M_PFIL # else -# ifdef M_IPFILTER -# define _M_IPF M_IPFILTER -# else -# define _M_IPF M_TEMP -# endif /* M_IPFILTER */ -# endif /* M_PFIL */ -# endif /* IPFILTER_M_IPFILTER */ -# if !defined(KMALLOC) -# define KMALLOC(a, b) (a) = (b)malloc(sizeof(*(a)), _M_IPF, M_NOWAIT) -# endif -# if !defined(KMALLOCS) -# define KMALLOCS(a, b, c) (a) = (b)malloc((c), _M_IPF, M_NOWAIT) -# endif -# if !defined(KFREE) -# define KFREE(x) free((x), _M_IPF) -# endif -# if !defined(KFREES) +# define _M_IPF M_TEMP +# endif /* M_IPFILTER */ +# endif /* M_PFIL */ +# endif /* IPFILTER_M_IPFILTER */ +# if !defined(KMALLOC) +# define KMALLOC(a, b) (a) = (b)malloc(sizeof(*(a)), _M_IPF, M_NOWAIT) +# endif +# if !defined(KMALLOCS) +# define KMALLOCS(a, b, c) (a) = (b)malloc((c), _M_IPF, M_NOWAIT) +# endif +# if !defined(KFREE) +# define KFREE(x) free((x), _M_IPF) +# endif +# if !defined(KFREES) # define KFREES(x,s) free((x), _M_IPF) -# endif -# define UIOMOVE(a,b,c,d) uiomove((caddr_t)a,b,d) -# define SLEEP(id, n) tsleep((id), PPAUSE|PCATCH, n, 0) -# define WAKEUP(id,x) wakeup(id+x) -# if !defined(POLLWAKEUP) -# define POLLWAKEUP(x) selwakeup(softc->ipf_selwait+x) -# endif -# define GETIFP(n, v) ifunit(n) -# define GETIFMTU_4(x) ((struct ifnet *)x)->if_mtu -# define GETIFMTU_6(x) ((struct ifnet *)x)->if_mtu +# endif +# define UIOMOVE(a,b,c,d) uiomove((caddr_t)a,b,d) +# define SLEEP(id, n) tsleep((id), PPAUSE|PCATCH, n, 0) +# define WAKEUP(id,x) wakeup(id+x) +# if !defined(POLLWAKEUP) +# define POLLWAKEUP(x) selwakeup(softc->ipf_selwait+x) +# endif +# define GETIFP(n, v) ifunit(n) +# define GETIFMTU_4(x) ((struct ifnet *)x)->if_mtu +# define GETIFMTU_6(x) ((struct ifnet *)x)->if_mtu # if !defined(USE_MUTEXES) && !defined(SPL_NET) # define SPL_IMP(x) x = splimp() @@ -804,8 +804,8 @@ typedef struct tcpiphdr tcpiphdr_t; #undef IPOPT_AH #define IPOPT_AH 256+IPPROTO_AH -# define ICMP_UNREACH_ADMIN_PROHIBIT ICMP_UNREACH_FILTER_PROHIB -# define ICMP_UNREACH_FILTER ICMP_UNREACH_FILTER_PROHIB +#define ICMP_UNREACH_ADMIN_PROHIBIT ICMP_UNREACH_FILTER_PROHIB +#define ICMP_UNREACH_FILTER ICMP_UNREACH_FILTER_PROHIB #ifndef IPVERSION # define IPVERSION 4 diff --git a/sys/contrib/ipfilter/netinet/ip_dstlist.c b/sys/contrib/ipfilter/netinet/ip_dstlist.c index 0c65e4cd6896..11e1a1846d89 100644 --- a/sys/contrib/ipfilter/netinet/ip_dstlist.c +++ b/sys/contrib/ipfilter/netinet/ip_dstlist.c @@ -27,7 +27,7 @@ # endif #endif #include <sys/time.h> -# include <sys/protosw.h> +#include <sys/protosw.h> #include <sys/socket.h> #if defined(_KERNEL) && !defined(__SVR4) # include <sys/mbuf.h> diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 3121e94f1488..0b5fc7285f93 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -11,7 +11,7 @@ #ifndef __IP_FIL_H__ #define __IP_FIL_H__ -# include <netinet/in.h> +#include <netinet/in.h> #include "netinet/ip_compat.h" #include "netinet/ipf_rb.h" @@ -19,7 +19,7 @@ # include <sys/callout.h> #endif #if defined(BSD) && defined(_KERNEL) -# include <sys/selinfo.h> +# include <sys/selinfo.h> #endif #ifndef SOLARIS @@ -31,48 +31,48 @@ #endif #ifndef __P -# define __P(x) x +# define __P(x) x #endif -# define SIOCADAFR _IOW('r', 60, struct ipfobj) -# define SIOCRMAFR _IOW('r', 61, struct ipfobj) -# define SIOCSETFF _IOW('r', 62, u_int) -# define SIOCGETFF _IOR('r', 63, u_int) -# define SIOCGETFS _IOWR('r', 64, struct ipfobj) -# define SIOCIPFFL _IOWR('r', 65, int) -# define SIOCIPFFB _IOR('r', 66, int) -# define SIOCADIFR _IOW('r', 67, struct ipfobj) -# define SIOCRMIFR _IOW('r', 68, struct ipfobj) -# define SIOCSWAPA _IOR('r', 69, u_int) -# define SIOCINAFR _IOW('r', 70, struct ipfobj) -# define SIOCINIFR _IOW('r', 71, struct ipfobj) -# define SIOCFRENB _IOW('r', 72, u_int) -# define SIOCFRSYN _IOW('r', 73, u_int) -# define SIOCFRZST _IOWR('r', 74, struct ipfobj) -# define SIOCZRLST _IOWR('r', 75, struct ipfobj) -# define SIOCAUTHW _IOWR('r', 76, struct ipfobj) -# define SIOCAUTHR _IOWR('r', 77, struct ipfobj) -# define SIOCSTAT1 _IOWR('r', 78, struct ipfobj) -# define SIOCSTLCK _IOWR('r', 79, u_int) -# define SIOCSTPUT _IOWR('r', 80, struct ipfobj) -# define SIOCSTGET _IOWR('r', 81, struct ipfobj) -# define SIOCSTGSZ _IOWR('r', 82, struct ipfobj) -# define SIOCSTAT2 _IOWR('r', 83, struct ipfobj) -# define SIOCSETLG _IOWR('r', 84, int) -# define SIOCGETLG _IOWR('r', 85, int) -# define SIOCFUNCL _IOWR('r', 86, struct ipfunc_resolve) -# define SIOCIPFGETNEXT _IOWR('r', 87, struct ipfobj) -# define SIOCIPFGET _IOWR('r', 88, struct ipfobj) -# define SIOCIPFSET _IOWR('r', 89, struct ipfobj) -# define SIOCIPFL6 _IOWR('r', 90, int) -# define SIOCIPFITER _IOWR('r', 91, struct ipfobj) -# define SIOCGENITER _IOWR('r', 92, struct ipfobj) -# define SIOCGTABL _IOWR('r', 93, struct ipfobj) -# define SIOCIPFDELTOK _IOWR('r', 94, int) -# define SIOCLOOKUPITER _IOWR('r', 95, struct ipfobj) -# define SIOCGTQTAB _IOWR('r', 96, struct ipfobj) -# define SIOCMATCHFLUSH _IOWR('r', 97, struct ipfobj) -# define SIOCIPFINTERROR _IOR('r', 98, int) +#define SIOCADAFR _IOW('r', 60, struct ipfobj) +#define SIOCRMAFR _IOW('r', 61, struct ipfobj) +#define SIOCSETFF _IOW('r', 62, u_int) +#define SIOCGETFF _IOR('r', 63, u_int) +#define SIOCGETFS _IOWR('r', 64, struct ipfobj) +#define SIOCIPFFL _IOWR('r', 65, int) +#define SIOCIPFFB _IOR('r', 66, int) +#define SIOCADIFR _IOW('r', 67, struct ipfobj) +#define SIOCRMIFR _IOW('r', 68, struct ipfobj) +#define SIOCSWAPA _IOR('r', 69, u_int) +#define SIOCINAFR _IOW('r', 70, struct ipfobj) +#define SIOCINIFR _IOW('r', 71, struct ipfobj) +#define SIOCFRENB _IOW('r', 72, u_int) +#define SIOCFRSYN _IOW('r', 73, u_int) +#define SIOCFRZST _IOWR('r', 74, struct ipfobj) +#define SIOCZRLST _IOWR('r', 75, struct ipfobj) +#define SIOCAUTHW _IOWR('r', 76, struct ipfobj) +#define SIOCAUTHR _IOWR('r', 77, struct ipfobj) +#define SIOCSTAT1 _IOWR('r', 78, struct ipfobj) +#define SIOCSTLCK _IOWR('r', 79, u_int) +#define SIOCSTPUT _IOWR('r', 80, struct ipfobj) +#define SIOCSTGET _IOWR('r', 81, struct ipfobj) +#define SIOCSTGSZ _IOWR('r', 82, struct ipfobj) +#define SIOCSTAT2 _IOWR('r', 83, struct ipfobj) +#define SIOCSETLG _IOWR('r', 84, int) +#define SIOCGETLG _IOWR('r', 85, int) +#define SIOCFUNCL _IOWR('r', 86, struct ipfunc_resolve) +#define SIOCIPFGETNEXT _IOWR('r', 87, struct ipfobj) +#define SIOCIPFGET _IOWR('r', 88, struct ipfobj) +#define SIOCIPFSET _IOWR('r', 89, struct ipfobj) +#define SIOCIPFL6 _IOWR('r', 90, int) +#define SIOCIPFITER _IOWR('r', 91, struct ipfobj) +#define SIOCGENITER _IOWR('r', 92, struct ipfobj) +#define SIOCGTABL _IOWR('r', 93, struct ipfobj) +#define SIOCIPFDELTOK _IOWR('r', 94, int) +#define SIOCLOOKUPITER _IOWR('r', 95, struct ipfobj) +#define SIOCGTQTAB _IOWR('r', 96, struct ipfobj) +#define SIOCMATCHFLUSH _IOWR('r', 97, struct ipfobj) +#define SIOCIPFINTERROR _IOR('r', 98, int) #define SIOCADDFR SIOCADAFR #define SIOCDELFR SIOCRMAFR #define SIOCINSFR SIOCINAFR @@ -1640,14 +1640,14 @@ extern int ipf_qout(queue_t *, mblk_t *); extern int ipf_check(void *, struct ip *, int, struct ifnet *, int, mb_t **); extern int (*fr_checkp)(ip_t *, int, void *, int, mb_t **); extern size_t mbufchainlen(mb_t *); -# ifdef IPFILTER_LKM +# ifdef IPFILTER_LKM extern int ipf_identify(char *); -# endif -# if defined(__FreeBSD_version) +# endif +# if defined(__FreeBSD_version) extern int ipfioctl(struct cdev*, u_long, caddr_t, int, struct thread *); -# elif defined(__NetBSD__) +# elif defined(__NetBSD__) extern int ipfioctl(dev_t, u_long, void *, int, struct lwp *); -# endif +# endif # endif /* MENTAT */ # if defined(__FreeBSD_version) diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index 7fc64cefb4c2..338c4e24c03a 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -34,9 +34,9 @@ static const char rcsid[] = "@(#)$Id$"; #include <sys/filio.h> #include <sys/time.h> #include <sys/systm.h> -# include <sys/dirent.h> +#include <sys/dirent.h> #if defined(__FreeBSD_version) -#include <sys/jail.h> +# include <sys/jail.h> #endif #include <sys/malloc.h> #include <sys/mbuf.h> @@ -44,7 +44,6 @@ static const char rcsid[] = "@(#)$Id$"; #include <sys/socket.h> #include <sys/selinfo.h> #include <netinet/tcp_var.h> - #include <net/if.h> #include <net/if_var.h> #include <net/netisr.h> @@ -75,19 +74,19 @@ static const char rcsid[] = "@(#)$Id$"; #include "netinet/ip_lookup.h" #include "netinet/ip_dstlist.h" #ifdef IPFILTER_SCAN -#include "netinet/ip_scan.h" +# include "netinet/ip_scan.h" #endif #include "netinet/ip_pool.h" #include <sys/malloc.h> #include <sys/kernel.h> #ifdef CSUM_DATA_VALID -#include <machine/in_cksum.h> +# include <machine/in_cksum.h> #endif extern int ip_optcopy(struct ip *, struct ip *); -# ifdef IPFILTER_M_IPFILTER +#ifdef IPFILTER_M_IPFILTER MALLOC_DEFINE(M_IPFILTER, "ipfilter", "IP Filter packet filter data structures"); -# endif +#endif static int ipf_send_ip(fr_info_t *, mb_t *); @@ -98,8 +97,8 @@ VNET_DEFINE(ipf_main_softc_t, ipfmain) = { }; #define V_ipfmain VNET(ipfmain) -# include <sys/conf.h> -# include <net/pfil.h> +#include <sys/conf.h> +#include <net/pfil.h> VNET_DEFINE_STATIC(eventhandler_tag, ipf_arrivetag); VNET_DEFINE_STATIC(eventhandler_tag, ipf_departtag); @@ -278,8 +277,8 @@ ipfdetach(softc) int ipfioctl(dev, cmd, data, mode, p) struct thread *p; -# define p_cred td_ucred -# define p_uid td_ucred->cr_ruid +#define p_cred td_ucred +#define p_uid td_ucred->cr_ruid struct cdev *dev; ioctlcmd_t cmd; caddr_t data; diff --git a/sys/contrib/ipfilter/netinet/ip_pool.c b/sys/contrib/ipfilter/netinet/ip_pool.c index fc2e78bfe27b..51d810baa310 100644 --- a/sys/contrib/ipfilter/netinet/ip_pool.c +++ b/sys/contrib/ipfilter/netinet/ip_pool.c @@ -732,7 +732,7 @@ ipf_pool_select_add_ref(arg, unit, name) /* */ /* Searches for an exact match of an entry in the pool. */ /* ------------------------------------------------------------------------ */ -extern void printhostmask(int, u_32_t *, u_32_t *)); +extern void printhostmask(int, u_32_t *, u_32_t *); static ip_pool_node_t * ipf_pool_findeq(softp, ipo, addr, mask) ipf_pool_softc_t *softp;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102020119.1121JL4e079540>