radix header refactor

This commit is contained in:
hladu357 2024-06-09 10:35:13 +02:00
parent f442ff7790
commit b6111be746
1 changed files with 7 additions and 7 deletions

View File

@ -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*);