Changeset 1515e07


Ignore:
Timestamp:
09/20/06 10:50:45 (15 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:
6187a46
Parents:
e5222e1
Message:

Reformat output of radiotap libpacketdump decoder to be consistent with other decoders

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpacketdump/link_15.c

    r1dc7df3 r1515e07  
    2626        rtap = (libtrace_radiotap_t *)packet;
    2727       
    28         printf(" Radiotap 802.11 Monitoring:");
     28        printf(" Radiotap:");
    2929
    3030        if (len < 8) {
     
    5555
    5656        if (rtap->it_present & (1 << TRACE_RADIOTAP_TSFT)) {
    57                 printf("  TSFT: %llu microseconds\n", bswap_le_to_host64(*((uint64_t *)p)));
     57                printf(" Radiotap: TSFT = %llu microseconds\n", bswap_le_to_host64(*((uint64_t *)p)));
    5858                p += sizeof (uint64_t);
    5959                rtap_real_len += sizeof (uint64_t);
     
    6161
    6262        if (rtap->it_present & (1 << TRACE_RADIOTAP_FLAGS)) {
    63                 printf("  Flags: %#04x\n", *p);
     63                printf(" Radiotap: Flags = %#04x\n", *p);
    6464                p += sizeof (uint8_t);
    6565                rtap_real_len += sizeof(uint8_t);
     
    6868       
    6969        if (rtap->it_present & (1 << TRACE_RADIOTAP_RATE)) {
    70                 printf("  Rate: %u kbps\n", (*p) * 500);
     70                printf(" Radiotap: Rate = %u kbps\n", (*p) * 500);
    7171                p +=  sizeof (uint8_t);
    7272                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("  Freq: %u MHz, ChanFlags: %#06x\n", bswap_le_to_host16(*((uint16_t *)p)),
     77                printf(" Radiotap: Freq = %u MHz, ChanFlags: %#06x\n", bswap_le_to_host16(*((uint16_t *)p)),
    7878                                *(((uint16_t *)p) + 1));
    7979                p += sizeof (uint32_t);
     
    8383        if (rtap->it_present & (1 << TRACE_RADIOTAP_FHSS)) {
    8484                ALIGN_NATURAL_16(p,s, rtap_real_len);
    85                 printf("  FHSS: HopSet: %u , HopPattern: %u\n", *p, *(p+1));
     85                printf(" Radiotap: FHSS HopSet = %u , HopPattern: %u\n", *p, *(p+1));
    8686                p += sizeof (uint16_t);
    8787                rtap_real_len += sizeof(uint16_t);
     
    9090
    9191        if (rtap->it_present & (1 << TRACE_RADIOTAP_DBM_ANTSIGNAL)) {
    92                 printf("  Signal: %i dBm\n", (int8_t) *p) ;
     92                printf(" Radiotap: Signal = %i dBm\n", (int8_t) *p) ;
    9393                p += sizeof (uint8_t);
    9494                rtap_real_len += sizeof(uint8_t);
     
    9797
    9898        if (rtap->it_present & (1 << TRACE_RADIOTAP_DBM_ANTNOISE)) {
    99                 printf("  Noise: %i dBm\n", (int8_t) *p);
     99                printf(" Radiotap: Noise = %i dBm\n", (int8_t) *p);
    100100                p += sizeof (uint8_t);
    101101                rtap_real_len += sizeof(uint8_t);
     
    105105        if (rtap->it_present & (1 << TRACE_RADIOTAP_LOCK_QUALITY)) {
    106106                ALIGN_NATURAL_16(p,s, rtap_real_len);
    107                 printf("  Barker Code Lock Quality: %u\n", bswap_le_to_host16(*((uint16_t *)p)));
     107                printf(" Radiotap: Barker Code Lock Quality = %u\n", bswap_le_to_host16(*((uint16_t *)p)));
    108108                p += sizeof (uint16_t);
    109109                rtap_real_len += sizeof(uint16_t);
     
    113113        if (rtap->it_present & (1 << TRACE_RADIOTAP_TX_ATTENUATION)) {
    114114                ALIGN_NATURAL_16(p,s, rtap_real_len);
    115                 printf("  TX Attenuation: %u\n", bswap_le_to_host16(*((uint16_t *)p)));
     115                printf(" Radiotap: TX Attenuation = %u\n", bswap_le_to_host16(*((uint16_t *)p)));
    116116                p += sizeof (uint16_t);
    117117                rtap_real_len += sizeof(uint16_t);
     
    120120        if (rtap->it_present & (1 << TRACE_RADIOTAP_DB_TX_ATTENUATION)) {
    121121                ALIGN_NATURAL_16(p,s,rtap_real_len);
    122                 printf("  TX Attenuation: %u dB\n", bswap_le_to_host16(*((uint16_t *)p)));
     122                printf(" Radiotap: TX Attenuation = %u dB\n", bswap_le_to_host16(*((uint16_t *)p)));
    123123                p += sizeof (uint16_t);
    124124                rtap_real_len += sizeof(uint16_t);
     
    126126
    127127        if (rtap->it_present & (1 << TRACE_RADIOTAP_DBM_TX_POWER)) {
    128                 printf("  TX Power: %i dBm\n", *p);
     128                printf(" Radiotap: TX Power = %i dBm\n", *p);
    129129                p += sizeof (uint8_t);
    130130                rtap_real_len += sizeof(uint8_t);
     
    132132
    133133        if (rtap->it_present & (1 << TRACE_RADIOTAP_ANTENNA)) {
    134                 printf("  Antenna: %u\n", *p);
     134                printf(" Radiotap: Antenna = %u\n", *p);
    135135                p += sizeof (uint8_t);
    136136                rtap_real_len += sizeof(uint8_t);
     
    138138
    139139        if (rtap->it_present & (1 << TRACE_RADIOTAP_DB_ANTSIGNAL)) {
    140                 printf("  Signal: %u dB\n", *p);
     140                printf(" Radiotap: Signal = %u dB\n", *p);
    141141                p += sizeof (uint8_t);
    142142                rtap_real_len += sizeof(uint8_t);
     
    144144
    145145        if (rtap->it_present & (1 << TRACE_RADIOTAP_DB_ANTNOISE)) {
    146                 printf("  Noise: %u dB\n", *p);
     146                printf(" Radiotap: Noise = %u dB\n", *p);
    147147                p += sizeof (uint8_t);
    148148                rtap_real_len += sizeof(uint8_t);
     
    151151        if (rtap->it_present & (1 << TRACE_RADIOTAP_FCS)) {
    152152                ALIGN_NATURAL_32(p,s,rtap_real_len);
    153                 printf("  Frame Check Sequence: %#10x\n", bswap_le_to_host32(*((uint32_t *)p)));
     153                printf(" Radiotap: Frame Check Sequence = %#10x\n", bswap_le_to_host32(*((uint32_t *)p)));
    154154                p += sizeof (uint32_t);
    155155                rtap_real_len += sizeof(uint32_t);
     
    157157
    158158        if (rtap_real_len != rtap_len)
    159                 printf(" WARNING: Header length does not match fields present (%u)\n", rtap_real_len);
     159                printf(" Radiotap: WARNING: Header length does not match fields present (%u)\n", rtap_real_len);
    160160
    161161        if (len > rtap_len)
Note: See TracChangeset for help on using the changeset viewer.