[PATCH 1/2] CMAP man pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
---
 corosync.spec.in         |    2 +
 man/Makefile.am          |   19 +++++-
 man/cmap_context_get.3   |   58 ++++++++++++++++
 man/cmap_context_set.3   |   60 +++++++++++++++++
 man/cmap_dec.3           |   92 ++++++++++++++++++++++++++
 man/cmap_delete.3        |   70 ++++++++++++++++++++
 man/cmap_dispatch.3      |   87 ++++++++++++++++++++++++
 man/cmap_fd_get.3        |   67 +++++++++++++++++++
 man/cmap_finalize.3      |   61 +++++++++++++++++
 man/cmap_get.3           |  153 ++++++++++++++++++++++++++++++++++++++++++
 man/cmap_inc.3           |   92 ++++++++++++++++++++++++++
 man/cmap_initialize.3    |   63 ++++++++++++++++++
 man/cmap_iter_finalize.3 |   72 ++++++++++++++++++++
 man/cmap_iter_init.3     |   80 ++++++++++++++++++++++
 man/cmap_iter_next.3     |   82 +++++++++++++++++++++++
 man/cmap_overview.8      |   74 +++++++++++++++++++++
 man/cmap_set.3           |  127 +++++++++++++++++++++++++++++++++++
 man/cmap_track_add.3     |  164 ++++++++++++++++++++++++++++++++++++++++++++++
 man/cmap_track_delete.3  |   70 ++++++++++++++++++++
 19 files changed, 1492 insertions(+), 1 deletions(-)
 create mode 100644 man/cmap_context_get.3
 create mode 100644 man/cmap_context_set.3
 create mode 100644 man/cmap_dec.3
 create mode 100644 man/cmap_delete.3
 create mode 100644 man/cmap_dispatch.3
 create mode 100644 man/cmap_fd_get.3
 create mode 100644 man/cmap_finalize.3
 create mode 100644 man/cmap_get.3
 create mode 100644 man/cmap_inc.3
 create mode 100644 man/cmap_initialize.3
 create mode 100644 man/cmap_iter_finalize.3
 create mode 100644 man/cmap_iter_init.3
 create mode 100644 man/cmap_iter_next.3
 create mode 100644 man/cmap_overview.8
 create mode 100644 man/cmap_set.3
 create mode 100644 man/cmap_track_add.3
 create mode 100644 man/cmap_track_delete.3

diff --git a/corosync.spec.in b/corosync.spec.in
index 9341636..4e0f086 100644
--- a/corosync.spec.in
+++ b/corosync.spec.in
@@ -301,6 +301,8 @@ The Corosync Cluster Engine APIs.
 %{_mandir}/man8/evs_overview.8*
 %{_mandir}/man8/votequorum_overview.8*
 %{_mandir}/man8/sam_overview.8*
+%{_mandir}/man8/cmap_*3*
+%{_mandir}/man8/cmap_overview.8*
 
 %changelog
 * @date@ Autotools generated version <nobody@xxxxxxxxxxx> - @version@-1-@numcomm@.@alphatag@.@dirty@
diff --git a/man/Makefile.am b/man/Makefile.am
index 480d8b3..b173810 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -117,7 +117,24 @@ dist_man_MANS = \
 	sam_register.3 \
 	sam_start.3 \
 	sam_stop.3 \
-	sam_warn_signal_set.3
+	sam_warn_signal_set.3 \
+	cmap_context_get.3 \
+	cmap_dec.3 \
+	cmap_iter_init.3 \
+	cmap_get.3 \
+	cmap_inc.3 \
+	cmap_set.3 \
+	cmap_overview.8 \
+	cmap_iter_next.3 \
+	cmap_delete.3 \
+	cmap_iter_finalize.3 \
+	cmap_finalize.3 \
+	cmap_dispatch.3  \
+	cmap_initialize.3 \
+	cmap_track_add.3 \
+	cmap_context_set.3 \
+	cmap_fd_get.3 \
+	cmap_track_delete.3
 
 if INSTALL_XMLCONF
 dist_man_MANS += $(xml_man)
diff --git a/man/cmap_context_get.3 b/man/cmap_context_get.3
new file mode 100644
index 0000000..f6bead5
--- /dev/null
+++ b/man/cmap_context_get.3
@@ -0,0 +1,58 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_CONTEXT_GET" 3 "23/01/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_context_get \- Gets the context variable for a CMAP instance
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_context_get (cmap_handle_t \fIhandle\fB, const void **\fIcontext\fB);\fR
+
+.SH DESCRIPTION
+.P
+The \fBcmap_context_get\fR function is used to retrieve the context variable previously stored using
+.B cmap_context_set(3).
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful, otherwise an error is returned.
+
+.SH "SEE ALSO"
+.BR cmap_context_set (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_context_set.3 b/man/cmap_context_set.3
new file mode 100644
index 0000000..da1f60c
--- /dev/null
+++ b/man/cmap_context_set.3
@@ -0,0 +1,60 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_CONTEXT_SET" 3 "23/01/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_context_set \- Sets the context variable for a CMAP instance
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_context_set (cmap_handle_t \fIhandle\fB, const void *\fIcontext\fB);\fR
+
+.SH DESCRIPTION
+.P
+The \fBcmap_context_set\fR function is used to store the context variable for cmap instance.
+It has no meaning insire libcmap itself and will not be touched by the library. It can
+be retrieved using
+.B cmap_context_get(3).
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful, otherwise an error is returned.
+
+.SH "SEE ALSO"
+.BR cmap_context_get (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_dec.3 b/man/cmap_dec.3
new file mode 100644
index 0000000..792c377
--- /dev/null
+++ b/man/cmap_dec.3
@@ -0,0 +1,92 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_DEC" 3 "03/02/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_inc \- Decrease already stored value in CMAP
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_dec (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_dec
+function is used to decrease integer value of already stored key inside cmap. The
+.I handle
+argument is connection to CMAP database obtained by calling
+.B cmap_initialize(3)
+function.
+.I key_name
+is name of key to increase value of.
+
+Function is defined only on values where increase makes sense and is well defined,
+so it can be one of:
+.PP
+\fBCMAP_VALUETYPE_INT8\fR - 8-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT8\fR - 8-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT16\fR - 16-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT16\fR - 16-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT32\fR - 32-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT32\fR - 32-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT64\fR - 64-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT64\fR - 64-bit unsigned integer
+
+Overflow/underflow is not detected and it's ignored.
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful. If value or key_name are unspecified, CS_ERR_INVALID_PARAM
+is returned. CS_ERR_NOT_EXIST error is returned if key doesn't exist (wasn't created by calling
+.B cmap_set(3)
+first). Some of keys may be tagged read-only directly in corosync and seting such key will result in
+CS_ERR_ACCESS error.
+
+.SH "SEE ALSO"
+.BR cmap_get (3),
+.BR cmap_set (3),
+.BR cmap_initialize (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_delete.3 b/man/cmap_delete.3
new file mode 100644
index 0000000..e2ee07d
--- /dev/null
+++ b/man/cmap_delete.3
@@ -0,0 +1,70 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_DELETE" 3 "03/02/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_delete \- Delete key/value pair from the CMAP service
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_delete(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_delete
+function is used to delete key from cmap. Key must be previously created by
+.B cmap_set(3)
+function. The
+.I handle
+argument is connection to CMAP database obtained by calling
+.B cmap_initialize(3)
+function.
+.I key_name
+is name of key to delete.
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful. If  key_name is unspecified, CS_ERR_INVALID_PARAM
+is returned. For nonexisting keys, CS_ERR_NOT_EXIST error is returned. Some of keys may be tagged
+read-only directly in corosync and deleting such key will result in CS_ERR_ACCESS error.
+
+.SH "SEE ALSO"
+.BR cmap_initialize (3),
+.BR cmap_set (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_dispatch.3 b/man/cmap_dispatch.3
new file mode 100644
index 0000000..19970e4
--- /dev/null
+++ b/man/cmap_dispatch.3
@@ -0,0 +1,87 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_DISPATCH" 3 "23/01/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_dispatch \- Dispatches callbacks from the CMAP service
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_dispatch (cmap_handle_t \fIhandle\fB, cs_dispatch_flags_t \fIdispatch_types\fB);\fR
+
+.SH DESCRIPTION
+The
+.B cmap_dispatch
+function is used to dispatch configuration changes.
+.PP
+Each application may have several connections to the CMAP API.  Each  application
+uses the
+.I handle
+argument to uniquely identify the connection.
+.PP
+The
+.I dispatch_types
+argument is used to identify the type of dispatch to execute.  The possible types are
+CS_DISPATCH_ONE, CS_DISPATCH_ALL and CS_DISPATCH_BLOCKING.
+
+The dispatch values have the following meanings:
+.TP
+.B CS_DISPATCH_ONE
+Dispatch at least one callback, blocking until the callback is dispatched.
+.TP
+.B CS_DISPATCH_ALL
+Dispatch all waiting callbacks without blocking to wait for any callbacks.
+.TP
+.B CS_DISPATCH_BLOCKING
+Dispatch all callbacks blocking indefinitely.  This is used in a threaded
+program where a thread is created, and then cs_dispatch() is called immediately
+from the created thread to execute callbacks.
+.PP
+It's needed to call
+.B cmap_track_add(3)
+to add tracked items and receive callbacks.
+
+.SH RETURN VALUE
+.P
+This call returns the CS_OK value if successful, otherwise an error is returned.
+
+.SH "SEE ALSO"
+.BR cmap_track_add (3),
+.BR cmap_track_delete (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_fd_get.3 b/man/cmap_fd_get.3
new file mode 100644
index 0000000..34245c6
--- /dev/null
+++ b/man/cmap_fd_get.3
@@ -0,0 +1,67 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_FD_GET" 3 "23/01/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_fd_get \- Dispatches callbacks from the CMAP service
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_fd_get (cmap_handle_t \fIhandle\fB, int *\fIfd\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_fd_get
+function is used to retrieve the file descriptor that may be used with the poll
+system call to determine when
+.B cmap_dispatch(3)
+won't block.  The
+.I handle
+argument may not be used directly with
+.B poll
+because it is not the file descriptor, but instead an internal identifier used
+by the CMAP library.
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful, otherwise an error is returned.
+
+.SH "SEE ALSO"
+.BR cmap_dispatch (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_finalize.3 b/man/cmap_finalize.3
new file mode 100644
index 0000000..4a2f8c0
--- /dev/null
+++ b/man/cmap_finalize.3
@@ -0,0 +1,61 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_FINALIZE" 3 "20/01/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_finalize \- Finalize connection to CMAP
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t cmap_finalize (cmap_handle_t \fIhandle\fB);\fR
+
+.SH DESCRIPTION
+.P
+The \fBcmap_finalize\fR function is used to to close a connection to the
+CMAP API. Once the connection is finalized, the handle may not be
+used again by applications. No more callbacks will be dispatched from the
+.B cmap_dispatch
+function.
+.SH RETURN VALUE
+This call returns the CS_OK value if successful, otherwise an error is returned.
+CS_ERR_BAD_HANDLE error is returned when handle is invalid.
+
+.SH "SEE ALSO"
+.BR cmap_initialize (3),
+.BR cmap_dispatch (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_get.3 b/man/cmap_get.3
new file mode 100644
index 0000000..7e8c797
--- /dev/null
+++ b/man/cmap_get.3
@@ -0,0 +1,153 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_GET" 3 "03/02/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_get \- Retreive value from CMAP
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_get (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, void *\fIvalue\fB,
+size_t *\fIvalue_len\fB, cmap_value_types_t *\fItype\fB);\fR
+.P
+Also shortcuts for different types are defined
+.P
+\fBcs_error_t cmap_get_int8 (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, int8_t *\fIi8\fB);\fR
+.P
+\fBcs_error_t cmap_get_uint8 (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, uint8_t *\fIu8\fB);\fR
+.P
+\fBcs_error_t cmap_get_int16 (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, int16_t *\fIi16\fB);\fR
+.P
+\fBcs_error_t cmap_get_uint16 (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, uint16_t *\fIu16\fB);\fR
+.P
+\fBcs_error_t cmap_get_int32 (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, int32_t *\fIi32\fB);\fR
+.P
+\fBcs_error_t cmap_get_uint32 (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, uint32_t *\fIu32\fB);\fR
+.P
+\fBcs_error_t cmap_get_int64 (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, int64_t *\fIi64\fB);\fR
+.P
+\fBcs_error_t cmap_get_uint64 (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, uint64_t *\fIu64\fB);\fR
+.P
+\fBcs_error_t cmap_get_float (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, float *\fIflt\fB);\fR
+.P
+\fBcs_error_t cmap_get_double (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, double *\fIdbl\fB);\fR
+.P
+\fBcs_error_t cmap_get_string (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, char **\fIstr\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_get
+function is used to retreive key from cmap previously set by
+.B cmap_set(3)
+function. The
+.I handle
+argument is connection to CMAP database obtained by calling
+.B cmap_initialize(3)
+function.
+.I key_name
+is name of key to get value from.
+.I value
+is pointer to preallocated data used as storage for data, but can be also NULL, and then only
+.I value_len
+and/or
+.I type
+is returned (both of them can also be NULL, allowing function to be used only for test of existence of key).
+If
+.I value
+is not NULL, actual length of value in map is checked against
+.I *value_len.
+If
+.I *value_len
+is shorter then length of value in map, error CS_ERR_INVALID_PARAM is returned. After successful copy of
+value,
+.I *value_len
+is set to actual length of value in map. Parameter
+.I type
+is pointer to memory, where type of value is stored after successful return. Pointer can also be NULL and
+then nothing is stored. Type can be one of:
+.PP
+\fBCMAP_VALUETYPE_INT8\fR - 8-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT8\fR - 8-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT16\fR - 16-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT16\fR - 16-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT32\fR - 32-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT32\fR - 32-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT64\fR - 64-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT64\fR - 64-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_FLOAT\fR - Float value
+.PP
+\fBCMAP_VALUETYPE_DOUBLE\fR - Double value
+.PP
+\fBCMAP_VALUETYPE_STRING\fR - C-style string
+.PP
+\fBCMAP_VALUETYPE_BINARY\fR - Binary data, byte with zero value has no special meaning
+
+Sortcut functions tests cmap type with it's own type. If type didn't match, CS_ERR_INVALID_PARAM error
+is returned. No conversions are done, so for example
+.B cmap_get_int16
+is not able to return value with
+.B CMAP_VALUETYPE_INT8
+type.
+
+String shortcut function returns newly allocated memory and caller is responsible for freeing that.
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful. If value or key_name are unspecified, CS_ERR_INVALID_PARAM
+is returned. Same error is also returned if
+.I value
+is specified, and
+.I *value_len
+is too short for store of data. If key doesn't exists (it was not set by calling
+.B cmap_set(3)
+function first) CS_ERR_NOT_EXIST error is returned. For helper functions,
+CS_ERR_INVALID_PARAM is returned if type stored in cmap doesn't match with type of helper function.
+
+.SH "SEE ALSO"
+.BR cmap_set (3),
+.BR cmap_initialize (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_inc.3 b/man/cmap_inc.3
new file mode 100644
index 0000000..5927eb2
--- /dev/null
+++ b/man/cmap_inc.3
@@ -0,0 +1,92 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_INC" 3 "03/02/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_inc \- Increase already stored value in CMAP
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_inc (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_inc
+function is used to increase integer value of already stored key inside cmap. The
+.I handle
+argument is connection to CMAP database obtained by calling
+.B cmap_initialize(3)
+function.
+.I key_name
+is name of key to increase value of.
+
+Function is defined only on values where increase makes sense and is well defined,
+so it can be one of:
+.PP
+\fBCMAP_VALUETYPE_INT8\fR - 8-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT8\fR - 8-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT16\fR - 16-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT16\fR - 16-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT32\fR - 32-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT32\fR - 32-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT64\fR - 64-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT64\fR - 64-bit unsigned integer
+
+Overflow/underflow is not detected and it's ignored.
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful. If value or key_name are unspecified, CS_ERR_INVALID_PARAM
+is returned. CS_ERR_NOT_EXIST error is returned if key doesn't exist (wasn't created by calling
+.B cmap_set(3)
+first). Some of keys may be tagged read-only directly in corosync and seting such key will result in
+CS_ERR_ACCESS error.
+
+.SH "SEE ALSO"
+.BR cmap_get (3),
+.BR cmap_set (3),
+.BR cmap_initialize (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_initialize.3 b/man/cmap_initialize.3
new file mode 100644
index 0000000..8bdb017
--- /dev/null
+++ b/man/cmap_initialize.3
@@ -0,0 +1,63 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_INITIALIZE" 3 "20/01/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_initialize \- Initialize CMAP API
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t cmap_initialize (cmap_handle_t \fI*handle\fB);\fR
+
+.SH DESCRIPTION
+.P
+The \fBcmap_initialize\fR function is used to initialize a connection to
+the Configuration Map API. Each application may have several connections to the CMAP API.
+Each  application uses the
+.I handle
+argument to uniquely identify the connection.  The
+.I handle
+argument is then used in other function calls to identify the connection to be used
+for communication with the CMAP service.
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful, otherwise an error is returned.
+
+.SH "SEE ALSO"
+.BR cmap_finalize (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_iter_finalize.3 b/man/cmap_iter_finalize.3
new file mode 100644
index 0000000..df895d2
--- /dev/null
+++ b/man/cmap_iter_finalize.3
@@ -0,0 +1,72 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_ITER_FINALIZE" 3 "06/02/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_iter_init \- Finalize iterator for keys stored in CMAP
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_iter_finalize (cmap_handle_t \fIhandle\fB, cmap_iter_handle_t \fIiter_handle\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_iter_finalize
+function is used to free up memory asociated with iteration obtained by calling of
+.B cmap_iter_init(3)
+function.
+The
+.I handle
+argument is connection to CMAP database obtained by calling
+.B cmap_initialize(3)
+function.
+.I iter_handle
+argument is iterator handle obtained by
+.B cmap_iter_init(3)
+function.
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful. CS_ERR_BAD_HANDLE error is returned when iter_handle
+is invalid.
+
+.SH "SEE ALSO"
+.BR cmap_iter_init (3),
+.BR cmap_initialize (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_iter_init.3 b/man/cmap_iter_init.3
new file mode 100644
index 0000000..e825406
--- /dev/null
+++ b/man/cmap_iter_init.3
@@ -0,0 +1,80 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_ITER_INIT" 3 "03/02/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_iter_init \- Initialize iterator for keys stored in CMAP
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_iter_init (cmap_handle_t \fIhandle\fB, const char *\fIprefix\fB, cmap_iter_handle_t *\fIcmap_iter_handle\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_iter_init
+function is used to initialize iteration of all keys with given
+.I prefix.
+The
+.I handle
+argument is connection to CMAP database obtained by calling
+.B cmap_initialize(3)
+function.
+.I prefix
+is string, and every returned key must have name with given prefix. This variable can also
+be NULL (or empty string) and then all keys are iterated.
+
+.B cmap_iter_init
+is used only for initialize context for future
+.B cmap_iter_next(3)
+calls and handle needed for that function is returned in
+.I cmap_iter_handle
+variable. When you have finished iteration over objects, call
+.B cmap_iter_finalize(3)
+function to free up memory associated with iteration.
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful. If there are no items with given prefixes,
+CS_ERR_NO_SECTIONS is returned.
+
+.SH "SEE ALSO"
+.BR cmap_iter_next (3),
+.BR cmap_iter_finalize (3),
+.BR cmap_initialize (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_iter_next.3 b/man/cmap_iter_next.3
new file mode 100644
index 0000000..edc29f8
--- /dev/null
+++ b/man/cmap_iter_next.3
@@ -0,0 +1,82 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_ITER_NEXT" 3 "06/02/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_iter_next \- Return next item in iteration in CMAP
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_iter_next(cmap_handle_t \fIhandle\fB, cmap_iter_handle_t \fIiter_handle\fB, char \fIkey_name[]\fB,
+size_t *\fIvalue_len\fB, cmap_value_types_t *\fItype\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_iter_next
+function is used to get next value in iteration. The
+.I handle
+argument is connection to CMAP database obtained by calling
+.B cmap_initialize(3)
+function.
+.I iter_handle
+argument is iterator handle obtained by
+.B cmap_iter_init(3)
+function. Following key name is stored inside
+.I key_name
+argument, which must be preallocated by caller and its quaranted maximum size is CMAP_KEYNAME_MAXLEN
+(urrently 255).
+.I value_len
+is pointer where length of value is stored, but can be NULL.
+.I type
+is also optional argument (can be NULL) and here type of value is stored (type is one of types described
+in
+.B cmap_get(3)
+function).
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful. If there are no more items to iterate, CS_NO_SECTION
+error code is returned.
+
+.SH "SEE ALSO"
+.BR cmap_iter_init (3),
+.BR cmap_iter_finalize (3),
+.BR cmap_initialize (3),
+.BR cmap_get (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_overview.8 b/man/cmap_overview.8
new file mode 100644
index 0000000..eb8b99b
--- /dev/null
+++ b/man/cmap_overview.8
@@ -0,0 +1,74 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_OVERVIEW" 8 "03/02/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_overview \- Overview of the Configuration Map
+
+.SH OVERVIEW
+.P
+The CMAP library is used to interact with the configuration database used by corosync.
+
+.PP
+The library provides a mechanism to:
+.PP
+* Create of new keys
+.PP
+* Change existing keys
+.PP
+* Remove keys
+.PP
+* Iterate keys with given prefix
+.PP
+* Track changes on keys
+
+.SH BUGS
+.SH "SEE ALSO"
+.BR cmap_initialize (3),
+.BR cmap_finalize (3),
+.BR cmap_get (3),
+.BR cmap_set (3),
+.BR cmap_delete (3),
+.BR cmap_inc (3),
+.BR cmap_dec (3),
+.BR cmap_fd_get (3),
+.BR cmap_dispatch (3),
+.BR cmap_context_set (3),
+.BR cmap_context_get (3),
+.BR cmap_iter_init (3),
+.BR cmap_iter_next (3),
+.BR cmap_iter_finalize (3),
+.BR cmap_track_add (3),
+.BR cmap_track_delete (3)
diff --git a/man/cmap_set.3 b/man/cmap_set.3
new file mode 100644
index 0000000..72264f6
--- /dev/null
+++ b/man/cmap_set.3
@@ -0,0 +1,127 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_SET" 3 "23/01/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_set \- Store value in CMAP
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_set (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, const void *\fIvalue\fB,
+size_t \fIvalue_len\fB, cmap_value_types_t \fItype\fB);\fR
+.P
+Also shortcuts for different types are defined
+.P
+\fBcs_error_t cmap_set_int8(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, int8_t \fIvalue\fB);\fR
+.P
+\fBcs_error_t cmap_set_uint8(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, uint8_t \fIvalue\fB);\fR
+.P
+\fBcs_error_t cmap_set_int16(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, int16_t \fIvalue\fB);\fR
+.P
+\fBcs_error_t cmap_set_uint16(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, uint16_t \fIvalue\fB);\fR
+.P
+\fBcs_error_t cmap_set_int32(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, int32_t \fIvalue\fB);\fR
+.P
+\fBcs_error_t cmap_set_uint32(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, uint32_t \fIvalue\fB);\fR
+.P
+\fBcs_error_t cmap_set_int64(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, int64_t \fIvalue\fB);\fR
+.P
+\fBcs_error_t cmap_set_uint64(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, uint64_t \fIvalue\fB);\fR
+.P
+\fBcs_error_t cmap_set_float(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, float \fIvalue\fB);\fR
+.P
+\fBcs_error_t cmap_set_double(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, double \fIvalue\fB);\fR
+.P
+\fBcs_error_t cmap_set_string(cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, const char *\fIvalue\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_set
+function is used to store key inside cmap. The
+.I handle
+argument is connection to CMAP database obtained by calling
+.B cmap_initialize(3)
+function.
+.I key_name
+is name of key to set value. Key name is limited by minimal (CMAP_KEYNAME_MINLEN, currently 3) and
+maximal (CMAP_KEYNAME_MAXLEN, currently 255) length. Also key can contain only limited set of characters expressed
+by regexp [a-zA-Z0-9._-/:]*.
+.I value
+is pointer to allocated data which will be stored inside CMAP. Length of value (number of bytes) is supplied
+as
+.I value_len
+parameter. Last parameter is
+.I type
+which gives type of value. It may be one of:
+.PP
+\fBCMAP_VALUETYPE_INT8\fR - 8-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT8\fR - 8-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT16\fR - 16-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT16\fR - 16-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT32\fR - 32-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT32\fR - 32-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_INT64\fR - 64-bit signed interger
+.PP
+\fBCMAP_VALUETYPE_UINT64\fR - 64-bit unsigned integer
+.PP
+\fBCMAP_VALUETYPE_FLOAT\fR - Float value
+.PP
+\fBCMAP_VALUETYPE_DOUBLE\fR - Double value
+.PP
+\fBCMAP_VALUETYPE_STRING\fR - C-style string
+.PP
+\fBCMAP_VALUETYPE_BINARY\fR - Binary data, byte with zero value has no special meaning
+
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful. If value or key_name are unspecified, CS_ERR_INVALID_PARAM
+is returned. Too short or too long key_name returns CS_ERR_NAME_TOO_LONG error code. Some of keys may
+be tagged read-only directly in corosync and seting such key will result in CS_ERR_ACCESS error.
+
+.SH "SEE ALSO"
+.BR cmap_get (3),
+.BR cmap_initialize (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_track_add.3 b/man/cmap_track_add.3
new file mode 100644
index 0000000..07a6581
--- /dev/null
+++ b/man/cmap_track_add.3
@@ -0,0 +1,164 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_TRACK_ADD" 3 "06/02/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_track_add \- Set tracking function for values in CMAP
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_track_add (cmap_handle_t \fIhandle\fB, const char *\fIkey_name\fB, int32_t \fItrack_type\fB,
+cmap_notify_fn_t \fInotify_fn\fB, void *\fIuser_data\fB, cmap_track_handle_t *\fIcmap_track_handle\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_track_add
+function is used to set function which tracks changes in CMAP. One CMAP connection can
+track multiple keys and also it's possible to track one key multiple times. The
+.I handle
+argument is connection to CMAP database obtained by calling
+.B cmap_initialize(3)
+function.
+.I key_name
+argument is ether exact key name or prefix of key name to track changes on.
+.I track_type
+is bitfield which may consist of following values:
+.PP
+\fBCMAP_TRACK_ADD\fR - track addition of new key (or key added in callback)
+.PP
+\fBCMAP_TRACK_DELETE\fR - track deletion of key (or key deleted in callback)
+.PP
+\fBCMAP_TRACK_MODIFY\fR - track modification of key (or key modified in callback)
+.PP
+\fBCMAP_TRACK_PREFIX\fR - whole prefix is tracked, instead of key only, so "totem." tracking means
+that "totem.nodeid", "totem.version", ... applies (this value is never returned
+in callback)
+.PP
+.I notify_fn
+is pointer to function which is called when value is changed. It's definition and meaning of parameters
+is discussed bellow.
+.I user_data
+argument is passed directly to
+.I notify_fn
+without any changes.
+.I cmap_track_handle
+is used for removing of tracking when no longer needed by calling
+.B cmap_track_delete(3)
+function.
+
+Callback function is defined as:
+.IP
+.RS
+.ne 18
+.nf
+.PP
+typedef void (*cmap_notify_fn_t) (
+    cmap_handle_t cmap_handle,
+    cmap_track_handle_t cmap_track_handle,
+    int32_t event,
+    const char *key_name,
+    struct cmap_notify_value new_value,
+    struct cmap_notify_value old_value,
+    void *user_data);
+.ta
+.fi
+.RE
+.IP
+.PP
+where
+.I cmap_handle
+is handle used in registration of track function.
+.I cmap_track_handle
+is handle returned by
+.B cmap_track_add
+function.
+.I event
+is one of \fBCMAP_TRACK_ADD\fR, \fBCMAP_TRACK_DELETE\fR or \fBCMAP_TRACK_MODIFY\fR.
+.I key_name
+is name of changed key.
+.I new_value
+is new value of key, or unset if
+.I event
+is \fBCMAP_TRACK_DELETE\fR.
+.I old_value
+is previous value of key or unset if
+.I event
+is \fBCMAP_TRACK_ADD\fR or for some special keys set directly by Corosync due to speed optimalizations.
+Both
+.I new_value
+and
+.I old_value
+are structures defined as:
+.IP
+.RS
+.ne 18
+.nf
+.PP
+struct cmap_notify_value {
+    cmap_value_types_t type;
+    size_t len;
+    const void *data;
+};
+.ta
+.fi
+.RE
+.IP
+.PP
+If value is unset, all fields are set to 0. Otherwise
+.I type
+is one of cmap types (as described in
+.B cmap_get(3)
+function),
+.I len
+is length of value in cmap and
+.I data
+is pointer to value of item. Data storage is dynamically alocated by caller and notify function must not try to
+free it.
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful. It can return CS_ERR_INVALID_PARAM if
+notify_fn is NULL or track_type is invalid value.
+
+.SH "SEE ALSO"
+.BR cmap_track_delete (3),
+.BR cmap_initialize (3),
+.BR cmap_get (3),
+.BR cmap_dispatch (3),
+.BR cmap_overview (8)
diff --git a/man/cmap_track_delete.3 b/man/cmap_track_delete.3
new file mode 100644
index 0000000..6c28530
--- /dev/null
+++ b/man/cmap_track_delete.3
@@ -0,0 +1,70 @@
+.\"/*
+.\" * Copyright (c) 2012 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Jan Friesse (jfriesse@xxxxxxxxxx)
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the Red Hat, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH "CMAP_TRACK_DELETE" 3 "06/02/2012" "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
+
+.SH NAME
+.P
+cmap_track_delete \- Remove tracking of values in CMAP
+
+.SH SYNOPSIS
+.P
+\fB#include <corosync/cmap.h>\fR
+
+.P
+\fBcs_error_t
+cmap_track_delete (cmap_handle_t \fIhandle\fB, cmap_track_handle_t \fItrack_handle\fB);\fR
+
+.SH DESCRIPTION
+.P
+The
+.B cmap_track_delte
+function is used to remove tracking of values changed in CMAP.
+The
+.I handle
+argument is connection to CMAP database obtained by calling
+.B cmap_initialize(3)
+function.
+.I track_handle
+argument is iterator handle obtained by
+.B cmap_track_add(3)
+function.
+
+.SH RETURN VALUE
+This call returns the CS_OK value if successful. CS_ERR_BAD_HANDLE error is returned when track_handle
+is invalid.
+
+.SH "SEE ALSO"
+.BR cmap_track_add (3),
+.BR cmap_initialize (3),
+.BR cmap_overview (8)
-- 
1.7.1

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux