aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/lanalyzer.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-01-07 04:50:21 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-01-07 04:50:21 +0000
commit29c3d2499a778065ef9a7b06e3fa1c4e61a6dc9d (patch)
tree90bee0bac4d52f8000ba39871be423cbae8f0cea /wiretap/lanalyzer.c
parent621dd4cda9b82b559aa52e2516685ff779794886 (diff)
The year in a LANalyzer capture's trace summary record is a 2-byte year
number. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9583 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/lanalyzer.c')
-rw-r--r--wiretap/lanalyzer.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/wiretap/lanalyzer.c b/wiretap/lanalyzer.c
index d3da6f1493..dff4ddf008 100644
--- a/wiretap/lanalyzer.c
+++ b/wiretap/lanalyzer.c
@@ -1,6 +1,6 @@
/* lanalyzer.c
*
- * $Id: lanalyzer.c,v 1.44 2004/01/05 17:33:27 ulfl Exp $
+ * $Id: lanalyzer.c,v 1.45 2004/01/07 04:50:21 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -131,7 +131,8 @@ int lanalyzer_open(wtap *wth, int *err)
char summary[210];
guint16 board_type, mxslc;
guint16 record_type, record_length;
- guint8 cr_day, cr_month, cr_year;
+ guint8 cr_day, cr_month;
+ guint16 cr_year;
struct tm tm;
errno = WTAP_ERR_CANT_READ;
@@ -211,17 +212,14 @@ int lanalyzer_open(wtap *wth, int *err)
*/
cr_day = summary[0];
cr_month = summary[1];
- cr_year = (guint8) pletohs(&summary[2]);
+ cr_year = pletohs(&summary[2]);
/*g_message("Day %d Month %d Year %d (%04X)", cr_day, cr_month,
cr_year, cr_year);*/
/* Get capture start time. I learned how to do
* this from Guy's code in ngsniffer.c
*/
- /* this strange year offset is not in the
- * lanalyzer file format documentation, but it
- * works. */
- tm.tm_year = cr_year - (1900 - 1792);
+ tm.tm_year = cr_year - 1900;
tm.tm_mon = cr_month - 1;
tm.tm_mday = cr_day;
tm.tm_hour = 0;