Преглед изворни кода

Revert patch 1633 which breaks build.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1636 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake пре 17 година
родитељ
комит
e1f531380a
100 измењених фајлова са 771 додато и 656 уклоњено
  1. 1 1
      Doxyfile
  2. 1 1
      LICENSE
  3. 14 15
      Makefile
  4. 1 1
      Makefile.inc
  5. 45 45
      README.devmap
  6. 1 1
      README.recovery
  7. 11 11
      SECURITY
  8. 1 1
      TODO
  9. 2 2
      conf/corosync.conf
  10. 28 28
      corosync/QUICKSTART
  11. 5 5
      exec/Makefile
  12. 37 19
      exec/apidef.c
  13. 2 2
      exec/apidef.h
  14. 8 7
      exec/coroparse.c
  15. 3 3
      exec/coropoll.c
  16. 14 13
      exec/flow.c
  17. 7 7
      exec/flow.h
  18. 34 34
      exec/ipc.c
  19. 11 11
      exec/ipc.h
  20. 5 5
      exec/logsys.c
  21. 42 43
      exec/main.c
  22. 10 11
      exec/main.h
  23. 6 5
      exec/mainconfig.c
  24. 4 4
      exec/mainconfig.h
  25. 1 1
      exec/mempool.c
  26. 1 1
      exec/mempool.h
  27. 29 7
      exec/objdb.c
  28. 33 34
      exec/service.c
  29. 5 5
      exec/service.h
  30. 13 12
      exec/sync.c
  31. 1 1
      exec/sync.h
  32. 18 18
      exec/timer.c
  33. 10 10
      exec/timer.h
  34. 1 1
      exec/tlist.h
  35. 7 5
      exec/totemconfig.c
  36. 9 8
      exec/totemconfig.h
  37. 3 2
      exec/totemip.c
  38. 3 2
      exec/totemmrp.c
  39. 1 1
      exec/totemmrp.h
  40. 6 6
      exec/totemnet.c
  41. 1 1
      exec/totemnet.h
  42. 6 5
      exec/totempg.c
  43. 7 6
      exec/totemrrp.c
  44. 1 1
      exec/totemrrp.h
  45. 7 7
      exec/totemsrp.c
  46. 2 2
      exec/totemsrp.h
  47. 4 4
      exec/util.c
  48. 5 4
      exec/util.h
  49. 1 1
      exec/vsf.h
  50. 8 7
      exec/vsf_ykd.c
  51. 2 1
      exec/wthread.c
  52. 4 4
      init/generic
  53. 0 1
      lcr/Makefile
  54. 1 1
      lcr/README.lcr
  55. 3 3
      lcr/lcr_ifact.c
  56. 1 1
      lcr/libtest_a.c
  57. 1 1
      lcr/libtest_b.c
  58. 1 1
      lcr/test.c
  59. 2 3
      lib/Makefile
  60. 34 34
      lib/cfg.c
  61. 61 9
      lib/confdb.c
  62. 8 8
      lib/cpg.c
  63. 9 9
      lib/evs.c
  64. 12 12
      lib/libcfg.versions
  65. 24 10
      lib/sa-confdb.c
  66. 1 0
      lib/sa-confdb.h
  67. 3 3
      lib/util.c
  68. 2 2
      man/Makefile
  69. 8 8
      man/amf.conf.5
  70. 2 2
      man/confdb_dispatch.3
  71. 2 2
      man/confdb_fd_get.3
  72. 2 2
      man/confdb_finalize.3
  73. 2 2
      man/confdb_initialize.3
  74. 2 2
      man/confdb_key_create.3
  75. 2 2
      man/confdb_key_delete.3
  76. 2 2
      man/confdb_key_iter.3
  77. 2 2
      man/confdb_key_replace.3
  78. 2 2
      man/confdb_object_create.3
  79. 2 2
      man/confdb_object_destroy.3
  80. 2 2
      man/confdb_object_find.3
  81. 2 2
      man/confdb_object_iter.3
  82. 2 2
      man/confdb_object_parent_get.3
  83. 3 3
      man/confdb_overview.8
  84. 16 16
      man/corosync.conf.5
  85. 43 43
      man/corosync_overview.8
  86. 2 2
      man/cpg_context_get.3
  87. 2 2
      man/cpg_context_set.3
  88. 2 2
      man/cpg_dispatch.3
  89. 2 2
      man/cpg_fd_get.3
  90. 2 2
      man/cpg_finalize.3
  91. 2 2
      man/cpg_initialize.3
  92. 2 2
      man/cpg_join.3
  93. 2 2
      man/cpg_leave.3
  94. 2 2
      man/cpg_local_get.3
  95. 2 2
      man/cpg_mcast_joined.3
  96. 2 2
      man/cpg_membership_get.3
  97. 2 2
      man/cpg_overview.8
  98. 2 2
      man/evs_dispatch.3
  99. 2 2
      man/evs_fd_get.3
  100. 2 2
      man/evs_finalize.3

+ 1 - 1
Doxyfile

@@ -3,7 +3,7 @@
 #---------------------------------------------------------------------------
 # General configuration options
 #---------------------------------------------------------------------------
-PROJECT_NAME           = corosync
+PROJECT_NAME           = openais
 PROJECT_NUMBER         = 0.75
 OUTPUT_DIRECTORY       = doc/api
 OUTPUT_LANGUAGE        = English

+ 1 - 1
LICENSE

@@ -44,7 +44,7 @@ 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.
 -----------------------------------------------------------------------------
-The corosync project uses software from the LibTomCrypt project
+The openais project uses software from the LibTomCrypt project
 www.libtomcrypt.org.  This software is contained the files exec/crypto.c and
 exec/crypto.h.  The following license applies to the files exec/crypto.c and
 exec/crytpo.h:

+ 14 - 15
Makefile

@@ -175,29 +175,28 @@ install: all
 	install -m 755 $(builddir)exec/corosync $(DESTDIR)$(SBINDIR)
 	install -m 755 $(builddir)tools/corosync-objctl $(DESTDIR)$(SBINDIR)
 	install -m 755 $(builddir)tools/corosync-cfgtool $(DESTDIR)$(SBINDIR)
-	install -m 700 $(builddir)tools/keygen $(DESTDIR)$(SBINDIR)/corosync-keygen
+	install -m 700 $(builddir)tools/corosync-keygen $(DESTDIR)$(SBINDIR)
 
 	if [ ! -f $(DESTDIR)$(ETCDIR)/penais.conf ] ; then 	   \
 		install -m 644 $(srcdir)conf/corosync.conf $(DESTDIR)$(ETCDIR) ; \
 	fi
 
 	for aHeader in $(AIS_HEADERS); do				\
-	    install -m 644 $(srcdir)include/$$aHeader $(DESTDIR)$(INCLUDEDIR);	\
+	    install -m 644 $(srcdir)include/corosync/$$aHeader $(DESTDIR)$(INCLUDEDIR);	\
 	done
 
-	install -m 644 $(srcdir)include/hdb.h $(DESTDIR)$(INCLUDEDIR)
-	install -m 644 $(srcdir)exec/coropoll.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
-	install -m 644 $(srcdir)exec/totempg.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
-	install -m 644 $(srcdir)exec/totem.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
-	install -m 644 $(srcdir)exec/totemip.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
-	install -m 644 $(srcdir)lcr/lcr_ckpt.h $(DESTDIR)$(INCLUDEDIR_LCR)
-	install -m 644 $(srcdir)lcr/lcr_comp.h $(DESTDIR)$(INCLUDEDIR_LCR)
-	install -m 644 $(srcdir)lcr/lcr_ifact.h $(DESTDIR)$(INCLUDEDIR_LCR)
-	install -m 644 $(srcdir)include/coroapi.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
-	install -m 644 $(srcdir)exec/objdb.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
-	install -m 644 $(srcdir)exec/logsys.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
-	install -m 644 $(srcdir)exec/config.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
-	install -m 644 $(srcdir)include/swab.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
+	install -m 644 $(srcdir)include/corosync/hdb.h $(DESTDIR)$(INCLUDEDIR)
+	install -m 644 $(srcdir)include/corosync/totem/coropoll.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
+	install -m 644 $(srcdir)include/corosync/totem/totempg.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
+	install -m 644 $(srcdir)include/corosync/totem/totem.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
+	install -m 644 $(srcdir)include/corosync/totem/totemip.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
+	install -m 644 $(srcdir)include/corosync/lcr/lcr_ckpt.h $(DESTDIR)$(INCLUDEDIR_LCR)
+	install -m 644 $(srcdir)include/corosync/lcr/lcr_comp.h $(DESTDIR)$(INCLUDEDIR_LCR)
+	install -m 644 $(srcdir)include/corosync/lcr/lcr_ifact.h $(DESTDIR)$(INCLUDEDIR_LCR)
+	install -m 644 $(srcdir)include/corosync/engine/coroapi.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
+	install -m 644 $(srcdir)include/corosync/engine/objdb.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
+	install -m 644 $(srcdir)include/corosync/engine/logsys.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
+	install -m 644 $(srcdir)include/corosync/engine/config.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
 	install -m 644 $(srcdir)man/*.3 $(DESTDIR)$(MANDIR)/man3
 	install -m 644 $(srcdir)man/*.5 $(DESTDIR)$(MANDIR)/man5
 	install -m 644 $(srcdir)man/*.8 $(DESTDIR)$(MANDIR)/man8

+ 1 - 1
Makefile.inc

@@ -45,7 +45,7 @@ endif
 
 # default CFLAGS, LDFLAGS
 #
-CFLAGS =
+CFLAGS = -DLCRSODIR='"$(LCRSODIR)"'
 LDFLAGS =
 DYFLAGS =
 

+ 45 - 45
README.devmap

@@ -31,14 +31,14 @@ THE POSSIBILITY OF SUCH DAMAGE.
 
 -------------------------------------------------------------------------------
 This file provides a map for developers to understand how to contribute
-to the corosync project.  The purpose of this document is to prepare a
-developer to write a service for corosync, or understand the architecture
-of corosync.
+to the openais project.  The purpose of this document is to prepare a
+developer to write a service for openais, or understand the architecture
+of openais.
 
 The following is described in this document:
 
  * all files, purpose, and dependencies
- * architecture of corosync
+ * architecture of openais
  * taking advantage of virtual synchrony
  * adding libraries
  * adding services
@@ -238,7 +238,7 @@ exec/cpg.c
 	Server side implementation of closed procss groups (CPG API).
 
 exec/crypto.{c|h}
-	Cryptography functions used by corosync.
+	Cryptography functions used by openais.
 
 exec/evs.c
 	Server side implementation of extended virtual synchrony passthrough
@@ -248,13 +248,13 @@ exec/evt.c
 	Server side implementation of Event Service (EVT API).
 
 exec/ipc.{c|h}
-	All IPC operations used by corosync.
+	All IPC operations used by openais.
 
 exec/jhash.h
 	A hash routine.
 
 exec/keygen.c
-	Secret key generator used by corosync encryption tools.
+	Secret key generator used by openais encryption tools.
 
 exec/lck.c
 	Server side implementation of the distributed lock service (LCK API).
@@ -274,7 +274,7 @@ exec/msg.c
 exec/objdb.{c|h}
 	Object database used to configure services.
 
-exec/corosync-instantiate.c
+exec/openais-instantiate.c
 	instantiates a component by forking and exec'ing it and writing its
 	pid to a pid file.
 
@@ -319,7 +319,7 @@ exec/totemrrp.{c.h}
 	Redundant ring functions for totem - between totemnet and totemsrp.
 
 exec/util.{c|h}
-	Utility functions used by corosync executive.
+	Utility functions used by openais executive.
 
 exec/version.h
 	Defines build version.
@@ -338,10 +338,10 @@ loc
 Counts the lines of code in the AIS implementation.
 
 -------------------------------------------------------------------------------
- architecture of corosync
+ architecture of openais
 -------------------------------------------------------------------------------
 
-The corosync standards based cluster framework is a generic cluster plugin
+The openais standards based cluster framework is a generic cluster plugin
 architecture used to create cluster APIs and services.  Usually there are
 libraries which implement APIs and are linked into the end user application.
 The libraries request services from the aisexec process, called the AIS
@@ -355,7 +355,7 @@ response of the API is delivered once the operation has completed.
            --------------------------------------------------
            |                      IPC API                   |
            --------------------------------------------------
-           |                 corosync Executive              |
+           |                 openais Executive              |
            |                                                |
            |     +---------+ +--------+ +---------+         |
            |     | Object  | |  AIS   | | Service |         |
@@ -385,9 +385,9 @@ response of the API is delivered once the operation has completed.
            |                                                |
            -------------------------------------------------
 
-                    Figure 1: corosync Architecture
+                    Figure 1: openais Architecture
 
-Every application that intends to use corosync links with the libais library.
+Every application that intends to use openais links with the libais library.
 This library uses IPC, or more specifically BSD unix sockets, to communicate
 with the executive.  The library is a small program responsible only for
 packaging the request into a message.  This message is sent, using IPC, to
@@ -449,7 +449,7 @@ group messaging: sending a message from one sender to many receivers
 Virtual synchrony is a model for group messaging.  This is often confused
 with particular implementations of virtual synchrony.  Try to focus on
 what virtual syncrhony provides, not how it provides it, unless interested
-in working on the group messaging interface of corosync.
+in working on the group messaging interface of openais.
 
 Virtual synchrony provides several advantages:
 
@@ -468,7 +468,7 @@ to the cluster membership service (and its respective API0, but is helpful
 to other services as described later.
 
 Strong membership guarantees allow a distributed application to make decisions
-based upon the configuration (membership).  Every service in corosync registers
+based upon the configuration (membership).  Every service in openais registers
 a configuration change function.  This function is called whenever a
 configuration change occurs.  The information passed is the current processors,
 the processors that have left the configuration, and the processors that have
@@ -510,7 +510,7 @@ it must be delivered by every processor unless that processor fails.  If a
 particular processor fails, a configuration change occurs creating a new
 configuration under which a new set of decisions may be made.  This implies
 that even unreliable networks must reliably deliver messages.   The 
-mplementation in corosync works on unreliable as well as reliable networks.
+mplementation in openais works on unreliable as well as reliable networks.
 
 Every message sent must be delivered, unless a configuration change occurs.
 In the case of a configuration change, every message that can be recovered
@@ -522,7 +522,7 @@ of a configuration.
 
 Finally virtual syncrhony takes advantage of hardware multicast to avoid
 duplicated packets and scale to large transmit rates.  On 100mbit network,
-corosync can approach wire speeds depending on the number of messages queued
+openais can approach wire speeds depending on the number of messages queued
 for a particular processor.
 
 What does all of this mean for the developer?
@@ -540,8 +540,8 @@ The first stage in adding a library to the system is to develop the library.
 Library code should follow these guidelines:
 
  * use SA Forum coding style for SA Forum APIs to aid in debugging
- * use corosync coding guidelines for APIs that are not SA Forum that
-   are to be merged into the corosync tree.
+ * use openais coding guidelines for APIs that are not SA Forum that
+   are to be merged into the openais tree.
  * implement all library code within one file named after the api.
    examples are ckpt.c, clm.c, amf.c.
  * use parallel structure as much as possible between different APIs
@@ -881,7 +881,7 @@ struct libais_handler {
 	int (*libais_handler_fn) (void *conn, void *msg);
 	int response_size;
 	int response_id;
-	enum corosync_flow_control flow_control;
+	enum openais_flow_control flow_control;
 };
 
 The response_size, response_id, and flow_control for a library handler are
@@ -894,7 +894,7 @@ OPENAIS_FLOW_CONTROL_NOT_REQUIREDin the flow control field.
 The libais_handler_fn is a function to be called when the library handler is
 requested to be executed.
 
-struct corosync_exec_handler {
+struct openais_exec_handler {
 	void (*exec_handler_fn) (void *msg, unsigned int nodeid);
 	void (*exec_endian_convert_fn) (void *msg);
 };
@@ -908,15 +908,15 @@ format before transmit.  Instead they are transmitted in either big endian or
 little endian depending on the byte order of the transmitter and converted to
 the host machine order on receipt of the message.
 
-struct corosync_service_handler {
+struct openais_service_handler {
 	unsigned char *name;
 	unsigned short id;
 	unsigned int private_data_size;
 	int (*lib_init_fn) (void *conn);
 	int (*lib_exit_fn) (void *conn);
-	struct corosync_lib_handler *lib_service;
+	struct openais_lib_handler *lib_service;
 	int lib_service_count;
-	struct corosync_exec_handler *exec_service;
+	struct openais_exec_handler *exec_service;
 	int (*exec_init_fn) (struct objdb_iface_ver0 *);
 	int (*config_init_fn) (struct objdb_iface_ver0 *);
 	void (*exec_dump_fn) (void);
@@ -947,12 +947,12 @@ lib_exit_fn is the function executed when a library connection is exited
 either because the application closed the file descriptor, or the OS
 closed the file descriptor.
 
-lib_service is an array of corosync_lib_handler data structures which define
+lib_service is an array of openais_lib_handler data structures which define
 the library service handler.
 
 lib_service_count is the number of elements in lib_service.
 
-exec_service is an array of corosync_exec_handler data structures which define
+exec_service is an array of openais_exec_handler data structures which define
 the executive service handler.
 
 exec_init_fn is a function used to initialize the executive service.  This
@@ -998,20 +998,20 @@ used in the handler function.
 ------------------------------------------------
 
 The service handler needs some special magic to dynamically be linked into
-corosync.  
+openais.  
 
 /*
  * Dynamic loader definition
  */
-static struct corosync_service_handler *clm_get_service_handler_ver0 (void);
+static struct openais_service_handler *clm_get_service_handler_ver0 (void);
 
-static struct corosync_service_handler_iface_ver0 clm_service_handler_iface = {
-        .corosync_get_service_handler_ver0       = clm_get_service_handler_ver0
+static struct openais_service_handler_iface_ver0 clm_service_handler_iface = {
+        .openais_get_service_handler_ver0       = clm_get_service_handler_ver0
 };
 
-static struct lcr_iface corosync_clm_ver0[1] = {
+static struct lcr_iface openais_clm_ver0[1] = {
         {
-                .name                   = "corosync_clm",
+                .name                   = "openais_clm",
                 .version                = 0,
                 .versions_replace       = 0,
                 .versions_replace_count = 0,
@@ -1025,16 +1025,16 @@ static struct lcr_iface corosync_clm_ver0[1] = {
 
 static struct lcr_comp clm_comp_ver0 = {
         .iface_count                    = 1,
-        .ifaces                         = corosync_clm_ver0
+        .ifaces                         = openais_clm_ver0
 };
 
-static struct corosync_service_handler *clm_get_service_handler_ver0 (void)
+static struct openais_service_handler *clm_get_service_handler_ver0 (void)
 {
         return (&clm_service_handler);
 }
 
 __attribute__ ((constructor)) static void clm_comp_register (void) {
-        lcr_interfaces_set (&corosync_clm_ver0[0], &clm_service_handler_iface);
+        lcr_interfaces_set (&openais_clm_ver0[0], &clm_service_handler_iface);
 
         lcr_component_register (&clm_comp_ver0);
 }
@@ -1044,7 +1044,7 @@ the service will be loaded if its in the default services list.
 
 The default service list is specified in service.c:default_services.  If
 creating an external plugin, there are configuration parameters which may
-be used to add your plugin into the corosync scanning of plugins.
+be used to add your plugin into the openais scanning of plugins.
 
 ---------------------------------
  Connection specific information 
@@ -1053,7 +1053,7 @@ Every connection may have specific connection information if private data
 is greater then zero for the service handler.  This is used to allow each
 library connection to maintain private state to that connection.  The private
 data for a connection can be retrieved with:
-struct service_pd service_pd = (struct service_pd *)corosync_conn_private_data_get (conn);
+struct service_pd service_pd = (struct service_pd *)openais_conn_private_data_get (conn);
 
 where service is the name of the service implemented and conn is the connection
 information likely passed into the library handler or stored in a
@@ -1066,7 +1066,7 @@ message_source structure for later use by an executive handler.
 A message is sent to the library from the executive message handler using
 the function:
 
-extern int corosync_conn_send_response (void *conn_info, void *msg,
+extern int openais_conn_send_response (void *conn_info, void *msg,
 	int mlen);
 
 conn_info is passed into the library message handler or stored in the
@@ -1076,7 +1076,7 @@ msg is the message to send
 mlen is the length of the message to send
 
 Keep in mind that struct res_message should be at the beginning of the response
-message so that it follows the style used in the rest of corosync.
+message so that it follows the style used in the rest of openais.
 
 --------------------------------------------
  deferring response to an executive message
@@ -1095,7 +1095,7 @@ Then the executive message handler determines if this processor is responsible
 for responding:
 
 if (message_source_is_local (conn)) {
-	corosync_conn_send_response ();
+	openais_conn_send_response ();
 
 }
 
@@ -1108,9 +1108,9 @@ delivery according to virtual synchrony semantics use:
 The totempg interface supports multiple users at one time and if you need
 to use a full totempg interface (defined in totempg.h) please ask for
 assistance on the mailing list.  If you simply want to use multicast
-transmissions in corosync, do the following:
+transmissions in openais, do the following:
 
-       assert (totempg_groups_mcast_joined (corosync_group_handle, &req_exec_clm_iovec, 1, TOTEMPG_AGREED) == 0);
+       assert (totempg_groups_mcast_joined (openais_group_handle, &req_exec_clm_iovec, 1, TOTEMPG_AGREED) == 0);
 
 -----------------
  library handler
@@ -1209,13 +1209,13 @@ case GDB may become your enemy.
 printf is your friend when GDB is your enemy.  
 
 If stuck, ask on the mailing list, send your patches.  Alot of time has been
-spent designing corosync, and even more time debugging it.  There are people
+spent designing openais, and even more time debugging it.  There are people
 that can help you debug problems, especially around things like message
 delivery.
 
 Submit patches early to get feedback, especially around things like parallel
 style.  Parallel style is very important to ensure maintainability by the
-corosync community.
+openais community.
 
 If this document is wrong or incomplete, complain so we can get it fixed
 for other people.

+ 1 - 1
README.recovery

@@ -1,6 +1,6 @@
 SYNCHRONIZATION ALGORITHM:
 -------------------------
-The synchronization algorithm is used for every service in corosync to
+The synchronization algorithm is used for every service in openais to
 synchronize state of he system.
 
 There are 4 events of the synchronization algorithm.  These events are in fact

+ 11 - 11
SECURITY

@@ -6,32 +6,32 @@ together with object code resulting from the compiling of publicly
 available source code, may be exported from the United States under License
 Exception TSU prsuant to 15 C.F.R Section 740.13(e).
 ***
-Security Design of corosync
+Security Design of openais
 
-The corosync project intends to mitigate the following threats:
+The openais project intends to mitigate the following threats:
 
-1. forged group messaging messages which are intended to fault the corosync
+1. forged group messaging messages which are intended to fault the openais
    executive
 2. forged group messaging messages which are intended to fault applications
-   using corosync apis
+   using openais apis
 3. monitoring of network data to capture sensitive information
 
-The corosync project does not intend to mitigate the following threats:
+The openais project does not intend to mitigate the following threats:
 
 1. physical access to the hardware which could expose the private key
 2. privledged access to the operating system which could expose the private key
    or be used to inject errors into the ais executive.
-3. library user creates requests which are intended to fault the corosync
+3. library user creates requests which are intended to fault the openais
    executive
 
-The corosync project mitigates the threats using two mechanisms:
+The openais project mitigates the threats using two mechanisms:
 
 1. Authentication
 2. Secrecy
 
 Library Interface
 -----------------
-The corosync executive authenticates every library user.  The library is only
+The openais executive authenticates every library user.  The library is only
 allowed to access services if it's GID is ais or 0.  Unauthorized library
 users are rejected.
 
@@ -42,9 +42,9 @@ fault.
 
 Group Messaging Interface
 -------------------------
-Group messaging uses UDP/IP to communicate with other corosync executives using
+Group messaging uses UDP/IP to communicate with other openais executives using
 messages.  It is possible without authentication of every packet that an
-attacker could forge messages.  These forged messages could fault the corosync
+attacker could forge messages.  These forged messages could fault the openais
 executive distributed state machines.  It would also be possible to corrupt 
 end applications by forging changes.
 
@@ -123,4 +123,4 @@ is randomly unique (within the 2^128 search space of the input to sober) to
 ensure that keys are never reused, nonce's are never reused, and hmac's are
 never reused.
 
-Comments welcome mailto:corosync@lists.osdl.org
+Comments welcome mailto:openais@lists.osdl.org

+ 1 - 1
TODO

@@ -1,4 +1,4 @@
-The corosync standards based cluster framework TODO list
+The openais standards based cluster framework TODO list
 Last Updated: May 26, 2006
 
 P1 items are to be implemented before Wilson release.  P2 items may be

+ 2 - 2
conf/corosync.conf

@@ -1,4 +1,4 @@
-# Please read the corosync.conf.5 manual page
+# Please read the openais.conf.5 manual page
 totem {
 	version: 2
 	secauth: off
@@ -16,7 +16,7 @@ logging {
 	to_stderr: yes
 	to_file: yes
 	to_syslog: yes
-	logfile: /tmp/corosync.log
+	logfile: /tmp/openais.log
 	debug: off
 	timestamp: on
 	logger {

+ 28 - 28
corosync/QUICKSTART

@@ -10,7 +10,7 @@ available source code, may be exported from the United States under License
 Exception TSU prsuant to 15 C.F.R Section 740.13(e).
 ***
 
-This corosync package is broken into four parts.  The exec directory contains
+This openais package is broken into four parts.  The exec directory contains
 all of the code responsible for serving the APIs.  The lib directory contains
 APIs the to which the user may link.  The test directory contains some simple
 test programs which exercise the APIs.  The directory conf contains example
@@ -22,12 +22,12 @@ Management Framework (AMF), Checkpointing (CKPT), and Eventing (EVT).
 The API also contains an extended virtual synchrony API which can be used
 in distributed applications.
 
-Configuring the corosync executive:
+Configuring the openais executive:
 ---------------------------------
-The corosync executive will automatically determine cluster membership by
+The openais executive will automatically determine cluster membership by
 communicating on a specified multicast address and port.
 
-The directory conf contains the file corosync.conf
+The directory conf contains the file openais.conf
 
 totem {
 	bindnetaddr: 192.168.1.0
@@ -57,9 +57,9 @@ timeout {
 }
 
 The totem section contains three values.  All three values must be set
-or the corosync executive wll exit with an error.
+or the openais executive wll exit with an error.
 
-bindnetaddr specifies the address which the corosync Executive should bind to.
+bindnetaddr specifies the address which the openais Executive should bind to.
 This address should always end in zero.  If the local interface taffic
 should routed over is 192.168.5.92, set bindnetaddr to 192.168.5.0.
 
@@ -68,7 +68,7 @@ a different network configuration.  Avoid 224.x.x.x because this is a "config"
 multicast address.
 
 mcastport specifies the UDP port number.  It is possible to use the same
-multicast address on a network with the corosync services configured for different
+multicast address on a network with the openais services configured for different
 UDP ports.
 
 The logging section contains values.  These values do not have to be set in which
@@ -76,7 +76,7 @@ case the system defaults to logging to syslog and stderr with timestamping and d
 
 It is possible to select 3 destinations for logs: files, stderr, and syslog.  One or
 more may be selected at the same time.  If file is selected as a destination, the file
-name must be specified via the logfile option or the corosync executive will exit.
+name must be specified via the logfile option or the openais executive will exit.
 
 The debug option prints out internal debugging information during runtime which may
 be helpful for developers.
@@ -107,20 +107,20 @@ A few notes about the config files:
    file parser.  We are working on fixing these bugs, but for the moment, it is
    easy to simply avoid them.
 
-Building corosync
+Building openais
 ----------------
-corosync requires GCC, LD, and a Linux 2.4/2.6 kernel.  corosync has been tested on
+openais requires GCC, LD, and a Linux 2.4/2.6 kernel.  openais has been tested on
 Debian Sarge(i386), Redhat 9(i386), Fedora Core 2(i386), Fedora Core
 4(i386,x86_64) and MontaVista Carrier Grade Edition 3.1(i386, x86_64,
 classic ppc, ppc970, xscale).
 
-Compile corosync by running make in the root directory.  Make can also be run
+Compile openais by running make in the root directory.  Make can also be run
 in the individual directories.  Nothing is installed by make.  If install
 is desired, the files must be copied manually.
 
 Configure Host
 --------------
-For security reasons, the corosync only allows a process that had the EGID/GID
+For security reasons, the openais only allows a process that had the EGID/GID
 of "ais" to connect to it.  To make development easier, it is recommended to
 create an "ais" user with the "ais" group.
 
@@ -136,16 +136,16 @@ passwd: all authentication tokens updated successfully.
 
 Generate a private key
 ----------------------
-corosync uses cryptographic techniques to ensure authenticity and privacy of
+openais uses cryptographic techniques to ensure authenticity and privacy of
 messages.  A private key must be generated and shared by all processors for
 correct operation.
 
 First generate the key on one of the nodes:
 
 unix# exec/keygen
-Opencorosync Authentication key generator.
+Openopenais Authentication key generator.
 Gathering 1024 bits for key from /dev/random.
-Writing corosync key to /etc/ais/authkey.
+Writing openais key to /etc/ais/authkey.
 
 
 After this is complete, a private key will be in the file /etc/ais/authkey.
@@ -160,14 +160,14 @@ unix# install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/a
 
 If the message invalid digest appears, the keys are not the same on each node.
 
-Run the corosync executive
+Run the openais executive
 -------------------------
-Get one or more nodes and run the corosync executive on each node.  A list of
+Get one or more nodes and run the openais executive on each node.  A list of
 node IPs should be logged when the nodes join a configuration.  Run the
 aisexec program after following the previous directions.
 
 A final note on permissions:
-It is not absolutely required that corosync executive runs as root.  If
+It is not absolutely required that openais executive runs as root.  If
 it runs as root, it schedules at the highest round robin realtime
 priority and locks all of it's pages into ram in case a swap would cause a
 delay in the real-time nature of the protocol.  The warning "not  
@@ -178,12 +178,12 @@ The ais user/group is required because applications are authenticated
 against the ais user and group.  If an application(/library) is not root
 or ais, then the application cannot connect to the ais executive.
 
-please read SECURITY to understand the threat model assumed by corosync
-and the techniques corosync use to overcome these threats.
+please read SECURITY to understand the threat model assumed by openais
+and the techniques openais use to overcome these threats.
 
 Before running any of the test programs
 ---------------------------------------
-The corosync executive will ensure security by only allowing the ais group (or
+The openais executive will ensure security by only allowing the ais group (or
 uid root) to connect to the service.  Switch to the ais group before
 running any applications linked to the ais apis, or the applications will
 not be authenticated and won't be able to access services.
@@ -193,7 +193,7 @@ Password:
 [ais@slickdeal sdake]$ id
 uid=501(ais) gid=502(ais) groups=502(ais)
 
-Try out the corosync CLM functionality
+Try out the openais CLM functionality
 -------------------------------------
 After aisexec is running
 
@@ -209,7 +209,7 @@ aisexec on other nodes.
 Killing aisexec on the node the testclm is connected will cause the 
 API to return error codes indicating the system has failed.
 
-Try out the corosync AMF functionality
+Try out the openais AMF functionality
 -------------------------------------
 After aisexec is running
 
@@ -221,14 +221,14 @@ SU #3 consists of testamf5, testamf6.  The active and backup directives
 in amf.conf define how many SU's become active and how many
 become standby in the service group (SG).
 
-To test the corosync AMF, run testamf3 and testamf4 on one node.  Both
+To test the openais AMF, run testamf3 and testamf4 on one node.  Both
 components become in service and active.  Then run testamf1.  Nothing
 appears to happen, because testamf1 is not placed in service (and made
 standby) until testamf2 is registered.  Running testamf2 will show 
 a variety of state changes.  testamf1 will match these state changes.
 testamf2 is special because is reports an error, and later cancels
 the error, causing the entire SU to go out of service, then back in
-service.  This behavior is expected by the corosync specification and the
+service.  This behavior is expected by the openais specification and the
 code in testamf2.c can be read for a clearer understanding of what
 is happening.
 
@@ -238,7 +238,7 @@ out of service.  If ctrl-z is pressed on the active SU, the standby
 SU will become active.  CTRL-C on these tests behaves the same way.
 A crash behaves the same way.
 
-Try out the corosync CKPT functionality
+Try out the openais CKPT functionality
 --------------------------------------
 su to ais user
 
@@ -256,13 +256,13 @@ Two node clusters should approach 8.5 MB/sec on 100 mbit networks for
 larger checkpoint sizes with encryption and authentication.  If you are not
 seeing these results, please report to the mailing list.
 
-Try out the corosync EVT functionality
+Try out the openais EVT functionality
 -------------------------------------
 su to ais user
 
 run testevt.  This will execute various eventing API operations.
 
-Try out the corosync EVS functionality
+Try out the openais EVS functionality
 -------------------------------------
 su to ais user
 run testevs.  This will generate multicast messages and self deliver them

+ 5 - 5
exec/Makefile

@@ -36,7 +36,7 @@ subdir ?= exec/
 
 include $(srcdir)Makefile.inc
 
-LDFLAGS += -L./
+override LDFLAGS += -L./ ${DYFLAGS}
 
 ifeq (${BUILD_DYNAMIC}, 1) 
 	override LDFLAGS += ${DYFLAGS}
@@ -60,7 +60,7 @@ EXEC_LIBS = libtotem_pg.a liblogsys.a
 
 # LCR objects
 LCR_SRC = vsf_ykd.c objdb.c coroparse.c
-LCR_OBJS =aisparser.o vsf_ykd.o objdb.o coroparse.o
+LCR_OBJS = vsf_ykd.o objdb.o coroparse.o
 
 # main executive objects
 MAIN_SRC = main.c mempool.c util.c sync.c apidef.c service.c ipc.c flow.c \
@@ -74,7 +74,7 @@ EXEC_OBJS = $(MAIN_OBJS)
 override CFLAGS += -fPIC
 
 all:libtotem_pg.a libtotem_pg.so.2.0.0 liblogsys.a liblogsys.so.2.0.0 \
-	../lcr/lcr_ifact.o corosync \
+	../lcr/lcr_ifact.o corosync_ \
 	objdb.lcrso vsf_ykd.lcrso coroparse.lcrso
 else
 EXEC_OBJS = $(MAIN_OBJS) $(LCR_OBJS)
@@ -105,7 +105,7 @@ coroparse.lcrso: coroparse.o
 	$(CC) -shared -Wl,-soname,coroparse.lcrso coroparse.o -o $@
 endif
 
-corosync: $(EXEC_OBJS) $(EXEC_LIBS)
+corosync_: $(EXEC_OBJS) $(EXEC_LIBS)
 	$(CC) $(EXEC_OBJS) $(EXEC_LIBS) -o corosync $(LDFLAGS)
 
 libtotem_pg.a: $(TOTEM_OBJS)
@@ -140,7 +140,7 @@ depend:
 
 # - fPIC rules required for service handler shared objects
 ../lcr/lcr_ifact.o: $(srcdir)lcr/lcr_ifact.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) -DPREFIX='"$(PREFIX)"' -DLCRSODIR='"$(LCRSODIR)"' -I../lcr -c -o $@ $<
+	$(CC) $(CFLAGS) $(CPPFLAGS) -DPREFIX='"$(PREFIX)"' -c -o $@ $<
 
 vsf_ykd.o: vsf_ykd.c
 	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

+ 37 - 19
exec/apidef.c

@@ -36,37 +36,46 @@
 #include <string.h>
 #include <assert.h>
 
-#include "swab.h"
-#include "totem.h"
+#include <corosync/swab.h>
+#include <corosync/totem/totem.h>
 #include "util.h"
-#include "logsys.h"
+#include <corosync/engine/logsys.h>
 #include "timer.h"
-#include "totempg.h"
-#include "totemip.h"
+#include <corosync/totem/totempg.h>
+#include <corosync/totem/totemip.h>
 #include "main.h"
 #include "ipc.h"
-#include "../include/coroapi.h"
+#include <corosync/engine/coroapi.h>
 #include "service.h"
-#include "../lcr/lcr_ifact.h"
+#include <corosync/lcr/lcr_ifact.h>
 
 LOGSYS_DECLARE_SUBSYS ("APIDEF", LOG_INFO);
 
+/*
+ * Remove compile warnings about type name changes
+ */
+typedef int (*typedef_tpg_join) (corosync_tpg_handle, struct corosync_tpg_group *, int);
+typedef int (*typedef_tpg_leave) (corosync_tpg_handle, struct corosync_tpg_group *, int);
+typedef int (*typedef_tpg_groups_mcast) (corosync_tpg_handle, int, struct corosync_tpg_group *, int groups_cnt, struct iovec *, int);
+typedef int (*typedef_tpg_groups_send_ok) (corosync_tpg_handle, struct corosync_tpg_group *, int groups_cnt, struct iovec *, int);
+
+
 static struct corosync_api_v1 apidef_corosync_api_v1 = {
-	.timer_add_duration = corosync_timer_add_duration,
-	.timer_add_absolute = corosync_timer_add_absolute,
-	.timer_delete = corosync_timer_delete,
+	.timer_add_duration = openais_timer_add_duration,
+	.timer_add_absolute = openais_timer_add_absolute,
+	.timer_delete = openais_timer_delete,
 	.timer_time_get = NULL,
 	.ipc_source_set = message_source_set,
 	.ipc_source_is_local = message_source_is_local,
-	.ipc_private_data_get = corosync_conn_private_data_get,
+	.ipc_private_data_get = openais_conn_private_data_get,
 	.ipc_response_send = NULL,
 	.ipc_dispatch_send = NULL,
-	.ipc_conn_send_response = corosync_conn_send_response,
-	.ipc_conn_partner_get = corosync_conn_partner_get,
-	.ipc_refcnt_inc =  corosync_ipc_flow_control_local_increment,
-	.ipc_refcnt_dec = corosync_ipc_flow_control_local_decrement,
-	.ipc_fc_create = corosync_ipc_flow_control_create,
-	.ipc_fc_destroy = corosync_ipc_flow_control_destroy,
+	.ipc_conn_send_response = openais_conn_send_response,
+	.ipc_conn_partner_get = openais_conn_partner_get,
+	.ipc_refcnt_inc =  openais_ipc_flow_control_local_increment,
+	.ipc_refcnt_dec = openais_ipc_flow_control_local_decrement,
+	.ipc_fc_create = openais_ipc_flow_control_create,
+	.ipc_fc_destroy = openais_ipc_flow_control_destroy,
 	.totem_nodeid_get = totempg_my_nodeid_get,
 	.totem_family_get = totempg_my_family_get,
 	.totem_ring_reenable = totempg_ring_reenable,
@@ -75,8 +84,16 @@ static struct corosync_api_v1 apidef_corosync_api_v1 = {
 	.totem_ifaces_get = totempg_ifaces_get,
 	.totem_ifaces_print = totempg_ifaces_print,
 	.totem_ip_print = totemip_print,
-	.service_link_and_init = corosync_service_link_and_init,
-	.service_unlink_and_exit = corosync_service_unlink_and_exit,
+	.tpg_init = totempg_groups_initialize,
+	.tpg_exit = NULL, /* missing from totempg api */
+	.tpg_join = (typedef_tpg_join)totempg_groups_join,
+	.tpg_leave = (typedef_tpg_leave)totempg_groups_leave,
+	.tpg_joined_mcast = totempg_groups_mcast_joined,
+	.tpg_joined_send_ok = totempg_groups_send_ok_joined,
+	.tpg_groups_mcast = (typedef_tpg_groups_mcast)totempg_groups_mcast_groups,
+	.tpg_groups_send_ok = (typedef_tpg_groups_send_ok)totempg_groups_send_ok_groups,
+	.service_link_and_init = openais_service_link_and_init,
+	.service_unlink_and_exit = openais_service_unlink_and_exit,
 	.plugin_interface_reference = lcr_ifact_reference,
 	.plugin_interface_release = lcr_ifact_release,
 	.error_memory_failure = NULL
@@ -107,6 +124,7 @@ void apidef_init (struct objdb_iface_ver0 *objdb) {
 	apidef_corosync_api_v1.object_track_start = objdb->object_track_start;
 	apidef_corosync_api_v1.object_track_stop = objdb->object_track_stop;
 	apidef_corosync_api_v1.object_write_config = objdb->object_write_config;
+	apidef_corosync_api_v1.object_reload_config = objdb->object_reload_config;
 }
 
 struct corosync_api_v1 *apidef_get (void)

+ 2 - 2
exec/apidef.h

@@ -35,8 +35,8 @@
 #ifndef APIDEF_H_DEFINED
 #define APIDEF_H_DEFINED
 
-#include "objdb.h"
-#include "../include/coroapi.h"
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/coroapi.h>
 
 void apidef_init (struct objdb_iface_ver0 *objdb);
 

+ 8 - 7
exec/coroparse.c

@@ -45,9 +45,10 @@
 #include <signal.h>
 #include <string.h>
 
-#include "../lcr/lcr_comp.h"
-#include "objdb.h"
-#include "config.h"
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+
 #include "mempool.h"
 #include "util.h"
 
@@ -189,7 +190,7 @@ struct config_iface_ver0 aisparser_iface_ver0 = {
 	.config_readconfig        = aisparser_readconfig
 };
 
-struct lcr_iface corosync_aisparser_ver0[1] = {
+struct lcr_iface openais_aisparser_ver0[1] = {
 	{
 		.name				= "corosync_parser",
 		.version			= 0,
@@ -203,16 +204,16 @@ struct lcr_iface corosync_aisparser_ver0[1] = {
 	}
 };
 
-struct corosync_service_handler *aisparser_get_handler_ver0 (void);
+struct openais_service_handler *aisparser_get_handler_ver0 (void);
 
 struct lcr_comp aisparser_comp_ver0 = {
 	.iface_count				= 1,
-	.ifaces					= corosync_aisparser_ver0
+	.ifaces					= openais_aisparser_ver0
 };
 
 
 __attribute__ ((constructor)) static void aisparser_comp_register (void) {
-        lcr_interfaces_set (&corosync_aisparser_ver0[0], &aisparser_iface_ver0);
+        lcr_interfaces_set (&openais_aisparser_ver0[0], &aisparser_iface_ver0);
 	lcr_component_register (&aisparser_comp_ver0);
 }
 

+ 3 - 3
exec/coropoll.c

@@ -39,9 +39,9 @@
 #include <string.h>
 #include <stdio.h>
 
-#include "coropoll.h"
-#include "../include/list.h"
-#include "../include/hdb.h"
+#include <corosync/totem/coropoll.h>
+#include <corosync/list.h>
+#include <corosync/hdb.h>
 #include "tlist.h"
 
 typedef int (*dispatch_fn_t) (poll_handle poll_handle, int fd, int revents, void *data);

+ 14 - 13
exec/flow.c

@@ -46,13 +46,14 @@
 #include <assert.h>
 #include <pthread.h>
 
-#include "swab.h"
+#include <corosync/swab.h>
+#include <corosync/list.h>
+#include <corosync/hdb.h>
+#include <corosync/totem/totem.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/logsys.h>
+
 #include "flow.h"
-#include "totem.h"
-#include "totempg.h"
-#include "logsys.h"
-#include "hdb.h"
-#include "../include/list.h"
 
 LOGSYS_DECLARE_SUBSYS ("FLOW", LOG_INFO);
 
@@ -243,7 +244,7 @@ static void flow_control_confchg_fn (
 /*
  * External API
  */
-unsigned int corosync_flow_control_initialize (void)
+unsigned int openais_flow_control_initialize (void)
 {
 	unsigned int res;
 
@@ -270,7 +271,7 @@ unsigned int corosync_flow_control_initialize (void)
 	return (0);
 }
 
-unsigned int corosync_flow_control_ipc_init (
+unsigned int openais_flow_control_ipc_init (
 	unsigned int *flow_control_handle,
 	unsigned int service)
 {
@@ -300,14 +301,14 @@ error_exit:
 
 }
 
-unsigned int corosync_flow_control_ipc_exit (
+unsigned int openais_flow_control_ipc_exit (
 	unsigned int flow_control_handle)
 {
 	hdb_handle_destroy (&flow_control_hdb, flow_control_handle);
 	return (0);
 }
 
-unsigned int corosync_flow_control_create (
+unsigned int openais_flow_control_create (
 	unsigned int flow_control_handle,
 	unsigned int service,
 	void *id,
@@ -362,7 +363,7 @@ error_exit:
 	return (res);
 }
 
-unsigned int corosync_flow_control_destroy (
+unsigned int openais_flow_control_destroy (
 	unsigned int flow_control_identifier,
 	unsigned int service,
 	unsigned char *id,
@@ -405,7 +406,7 @@ error_exit:
  * Disable the ability for new messages to be sent for this service
  * with the handle id of length id_len
  */
-unsigned int corosync_flow_control_disable (
+unsigned int openais_flow_control_disable (
 	unsigned int flow_control_handle)
 {
 	struct flow_control_instance *instance;
@@ -437,7 +438,7 @@ error_exit:
  * Enable the ability for new messagess to be sent for this service
  * with the handle id of length id_len
  */
-unsigned int corosync_flow_control_enable (
+unsigned int openais_flow_control_enable (
 	unsigned int flow_control_handle)
 {
 	struct flow_control_instance *instance;

+ 7 - 7
exec/flow.h

@@ -42,16 +42,16 @@ enum corosync_flow_control_state {
 	COROSYNC_FLOW_CONTROL_STATE_ENABLED
 };
 
-unsigned int corosync_flow_control_initialize (void);
+unsigned int openais_flow_control_initialize (void);
 
-unsigned int corosync_flow_control_ipc_init (
+unsigned int openais_flow_control_ipc_init (
 	unsigned int *flow_control_identifier,
 	unsigned int service);
 
-unsigned int corosync_flow_control_ipc_exit (
+unsigned int openais_flow_control_ipc_exit (
 	unsigned int flow_control_identifier);
 
-unsigned int corosync_flow_control_create (
+unsigned int openais_flow_control_create (
 	unsigned int flow_control_handle,
 	unsigned int service,
 	void *id,
@@ -59,16 +59,16 @@ unsigned int corosync_flow_control_create (
 	void (*flow_control_state_set_fn) (void *context, enum corosync_flow_control_state flow_control_state),
 	void *context);
 
-unsigned int corosync_flow_control_destroy (
+unsigned int openais_flow_control_destroy (
 	unsigned int flow_control_identifier,
 	unsigned int service,
 	unsigned char *id,
 	unsigned int id_len);
 
-unsigned int corosync_flow_control_disable (
+unsigned int openais_flow_control_disable (
 	unsigned int flow_control_identifier);
 
-unsigned int corosync_flow_control_enable (
+unsigned int openais_flow_control_enable (
 	unsigned int flow_control_identifier);
 
 #endif /* FLOW_H_DEFINED */

+ 34 - 34
exec/ipc.c

@@ -61,13 +61,18 @@
 #include <ucred.h>
 #endif
 
-#include "swab.h"
-#include "../include/saAis.h"
-#include "../include/list.h"
-#include "../include/queue.h"
-#include "../lcr/lcr_ifact.h"
+#include <corosync/swab.h>
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/queue.h>
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+#include <corosync/engine/logsys.h>
+
 #include "poll.h"
-#include "totempg.h"
 #include "totemsrp.h"
 #include "mempool.h"
 #include "mainconfig.h"
@@ -78,12 +83,7 @@
 #include "ipc.h"
 #include "flow.h"
 #include "sync.h"
-#include "swab.h"
-#include "objdb.h"
-#include "config.h"
-#include "tlist.h"
-#include "logsys.h"
-#include "coroapi.h"
+#include <corosync/engine/coroapi.h>
 #include "service.h"
 
 #include "util.h"
@@ -203,7 +203,7 @@ static int response_init_send_response (
 	res_lib_response_init.header.error = error;
 	res_lib_response_init.conn_info = (mar_uint64_t)cinfo;
 
-	corosync_conn_send_response (
+	openais_conn_send_response (
 		conn_info,
 		&res_lib_response_init,
 		sizeof (res_lib_response_init));
@@ -272,7 +272,7 @@ static int dispatch_init_send_response (
 	res_lib_dispatch_init.header.id = MESSAGE_RES_INIT;
 	res_lib_dispatch_init.header.error = error;
 
-	corosync_conn_send_response (
+	openais_conn_send_response (
 		conn_info,
 		&res_lib_dispatch_init,
 		sizeof (res_lib_dispatch_init));
@@ -293,7 +293,7 @@ static int dispatch_init_send_response (
 	conn_info->flow_control = ais_service[conn_info->service]->flow_control;
 	conn_info->conn_info_partner->flow_control = ais_service[conn_info->service]->flow_control;
 	if (ais_service[conn_info->service]->flow_control == COROSYNC_LIB_FLOW_CONTROL_REQUIRED) {
-		corosync_flow_control_ipc_init (
+		openais_flow_control_ipc_init (
 			&conn_info->flow_control_handle,
 			conn_info->service);
 
@@ -444,7 +444,7 @@ static int libais_disconnect (struct conn_info *conn_info)
 	conn_info->state = CONN_STATE_DISCONNECTED;
 	conn_info->conn_info_partner->state = CONN_STATE_DISCONNECTED;
 	if (conn_info->flow_control_enabled == 1) {
-		corosync_flow_control_disable (conn_info->flow_control_handle);
+		openais_flow_control_disable (conn_info->flow_control_handle);
 	}
 	return (0);
 }
@@ -636,7 +636,7 @@ static void ipc_flow_control (struct conn_info *conn_info)
 			log_printf (LOG_LEVEL_NOTICE, "Enabling flow control [%d/%d] - [%d].\n",
 				entries_usedhw, SIZEQUEUE,
 				flow_control_local_count);
-			corosync_flow_control_enable (conn_info->flow_control_handle);
+			openais_flow_control_enable (conn_info->flow_control_handle);
 			conn_info->flow_control_enabled = 1;
 			conn_info->conn_info_partner->flow_control_enabled = 1;
 		}
@@ -647,7 +647,7 @@ static void ipc_flow_control (struct conn_info *conn_info)
 			log_printf (LOG_LEVEL_NOTICE, "Disabling flow control [%d/%d] - [%d].\n",
 				entries_usedhw, SIZEQUEUE,
 				flow_control_local_count);
-			corosync_flow_control_disable (conn_info->flow_control_handle);
+			openais_flow_control_disable (conn_info->flow_control_handle);
 			conn_info->flow_control_enabled = 0;
 			conn_info->conn_info_partner->flow_control_enabled = 0;
 		}
@@ -883,13 +883,13 @@ retry_recv:
 
 			/*
 			 * If flow control is required of the library handle, determine that
-			 * corosync is not in synchronization and that totempg has room available
+			 * openais is not in synchronization and that totempg has room available
 			 * to queue a message, otherwise tell the library we are busy and to
 			 * try again later
 			 */
 			send_ok_joined_iovec.iov_base = (char *)header;
 			send_ok_joined_iovec.iov_len = header->size;
-			send_ok_joined = totempg_groups_send_ok_joined (corosync_group_handle,
+			send_ok_joined = totempg_groups_send_ok_joined (openais_group_handle,
 				&send_ok_joined_iovec, 1);
 
 			send_ok =
@@ -911,7 +911,7 @@ retry_recv:
 				res_overlay.header.id =
 					ais_service[service]->lib_engine[header->id].response_id;
 				res_overlay.header.error = SA_AIS_ERR_TRY_AGAIN;
-				corosync_conn_send_response (
+				openais_conn_send_response (
 					conn_info,
 					&res_overlay,
 					res_overlay.header.size);
@@ -1026,7 +1026,7 @@ static void ipc_confchg_fn (
 {
 }
 
-void corosync_ipc_init (
+void openais_ipc_init (
 	void (*serialize_lock_fn) (void),
 	void (*serialize_unlock_fn) (void),
 	unsigned int gid_valid)
@@ -1045,14 +1045,14 @@ void corosync_ipc_init (
 	libais_server_fd = socket (PF_UNIX, SOCK_STREAM, 0);
 	if (libais_server_fd == -1) {
 		log_printf (LOG_LEVEL_ERROR ,"Cannot create libais client connections socket.\n");
-		corosync_exit_error (AIS_DONE_LIBAIS_SOCKET);
+		openais_exit_error (AIS_DONE_LIBAIS_SOCKET);
 	};
 
 	totemip_nosigpipe(libais_server_fd);
 	res = fcntl (libais_server_fd, F_SETFL, O_NONBLOCK);
 	if (res == -1) {
 		log_printf (LOG_LEVEL_ERROR, "Could not set non-blocking operation on server socket: %s\n", strerror (errno));
-		corosync_exit_error (AIS_DONE_LIBAIS_SOCKET);
+		openais_exit_error (AIS_DONE_LIBAIS_SOCKET);
 	}
 
 #if !defined(OPENAIS_LINUX)
@@ -1072,7 +1072,7 @@ void corosync_ipc_init (
 	res = bind (libais_server_fd, (struct sockaddr *)&un_addr, AIS_SUN_LEN(&un_addr));
 	if (res) {
 		log_printf (LOG_LEVEL_ERROR, "ERROR: Could not bind AF_UNIX: %s.\n", strerror (errno));
-		corosync_exit_error (AIS_DONE_LIBAIS_BIND);
+		openais_exit_error (AIS_DONE_LIBAIS_BIND);
 	}
 	listen (libais_server_fd, SERVER_BACKLOG);
 
@@ -1098,7 +1098,7 @@ void corosync_ipc_init (
 /*
  * Get the conn info private data
  */
-void *corosync_conn_private_data_get (void *conn)
+void *openais_conn_private_data_get (void *conn)
 {
 	struct conn_info *conn_info = (struct conn_info *)conn;
 
@@ -1112,7 +1112,7 @@ void *corosync_conn_private_data_get (void *conn)
 /*
  * Get the conn info partner connection
  */
-void *corosync_conn_partner_get (void *conn)
+void *openais_conn_partner_get (void *conn)
 {
 	struct conn_info *conn_info = (struct conn_info *)conn;
 
@@ -1123,7 +1123,7 @@ void *corosync_conn_partner_get (void *conn)
 	}
 }
 
-int corosync_conn_send_response (
+int openais_conn_send_response (
 	void *conn,
 	void *msg,
 	int mlen)
@@ -1265,7 +1265,7 @@ retry_sendmsg_two:
 	return (0);
 }
 
-void corosync_ipc_flow_control_create (
+void openais_ipc_flow_control_create (
 	void *conn,
 	unsigned int service,
 	char *id,
@@ -1275,7 +1275,7 @@ void corosync_ipc_flow_control_create (
 {
 	struct conn_info *conn_info = (struct conn_info *)conn;
 
-	corosync_flow_control_create (
+	openais_flow_control_create (
 		conn_info->flow_control_handle,
 		service,
 		id,
@@ -1285,7 +1285,7 @@ void corosync_ipc_flow_control_create (
 	conn_info->conn_info_partner->flow_control_handle = conn_info->flow_control_handle;
 }
 
-void corosync_ipc_flow_control_destroy (
+void openais_ipc_flow_control_destroy (
 	void *conn,
 	unsigned int service,
 	unsigned char *id,
@@ -1293,14 +1293,14 @@ void corosync_ipc_flow_control_destroy (
 {
 	struct conn_info *conn_info = (struct conn_info *)conn;
 
-	corosync_flow_control_destroy (
+	openais_flow_control_destroy (
 		conn_info->flow_control_handle,
 		service,
 		id,
 		id_len);
 }
 
-void corosync_ipc_flow_control_local_increment (
+void openais_ipc_flow_control_local_increment (
         void *conn)
 {
 	struct conn_info *conn_info = (struct conn_info *)conn;
@@ -1312,7 +1312,7 @@ void corosync_ipc_flow_control_local_increment (
 	pthread_mutex_unlock (&conn_info->flow_control_mutex);
 }
 
-void corosync_ipc_flow_control_local_decrement (
+void openais_ipc_flow_control_local_decrement (
         void *conn)
 {
 	struct conn_info *conn_info = (struct conn_info *)conn;

+ 11 - 11
exec/ipc.h

@@ -46,33 +46,33 @@ extern void message_source_set (mar_message_source_t *source, void *conn);
 
 extern int message_source_is_local (mar_message_source_t *source);
 
-extern void *corosync_conn_partner_get (void *conn);
+extern void *openais_conn_partner_get (void *conn);
 
-extern void *corosync_conn_private_data_get (void *conn);
+extern void *openais_conn_private_data_get (void *conn);
 
-extern int corosync_conn_send_response (void *conn, void *msg, int mlen);
+extern int openais_conn_send_response (void *conn, void *msg, int mlen);
 
-extern void corosync_ipc_init (
+extern void openais_ipc_init (
         void (*serialize_lock_fn) (void),
         void (*serialize_unlock_fn) (void),
 	unsigned int gid_valid);
 
-extern int corosync_ipc_timer_add (
+extern int openais_ipc_timer_add (
 	void *conn,
 	void (*timer_fn) (void *data),
 	void *data,
 	unsigned int msec_in_future,
 	timer_handle *handle);
 
-extern void corosync_ipc_timer_del (
+extern void openais_ipc_timer_del (
 	void *conn,
 	timer_handle timer_handle);
 
-extern void corosync_ipc_timer_del_data (
+extern void openais_ipc_timer_del_data (
 	void *conn,
 	timer_handle timer_handle);
 
-extern void corosync_ipc_flow_control_create (
+extern void openais_ipc_flow_control_create (
 	void *conn,
 	unsigned int service,
 	char *id,
@@ -80,16 +80,16 @@ extern void corosync_ipc_flow_control_create (
 	void (*flow_control_state_set_fn) (void *context, enum corosync_flow_control_state flow_control_state_set),
 	void *context);
 	
-extern void corosync_ipc_flow_control_destroy (
+extern void openais_ipc_flow_control_destroy (
 	void *conn,
 	unsigned int service,
 	unsigned char *id,
 	int id_len);
 
-extern void corosync_ipc_flow_control_local_increment (
+extern void openais_ipc_flow_control_local_increment (
 	void *conn);
 
-extern void corosync_ipc_flow_control_local_decrement (
+extern void openais_ipc_flow_control_local_decrement (
 	void *conn);
 
 #endif /* IPC_H_DEFINED */

+ 5 - 5
exec/logsys.c

@@ -53,7 +53,7 @@
 #include <stdlib.h>
 #include <pthread.h>
 
-#include "logsys.h"
+#include <corosync/engine/logsys.h>
 #include "wthread.h"
 
 /*
@@ -136,7 +136,7 @@ int logsys_facility_id_get (const char *name)
 	return (-1);
 }
 
-char *logsys_facility_name_get (unsigned int facility)
+const char *logsys_facility_name_get (unsigned int facility)
 {
 	unsigned int i;
 
@@ -160,7 +160,7 @@ int logsys_priority_id_get (const char *name)
 	return (-1);
 }
 
-char *logsys_priority_name_get (unsigned int priority)
+const char *logsys_priority_name_get (unsigned int priority)
 {
 	unsigned int i;
 
@@ -326,7 +326,7 @@ static void _log_printf (
 		(logsys_mode & LOG_MODE_DISPLAY_TIMESTAMP)) {
 		gettimeofday (&tv, NULL);
 		strftime (char_time, sizeof (char_time), "%b %e %k:%M:%S",
-				  localtime (&tv.tv_sec));
+				  localtime ((time_t *)&tv.tv_sec));
 		i = sprintf (newstring, "%s.%06ld ", char_time, (long)tv.tv_usec);
 	}
 
@@ -352,7 +352,7 @@ static void _log_printf (
 			newstring[strlen (newstring) - 1] = '\0';
 		}
 		len = sprintf (log_string,
-			"%s - prior to this log entry, corosync logger dropped '%d' messages because of overflow.", newstring, dropped_log_entries + 1);
+			"%s - prior to this log entry, openais logger dropped '%d' messages because of overflow.", newstring, dropped_log_entries + 1);
 	} else {
 		len = vsprintf (log_string, newstring, ap);
 	}

+ 42 - 43
exec/main.c

@@ -55,30 +55,29 @@
 #include <sched.h>
 #include <time.h>
 
-#include "swab.h"
-#include "../include/saAis.h"
-#include "../include/list.h"
-#include "../include/queue.h"
-#include "../lcr/lcr_ifact.h"
-#include "coropoll.h"
-#include "totempg.h"
+#include <corosync/swab.h>
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/queue.h>
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+#include <corosync/engine/logsys.h>
+
 #include "totemsrp.h"
 #include "mempool.h"
 #include "mainconfig.h"
 #include "totemconfig.h"
 #include "main.h"
 #include "sync.h"
-#include "swab.h"
-#include "objdb.h"
-#include "config.h"
 #include "tlist.h"
 #include "flow.h"
 #include "ipc.h"
 #include "timer.h"
-#include "logsys.h"
 #include "util.h"
 #include "flow.h"
-#include "coroapi.h"
 #include "apidef.h"
 #include "service.h"
 #include "version.h"
@@ -128,7 +127,7 @@ static void sigusr2_handler (int num)
 static void *aisexec_exit (void *arg)
 {
 	if (api) {
-		corosync_service_unlink_all (api);
+		openais_service_unlink_all (api);
 	}
 
 #ifdef DEBUG_MEMPOOL
@@ -148,7 +147,7 @@ static void *aisexec_exit (void *arg)
 	totempg_finalize ();
 	logsys_flush ();
 
-	corosync_exit_error (AIS_DONE_EXIT);
+	openais_exit_error (AIS_DONE_EXIT);
 
 	/* never reached */
 	return NULL;
@@ -185,9 +184,9 @@ static void sigabrt_handler (int num)
 
 #define LOCALHOST_IP inet_addr("127.0.0.1")
 
-totempg_groups_handle corosync_group_handle;
+totempg_groups_handle openais_group_handle;
 
-struct totempg_group corosync_group = {
+struct totempg_group openais_group = {
 	.group		= "a",
 	.group_len	= 1
 };
@@ -213,11 +212,11 @@ void serialize_mutex_unlock (void)
 }
 
 
-static void corosync_sync_completed (void)
+static void openais_sync_completed (void)
 {
 }
 
-static int corosync_sync_callbacks_retrieve (int sync_id,
+static int openais_sync_callbacks_retrieve (int sync_id,
 	struct sync_callbacks *callbacks)
 {
 	unsigned int ais_service_index;
@@ -279,7 +278,7 @@ static void aisexec_uid_determine (struct main_config *main_config)
 	passwd = getpwnam(main_config->user);
 	if (passwd == 0) {
 		log_printf (LOG_LEVEL_ERROR, "ERROR: The '%s' user is not found in /etc/passwd, please read the documentation.\n", main_config->user);
-		corosync_exit_error (AIS_DONE_UID_DETERMINE);
+		openais_exit_error (AIS_DONE_UID_DETERMINE);
 	}
 	ais_uid = passwd->pw_uid;
 	endpwent ();
@@ -291,7 +290,7 @@ static void aisexec_gid_determine (struct main_config *main_config)
 	group = getgrnam (main_config->group);
 	if (group == 0) {
 		log_printf (LOG_LEVEL_ERROR, "ERROR: The '%s' group is not found in /etc/group, please read the documentation.\n", group->gr_name);
-		corosync_exit_error (AIS_DONE_GID_DETERMINE);
+		openais_exit_error (AIS_DONE_GID_DETERMINE);
 	}
 	gid_valid = group->gr_gid;
 	endgrent ();
@@ -311,7 +310,7 @@ static void aisexec_mempool_init (void)
 	res = mempool_init (pool_sizes);
 	if (res == ENOMEM) {
 		log_printf (LOG_LEVEL_ERROR, "Couldn't allocate memory pools, not enough memory");
-		corosync_exit_error (AIS_DONE_MEMPOOL_INIT);
+		openais_exit_error (AIS_DONE_MEMPOOL_INIT);
 	}
 }
 
@@ -325,7 +324,7 @@ static void aisexec_tty_detach (void)
 
 	switch (fork ()) {
 		case -1:
-			corosync_exit_error (AIS_DONE_FORK);
+			openais_exit_error (AIS_DONE_FORK);
 			break;
 		case 0:
 			/*
@@ -470,14 +469,14 @@ int main_mcast (
         int iov_len,
         unsigned int guarantee)
 {
-	return (totempg_groups_mcast_joined (corosync_group_handle, iovec, iov_len, guarantee));
+	return (totempg_groups_mcast_joined (openais_group_handle, iovec, iov_len, guarantee));
 }
 
 extern int main_send_ok (
         struct iovec *iovec,
         int iov_len)
 {
-	return (totempg_groups_send_ok_joined (corosync_group_handle, iovec, iov_len));
+	return (totempg_groups_send_ok_joined (openais_group_handle, iovec, iov_len));
 }
 
 int main (int argc, char **argv)
@@ -534,7 +533,7 @@ int main (int argc, char **argv)
 	signal (SIGABRT, sigabrt_handler);
 	signal (SIGQUIT, sigquit_handler);
 	
-	corosync_timer_init (
+	openais_timer_init (
 		serialize_mutex_lock,
 		serialize_mutex_unlock);
 
@@ -555,7 +554,7 @@ int main (int argc, char **argv)
 		0);
 	if (res == -1) {
 		log_printf (LOG_LEVEL_ERROR, "Corosync Executive couldn't open configuration object database component.\n");
-		corosync_exit_error (AIS_DONE_OBJDB);
+		openais_exit_error (AIS_DONE_OBJDB);
 	}
 
 	objdb = (struct objdb_iface_ver0 *)objdb_p;
@@ -572,7 +571,7 @@ int main (int argc, char **argv)
 
 	/*
 	 * Bootstrap in the default configuration parser or use
-	 * the corosync default built in parser if the configuration parser
+	 * the openais default built in parser if the configuration parser
 	 * isn't overridden
 	 */
 	config_iface = getenv("COROSYNC_DEFAULT_CONFIG_IFACE");
@@ -596,13 +595,13 @@ int main (int argc, char **argv)
 		config = (struct config_iface_ver0 *)config_p;
 		if (res == -1) {
 			log_printf (LOG_LEVEL_ERROR, "Corosync Executive couldn't open configuration component '%s'\n", iface);
-			corosync_exit_error (AIS_DONE_MAINCONFIGREAD);
+			openais_exit_error (AIS_DONE_MAINCONFIGREAD);
 		}
 
 		res = config->config_readconfig(objdb, &error_string);
 		if (res == -1) {
 			log_printf (LOG_LEVEL_ERROR, error_string);
-			corosync_exit_error (AIS_DONE_MAINCONFIGREAD);
+			openais_exit_error (AIS_DONE_MAINCONFIGREAD);
 		}
 		log_printf (LOG_LEVEL_NOTICE, error_string);
 		config_modules[num_config_modules++] = config;
@@ -612,31 +611,31 @@ int main (int argc, char **argv)
 	if (config_iface)
 		free(config_iface);
 
-	res = corosync_main_config_read (objdb, &error_string, &main_config);
+	res = openais_main_config_read (objdb, &error_string, &main_config);
 	if (res == -1) {
 		log_printf (LOG_LEVEL_ERROR, error_string);
-		corosync_exit_error (AIS_DONE_MAINCONFIGREAD);
+		openais_exit_error (AIS_DONE_MAINCONFIGREAD);
 	}
 
 	res = totem_config_read (objdb, &totem_config, &error_string);
 	if (res == -1) {
 		log_printf (LOG_LEVEL_ERROR, error_string);
-		corosync_exit_error (AIS_DONE_MAINCONFIGREAD);
+		openais_exit_error (AIS_DONE_MAINCONFIGREAD);
 	}
 
 	res = totem_config_keyread (objdb, &totem_config, &error_string);
 	if (res == -1) {
 		log_printf (LOG_LEVEL_ERROR, error_string);
-		corosync_exit_error (AIS_DONE_MAINCONFIGREAD);
+		openais_exit_error (AIS_DONE_MAINCONFIGREAD);
 	}
 
 	res = totem_config_validate (&totem_config, &error_string);
 	if (res == -1) {
 		log_printf (LOG_LEVEL_ERROR, error_string);
-		corosync_exit_error (AIS_DONE_MAINCONFIGREAD);
+		openais_exit_error (AIS_DONE_MAINCONFIGREAD);
 	}
 
-	logsys_config_facility_set ("corosync", main_config.syslog_facility);
+	logsys_config_facility_set ("openais", main_config.syslog_facility);
 	logsys_config_mode_set (main_config.logmode);
 	logsys_config_file_set (&error_string, main_config.logfile);
 
@@ -686,30 +685,30 @@ int main (int argc, char **argv)
 		&totem_config);
 
 	totempg_groups_initialize (
-		&corosync_group_handle,
+		&openais_group_handle,
 		deliver_fn,
 		confchg_fn);
 
 	totempg_groups_join (
-		corosync_group_handle,
-		&corosync_group,
+		openais_group_handle,
+		&openais_group,
 		1);
 
 	/*
 	 * This must occur after totempg is initialized because "this_ip" must be set
 	 */
-	res = corosync_service_defaults_link_and_init (api);
+	res = openais_service_defaults_link_and_init (api);
 	if (res == -1) {
 		log_printf (LOG_LEVEL_ERROR, "Could not initialize default services\n");
-		corosync_exit_error (AIS_DONE_INIT_SERVICES);
+		openais_exit_error (AIS_DONE_INIT_SERVICES);
 	}
 
 
-	sync_register (corosync_sync_callbacks_retrieve, corosync_sync_completed,
+	sync_register (openais_sync_callbacks_retrieve, openais_sync_completed,
 		totem_config.vsf_type);
 
 
-	res = corosync_flow_control_initialize ();
+	res = openais_flow_control_initialize ();
 
 	/*
 	 * Drop root privleges to user 'ais'
@@ -723,7 +722,7 @@ int main (int argc, char **argv)
 
 	aisexec_mempool_init ();
 
-	corosync_ipc_init (
+	openais_ipc_init (
 		serialize_mutex_lock,
 		serialize_mutex_unlock,
 		gid_valid);

+ 10 - 11
exec/main.h

@@ -32,18 +32,17 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
+#ifndef AIS_EXEC_H_DEFINED
+#define AIS_EXEC_H_DEFINED
 
 #define TRUE 1
 #define FALSE 0
-#include "../include/saAis.h"
-#include "../include/ipc_gen.h"
-#include "coropoll.h"
-#include "objdb.h"
-#include "config.h"
-#include "totempg.h"
-
-#ifndef AIS_EXEC_H_DEFINED
-#define AIS_EXEC_H_DEFINED
+#include <corosync/saAis.h>
+#include <corosync/ipc_gen.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
 
 /*
  * Size of the queue (entries) for I/O's to the API over socket IPC.
@@ -55,9 +54,9 @@
 
 #define SIZEINB MESSAGE_SIZE_MAX
 
-extern struct totempg_group corosync_group;
+extern struct totempg_group openais_group;
 
-extern totempg_groups_handle corosync_group_handle;
+extern totempg_groups_handle openais_group_handle;
 
 poll_handle aisexec_poll_handle;
 

+ 6 - 5
exec/mainconfig.c

@@ -41,13 +41,14 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include "../include/saAis.h"
-#include "../include/list.h"
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/totem/totem.h>
+#include <corosync/engine/logsys.h>
+
 #include "util.h"
 #include "mainconfig.h"
 #include "mempool.h"
-#include "logsys.h"
-#include "totem.h"
 
 static char error_string_response[512];
 
@@ -97,7 +98,7 @@ static struct logsys_config_struct {
 	unsigned int tags;
 } logsys_logger;
 
-int corosync_main_config_read (
+int openais_main_config_read (
 	struct objdb_iface_ver0 *objdb,
 	char **error_string,
 	struct main_config *main_config)

+ 4 - 4
exec/mainconfig.h

@@ -32,12 +32,12 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include "objdb.h"
-#include "logsys.h"
-
 #ifndef MAINCONFIG_H_DEFINED
 #define MAINCONFIG_H_DEFINED
 
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/logsys.h>
+
 /*
  * All service handlers in the AIS
  */
@@ -65,7 +65,7 @@ struct main_config {
 	char *group;
 };
 
-extern int corosync_main_config_read (
+extern int openais_main_config_read (
 	struct objdb_iface_ver0 *objdb,
 	char **error_string,
 	struct main_config *main_config);

+ 1 - 1
exec/mempool.c

@@ -36,7 +36,7 @@
 #include <string.h>
 #include <errno.h>
 
-#include "../include/list.h"
+#include <corosync/list.h>
 #include "mempool.h"
 
 int mempool_bytes = 0;

+ 1 - 1
exec/mempool.h

@@ -32,7 +32,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "../include/list.h"
+#include <corosync/list.h>
 
 #ifndef MEMPOOL_H_DEFINED
 #define MEMPOOL_H_DEFINED

+ 29 - 7
exec/objdb.c

@@ -35,12 +35,14 @@
 
 #include <stdio.h>
 #include <errno.h>
-#include "objdb.h"
-#include "config.h"
+
+#include <corosync/list.h>
+#include <corosync/hdb.h>
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+
 #include "main.h"
-#include "../lcr/lcr_comp.h"
-#include "../include/hdb.h"
-#include "../include/list.h"
 
 struct object_key {
 	void *key_name;
@@ -360,7 +362,7 @@ static int object_create (
 
 	object_instance->object_name_len = object_name_len;
 
-	list_add (&object_instance->child_list, &parent_instance->child_head);
+	list_add_tail (&object_instance->child_list, &parent_instance->child_head);
 
 	object_instance->object_handle = *object_handle;
 	object_instance->find_child_list = &object_instance->child_head;
@@ -488,7 +490,7 @@ static int object_key_create (
 	object_key->value_len = value_len;
 
 	list_init (&object_key->list);
-	list_add (&object_key->list, &instance->key_head);
+	list_add_tail (&object_key->list, &instance->key_head);
 	object_key_changed_notification(object_handle, key_name, key_len,
 								value, value_len, OBJECT_KEY_CREATED);
 
@@ -1415,6 +1417,25 @@ static int object_write_config(char **error_string)
 	return 0;
 }
 
+static int object_reload_config(int flush, char **error_string)
+{
+	struct config_iface_ver0 **modules;
+	int num_modules;
+	int i;
+	int res;
+
+	main_get_config_modules(&modules, &num_modules);
+
+	for (i=0; i<num_modules; i++) {
+		if (modules[i]->config_reloadconfig) {
+			res = modules[i]->config_reloadconfig(&objdb_iface, flush, error_string);
+			if (res)
+				return res;
+		}
+	}
+	return 0;
+}
+
 struct objdb_iface_ver0 objdb_iface = {
 	.objdb_init		= objdb_init,
 	.object_create		= object_create,
@@ -1442,6 +1463,7 @@ struct objdb_iface_ver0 objdb_iface = {
 	.object_track_stop	= object_track_stop,
 	.object_dump	        = object_dump,
 	.object_write_config    = object_write_config,
+	.object_reload_config   = object_reload_config,
 };
 
 struct lcr_iface objdb_iface_ver0[1] = {

+ 33 - 34
exec/service.c

@@ -37,19 +37,20 @@
 #include <string.h>
 #include <assert.h>
 
-#include "../lcr/lcr_ifact.h"
-#include "swab.h"
-#include "totem.h"
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/swab.h>
+#include <corosync/totem/totem.h>
+
 #include "mainconfig.h"
 #include "util.h"
-#include "logsys.h"
+#include <corosync/engine/logsys.h>
 
 #include "timer.h"
-#include "totempg.h"
-#include "totemip.h"
+#include <corosync/totem/totempg.h>
+#include <corosync/totem/totemip.h>
 #include "main.h"
 #include "ipc.h"
-#include "../include/coroapi.h"
+#include <corosync/engine/coroapi.h>
 #include "service.h"
 
 
@@ -120,7 +121,7 @@ static unsigned int default_services_requested (struct corosync_api_v1 *corosync
 	return (-1);
 }
 
-unsigned int corosync_service_link_and_init (
+unsigned int openais_service_link_and_init (
 	struct corosync_api_v1 *corosync_api,
 	char *service_name,
 	unsigned int service_ver)
@@ -201,7 +202,7 @@ unsigned int corosync_service_link_and_init (
 	return (res);
 }
 
-static int corosync_service_unlink_common (
+static int openais_service_unlink_common (
 	struct corosync_api_v1 *corosync_api,
 	unsigned int object_service_handle,
 	const char *service_name,
@@ -223,7 +224,7 @@ static int corosync_service_unlink_common (
 		(void *)&service_id,
 		NULL);
 	
-	log_printf(LOG_LEVEL_NOTICE, "Unloading corosync component: %s v%u\n",
+	log_printf(LOG_LEVEL_NOTICE, "Unloading openais component: %s v%u\n",
 		service_name, service_version);
 
 	if (ais_service[*service_id]->exec_exit_fn) {
@@ -234,7 +235,7 @@ static int corosync_service_unlink_common (
 	return lcr_ifact_release (*found_service_handle);	
 }
 
-extern unsigned int corosync_service_unlink_and_exit (
+extern unsigned int openais_service_unlink_and_exit (
 	struct corosync_api_v1 *corosync_api,
 	char *service_name,
 	unsigned int service_ver)
@@ -266,14 +267,14 @@ extern unsigned int corosync_service_unlink_and_exit (
 			strlen ("ver"),
 			(void *)&found_service_ver,
 			NULL);
-				
+
 		/*
 		 * If service found and linked exit it
 		 */
 		if ((strcmp (service_name, found_service_name) == 0) &&
 			(service_ver == *found_service_ver)) {
 
-			res = corosync_service_unlink_common (
+			res = openais_service_unlink_common (
 				corosync_api, object_service_handle,
 				service_name, service_ver);
 
@@ -287,41 +288,39 @@ extern unsigned int corosync_service_unlink_and_exit (
 	return (-1);
 }
 
-extern unsigned int corosync_service_unlink_all (
+extern unsigned int openais_service_unlink_all (
 	struct corosync_api_v1 *corosync_api)
 {
 	char *service_name;
 	unsigned int *service_ver;
 	unsigned int object_service_handle;
 	unsigned int object_find_handle;
-	unsigned int res;
+	int found; 
+
+	log_printf(LOG_LEVEL_NOTICE, "Unloading all openais components\n");
 
-	log_printf(LOG_LEVEL_NOTICE, "Unloading all corosync components\n");
-	
-	res = 0;
 	/*
 	 * TODO
 	 * Deleting of keys not supported during iteration at this time
 	 * hence this ugly hack
 	 */
-	for (;;) {
-		corosync_api->object_find_create (
+	while(corosync_api->object_find_create (
 			object_internal_configuration_handle,
 			"service",
 			strlen ("service"),
-			&object_find_handle);
+			&object_find_handle) == 0)
+	{
+
+		found = 0;
 
-		res = corosync_api->object_find_next (
+		while(corosync_api->object_find_next (
 			object_find_handle,
-			&object_service_handle);
+			&object_service_handle) == 0)
+			found = 1;
 
-		/*
-		 * Exit from unloading
-		 */
-		if (res == -1) {
+		if(!found)
 			break;
-		}
-			
+
 		corosync_api->object_key_get (
 			object_service_handle,
 			"name",
@@ -335,8 +334,8 @@ extern unsigned int corosync_service_unlink_all (
 			strlen ("ver"),
 			(void *)&service_ver,
 			NULL);
-					
-		corosync_service_unlink_common (
+
+		openais_service_unlink_common (
 			corosync_api, object_service_handle,
 			service_name, *service_ver);
 
@@ -352,7 +351,7 @@ extern unsigned int corosync_service_unlink_all (
 /*
  * Links default services into the executive
  */
-unsigned int corosync_service_defaults_link_and_init (struct corosync_api_v1 *corosync_api)
+unsigned int openais_service_defaults_link_and_init (struct corosync_api_v1 *corosync_api)
 {
 	unsigned int i;
 
@@ -391,7 +390,7 @@ unsigned int corosync_service_defaults_link_and_init (struct corosync_api_v1 *co
 
 		found_service_ver_atoi = atoi (found_service_ver);
 
-		corosync_service_link_and_init (
+		openais_service_link_and_init (
 			corosync_api,
 			found_service_name,
 			found_service_ver_atoi);
@@ -406,7 +405,7 @@ unsigned int corosync_service_defaults_link_and_init (struct corosync_api_v1 *co
 	for (i = 0;
 		i < sizeof (default_services) / sizeof (struct default_service); i++) {
 
-		corosync_service_link_and_init (
+		openais_service_link_and_init (
 			corosync_api,
 			default_services[i].name,
 			default_services[i].ver);

+ 5 - 5
exec/service.h

@@ -38,7 +38,7 @@
 /*
  * Link and initialize a service
  */
-extern unsigned int corosync_service_link_and_init (
+extern unsigned int openais_service_link_and_init (
 	struct corosync_api_v1 *objdb,
 	char *service_name,
 	unsigned int service_ver);
@@ -46,21 +46,21 @@ extern unsigned int corosync_service_link_and_init (
 /*
  * Unlink and exit a service
  */
-extern unsigned int corosync_service_unlink_and_exit (
+extern unsigned int openais_service_unlink_and_exit (
     struct corosync_api_v1 *objdb,
     char *service_name,
     unsigned int service_ver);
 
 /*
- * Unlink and exit all corosync services
+ * Unlink and exit all openais services
  */
-extern unsigned int corosync_service_unlink_all (
+extern unsigned int openais_service_unlink_all (
     struct corosync_api_v1 *objdb);
 
 /*
  * Load all of the default services
  */
-extern unsigned int corosync_service_defaults_link_and_init (
+extern unsigned int openais_service_defaults_link_and_init (
 	struct corosync_api_v1 *objdb);
 
 extern struct corosync_service_engine *ais_service[];

+ 13 - 12
exec/sync.c

@@ -49,15 +49,16 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include "../include/saAis.h"
+#include <corosync/saAis.h>
+#include <corosync/swab.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/totem/totem.h>
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/engine/logsys.h>
+
 #include "main.h"
 #include "sync.h"
-#include "totempg.h"
-#include "totem.h"
 #include "vsf.h"
-#include "swab.h"
-#include "../lcr/lcr_ifact.h"
-#include "logsys.h"
 
 LOGSYS_DECLARE_SUBSYS ("SYNC", LOG_INFO);
 
@@ -90,7 +91,7 @@ static int barrier_data_confchg_entries;
 
 static struct barrier_data barrier_data_process[PROCESSOR_COUNT_MAX];
 
-static struct corosync_vsf_iface_ver0 *vsf_iface;
+static struct openais_vsf_iface_ver0 *vsf_iface;
 
 static int sync_barrier_send (struct memb_ring_id *ring_id);
 
@@ -254,7 +255,7 @@ int sync_register (
 	unsigned int res;
 	unsigned int vsf_handle;
 	void *vsf_iface_p;
-	char corosync_vsf_type[1024];
+	char openais_vsf_type[1024];
 
 	res = totempg_groups_initialize (
 		&sync_group_handle,
@@ -282,10 +283,10 @@ int sync_register (
 	} else {
 		vsf_none = 0;
 
-		sprintf (corosync_vsf_type, "corosync_vsf_%s", vsf_type);
+		sprintf (openais_vsf_type, "openais_vsf_%s", vsf_type);
 		res = lcr_ifact_reference (
 			&vsf_handle,
-			corosync_vsf_type,
+			openais_vsf_type,
 			0,
 			&vsf_iface_p,
 			0);
@@ -298,9 +299,9 @@ int sync_register (
 		}
 
 		log_printf (LOG_LEVEL_NOTICE,
-			"Using virtual synchrony filter %s\n", corosync_vsf_type);
+			"Using virtual synchrony filter %s\n", openais_vsf_type);
 
-		vsf_iface = (struct corosync_vsf_iface_ver0 *)vsf_iface_p;
+		vsf_iface = (struct openais_vsf_iface_ver0 *)vsf_iface_p;
 		vsf_iface->init (sync_primary_callback_fn);
 	}
 

+ 1 - 1
exec/sync.h

@@ -36,7 +36,7 @@
 #define SYNC_H_DEFINED
 
 #include <netinet/in.h>
-#include "totempg.h"
+#include <corosync/totem/totempg.h>
 #include "totemsrp.h"
 
 struct sync_callbacks {

+ 18 - 18
exec/timer.c

@@ -55,26 +55,26 @@
 #include <sched.h>
 #include <time.h>
 
-#include "swab.h"
-#include "../include/saAis.h"
-#include "../include/list.h"
-#include "../include/queue.h"
-#include "../lcr/lcr_ifact.h"
+#include <corosync/swab.h>
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/queue.h>
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+#define LOG_SERVICE LOG_SERVICE_IPC
+#include <corosync/engine/logsys.h>
+
 #include "poll.h"
-#include "totempg.h"
 #include "totemsrp.h"
 #include "mempool.h"
 #include "mainconfig.h"
 #include "totemconfig.h"
 #include "main.h"
 #include "sync.h"
-#include "swab.h"
-#include "objdb.h"
-#include "config.h"
 #include "tlist.h"
-#define LOG_SERVICE LOG_SERVICE_IPC
-#include "logsys.h"
-
 #include "util.h"
 
 #define SERVER_BACKLOG 5
@@ -143,7 +143,7 @@ static void sigusr1_handler (int num) {
 #endif
 }
 
-int corosync_timer_init (
+int openais_timer_init (
         void (*serialize_lock_fn) (void),
         void (*serialize_unlock_fn) (void))
 {
@@ -166,7 +166,7 @@ int corosync_timer_init (
 	return (res);
 }
 
-int corosync_timer_add_absolute (
+int openais_timer_add_absolute (
 	unsigned long long nanosec_from_epoch,
 	void *data,
 	void (*timer_fn) (void *data),
@@ -198,7 +198,7 @@ int corosync_timer_add_absolute (
 	return (res);
 }
 
-int corosync_timer_add_duration (
+int openais_timer_add_duration (
 	unsigned long long nanosec_duration,
 	void *data,
 	void (*timer_fn) (void *data),
@@ -230,7 +230,7 @@ int corosync_timer_add_duration (
 	return (res);
 }
 
-void corosync_timer_delete (
+void openais_timer_delete (
 	timer_handle timer_handle)
 {
 	int unlock;
@@ -253,12 +253,12 @@ void corosync_timer_delete (
 	}
 }
 
-void corosync_timer_lock (void)
+void openais_timer_lock (void)
 {
 	pthread_mutex_lock (&timer_mutex);
 }
 
-void corosync_timer_unlock (void)
+void openais_timer_unlock (void)
 {
 	pthread_mutex_unlock (&timer_mutex);
 }

+ 10 - 10
exec/timer.h

@@ -35,30 +35,30 @@
 #ifndef TIMER_H_DEFINED
 #define TIMER_H_DEFINED
 
-typedef void * corosync_timer_handle;
+typedef void * openais_timer_handle;
 
-extern void corosync_timer_init (
+extern void openais_timer_init (
         void (*serialize_lock) (void),
         void (*serialize_unlock) (void));
 
-extern int corosync_timer_add_duration (
+extern int openais_timer_add_duration (
 	unsigned long long nanoseconds_in_future,
 	void *data,
 	void (*timer_fn) (void *data),
-	corosync_timer_handle *handle);
+	openais_timer_handle *handle);
 
-extern int corosync_timer_add_absolute (
+extern int openais_timer_add_absolute (
 	unsigned long long nanoseconds_from_epoch,
 	void *data,
 	void (*timer_fn) (void *data),
-	corosync_timer_handle *handle);
+	openais_timer_handle *handle);
 
-extern void corosync_timer_delete (corosync_timer_handle timer_handle);
+extern void openais_timer_delete (openais_timer_handle timer_handle);
 
-extern void corosync_timer_delete_data (corosync_timer_handle timer_handle);
+extern void openais_timer_delete_data (openais_timer_handle timer_handle);
 
-extern void corosync_timer_lock (void);
+extern void openais_timer_lock (void);
 
-extern void corosync_timer_unlock (void);
+extern void openais_timer_unlock (void);
 
 #endif /* TIMER_H_DEFINED */

+ 1 - 1
exec/tlist.h

@@ -43,7 +43,7 @@
 #include <string.h>
 #include <sys/param.h>
 
-#include "../include/list.h"
+#include <corosync/list.h>
 
 #ifndef HZ
 	#define HZ 100  /* 10ms */

+ 7 - 5
exec/totemconfig.c

@@ -46,13 +46,15 @@
 #include <arpa/inet.h>
 #include <sys/param.h>
 
-#include "swab.h"
-#include "list.h"
+#include <corosync/swab.h>
+#include <corosync/list.h>
+#include <corosync/totem/totem.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+#include <corosync/engine/logsys.h>
+
 #include "util.h"
-#include "totem.h"
 #include "totemconfig.h"
-#include "logsys.h"
-#include "objdb.h"
 #include "tlist.h" /* for HZ */
 
 #define TOKEN_RETRANSMITS_BEFORE_LOSS_CONST	4

+ 9 - 8
exec/totemconfig.h

@@ -32,17 +32,18 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include <netinet/in.h>
-#include "../include/saAis.h"
-#include "../include/list.h"
-#include "coropoll.h"
-#include "totemsrp.h"
-#include "totempg.h"
-#include "objdb.h"
-
 #ifndef TOTEMCONFIG_H_DEFINED
 #define TOTEMCONFIG_H_DEFINED
 
+#include <netinet/in.h>
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/objdb.h>
+
+#include "totemsrp.h"
+
 extern int totem_config_read (
 	struct objdb_iface_ver0 *objdb,
 	struct totem_config *totem_config,

+ 3 - 2
exec/totemip.c

@@ -66,8 +66,8 @@
 #define s6_addr16 __u6_addr.__u6_addr16
 #endif
 
-#include "totemip.h"
-#include "swab.h"
+#include <corosync/totem/totemip.h>
+#include <corosync/swab.h>
 
 #define LOCALHOST_IPV4 "127.0.0.1"
 #define LOCALHOST_IPV6 "::1"
@@ -167,6 +167,7 @@ int totemip_compare(const void *a, const void *b)
 	 	 */
 		assert (0);
 	}
+	return 0;
 }
 
 /* Build a localhost totem_ip_address */

+ 3 - 2
exec/totemmrp.c

@@ -54,9 +54,10 @@
 #include <sys/time.h>
 #include <sys/poll.h>
 
-#include "totem.h"
+#include <corosync/totem/totem.h>
+#include <corosync/totem/coropoll.h>
+
 #include "totemsrp.h"
-#include "coropoll.h"
 
 totemsrp_handle totemsrp_handle_in;
 

+ 1 - 1
exec/totemmrp.h

@@ -35,7 +35,7 @@
 #ifndef TOTEMMRP_H_DEFINED
 #define TOTEMMRP_H_DEFINED
 
-#include "totem.h"
+#include <corosync/totem/totem.h>
 
 /*
  * Totem Single Ring Protocol

+ 6 - 6
exec/totemnet.c

@@ -56,14 +56,14 @@
 #include <sys/time.h>
 #include <sys/poll.h>
 
-#include "coropoll.h"
+#include <corosync/queue.h>
+#include <corosync/sq.h>
+#include <corosync/list.h>
+#include <corosync/hdb.h>
+#include <corosync/swab.h>
+#include <corosync/totem/coropoll.h>
 #include "totemnet.h"
 #include "wthread.h"
-#include "../include/queue.h"
-#include "../include/sq.h"
-#include "../include/list.h"
-#include "../include/hdb.h"
-#include "swab.h"
 
 #include "crypto.h"
 

+ 1 - 1
exec/totemnet.h

@@ -38,7 +38,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#include "totem.h"
+#include <corosync/totem/totem.h>
 
 typedef unsigned int totemnet_handle;
 

+ 6 - 5
exec/totempg.c

@@ -91,13 +91,14 @@
 #include <pthread.h>
 #include <errno.h>
 
-#include "../include/hdb.h"
-#include "../include/list.h"
-#include "coropoll.h"
-#include "totempg.h"
+#include <corosync/swab.h>
+#include <corosync/hdb.h>
+#include <corosync/list.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+
 #include "totemmrp.h"
 #include "totemsrp.h"
-#include "swab.h"
 
 #define min(a,b) ((a) < (b)) ? a : b
 

+ 7 - 6
exec/totemrrp.c

@@ -56,12 +56,13 @@
 #include <sys/time.h>
 #include <sys/poll.h>
 
-#include "../include/queue.h"
-#include "../include/sq.h"
-#include "../include/list.h"
-#include "../include/hdb.h"
-#include "swab.h"
-#include "coropoll.h"
+#include <corosync/queue.h>
+#include <corosync/sq.h>
+#include <corosync/list.h>
+#include <corosync/hdb.h>
+#include <corosync/swab.h>
+#include <corosync/totem/coropoll.h>
+
 #include "totemnet.h"
 #include "totemrrp.h"
 

+ 1 - 1
exec/totemrrp.h

@@ -38,7 +38,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#include "totem.h"
+#include <corosync/totem/totem.h>
 
 typedef unsigned int totemrrp_handle;
 

+ 7 - 7
exec/totemsrp.c

@@ -69,15 +69,15 @@
 #include <sys/time.h>
 #include <sys/poll.h>
 
-#include "coropoll.h"
+#include <corosync/swab.h>
+#include <corosync/queue.h>
+#include <corosync/sq.h>
+#include <corosync/list.h>
+#include <corosync/hdb.h>
+#include <corosync/totem/coropoll.h>
 #include "totemsrp.h"
 #include "totemrrp.h"
 #include "wthread.h"
-#include "../include/queue.h"
-#include "../include/sq.h"
-#include "../include/list.h"
-#include "../include/hdb.h"
-#include "swab.h"
 
 #include "crypto.h"
 
@@ -691,7 +691,7 @@ int totemsrp_initialize (
 
 	rundir = getenv ("OPENAIS_RUN_DIR");
 	if (rundir == NULL) {
-		rundir = "/var/lib/corosync";
+		rundir = "/var/lib/openais";
 	}
 	
 	res = mkdir (rundir, 0700);

+ 2 - 2
exec/totemsrp.h

@@ -35,8 +35,8 @@
 #ifndef TOTEMSRP_H_DEFINED
 #define TOTEMSRP_H_DEFINED
 
-#include "totem.h"
-#include "coropoll.h"
+#include <corosync/totem/totem.h>
+#include <corosync/totem/coropoll.h>
 
 typedef unsigned int totemsrp_handle;
 

+ 4 - 4
exec/util.c

@@ -39,10 +39,10 @@
 #include <errno.h>
 #include <sys/time.h>
 
-#include "../include/saAis.h"
-#include "../include/list.h"
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/engine/logsys.h>
 #include "util.h"
-#include "logsys.h"
 
 LOGSYS_DECLARE_SUBSYS ("MAIN", LOG_INFO);
 
@@ -77,7 +77,7 @@ SaTimeT clust_time_now(void)
 }
 
 
-void _corosync_exit_error (
+void _openais_exit_error (
 	enum e_ais_done err, const char *file, unsigned int line)
 {
 	log_printf (LOG_LEVEL_ERROR, "AIS Executive exiting "

+ 5 - 4
exec/util.h

@@ -34,9 +34,10 @@
  */
 #ifndef UTIL_H_DEFINED
 #define UTIL_H_DEFINED
+
 #include <sys/time.h>
-#include "../include/mar_gen.h"
-#include "../include/saAis.h"
+#include <corosync/mar_gen.h>
+#include <corosync/saAis.h>
 
 /*
  * Get the time of day and convert to nanoseconds
@@ -67,8 +68,8 @@ enum e_ais_done {
  */
 extern int name_match(SaNameT *name1, SaNameT *name2);
 extern int mar_name_match(mar_name_t *name1, mar_name_t *name2);
-#define corosync_exit_error(err) _corosync_exit_error ((err), __FILE__, __LINE__)
-extern void _corosync_exit_error (
+#define openais_exit_error(err) _openais_exit_error ((err), __FILE__, __LINE__)
+extern void _openais_exit_error (
 	enum e_ais_done err, const char *file, unsigned int line);
 extern char *getSaNameT (SaNameT *name);
 extern char *strstr_rs (const char *haystack, const char *needle);

+ 1 - 1
exec/vsf.h

@@ -34,7 +34,7 @@
 #ifndef VSF_H_DEFINED
 #define VSF_H_DEFINED
 
-struct corosync_vsf_iface_ver0 {
+struct openais_vsf_iface_ver0 {
 
 	/*
 	 * Executes a callback whenever component changes

+ 8 - 7
exec/vsf_ykd.c

@@ -55,11 +55,12 @@
 #include <sched.h>
 #include <time.h>
 
+#include <corosync/engine/logsys.h>
+#include <corosync/swab.h>
+#include <corosync/lcr/lcr_comp.h>
+
 #include "main.h"
-#include "logsys.h"
-#include "swab.h"
 #include "vsf.h"
-#include "../lcr/lcr_comp.h"
 
 LOGSYS_DECLARE_SUBSYS ("YKD", LOG_INFO);
 
@@ -531,14 +532,14 @@ static int ykd_primary (void) {
 /*
  * lcrso object definition
  */
-static struct corosync_vsf_iface_ver0 vsf_ykd_iface_ver0 = {
+static struct openais_vsf_iface_ver0 vsf_ykd_iface_ver0 = {
 	.init				= ykd_init,
 	.primary			= ykd_primary
 };
 
-static struct lcr_iface corosync_vsf_ykd_ver0[1] = {
+static struct lcr_iface openais_vsf_ykd_ver0[1] = {
 	{
-		.name			= "corosync_vsf_ykd",
+		.name			= "openais_vsf_ykd",
 		.version		= 0,
 		.versions_replace	= 0,
 		.versions_replace_count	= 0,
@@ -552,7 +553,7 @@ static struct lcr_iface corosync_vsf_ykd_ver0[1] = {
 
 static struct lcr_comp vsf_ykd_comp_ver0 = {
 	.iface_count			= 1,
-	.ifaces				= corosync_vsf_ykd_ver0
+	.ifaces				= openais_vsf_ykd_ver0
 };
 
 __attribute__ ((constructor)) static void vsf_ykd_comp_register (void) {

+ 2 - 1
exec/wthread.c

@@ -40,8 +40,9 @@
 #include <stdlib.h>
 #include <pthread.h>
 #include <errno.h>
+#include <corosync/queue.h>
+
 #include "wthread.h"
-#include "../include/queue.h"
 
 struct thread_data {
 	void *thread_state;

+ 4 - 4
init/generic

@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# corosync       Start the corosync cluster service
+# openais       Start the openais cluster service
 #
 # Author:       Andrew Beekhof <abeekhof@suse.de>
 # License:      Revised BSD
@@ -10,10 +10,10 @@
 # description:  OpenAIS daemon
 #
 ### BEGIN INIT INFO
-# Description: corosync....
+# Description: openais....
 #
-# Short-Description: corosync cluster services.
-# Provides: corosync
+# Short-Description: openais cluster services.
+# Provides: openais
 # Required-Start: $network
 # Should-Start: $syslog
 # Required-Stop: $network

+ 0 - 1
lcr/Makefile

@@ -26,7 +26,6 @@
 #
 include ../Makefile.inc
 
-override CFLAGS += -I../include -DLCRSODIR='"$(LCRSODIR)"'
 override LDFLAGS += -L./ ${DYFLAGS}
 
 ifeq (${OPENAIS_COMPAT}, LINUX) 

+ 1 - 1
lcr/README.lcr

@@ -4,7 +4,7 @@ All software is composed of components, which contain multiple software classes.
 Components generally depend upon other components and sometimes classes from
 other components.
 
-Some components of corosync are the evt service, the ckpt service, the clm
+Some components of openais are the evt service, the ckpt service, the clm
 service, the totem protocol, and others.  If a defect is found in any of
 these components, the entire ais executive must be stopped, replaced, and
 restarted.

+ 3 - 3
lcr/lcr_ifact.c

@@ -38,9 +38,9 @@
 #ifdef OPENAIS_SOLARIS
 #include <iso/limits_iso.h>
 #endif
-#include "lcr_comp.h"
-#include "lcr_ifact.h"
-#include "../include/hdb.h"
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/hdb.h>
 #include <stdlib.h>
 
 struct lcr_component_instance {

+ 1 - 1
lcr/libtest_a.c

@@ -28,7 +28,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include <stdio.h>
-#include "lcr_comp.h"
+#include <corosync/lcr/lcr_comp.h>
 
 /*
  * Version 0 of the interface

+ 1 - 1
lcr/libtest_b.c

@@ -28,7 +28,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include <stdio.h>
-#include "lcr_comp.h"
+#include <corosync/lcr/lcr_comp.h>
 
 /*
  * Version 0 of the interface

+ 1 - 1
lcr/test.c

@@ -29,7 +29,7 @@
  */
 #include <assert.h>
 #include <unistd.h>
-#include "lcr_ifact.h"
+#include <corosync/lcr/lcr_ifact.h>
 
 struct iface {
 	void (*func1) (void);

+ 2 - 3
lib/Makefile

@@ -35,7 +35,6 @@ subdir ?= lib/
 
 include $(srcdir)Makefile.inc
 
-
 override LDFLAGS += -L./
 
 all: libcpg.a libcpg.so.2.0.0 \
@@ -59,7 +58,7 @@ libevs.so.2.0.0: util.o evs.o
 libcpg.so.2.0.0: util.o cpg.o
 	$(CC) $(DARWIN_OPTS) util.o cpg.o -o $@
 
-libconfdb.so.2.0.0: util.o confdb.o sa-confdb.o ../lcr/lcr_ifact.o
+libconfdb.so.2.0.0: util.o confdb.o sa-confdb.o 
 	$(CC) $(LDFLAGS) $(DARWIN_OPTS) util.o confdb.o sa-confdb.o ../lcr/lcr_ifact.o -o $@
 
 libcfg.so.2.0.0: util.o cfg.o
@@ -79,7 +78,7 @@ libevs.so.2.0.0: util.o evs.o
 libcpg.so.2.0.0: util.o cpg.o
 	$(CC) -shared -Wl,-soname,libcpg.so.2,-version-script=$(srcdir)$(subdir)libcpg.versions util.o cpg.o -o $@
 
-libconfdb.so.2.0.0: util.o confdb.o sa-confdb.o ../lcr/lcr_ifact.o
+libconfdb.so.2.0.0: util.o confdb.o sa-confdb.o 
 	$(CC) $(LDFLAGS) -shared -Wl,-soname,libconfdb.so.2,-version-script=$(srcdir)$(subdir)libconfdb.versions util.o confdb.o sa-confdb.o ../lcr/lcr_ifact.o -o $@
 
 libcfg.so.2.0.0: util.o cfg.o

+ 34 - 34
lib/cfg.c

@@ -45,12 +45,12 @@
 #include <sys/select.h>
 #include <sys/un.h>
 
-#include <saAis.h>
-#include <cfg.h>
-#include <mar_gen.h>
-#include <ipc_gen.h>
-#include <ipc_cfg.h>
-#include <ais_util.h>
+#include <corosync/saAis.h>
+#include <corosync/cfg.h>
+#include <corosync/mar_gen.h>
+#include <corosync/ipc_gen.h>
+#include <corosync/ipc_cfg.h>
+#include <corosync/ais_util.h>
 
 struct res_overlay {
 	mar_res_header_t header;
@@ -95,8 +95,8 @@ void cfg_handleInstanceDestructor (void *instance)
 }
 
 SaAisErrorT
-corosync_cfg_initialize (
-	corosync_cfg_handle_t *cfg_handle,
+openais_cfg_initialize (
+	openais_cfg_handle_t *cfg_handle,
 	const OpenaisCfgCallbacksT *cfgCallbacks)
 {
 	struct cfg_instance *cfg_instance;
@@ -143,8 +143,8 @@ error_no_destroy:
 }
 
 SaAisErrorT
-corosync_cfg_fd_get (
-	corosync_cfg_handle_t cfg_handle,
+openais_cfg_fd_get (
+	openais_cfg_handle_t cfg_handle,
 	SaSelectionObjectT *selectionObject)
 {
 	struct cfg_instance *cfg_instance;
@@ -162,8 +162,8 @@ corosync_cfg_fd_get (
 }
 
 SaAisErrorT
-corosync_cfg_dispatch (
-	corosync_cfg_handle_t cfg_handle,
+openais_cfg_dispatch (
+	openais_cfg_handle_t cfg_handle,
 	SaDispatchFlagsT dispatchFlags)
 {
 	struct pollfd ufds;
@@ -173,10 +173,10 @@ corosync_cfg_dispatch (
 	int dispatch_avail;
 	struct cfg_instance *cfg_instance;
 #ifdef COMPILE_OUT
-	struct res_lib_corosync_healthcheckcallback *res_lib_corosync_healthcheckcallback;
-	struct res_lib_corosync_readinessstatesetcallback *res_lib_corosync_readinessstatesetcallback;
-	struct res_lib_corosync_csisetcallback *res_lib_corosync_csisetcallback;
-	struct res_lib_corosync_csiremovecallback *res_lib_corosync_csiremovecallback;
+	struct res_lib_openais_healthcheckcallback *res_lib_openais_healthcheckcallback;
+	struct res_lib_openais_readinessstatesetcallback *res_lib_openais_readinessstatesetcallback;
+	struct res_lib_openais_csisetcallback *res_lib_openais_csisetcallback;
+	struct res_lib_openais_csiremovecallback *res_lib_openais_csiremovecallback;
 	struct res_lib_cfg_statetrackcallback *res_lib_cfg_statetrackcallback;
 #endif
 	OpenaisCfgCallbacksT callbacks;
@@ -295,8 +295,8 @@ error_nounlock:
 }
 
 SaAisErrorT
-corosync_cfg_finalize (
-	corosync_cfg_handle_t cfg_handle)
+openais_cfg_finalize (
+	openais_cfg_handle_t cfg_handle)
 {
 	struct cfg_instance *cfg_instance;
 	SaAisErrorT error;
@@ -347,8 +347,8 @@ corosync_cfg_finalize (
 }
 
 SaAisErrorT
-corosync_cfg_ring_status_get (
-	corosync_cfg_handle_t cfg_handle,
+openais_cfg_ring_status_get (
+	openais_cfg_handle_t cfg_handle,
 	char ***interface_names,
 	char ***status,
 	unsigned int *interface_count)
@@ -427,8 +427,8 @@ no_error:
 }
 
 SaAisErrorT
-corosync_cfg_ring_reenable (
-	corosync_cfg_handle_t cfg_handle)
+openais_cfg_ring_reenable (
+	openais_cfg_handle_t cfg_handle)
 {
 	struct cfg_instance *cfg_instance;
 	struct req_lib_cfg_ringreenable req_lib_cfg_ringreenable;
@@ -458,8 +458,8 @@ corosync_cfg_ring_reenable (
 }
 
 SaAisErrorT
-corosync_cfg_service_load (
-	corosync_cfg_handle_t cfg_handle,
+openais_cfg_service_load (
+	openais_cfg_handle_t cfg_handle,
 	char *service_name,
 	unsigned int service_ver)
 {
@@ -496,8 +496,8 @@ corosync_cfg_service_load (
 }
 
 SaAisErrorT
-corosync_cfg_service_unload (
-	corosync_cfg_handle_t cfg_handle,
+openais_cfg_service_unload (
+	openais_cfg_handle_t cfg_handle,
 	char *service_name,
 	unsigned int service_ver)
 {
@@ -533,8 +533,8 @@ corosync_cfg_service_unload (
 	return (error);
 }
 SaAisErrorT
-corosync_cfg_state_track (
-	corosync_cfg_handle_t cfg_handle,
+openais_cfg_state_track (
+	openais_cfg_handle_t cfg_handle,
 	SaUint8T trackFlags,
 	const OpenaisCfgStateNotificationT *notificationBuffer)
 {
@@ -570,8 +570,8 @@ corosync_cfg_state_track (
 }
 
 SaAisErrorT
-corosync_cfg_state_track_stop (
-	corosync_cfg_handle_t cfg_handle)
+openais_cfg_state_track_stop (
+	openais_cfg_handle_t cfg_handle)
 {
 	struct cfg_instance *cfg_instance;
 	struct req_lib_cfg_statetrackstop req_lib_cfg_statetrackstop;
@@ -603,8 +603,8 @@ corosync_cfg_state_track_stop (
 }
 
 SaAisErrorT
-corosync_cfg_admin_state_get (
-	corosync_cfg_handle_t cfg_handle,
+openais_cfg_admin_state_get (
+	openais_cfg_handle_t cfg_handle,
 	OpenaisCfgAdministrativeTargetT administrativeTarget,
 	OpenaisCfgAdministrativeStateT *administrativeState)
 {
@@ -639,8 +639,8 @@ corosync_cfg_admin_state_get (
 }
 
 SaAisErrorT
-corosync_cfg_admin_state_set (
-	corosync_cfg_handle_t cfg_handle,
+openais_cfg_admin_state_set (
+	openais_cfg_handle_t cfg_handle,
 	OpenaisCfgAdministrativeTargetT administrativeTarget,
 	OpenaisCfgAdministrativeStateT administrativeState)
 {

+ 61 - 9
lib/confdb.c

@@ -32,7 +32,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 /*
- * Provides access to data in the corosync object database
+ * Provides access to data in the openais object database
  */
 
 #include <stdlib.h>
@@ -42,12 +42,12 @@
 #include <sys/types.h>
 #include <errno.h>
 
-#include <saAis.h>
-#include <confdb.h>
-#include <ipc_confdb.h>
-#include <mar_gen.h>
-#include <ais_util.h>
-#include <list.h>
+#include <corosync/saAis.h>
+#include <corosync/confdb.h>
+#include <corosync/ipc_confdb.h>
+#include <corosync/mar_gen.h>
+#include <corosync/ais_util.h>
+#include <corosync/list.h>
 
 #include "sa-confdb.h"
 
@@ -125,8 +125,8 @@ static struct iter_context *find_iter_context(struct list_head *list, unsigned i
 }
 
 /**
- * @defgroup confdb_corosync
- * @ingroup corosync
+ * @defgroup confdb_openais
+ * @ingroup openais
  *
  * @{
  */
@@ -1219,6 +1219,58 @@ error_exit:
 	return (error);
 }
 
+confdb_error_t confdb_reload (
+	confdb_handle_t handle,
+	int flush,
+	char *error_text)
+{
+	confdb_error_t error;
+	struct confdb_inst *confdb_inst;
+	struct iovec iov[2];
+	struct res_lib_confdb_reload res_lib_confdb_reload;
+	struct req_lib_confdb_reload req_lib_confdb_reload;
+
+	error = saHandleInstanceGet (&confdb_handle_t_db, handle, (void *)&confdb_inst);
+	if (error != SA_AIS_OK) {
+		return (error);
+	}
+
+	if (confdb_inst->standalone) {
+		error = SA_AIS_OK;
+
+		if (confdb_sa_reload(flush, error_text))
+			error = SA_AIS_ERR_ACCESS;
+		goto error_exit;
+	}
+
+	req_lib_confdb_reload.header.size = sizeof (req_lib_confdb_reload);
+	req_lib_confdb_reload.header.id = MESSAGE_REQ_CONFDB_RELOAD;
+	req_lib_confdb_reload.flush = flush;
+
+	iov[0].iov_base = (char *)&req_lib_confdb_reload;
+	iov[0].iov_len = sizeof (req_lib_confdb_reload);
+
+	pthread_mutex_lock (&confdb_inst->response_mutex);
+
+	error = saSendMsgReceiveReply (confdb_inst->response_fd, iov, 1,
+				       &res_lib_confdb_reload, sizeof (struct res_lib_confdb_reload));
+
+	pthread_mutex_unlock (&confdb_inst->response_mutex);
+
+	if (error != SA_AIS_OK) {
+		goto error_exit;
+	}
+
+	error = res_lib_confdb_reload.header.error;
+	if(res_lib_confdb_reload.error.length)
+		memcpy(error_text, res_lib_confdb_reload.error.value, res_lib_confdb_reload.error.length);
+
+error_exit:
+	saHandleInstancePut (&confdb_handle_t_db, handle);
+
+	return (error);
+}
+
 confdb_error_t confdb_track_changes (
 	confdb_handle_t handle,
 	unsigned int object_handle,

+ 8 - 8
lib/cpg.c

@@ -34,7 +34,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 /*
- * Provides a closed process group API using the corosync executive
+ * Provides a closed process group API using the openais executive
  */
 
 #include <stdlib.h>
@@ -45,11 +45,11 @@
 #include <sys/socket.h>
 #include <errno.h>
 
-#include <saAis.h>
-#include <cpg.h>
-#include <ipc_cpg.h>
-#include <mar_cpg.h>
-#include <ais_util.h>
+#include <corosync/saAis.h>
+#include <corosync/cpg.h>
+#include <corosync/ipc_cpg.h>
+#include <corosync/mar_cpg.h>
+#include <corosync/ais_util.h>
 
 struct cpg_inst {
 	int response_fd;
@@ -84,8 +84,8 @@ static void cpg_instance_destructor (void *instance)
 
 
 /**
- * @defgroup cpg_corosync The closed process group API
- * @ingroup corosync
+ * @defgroup cpg_openais The closed process group API
+ * @ingroup openais
  *
  * @{
  */

+ 9 - 9
lib/evs.c

@@ -35,7 +35,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 /*
- * Provides an extended virtual synchrony API using the corosync executive
+ * Provides an extended virtual synchrony API using the openais executive
  */
 
 #include <stdlib.h>
@@ -46,12 +46,12 @@
 #include <sys/socket.h>
 #include <errno.h>
 
-#include <swab.h>
-#include "../exec/totem.h"
-#include <saAis.h>
-#include <evs.h>
-#include <ipc_evs.h>
-#include <ais_util.h>
+#include <corosync/swab.h>
+#include <corosync/totem/totem.h>
+#include <corosync/saAis.h>
+#include <corosync/evs.h>
+#include <corosync/ipc_evs.h>
+#include <corosync/ais_util.h>
 
 struct evs_inst {
 	int response_fd;
@@ -89,8 +89,8 @@ static void evs_instance_destructor (void *instance)
 
 
 /**
- * @defgroup evs_corosync The extended virtual synchrony passthrough API
- * @ingroup corosync
+ * @defgroup evs_openais The extended virtual synchrony passthrough API
+ * @ingroup openais
  *
  * @{
  */

+ 12 - 12
lib/libcfg.versions

@@ -2,18 +2,18 @@
 
 OPENAIS_CFG_0.82 {
 	global:
-		corosync_cfg_initialize;
-		corosync_cfg_fd_get;
-		corosync_cfg_dispatch;
-		corosync_cfg_finalize;
-		corosync_cfg_administrative_state_get;
-		corosync_cfg_administrative_state_set;
-		corosync_cfg_track;
-		corosync_cfg_track_stop;
-		corosync_cfg_ring_status_get;
-		corosync_cfg_ring_reenable;
-		corosync_cfg_service_load;
-		corosync_cfg_service_unload;
+		openais_cfg_initialize;
+		openais_cfg_fd_get;
+		openais_cfg_dispatch;
+		openais_cfg_finalize;
+		openais_cfg_administrative_state_get;
+		openais_cfg_administrative_state_set;
+		openais_cfg_track;
+		openais_cfg_track_stop;
+		openais_cfg_ring_status_get;
+		openais_cfg_ring_reenable;
+		openais_cfg_service_load;
+		openais_cfg_service_unload;
 		
 		
 	local:

+ 24 - 10
lib/sa-confdb.c

@@ -32,7 +32,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 /*
- * Provides stand-alone access to data in the corosync object database
+ * Provides stand-alone access to data in the openais object database
  * when aisexec is not running.
  */
 
@@ -43,13 +43,13 @@
 #include <sys/types.h>
 #include <errno.h>
 
-#include <saAis.h>
-#include <ais_util.h>
-#include "../exec/objdb.h"
-#include "../exec/config.h"
-#include "../lcr/lcr_comp.h"
-#include "../lcr/lcr_ifact.h"
-#include "../exec/logsys.h"
+#include <corosync/saAis.h>
+#include <corosync/ais_util.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+#include <corosync/engine/logsys.h>
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/lcr/lcr_ifact.h>
 
 static struct objdb_iface_ver0 *objdb;
 
@@ -95,9 +95,9 @@ static int load_config()
 	char *error_string;
 
 	/* User's bootstrap config service */
-	config_iface = getenv("OPENAIS_DEFAULT_CONFIG_IFACE");
+	config_iface = getenv("COROSYNC_DEFAULT_CONFIG_IFACE");
 	if (!config_iface) {
-		config_iface = "aisparser";
+		config_iface = "corosync_parser";
 	}
 
 	/* Make a copy so we can deface it with strtok */
@@ -296,6 +296,20 @@ int confdb_sa_write (
 	return ret;
 }
 
+int confdb_sa_reload (
+	unsigned int parent_object_handle,
+	int flush,
+	char *error_text)
+{
+	char *errtext;
+	int ret;
+
+	ret = objdb->object_reload_config(flush, &errtext);
+	if (!ret)
+		strcpy(error_text, errtext);
+
+	return ret;
+}
 
 int confdb_sa_object_iter (
 	unsigned int parent_object_handle,

+ 1 - 0
lib/sa-confdb.h

@@ -44,3 +44,4 @@ extern int confdb_sa_object_find(unsigned int parent_object_handle, unsigned int
 extern int confdb_sa_object_iter(unsigned int parent_object_handle, unsigned int start_pos, unsigned int *object_handle, void *object_name, int *object_name_len);
 extern int confdb_sa_key_iter(unsigned int parent_object_handle, unsigned int start_pos, void *key_name, int *key_name_len, void *value, int *value_len);
 extern int confdb_sa_write(char *error_text);
+extern int confdb_sa_reload(int flush, char *error_text);

+ 3 - 3
lib/util.c

@@ -53,9 +53,9 @@
 #include <netinet/in.h>
 #include <assert.h>
 
-#include <saAis.h>
-#include <ipc_gen.h>
-#include <ais_util.h>
+#include <corosync/saAis.h>
+#include <corosync/ipc_gen.h>
+#include <corosync/ais_util.h>
 
 enum SA_HANDLE_STATE {
 	SA_HANDLE_STATE_EMPTY,

+ 2 - 2
man/Makefile

@@ -33,8 +33,8 @@ all: html
 
 html:
 	mkdir html
-	groff -mandoc -Thtml corosync_overview.8 > html/corosync_overview.html
-	groff -mandoc -Thtml corosync.conf.5 > html/corosync.conf.html
+	groff -mandoc -Thtml openais_overview.8 > html/openais_overview.html
+	groff -mandoc -Thtml openais.conf.5 > html/openais.conf.html
 	groff -mandoc -Thtml evs_overview.8 > html/evs_overview.html
 	groff -mandoc -Thtml evs_initialize.3 > html/evs_initialize.html
 	groff -mandoc -Thtml evs_finalize.3 > html/evs_finalize.html

+ 8 - 8
man/amf.conf.5

@@ -32,15 +32,15 @@
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
 
-.TH AMF.CONF 5 2006-08-29 "corosync Man Page"
+.TH AMF.CONF 5 2006-08-29 "openais Man Page"
 
 .SH NAME
-amf.conf - corosync AMF configuration file
+amf.conf - openais AMF configuration file
 
 .SH DESCRIPTION
 .B amf.conf
 is the configuration file that determines the behaviour of the AIS Availability
-Management Framework service, AMF in the corosync implementation.
+Management Framework service, AMF in the openais implementation.
 
 Entries in this file will for example determine what applications AMF will start
 and how to supervise them.
@@ -106,7 +106,7 @@ The value of the attribute 'saAmfNodeClmNode' should be the hostname (without
 domain name) as given to the host at boot time. This name is returned by the
 shell command 'hostname'.
 
-Currently, AMF is enabled/disabled by an entry in the corosync.conf file, see [1].
+Currently, AMF is enabled/disabled by an entry in the openais.conf file, see [1].
 It is default disabled.
 
 
@@ -246,7 +246,7 @@ Multivalue
 Hans.Feldt at ericsson.com
 
 .SH EXAMPLE
-For an AMF configuration file example, see the amf.conf file under the corosync
+For an AMF configuration file example, see the amf.conf file under the openais
 .B conf
 directory.
 
@@ -254,12 +254,12 @@ directory.
 .TP
 /etc/ais/amf.conf
 .TP
-/etc/ais/corosync.conf
+/etc/ais/openais.conf
 
 .SH "SEE ALSO"
-[1] corosync_conf (5)
+[1] openais_conf (5)
 .TP
-[2] corosync_overview (8)
+[2] openais_overview (8)
 .TP
 [3] README.amf
 .TP

+ 2 - 2
man/confdb_dispatch.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_DISPATCH 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_DISPATCH 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_dispatch \- Dispatches callbacks from the CONFDB service
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "int confdb_dispatch(confdb_handle_t " handle ", confdb_dispatch_t *" dispatch_types ");"
 .SH DESCRIPTION

+ 2 - 2
man/confdb_fd_get.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_FD_GET 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_FD_GET 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_fd_get \- Dispatches callbacks from the CONFDB service
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "int confdb_fd_get(confdb_handle_t " handle ", int *" fd ");"
 .SH DESCRIPTION

+ 2 - 2
man/confdb_finalize.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_FINALIZE 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_FINALIZE 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_finalize \- Terminate a connection to the CONFDB service
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "int confdb_finalize(confdb_handle_t " handle ");"
 .SH DESCRIPTION

+ 2 - 2
man/confdb_initialize.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_INITIALIZE 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_INITIALIZE 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_initialize \- Create a new connection to the ConfDb service
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "int confdb_initialize(confdb_handle_t *" handle ", confdb_callbacks_t *" callbacks ");
 .SH DESCRIPTION

+ 2 - 2
man/confdb_key_create.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_KEY_CREATE 3 2008-04-17 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_KEY_CREATE 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_key_create \- Add a new key/value pair to the Configuration Database
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "confdb_error_t confdb_key_create(confdb_handle_t " handle ",
 .BI	unsigned int " parent_object_handle ",

+ 2 - 2
man/confdb_key_delete.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_KEY_DELETE 3 2008-04-17 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_KEY_DELETE 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_key_delete \- Delete a key/value pair from the Configuration Database
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "confdb_error_t confdb_key_delete(confdb_handle_t " handle ",
 .BI	unsigned int " parent_object_handle ",

+ 2 - 2
man/confdb_key_iter.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_KEY_ITER 3 2008-04-17 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_KEY_ITER 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_key_iter \- Iterate through key/value pairs in the Configuration Database
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "confdb_error_t confdb_key_iter_start(confdb_handle_t " handle ", unsigned int " parent_object_handle " ); "
 .sp

+ 2 - 2
man/confdb_key_replace.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_KEY_REPLACE 3 2008-04-17 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_KEY_REPLACE 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_key_replace \- Replace a key/value pair from the Configuration Database
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "confdb_error_t confdb_key_replace(confdb_handle_t " handle ", unsigned int " parent_object_handle ", void " *key_name ",
 .BI	int " key_name_len ",

+ 2 - 2
man/confdb_object_create.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_OBJECT_CREATE 3 2008-04-17 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_OBJECT_CREATE 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_object_create \- Create a new object in the Configuration Database
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "confdb_error_t confdb_object_create(confdb_handle_t " handle ", unsigned int " parent_object_handle ",
 .BI	void " *object_name ",

+ 2 - 2
man/confdb_object_destroy.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_* 3 2008-04-17 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_* 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_object_destroy \- Remove an object from the Configuration Database
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "confdb_error_t confdb_destroy(confdb_handle_t " handle ", unsigned int " object_handle ");
 .SH DESCRIPTION

+ 2 - 2
man/confdb_object_find.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_OBJECT_FIND 3 2008-04-17 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_OBJECT_FIND 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_object_find \- Find a named object in the Configuration Database
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "confdb_error_t confdb_object_find_start(confdb_handle_t " handle ", unsigned int " parent_object_handle " ); "
 .sp

+ 2 - 2
man/confdb_object_iter.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_OBJECT_ITER 3 2008-04-17 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_OBJECT_ITER 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_object_iter \- Iterate through objects in the Configuration Database
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "confdb_error_t confdb_object_iter_start(confdb_handle_t " handle ", unsigned int " parent_object_handle " ); "
 .sp

+ 2 - 2
man/confdb_object_parent_get.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_OBJECT_PARENT_GET 3 2008-04-17 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_OBJECT_PARENT_GET 3 2008-04-17 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 confdb_parent_get \- Configuration Database Object Parent
 .SH SYNOPSIS
-.B #include <corosync/confdb.h>
+.B #include <openais/confdb.h>
 .sp
 .BI "confdb_error_t confdb_object_parent_get(confdb_handle_t " handle ", unsigned int " object_handle ",	unsigned int " *parent_object_handle ");"
 .SH DESCRIPTION

+ 3 - 3
man/confdb_overview.8

@@ -31,10 +31,10 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CONFDB_OVERVIEW 8 2006-03-06 "corosync Man Page" "Openais Programmer's Manual"
+.TH CONFDB_OVERVIEW 8 2006-03-06 "openais Man Page" "Openais Programmer's Manual"
 .SH OVERVIEW
-The CONFDB library is delivered with the corosync project.  This library is used
-to examine manipulate the configuratin databser used by corosync.
+The CONFDB library is delivered with the openais project.  This library is used
+to examine manipulate the configuratin databser used by openais.
 .PP
 The library provides a mechanism to:
 * Create new objects

+ 16 - 16
man/corosync.conf.5

@@ -32,16 +32,16 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH OPENAIS_CONF 5 2006-03-28 "corosync Man Page" "Openais Programmer's Manual"
+.TH OPENAIS_CONF 5 2006-03-28 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
-corosync.conf - corosync executive configuration file
+openais.conf - openais executive configuration file
 
 .SH SYNOPSIS
-/etc/ais/corosync.conf
+/etc/ais/openais.conf
 
 .SH DESCRIPTION
-The corosync.conf instructs the corosync executive about various parameters
-needed to control the corosync executive.  The configuration file consists of
+The openais.conf instructs the openais executive about various parameters
+needed to control the openais executive.  The configuration file consists of
 bracketed top level directives.  The possible directive choices are
 .IR "totem  { } , logging { } , event { } , and amf { }".
  These directives are described below.
@@ -80,7 +80,7 @@ ring.
 
 .TP
 bindnetaddr
-This specifies the address which the corosync executive should bind.
+This specifies the address which the openais executive should bind.
 This address should always end in zero.  If the totem traffic should
 be routed over 192.168.5.92, set bindnetaddr to 192.168.5.0.
 
@@ -92,7 +92,7 @@ If IPv6 networking is used, the nodeid field must be specified.
 
 .TP
 mcastaddr
-This is the multicast address used by corosync executive.  The default
+This is the multicast address used by openais executive.  The default
 should work for most networks, but the network administrator should be queried
 about a multicast address to use.  Avoid 224.x.x.x because this is a "config"
 multicast address.
@@ -103,7 +103,7 @@ will be used.  If IPv6 networking is used, the nodeid field must be specified.
 .TP
 mcastport
 This specifies the UDP port number.  It is possible to use the same multicast
-address on a network with the corosync services configured for different
+address on a network with the openais services configured for different
 UDP ports.
 
 .PP
@@ -247,7 +247,7 @@ token_retransmit
 This timeout specifies in milliseconds after how long before receiving a token
 the token is retransmitted.  This will be automatically calculated if token
 is modified.  It is not recommended to alter this value without guidance from
-the corosync community.
+the openais community.
 
 The default is 238 milliseconds.
 
@@ -255,7 +255,7 @@ The default is 238 milliseconds.
 hold
 This timeout specifies in milliseconds how long the token should be held by
 the representative when the protocol is under low utilization.   It is not
-recommended to alter this value without guidance from the corosync community.
+recommended to alter this value without guidance from the openais community.
 
 The default is 180 milliseconds.
 
@@ -282,7 +282,7 @@ to wait before sending a join message.  For configurations with less then
 is necessary to ensure the NIC is not overflowed with join messages on
 formation of a new ring.  A reasonable value for large rings (128 nodes) would
 be 80msec.  Other timer values must also change if this value is changed.  Seek
-advice from the corosync mailing list if trying to run larger configurations.
+advice from the openais mailing list if trying to run larger configurations.
 
 The default is 0 milliseconds.
 
@@ -404,7 +404,7 @@ for a particular processor.
 
 This value will automatically be calculated from the token timeout and
 problem_count_threshold but may be overridden.  It is not recommended to
-override this value without guidance from the corosync community.
+override this value without guidance from the openais community.
 
 The default is 47 milliseconds.
 
@@ -542,12 +542,12 @@ The default is disabled.
 
 .SH "FILES"
 .TP
-/etc/ais/corosync.conf
-The corosync executive configuration file.
+/etc/ais/openais.conf
+The openais executive configuration file.
 .TP
 /etc/ais/amf.conf
-The corosync AMF configuration file.
+The openais AMF configuration file.
 
 .SH "SEE ALSO"
-.BR corosync_overview (8), README.amf
+.BR openais_overview (8), README.amf
 .PP

+ 43 - 43
man/corosync_overview.8

@@ -32,9 +32,9 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH OPENAIS_OVERVIEW 8 2006-05-10 "corosync Man Page" "Openais Programmer's Manual"
+.TH OPENAIS_OVERVIEW 8 2006-05-10 "openais Man Page" "Openais Programmer's Manual"
 .SH OVERVIEW
-The corosync project is a project to implement a production quality "Revised BSD"
+The openais project is a project to implement a production quality "Revised BSD"
 licensed implementation of the most recent SA Forum's Application Interface
 Specification.  The Application Interface Specification is a software API and
 policies which are used to develop applications that maintain service during
@@ -66,7 +66,7 @@ Application programmers develop applications to periodically record their
 state using the checkpointing service. When an active application fails,
 a standby application recovers the state of the application. This
 technique, called stateful application failover, provides the fundamental
-difference between corosync and other systems that have come before it.
+difference between openais and other systems that have come before it.
 With stateful application failover, the end-application user doesn't
 have to reload the application or redial a telephone. The full state
 is recorded, so the end-application user sees no interruption in service.
@@ -78,40 +78,40 @@ a publish/subscribe model for events. The messaging service provides
 end to end messaging. Finally a mechanism to synchronize access is
 provided by the distributed lock service. 
 
-The corosync project also provides a group messaging toolkit called EVS.
+The openais project also provides a group messaging toolkit called EVS.
 The EVS service implements a messaging model known as Extended Virtual
 Synchrony.  This model allows one sender to transmit to many receivers.
 Certain guarantees are provided for message and membership delivery
 which make virtual synchrony ideal for developing distributed applications.
 
 .SH QUICKSTART
-The corosync executive must be configured.  In the directory conf in the
+The openais executive must be configured.  In the directory conf in the
 source distribution are several files that must be copied to the /etc/ais
-directory.  If corosync is packaged by a distro, this may be complete.
+directory.  If openais is packaged by a distro, this may be complete.
 
-The directory contains the file corosync.conf.  Please read the corosync.conf(5)
-man page for details on the configuration options.  The corosync project will
+The directory contains the file openais.conf.  Please read the openais.conf(5)
+man page for details on the configuration options.  The openais project will
 work out of the box with the default configuration options, although the
 administrator may desire different options.
 
-An user and group of the name "ais" must be added to the system.  If corosync
+An user and group of the name "ais" must be added to the system.  If openais
 is packaged from a distro, this step should already be completed.
 This can be achieved by executing:
 
 [root@slickdeal root]# adduser ais -g ais
 
-The corosync executive uses cryptographic techniques to ensure authenticity
-and privacy of the messages.  In order for corosync to be secure and operate,
+The openais executive uses cryptographic techniques to ensure authenticity
+and privacy of the messages.  In order for openais to be secure and operate,
 a private key must be generated and shared to all processors.
 
 First generate the key on one of the nodes:
 
 unix# ais-keygen
-corosync authentication key generator.
+openais authentication key generator.
 .PP
 Gathering 1024 bits for key from /dev/random.
 .PP
-Writing corosync key to /etc/ais/authkey.
+Writing openais key to /etc/ais/authkey.
 .PP
 
 After this operation, a private key will be in the file /etc/ais/authkey.
@@ -124,38 +124,38 @@ key from node to node.  Then install the key with the command:
 
 unix#: install -D --group=0 --owner=0 --mode=0400 /path_to_authkey/authkey /etc/ais/authkey
 
-If a message "Invalid digest" appears from the corosync executive, the keys
+If a message "Invalid digest" appears from the openais executive, the keys
 are not consistent between processors.
 
-Finally run the corosync executive.  If corosync is packaged from a distro, it
+Finally run the openais executive.  If openais is packaged from a distro, it
 may be set to start on system start.  It may also be turned off by default in
-which case the init script for corosync must be enabled.
+which case the init script for openais must be enabled.
 
 After running aisexec, a list of all processors IP addresses running the ais
 executive and configured on the same multicast address will appear.  If they
 don't appear, there may be a problem with multicast in the distro or hardware.
-If this happens, participation in the corosync mailing list may help solve the
-problem.  The email address is corosync@lists.osdl.org.
+If this happens, participation in the openais mailing list may help solve the
+problem.  The email address is openais@lists.osdl.org.
 
 .SH USING LIBRARIES
-The corosync AIS libraries have header files which must be included in the
+The openais AIS libraries have header files which must be included in the
 developer's application.  Once the header file is included, the developer can
 reference the AIS interfaces.
 
-The corosync project recommends to distros to place include files in
-/usr/include/corosync.  The following include lines must be added to
+The openais project recommends to distros to place include files in
+/usr/include/openais.  The following include lines must be added to
 the application to use each of the following services: 
 
-#include <corosync/saClm.h> For the Cluster Membership B.01.01 service.
+#include <openais/saClm.h> For the Cluster Membership B.01.01 service.
 .PP
-#include <corosync/saCkpt.h> For the Checkpointing B.01.01 service.
+#include <openais/saCkpt.h> For the Checkpointing B.01.01 service.
 .PP
-#include <corosync/saEvt.h> For the Eventing B.01.01 service.
+#include <openais/saEvt.h> For the Eventing B.01.01 service.
 .PP
-#include <corosync/ais_amf.h> For the AMF A.01.01 service.
+#include <openais/ais_amf.h> For the AMF A.01.01 service.
 .PP
 
-The corosync project recommends to distros to place library files in
+The openais project recommends to distros to place library files in
 /usr/lib.  The following link lines must be added to the LDFLAGS section
 of the makefile.
 
@@ -171,7 +171,7 @@ of the makefile.
 each library individually.
 
 .SH IPv6
-The corosync project supports both IPv4 and IPv6 network addresses.  The entire
+The openais project supports both IPv4 and IPv6 network addresses.  The entire
 cluster must use either IPv4 or IPv6 for the cluster communication mechanism.
 In order to use IPv6, IPv6 addresses must be specified in the bindnetaddr and
 mcastaddr fields in the configuration file.  The nodeid field must also be
@@ -191,28 +191,28 @@ which will cause significant problems.  Make sure a route is available for
 IPv6 traffic.
 
 .SH ARCHITECTURE
-The AIS libraries are a thin IPC interface to the corosync executive.  The
-corosync executive provides services for the SA Forum AIS libraries as well
+The AIS libraries are a thin IPC interface to the openais executive.  The
+openais executive provides services for the SA Forum AIS libraries as well
 as the EVS and CPG libraries.
 
-The corosync executive uses the Totem extended virtual synchrony protocol.  The
+The openais executive uses the Totem extended virtual synchrony protocol.  The
 advantage to the end user is excellent performance characteristics and a proven
 protocol with excellent reliability.  This protocol connects the processors
 in a configuration together so they may communicate.
 
 .SH ENVIRONMENT VARIABLES
-The corosync executive process uses four environment variables during startup.
+The openais executive process uses four environment variables during startup.
 If these environment variables are not set, defaults will be used.
 
 .TP
 OPENAIS_MAIN_CONFIG_FILE
-This specifies the fully qualified path to the corosync configuration file.
+This specifies the fully qualified path to the openais configuration file.
 
-The default is /etc/ais/corosync.conf.
+The default is /etc/ais/openais.conf.
 
 .TP
 OPENAIS_AMF_CONFIG_FILE
-This specifies the fully qualified path to the corosync Availability Management
+This specifies the fully qualified path to the openais Availability Management
 Framework configuration file.
 
 The default is /etc/ais/amf.conf.
@@ -222,8 +222,8 @@ OPENAIS_DEFAULT_CONFIG_IFACE
 This specifies the LCRSO that is used to parse the configuration file.  This
 allows other configuration file parsers to be implemented within the system.
 
-The default is to use the default corosync configuration file parser which
-parses the format specified in corosync.conf (5).
+The default is to use the default openais configuration file parser which
+parses the format specified in openais.conf (5).
 
 .TP
 OPENAIS_TOTEM_AUTHKEY_FILE
@@ -233,9 +233,9 @@ authenticate and encrypt data used within the Totem protocol.
 The default is /etc/ais/authkey.
 
 .SH SECURITY
-The corosync executive optionally encrypts all messages sent over the network
-using the SOBER-128 stream cipher.  The corosync executive uses HMAC and SHA1 to
-authenticate all messages.  The corosync executive library uses SOBER-128
+The openais executive optionally encrypts all messages sent over the network
+using the SOBER-128 stream cipher.  The openais executive uses HMAC and SHA1 to
+authenticate all messages.  The openais executive library uses SOBER-128
 as a pseudo random number generator.  The EVS library feeds the PRNG using
 the /dev/random Linux device.
 
@@ -244,18 +244,18 @@ a denial of service attack on the cluster.  In this scenario, the cluster is
 likely already compromised and a DOS attack is the least of the administration's
 worries.
 
-The security in corosync does not offer perfect forward secrecy because the keys
+The security in openais does not offer perfect forward secrecy because the keys
 are reused.  It may be possible for an intruder by capturing packets in an
 automated fashion to determine the shared key.  No such automated attack has
 been published as of yet.  In this scenario, the cluster is likely already
 compromised to allow the long-term capture of transmitted data.
 
-For security reasons, the corosync executive binary aisexec should NEVER
+For security reasons, the openais executive binary aisexec should NEVER
 be setuid or setgid in the filesystem.
 
 .PP
 .SH SAFTEST COMPLIANCE
-The corosync libraries are now nearly compliant with every aspect of the SA
+The openais libraries are now nearly compliant with every aspect of the SA
 Forum's AIS specification.  The AMF service, however, is not compliant with the
 B.01.01 specification.  The remaining services pass most of the tests of the 
 saftest suite against the B.01.01 specification.
@@ -267,6 +267,6 @@ The Availability Management Framework is under development and not suitable for
 deployment..
 
 .SH "SEE ALSO"
-.BR corosync.conf (5),
+.BR openais.conf (5),
 .BR evs_overview (8)
 .PP

+ 2 - 2
man/cpg_context_get.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_CONTEXT_GET 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_CONTEXT_GET 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_context_get \- Gets the context variable for a CPG instance
 .SH SYNOPSIS
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_context_get(cpg_handle_t " handle ", void **" context ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_context_set.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_CONTEXT_SET 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_CONTEXT_SET 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_context_set \- Sets the context variable for a CPG instance
 .SH SYNOPSIS
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_context_set(cpg_handle_t " handle ", void *" context ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_dispatch.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_DISPATCH 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_DISPATCH 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_dispatch \- Dispatches callbacks from the CPG service
 .SH SYNOPSIS
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_dispatch(cpg_handle_t " handle ", cpg_dispatch_t *" dispatch_types ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_fd_get.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_FD_GET 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_FD_GET 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_fd_get \- Dispatches callbacks from the CPG service
 .SH SYNOPSIS
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_fd_get(cpg_handle_t " handle ", int *" fd ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_finalize.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_FINALIZE 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_FINALIZE 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_finalize \- Terminate a connection to the CPG service
 .SH SYNOPSIS
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_finalize(cpg_handle_t " handle ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_initialize.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_INITIALIZE 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_INITIALIZE 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_initialize \- Create a new connection to the CPG service
 .SH SYNOPSIS
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_initialize(cpg_handle_t *" handle ", cpg_callbacks_t *" callbacks ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_join.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_JOIN 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_JOIN 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_join \- Joins one or more groups in the CPG library
 .SH SYNOPSIS
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_join(cpg_handle_t " handle ", struct cpg_name *" group ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_leave.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_LEAVE 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_LEAVE 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_leave \- Leave a group in the CPG library
 .SH SYNOPSIS
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_leave(cpg_handle_t " handle ", struct cpg_name *" group ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_local_get.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_LOCAL_GET 3 2007-06-12 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_LOCAL_GET 3 2007-06-12 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_local_get \- Returns the local processor id
 .SH SYNOPSIS
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_local_get(cpg_handle_t " handle ", unsigned int *" local_nodeid ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_mcast_joined.3

@@ -31,12 +31,12 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_MCAST_JOINED 3 3004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_MCAST_JOINED 3 3004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_mcast_joined \- Multicasts to all groups joined to a handle
 .SH SYNOPSIS
 .B #include <sys/uio.h>
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_mcast_joined(cpg_handle_t " handle ", cpg_gurantee_t " guarantee ", struct iovec *" iovec ", int " iov_len ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_membership_get.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_MEMBERSHIP_GET 3 2006-02-06 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_MEMBERSHIP_GET 3 2006-02-06 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 cpg_membership_get \- Returns a list of members of a CPG library group
 .SH SYNOPSIS
-.B #include <corosync/cpg.h>
+.B #include <openais/cpg.h>
 .sp
 .BI "int cpg_membership_get(cpg_handle_t " handle ", struct cpg_name *" groupName ", struct cpg_address *" member_list ", int *" member_list_entries ");
 .SH DESCRIPTION

+ 2 - 2
man/cpg_overview.8

@@ -31,9 +31,9 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH CPG_OVERVIEW 8 2006-03-06 "corosync Man Page" "Openais Programmer's Manual"
+.TH CPG_OVERVIEW 8 2006-03-06 "openais Man Page" "Openais Programmer's Manual"
 .SH OVERVIEW
-The CPG library is delivered with the corosync project.  This library is used
+The CPG library is delivered with the openais project.  This library is used
 to create distributed applications that operate properly during partitions, merges,
 and faults.
 .PP

+ 2 - 2
man/evs_dispatch.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH EVS_DISPATCH 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH EVS_DISPATCH 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 evs_dispatch \- Dispatches callbacks from the EVS service
 .SH SYNOPSIS
-.B #include <corosync/evs.h>
+.B #include <openais/evs.h>
 .sp
 .BI "int evs_dispatch(evs_handle_t " handle ", evs_dispatch_t *" dispatch_types ");
 .SH DESCRIPTION

+ 2 - 2
man/evs_fd_get.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH EVS_FD_GET 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH EVS_FD_GET 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 evs_fd_get \- Dispatches callbacks from the EVS service
 .SH SYNOPSIS
-.B #include <corosync/evs.h>
+.B #include <openais/evs.h>
 .sp
 .BI "int evs_fd_get(evs_handle_t " handle ", int *" fd ");
 .SH DESCRIPTION

+ 2 - 2
man/evs_finalize.3

@@ -31,11 +31,11 @@
 .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 .\" * THE POSSIBILITY OF SUCH DAMAGE.
 .\" */
-.TH EVS_FINALIZE 3 2004-08-31 "corosync Man Page" "Openais Programmer's Manual"
+.TH EVS_FINALIZE 3 2004-08-31 "openais Man Page" "Openais Programmer's Manual"
 .SH NAME
 evs_finalize \- Terminate a connection to the EVS service
 .SH SYNOPSIS
-.B #include <corosync/evs.h>
+.B #include <openais/evs.h>
 .sp
 .BI "int evs_finalize(evs_handle_t " handle ");
 .SH DESCRIPTION

Неке датотеке нису приказане због велике количине промена