source: libpacketdump/link_10.c @ 09d3bef

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

Renamed to .c

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