cybersecurity · intermediate · ~15 min · safe pentest lab

802.11 frame subtype

Extract the upper nibble.

Challenge

The subtype is bits 4-7 of the Frame Control first byte. Implement int frame_subtype(unsigned char fc0) returning (fc0 >> 4) & 0xF.

Starter code

int frame_subtype(unsigned char fc0) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.