diff options
author | Laurent Deniel <laurent.deniel@free.fr> | 1999-10-16 08:37:30 +0000 |
---|---|---|
committer | Laurent Deniel <laurent.deniel@free.fr> | 1999-10-16 08:37:30 +0000 |
commit | 677dd209392234bf1c776046efcc940bed849cff (patch) | |
tree | 175bd34510ca0c0a6bcdef897dbc226427b4364b /packet-arp.c | |
parent | 969a2d2c74754c6a876d5e0ffdfbd0c0da30a263 (diff) |
- replace proto_tree_add_item_format by proto_tree_add_item.
- fix bug (hf_arp_proto_type was used in place of hr_arp_proto_size).
svn path=/trunk/; revision=851
Diffstat (limited to 'packet-arp.c')
-rw-r--r-- | packet-arp.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/packet-arp.c b/packet-arp.c index c2c8116a09..d732a317e2 100644 --- a/packet-arp.c +++ b/packet-arp.c @@ -1,7 +1,7 @@ /* packet-arp.c * Routines for ARP packet disassembly * - * $Id: packet-arp.c,v 1.19 1999/10/12 06:20:01 gram Exp $ + * $Id: packet-arp.c,v 1.20 1999/10/16 08:37:30 deniel Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -265,14 +265,10 @@ dissect_arp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { "Protocol type: %s", val_to_str(ar_pro, etype_vals, "Unknown (0x%04x)")); - proto_tree_add_item_format(arp_tree, hf_arp_hard_size, offset + AR_HLN, 1, - ar_hln, - "Hardware size: %d", - ar_hln); - proto_tree_add_item_format(arp_tree, hf_arp_proto_type, offset + AR_PLN, 1, - ar_pln, - "Protocol size: %d", - ar_pln); + proto_tree_add_item(arp_tree, hf_arp_hard_size, offset + AR_HLN, 1, + ar_hln); + proto_tree_add_item(arp_tree, hf_arp_proto_size, offset + AR_PLN, 1, + ar_pln); proto_tree_add_item_format(arp_tree, hf_arp_opcode, offset + AR_OP, 2, ar_op, "Opcode: 0x%04x (%s)", @@ -297,39 +293,48 @@ proto_register_arp(void) { static hf_register_info hf[] = { { &hf_arp_hard_type, - { "Hardware type", "arp.hw.type", FT_UINT16, BASE_HEX, NULL, 0x0, + { "Hardware type", "arp.hw.type", + FT_UINT16, BASE_HEX, NULL, 0x0, "" }}, { &hf_arp_proto_type, - { "Protocol type", "arp.proto.type",FT_UINT16, BASE_HEX, NULL, 0x0, + { "Protocol type", "arp.proto.type", + FT_UINT16, BASE_HEX, NULL, 0x0, "" }}, { &hf_arp_hard_size, - { "Hardware size", "arp.hw.size", FT_UINT8, BASE_DEC, NULL, 0x0, + { "Hardware size", "arp.hw.size", + FT_UINT8, BASE_DEC, NULL, 0x0, "" }}, { &hf_arp_proto_size, - { "Protocol size", "arp.proto.size",FT_UINT8, BASE_DEC, NULL, 0x0, + { "Protocol size", "arp.proto.size", + FT_UINT8, BASE_DEC, NULL, 0x0, "" }}, { &hf_arp_opcode, - { "Opcode", "arp.opcode", FT_UINT16, BASE_HEX, NULL, 0x0, + { "Opcode", "arp.opcode", + FT_UINT16, BASE_HEX, NULL, 0x0, "" }}, { &hf_arp_src_ether, - { "Sender hardware address", "arp.src.hw", FT_BYTES, BASE_NONE, NULL, 0x0, + { "Sender hardware address", "arp.src.hw", + FT_BYTES, BASE_NONE, NULL, 0x0, "" }}, { &hf_arp_src_proto, - { "Sender protocol address", "arp.src.proto", FT_BYTES, BASE_NONE, NULL, 0x0, + { "Sender protocol address", "arp.src.proto", + FT_BYTES, BASE_NONE, NULL, 0x0, "" }}, { &hf_arp_dst_ether, - { "Target hardware address", "arp.dst.hw", FT_BYTES, BASE_NONE, NULL, 0x0, + { "Target hardware address", "arp.dst.hw", + FT_BYTES, BASE_NONE, NULL, 0x0, "" }}, { &hf_arp_dst_proto, - { "Target protocol address", "arp.dst.proto", FT_BYTES, BASE_NONE, NULL, 0x0, + { "Target protocol address", "arp.dst.proto", + FT_BYTES, BASE_NONE, NULL, 0x0, "" }} }; |