aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-06-12 13:03:05 +0000
committerBill Meier <wmeier@newsguy.com>2012-06-12 13:03:05 +0000
commit5b53b81835a64b5219236922c7c91e7d9c3c1efb (patch)
tree3a2269b5c6bbef2abcef5ed5dcab39f59ee7f2b5 /doc
parentf679b8964994e015f01b1f9d3ee4b1a569e469c1 (diff)
Note that calls to "expert" functions should not be under 'if (tree)'.
svn path=/trunk/; revision=43224
Diffstat (limited to 'doc')
-rw-r--r--doc/README.developer30
1 files changed, 16 insertions, 14 deletions
diff --git a/doc/README.developer b/doc/README.developer
index 57aaed46f6..29cc51443d 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -898,20 +898,22 @@ dissect_PROTOABBREV(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
data needed only if you're building the protocol tree, if possible.
Note, however, that you must fill in column information, create
- conversations, reassemble packets, build any other persistent state
- needed for dissection, and call subdissectors regardless of whether
- "tree" is NULL or not. This might be inconvenient to do without
- doing most of the dissection work; the routines for adding items to
- the protocol tree can be passed a null protocol tree pointer, in
- which case they'll return a null item pointer, and
- "proto_item_add_subtree()" returns a null tree pointer if passed a
- null item pointer, so, if you're careful not to dereference any null
- tree or item pointers, you can accomplish this by doing all the
- dissection work. This might not be as efficient as skipping that
- work if you're not building a protocol tree, but if the code would
- have a lot of tests whether "tree" is null if you skipped that work,
- you might still be better off just doing all that work regardless of
- whether "tree" is null or not.
+ conversations, reassemble packets, do calls to "expert" functions,
+ build any other persistent state needed for dissection, and call
+ subdissectors regardless of whether "tree" is NULL or not.
+
+ This might be inconvenient to do without doing most of the
+ dissection work; the routines for adding items to the protocol tree
+ can be passed a null protocol tree pointer, in which case they'll
+ return a null item pointer, and "proto_item_add_subtree()" returns
+ a null tree pointer if passed a null item pointer, so, if you're
+ careful not to dereference any null tree or item pointers, you can
+ accomplish this by doing all the dissection work. This might not
+ be as efficient as skipping that work if you're not building a
+ protocol tree, but if the code would have a lot of tests whether
+ "tree" is null if you skipped that work, you might still be better
+ off just doing all that work regardless of whether "tree" is null
+ or not.
Note also that there is no guarantee, the first time the dissector is
called, whether "tree" will be null or not; your dissector must work