#include <wipal/wifi/frame/dissector/default_hooks.hh>
Public Types | |
typedef dissector_status::status | status |
Protected Member Functions | |
Invalid frame hooks | |
void | invalid_type_or_subtype_hook (const void *, size_t, status) |
void | invalid_type_hook (const void *, size_t) |
void | invalid_subtype_hook (const void *, size_t, status) |
void | invalid_management_subtype_hook (const mgt::header *, size_t) |
void | invalid_control_subtype_hook (const void *, size_t) |
void | invalid_data_subtype_hook (const void *, size_t, status) |
Basic hooks | |
void | frame_hook (const void *, size_t) |
void | addr_hook (const void *, size_t, unsigned, const addr &) |
void | seq_ctl_hook (const void *, size_t, unsigned, unsigned) |
void | end_of_frame_headers_hook (const void *, size_t, const void *) |
void | end_of_frame_hook (const void *, size_t, status) |
void | management_hook (const mgt::header *, size_t) |
void | control_hook (const void *, size_t) |
void | data_hook (const void *, size_t) |
Truncation hook | |
void | truncated_frame_hook (const void *, size_t, status) |
void | truncated_unknown_frame_hook (const void *, size_t) |
void | truncated_management_frame_hook (const mgt::header *, size_t, status) |
void | truncated_ps_poll_frame_hook (const ctl::ps_poll::header *, size_t, status) |
void | truncated_rts_frame_hook (const ctl::rts::header *, size_t, status) |
void | truncated_cf_end_frame_hook (const ctl::cf_end::header *, size_t, status) |
void | truncated_cf_end_cf_ack_frame_hook (const ctl::cf_end_cf_ack::header *, size_t, status) |
void | truncated_cts_frame_hook (const ctl::cts::header *, size_t) |
void | truncated_ack_frame_hook (const ctl::ack::header *, size_t) |
void | truncated_data_frame_hook (const void *, size_t, status) |
Management frame hooks | |
void | management_addr1_hook (const mgt::header *, size_t) |
void | management_addr2_hook (const mgt::header *, size_t) |
void | management_addr3_hook (const mgt::header *, size_t) |
void | management_seq_ctl_hook (const mgt::header *, size_t, unsigned, unsigned) |
void | beacon_hook (const mgt::header *, size_t) |
void | assoc_req_hook (const mgt::header *, size_t) |
void | assoc_resp_hook (const mgt::header *, size_t) |
void | reassoc_req_hook (const mgt::header *, size_t) |
void | reassoc_resp_hook (const mgt::header *, size_t) |
void | probe_req_hook (const mgt::header *, size_t) |
void | probe_resp_hook (const mgt::header *, size_t) |
void | atim_hook (const mgt::header *, size_t) |
void | disassoc_hook (const mgt::header *, size_t) |
void | auth_hook (const mgt::header *, size_t) |
void | deauth_hook (const mgt::header *, size_t) |
Control frame hooks | |
void | ps_poll_hook (const ctl::ps_poll::header *, size_t) |
void | rts_hook (const ctl::rts::header *, size_t) |
void | cf_end_hook (const ctl::cf_end::header *, size_t) |
void | cf_end_cf_ack_hook (const ctl::cf_end_cf_ack::header *, size_t) |
void | cts_hook (const ctl::cts::header *, size_t) |
void | ack_hook (const ctl::ack::header *, size_t) |
void | ps_poll_addr1_hook (const ctl::ps_poll::header *, size_t) |
void | ps_poll_addr2_hook (const ctl::ps_poll::header *, size_t) |
void | rts_addr1_hook (const ctl::rts::header *, size_t) |
void | rts_addr2_hook (const ctl::rts::header *, size_t) |
void | cf_end_addr1_hook (const ctl::cf_end::header *, size_t) |
void | cf_end_addr2_hook (const ctl::cf_end::header *, size_t) |
void | cf_end_cf_ack_addr1_hook (const ctl::cf_end_cf_ack::header *, size_t) |
void | cf_end_cf_ack_addr2_hook (const ctl::cf_end_cf_ack::header *, size_t) |
void | cts_addr1_hook (const ctl::cts::header *, size_t) |
void | ack_addr1_hook (const ctl::ack::header *, size_t) |
Data frame hooks | |
void | data_addr1_hook (const void *, size_t) |
void | data_addr2_hook (const void *, size_t) |
void | data_addr3_hook (const void *, size_t) |
void | data_addr4_hook (const void *, size_t) |
void | data_seq_ctl_hook (const void *, size_t, unsigned, unsigned) |
void | data_only_hook (const void *, size_t, status) |
void | data_cf_ack_hook (const void *, size_t, status) |
void | data_cf_poll_hook (const void *, size_t, status) |
void | data_cf_ack_cf_poll_hook (const void *, size_t, status) |
void | null_hook (const void *, size_t, status) |
void | cf_ack_hook (const void *, size_t, status) |
void | cf_poll_hook (const void *, size_t, status) |
void | cf_ack_cf_poll_hook (const void *, size_t, status) |
void | within_ibss_hook (const data::within_ibss::header *, size_t) |
void | from_ds_hook (const data::from_ds::header *, size_t) |
void | to_ds_hook (const data::to_ds::header *, size_t) |
void | ap_to_ap_hook (const data::ap_to_ap::header *, size_t) |
The dissector class template parses IEEE 802.11 frames and calls hooks at different stages of this parsing. This class provides all the hook functions a dissector may need. These implementations are empty, i.e. they do nothing when called.
Implementing hook functions is a tedious work, and it is unlikely you need all the hooks that dissector requires. This class therefore aims at making the task easier. Just subclass it so you will not have to provide implementations of hooks you do not need. You may then just override the hooks you need.
Hooks have consistent prototypes. Their first two arguments are always a pointer to the frame, and the number of available bytes in the frame. When relevant (that is, when the parser state may vary through different calls to this hook) a third argument provides the parser state. Sometimes there is also extra arguments such as the address that has just been parsed, the frame sequence number, etc.
void wifi::frame::dissector_default_hooks::frame_hook | ( | const void * | , | |
size_t | ||||
) | [inline, protected] |
Called before starting the parsing.
void wifi::frame::dissector_default_hooks::addr_hook | ( | const void * | , | |
size_t | , | |||
unsigned | , | |||
const addr & | ||||
) | [inline, protected] |
An address field has just been parsed.
The third argument is the address' position (i.e. 1, 2, 3, or 4) and the last argument is the address itself.
Reimplemented in wit::importer::hooks.
void wifi::frame::dissector_default_hooks::seq_ctl_hook | ( | const void * | , | |
size_t | , | |||
unsigned | , | |||
unsigned | ||||
) | [inline, protected] |
The sequence control field has just been parsed.
The third argument is the fragment number. The fourth one is the sequence number.
Reimplemented in wit::importer::hooks.
void wifi::frame::dissector_default_hooks::end_of_frame_headers_hook | ( | const void * | , | |
size_t | , | |||
const void * | ||||
) | [inline, protected] |
End of frame headers reached.
void wifi::frame::dissector_default_hooks::end_of_frame_hook | ( | const void * | , | |
size_t | , | |||
status | ||||
) | [inline, protected] |
void wifi::frame::dissector_default_hooks::management_hook | ( | const mgt::header * | , | |
size_t | ||||
) | [inline, protected] |
Called before starting to parse a management frame.
void wifi::frame::dissector_default_hooks::control_hook | ( | const void * | , | |
size_t | ||||
) | [inline, protected] |
Called before starting to parse a control frame.
void wifi::frame::dissector_default_hooks::data_hook | ( | const void * | , | |
size_t | ||||
) | [inline, protected] |
Called before starting to parse a data frame.