📄 one_bit.h
字号:
/*b_tree.h*/
#ifndef _STATV6_H
#define _STATV6_H
#include "global.h"
#define MAXKEY 35
typedef struct node
{
struct node *lchild;
struct node *rchild;
val16_t nh;
uchar len;
bool real_entry;
val32_t prefix[4];
#ifndef _DEBUG_
int level;
#endif
}node_t;
/*construct an oridinary tree*/
int construct_tree(val32_t pre[4], val16_t next_hop, int length);
/*initialize an oridinary tree node*/
node_t * initialize_node(node_t *treenode);
void stat();
/*release an oridinary tree node*/
bool release_node(node_t *root);
bool traverse_tree(node_t *node);
static void preorderTraverse(node_t *node);
/*return the bit value of the designed position, and it is from left to right and start from 0*/
bool bit_value(val32_t prefix, int position);
bool bit_value6(val32_t *prefix, int position);
val32_t *copy(val32_t *prefix, val32_t *result);
int compare(val32_t *pre1, val32_t *pre2);
val8_t search_tree(val32_t *prefix);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -