source: libpacketdump/link_0.c @ 176646e

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 176646e was c7062df, checked in by Shane Alcock <salcock@…>, 12 years ago
  • Ensure that the decode functions are exported as global symbols for the various libpacketdump shared libraries
  • Property mode set to 100644
File size: 460 bytes
RevLine 
[ace188a]1#include <sys/types.h>
[09d3bef]2#include <netinet/in.h>
3#include <stdio.h>
4#include <inttypes.h>
5#include <dlfcn.h>
6#include "libpacketdump.h"
7
[c7062df]8DLLEXPORT void decode(int link_type UNUSED,const char *packet,unsigned len)
[09d3bef]9{
10        printf(" Legacy PoS:");
11        if (len>=4)
12                printf(" %08x\n",*(uint32_t *)packet);
13        else {
14                printf("[|Truncated]\n");
15                return;
16        }
17        if (len>4) {
18                decode_next(packet+4,len-4,"eth",2048);
19        }
20        else {
21                printf("[|Truncated]\n");
22                return;
23        }
24        return;
25}
Note: See TracBrowser for help on using the repository browser.