Logo Search packages:      
Sourcecode: uapevent version File versions  Download package

void print_event_debug ( u8 buffer,
u16  size 
)

Parse and print debug event data.

Parameters:
bufferPointer to received buffer
sizeLength of the received event data
Returns:
N/A

Definition at line 505 of file uapevent.c.

References DEBUG_ID_MAJ_ASSOC_AGENT, DEBUG_ID_MAJ_ASSOC_MIN_STA_REJ, DEBUG_ID_MAJ_ASSOC_MIN_WPA_IE, DEBUG_ID_MAJ_AUTHENTICATOR, DEBUG_MAJ_AUTH_MIN_EAPOL_TR, DEBUG_MAJ_AUTH_MIN_GWK1, DEBUG_MAJ_AUTH_MIN_GWK2, DEBUG_MAJ_AUTH_MIN_PWK1, DEBUG_MAJ_AUTH_MIN_PWK2, DEBUG_MAJ_AUTH_MIN_PWK3, DEBUG_MAJ_AUTH_MIN_PWK4, DEBUG_MAJ_AUTH_MIN_STA_REJ, hexdump(), MAX_WPA_IE_LEN, print_eapol_state(), print_mac(), print_reject_reason(), print_reject_state(), uap_le16_to_cpu, and uap_le32_to_cpu.

Referenced by print_event().

{
    EVENTBUF_DEBUG *event_body = NULL;
    if (size < sizeof(EVENTBUF_DEBUG)) {
        printf("ERR:Event buffer too small!\n");
        return;
    }
    event_body = (EVENTBUF_DEBUG *) buffer;
    printf("Debug Event Type: %s\n",
           (event_body->debugtype == 0) ? "EVENT" : "INFO");
    printf("%s log:\n",
           (uap_le32_to_cpu(event_body->debugIdMajor) ==
            DEBUG_ID_MAJ_AUTHENTICATOR) ? "Authenticator" : "Assoc_agent");
    if (uap_le32_to_cpu(event_body->debugIdMajor) == DEBUG_ID_MAJ_AUTHENTICATOR) {
        switch (uap_le32_to_cpu(event_body->debugIdMinor)) {
        case DEBUG_MAJ_AUTH_MIN_PWK1:
            printf("EAPOL Key message 1 (PWK):\n");
            hexdump((u8 *) & event_body->info.eapol_pwkMsg,
                    sizeof(EAPOL_KeyMsg_Debug_t), ' ');
            break;
        case DEBUG_MAJ_AUTH_MIN_PWK2:
            printf("EAPOL Key message 2 (PWK):\n");
            hexdump((u8 *) & event_body->info.eapol_pwkMsg,
                    sizeof(EAPOL_KeyMsg_Debug_t), ' ');
            break;
        case DEBUG_MAJ_AUTH_MIN_PWK3:
            printf("EAPOL Key message 3 (PWK):\n");
            hexdump((u8 *) & event_body->info.eapol_pwkMsg,
                    sizeof(EAPOL_KeyMsg_Debug_t), ' ');
            break;
        case DEBUG_MAJ_AUTH_MIN_PWK4:
            printf("EAPOL Key message 4: (PWK)\n");
            hexdump((u8 *) & event_body->info.eapol_pwkMsg,
                    sizeof(EAPOL_KeyMsg_Debug_t), ' ');
            break;
        case DEBUG_MAJ_AUTH_MIN_GWK1:
            printf("EAPOL Key message 1: (GWK)\n");
            hexdump((u8 *) & event_body->info.eapol_pwkMsg,
                    sizeof(EAPOL_KeyMsg_Debug_t), ' ');
            break;
        case DEBUG_MAJ_AUTH_MIN_GWK2:
            printf("EAPOL Key message 2: (GWK)\n");
            hexdump((u8 *) & event_body->info.eapol_pwkMsg,
                    sizeof(EAPOL_KeyMsg_Debug_t), ' ');
            break;
        case DEBUG_MAJ_AUTH_MIN_STA_REJ:
            printf("Reject STA MAC: ");
            print_mac(event_body->info.sta_reject.staMacAddr);
            printf("\n");
            print_reject_state(event_body->info.sta_reject.reject_state);
            print_reject_reason(uap_le16_to_cpu
                                (event_body->info.sta_reject.reject_reason));
            break;
        case DEBUG_MAJ_AUTH_MIN_EAPOL_TR:
            printf("STA MAC: ");
            print_mac(event_body->info.eapol_state.staMacAddr);
            printf("\n");
            print_eapol_state(event_body->info.eapol_state.eapolState);
            break;
        default:
            printf("ERR: unknow debugIdMinor: %d\n",
                   (int) uap_le32_to_cpu(event_body->debugIdMinor));
            hexdump(buffer, size, ' ');
            return;
        }
    } else if (uap_le32_to_cpu(event_body->debugIdMajor) ==
               DEBUG_ID_MAJ_ASSOC_AGENT) {
        switch (uap_le32_to_cpu(event_body->debugIdMinor)) {
        case DEBUG_ID_MAJ_ASSOC_MIN_WPA_IE:
            printf("STA MAC: ");
            print_mac(event_body->info.wpaIe.staMacAddr);
            printf("\n");
            printf("wpa ie:\n");
            hexdump(event_body->info.wpaIe.wpa_ie, MAX_WPA_IE_LEN, ' ');
            break;
        case DEBUG_ID_MAJ_ASSOC_MIN_STA_REJ:
            printf("Reject STA MAC: ");
            print_mac(event_body->info.sta_reject.staMacAddr);
            printf("\n");
            print_reject_state(event_body->info.sta_reject.reject_state);
            print_reject_reason(uap_le16_to_cpu
                                (event_body->info.sta_reject.reject_reason));
            break;
        default:
            printf("ERR: unknow debugIdMinor: %d\n",
                   (int) uap_le32_to_cpu(event_body->debugIdMinor));
            hexdump(buffer, size, ' ');
            return;
        }
    }
    return;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index