Ignore:
Timestamp:
11/30/05 15:43:30 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
2adf051
Parents:
08594b8
Message:

I hate shane

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpacketdump/link_10.cc

    r950d54a r3b8a5ef  
    66#include <map>
    77#include "libpacketdump.h"
     8#include "libtrace.h"
    89
    910extern "C"
    1011void decode(int link_type,char *packet,int len)
    1112{
    12         printf(" Legacy ATM:");
    13         /*
    14         if (len>=6)
    15                 printf(" %s",ether_ntoa((struct ether_addr*)packet));
    16         else {
    17                 printf("[|Truncated]\n");
    18                 return;
    19         }
    20         if (len>=12)
    21                 printf(" %s",ether_ntoa((struct ether_addr*)(packet+6)));
    22         else {
    23                 printf("[|Truncated]\n");
    24                 return;
    25         }
    26         */
    27         if (len>=24) {
    28                 uint16_t type = htons(*(uint16_t*)(packet+22));
     13        // ATM
     14        printf(" Legacy Framing:");
     15        if (len>=12) {
     16                uint16_t type = htons(*(uint16_t*)(packet+sizeof(libtrace_atm_cell)+4));
    2917                printf(" %04x\n",type);
    30                 decode_next(packet+24,len-24,"eth",type);
     18                decode_next(packet+sizeof(libtrace_atm_cell) + 4,
     19                                len-sizeof(libtrace_atm_cell) -4,
     20                                "eth",type);
    3121        }
    3222        else {
Note: See TracChangeset for help on using the changeset viewer.