OUROBOROS_INIT(3)

NAME
ouroboros_init, ouroboros_fini - initialize and finalize an application for using Ouroboros

SYNOPSIS
#include <ouroboros/dev.h> int ouroboros_init(char * apn); void ouroboros_fini(void); Compile and link with -louroboros.

DESCRIPTION
The ouroboros_init() call initializes an application process instance for using the Ouroboros IPC infrastructure. If the application is a server or peer, a char * apn has to be provided indicating the application process that this instance belongs to. This is usually argv[0]. A client application may pass NULL. The ouroboros_fini() call will release all resources allocated by ouroboros_fini(). ouroboros_init() and ouroboros_fini() should be called only once in the application.

RETURN VALUE
On success, ouroboros_init() returns 0. On failure, a negative value indicating the error will be returned. The ouroboros_fini() function has no return value.

ERRORS
ouroboros_init() can return the following errors: -EIRMD Failed to contact an IRMd instance. -ENOMEM Insufficient system resources to intialize the application.

ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value
ouroboros_init() | Thread safety | MT-Safe
ouroboros_fini() | Thread safety | MT-Safe

COLOPHON
This page is part of the Ouroboros project, found at https://bitbucket.org/ouroboros-rina/ouroboros