A number of functions can be used to print decoded messages and IEs in a human readable form. This is intended mainly for debugging. Some fields of the library context are used to control how the printing is done (see unistruct 3 ). Each of the function takes a buf and a buflen argument. The string that is generated in the buffer pointed to by buf is guaranteed to be NUL terminated.
The function uni_print_cref formats a call reference taking into account special call references. The function uni_print_msg_hdr formats a message header. The functions uni_print and uni_print_ie print messages and information elements.
There are two functions for context handling. uni_initcx initializes a context with default values and uni_print_cx prints a context to the given buffer.