File: link_0.c

package info (click to toggle)
libtrace3 3.0.7-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,676 kB
  • ctags: 3,140
  • sloc: ansic: 20,551; sh: 10,125; cpp: 1,384; makefile: 415; yacc: 96; lex: 50
file content (25 lines) | stat: -rw-r--r-- 460 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <sys/types.h>
#include <netinet/in.h>
#include <stdio.h>
#include <inttypes.h>
#include <dlfcn.h>
#include "libpacketdump.h"

DLLEXPORT void decode(int link_type UNUSED,const char *packet,unsigned len)
{
	printf(" Legacy PoS:");
	if (len>=4)
		printf(" %08x\n",*(uint32_t *)packet);
	else {
		printf("[|Truncated]\n");
		return;
	}
	if (len>4) {
		decode_next(packet+4,len-4,"eth",2048);
	}
	else {
		printf("[|Truncated]\n");
		return;
	}
	return;
}