evs_mcast_groups.3 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. .\"/*
  2. .\" * Copyright (c) 2004 MontaVista Software, Inc.
  3. .\" *
  4. .\" * All rights reserved.
  5. .\" *
  6. .\" * Author: Steven Dake (sdake@mvista.com)
  7. .\" *
  8. .\" * This software licensed under BSD license, the text of which follows:
  9. .\" *
  10. .\" * Redistribution and use in source and binary forms, with or without
  11. .\" * modification, are permitted provided that the following conditions are met:
  12. .\" *
  13. .\" * - Redistributions of source code must retain the above copyright notice,
  14. .\" * this list of conditions and the following disclaimer.
  15. .\" * - Redistributions in binary form must reproduce the above copyright notice,
  16. .\" * this list of conditions and the following disclaimer in the documentation
  17. .\" * and/or other materials provided with the distribution.
  18. .\" * - Neither the name of the MontaVista Software, Inc. nor the names of its
  19. .\" * contributors may be used to endorse or promote products derived from this
  20. .\" * software without specific prior written permission.
  21. .\" *
  22. .\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  23. .\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24. .\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  25. .\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  26. .\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  27. .\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  28. .\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  29. .\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  30. .\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  31. .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  32. .\" * THE POSSIBILITY OF SUCH DAMAGE.
  33. .\" */
  34. .TH EVS_MCAST_GROUPS 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
  35. .SH NAME
  36. evs_join \- Multicast a message to selected groups
  37. .SH SYNOPSIS
  38. .B #include <sys/uio.h>
  39. .B #include <openais/evs.h>
  40. .sp
  41. .BI "int evs_mcast_gruops(evs_handle_t *" handle ", evs_guraantee_t " guarantee ", evs_priority_t " priority ", evs_group_t *" groups ", int group_entries, struct iovec *" iovec ", int " iov_len ");
  42. .SH DESCRIPTION
  43. The
  44. .B evs_mcast_groups(3)
  45. function multicasts a message to all the groups specified in the arguemnt
  46. .I groups.
  47. Messages are delivered to all processors in the system that are described by the current
  48. configuration.
  49. .PP
  50. The argument
  51. .I handle
  52. describes a handle created with
  53. .B evs_initialize(3).
  54. .PP
  55. The argument
  56. .I guarantee
  57. requests a delivery guarantee for the message to be sent. The evs_guarantee_t type is
  58. defined by:
  59. .IP
  60. .RS
  61. .ne 18
  62. .nf
  63. .ta 4n 30n 33n
  64. typedef enum {
  65. EVS_TYPE_UNORDERED, /* not implemented */
  66. EVS_TYPE_FIFO, /* same as agreed */
  67. EVS_TYPE_AGREED, /* implemented */
  68. EVS_TYPE_SAFE /* not implemented */
  69. } evs_guarantee_t;
  70. .ta
  71. .fi
  72. .RE
  73. .IP
  74. .PP
  75. .PP
  76. The meanings of the evs_gaurantee_t typedef are:
  77. .TP
  78. .B EVS_GUARANTEE_UNORDERED
  79. Messages are guaranteed to be delivered, but with no particular order. This
  80. mode is unimplemented in the EVS library.
  81. .TP
  82. .B EVS_GUARANTEE_FIFO
  83. Messages are guaranteed to be delivered in first sent first delivery order
  84. from one one. In fact, this guarantee is actually the AGREED guarantee.
  85. .TP
  86. .B EVS_GUARANTEE_AGREED
  87. All processors must agree on the order of delivery. If a message is sent
  88. from two or more processors at about the same time, the delivery will occur
  89. in the same order to all processors.
  90. .TP
  91. .B EVS_GUARANTEE_SAFE
  92. All processors must agree on the order of delivery. Further all processors
  93. must have a copy of the message before any delivery takes place. This mode is
  94. unimplemented in the EVS library.
  95. .PP
  96. The argument
  97. .I priority
  98. describes the priority at which a message will be sent. Messages will be sent with
  99. higher priorities before messages with lower priorities. This requirement only applies
  100. to the local processor. If two processors have two different priority messages, the
  101. messages may be sent from either priority depending on the algorithm of the EVS library.
  102. The evs_priority_t typedef is described by:
  103. .IP
  104. .RS
  105. .ne 18
  106. .nf
  107. .ta 4n 30n 33n
  108. typedef enum {
  109. EVS_PRIO_RECOVERY,
  110. EVS_PRIO_HIGH,
  111. EVS_PRIO_MED,
  112. EVS_PRIO_LOW
  113. } evs_priority_t;
  114. .ta
  115. .fi
  116. .RE
  117. .IP
  118. .PP
  119. .PP
  120. The meanings of the evs_priority_t typedef are:
  121. .TP
  122. .B EVS_PRIO_RECOVERY
  123. Messages are sent from this priority level first. This priority level is used
  124. for recovery of state after a partition or merge occurs.
  125. .TP
  126. .B EVS_PRIO_HIGH
  127. Messages are sent from this priority level second.
  128. .TP
  129. .B EVS_PRIO_MED
  130. Messages are sent from this priority level third.
  131. .I groups
  132. .TP
  133. .B EVS_PRIO_LOW
  134. Messages are sent from this priority level fourth.
  135. .PP
  136. The
  137. .I groups
  138. argument is of the type evs_group_t which is defined by the structure:
  139. .IP
  140. .RS
  141. .ne 18
  142. .nf
  143. .ta 4n 30n 33n
  144. typedef struct {
  145. char key[32];
  146. } evs_groups_t;
  147. .ta
  148. .fi
  149. .RE
  150. .IP
  151. .PP
  152. .PP
  153. The
  154. .I group_entries
  155. argument describes the number of entries in the
  156. .I group
  157. argument.
  158. .PP
  159. The
  160. .I iovec
  161. argument describes the scatter/gather list which is used to transmit a message. This
  162. is a standard socket structure described by:
  163. .IP
  164. .RS
  165. .ne 18
  166. .nf
  167. .ta 4n 30n 33n
  168. struct iovec
  169. {
  170. void *iov_base; /* Pointer to data. */
  171. size_t iov_len; /* Length of data. */
  172. };
  173. .ta
  174. .fi
  175. .RE
  176. .IP
  177. .PP
  178. .PP
  179. The
  180. .I iovlen
  181. argument describes the number of entires in the
  182. .I iovec
  183. argument.
  184. .SH RETURN VALUE
  185. This call returns the EVS_OK value if successful, otherwise an error is returned.
  186. .PP
  187. .SH ERRORS
  188. The errors are undocumented.
  189. .SH "SEE ALSO"
  190. .BR evs_overview (8),
  191. .BR evs_initialize (3),
  192. .BR evs_finalize (3),
  193. .BR evs_fd_get (3),
  194. .BR evs_dispatch (3),
  195. .BR evs_leave (3),
  196. .BR evs_join (3),
  197. .BR evs_mcast_joined (3)
  198. .PP