diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-10-12 06:21:15 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-10-12 06:21:15 +0000 |
commit | bacb9d5bae5e1aa9d9144463cd24d8c5adb9398e (patch) | |
tree | 13a576cc1a346d2364a1b13bf493b2efc42a856f /packet-osi.c | |
parent | 10c4bab8e129dc0012e8e341fb74fc725e66fee8 (diff) | |
download | wireshark-bacb9d5bae5e1aa9d9144463cd24d8c5adb9398e.tar.gz wireshark-bacb9d5bae5e1aa9d9144463cd24d8c5adb9398e.tar.bz2 wireshark-bacb9d5bae5e1aa9d9144463cd24d8c5adb9398e.zip |
New proto_tree header_field_info stuff. Header_field_infos now contain
the base for numbers to be displayed in, bitmasks for bitfields, and blurbs
(which are one or two sentences describing the field).
proto_tree_add*() routines now automatically handle bitfields. You tell
it which header field you are adding, and just pass it the value of the
entire field, and the proto_tree routines will do the masking and shifting
for you.
This means that bitfields are more naturally filtered via dfilter now.
Added Phil Techau's support for signed integers in dfilters/proto_tree.
Added the beginning of the SNA dissector. It's not complete, but I'm
committing it now because it has example after example of how to use
bitfields with the new header_field_info struct and proto_tree routines.
It was the impetus to change how header_field_info works.
svn path=/trunk/; revision=815
Diffstat (limited to 'packet-osi.c')
-rw-r--r-- | packet-osi.c | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/packet-osi.c b/packet-osi.c index 83943517a9..5c5bbd737f 100644 --- a/packet-osi.c +++ b/packet-osi.c @@ -1,7 +1,7 @@ /* packet-osi.c * Routines for ISO/OSI network and transport protocol packet disassembly * - * $Id: packet-osi.c,v 1.10 1999/09/18 15:51:31 deniel Exp $ + * $Id: packet-osi.c,v 1.11 1999/10/12 06:20:12 gram Exp $ * Laurent Deniel <deniel@worldnet.fr> * * Ethereal - Network traffic analyzer @@ -1633,27 +1633,48 @@ void proto_register_clnp(void) { static hf_register_info hf[] = { { &hf_clnp_id, - { "Protocol identifier", "clnp.id", FT_UINT8, NULL }}, + { "Protocol identifier", "clnp.id", FT_UINT8, BASE_DEC, NULL, 0x0, + "" }}, + { &hf_clnp_length, - { "Length", "clnp.len", FT_UINT8, NULL }}, + { "Length", "clnp.len", FT_UINT8, BASE_DEC, NULL, 0x0, + "" }}, + { &hf_clnp_version, - { "Version", "clnp.version", FT_UINT8, NULL }}, + { "Version", "clnp.version", FT_UINT8, BASE_DEC, NULL, 0x0, + "" }}, + { &hf_clnp_ttl, - { "TTL", "clnp.ttl", FT_UINT8, NULL }}, + { "TTL", "clnp.ttl", FT_UINT8, BASE_DEC, NULL, 0x0, + "" }}, + { &hf_clnp_type, - { "Type code", "clnp.type", FT_UINT8, NULL }}, + { "Type code", "clnp.type", FT_UINT8, BASE_DEC, NULL, 0x0, + "" }}, + { &hf_clnp_pdu_length, - { "PDU segment length", "clnp.pdu.len", FT_UINT16, NULL }}, + { "PDU segment length", "clnp.pdu.len", FT_UINT16, BASE_DEC, NULL, 0x0, + "" }}, + { &hf_clnp_checksum, - { "Checksum", "clnp.checksum",FT_UINT16, NULL }}, + { "Checksum", "clnp.checksum",FT_UINT16, BASE_DEC, NULL, 0x0, + "" }}, + { &hf_clnp_dest_length, - { "Destination address length", "clnp.dsap.len", FT_UINT8, NULL }}, + { "Destination address length", "clnp.dsap.len", FT_UINT8, BASE_DEC, NULL, 0x0, + "" }}, + { &hf_clnp_dest, - { "Destination address", "clnp.dsap", FT_BYTES, NULL }}, + { "Destination address", "clnp.dsap", FT_BYTES, BASE_NONE, NULL, 0x0, + "" }}, + { &hf_clnp_src_length, - { "Source address length","clnp.ssap.len",FT_UINT8, NULL }}, + { "Source address length","clnp.ssap.len",FT_UINT8, BASE_DEC, NULL, 0x0, + "" }}, + { &hf_clnp_src, - { "Source address", "clnp.ssap", FT_BYTES, NULL }}, + { "Source address", "clnp.ssap", FT_BYTES, BASE_NONE, NULL, 0x0, + "" }}, }; proto_clnp = proto_register_protocol("ISO CLNP", "clnp"); |