source: lib/daglegacy.h @ c7021d9

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since c7021d9 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
Line 
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
34#ifndef DAG_LEGACY_H
35#define DAG_LEGACY_H
36
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 */
52typedef struct legacy_cell {
53        uint64_t  ts;           /**< 64-bit timestamp in the ERF format */
54        uint32_t  crc;          /**< CRC checksum */
55} PACKED legacy_cell_t;
56
57/** Legacy Ethernet header */
58typedef struct legacy_ether {
59        uint64_t  ts;           /**< 64-bit timestamp in the ERF format */
60        uint16_t  wlen;         /**< Wire length */
61} PACKED legacy_ether_t;
62
63/** Legacy Packet-over-SONET header */
64typedef struct legacy_pos {
65        uint64_t  ts;           /**< 64-bit timestamp in the ERF format */
66        uint32_t  slen;         /**< Capture length */
67        uint32_t  wlen;         /**< Wire length */
68} PACKED legacy_pos_t;
69
70/** ATM cell header capture, a la Auckland VII */
71typedef struct atmhdr {
72        uint32_t ts_fraction;   /**< Partial seconds portion of the timestamp */
73        uint32_t ts_sec;        /**< Seconds portion of the timestamp */
74} PACKED atmhdr_t;
75
76/** Legacy header format used for capturing the NZIX-I trace set */
77typedef struct legacy_nzix {
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
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 */
87        uint8_t pad[2];         /**< Padding */
88} PACKED legacy_nzix_t;
89#endif
Note: See TracBrowser for help on using the repository browser.