This file is indexed.

/usr/share/doc/corosync/html/cmap_track_add.3.html is in libcmap-dev 2.3.3-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!-- Creator     : groff version 1.22.2 -->
<!-- CreationDate: Thu Mar 20 15:54:41 2014 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title>CMAP_TRACK_ADD</title>

</head>
<body>

<h1 align="center">CMAP_TRACK_ADD</h1>

<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#RETURN VALUE">RETURN VALUE</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>

<hr>


<h2>NAME
<a name="NAME"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">cmap_track_add
&minus; Set tracking function for values in CMAP</p>

<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em"><b>#include
&lt;corosync/cmap.h&gt;</b></p>

<p style="margin-left:11%; margin-top: 1em"><b>cs_error_t
cmap_track_add (cmap_handle_t</b> <i>handle</i><b>, const
char *</b><i>key_name</i><b>, int32_t</b>
<i>track_type</i><b>, cmap_notify_fn_t</b>
<i>notify_fn</i><b>, void *</b><i>user_data</i><b>,
cmap_track_handle_t
*</b><i>cmap_track_handle</i><b>);</b></p>

<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">The
<b>cmap_track_add</b> function is used to set function which
tracks changes in CMAP. One CMAP connection can track
multiple keys and also it&rsquo;s possible to track one key
multiple times. The <i>handle</i> argument is connection to
CMAP database obtained by calling <b>cmap_initialize(3)</b>
function. <i>key_name</i> argument is ether exact key name
or prefix of key name to track changes on. <i>track_type</i>
is bitfield which may consist of following values:</p>


<p style="margin-left:11%; margin-top: 1em"><b>CMAP_TRACK_ADD</b>
- track addition of new key (or key added in callback)</p>


<p style="margin-left:11%; margin-top: 1em"><b>CMAP_TRACK_DELETE</b>
- track deletion of key (or key deleted in callback)</p>


<p style="margin-left:11%; margin-top: 1em"><b>CMAP_TRACK_MODIFY</b>
- track modification of key (or key modified in
callback)</p>


<p style="margin-left:11%; margin-top: 1em"><b>CMAP_TRACK_PREFIX</b>
- whole prefix is tracked, instead of key only, so
&quot;totem.&quot; tracking means that
&quot;totem.nodeid&quot;, &quot;totem.version&quot;, ...
applies (this value is never returned in callback)</p>


<p style="margin-left:11%; margin-top: 1em"><i>notify_fn</i>
is pointer to function which is called when value is
changed. It&rsquo;s definition and meaning of parameters is
discussed bellow. <i>user_data</i> argument is passed
directly to <i>notify_fn</i> without any changes.
<i>cmap_track_handle</i> is used for removing of tracking
when no longer needed by calling <b>cmap_track_delete(3)</b>
function.</p>

<p style="margin-left:11%; margin-top: 1em">Callback
function is defined as:</p>

<p style="margin-left:22%; margin-top: 1em">typedef void
(*cmap_notify_fn_t) ( <br>
cmap_handle_t cmap_handle, <br>
cmap_track_handle_t cmap_track_handle, <br>
int32_t event, <br>
const char *key_name, <br>
struct cmap_notify_value new_value, <br>
struct cmap_notify_value old_value, <br>
void *user_data);</p>

<p style="margin-left:11%; margin-top: 1em">where
<i>cmap_handle</i> is handle used in registration of track
function. <i>cmap_track_handle</i> is handle returned by
<b>cmap_track_add</b> function. <i>event</i> is one of
<b>CMAP_TRACK_ADD</b>, <b>CMAP_TRACK_DELETE</b> or
<b>CMAP_TRACK_MODIFY</b>. <i>key_name</i> is name of changed
key. <i>new_value</i> is new value of key, or unset if
<i>event</i> is <b>CMAP_TRACK_DELETE</b>. <i>old_value</i>
is previous value of key or unset if <i>event</i> is
<b>CMAP_TRACK_ADD</b> or for some special keys set directly
by Corosync due to speed optimalizations. Both
<i>new_value</i> and <i>old_value</i> are structures defined
as:</p>

<p style="margin-left:22%; margin-top: 1em">struct
cmap_notify_value { <br>
cmap_value_types_t type; <br>
size_t len; <br>
const void *data; <br>
};</p>

<p style="margin-left:11%; margin-top: 1em">If value is
unset, all fields are set to 0. Otherwise <i>type</i> is one
of cmap types (as described in <b>cmap_get(3)</b> function),
<i>len</i> is length of value in cmap and <i>data</i> is
pointer to value of item. Data storage is dynamically
alocated by caller and notify function must not try to free
it.</p>

<h2>RETURN VALUE
<a name="RETURN VALUE"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">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.</p>

<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><b>cmap_track_delete</b>(3),
<b>cmap_initialize</b>(3), <b>cmap_get</b>(3),
<b>cmap_dispatch</b>(3), <b>cmap_overview</b>(8)</p>


<p style="margin-left:11%; margin-top: 1em"><b>CS_ERR_TRY_AGAIN</b>
Resource temporarily unavailable</p>


<p style="margin-left:11%; margin-top: 1em"><b>CS_ERR_INVALID_PARAM</b>
Invalid argument</p>


<p style="margin-left:11%; margin-top: 1em"><b>CS_ERR_ACCESS</b>
Permission denied</p>


<p style="margin-left:11%; margin-top: 1em"><b>CS_ERR_LIBRARY</b>
The connection failed</p>


<p style="margin-left:11%; margin-top: 1em"><b>CS_ERR_INTERRUPT</b>
System call inturrupted by a signal</p>


<p style="margin-left:11%; margin-top: 1em"><b>CS_ERR_NOT_SUPPORTED</b>
The requested protocol/functuality not supported</p>


<p style="margin-left:11%; margin-top: 1em"><b>CS_ERR_MESSAGE_ERROR</b>
Incorrect auth message received</p>


<p style="margin-left:11%; margin-top: 1em"><b>CS_ERR_NO_MEMORY</b>
Not enough memory to completed the requested task</p>
<hr>
</body>
</html>