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_DISSECTOR_DEFAULT_HOOKS_HH_
00023 # define WIFI_FRAME_DISSECTOR_DEFAULT_HOOKS_HH_
00024
00025 # include <wipal/wifi/frame/mgt.hh>
00026 # include <wipal/wifi/frame/ctl.hh>
00027 # include <wipal/wifi/frame/data.hh>
00028 # include <wipal/wifi/frame/dissector/status.hh>
00029
00030 namespace wifi
00031 {
00032
00033 namespace frame
00034 {
00057 struct dissector_default_hooks
00058 {
00060 typedef dissector_status::status status;
00061
00062 protected:
00063
00064
00066
00068
00069 void invalid_type_or_subtype_hook(const void*, size_t, status);
00070 void invalid_type_hook(const void*, size_t);
00071 void invalid_subtype_hook(const void*, size_t, status);
00072 void invalid_management_subtype_hook(const mgt::header*, size_t);
00073 void invalid_control_subtype_hook(const void*, size_t);
00074 void invalid_data_subtype_hook(const void*, size_t, status);
00075
00077
00078
00079
00081
00083
00084
00086 void frame_hook(const void*, size_t);
00087
00094 void addr_hook(const void*, size_t, unsigned, const addr&);
00095
00102 void seq_ctl_hook(const void*, size_t, unsigned, unsigned);
00103
00105 void end_of_frame_headers_hook(const void*, size_t, const void*);
00106
00108 void end_of_frame_hook(const void*, size_t, status);
00109
00111 void management_hook(const mgt::header*, size_t);
00112
00114 void control_hook(const void*, size_t);
00115
00117 void data_hook(const void*, size_t);
00118
00120
00121
00122
00124
00126
00127 void truncated_frame_hook(const void*, size_t, status);
00128 void truncated_unknown_frame_hook(const void*, size_t);
00129 void truncated_management_frame_hook(const mgt::header*, size_t,
00130 status);
00131 void truncated_ps_poll_frame_hook(const ctl::ps_poll::header*,
00132 size_t, status);
00133 void truncated_rts_frame_hook(const ctl::rts::header*, size_t,
00134 status);
00135 void truncated_cf_end_frame_hook(const ctl::cf_end::header*, size_t,
00136 status);
00137 void truncated_cf_end_cf_ack_frame_hook(const ctl::cf_end_cf_ack::
00138 header*, size_t, status);
00139 void truncated_cts_frame_hook(const ctl::cts::header*, size_t);
00140 void truncated_ack_frame_hook(const ctl::ack::header*, size_t);
00141 void truncated_data_frame_hook(const void*, size_t, status);
00142
00143
00144
00145
00147
00149
00150
00151 void management_addr1_hook(const mgt::header*, size_t);
00152 void management_addr2_hook(const mgt::header*, size_t);
00153 void management_addr3_hook(const mgt::header*, size_t);
00154 void management_seq_ctl_hook(const mgt::header*, size_t,
00155 unsigned, unsigned);
00156
00157
00158 void beacon_hook(const mgt::header*, size_t);
00159 void assoc_req_hook(const mgt::header*, size_t);
00160 void assoc_resp_hook(const mgt::header*, size_t);
00161 void reassoc_req_hook(const mgt::header*, size_t);
00162 void reassoc_resp_hook(const mgt::header*, size_t);
00163 void probe_req_hook(const mgt::header*, size_t);
00164 void probe_resp_hook(const mgt::header*, size_t);
00165 void atim_hook(const mgt::header*, size_t);
00166 void disassoc_hook(const mgt::header*, size_t);
00167 void auth_hook(const mgt::header*, size_t);
00168 void deauth_hook(const mgt::header*, size_t);
00169
00171
00172
00173
00175
00177
00178
00179 void ps_poll_hook(const ctl::ps_poll::header*, size_t);
00180 void rts_hook(const ctl::rts::header*, size_t);
00181 void cf_end_hook(const ctl::cf_end::header*, size_t);
00182 void cf_end_cf_ack_hook(const ctl::cf_end_cf_ack::header*, size_t);
00183 void cts_hook(const ctl::cts::header*, size_t);
00184 void ack_hook(const ctl::ack::header*, size_t);
00185
00186
00187
00188
00189 void ps_poll_addr1_hook(const ctl::ps_poll::header*, size_t);
00190 void ps_poll_addr2_hook(const ctl::ps_poll::header*, size_t);
00191
00192
00193 void rts_addr1_hook(const ctl::rts::header*, size_t);
00194 void rts_addr2_hook(const ctl::rts::header*, size_t);
00195
00196
00197 void cf_end_addr1_hook(const ctl::cf_end::header*, size_t);
00198 void cf_end_addr2_hook(const ctl::cf_end::header*, size_t);
00199
00200
00201 void cf_end_cf_ack_addr1_hook(const ctl::cf_end_cf_ack::header*, size_t);
00202 void cf_end_cf_ack_addr2_hook(const ctl::cf_end_cf_ack::header*, size_t);
00203
00204
00205 void cts_addr1_hook(const ctl::cts::header*, size_t);
00206
00207
00208 void ack_addr1_hook(const ctl::ack::header*, size_t);
00209
00211
00212
00214
00216
00217
00218 void data_addr1_hook(const void*, size_t);
00219 void data_addr2_hook(const void*, size_t);
00220 void data_addr3_hook(const void*, size_t);
00221 void data_addr4_hook(const void*, size_t);
00222 void data_seq_ctl_hook(const void*, size_t, unsigned, unsigned);
00223
00224
00225 void data_only_hook(const void*, size_t, status);
00226 void data_cf_ack_hook(const void*, size_t, status);
00227 void data_cf_poll_hook(const void*, size_t, status);
00228 void data_cf_ack_cf_poll_hook(const void*, size_t, status);
00229 void null_hook(const void*, size_t, status);
00230 void cf_ack_hook(const void*, size_t, status);
00231 void cf_poll_hook(const void*, size_t, status);
00232 void cf_ack_cf_poll_hook(const void*, size_t, status);
00233
00234 void within_ibss_hook(const data::within_ibss::header*, size_t);
00235 void from_ds_hook(const data::from_ds::header*, size_t);
00236 void to_ds_hook(const data::to_ds::header*, size_t);
00237 void ap_to_ap_hook(const data::ap_to_ap::header*, size_t);
00238
00240
00241 };
00242
00243 }
00244
00245 }
00246
00247 # include "default_hooks.hxx"
00248
00249 #endif // ! WIFI_FRAME_DISSECTOR_DEFAULT_HOOKS_HH_