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/link_wireless.c

    rd5a27e8 rf0c639b  
    156156        if (field == TRACE_RADIOTAP_DB_ANTNOISE)
    157157                return (void *) p;
     158        /*
    158159        if (bswap_le_to_host32(rtap->it_present) & (1 << TRACE_RADIOTAP_DB_ANTNOISE))
    159160                p+= sizeof (uint8_t);
    160 
    161         if (field == TRACE_RADIOTAP_FCS)
    162                 ALIGN_NATURAL_32(p,s);
    163         return (void *)p;
     161        */
    164162
    165163        /* Unknown field */
     
    198196 * for now. Maybe it will be included in the API later if it becomes useful
    199197 * and we come up with a suitable abstraction.
    200  */
    201 static
     198 * This function isn't marked static as the various format modules need to
     199 * access it for get_wire_length(). It's not meant to be exported though.
     200 */
    202201bool trace_get_wireless_flags(void *link,
    203202                libtrace_linktype_t linktype, uint8_t *flags)
     
    591590}
    592591
    593 DLLEXPORT bool trace_get_wireless_fcs(void *link,
    594                 libtrace_linktype_t linktype, uint32_t *fcs)
    595 {
    596         uint32_t *p;
    597         void *l;
    598         uint16_t type;
    599 
    600         if (link == NULL || fcs == NULL) return false;
    601         switch (linktype) {
    602                 case TRACE_TYPE_80211_RADIO:
    603                         if ((p = (uint32_t *) trace_get_radiotap_field(link,
    604                                                         TRACE_RADIOTAP_FCS))) {
    605                                 *fcs = bswap_le_to_host32(*p);
    606                                 return true;
    607                         } else break;
    608                 case TRACE_TYPE_LINUX_SLL:
    609                         l = trace_get_payload_from_linux_sll(link, &type, NULL);
    610                         return trace_get_wireless_fcs(l, arphrd_type_to_libtrace(type), fcs);
    611                 default:
    612                         return false;
    613         }
    614         return false;
    615 }
    616 
Note: See TracChangeset for help on using the changeset viewer.