Moep Library  2.0-nc
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
frame.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 
30 #ifndef __MOEP80211_FRAME_H
31 #define __MOEP80211_FRAME_H
32 
33 #include <stddef.h>
34 
35 #include <moep/types.h>
36 
37 
38 struct moep_frame;
39 
45 typedef struct moep_frame *moep_frame_t;
46 
47 
60 u8 *moep_frame_get_payload(moep_frame_t frame, size_t *len);
61 
82 u8 *moep_frame_set_payload(moep_frame_t frame, u8 *payload, size_t len);
83 
100 u8 *moep_frame_adjust_payload_len(moep_frame_t frame, size_t len);
101 
117 int moep_frame_decode(moep_frame_t frame, u8 *buf, size_t buflen);
118 
148 int moep_frame_encode(moep_frame_t frame, u8 **buf, size_t buflen);
149 
158 void moep_frame_destroy(moep_frame_t frame);
159 
161 #endif /* __MOEP80211_FRAME_H */
u8 * moep_frame_get_payload(moep_frame_t frame, size_t *len)
return payload of a frame
struct moep_frame * moep_frame_t
a moep frame
Definition: frame.h:45
int moep_frame_encode(moep_frame_t frame, u8 **buf, size_t buflen)
encode a frame
u8 * moep_frame_adjust_payload_len(moep_frame_t frame, size_t len)
adjust the len of the payload of a frame
int moep_frame_decode(moep_frame_t frame, u8 *buf, size_t buflen)
decode a frame
u8 * moep_frame_set_payload(moep_frame_t frame, u8 *payload, size_t len)
set payload of a frame
void moep_frame_destroy(moep_frame_t frame)
destroy a frame