summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-07-14 03:23:50 +0000
committerGuy Harris <guy@alum.mit.edu>2000-07-14 03:23:50 +0000
commit9b652d0958e6297593c6346bfb2b75eb718e79a8 (patch)
tree6e71a8f3800e233240420aa472fb3245c09e9c71
parente903ea567708c851e6dac045a3a8b8b87f4f27ed (diff)
downloadwireshark-9b652d0958e6297593c6346bfb2b75eb718e79a8.tar.gz
Enhancements/fixed to OSPF from Michael Rozhavsky:
1) DD flags in Database Description packets were translated incorrectly; 2) Summary-LSA metric was not displayed. svn path=/trunk/; revision=2136
-rw-r--r--AUTHORS4
-rw-r--r--doc/ethereal.pod.template1
-rw-r--r--packet-ospf.c12
3 files changed, 14 insertions, 3 deletions
diff --git a/AUTHORS b/AUTHORS
index 29faeae890..2f95520769 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -335,6 +335,10 @@ Mark Clayton <clayton@shore.net> {
Support for capturing on ATM interfaces on Linux
}
+Michael Rozhavsky <mike@tochna.technion.ac.il> {
+ OSPF enhancements
+}
+
Alain Magloire <alainm@rcsm.ece.mcgill.ca> was kind enough to
give his permission to use his version of snprintf.c.
diff --git a/doc/ethereal.pod.template b/doc/ethereal.pod.template
index 62c918f107..2e6dab4d61 100644
--- a/doc/ethereal.pod.template
+++ b/doc/ethereal.pod.template
@@ -902,6 +902,7 @@ B<http://ethereal.zing.org>.
Michael Tuexen <Michael.Tuexen@icn.siemens.de>
Stefan Raab <stefan.raab@nextel.com>
Mark Clayton <clayton@shore.net>
+ Michael Rozhavsky <mike@tochna.technion.ac.il>
Alain Magloire <alainm@rcsm.ece.mcgill.ca> was kind enough to give his
permission to use his version of snprintf.c.
diff --git a/packet-ospf.c b/packet-ospf.c
index b0fe9556ab..52a0418a81 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.24 2000/05/31 05:07:28 guy Exp $
+ * $Id: packet-ospf.c,v 1.25 2000/07/14 03:23:40 guy Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@@ -308,8 +308,8 @@ dissect_ospf_db_desc(const u_char *pd, int offset, frame_data *fd, proto_tree *t
flags_offset=0;
if(( ospf_dbd.flags & OSPF_DBD_FLAG_MS ) == OSPF_DBD_FLAG_MS){
- strcpy( (char *)(flags + flags_offset), "_I_");
- flags_offset+=1;
+ strcpy( (char *)(flags + flags_offset), "_MS_");
+ flags_offset+=4;
}
if(( ospf_dbd.flags & OSPF_DBD_FLAG_M ) == OSPF_DBD_FLAG_M){
strcpy((char *) (flags + flags_offset), "_M_");
@@ -660,6 +660,7 @@ dissect_ospf_lsa(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
/* data structures for the summary and ASBR LSAs */
e_ospf_summary_lsa summary_lsa;
+ guint32 metric;
/* data structures for the AS-External LSA */
e_ospf_asexternal_lsa asext_lsa;
@@ -828,6 +829,11 @@ dissect_ospf_lsa(const u_char *pd, int offset, frame_data *fd, proto_tree *tree,
memcpy(&summary_lsa, &pd[offset], sizeof(e_ospf_summary_lsa));
proto_tree_add_text(ospf_lsa_tree, NullTVB, offset, 4, "Netmask: %s",
ip_to_str((guint8 *) &(summary_lsa.network_mask)));
+ /* this routine returns only the TOS 0 metric (even if there are more TOS metrics) */
+ memcpy(&metric, &pd[offset+4], 4);
+ metric = ntohl(metric) & 0x00ffffff ;
+ proto_tree_add_text(ospf_lsa_tree, NullTVB, offset + 5, 3, "Metric: %d", metric);
+
/* returns only the TOS 0 metric (even if there are more TOS metrics) */
break;
case(OSPF_LSTYPE_ASEXT):