Ignore:
Timestamp:
11/24/10 11:16:18 (10 years ago)
Author:
Shane Alcock <salcock@…>
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:
ae3779b
Parents:
08c56ac
Message:
  • Added a libpacketdump decoder for IPv6 fragment headers
  • Fixed identation of IPv6 header fields in libpacketdump
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpacketdump/eth_34525.c

    r176646e re845da6  
    2626        uint32_t tmp = ntohl(*(uint32_t*)ip);
    2727
    28         printf("IPv6: Version %u\n", (tmp >> 28) & 0x000000f);
    29         printf("IPv6: Class %u\n", (tmp >> 20) & 0x000000ff);
    30         printf("IPv6: Flow Label %u\n", tmp & 0x000fffff);
    31         printf("IPv6: Payload Length %u\n", ntohs(ip->plen));
    32         printf("IPv6: Next Header %u\n", ip->nxt);
    33         printf("IPv6: Hop Limit %u\n", ip->hlim);
     28        printf(" IPv6: Version %u\n", (tmp >> 28) & 0x000000f);
     29        printf(" IPv6: Class %u\n", (tmp >> 20) & 0x000000ff);
     30        printf(" IPv6: Flow Label %u\n", tmp & 0x000fffff);
     31        printf(" IPv6: Payload Length %u\n", ntohs(ip->plen));
     32        printf(" IPv6: Next Header %u\n", ip->nxt);
     33        printf(" IPv6: Hop Limit %u\n", ip->hlim);
    3434
    3535
     
    3737        inet_ntop(AF_INET6, &(ip->ip_src), ipstr, INET6_ADDRSTRLEN);
    3838
    39         printf("IPv6: Source IP %s\n", ipstr);
     39        printf(" IPv6: Source IP %s\n", ipstr);
    4040        inet_ntop(AF_INET6, &(ip->ip_dst), ipstr, INET6_ADDRSTRLEN);
    41         printf("IPv6: Destination IP %s\n", ipstr);
     41        printf(" IPv6: Destination IP %s\n", ipstr);
    4242
    4343        decode_next(packet+sizeof(libtrace_ip6_t),len-sizeof(libtrace_ip6_t),"ip",ip->nxt);
Note: See TracChangeset for help on using the changeset viewer.