evs_mcast_groups.3 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. .\"/*
  2. .\" * Copyright (c) 2004 MontaVista Software, Inc.
  3. .\" *
  4. .\" * All rights reserved.
  5. .\" *
  6. .\" * Author: Steven Dake (sdake@redhat.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 "corosync Man Page" "Corosync Cluster Engine 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 <corosync/evs.h>
  40. .sp
  41. .BI "int evs_mcast_groups(evs_handle_t " handle ", evs_guraantee_t " guarantee ", 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_guarantee_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
  97. .I groups
  98. argument is of the type evs_group_t which is defined by the structure:
  99. .IP
  100. .RS
  101. .ne 18
  102. .nf
  103. .ta 4n 30n 33n
  104. typedef struct {
  105. char key[32];
  106. } evs_groups_t;
  107. .ta
  108. .fi
  109. .RE
  110. .IP
  111. .PP
  112. .PP
  113. The
  114. .I group_entries
  115. argument describes the number of entries in the
  116. .I group
  117. argument.
  118. .PP
  119. The
  120. .I iovec
  121. argument describes the scatter/gather list which is used to transmit a message. This
  122. is a standard socket structure described by:
  123. .IP
  124. .RS
  125. .ne 18
  126. .nf
  127. .ta 4n 30n 33n
  128. struct iovec
  129. {
  130. void *iov_base; /* Pointer to data. */
  131. unsigned int iov_len; /* Length of data. */
  132. };
  133. .ta
  134. .fi
  135. .RE
  136. .IP
  137. .PP
  138. .PP
  139. The
  140. .I iovlen
  141. argument describes the number of entires in the
  142. .I iovec
  143. argument.
  144. .SH RETURN VALUE
  145. This call returns the EVS_OK value if successful, otherwise an error is returned.
  146. .PP
  147. .SH ERRORS
  148. The errors are undocumented.
  149. .SH "SEE ALSO"
  150. .BR evs_overview (8),
  151. .BR evs_initialize (3),
  152. .BR evs_finalize (3),
  153. .BR evs_fd_get (3),
  154. .BR evs_dispatch (3),
  155. .BR evs_leave (3),
  156. .BR evs_join (3),
  157. .BR evs_mcast_joined (3),
  158. .BR evs_membership_get (3)
  159. .BR evs_context_get (3)
  160. .BR evs_context_set (3)
  161. .PP