Changeset e845da6


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
Location:
libpacketdump
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • libpacketdump/Makefile.am

    r0316f8b re845da6  
    8888# DCCP
    8989BIN_PROTOCOLS+=ip_33.la
     90# IPv6 Fragment Header
     91BIN_PROTOCOLS+=ip_44.la
    9092# GRE
    9193BIN_PROTOCOLS+=ip_47.la
     
    124126ip_17_la_LDFLAGS=-module
    125127ip_33_la_LDFLAGS=-module
     128ip_44_la_LDFLAGS=-module
    126129ip_47_la_LDFLAGS=-module
    127130ip_132_la_LDFLAGS=-module
  • 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.