diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2019-03-31 19:29:28 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2019-03-31 19:29:28 +0000 |
commit | 7296c3744b367428f68264f2c13480b150219fa9 (patch) | |
tree | ad1feece43c245cbb0f581e34596ead0c0ec3d91 | |
parent | 91f09893cdeaee1217103066fac21dd9233a72ca (diff) |
Unbreak tree by removing the bits that were copied to art.h in r1.18
from here.
reported by anton and otto
-rw-r--r-- | sys/net/art.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/sys/net/art.c b/sys/net/art.c index 82a8b9b1b45..afb0a1b8998 100644 --- a/sys/net/art.c +++ b/sys/net/art.c @@ -1,4 +1,4 @@ -/* $OpenBSD: art.c,v 1.27 2017/02/28 09:50:13 mpi Exp $ */ +/* $OpenBSD: art.c,v 1.28 2019/03/31 19:29:27 tb Exp $ */ /* * Copyright (c) 2015 Martin Pieuchot @@ -37,37 +37,6 @@ #include <net/art.h> -#define ISLEAF(e) (((unsigned long)(e) & 1) == 0) -#define SUBTABLE(e) ((struct art_table *)((unsigned long)(e) & ~1)) -#define ASNODE(t) ((struct art_node *)((unsigned long)(t) | 1)) - -/* - * Allotment Table. - */ -struct art_table { - struct art_table *at_parent; /* Parent table */ - uint32_t at_index; /* Index in the parent table */ - uint32_t at_minfringe; /* Index that fringe begins */ - uint32_t at_level; /* Level of the table */ - uint8_t at_bits; /* Stride length of the table */ - uint8_t at_offset; /* Sum of parents' stride len */ - - /* - * Items stored in the heap are pointers to nodes, in the leaf - * case, or tables otherwise. One exception is index 0 which - * is a route counter. - */ - union { - struct srp node; - unsigned long count; - } *at_heap; /* Array of 2^(slen+1) items */ -}; -#define at_refcnt at_heap[0].count/* Refcounter (1 per different route) */ -#define at_default at_heap[1].node /* Default route (was in parent heap) */ - -/* Heap size for an ART table of stride length ``slen''. */ -#define AT_HEAPSIZE(slen) ((1 << ((slen) + 1)) * sizeof(void *)) - int art_bindex(struct art_table *, uint8_t *, int); void art_allot(struct art_table *at, int, struct art_node *, struct art_node *); |