- Timestamp:
- 02/03/10 14:29:43 (12 years ago)
- 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
- 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 1 34 #ifndef DAG_LEGACY_H 2 35 #define DAG_LEGACY_H 3 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 */ 4 52 typedef 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 */ 7 55 } PACKED legacy_cell_t; 8 56 57 /** Legacy Ethernet header */ 9 58 typedef 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 */ 12 61 } PACKED legacy_ether_t; 13 62 63 /** Legacy Packet-over-SONET header */ 14 64 typedef 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 */ 18 68 } PACKED legacy_pos_t; 19 69 70 /** ATM cell header capture, a la Auckland VII */ 20 71 typedef 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 */ 23 74 } PACKED atmhdr_t; 24 75 76 /** Legacy header format used for capturing the NZIX-I trace set */ 25 77 typedef 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 29 83 /* The padding has actually been placed in the middle of the IP 30 84 * header - when we read in the packet, we will move various bits 31 85 * of the packet around until the padding ends up here and the 32 86 * IP header is undivided */ 33 uint8_t pad[2]; 87 uint8_t pad[2]; /**< Padding */ 34 88 } PACKED legacy_nzix_t; 35 89 #endif
Note: See TracChangeset
for help on using the changeset viewer.