get rid for ifa->ifa_ft; new routing messages for adding/deleting
[unix-history] / usr / src / sys / net / radix.h
index 42a1a2f..ab88be6 100644 (file)
@@ -1,20 +1,10 @@
 /*
 /*
- * Copyright (c) 1988 Regents of the University of California.
+ * Copyright (c) 1988, 1989 Regents of the University of California.
  * All rights reserved.
  *
  * All rights reserved.
  *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley.  The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * %sccs.include.redist.c%
  *
  *
- *     @(#)radix.h     7.2 (Berkeley) %G%
+ *     @(#)radix.h     7.5 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -49,8 +39,6 @@ struct radix_node {
 #endif
 };
 
 #endif
 };
 
-#define MAXKEYLEN 32
-
 #define rn_dupedkey rn_u.rn_leaf.rn_Dupedkey
 #define rn_key rn_u.rn_leaf.rn_Key
 #define rn_mask rn_u.rn_leaf.rn_Mask
 #define rn_dupedkey rn_u.rn_leaf.rn_Dupedkey
 #define rn_key rn_u.rn_leaf.rn_Key
 #define rn_mask rn_u.rn_leaf.rn_Mask
@@ -80,25 +68,25 @@ extern struct radix_mask {
 
 #define MKFree(m) { (m)->rm_mklist = rn_mkfreelist; rn_mkfreelist = (m);}
 
 
 #define MKFree(m) { (m)->rm_mklist = rn_mkfreelist; rn_mkfreelist = (m);}
 
-extern struct radix_node_head {
-       struct  radix_node_head *rnh_next;
+struct radix_node_head {
        struct  radix_node *rnh_treetop;
        struct  radix_node *rnh_treetop;
-       int     rnh_af;
+       struct  radix_node *(*rnh_add)();
+       struct  radix_node *(*rnh_delete)();
+       struct  radix_node *(*rnh_match)();
+       int     (*rnh_walk)();
        struct  radix_node rnh_nodes[3];
        struct  radix_node rnh_nodes[3];
-} *radix_node_head;
+};
 
 
 #ifndef KERNEL
 
 
 #ifndef KERNEL
-char *malloc();
 #define Bcmp(a, b, n) bcmp(((char *)(a)), ((char *)(b)), (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);
 #define Bcmp(a, b, n) bcmp(((char *)(a)), ((char *)(b)), (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);
-#define min(a, b) ((a) < (b) ? (a) : (b))
 #else
 #else
-#define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (n))
-#define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (n))
-#define Bzero(p, n) bzero((caddr_t)(p), (int)(n));
-#define R_Malloc(p, t, n) (p = (t) malloc((n), M_RTABLE, M_DONTWAIT))
-#define Free(p) free((caddr_t)p);
-#endif KERNEL
+#define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
+#define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
+#define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
+#define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_DONTWAIT))
+#define Free(p) free((caddr_t)p, M_RTABLE);
+#endif /*KERNEL*/