Changeset 7f32bb5 for lib


Ignore:
Timestamp:
02/10/06 11:08:49 (15 years ago)
Author:
Perry Lorier <perry@…>
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:
7068467
Parents:
37195b4
Message:

Add sections to make finding documentation easier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h

    r56ef532 r7f32bb5  
    277277void trace_perror(const char *caller);
    278278
     279/** @name Creation and destruction of traces
     280 * These members deal with creating, configuring and cleaning up a trace object
     281 */
     282//@{
     283
    279284/** Create a trace file from a URI
    280285 *
     
    357362 */
    358363void trace_destroy_output(struct libtrace_out_t *trace);
     364//@}
     365
     366/** @name Reading/Writing packets
     367 * These members deal with creating, reading and writing packets
     368 */
     369//@{
    359370
    360371/** Create a new packet object
     
    387398 */
    388399int trace_write_packet(struct libtrace_out_t *trace, const struct libtrace_packet_t *packet);
     400//@}
     401
     402/** @name Headers
     403 * These functions locate and return a pointer to various headers inside a packet
     404 */
     405//@{
    389406
    390407/** get a pointer to the link layer
     
    483500SIMPLE_FUNCTION
    484501struct libtrace_icmp *trace_get_icmp_from_ip(const struct libtrace_ip *ip,int *skipped);
     502//@}
    485503
    486504/** parse an ip or tcp option
     
    507525
    508526
     527/** @name Time
     528 * These functions deal with time that a packet arrived and return it
     529 * in various formats
     530 */
     531//@{
    509532/** Get the current time in DAG time format
    510533 * @param packet        the packet opaque pointer
     
    536559SIMPLE_FUNCTION
    537560double trace_get_seconds(const struct libtrace_packet_t *packet);
    538 
     561//@}
     562
     563/** @name Sizes
     564 * This section deals with finding or setting the various different lengths
     565 * a packet can have
     566 */
     567//@{
    539568/** Get the size of the packet in the trace
    540569 * @param packet        the packet opaque pointer
     
    572601SIMPLE_FUNCTION
    573602int trace_get_framing_length(const struct libtrace_packet_t *packet);
     603
     604/** Truncate the packet at the suggested length
     605 * @param packet        the packet opaque pointer
     606 * @param size          the new length of the packet
     607 * @returns the new length of the packet, or the original length of the
     608 * packet if unchanged
     609 * @author Daniel Lawson
     610 */
     611size_t trace_set_capture_length(struct libtrace_packet_t *packet, size_t size);
     612
     613//@}
    574614
    575615
     
    619659uint8_t *trace_get_source_mac(const struct libtrace_packet_t *packet);
    620660
    621 /** Truncate the packet at the suggested length
    622  * @param packet        the packet opaque pointer
    623  * @param size          the new length of the packet
    624  * @returns the new length of the packet, or the original length of the
    625  * packet if unchanged
    626  * @author Daniel Lawson
    627  */
    628 size_t trace_set_capture_length(struct libtrace_packet_t *packet, size_t size);
    629 
    630661/** Set the direction flag, if it has one
    631662 * @param packet        the packet opaque pointer
     
    681712                struct libtrace_packet_t *packet);
    682713
     714/** @name BPF
     715 * This section deals with using Berkley Packet Filters
     716 */
     717//@{
    683718/** setup a BPF filter
    684719 * @param filterstring a char * containing the bpf filter string
     
    703738int trace_bpf_filter(struct libtrace_filter_t *filter,
    704739                const struct libtrace_packet_t *packet);
    705 
     740//@}
    706741
    707742/** Which port is the server port */
Note: See TracChangeset for help on using the changeset viewer.