cybersecurity · beginner · ~15 min · safe pentest lab
Read the AD length byte.
A BLE advertising data structure is Length-Type-Value; byte 0 is the length (of type+value). Implement int ad_length(const unsigned char *ad) returning ad[0].
int ad_length(const unsigned char *ad) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.