diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-03-11 13:21:41 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-03-11 13:21:41 +0000 |
commit | aba18252dbef7c0d4104f9925eae7576ca24a664 (patch) | |
tree | a750d93168947856b8c15ae05590577fcf65e90d /doc/README.binarytrees | |
parent | 27de4cfd3916b5c3ca3f1c294ba21faef1d7e682 (diff) |
document the char *name parameter to the create tree functions
svn path=/trunk/; revision=17588
Diffstat (limited to 'doc/README.binarytrees')
-rw-r--r-- | doc/README.binarytrees | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/doc/README.binarytrees b/doc/README.binarytrees index 07b4270646..dba93db76b 100644 --- a/doc/README.binarytrees +++ b/doc/README.binarytrees @@ -27,17 +27,22 @@ Please see README.malloc for a description of EmPhereal and SEasonal storage. 2. Basic Usage For most users it will be sufficiant to only know and use three functions -se_tree_t *se_tree_create(int type); +se_tree_t *se_tree_create(int type, char *name); void se_tree_insert32(se_tree_t *se_tree, guint32 key, void *data); void *se_tree_lookup32(se_tree_t *se_tree, guint32 key); -2.1 se_tree_create(int type); +2.1 se_tree_create(int type, char *name); se_tree_create() is used to initialize a tree that will be automatically cleared and reset everytime ethereal is resetting all SEasonal storage, that is every time you load a new capture file into ethereal or when you rescan the entire capture file from scratch. +Name is just a literal text string and serves no other purpose than making +debugging of the trees easier. Specify a name here that uniquely identifies +both the protocol you create the tree for and its purpose. + + This function is most likely called once from your proto_register_<yourprotocol>() function. @@ -48,7 +53,7 @@ static se_tree_t *tcp_pdu_time_table = NULL; ... void proto_register_...(void) { ... - tcp_pdu_time_table=se_tree_create(SE_TREE_TYPE_RED_BLACK); + tcp_pdu_time_table=se_tree_create(SE_TREE_TYPE_RED_BLACK, "PROTO_my_tree"); ... } @@ -130,7 +135,7 @@ Simple as that, can it be easier? This will list some of the more unconventional and hopefully rarely used functions. -3.1 se_tree_create_non_persistent(int type); +3.1 se_tree_create_non_persistent(int type, char *name); Sometimes you dont want a tree that is automatically reset to become an empty tree. You might want a tree that is completely destroyed once the next capture file is read and even the pointer to the tree itself becomes invalid. |