Header file containing prototypes for functions that are useful for multiple format modules. More...
Go to the source code of this file.
Functions | |
| struct libtrace_eventobj_t | trace_event_device (libtrace_t *trace, libtrace_packet_t *packet) |
| Generic event function for a live capture device. | |
| struct libtrace_eventobj_t | trace_event_trace (libtrace_t *trace, libtrace_packet_t *packet) |
| Generic event function for a offline trace file. | |
| io_t * | trace_open_file (libtrace_t *libtrace) |
| Opens an input trace file for reading. | |
| iow_t * | trace_open_file_out (libtrace_out_t *libtrace, int compress_type, int level, int filemode) |
| Opens an output trace file for writing. | |
Header file containing prototypes for functions that are useful for multiple format modules.
| struct libtrace_eventobj_t trace_event_device | ( | libtrace_t * | trace, | |
| libtrace_packet_t * | packet | |||
| ) | [read] |
Generic event function for a live capture device.
| trace | The input trace for the live capture device | |
| packet | A libtrace packet to read the next available packet into |
Any live capture format that does not require a custom event handler should use this function.
References libtrace_eventobj_t::fd, libtrace_eventobj_t::size, trace_is_err(), trace_perror(), trace_read_packet(), and libtrace_eventobj_t::type.
| struct libtrace_eventobj_t trace_event_trace | ( | libtrace_t * | trace, | |
| libtrace_packet_t * | packet | |||
| ) | [read] |
Generic event function for a offline trace file.
| trace | The input trace for the trace file | |
| packet | A libtrace packet to read the next available packet into |
Any trace file format that does not require a custom event handler should use this function
References libtrace_eventobj_t::seconds, trace_create_packet(), trace_destroy_packet(), trace_get_seconds(), trace_is_err(), trace_perror(), trace_read_packet(), and libtrace_eventobj_t::type.
| io_t* trace_open_file | ( | libtrace_t * | libtrace | ) |
Opens an input trace file for reading.
| libtrace | The input trace to be opened |
References trace_set_err(), and libtrace_t::uridata.
| iow_t* trace_open_file_out | ( | libtrace_out_t * | libtrace, | |
| int | compress_type, | |||
| int | level, | |||
| int | filemode | |||
| ) |
Opens an output trace file for writing.
| libtrace | The output trace to be opened | |
| compress_type | The compression type to use when writing | |
| level | The compression level to use when writing, ranging from 0 to 9 | |
| filemode | The file status flags for the file, bitwise-ORed. |
References libtrace_out_t::uridata.
1.7.1