yumapro  23.10T-6
YumaPro SDK
Loading...
Searching...
No Matches
Utility Functions

Subsystem utility functions are used to provide support functions to implement the subsystem. More...

Collaboration diagram for Utility Functions:

Data Structures

struct  subsys_cb_t
 one subsystem control block for session More...
 

Macros

#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
 

Functions

status_t get_ssh_parms (subsys_cb_t *cb)
 Get the SSH environment parameters. More...
 
status_t get_server_root_mapfile (subsys_cb_t *cb)
 Get the name of the server root mapfile set. More...
 
status_t start_connection (subsys_cb_t *cb)
 Start the connection to the server. More...
 
status_t send_cli_ncxconnect (subsys_cb_t *cb)
 Send the <ncx-connect> message to the ncxserver for CLI protocol. More...
 
void init_subsys_cb (subsys_cb_t *cb)
 Initialize the fields of a subsystem control block. More...
 
void clean_subsys_cb (subsys_cb_t *cb)
 Clean the fields of a subsystem control block. More...
 
void configure_cli_parms (subsys_cb_t *cb, int argc, char **argv)
 Configure CLI parameters. More...
 
status_t start_subsys_ypshell (int *retfd)
 Start the subsystem for yp-shell. More...
 
status_t start_subsys_tcp_ncx (int *retfd, const char *user)
 Start the subsystem for a tcp-ncx transport connection. More...
 
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. More...
 

Detailed Description

Subsystem utility functions are used to provide support functions to implement the subsystem.

CLI parameters and RESTCONF request parameters are supported.

Function Documentation

◆ clean_subsys_cb()

void clean_subsys_cb ( subsys_cb_t cb)

Clean the fields of a subsystem control block.

Parameters
cbcontrol block to clean
Here is the caller graph for this function:

◆ 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
cbcontrol block to use to store parameter values
argccommand line parameter count
argvarray of command line parameter strings
Here is the caller graph for this function:

◆ get_server_root_mapfile()

status_t get_server_root_mapfile ( subsys_cb_t cb)

Get the name of the server root mapfile set.

Parameters
[in,out]cbcontrol block to use
  • cb->server_root_mapfile is set
  • cb->server_root_from_env set
Returns
status
Here is the caller graph for this function:

◆ get_ssh_parms()

status_t get_ssh_parms ( subsys_cb_t cb)

Get the SSH environment parameters.

Parameters
cbcontrol vlock to use
Returns
status
Here is the caller graph for this function:

◆ init_subsys_cb()

void init_subsys_cb ( subsys_cb_t cb)

Initialize the fields of a subsystem control block.

Parameters
cbcontrol block to initialize
Here is the caller graph for this function:

◆ send_cli_ncxconnect()

status_t send_cli_ncxconnect ( subsys_cb_t cb)

Send the <ncx-connect> message to the ncxserver for CLI protocol.

Parameters
cbcontrol vlock to use
Returns
status
Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_connection()

status_t start_connection ( subsys_cb_t cb)

Start the connection to the server.

Parameters
cbcontrol vlock to use
Returns
status
Here is the caller graph for this function:

◆ 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]retfdaddress of return file descriptor number assigned to the socket that was created
  • *retfd the file descriptor number used for the socket
userdummy user name
addrexternal server address
portnumexternal server port number
Returns
status
Here is the call graph for this function:

◆ 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]retfdaddress of return file descriptor number assigned to the socket that was created
  • *retfd the file descriptor number used for the socket
useruser ID to login to server
Returns
status
Here is the call graph for this function:

◆ 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]retfdaddress of return file descriptor number assigned to the socket that was created
  • *retfd the file descriptor number used for the socket
Returns
status
Here is the call graph for this function: