Series III packets appear to have an FCS at the end.

Change-Id: I9c4ba78cba4cb32a1473c6b8573880f2b56f1fde
Reviewed-on: https://code.wireshark.org/review/21417
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-04-29 19:42:18 -07:00
parent bc7452d1d9
commit 5c1cf9d46a
2 changed files with 22 additions and 21 deletions

View File

@ -2084,10 +2084,10 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree
offset++;
/* New pieces of lines for
* #802.11 radio information#
* Referred from code changes done for old FPGA version
* **/
phdr.fcs_len = 0;
* #802.11 radio information#
* Referred from code changes done for old FPGA version
* **/
phdr.fcs_len = (log_mode == 3) ? 0 : 4;
switch (plcp_type) //To check 5 types of PLCP(NULL, CCK, OFDM, HT & VHT)
{
case 0:

View File

@ -1979,34 +1979,35 @@ static gboolean vwr_read_s3_W_rec(vwr_t *vwr, struct wtap_pkthdr *phdr,
phyRate = (guint16)(getRate(plcp_type, mcs_index, radioflags, nss) * 10);
/* Calculation of Data rate ends*/
/*
* The MSDU length includes the FCS.
*
* The packet data does *not* include the FCS - it's just 4 bytes
* of junk - so we have to remove it.
*
* We'll be stripping off an FCS (?), so make sure we have at
* least 4 octets worth of FCS.
*/
if (actual_octets < 4) {
*err_info = g_strdup_printf("vwr: Invalid data length %u (too short to include 4 bytes of FCS)",
actual_octets);
*err = WTAP_ERR_BAD_FILE;
return FALSE;
}
/* 'ver_fpga' is the 2nd Octet of each frame.
* msb/lsb nibble indicates log mode/fpga version respectively.
* where log mode = 0 is normal capture and 1 is reduced capture,
* lsb nibble is set to 1 always as this function is applicable for only FPGA version >= 48
*/
if (log_mode == 3) {
/*
* The MSDU length includes the FCS.
*
* The packet data does *not* include the FCS - it's just 4 bytes
* of junk - so we have to remove it.
*
* We'll be stripping off an FCS (?), so make sure we have at
* least 4 octets worth of FCS.
*
* XXX - is the FCS actually present here, as it appears to be
* if log_mode isn't 3?
*/
if (actual_octets < 4) {
*err_info = g_strdup_printf("vwr: Invalid data length %u (too short to include 4 bytes of FCS)",
actual_octets);
*err = WTAP_ERR_BAD_FILE;
return FALSE;
}
if (actual_octets > 4 && (frame_size >= (int) msdu_length))
actual_octets -=4;
ver_fpga = 0x11;
}
else {
if (actual_octets > 4)
actual_octets -= 4;
ver_fpga = 0x01;
}