cybersecurity · intermediate · ~15 min · safe pentest lab
Extract a bitfield from a control byte.
In the 802.11 Frame Control field, the type is bits 2-3 of the first byte. Implement int frame_type(unsigned char fc0) returning (fc0 >> 2) & 0x3.
int frame_type(unsigned char fc0) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.