Changeset 3ec29a9 for libpacketdump


Ignore:
Timestamp:
03/27/07 15:25:17 (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:
02bd77e
Parents:
1b9272f
Message:

Decode new Radiotap fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpacketdump/link_15.c

    rf0c639b r3ec29a9  
    6161
    6262        if (rtap->it_present & (1 << TRACE_RADIOTAP_FLAGS)) {
    63                 printf(" Radiotap: Flags = %#04x\n", *p);
     63                printf(" Radiotap: Flags = 0x%02x\n", *p);
    6464                p += sizeof (uint8_t);
    6565                rtap_real_len += sizeof(uint8_t);
     
    7575        if (rtap->it_present & (1 << TRACE_RADIOTAP_CHANNEL)) {
    7676                ALIGN_NATURAL_16(p,s,rtap_real_len);
    77                 printf(" Radiotap: Freq = %u MHz, ChanFlags: %#06x\n", bswap_le_to_host16(*((uint16_t *)p)),
     77                printf(" Radiotap: Freq = %u MHz, ChanFlags: 0x%04x\n", bswap_le_to_host16(*((uint16_t *)p)),
    7878                                *(((uint16_t *)p) + 1));
    7979                p += sizeof (uint32_t);
     
    149149        }
    150150
     151        if (rtap->it_present & (1 << TRACE_RADIOTAP_RX_FLAGS)) {
     152                ALIGN_NATURAL_16(p,s,rtap_real_len);
     153                printf(" Radiotap: RX Flags = 0x%04x\n", *((uint16_t *)p));
     154                p += sizeof (uint16_t);
     155                rtap_real_len += sizeof(uint16_t);
     156        }
     157
     158        if (rtap->it_present & (1 << TRACE_RADIOTAP_TX_FLAGS)) {
     159                ALIGN_NATURAL_16(p,s,rtap_real_len);
     160                printf(" Radiotap: TX Flags = 0x%04x\n", *((uint16_t *)p));
     161                p += sizeof (uint16_t);
     162                rtap_real_len += sizeof(uint16_t);
     163        }
     164
     165        if (rtap->it_present & (1 << TRACE_RADIOTAP_RTS_RETRIES)) {
     166                printf(" Radiotap: RTS Retries = %u\n", *p);
     167                p += sizeof (uint8_t);
     168                rtap_real_len += sizeof(uint8_t);
     169        }
     170
     171        if (rtap->it_present & (1 << TRACE_RADIOTAP_DATA_RETRIES)) {
     172                printf(" Radiotap: Data Retries = %u\n", *p);
     173                p += sizeof (uint8_t);
     174                rtap_real_len += sizeof(uint8_t);
     175        }
     176
    151177        if (rtap_real_len != rtap_len)
    152178                printf(" Radiotap: WARNING: Header contains un-decoded fields.\n");
Note: See TracChangeset for help on using the changeset viewer.