source: libpacketdump/link_10.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: 525 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
7DLLEXPORT void decode(int link_type UNUSED,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.