source: libpacketdump/link_0.cc @ 1851624

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 1851624 was 950d54a, checked in by Perry Lorier <perry@…>, 16 years ago

Add libpacketdump to cvs

  • Property mode set to 100644
File size: 462 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        printf(" Legacy PoS:");
13        if (len>=4)
14                printf(" %08x\n",*(uint32_t *)packet);
15        else {
16                printf("[|Truncated]\n");
17                return;
18        }
19        if (len>4) {
20                decode_next(packet+4,len-4,"eth",2048);
21        }
22        else {
23                printf("[|Truncated]\n");
24                return;
25        }
26        return;
27}
Note: See TracBrowser for help on using the repository browser.