Changeset 21ae4b9 for lib


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
Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/format_erf.h

    r5e85c23 r21ae4b9  
     1/*
     2 * This file is part of libtrace
     3 *
     4 * Copyright (c) 2007,2008,2009,2010 The University of Waikato, Hamilton,
     5 * New Zealand.
     6 *
     7 * Authors: Daniel Lawson
     8 *          Perry Lorier
     9 *          Shane Alcock
     10 *         
     11 * All rights reserved.
     12 *
     13 * This code has been developed by the University of Waikato WAND
     14 * research group. For further information please see http://www.wand.net.nz/
     15 *
     16 * libtrace is free software; you can redistribute it and/or modify
     17 * it under the terms of the GNU General Public License as published by
     18 * the Free Software Foundation; either version 2 of the License, or
     19 * (at your option) any later version.
     20 *
     21 * libtrace is distributed in the hope that it will be useful,
     22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     24 * GNU General Public License for more details.
     25 *
     26 * You should have received a copy of the GNU General Public License
     27 * along with libtrace; if not, write to the Free Software
     28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     29 *
     30 * $Id: libtrace.h.in 1503 2010-02-02 22:23:43Z salcock $
     31 *
     32 */
     33
    134#ifndef FORMAT_ERF_H
    235#define FORMAT_ERF_H
    336
    437#include "libtrace.h"
     38
     39/** @file
     40 *
     41 * @brief Header file defining functions that apply to all libtrace formats
     42 * that use the ERF record format, e.g. ERF, DAG 2.4, DAG 2.5
     43 *
     44 * @author Daniel Lawson
     45 * @author Perry Lorier
     46 * @author Shane Alcock
     47 *
     48 * @version $Id$
     49 *
     50 * Not too much detail required with these functions - this header file exists
     51 * solely to ensure that we don't have to duplicate the same code across
     52 * multiple format modules.
     53 */
    554
    655int erf_get_framing_length(const libtrace_packet_t *packet);
  • 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.