sta: add sta_connection_state enum

Make the connection state of a sta-info more readable by introducing an
enum for the STA connection state.

Also switch come comparison cases to use the explicit enum values to
make the code more readable.

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer
2021-09-27 19:35:55 +02:00
parent 30f9ba7617
commit d3ff0d59da
5 changed files with 17 additions and 11 deletions

View File

@@ -54,6 +54,12 @@ enum usteer_node_type {
NODE_TYPE_REMOTE,
};
enum usteer_sta_connection_state {
STA_NOT_CONNECTED = 0,
STA_CONNECTED = 1,
STA_DISCONNECTED = 2,
};
struct sta_info;
struct usteer_local_node;
struct usteer_remote_host;