00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef WIFI_FRAME_FRAME_HH_
00023 # define WIFI_FRAME_FRAME_HH_
00024
00025 extern "C"
00026 {
00027 # include <stdint.h>
00028 }
00029
00030 # include <trace-tools/wifi/addr.hh>
00031
00032 namespace wifi
00033 {
00034
00036 namespace frame
00037 {
00038
00040 namespace type
00041 {
00042
00044 enum frame_type
00045 {
00046 management = 0,
00047 control = 1,
00048 data = 2,
00049 reserved = 3
00050 };
00051
00052 }
00053
00054
00055
00056
00057
00059 unsigned
00060 protocol_version_of(const void*);
00061
00063 type::frame_type
00064 type_of(const void*);
00065
00067 unsigned
00068 subtype_of(const void*);
00069
00071 uint8_t
00072 control_flags_of(const void*);
00073
00074
00075
00076
00077
00079 bool
00080 control_flag(const unsigned flag, const void* frame);
00081
00083 bool
00084 to_ds(const void*);
00085
00087 bool
00088 from_ds(const void*);
00089
00090
00091
00092
00093
00095 unsigned
00096 duration_of(const void*);
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00122 const addr*
00123 transmitter_address(const void* frame);
00124
00135 const addr*
00136 bssid_address(const void*, size_t caplen = 30);
00137
00138 }
00139
00140 }
00141
00142 # include "frame.hxx"
00143
00144 #endif // ! WIFI_FRAME_FRAME_HH_