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

void print_mgmt_frame ( MrvlIETypes_MgmtFrameSet_t *  mgmt_tlv,
int  tlv_len 
)

Prints mgmt frame.

Parameters:
mgmt_tlvA pointer to mgmt_tlv
tlv_lenLength of tlv payload
Returns:
N/A

Definition at line 275 of file uapevent.c.

References hexdump(), print_mac(), SUBTYPE_ASSOC_REQUEST, SUBTYPE_ASSOC_RESPONSE, SUBTYPE_REASSOC_REQUEST, SUBTYPE_REASSOC_RESPONSE, and uap_le16_to_cpu.

Referenced by print_event_sta_assoc().

{
    IEEEtypes_AssocRqst_t *assoc_req = NULL;
    IEEEtypes_ReAssocRqst_t *reassoc_req = NULL;
    IEEEtypes_AssocRsp_t *assoc_resp = NULL;
    u16 frmctl = 0;
    printf("\nMgmt Frame:\n");
    memcpy(&frmctl, &mgmt_tlv->FrameControl, sizeof(u16));
    printf("FrameControl: 0x%x\n", frmctl);
    if (mgmt_tlv->FrameControl.Type != 0) {
        printf("Frame type=%d subtype=%d:\n", mgmt_tlv->FrameControl.Type,
               mgmt_tlv->FrameControl.Subtype);
        hexdump(mgmt_tlv->FrameContents, tlv_len - sizeof(u16), ' ');
        return;
    }
    switch (mgmt_tlv->FrameControl.Subtype) {
    case SUBTYPE_ASSOC_REQUEST:
        printf("Assoc Request:\n");
        assoc_req = (IEEEtypes_AssocRqst_t *) mgmt_tlv->FrameContents;
        printf("CapInfo: 0x%x  ListenInterval: 0x%x \n",
               uap_le16_to_cpu(assoc_req->CapInfo),
               uap_le16_to_cpu(assoc_req->ListenInterval));
        printf("AssocReqIE:\n");
        hexdump(assoc_req->IEBuffer,
                tlv_len - sizeof(IEEEtypes_AssocRqst_t) -
                sizeof(IEEEtypes_FrameCtl_t), ' ');
        break;
    case SUBTYPE_REASSOC_REQUEST:
        printf("ReAssoc Request:\n");
        reassoc_req = (IEEEtypes_ReAssocRqst_t *) mgmt_tlv->FrameContents;
        printf("CapInfo: 0x%x  ListenInterval: 0x%x \n",
               uap_le16_to_cpu(reassoc_req->CapInfo),
               uap_le16_to_cpu(reassoc_req->ListenInterval));
        printf("Current AP address: ");
        print_mac(reassoc_req->CurrentApAddr);
        printf("\nReAssocReqIE:\n");
        hexdump(reassoc_req->IEBuffer,
                tlv_len - sizeof(IEEEtypes_ReAssocRqst_t) -
                sizeof(IEEEtypes_FrameCtl_t), ' ');
        break;
    case SUBTYPE_ASSOC_RESPONSE:
    case SUBTYPE_REASSOC_RESPONSE:
        if (mgmt_tlv->FrameControl.Subtype == SUBTYPE_ASSOC_RESPONSE)
            printf("Assoc Response:\n");
        else
            printf("ReAssoc Response:\n");
        assoc_resp = (IEEEtypes_AssocRsp_t *) mgmt_tlv->FrameContents;
        printf("CapInfo: 0x%x  StatusCode: %d  AID: 0x%x \n",
               uap_le16_to_cpu(assoc_resp->CapInfo),
               (int) (uap_le16_to_cpu(assoc_resp->StatusCode)),
               uap_le16_to_cpu(assoc_resp->AId) & 0x3fff);
        break;
    default:
        printf("Frame subtype = %d:\n", mgmt_tlv->FrameControl.Subtype);
        hexdump(mgmt_tlv->FrameContents, tlv_len - sizeof(u16), ' ');
        break;
    }
    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