diff options
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/src/test_generation.c | 24 |
1 files changed, 12 insertions, 12 deletions
| diff --git a/utils/src/test_generation.c b/utils/src/test_generation.c index f269fe4..b77a2fc 100644 --- a/utils/src/test_generation.c +++ b/utils/src/test_generation.c | |||
| @@ -186,7 +186,7 @@ void inject_probe_responses() { | |||
| 186 | struct libwifi_probe_resp probe_resp; | 186 | struct libwifi_probe_resp probe_resp; |
| 187 | memset(&probe_resp, 0, sizeof(struct libwifi_probe_resp)); | 187 | memset(&probe_resp, 0, sizeof(struct libwifi_probe_resp)); |
| 188 | 188 | ||
| 189 | libwifi_create_probe_resp(&probe_resp, to, from, PROBE_RESP_SSID, CHANNEL); | 189 | libwifi_create_probe_resp(&probe_resp, to, from, from, PROBE_RESP_SSID, CHANNEL); |
| 190 | libwifi_quick_add_tag(&probe_resp.tags, TAG_VENDOR_SPECIFIC, tag_data1, sizeof(tag_data1)); | 190 | libwifi_quick_add_tag(&probe_resp.tags, TAG_VENDOR_SPECIFIC, tag_data1, sizeof(tag_data1)); |
| 191 | 191 | ||
| 192 | unsigned char *buf = NULL; | 192 | unsigned char *buf = NULL; |
| @@ -258,7 +258,7 @@ void inject_deauths() { | |||
| 258 | struct libwifi_deauth deauth; | 258 | struct libwifi_deauth deauth; |
| 259 | memset(&deauth, 0, sizeof(struct libwifi_deauth)); | 259 | memset(&deauth, 0, sizeof(struct libwifi_deauth)); |
| 260 | 260 | ||
| 261 | libwifi_create_deauth(&deauth, to, from, REASON_STA_LEAVING); | 261 | libwifi_create_deauth(&deauth, to, from, from, REASON_STA_LEAVING); |
| 262 | 262 | ||
| 263 | unsigned char *buf = NULL; | 263 | unsigned char *buf = NULL; |
| 264 | size_t buf_sz = libwifi_get_deauth_length(&deauth); | 264 | size_t buf_sz = libwifi_get_deauth_length(&deauth); |
| @@ -293,7 +293,7 @@ void inject_disassocs() { | |||
| 293 | struct libwifi_disassoc disassoc; | 293 | struct libwifi_disassoc disassoc; |
| 294 | memset(&disassoc, 0, sizeof(struct libwifi_disassoc)); | 294 | memset(&disassoc, 0, sizeof(struct libwifi_disassoc)); |
| 295 | 295 | ||
| 296 | libwifi_create_disassoc(&disassoc, to, from, REASON_STA_LEAVING); | 296 | libwifi_create_disassoc(&disassoc, to, from, from, REASON_STA_LEAVING); |
| 297 | 297 | ||
| 298 | unsigned char *buf = NULL; | 298 | unsigned char *buf = NULL; |
| 299 | size_t buf_sz = libwifi_get_disassoc_length(&disassoc); | 299 | size_t buf_sz = libwifi_get_disassoc_length(&disassoc); |
| @@ -328,7 +328,7 @@ void inject_assoc_requests() { | |||
| 328 | struct libwifi_assoc_req assoc_req; | 328 | struct libwifi_assoc_req assoc_req; |
| 329 | memset(&assoc_req, 0, sizeof(struct libwifi_assoc_req)); | 329 | memset(&assoc_req, 0, sizeof(struct libwifi_assoc_req)); |
| 330 | 330 | ||
| 331 | libwifi_create_assoc_req(&assoc_req, to, from, ASSOC_REQ_SSID, CHANNEL); | 331 | libwifi_create_assoc_req(&assoc_req, to, from, from, ASSOC_REQ_SSID, CHANNEL); |
| 332 | 332 | ||
| 333 | unsigned char *buf = NULL; | 333 | unsigned char *buf = NULL; |
| 334 | size_t buf_sz = libwifi_get_assoc_req_length(&assoc_req); | 334 | size_t buf_sz = libwifi_get_assoc_req_length(&assoc_req); |
| @@ -363,7 +363,7 @@ void inject_assoc_responses() { | |||
| 363 | struct libwifi_assoc_resp assoc_resp; | 363 | struct libwifi_assoc_resp assoc_resp; |
| 364 | memset(&assoc_resp, 0, sizeof(struct libwifi_assoc_req)); | 364 | memset(&assoc_resp, 0, sizeof(struct libwifi_assoc_req)); |
| 365 | 365 | ||
| 366 | libwifi_create_assoc_resp(&assoc_resp, to, from, CHANNEL); | 366 | libwifi_create_assoc_resp(&assoc_resp, to, from, from, CHANNEL); |
| 367 | 367 | ||
| 368 | unsigned char *buf = NULL; | 368 | unsigned char *buf = NULL; |
| 369 | size_t buf_sz = libwifi_get_assoc_resp_length(&assoc_resp); | 369 | size_t buf_sz = libwifi_get_assoc_resp_length(&assoc_resp); |
| @@ -398,7 +398,7 @@ void inject_reassoc_requests() { | |||
| 398 | struct libwifi_reassoc_req reassoc_req; | 398 | struct libwifi_reassoc_req reassoc_req; |
| 399 | memset(&reassoc_req, 0, sizeof(struct libwifi_assoc_req)); | 399 | memset(&reassoc_req, 0, sizeof(struct libwifi_assoc_req)); |
| 400 | 400 | ||
| 401 | libwifi_create_reassoc_req(&reassoc_req, to, from, reassoc_mac, REASSOC_REQ_SSID, CHANNEL); | 401 | libwifi_create_reassoc_req(&reassoc_req, to, from, from, reassoc_mac, REASSOC_REQ_SSID, CHANNEL); |
| 402 | 402 | ||
| 403 | unsigned char *buf = NULL; | 403 | unsigned char *buf = NULL; |
| 404 | size_t buf_sz = libwifi_get_reassoc_req_length(&reassoc_req); | 404 | size_t buf_sz = libwifi_get_reassoc_req_length(&reassoc_req); |
| @@ -434,7 +434,7 @@ void inject_reassoc_responses() { | |||
| 434 | struct libwifi_reassoc_resp reassoc_resp; | 434 | struct libwifi_reassoc_resp reassoc_resp; |
| 435 | memset(&reassoc_resp, 0, sizeof(struct libwifi_assoc_req)); | 435 | memset(&reassoc_resp, 0, sizeof(struct libwifi_assoc_req)); |
| 436 | 436 | ||
| 437 | libwifi_create_reassoc_resp(&reassoc_resp, to, from, CHANNEL); | 437 | libwifi_create_reassoc_resp(&reassoc_resp, to, from, from, CHANNEL); |
| 438 | 438 | ||
| 439 | unsigned char *buf = NULL; | 439 | unsigned char *buf = NULL; |
| 440 | size_t buf_sz = libwifi_get_reassoc_resp_length(&reassoc_resp); | 440 | size_t buf_sz = libwifi_get_reassoc_resp_length(&reassoc_resp); |
| @@ -469,7 +469,7 @@ void inject_auths() { | |||
| 469 | struct libwifi_auth auth; | 469 | struct libwifi_auth auth; |
| 470 | memset(&auth, 0, sizeof(struct libwifi_deauth)); | 470 | memset(&auth, 0, sizeof(struct libwifi_deauth)); |
| 471 | 471 | ||
| 472 | libwifi_create_auth(&auth, to, from, AUTH_OPEN, 0, STATUS_SUCCESS); | 472 | libwifi_create_auth(&auth, to, from, from, AUTH_OPEN, 0, STATUS_SUCCESS); |
| 473 | 473 | ||
| 474 | unsigned char *buf = NULL; | 474 | unsigned char *buf = NULL; |
| 475 | size_t buf_sz = libwifi_get_auth_length(&auth); | 475 | size_t buf_sz = libwifi_get_auth_length(&auth); |
| @@ -487,7 +487,7 @@ void inject_auths() { | |||
| 487 | 487 | ||
| 488 | memset(&auth, 0, sizeof(struct libwifi_deauth)); | 488 | memset(&auth, 0, sizeof(struct libwifi_deauth)); |
| 489 | 489 | ||
| 490 | libwifi_create_auth(&auth, from, to, AUTH_OPEN, 1, STATUS_SUCCESS); | 490 | libwifi_create_auth(&auth, from, to, to, AUTH_OPEN, 1, STATUS_SUCCESS); |
| 491 | 491 | ||
| 492 | buf = NULL; | 492 | buf = NULL; |
| 493 | buf_sz = libwifi_get_auth_length(&auth); | 493 | buf_sz = libwifi_get_auth_length(&auth); |
| @@ -527,7 +527,7 @@ void inject_timing_ads() { | |||
| 527 | memcpy(ad_fields.time_value, | 527 | memcpy(ad_fields.time_value, |
| 528 | "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA", 10); | 528 | "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA", 10); |
| 529 | 529 | ||
| 530 | libwifi_create_timing_advert(&time_ad, to, from, &ad_fields, "GB", -56, -56, -30, -20); | 530 | libwifi_create_timing_advert(&time_ad, to, from, from, &ad_fields, "GB", -56, -56, -30, -20); |
| 531 | 531 | ||
| 532 | unsigned char *buf = NULL; | 532 | unsigned char *buf = NULL; |
| 533 | size_t buf_len = libwifi_get_timing_advert_length(&time_ad); | 533 | size_t buf_len = libwifi_get_timing_advert_length(&time_ad); |
| @@ -562,7 +562,7 @@ void inject_action_noacks() { | |||
| 562 | struct libwifi_action action; | 562 | struct libwifi_action action; |
| 563 | memset(&action, 0, sizeof(struct libwifi_action)); | 563 | memset(&action, 0, sizeof(struct libwifi_action)); |
| 564 | 564 | ||
| 565 | libwifi_create_action_no_ack(&action, to, from, ACTION_FAST_BSS_TRANSITION); | 565 | libwifi_create_action_no_ack(&action, to, from, from, ACTION_FAST_BSS_TRANSITION); |
| 566 | 566 | ||
| 567 | unsigned char *action_buf = malloc(256); | 567 | unsigned char *action_buf = malloc(256); |
| 568 | memset(action_buf, 0, 256); | 568 | memset(action_buf, 0, 256); |
| @@ -637,7 +637,7 @@ void inject_actions() { | |||
| 637 | struct libwifi_action action; | 637 | struct libwifi_action action; |
| 638 | memset(&action, 0, sizeof(struct libwifi_action)); | 638 | memset(&action, 0, sizeof(struct libwifi_action)); |
| 639 | 639 | ||
| 640 | libwifi_create_action(&action, to, from, ACTION_FAST_BSS_TRANSITION); | 640 | libwifi_create_action(&action, to, from, from, ACTION_FAST_BSS_TRANSITION); |
| 641 | 641 | ||
| 642 | unsigned char *action_buf = malloc(256); | 642 | unsigned char *action_buf = malloc(256); |
| 643 | memset(action_buf, 0, 256); | 643 | memset(action_buf, 0, 256); |
