diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-10-11 01:28:22 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-10-11 01:28:22 +0000 |
commit | 6deff9455571cbc16599c33d72188b41919b8d21 (patch) | |
tree | 2dc8a5de83f6e4456a894de3adf7460379d1ddfc /epan/proto.h | |
parent | 0b9a803e45dc12391c2be27bfca960ae851c8cf6 (diff) |
Add comments indicating that the DISSECTOR_ASSERT() routines should not be used to report malformed packets.
svn path=/trunk/; revision=34466
Diffstat (limited to 'epan/proto.h')
-rw-r--r-- | epan/proto.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/proto.h b/epan/proto.h index 08e515d633..3e67b7a33e 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -112,6 +112,10 @@ typedef struct _protocol protocol_t; * throws a DissectorError exception, with the assertion failure * message as a parameter, so that it can show up in the protocol tree. * + * NOTE: this should only be used to detect bugs in the dissector (e.g., logic + * conditions that shouldn't happen). It should NOT be used for showing + * that a packet is malformed. For that, use expert_infos instead. + * * @param expression expression to test in the assertion */ #define DISSECTOR_ASSERT(expression) \ @@ -127,6 +131,11 @@ typedef struct _protocol protocol_t; /** Same as DISSECTOR_ASSERT(), but will throw DissectorError exception * unconditionally, much like GLIB's g_assert_not_reached works. + * + * NOTE: this should only be used to detect bugs in the dissector (e.g., logic + * conditions that shouldn't happen). It should NOT be used for showing + * that a packet is malformed. For that, use expert_infos instead. + * */ #define DISSECTOR_ASSERT_NOT_REACHED() \ (REPORT_DISSECTOR_BUG( \ |