Factored out CAEX and PINF dissection to separate functions, added fields #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have revised the Base layer, CAEX, and PINF dissections to provide ProtoFields where they seem to make sense. This means that display filters can access fields within CITP messages which is very useful.
In the process, I have moved the PINF and CAEX dissections to separate functions to ease revision. Doing this should also simplify a future enhancement I have in mind, which is adding support for compound messages. At least some CITP implementations will send multiple CITP messages in a single packet, and the dissector currently does not support this. Having different layer dissectors as separate functions that take a slice of the buffer should make adding compound message support a bit easier and cleaner.
Ideally the rest of the existing layer dissectors would be factored into different functions as well, but I have not begun this as I don't have anything to test against and don't want to break existing functionality. This PR can at least be used as a template for the other layers.
If anyone has Pcaps of CITP traffic using other layers it would be helpful to build up a test corpus.