| 3960 | } |
| 3961 | |
| 3962 | static const char * |
| 3963 | mesh_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 | |
| 3982 | static const char * |
| 3983 | get_chaninfo(const struct ieee80211_channel *c, int precise, |
no test coverage detected