source: lib/wag.h @ f3ed52a

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since f3ed52a was 9a36e6d, checked in by Daniel Lawson <dlawson@…>, 16 years ago

updated erf code, adding in wag support

  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*
2 * This file is part of libtrace
3 *
4 * Copyright (c) 2004 The University of Waikato, Hamilton, New Zealand.
5 * Authors: Daniel Lawson
6 *          Perry Lorier
7 *         
8 * All rights reserved.
9 *
10 * This code has been developed by the University of Waikato WAND
11 * research group. For further information please see http://www.wand.net.nz/
12 *
13 * libtrace is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * libtrace is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with libtrace; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 *
27 * $Id$
28 *
29 */
30#ifndef _WAG_H_
31#define _WAG_H_
32
33// Generic field breakdowns
34struct wag_frame_hdr {
35  uint16_t magic;
36  uint16_t size;
37  uint16_t type;
38  uint16_t subtype;
39};
40
41struct wag_timestamp {
42  uint32_t secs;
43  uint32_t subsecs;
44};
45
46// Received packet frame fields
47struct wag_stream_info {
48  uint16_t unused_1;
49  uint16_t unused_2;
50  uint16_t unused_3;
51  uint16_t packets_lost;
52};
53
54struct wag_plcp_hdr {
55  uint8_t  signal;
56  uint8_t  service;
57  uint16_t length;
58};
59
60struct wag_rxparams {
61  uint8_t         rssi;
62  uint8_t         rxstatus;
63  uint16_t        length;
64  struct wag_plcp_hdr plcp;
65};
66
67struct wag_data_frame {
68  struct wag_frame_hdr hdr;
69  struct wag_stream_info strinfo;
70  struct wag_timestamp ts;
71  struct wag_rxparams rxinfo;
72  char data[1];
73};
74
75// Transmit packet frame fields
76struct wag_txparams {
77  uint8_t         gain;
78  uint8_t         mode;
79  uint16_t        length;
80  uint32_t        unused_1;
81};
82
83struct wag_tx_data_frame {
84  struct wag_frame_hdr hdr;
85  uint32_t         unused_1;
86  uint32_t         unused_2;
87  struct wag_txparams  txinfo;
88  char data[1];
89};
90
91struct ieee_802_11_header {
92        uint8_t      protocol:2;
93        uint8_t      type:2;
94        uint8_t      subtype:4;
95        uint8_t      to_ds:1;
96        uint8_t      from_ds:1;
97        uint8_t      more_frag:1;
98        uint8_t      retry:1;
99        uint8_t      power:1;
100        uint8_t      more_data:1;
101        uint8_t      wep:1;
102        uint8_t      order:1;
103        uint16_t     duration;
104        uint8_t      mac1[6];
105        uint8_t      mac2[6];
106        uint8_t      mac3[6];
107        uint16_t     SeqCtl;
108        uint8_t      mac4[6];
109        uint8_t      data[1];
110};
111
112struct ieee_802_11_payload {
113        uint16_t     type;
114        uint8_t      data[1];
115};
116
117#endif
Note: See TracBrowser for help on using the repository browser.