aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/iseries.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2008-05-28 15:01:16 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2008-05-28 15:01:16 +0000
commit3251c05742a014c42a36b43ca6f6ade2f18362e6 (patch)
tree3d62177838c6844ff5bf595c37e25d4acee76dbf /wiretap/iseries.c
parentc0353af700ee16a403c87e8a4aa3de63937712a1 (diff)
Always set pkt_encap, not just when we have the start date. This bug, around
since rev 17756, meant that attempts to read iSeries files would fail in the "Make sure it [pkt_encap] is not WTAP_ENCAP_PER_PACKET" assertion in wtap_read(). Also set file_encap to WTAP_ENCAP_ETHERNET (instead of WTAP_ENCAP_PER_PACKET) since it seems that all the packets in iSeries files are Ethernet (or at least this module currently only supports Ethernet). svn path=/trunk/; revision=25388
Diffstat (limited to 'wiretap/iseries.c')
-rw-r--r--wiretap/iseries.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/wiretap/iseries.c b/wiretap/iseries.c
index 50dc412c8a..ed66f54f4c 100644
--- a/wiretap/iseries.c
+++ b/wiretap/iseries.c
@@ -195,7 +195,7 @@ iseries_open (wtap * wth, int *err, gchar ** err_info _U_)
return -1;
}
wth->data_offset = 0;
- wth->file_encap = WTAP_ENCAP_PER_PACKET;
+ wth->file_encap = WTAP_ENCAP_ETHERNET;
wth->file_type = WTAP_FILE_ISERIES;
wth->snapshot_length = 0;
wth->subtype_read = iseries_read;
@@ -227,7 +227,7 @@ iseries_open (wtap * wth, int *err, gchar ** err_info _U_)
return -1;
}
wth->data_offset = 0;
- wth->file_encap = WTAP_ENCAP_PER_PACKET;
+ wth->file_encap = WTAP_ENCAP_ETHERNET;
wth->file_type = WTAP_FILE_ISERIES_UNICODE;
wth->snapshot_length = 0;
wth->subtype_read = iseries_read;
@@ -570,11 +570,12 @@ iseries_parse_packet (wtap * wth, FILE_T fh,
{
wth->phdr.ts.nsecs = csec * 10000;
}
- wth->phdr.caplen = cap_len;
- wth->phdr.pkt_encap = WTAP_ENCAP_ETHERNET;
- pseudo_header->eth.fcs_len = -1;
}
+ wth->phdr.caplen = cap_len;
+ wth->phdr.pkt_encap = WTAP_ENCAP_ETHERNET;
+ pseudo_header->eth.fcs_len = -1;
+
/*
* Start Reading packet contents
*/