source: lib/daglegacy.h @ ac6ac7f

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since ac6ac7f was e56be6d, checked in by Shane Alcock <salcock@…>, 12 years ago
  • Added nice doxygen documentation to daglegacy.h
  • Also slapped a GPL licence on the front of the code
  • Property mode set to 100644
File size: 2.7 KB
RevLine 
[e56be6d]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
[d91dd4e]34#ifndef DAG_LEGACY_H
35#define DAG_LEGACY_H
36
[e56be6d]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 */
[d91dd4e]52typedef struct legacy_cell {
[e56be6d]53        uint64_t  ts;           /**< 64-bit timestamp in the ERF format */
54        uint32_t  crc;          /**< CRC checksum */
[23971d0]55} PACKED legacy_cell_t;
[d91dd4e]56
[e56be6d]57/** Legacy Ethernet header */
[d91dd4e]58typedef struct legacy_ether {
[e56be6d]59        uint64_t  ts;           /**< 64-bit timestamp in the ERF format */
60        uint16_t  wlen;         /**< Wire length */
[23971d0]61} PACKED legacy_ether_t;
[d91dd4e]62
[e56be6d]63/** Legacy Packet-over-SONET header */
[d91dd4e]64typedef struct legacy_pos {
[e56be6d]65        uint64_t  ts;           /**< 64-bit timestamp in the ERF format */
66        uint32_t  slen;         /**< Capture length */
67        uint32_t  wlen;         /**< Wire length */
[23971d0]68} PACKED legacy_pos_t;
[d91dd4e]69
[e56be6d]70/** ATM cell header capture, a la Auckland VII */
[e1fdc05]71typedef struct atmhdr {
[e56be6d]72        uint32_t ts_fraction;   /**< Partial seconds portion of the timestamp */
73        uint32_t ts_sec;        /**< Seconds portion of the timestamp */
[e1fdc05]74} PACKED atmhdr_t;
[1344aa8]75
[e56be6d]76/** Legacy header format used for capturing the NZIX-I trace set */
[1344aa8]77typedef struct legacy_nzix {
[e56be6d]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
[1344aa8]83        /* The padding has actually been placed in the middle of the IP
84         * header - when we read in the packet, we will move various bits
85         * of the packet around until the padding ends up here and the
86         * IP header is undivided */
[e56be6d]87        uint8_t pad[2];         /**< Padding */
[1344aa8]88} PACKED legacy_nzix_t;
[d91dd4e]89#endif
Note: See TracBrowser for help on using the repository browser.