aboutsummaryrefslogtreecommitdiffstats
path: root/packet-q931.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-02-18 07:14:36 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-02-18 07:14:36 +0000
commitff18ce1449f1517cd2b3c4698c4ef45b72e288d6 (patch)
treeb796d218a98add5b38b2a47581bd47c8e72f0aa7 /packet-q931.c
parentb3b528019c284234b75496d3ca8bb975db7ffaee (diff)
From Rolf Fiedler: German ISDN carriers don't supply the seconds in the
date/time IE, so support IE lengths of 5 (no seconds) or 6 (includes seconds). Merge the two AUTHORS and man page entries for him. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10089 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-q931.c')
-rw-r--r--packet-q931.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/packet-q931.c b/packet-q931.c
index 66583f1d1e..bef11a4ffd 100644
--- a/packet-q931.c
+++ b/packet-q931.c
@@ -2,7 +2,7 @@
* Routines for Q.931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-q931.c,v 1.66 2004/01/26 20:48:38 guy Exp $
+ * $Id: packet-q931.c,v 1.67 2004/02/18 07:14:36 guy Exp $
*
* Modified by Andreas Sikkema for possible use with H.323
*
@@ -1612,19 +1612,24 @@ static void
dissect_q931_date_time_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree)
{
- if (len != 6) {
+ if (len == 6) {
+ /*
+ * XXX - what is "year" relative to? Is "month" 0-origin or
+ * 1-origin? Q.931 doesn't say....
+ */
+ proto_tree_add_text(tree, tvb, offset, 6,
+ "Date/time: %02u-%02u-%02u %02u:%02u:%02u",
+ tvb_get_guint8(tvb, offset + 0), tvb_get_guint8(tvb, offset + 1), tvb_get_guint8(tvb, offset + 2),
+ tvb_get_guint8(tvb, offset + 3), tvb_get_guint8(tvb, offset + 4), tvb_get_guint8(tvb, offset + 5));
+ } else if (len == 5) {
+ proto_tree_add_text(tree, tvb, offset, 5,
+ "Date/time: %02u-%02u-%02u %02u:%02u:00",
+ tvb_get_guint8(tvb, offset + 0), tvb_get_guint8(tvb, offset + 1), tvb_get_guint8(tvb, offset + 2),
+ tvb_get_guint8(tvb, offset + 3), tvb_get_guint8(tvb, offset + 4));
+ } else {
proto_tree_add_text(tree, tvb, offset, len,
- "Date/time: length is %d, should be 6\n", len);
- return;
+ "Date/time: length is %d, should be 5 or 6\n", len);
}
- /*
- * XXX - what is "year" relative to? Is "month" 0-origin or
- * 1-origin? Q.931 doesn't say....
- */
- proto_tree_add_text(tree, tvb, offset, 6,
- "Date/time: %02u-%02u-%02u %02u:%02u:%02u",
- tvb_get_guint8(tvb, offset + 0), tvb_get_guint8(tvb, offset + 1), tvb_get_guint8(tvb, offset + 2),
- tvb_get_guint8(tvb, offset + 3), tvb_get_guint8(tvb, offset + 4), tvb_get_guint8(tvb, offset + 5));
}
/*