Changeset 180f095 for lib/trace.c


Ignore:
Timestamp:
09/05/07 23:52:26 (14 years ago)
Author:
Scott Raynel <smr26@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
9bc4689
Parents:
e8a6c52
Message:
  • Deprecate the use of trace_get_link()
  • Replace trace_get_link() with trace_get_packet_buffer()
  • Introduce new API for dealing with metadata headers such as Radiotap or Linux SLL
  • Introduce trace_get_layer2() which returns the start of the layer 2 header, which is usually the start of the packet as it was seen on the wire.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r6399a90 r180f095  
    760760}
    761761
     762DLLEXPORT void *trace_get_packet_buffer(const libtrace_packet_t *packet,
     763                libtrace_linktype_t *linktype, uint32_t *remaining) {
     764        assert(packet != NULL);
     765        if (linktype) *linktype = trace_get_link_type(packet);
     766        if (remaining) *remaining = trace_get_capture_length(packet);
     767        return (void *) packet->payload;
     768}
     769
    762770DLLEXPORT void *trace_get_link(const libtrace_packet_t *packet) {
    763771        return (void *)packet->payload;
Note: See TracChangeset for help on using the changeset viewer.