Deleted Added
full compact
radix_ipf.h (145519) radix_ipf.h (153881)
1/* $FreeBSD: head/contrib/ipfilter/radix_ipf.h 145519 2005-04-25 18:20:15Z darrenr $ */
1/* $FreeBSD: head/contrib/ipfilter/radix_ipf.h 153881 2005-12-30 11:52:26Z guido $ */
2
3/*
4 * Copyright (c) 1988, 1989, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 13 unchanged lines hidden (view full) ---

23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * @(#)radix.h 8.2 (Berkeley) 10/31/94
29 */
30
2
3/*
4 * Copyright (c) 1988, 1989, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 13 unchanged lines hidden (view full) ---

23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * @(#)radix.h 8.2 (Berkeley) 10/31/94
29 */
30
31#ifndef _NET_RADIX_H_
31#if !defined(_NET_RADIX_H_) && !defined(_RADIX_H_)
32#define _NET_RADIX_H_
33#ifndef _RADIX_H_
34#define _RADIX_H_
35#endif /* _RADIX_H_ */
36
37#ifndef __P
38# ifdef __STDC__
39# define __P(x) x
40# else
41# define __P(x) ()
42# endif
43#endif
44
32#define _NET_RADIX_H_
33#ifndef _RADIX_H_
34#define _RADIX_H_
35#endif /* _RADIX_H_ */
36
37#ifndef __P
38# ifdef __STDC__
39# define __P(x) x
40# else
41# define __P(x) ()
42# endif
43#endif
44
45#ifdef __sgi
45#if defined(__sgi)
46# define radix_mask ipf_radix_mask
47# define radix_node ipf_radix_node
48# define radix_node_head ipf_radix_node_head
49#endif
50
51/*
52 * Radix search tree node layout.
53 */

--- 87 unchanged lines hidden (view full) ---

141 __P((void *v, struct radix_node_head *head));
142 int (*rnh_walktree) /* traverse tree */
143 __P((struct radix_node_head *,
144 int (*)(struct radix_node *, void *), void *));
145 struct radix_node rnh_nodes[3]; /* empty tree for common case */
146};
147
148
46# define radix_mask ipf_radix_mask
47# define radix_node ipf_radix_node
48# define radix_node_head ipf_radix_node_head
49#endif
50
51/*
52 * Radix search tree node layout.
53 */

--- 87 unchanged lines hidden (view full) ---

141 __P((void *v, struct radix_node_head *head));
142 int (*rnh_walktree) /* traverse tree */
143 __P((struct radix_node_head *,
144 int (*)(struct radix_node *, void *), void *));
145 struct radix_node rnh_nodes[3]; /* empty tree for common case */
146};
147
148
149#if defined(AIX)
150# undef Bcmp
151# undef Bzero
152# undef R_Malloc
153# undef Free
154#endif
149#define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
150#if defined(linux) && defined(_KERNEL)
151# define Bcopy(a, b, n) memmove(((caddr_t)(b)), ((caddr_t)(a)), (unsigned)(n))
152#else
153# define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
154#endif
155#define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
156#define R_Malloc(p, t, n) KMALLOCS(p, t, n)
157#define FreeS(p, z) KFREES(p, z)
158#define Free(p) KFREE(p)
159
155#define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
156#if defined(linux) && defined(_KERNEL)
157# define Bcopy(a, b, n) memmove(((caddr_t)(b)), ((caddr_t)(a)), (unsigned)(n))
158#else
159# define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
160#endif
161#define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
162#define R_Malloc(p, t, n) KMALLOCS(p, t, n)
163#define FreeS(p, z) KFREES(p, z)
164#define Free(p) KFREE(p)
165
160#if (defined(__osf__) || (IRIX >= 60516)) && defined(_KERNEL)
166#if (defined(__osf__) || defined(AIX) || (IRIX >= 60516)) && defined(_KERNEL)
161# define rn_init ipf_rn_init
162# define rn_fini ipf_rn_fini
163# define rn_inithead ipf_rn_inithead
164# define rn_freehead ipf_rn_freehead
165# define rn_inithead0 ipf_rn_inithead0
166# define rn_refines ipf_rn_refines
167# define rn_walktree ipf_rn_walktree
168# define rn_addmask ipf_rn_addmask

--- 40 unchanged lines hidden ---
167# define rn_init ipf_rn_init
168# define rn_fini ipf_rn_fini
169# define rn_inithead ipf_rn_inithead
170# define rn_freehead ipf_rn_freehead
171# define rn_inithead0 ipf_rn_inithead0
172# define rn_refines ipf_rn_refines
173# define rn_walktree ipf_rn_walktree
174# define rn_addmask ipf_rn_addmask

--- 40 unchanged lines hidden ---