diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-05-13 20:46:37 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-05-13 20:46:37 +0000 |
commit | a92af3868dc04904daf6148b1b8368bdbddb9572 (patch) | |
tree | 9792c57b1a9026551824ab38a8f1c3d1578fd03d /packet-ospf.c | |
parent | 0b22c885cbfea335406011055a00d33457cd76fb (diff) | |
download | wireshark-a92af3868dc04904daf6148b1b8368bdbddb9572.tar.gz wireshark-a92af3868dc04904daf6148b1b8368bdbddb9572.tar.bz2 wireshark-a92af3868dc04904daf6148b1b8368bdbddb9572.zip |
From Motonori Shindo:
1) OSPF Link State Request packet in V2 has 4-octets LS type field
whereas 2-octets MBZ and 2-octets LS type field in V3.
2) 6th argument to proto_tree_add_item() has to be boolean value.
svn path=/trunk/; revision=5456
Diffstat (limited to 'packet-ospf.c')
-rw-r--r-- | packet-ospf.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/packet-ospf.c b/packet-ospf.c index 726b2456ee..7e77943d02 100644 --- a/packet-ospf.c +++ b/packet-ospf.c @@ -2,7 +2,7 @@ * Routines for OSPF packet disassembly * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-ospf.c,v 1.64 2002/05/11 22:22:11 guy Exp $ + * $Id: packet-ospf.c,v 1.65 2002/05/13 20:46:37 guy Exp $ * * At this time, this module is able to analyze OSPF * packets as specified in RFC2328. MOSPF (RFC1584) and other @@ -800,19 +800,17 @@ dissect_ospf_ls_req(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version) "Link State Request"); ospf_lsr_tree = proto_item_add_subtree(ti, ett_ospf_lsr); - reserved = tvb_get_guint8(tvb, offset); - proto_tree_add_text(ospf_lsr_tree, tvb, offset, 1, - (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"), - reserved); - switch ( version ) { case OSPF_VERSION_2: ls_type = tvb_get_ntohl(tvb, offset); proto_tree_add_item(ospf_lsr_tree, ospf_filter[OSPFF_LS_TYPE], - tvb, offset, 4, ls_type); + tvb, offset, 4, FALSE); break; case OSPF_VERSION_3: + reserved = tvb_get_ntohs(tvb, offset); + proto_tree_add_text(ospf_lsr_tree, tvb, offset, 2, + (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"), reserved); ls_type = tvb_get_ntohs(tvb, offset+2); proto_tree_add_text(ospf_lsr_tree, tvb, offset+2, 2, "LS Type: %s (0x%04x)", val_to_str(ls_type, v3_ls_type_vals, "Unknown"), @@ -1205,7 +1203,7 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, tvb_get_ntohs(tvb, offset)); dissect_ospf_options(tvb, offset + 2, ospf_lsa_tree, OSPF_VERSION_2); proto_tree_add_item(ospf_lsa_tree, ospf_filter[OSPFF_LS_TYPE], tvb, - offset + 3, 1, ls_type); + offset + 3, 1, FALSE); proto_tree_add_item_hidden(ospf_lsa_tree, ospf_filter[ospf_ls_type_to_filter(ls_type)], tvb, offset + 3, 1, FALSE); |