April 15, 2016, 9:12am
I read the UG, it tells the function is called from inside an action callback.
this function is intended to be called from inside an action callback when invoked from the CLI
I want to show some debug info to CLI actively during the daemon running, so how could I implement this?
April 15, 2016, 11:39pm
You can refer to the ConfD User Guide for the man pages of the following API calls:
- maapi_user_message( )
- maapi_sys_message( )
- maapi_prio_message( )
April 16, 2016, 1:13am
Thank you very much, it works!
April 16, 2016, 8:10am
Another question, since maapi_user/sys/prio_message() could output message into CLI both inside and outside an action, why there are still APIs of maapi_printf/write() functions? What’s the difference between them?
April 17, 2016, 1:18pm
An actionpoint callback receive the
confd_user_info *uinfo parameter that can be used with the maapi_cli_print/write functions to print to the CLI user that requested the action.
August 31, 2016, 1:41pm
which socket need maapi_cli_printf ? I have this error :
DEBUG Failed to write 30 bytes to ConfD: Bad file descriptor
Have a look at the
examples.confd/cli/c_cli/actions.c example. You have to create a new socket and maapi_connect() it.