aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-12-23 23:06:50 +0000
committerGuy Harris <guy@alum.mit.edu>2000-12-23 23:06:50 +0000
commit57e4216961a5d0bd4f73250e2f4171a25aa176e2 (patch)
tree11441d51eee59c5e1a87db90bc5e28150267d7c1
parent03d721afc2e7e5584608d7690ad761c3d3f26ceb (diff)
Report the holding time of a CLNP packet, in seconds, as seconds plus
fractions of a second (the resolution is 1/2 second). In the bitfield breakdown of the flags/type field of a CLNP PDU, report the PDU type as a name rather than as an abbreviation. svn path=/trunk/; revision=2776
-rw-r--r--packet-clnp.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/packet-clnp.c b/packet-clnp.c
index 75306b080a..82bfa8910f 100644
--- a/packet-clnp.c
+++ b/packet-clnp.c
@@ -1,7 +1,7 @@
/* packet-clnp.c
* Routines for ISO/OSI network and transport protocol packet disassembly
*
- * $Id: packet-clnp.c,v 1.18 2000/12/23 21:40:22 guy Exp $
+ * $Id: packet-clnp.c,v 1.19 2000/12/23 23:06:50 guy Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@@ -100,7 +100,7 @@ static int hf_clnp_src = -1;
#define ERQ_NPDU 0x1E
#define ERP_NPDU 0x1F
-static const value_string npdu_type_vals[] = {
+static const value_string npdu_type_abbrev_vals[] = {
{ DT_NPDU, "DT" },
{ MD_NPDU, "MD" },
{ ER_NPDU, "ER" },
@@ -109,6 +109,15 @@ static const value_string npdu_type_vals[] = {
{ 0, NULL }
};
+static const value_string npdu_type_vals[] = {
+ { DT_NPDU, "Data" },
+ { MD_NPDU, "Multicast Data" },
+ { ER_NPDU, "Error Report" },
+ { ERQ_NPDU, "Echo Request" },
+ { ERP_NPDU, "Echo Response" },
+ { 0, NULL }
+};
+
/* field position */
#define P_CLNP_PROTO_ID 0
@@ -1608,12 +1617,12 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cnf_ttl = tvb_get_guint8(tvb, P_CLNP_TTL);
proto_tree_add_uint_format(clnp_tree, hf_clnp_ttl, tvb, P_CLNP_TTL, 1,
cnf_ttl,
- "Holding Time : %u (%u secs)",
- cnf_ttl, cnf_ttl / 2);
+ "Holding Time : %u (%u.%u secs)",
+ cnf_ttl, cnf_ttl / 2, (cnf_ttl % 2) * 5);
}
cnf_type = tvb_get_guint8(tvb, P_CLNP_TYPE);
- pdu_type_string = val_to_str(cnf_type & CNF_TYPE, npdu_type_vals,
+ pdu_type_string = val_to_str(cnf_type & CNF_TYPE, npdu_type_abbrev_vals,
"Unknown (0x%02x)");
flag_string[0] = '\0';
if (cnf_type & CNF_SEG_OK)