8 #ifndef WLAN_ACTIONS_H_
9 #define WLAN_ACTIONS_H_
14 #include <rofl/common/logging.h>
15 #include <rofl/common/cmemory.h>
19 namespace experimental {
23 WLAN_EXP_ID = 0x5555a783,
26 enum wlan_action_type_t {
27 WLAN_ACTION_PUSH_WLAN,
35 } __attribute__((packed));
41 } __attribute__((packed));
47 } __attribute__((packed));
61 set_exp_type(exptype);
112 get_exp_type()
const {
122 set_exp_type(uint16_t exptype) {
132 get_exp_len()
const {
142 set_exp_len(uint16_t explen) {
152 os <<
rofl::indent(0) <<
"<cofaction_exp_body_wlan exp-type: 0x" <<
153 std::hex << (
unsigned int)body.get_exp_type() << std::dec
156 os << dynamic_cast<const rofl::cmemory&>( body );
170 uint16_t ethertype = 0) :
172 WLAN_ACTION_PUSH_WLAN,
174 set_ether_type(ethertype);
224 get_ether_type()
const {
234 set_ether_type(uint16_t ethertype) {
244 os <<
rofl::indent(0) <<
"<cofaction_push_wlan ether-type: 0x" <<
245 std::hex << (
unsigned int)action.get_ether_type() << std::dec
248 os << dynamic_cast<const rofl::cmemory&>( action );
264 uint16_t ethertype = 0) :
266 WLAN_ACTION_POP_WLAN,
268 set_ether_type(ethertype);
318 get_ether_type()
const {
328 set_ether_type(uint16_t ethertype) {
338 os <<
rofl::indent(0) <<
"<cofaction_pop_wlan ether-type: 0x" <<
339 std::hex << (
unsigned int)action.get_ether_type() << std::dec
342 os << dynamic_cast<const rofl::cmemory&>( action );
size_t memlen() const
Returns length of allocated memory area.
Definition: cmemory.cc:109
uint8_t * somem() const
Returns pointer to start of allocated memory area.
Definition: cmemory.cc:101
Definition: croflexception.h:65
Definition: wlan_actions.h:163
C++ abstraction for malloc'ed memory areas.
Definition: cmemory.h:44
Definition: wlan_actions.h:51
Definition: wlan_actions.h:31
cmemory & operator=(cmemory const &m)
Assignment operator.
Definition: cmemory.cc:85
Definition: wlan_actions.h:37
Definition: wlan_actions.h:257
Definition: wlan_actions.h:43