00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TABLE_H_
00017 #define TABLE_H_
00018
00019 typedef struct w_node_s w_node_t;
00020 typedef struct w_table_s w_table_t;
00021
00022 struct w_node_s {
00023 unsigned long int key;
00024 char *name;
00025 w_node_t *next;
00026 w_node_t *prev;
00027 w_table_t *table;
00028 void *data;
00029 };
00030
00031 struct w_table_s {
00032 w_table_t *table;
00033 w_node_t *node;
00034 };
00035
00036 int table_add (w_table_t *table, unsigned int tlen, unsigned int mask, char *name, void *data);
00037 w_node_t * table_get_node (w_table_t *table, unsigned int tlen, unsigned int mask, char *name);
00038 void * table_get_data (w_table_t *table, unsigned int tlen, unsigned int mask, char *name);
00039 int table_del (w_table_t *table, unsigned int tlen, unsigned int mask, char *name);
00040 int table_print (w_table_t *table, unsigned int len);
00041 int table_init (w_table_t **table, unsigned int size);
00042 int table_uninit (w_table_t *table, unsigned int len);
00043
00044 #endif