Changeset e56be6d for lib/daglegacy.h


Ignore:
Timestamp:
02/03/10 14:29:43 (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:
2c743a7
Parents:
143eaba
Message:
  • Added nice doxygen documentation to daglegacy.h
  • Also slapped a GPL licence on the front of the code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/daglegacy.h

    r1344aa8 re56be6d  
     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$
     31 *
     32 */
     33
    134#ifndef DAG_LEGACY_H
    235#define DAG_LEGACY_H
    336
     37/** @file
     38 *
     39 * @brief Header file describing the framing formats used by old legacy DAG
     40 * implementations.
     41 *
     42 * @author Daniel Lawson
     43 * @author Perry Lorier
     44 * @author Shane Alcock
     45 *
     46 * @version $Id$
     47 *
     48 */
     49
     50
     51/** Legacy ATM cell header */
    452typedef struct legacy_cell {
    5         uint64_t  ts;
    6         uint32_t  crc;
     53        uint64_t  ts;           /**< 64-bit timestamp in the ERF format */
     54        uint32_t  crc;          /**< CRC checksum */
    755} PACKED legacy_cell_t;
    856
     57/** Legacy Ethernet header */
    958typedef struct legacy_ether {
    10         uint64_t  ts;
    11         uint16_t  wlen;
     59        uint64_t  ts;           /**< 64-bit timestamp in the ERF format */
     60        uint16_t  wlen;         /**< Wire length */
    1261} PACKED legacy_ether_t;
    1362
     63/** Legacy Packet-over-SONET header */
    1464typedef struct legacy_pos {
    15         uint64_t  ts;
    16         uint32_t  slen;
    17         uint32_t  wlen;
     65        uint64_t  ts;           /**< 64-bit timestamp in the ERF format */
     66        uint32_t  slen;         /**< Capture length */
     67        uint32_t  wlen;         /**< Wire length */
    1868} PACKED legacy_pos_t;
    1969
     70/** ATM cell header capture, a la Auckland VII */
    2071typedef struct atmhdr {
    21         uint32_t ts_fraction;
    22         uint32_t ts_sec;
     72        uint32_t ts_fraction;   /**< Partial seconds portion of the timestamp */
     73        uint32_t ts_sec;        /**< Seconds portion of the timestamp */
    2374} PACKED atmhdr_t;
    2475
     76/** Legacy header format used for capturing the NZIX-I trace set */
    2577typedef struct legacy_nzix {
    26         uint32_t ts;
    27         uint32_t crc;
    28         uint32_t len;
     78        uint32_t ts;            /**< Time elapsed since the last packet in
     79                                     microseconds */
     80        uint32_t crc;           /**< CRC checksum */
     81        uint32_t len;           /**< Wire length */
     82
    2983        /* The padding has actually been placed in the middle of the IP
    3084         * header - when we read in the packet, we will move various bits
    3185         * of the packet around until the padding ends up here and the
    3286         * IP header is undivided */
    33         uint8_t pad[2];         
     87        uint8_t pad[2];         /**< Padding */
    3488} PACKED legacy_nzix_t;
    3589#endif
Note: See TracChangeset for help on using the changeset viewer.