Changeset f0c639b for lib/format_pcap.c


Ignore:
Timestamp:
03/26/07 11:47:31 (14 years ago)
Author:
Scott Raynel <smr26@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
38f9537
Parents:
be22b51
Message:
  • Remove trace_get_wireless_fcs as it is no longer part of the Radiotap standard.
  • Update trace_get_wire_length to account for the presence (or absence) of FCS bytes at the end of wireless frames. (only pcap and pcapfile for now)
  • Update radiotap libpacketdump decoder to no longer output non-standard FCS field.
  • Update test-wireless to ensure new length functions work correctly.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_pcap.c

    rd5a27e8 rf0c639b  
    513513        if (packet->type==pcap_dlt_to_rt(TRACE_DLT_EN10MB))
    514514                return pcapptr->len+4; /* Include the missing FCS */
    515         else
    516                 return pcapptr->len;
     515        else if (packet->type==pcap_dlt_to_rt(TRACE_DLT_IEEE802_11_RADIO)) {
     516                /* If the packet is Radiotap and the flags field indicates
     517                 * that the FCS is not included in the 802.11 frame, then
     518                 * we need to add 4 to the wire-length to account for it.
     519                 */
     520                uint16_t flags;
     521                trace_get_wireless_flags(trace_get_link(packet), trace_get_link_type(packet), &flags);
     522                if ((flags & TRACE_RADIOTAP_F_FCS) == 0)
     523                        return pcapptr->len + 4;
     524        }
     525        return pcapptr->len;
    517526}
    518527
Note: See TracChangeset for help on using the changeset viewer.