Changeset eeab9832 for lib/libtrace.h


Ignore:
Timestamp:
03/03/06 18:24:18 (15 years ago)
Author:
Perry Lorier <perry@…>
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:
7ac9705
Parents:
c3e6e47
Message:

more error handling support
dag card work-around
removed annoying issue with mallocing memory during constructor that we

never free'd

added the ability to catch finalised packets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h

    r0d57541 reeab9832  
    5858#include <sys/types.h>
    5959#include <netinet/in.h>
     60#include <stdbool.h>
    6061/** API version as 2 byte hex digits, eg 0xXXYYZZ */
    6162#define LIBTRACE_API_VERSION 0x030000  /* 3.0.00 */
     
    462463libtrace_err_t trace_get_err(libtrace_t *trace);
    463464
     465/** Return if there is an error
     466 * @param trace         the trace file to check the error state on
     467 * This does not clear the error status, and only returns true or false.
     468 */
     469bool trace_is_err(libtrace_t *trace);
     470
     471/** Output an error message to stderr and clear the error status.
     472 * @param trace         the trace with the error to output
     473 * @param msg           the message to prefix to the error
     474 * This function does clear the error status.
     475 */
     476void trace_perror(libtrace_t *trace, const char *msg,...);
     477
    464478/** Check (and clear) the current error state of an output trace
    465479 * @param trace         the output trace file to check the error state on
     
    469483 */
    470484libtrace_err_t trace_get_err_output(libtrace_out_t *trace);
     485
     486/** Return if there is an error
     487 * @param trace         the trace file to check the error state on
     488 * This does not clear the error status, and only returns true or false.
     489 */
     490bool trace_is_err_output(libtrace_out_t *trace);
     491
     492/** Output an error message to stderr and clear the error status.
     493 * @param trace         the trace with the error to output
     494 * @param msg           the message to prefix to the error
     495 * This function does clear the error status.
     496 */
     497void trace_perror_output(libtrace_out_t *trace, const char *msg,...);
     498
    471499
    472500/*@}*/
     
    835863 */
    836864SIMPLE_FUNCTION
    837 inline libtrace_linktype_t trace_get_link_type(const libtrace_packet_t *packet);
     865libtrace_linktype_t trace_get_link_type(const libtrace_packet_t *packet);
    838866
    839867/** Get the destination MAC addres
Note: See TracChangeset for help on using the changeset viewer.