OpenVPN
Functions | Variables
console.c File Reference
#include "syshead.h"
#include "console.h"
#include "error.h"
#include "buffer.h"
#include "misc.h"
Include dependency graph for console.c:

Go to the source code of this file.

Functions

void query_user_clear (void)
 Wipes all data put into all of the query_user structs.
 
void query_user_add (char *prompt, size_t prompt_len, char *resp, size_t resp_len, bool echo)
 Adds an item to ask the user for.
 

Variables

struct _query_user query_user [QUERY_USER_NUMSLOTS]
 Global variable, declared in console.c.
 

Function Documentation

◆ query_user_add()

void query_user_add ( char *  prompt,
size_t  prompt_len,
char *  resp,
size_t  resp_len,
bool  echo 
)

Adds an item to ask the user for.

Parameters
promptPrompt to display to the user
prompt_lenLength of the prompt string
respString containing the user response
resp_lenLength of the response string
echoShould the user input be echoed to the user? If False, input will be masked

Definition at line 57 of file console.c.

References ASSERT, _query_user::echo, _query_user::prompt, _query_user::prompt_len, query_user, QUERY_USER_NUMSLOTS, _query_user::response, and _query_user::response_len.

Referenced by get_user_pass_cr().

◆ query_user_clear()

void query_user_clear ( void  )

Wipes all data put into all of the query_user structs.

Definition at line 45 of file console.c.

References CLEAR, query_user, and QUERY_USER_NUMSLOTS.

Referenced by get_user_pass_cr().

Variable Documentation

◆ query_user

struct _query_user query_user[QUERY_USER_NUMSLOTS]