Embedded TCP/IP stack: fnet_shell_block

FNET

fnet_return_t fnet_shell_block ( fnet_shell_desc_t  desc,
void(*)(fnet_shell_desc_t shl_desc, void *cookie)  on_ctrlc,
void *  cookie 
)

Blocks the shell to ignore user commands.

Parameters
descShell service descriptor.
on_ctrlcPointer to the callback function called on the [Ctrl]+[c] button pressing. This parameter is optional and can be set to FNET_NULL.
cookieOptional application-specific parameter.
It's passed to the on_ctrlc function as input parameter.
Returns
This function returns:
See also
fnet_shell_unblock

This function moves the shell to the blocking state. In this state the shell ignore any commands entered by a user into a terminal console.
The shell can be unblocked by the fnet_shell_unblock() function. Also the shell may be unblocked by pressing the [Ctrl]+[c] button combination in a terminal console, after that the optional callback function, pointed by the on_ctrlc() parameter, will be called.


© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net