cybersecurity · beginner · ~15 min · safe pentest lab
Read the AD type byte.
The AD type is byte 1 (e.g. 0x01 = flags, 0x09 = complete local name). Implement int ad_type(const unsigned char *ad) returning ad[1].
int ad_type(const unsigned char *ad) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.