Read a name and password from the console. More...
Go to the source code of this file.
Functions | |
| int | console_login (const char *service, char *name, int namelen, char *pass, int passlen) |
| Read a name and password from the console. | |
| int | console_input (const char *prompt, char *buf, int buflen) |
| Read a string from the console. | |
Read a name and password from the console.
| int console_login | ( | const char * | service, | |
| char * | name, | |||
| int | namelen, | |||
| char * | pass, | |||
| int | passlen | |||
| ) |
Read a name and password from the console.
This routine will set the console to no-echo mode, carefully read a name and password, and then set the mode back.
| service | The name of the service to which the user is authenticating, such as a hostname. | |
| name | A pointer to a buffer to hold the user's name. | |
| namelen | The size of the name buffer in bytes. | |
| pass | A pointer to a buffer to hold the user's password. | |
| passlen | The size of the name buffer in bytes. |
| int console_input | ( | const char * | prompt, | |
| char * | buf, | |||
| int | buflen | |||
| ) |
Read a string from the console.
This routine will set the console to no-echo mode, carefully read a generic string, and then set the mode back.
| prompt | The prompt to be displayed on the command line. | |
| buf | A pointer to a buffer to hold the string. | |
| buflen | The size of the buffer in bytes. |
1.7.1