24 if (
detail->detail_length != 0) {
27 detail->detail = malloc(data_len);
30 if (
detail->detail == NULL) {
34 detail->detail_length = data_len;
36 memcpy(
detail->detail, data, data_len);
37 detail->detail_length = data_len;
39 return detail->detail_length;
43 if (
detail->detail_length != 0) {
50 const unsigned char receiver[6],
51 const unsigned char transmitter[6],
52 const unsigned char address3[6],
70 const unsigned char receiver[6],
71 const unsigned char transmitter[6],
72 const unsigned char address3[6],
96 if (action_len > buf_len) {
int libwifi_create_action_no_ack(struct libwifi_action *action, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], uint8_t category)
void libwifi_free_action(struct libwifi_action *action)
Free data associated to a given libwifi_action.
size_t libwifi_add_action_detail(struct libwifi_action_detail *detail, const unsigned char *data, size_t data_len)
Create a detail for an action frame by supplying raw data and it's length.
size_t libwifi_dump_action(struct libwifi_action *action, unsigned char *buf, size_t buf_len)
Dump a given libwifi_action to a raw buffer.
void libwifi_free_action_detail(struct libwifi_action_detail *detail)
Free all memory in a given libwifi_action_detail.
size_t libwifi_get_action_length(struct libwifi_action *action)
Get the length of a given libwifi_action.
int libwifi_create_action(struct libwifi_action *action, const unsigned char receiver[6], const unsigned char transmitter[6], const unsigned char address3[6], uint8_t category)
Create a new action frame with a specified action and category.
struct libwifi_action_fixed_parameters fixed_parameters
struct libwifi_action_detail details
struct libwifi_action_detail details
struct libwifi_action_fixed_parameters fixed_parameters
struct libwifi_mgmt_unordered_frame_header frame_header
unsigned int sequence_number