Changes between Version 1 and Version 2 of AddingNewLinktype


Ignore:
Timestamp:
09/05/06 17:12:55 (14 years ago)
Author:
perry
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AddingNewLinktype

    v1 v2  
    11Steps for adding full support for a new Link type to libtrace:
    22
    3  # Get a TRACE_TYPE assigned and add it to libtrace.h
    4  # Add conversions to/from your linktype
    5    * If your linktype is supported by pcap:
    6      * add LIBTRACE_DLT of the correct number to libtrace.h
    7      * Add your new TRACE_TYPE to libtrace_to_pcap_dlt/pcap_dlt_to_libtrace
    8    * If your linktype is supported by ERF
    9      * Add TYPE_* of the correct number to libtrace.h
    10      * Add your new TRACE_TYPE to libtrace_to_erf_type/erf_type_to_libtrace
    11    * If your linktype is supported by the Linux kernel:
    12      * Add your linktype to linuxnative_get_link_type
    13  # Add a structure to parse your linktype to libtrace.h with a name "libtrace_''yourlinktype''_t"
    14  # Add trace_get_payload_from_''yourlinktype'' to protocols.c, and add code to trace_get_payload_from_link() to understand your linktype.
    15  # Add a protocol description to libpacketdump/
     3 1. Get a TRACE_TYPE assigned and add it to libtrace.h
     4 1. Add conversions to/from your linktype
     5  * If your linktype is supported by pcap:
     6   * add LIBTRACE_DLT of the correct number to libtrace.h
     7   * Add your new TRACE_TYPE to {{{libtrace_to_pcap_dlt}}}/{{{pcap_dlt_to_libtrace}}}
     8  * If your linktype is supported by ERF
     9   * Add TYPE_* of the correct number to libtrace.h
     10   * Add your new TRACE_TYPE to {{{libtrace_to_erf_type}}}/{{{erf_type_to_libtrace}}}
     11  * If your linktype is supported by the Linux kernel:
     12   * Add your linktype to linuxnative_get_link_type
     13 1. Add a structure to parse your linktype to {{{libtrace.h}}} with a name "libtrace_''yourlinktype''_t"
     14 1. Add trace_get_payload_from_''yourlinktype'' to protocols.c, and add code to {{{trace_get_payload_from_link()}}} to understand your linktype.
     15 1. Add a protocol description to {{{libpacketdump/}}}