source: examples/tracedump/ @ b190686

Last change on this file since b190686 was 57bbf89, checked in by Daniel Lawson <dlawson@…>, 16 years ago

added linktypes for the legacy dag traces.
link_9 and link_10 are POS and ATM, and currently just skip the link layer
link_11 is ethernet - it steps over the legacy framing and then fires
link_2. this is hardcoded behaviour, so perhaps not the best... :)

  • Property mode set to 100644
File size: 388 bytes
1#include <netinet/ether.h>
2#include <netinet/in.h>
3#include <net/ethernet.h>
4#include <stdio.h>
5#include <inttypes.h>
6#include <dlfcn.h>
7#include <map>
8#include "tracedump.h"
10extern "C"
11void decode(int link_type,char *packet,int len)
13        printf(" Legacy Framing: ");
14        if (len>=10) {
15                decode_next(packet+10,len-10,"link",2);
16        }
17        else {
18                printf("[|Truncated]\n");
19                return;
20        }
21        return;
Note: See TracBrowser for help on using the repository browser.