Moep Library  2.0-nc
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
moep_hdr_ext.h
Go to the documentation of this file.
1 /*
2  * Copyright 2013, 2014 Maurice Leclaire <leclaire@in.tum.de>
3  * Stephan M. Guenther <moepi@moepi.net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  *
9  * See COPYING for more details.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
28 #ifndef __MOEP80211_MOEP_HDR_EXT_H
29 #define __MOEP80211_MOEP_HDR_EXT_H
30 
31 #include <moep/types.h>
32 #include <moep/frame.h>
33 
34 
35 /* Possible values of header types */
36 #define MOEP_HDR_NEXTHDR_PRESENT 0x40
37 
38 #define MOEP_HDR_MASK (MOEP_HDR_NEXTHDR_PRESENT - 1)
39 
40 enum moep_hdr_type {
41  MOEP_HDR_INVALID = 0x00,
42  MOEP_HDR_PCTRL,
43 
44  MOEP_HDR_VENDOR_MIN = 0x20,
45 
46  MOEP_HDR_COUNT = MOEP_HDR_MASK + 1,
47 };
48 
49 struct moep_hdr_ext {
50  u8 type;
51  u8 len;
52 } __attribute__((packed));
53 
55  struct moep_hdr_ext hdr;
56  u16 type;
57  u16 len;
58 } __attribute__((packed));
59 
60 
83  enum moep_hdr_type type);
84 
108  enum moep_hdr_type type,
109  size_t len);
110 
133  struct moep_hdr_ext *ext);
134 
155  enum moep_hdr_type type);
156 
158 #endif /* __MOEP80211_MOEP_HDR_EXT_H */
struct moep_hdr_ext * moep_frame_moep_hdr_ext(moep_frame_t frame, enum moep_hdr_type type)
moep header extension
Definition: moep_hdr_ext.h:54
struct moep_frame * moep_frame_t
a moep frame
Definition: frame.h:45
int moep_frame_del_moep_hdr_ext(moep_frame_t frame, enum moep_hdr_type type)
delete a moep header extension
struct moep_hdr_ext * moep_frame_add_moep_hdr_ext(moep_frame_t frame, enum moep_hdr_type type, size_t len)
add a moep header extension
Definition: moep_hdr_ext.h:49
struct moep_hdr_ext * moep_frame_set_moep_hdr_ext(moep_frame_t frame, struct moep_hdr_ext *ext)
set a moep header extension