Steps for adding full support for a new Link type to libtrace:
- Get a TRACE_TYPE assigned and add it to libtrace.h
- Add conversions to/from your linktype
- If your linktype is supported by pcap:
- add LIBTRACE_DLT of the correct number to libtrace.h
- Add your new TRACE_TYPE to libtrace_to_pcap_dlt/pcap_dlt_to_libtrace
- If your linktype is supported by ERF
- Add TYPE_* of the correct number to libtrace.h
- Add your new TRACE_TYPE to libtrace_to_erf_type/erf_type_to_libtrace
- If your linktype is supported by the Linux kernel:
- Add your linktype to linuxnative_get_link_type. ARPHRD's are defined in <net/if_arp.h>. If your linktype is too new to exist in that header, consider having
#ifndef ARPHRD_foo #define ARPHRD_foo 1337 #endif
- Add your linktype to linuxnative_get_link_type. ARPHRD's are defined in <net/if_arp.h>. If your linktype is too new to exist in that header, consider having
- If your linktype is supported by pcap:
- Add a structure to parse your linktype to libtrace.h with a name "libtrace_yourlinktype_t"
- Add trace_get_payload_from_yourlinktype to protocols.c, and add code to trace_get_payload_from_link() to understand your linktype.
- Add a protocol description to libpacketdump/
Last modified 15 years ago
Last modified on 09/06/06 10:06:38