MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mesh_linkstate_string

Function mesh_linkstate_string

tools/ifconfig/ifieee80211.c:3962–3980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3960}
3961
3962static const char *
3963mesh_linkstate_string(uint8_t state)
3964{
3965 static const char *state_names[] = {
3966 [0] = "IDLE",
3967 [1] = "OPEN-TX",
3968 [2] = "OPEN-RX",
3969 [3] = "CONF-RX",
3970 [4] = "ESTAB",
3971 [5] = "HOLDING",
3972 };
3973
3974 if (state >= nitems(state_names)) {
3975 static char buf[10];
3976 snprintf(buf, sizeof(buf), "#%u", state);
3977 return buf;
3978 } else
3979 return state_names[state];
3980}
3981
3982static const char *
3983get_chaninfo(const struct ieee80211_channel *c, int precise,

Callers 1

list_stationsFunction · 0.85

Calls 1

snprintfFunction · 0.85

Tested by

no test coverage detected