source: libpacketdump/link_9.cc @ ab4cb04

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since ab4cb04 was 3b8a5ef, checked in by Daniel Lawson <dlawson@…>, 16 years ago

I hate shane

  • Property mode set to 100644
File size: 540 bytes
Line 
1#include <netinet/ether.h>
2#include <netinet/in.h>
3#include <stdio.h>
4#include <inttypes.h>
5#include <dlfcn.h>
6#include <map>
7#include "libpacketdump.h"
8
9extern "C"
10void decode(int link_type,char *packet,int len)
11{
12        // POS
13        printf(" Legacy Framing:");
14        // take into account llc
15        if (len>=4) {
16                uint16_t type = htons(
17                                ((libtrace_pos *)packet)->ether_type);
18                printf(" %04x\n",type);
19                decode_next(packet+sizeof(libtrace_pos),
20                                len-sizeof(libtrace_pos),
21                                "eth",type);
22        }
23        else {
24                printf("[|Truncated]\n");
25                return;
26        }
27        return;
28}
Note: See TracBrowser for help on using the repository browser.