Changeset 14d8a63 for lib/libtrace.h


Ignore:
Timestamp:
11/25/05 16:12:39 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
3840760
Parents:
e9fa643
Message:

update to version 3.0.0
zero-copy patch - trace.c updated with new trace_create_packet() etc
format_*.c updated with zero-copy codepath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h

    r3b8338b r14d8a63  
    9595} libtrace_packet_status_t;
    9696
     97typedef enum {PACKET, EXTERNAL } buf_control_t;
    9798/** Structure holding information about a packet */
    9899#define LIBTRACE_PACKET_BUFSIZE 65536
    99100typedef struct libtrace_packet_t {
    100         struct libtrace_t *trace;
    101         //void *buffer;
    102         char buffer[LIBTRACE_PACKET_BUFSIZE];
     101        struct libtrace_t *trace;
     102        void *header;
     103        void *payload;
     104        void *buffer;
    103105        size_t size;
    104106        libtrace_packet_status_t status;
     107        buf_control_t buf_control;
    105108} __attribute__ ((packed)) libtrace_packet_t;
    106109                     
     
    344347void trace_output_destroy(struct libtrace_out_t *trace);
    345348
     349/** Create a new packet object
     350 *
     351 * @return a pointer to an initialised libtrace_packet_t object
     352 */
     353struct libtrace_packet_t *trace_packet_create();
     354
     355/** Destroy a packet object
     356 *
     357 * sideeffect: sets packet to NULL
     358 */
     359void trace_packet_destroy(struct libtrace_packet_t **packet);
     360
     361
    346362/** Read one packet from the trace into buffer
    347363 *
Note: See TracChangeset for help on using the changeset viewer.