source: libpacketdump/link_10.c @ 11a7f9c

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

Constification

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