/**
* Submit a request message, and wait for response.
*
- * On error, NULL is returned an errno is set appropriately. The request
- * messages gets cleaned up by this call and gets invalid.
+ * The request messages gets cleaned up by this call and gets invalid.
+ * On error, NULL is returned an errno is set to:
+ * - EINVAL if the request is invalid/incomplete
+ * - ENOENT if the command is unknown
+ * - EBADMSG if the response is invalid
+ * - Any other IO related errno
*
* @param req request message to send
* @param conn connection context to send message over
/**
* Dump a message text representation to a FILE stream.
*
- * On error, errno is set appropriately.
+ * On error, errno is set to:
+ * - EBADMSG if the message is invalid
*
* @param res response message to dump
* @param label a label to print for this message
*
* The string is valid until vici_free_res() is called.
*
- * On error, errno is set appropriately.
+ * On error, errno is set to:
+ *- EINVAL if not in valid parser state
*
* @param res response message to parse
* @return name tag / key, NULL on error
*
* The string is valid until vici_free_res() is called.
*
- * On error, errno is set appropriately.
+ * On error, errno is set to:
+ * - EINVAL if not in valid parser state
*
* @param len pointer receiving value length
* @return pointer to value, NULL on error
* This call is successful only if the value contains no non-printable
* characters. The string is valid until vici_free_res() is called.
*
- * On error, errno is set appropriately.
+ * On error, errno is set to:
+ * - EBADMSG if value is not a printable string
+ * - EINVAL if not in valid parser state
*
* @param res response message to parse
* @return value as string, NULL on error
* invoked for the current section level only. To descent into sections, call
* vici_parse_cb() from within a section callback.
*
- * On error, errno is set appropriately.
+ * On error, errno is set to:
+ * - EBADMSG if message encoding invalid
+ * - Any other errno set by the invoked callbacks
*
* @param res message to parse
* @param section callback invoked for each section
* (Un-)Register for events of a given kind.
*
* Events callbacks get invoked by a different thread from the libstrongswan
- * thread pool. On failure, errno is set appropriately.
+ * thread pool.
+ * On failure, errno is set to:
+ * - ENOENT if the event name is unknown
+ * - EBADMSG if the response is invalid
+ * - Any other IO related errno
*
* @param conn connection context
* @param name name of event messages to register to