Comment # 14
on bug 9418
from Abhik Sarkar
(In reply to comment #13)
> I just saw that all subfunctions do
>
> proto_tree_add_item(tree, hf_kt_magic,...)
>
> first, that could be moved to dissect_kt()...
Thanks for the corrections and commit, Martin.
Adding the magic item was done in dissect_kt() in the previous version of the
patch. However, I consciously moved it into the individual sub-functions
because while the magic can be determined in dissect_kt(), I can't figure out
whether the it is a request or a response until further dissection is done.
Since I wanted (generated) type field to overlap with the magic byte, I thought
it best to move the adding of the magic item into the function. That way the
offset is not moved ahead in dissect_kt() and then either moved back or forced
to 0 in the sub-function.
This way seemed cleaner to me and also (though this is only a hunch) is less
likely to cause problems when implementing reassembly.
You are receiving this mail because:
- You are watching all bug changes.