Ignore:
Timestamp:
02/05/10 16:24:54 (12 years ago)
Author:
Shane Alcock <salcock@…>
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:
c0fcc14
Parents:
0bb3004
Message:
  • Added doxygen documentation to a couple more header files
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_helper.h

    r099d112 r21ae4b9  
    22 * This file is part of libtrace
    33 *
    4  * Copyright (c) 2007,2008 The University of Waikato, Hamilton, New Zealand.
     4 * Copyright (c) 2007,2008,2009,2010 The University of Waikato, Hamilton,
     5 * New Zealand.
     6 *
    57 * Authors: Daniel Lawson
    6  *          Perry Lorier
     8 *          Perry Lorier
     9 *          Shane Alcock
    710 *         
    811 * All rights reserved.
     
    3437#include "wandio.h"
    3538
    36 int trace_read(libtrace_t *libtrace, void *buffer, size_t len);
     39/** @file
     40 *
     41 * @brief Header file containing prototypes for functions that are useful for
     42 * multiple format modules
     43 *
     44 * @author Daniel Lawson
     45 * @author Perry Lorier
     46 * @author Shane Alcock
     47 *
     48 * @version $Id$
     49 */
    3750
     51/** Generic event function for a live capture device
     52 *
     53 * @param trace         The input trace for the live capture device
     54 * @param packet        A libtrace packet to read the next available packet
     55 *                      into
     56 * @return A libtrace event describing the next event of interest
     57 *
     58 * Any live capture format that does not require a custom event handler
     59 * should use this function.
     60 */
    3861struct libtrace_eventobj_t trace_event_device(libtrace_t *trace, libtrace_packet_t *packet);
     62
     63/** Generic event function for a offline trace file
     64 *
     65 * @param trace         The input trace for the trace file
     66 * @param packet        A libtrace packet to read the next available packet
     67 *                      into
     68 * @return A libtrace event describing the next event of interest
     69 *
     70 * Any trace file format that does not require a custom event handler should
     71 * use this function
     72 */
    3973struct libtrace_eventobj_t trace_event_trace(libtrace_t *trace, libtrace_packet_t *packet);
    4074
    41 int trace_bpf_compile(libtrace_filter_t *filter,
    42                 const libtrace_packet_t *packet);
     75/** Opens an input trace file for reading
     76 *
     77 * @param libtrace      The input trace to be opened
     78 * @return A libtrace IO reader for the newly opened file or NULL if the file
     79 * was unable to be opened
     80 */
     81io_t *trace_open_file(libtrace_t *libtrace);
    4382
    44 io_t *trace_open_file(libtrace_t *libtrace);
     83/** Opens an output trace file for writing
     84 *
     85 * @param libtrace      The output trace to be opened
     86 * @param level         The compression level to use when writing, ranging from
     87 *                      0 to 9
     88 * @param filemode      The file status flags for the file, bitwise-ORed.
     89 * @return A libtrace IO writer for the newly opened file or NULL if the file
     90 * was unable to be opened
     91 */
    4592iow_t *trace_open_file_out(libtrace_out_t *libtrace,
    4693                int level,
Note: See TracChangeset for help on using the changeset viewer.