NOTE: running the yp-client code requires that the netconfd-pro server is built
with pthreads=1 or that you are running one of the pthreads binary servers.

The c-toaster-tls.c example code mirrors the toaster.cpp code but with c and
demonstrates the following, see also the example of libtoaster in the section
“Getting Started with toaster.yang” in the YumaPro Quickstart Guide.

Before running the code you should edit c-toaster-tls.c to apply the cServer and
cUsername values that are appropriate for your system, cPassword is prompted
for in the example code by a convenience function that asks for your password.
If needed this could be edited to use a static string or to use some other
authentication mechanism if required.

The code shows the following:

* setup code to deal with any exceptions
* start a NETCONF session to a server for a user – ask them for their password
* display the session number (if you are running the server in debug mode
  you’ll see the session numbers match)
* setup to receive notifications for this session
* setup a subscription with the server for this session
* messages received from the server will display the message number that will
  match the message numbers displayed in the debug output from the server)
* set some session globals and local variables to show how that is done
* load the toaster.yang module to the server
* lock the datastore
* create the /toaster node (if it already exists, due to running the program
  several times, ignore the error)
* unlock the datastore
* display the /toaster node by sending the request “sget /toaster”
* display the /toaster node by sending the request “xget /toaster”
* send the command to make-toast with specific parameters
* receive the toastStatus=done notification (after about 12seconds)
* resend the command to make-toast with specific parameters
* don’t wait for the toastStatus=done notification, send the cancel-toast
  command
* receive the toastStatus=cancelled notification
* close the session to the server
