Version 4 (modified by salcock, 13 years ago) (diff)



Functions that only return a success/failure, return 0 on success and -1 on failure and update the trace error (using trace_set_err).

Types start with "libtrace_" and end with "_t" and are typedef'd.

Values for enumerated types, such as libtrace_linktype_t or trace_option_t, begin with "TRACE_".

Exported functions start with "trace_" and typically follow the format "trace_<verb>_[<subject>]". However, we recommend looking up the name of a function you're not certain of rather than trying to guess!

All exported functions and types should be declared in libtrace.h (with the exception of libpacketdump-related functions and types which are declared in libpacketdump.h). This means that libtrace programmers only need to include one header file to gain access to all of the libtrace API and that there is a single point of call to examine the format of any libtrace data structure or function prototype.


This compatibility layer is used to wrap decompression functions and various I/O strategies depending on what is available for your host. See libtraceio.h for more information. Also see format_helper's trace_file_open(). Generally the state of the file after an error has occurred is undefined.