source: libpacketdump/link_0.c @ 4f55f69

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

More warning fixes -- convert the length to be an unsigned number

  • Property mode set to 100644
File size: 437 bytes
Line 
1#include <sys/types.h>
2#include <netinet/in.h>
3#include <stdio.h>
4#include <inttypes.h>
5#include <dlfcn.h>
6#include "libpacketdump.h"
7
8void decode(int link_type,char *packet,unsigned len)
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.