diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-06-16 15:48:43 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-06-16 15:48:43 +0000 |
commit | c291aae0928d26753a167e1edf899ebb77ae30be (patch) | |
tree | b99e6e442f01c8343430b6a175aa8cec3c79cf0b /sbin/routed/defs.h | |
parent | 83d159a033fd8c0eec3dc1805b6b1b5e17d1ec5e (diff) |
Make routed no longer use kernel API prototypes for own functions -- this is
totaly braindead and will break as soon as we change something in radix.h.
Instead pull in the needed defines and prototypes into defs.h.
OK henning@, hshoexer@
Diffstat (limited to 'sbin/routed/defs.h')
-rw-r--r-- | sbin/routed/defs.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/sbin/routed/defs.h b/sbin/routed/defs.h index 2128b240041..f91d76e0063 100644 --- a/sbin/routed/defs.h +++ b/sbin/routed/defs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: defs.h,v 1.8 2003/06/02 20:06:17 millert Exp $ */ +/* $OpenBSD: defs.h,v 1.9 2006/06/16 15:48:42 claudio Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -543,3 +543,31 @@ extern struct interface *ifwithaddr(naddr, int, int); extern struct interface *ifwithname(char *, naddr); extern struct interface *ifwithindex(u_short); extern struct interface *iflookup(naddr); + +/* defines formerly included from radix.h via a super ugly hack */ +void rn_init(void); +int rn_inithead(void **, int); +int rn_inithead0(struct radix_node_head *, int); +int rn_refines(void *, void *); +int rn_walktree(struct radix_node_head *, + int (*)(struct radix_node *, void *), void *); + +struct radix_node *rn_addmask(void *, int, int); +struct radix_node *rn_addroute(void *, void *, struct radix_node_head *, + struct radix_node [2]); +struct radix_node *rn_delete(void *, void *, struct radix_node_head *, + struct radix_node *); +struct radix_node *rn_insert(void *, struct radix_node_head *, int *, + struct radix_node [2]); +struct radix_node *rn_lookup(void *, void *, struct radix_node_head *); +struct radix_node *rn_match(void *, struct radix_node_head *); +struct radix_node *rn_newpair(void *, int, struct radix_node[2]); +struct radix_node *rn_search(void *, struct radix_node *); +struct radix_node *rn_search_m(void *, struct radix_node *, void *); + +#define Bcmp(a, b, n) bcmp(((char *)(a)), ((char *)(b)), (n)) +#define Bcopy(a, b, n) bcopy(((char *)(a)), ((char *)(b)), (unsigned)(n)) +#define Bzero(p, n) bzero((char *)(p), (int)(n)); +#define R_Malloc(p, t, n) (p = (t) malloc((unsigned int)(n))) +#define Free(p) free((char *)p); + |