Subsystem utility functions are used to provide support functions to implement the subsystem.
More...
|
#define | SERVER_MAP_FILE_LINELEN 1024 |
| the server root mapfile lines can be 1023 chars max plus 1 char for the terminating zero
|
|
#define | SERVER_MAP_WILDCARD "*" |
| the server root line entry wildcard is a single '*' char
|
|
#define | SERVER_MAP_ID_MAXLEN 64 |
| matches the NcxName maximum length
|
|
Subsystem utility functions are used to provide support functions to implement the subsystem.
CLI parameters and RESTCONF request parameters are supported.
◆ clean_subsys_cb()
Clean the fields of a subsystem control block.
- Parameters
-
◆ configure_cli_parms()
void configure_cli_parms |
( |
subsys_cb_t * |
cb, |
|
|
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Configure CLI parameters.
Configure debug logging. This function evaluates command line arguments to configure debug logging.
Also configure the protocol in use
- Parameters
-
cb | control block to use to store parameter values |
argc | command line parameter count |
argv | array of command line parameter strings |
◆ get_server_root_mapfile()
Get the name of the server root mapfile set.
- Parameters
-
[in,out] | cb | control block to use
- cb->server_root_mapfile is set
- cb->server_root_from_env set
|
- Returns
- status
◆ get_ssh_parms()
Get the SSH environment parameters.
- Parameters
-
- Returns
- status
◆ init_subsys_cb()
Initialize the fields of a subsystem control block.
- Parameters
-
cb | control block to initialize |
◆ send_cli_ncxconnect()
Send the <ncx-connect> message to the ncxserver for CLI protocol.
- Parameters
-
- Returns
- status
◆ start_connection()
Start the connection to the server.
- Parameters
-
- Returns
- status
◆ start_subsys_extern_tcp_ncx()
status_t start_subsys_extern_tcp_ncx |
( |
int * |
retfd, |
|
|
const char * |
user, |
|
|
const char * |
addr, |
|
|
unsigned int |
portnum |
|
) |
| |
Start the subsystem to connect to an external tcp-ncx socket.
Initialize the subsystem, and get it ready to send and receive the first message of any kind; special version for tcp-ncx transport
- Parameters
-
[out] | retfd | address of return file descriptor number assigned to the socket that was created
- *retfd the file descriptor number used for the socket
|
| user | dummy user name |
| addr | external server address |
| portnum | external server port number |
- Returns
- status
◆ start_subsys_tcp_ncx()
status_t start_subsys_tcp_ncx |
( |
int * |
retfd, |
|
|
const char * |
user |
|
) |
| |
Start the subsystem for a tcp-ncx transport connection.
Initialize the subsystem, and get it ready to send and receive the first message of any kind; special version for tcp-ncx transport
- Parameters
-
[out] | retfd | address of return file descriptor number assigned to the socket that was created
- *retfd the file descriptor number used for the socket
|
| user | user ID to login to server |
- Returns
- status
◆ start_subsys_ypshell()
status_t start_subsys_ypshell |
( |
int * |
retfd | ) |
|
Start the subsystem for yp-shell.
Initialize the subsystem, and get it ready to send and receive the first message of any kind; special version for yp-shell
- Parameters
-
[out] | retfd | address of return file descriptor number assigned to the socket that was created
- *retfd the file descriptor number used for the socket
|
- Returns
- status