summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-10 19:10:19 +0200
committerdimitri staessens <dimitri.staessens@ugent.be>2017-04-11 09:58:00 +0200
commit7fe877685ccdef8f88ef7450aab3e724be4cd616 (patch)
treeeac72441dde453c59ebd7ad01458491d085316fd
parentb0d28cb8c77a391b3b21044ad4120263ce89ba6a (diff)
downloadouroboros-7fe877685ccdef8f88ef7450aab3e724be4cd616.tar.gz
ouroboros-7fe877685ccdef8f88ef7450aab3e724be4cd616.zip
doc: Add man pages for ap_init/ap_fini
-rw-r--r--doc/man/ap_fini.31
-rw-r--r--doc/man/ap_init.367
2 files changed, 68 insertions, 0 deletions
diff --git a/doc/man/ap_fini.3 b/doc/man/ap_fini.3
new file mode 100644
index 00000000..4aaa723b
--- /dev/null
+++ b/doc/man/ap_fini.3
@@ -0,0 +1 @@
+.so ap_init.3
diff --git a/doc/man/ap_init.3 b/doc/man/ap_init.3
new file mode 100644
index 00000000..c5b93764
--- /dev/null
+++ b/doc/man/ap_init.3
@@ -0,0 +1,67 @@
+.\" Ouroboros man pages (C) 2017
+.\" Dimitri Staessens <dimitri.staessens@ugent.be>
+.\" Sander Vrijders <sander.vrijders@ugent.be>
+
+.TH AP_INIT 3 2017-04-10 GNU "Ouroboros Programmer's Manual"
+
+.SH NAME
+
+ap_init, ap_fini \- initialize and finalize an application for using
+Ouroboros
+
+.SH SYNOPSIS
+
+.B #include <ouroboros/dev.h>
+
+\fBint ap_init(char * \fIapn\fB);\fR
+
+\fBvoid ap_fini(void);\fR
+
+Compile and link with \fI-louroboros\fR.
+
+.SH DESCRIPTION
+
+The \fBap_init\fR() call initializes an application process instance
+for using the Ouroboros IPC infrastructure. If the application is a
+server or peer, a \fBchar * \fIapn\fR 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 \fBap_fini\fR() call
+will release all resources allocated by \fBap_fini\fR().
+
+\fBap_init\fR() and \fBap_fini\fR() should be called only once in the
+application.
+
+.SH RETURN VALUE
+
+On success, \fBap_init\fR() returns 0. On failure, a negative value
+indicating the error will be returned. The \fBap_fini\fR() function
+has no return value.
+
+.SH ERRORS
+
+\fBap_init\fR() can return the following errors:
+
+.B -EIRMD
+Failed to contact an IRMd instance.
+
+.B -ENOMEM
+Insufficient system resources to intialize the application.
+
+.SH ATTRIBUTES
+
+For an explanation of the terms used in this section, see \fBattributes\fR(7).
+
+.TS
+box, tab(&);
+LB|LB|LB
+L|L|L.
+Interface & Attribute & Value
+_
+\fBap_init\fR() & Thread safety & MT-Safe
+_
+\fBap_fini\fR() & Thread safety & MT-Safe
+.TE
+
+.SH COLOPHON
+This page is part of the Ouroboros project, found at
+https://bitbucket.org/ouroboros-rina/ouroboros