3 #include <linenoise/linenoise.h>
5 #include "client_auth.h"
9 volatile struct ClientAuth client_auth;
11 static bool name_prompt()
13 if (! (client_auth.name = linenoise("Enter name: ")))
16 printf("Authenticating as %s...\n", client_auth.name);
17 client_auth.state = AUTH_WAIT;
19 dragonnet_peer_send_ToServerAuth(client, &(ToServerAuth) {
20 .name = client_auth.name,
26 bool client_auth_init()
28 client_auth.state = AUTH_INIT;
30 while (! interrupt->done) {
31 switch (client_auth.state) {
50 void client_auth_deinit()
52 linenoiseFree(client_auth.name);