diff options
author | Sake Blok <sake@euronet.nl> | 2007-09-27 18:36:17 +0000 |
---|---|---|
committer | Sake Blok <sake@euronet.nl> | 2007-09-27 18:36:17 +0000 |
commit | 0e4ae399207d13608030a621d64d30feeb27614f (patch) | |
tree | 5649557441d32cc367f6ccb227aceeb8bc62b8e3 /wiretap/iseries.c | |
parent | f563945bf8b8314ee024eb534f2689a4895a4220 (diff) |
From Martin Warnes:
Attached is a small patch that correct an issue with reading certain IBM
iSeries Comms traces.
Traces where data has been dropped for whatever reason now have the
packet number suffixed with an asterix "*", this causes the current
iSeries wiretap routine to report a "bad" header. The attached patch
simply scans the packet number field and removes any "* characters prior
to scanning, the fact that data may be missing is more than adequately
reported later by current wireshark packet processing.
Regards .. Martin
svn path=/trunk/; revision=23000
Diffstat (limited to 'wiretap/iseries.c')
-rw-r--r-- | wiretap/iseries.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wiretap/iseries.c b/wiretap/iseries.c index 48ecc2c3c2..3c0ed2414e 100644 --- a/wiretap/iseries.c +++ b/wiretap/iseries.c @@ -474,7 +474,7 @@ iseries_parse_packet (wtap * wth, FILE_T fh, { gint64 cur_off; gboolean isValid, isCurrentPacket, IPread, TCPread, isDATA; - int num_items_scanned, line, pktline, buflen; + int num_items_scanned, line, pktline, buflen, i; guint32 pkt_len; int cap_len, pktnum, month, day, year, hr, min, sec, csec; char direction[2], destmac[13], srcmac[13], type[5], ipheader[41], @@ -508,6 +508,10 @@ iseries_parse_packet (wtap * wth, FILE_T fh, iseries_UNICODE_to_ASCII (data, ISERIES_LINE_LENGTH); } /* look for packet header */ + for (i=0; i<8; i++) { + if (strncmp(data+i,"*",1) == 0) + strncpy(data+i," ",1); + } num_items_scanned = sscanf (data, "%6d %1s %6d %d:%d:%d.%d %12s %12s ETHV2 Type: %s", |