Changeset b53d019


Ignore:
Timestamp:
09/17/15 13:24:51 (5 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
9a0e118
Parents:
76c86fb
Message:

Tidy up some documentation in libtrace.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    r5478d3d rb53d019  
    22 * This file is part of libtrace
    33 *
    4  * Copyright (c) 2007,2008,2009,2010 The University of Waikato, Hamilton,
     4 * Copyright (c) 2007-2015 The University of Waikato, Hamilton,
    55 * New Zealand.
    66 *
    7  * Authors: Daniel Lawson 
     7 * Authors: Daniel Lawson
    88 *          Perry Lorier
    9  *          Shane Alcock
    10  *         
     9 *          Shane Alcock
     10 *          Richard Sanger
     11 *
    1112 * All rights reserved.
    1213 *
    13  * This code has been developed by the University of Waikato WAND 
     14 * This code has been developed by the University of Waikato WAND
    1415 * research group. For further information please see http://www.wand.net.nz/
    1516 *
     
    4243 * @author Perry Lorier
    4344 * @author Shane Alcock
     45 * @author Richard Sanger
    4446 *
    4547 * @version $Id$
    4648 *
    47  * This library provides a per packet interface into a trace file, or a live 
     49 * This library provides a per packet interface into a trace file, or a live
    4850 * captures.  It supports ERF, DAG cards, PCAP, Linux and BSD native sockets,
    4951 * legacy ERF formats etc.
    5052 *
    5153 * @par Usage
    52  * See the example/ directory in the source distribution for some simple 
     54 * See the example/ directory in the source distribution for some simple
    5355 * examples
    5456 *
    5557 * @par Linking
    5658 * To use this library you need to link against libtrace by passing -ltrace
    57  * to your linker. You may also need to link against a version of libpcap
    58  * and of zlib which are compiled for largefile support (if you wish to access
    59  * traces larger than 2 GB). This is left as an exercise for the reader. Debian
    60  * Woody, at least, does not support large file offsets.
     59 * to your linker.
     60 *
     61 * See libtrace_parallel.h for a description of the parallel API that allows
     62 * programmers to spread packet processing across multiple threads.
    6163 *
    6264 */
     
    240242#endif
    241243
    242        
     244
    243245/** Opaque structure holding information about an output trace */
    244246typedef struct libtrace_out_t libtrace_out_t;
    245        
     247
    246248/** Opaque structure holding information about a trace */
    247249typedef struct libtrace_t libtrace_t;
    248        
     250
    249251/** Opaque structure holding information about a bpf filter */
    250252typedef struct libtrace_filter_t libtrace_filter_t;
     
    312314         * DLT */
    313315        TRACE_DLT_ERROR = -1,
    314        
    315         /** pcap documents this as having the Address Family value in host byte order as the
    316           * framing.  Ugly? Yes.
     316
     317        /** pcap documents this as having the Address Family value in host
     318          * byte order as the framing.  Ugly? Yes.
    317319          */
    318320        TRACE_DLT_NULL = 0,
     
    320322        TRACE_DLT_PPP = 9,
    321323        TRACE_DLT_ATM_RFC1483 = 11,
    322        
    323         /** Ok, so OpenBSD has a different value for DLT_RAW as the rest of the planet, so detect
    324           * this.  When reading to/from files we should be using TRACE_DLT_LINKTYPE_RAW instead.
    325           * When talking about DLT's inside libtrace tho, we should be using /these/ DLT's.
    326           */
     324
     325        /** Ok, so OpenBSD has a different value for DLT_RAW as the rest of
     326         * the planet, so detect this.  When reading to/from files we should
     327         * be using TRACE_DLT_LINKTYPE_RAW instead. When talking about DLT's
     328         * inside libtrace tho, we should be using /these/ DLT's.
     329         */
    327330#ifdef __OpenBSD__
    328331        TRACE_DLT_OPENBSD_LOOP=12,
    329         TRACE_DLT_RAW = 14,     
     332        TRACE_DLT_RAW = 14
    330333#else
    331334        TRACE_DLT_RAW = 12,
     
    625628} PACKED libtrace_ip6_ext_t;
    626629
     630/** IPv6 fragmentation header */
    627631typedef struct libtrace_ip6_frag
    628632{
     
    717721} PACKED libtrace_icmp_t;
    718722
     723/** Generic ICMPv6 header structure */
    719724typedef struct libtrace_icmp6 {
    720725  uint8_t type;         /**< Message Type */
     
    10911096} PACKED libtrace_ospf_router_lsa_v2_t;
    10921097
     1098/** OSPF message types */
    10931099typedef enum {
    10941100        TRACE_OSPF_HELLO = 1,           /**< OSPF Hello */
     
    10991105} libtrace_ospf_types_t;
    11001106
     1107/** OSPF link state acknowledgement types */
    11011108typedef enum {
    11021109        TRACE_OSPF_LS_ROUTER = 1,       /**< OSPF Router LSA */
     
    11911198 *  - erf:/path/to/erf/file
    11921199 *  - erf:-  (stdin)
    1193  *  - dag:/dev/dagcard                 
     1200 *  - dag:/dev/dagcard
    11941201 *  - pcapint:pcapinterface                (eg: pcap:eth0)
    11951202 *  - pcap:/path/to/pcap/file
     
    13831390 * Statistic counters are cumulative from the time the trace is started.
    13841391 * Trace pause will reset the counters, to zero.
    1385  * Always check \a{field}_valid is set before attempting to read the stored value.
     1392 * Always check \a{field}_valid is set before attempting to read the stored
     1393 * value.
    13861394 *
    13871395 * @note Always allocate this structure using trace_create_statistics().
     
    14011409
    14021410        /* These must all be uint64_t's, match this order with the X macro */
    1403         uint64_t accepted;
    1404         /**< The number of packets that have been read from the input trace
     1411        /** The number of packets that have been read from the input trace
    14051412         * using trace_read_packet(). In the parallel framework this may include
    14061413         * some packets waiting in a batch yet to be seen by the user's
     
    14121419         * @note This field replaces trace_get_accepted_packets()
    14131420         */
    1414         uint64_t filtered;
    1415         /**< The number of packets that were captured, but discarded for not
     1421        uint64_t accepted;
     1422
     1423        /** The number of packets that were captured, but discarded for not
    14161424         * matching a provided filter.
    14171425         *
    14181426         * @note This field replaces trace_get_filtered_packets()
    14191427         */
    1420         uint64_t received;
    1421         /**< The total number of good packets which have been recevied. Including
     1428        uint64_t filtered;
     1429
     1430        /** The total number of good packets which have been recevied. Including
    14221431         * those which are dropped and filtered. This does not include errors.
    14231432         *
     
    14271436         * @note This field replaces trace_get_received_packets()
    14281437         */
    1429         uint64_t dropped;
    1430         /**< The number of packets that have been dropped on an input trace
     1438        uint64_t received;
     1439
     1440        /** The number of packets that have been dropped on an input trace
    14311441         * due to lack of buffer space on the capturing device. This does not
    14321442         * included errored packets which are dropped directly by the card.
     
    14341444         * @note This field replaces trace_get_dropped_packets()
    14351445         */
    1436         uint64_t captured;
    1437         /**< The number of received packets that have not been dropped. This
     1446        uint64_t dropped;
     1447
     1448        /** The number of received packets that have not been dropped. This
    14381449         * includes filtered packets.
    14391450         *
     
    14431454         *       not yet included in accepted.
    14441455         */
    1445         uint64_t errors;
    1446         /**< The number of packets that have been discarded by the network card
     1456        uint64_t captured;
     1457
     1458        /** The number of packets that have been discarded by the network card
    14471459         * because they are invalid. That includes FCS mismatches, incorrect
    14481460         * packet lengths etc.
    14491461         */
     1462        uint64_t errors;
    14501463} libtrace_stat_t;
    14511464
Note: See TracChangeset for help on using the changeset viewer.