radix header refactor
This commit is contained in:
parent
f442ff7790
commit
b6111be746
|
@ -10,10 +10,10 @@
|
|||
#define RULE_NOT_FOUND -1
|
||||
|
||||
struct routing_record {
|
||||
unsigned long long _ip;
|
||||
unsigned long _ip[2];
|
||||
unsigned short _rule;
|
||||
unsigned _ip_end_bit:7;
|
||||
unsigned _rule_valid:1;
|
||||
unsigned _mask:7;
|
||||
unsigned _valid:1;
|
||||
};
|
||||
|
||||
struct radix_node {
|
||||
|
@ -31,9 +31,9 @@ typedef struct radix_node* radix_node_t;
|
|||
typedef struct radix_holder* radix_holder_t;
|
||||
typedef struct routing_record* record_t;
|
||||
|
||||
struct radix_holder* create_holder();
|
||||
struct radix_node* create_node(record_t record);
|
||||
static struct radix_node* clone_node(radix_node_t n);
|
||||
radix_holder_t create_holder();
|
||||
radix_node_t create_node(record_t record);
|
||||
static radix_node_t clone_node(radix_node_t n);
|
||||
static void split_node(struct radix_node* n, unsigned bit);
|
||||
|
||||
int destory_holder(struct radix_holder*);
|
||||
|
|
Loading…
Reference in New Issue