Wireshark mailing list archives
basic questions about writing dissectors
From: Martin Kaiser <lists () kaiser cx>
Date: Sun, 26 Feb 2012 15:20:13 +0100
Dear all, I'm playing with some enhancements to my dissectors, some basic questions came up: Is it possible to add an element in the packet tree that has an hf entry and can be filtered but does not have a corresponding tvb? I'm looking at getting info from a circuit and add this to the tree as a filterable element. For now, I read from the circuit, create a tvb, add another data source for the tvb and dissect it. I was wondering if there's a cleaner solution without adding a data source. (It looks like a tvb that's not part of the packet itself needs a new data source). It seems that a lot of dissectors use pinfo->fd->num without a previous check "if (pinfo && pinfo->fd)". Is it safe to do so? For se_malloc(), do I have to check the return value for NULL? I recall that for g_malloc(), there's no need for a NULL check, the programs is terminated when there's no memory. Thanks in advance for your help, Martin ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- basic questions about writing dissectors Martin Kaiser (Feb 26)
- Re: basic questions about writing dissectors Joerg Mayer (Feb 26)
- Re: basic questions about writing dissectors Martin Kaiser (Feb 26)
- Re: basic questions about writing dissectors Joerg Mayer (Feb 26)