cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/cman/lib libcman.h
@ 2006-09-01  8:36 pcaulfield
  0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2006-09-01  8:36 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	pcaulfield at sourceware.org	2006-09-01 08:36:16

Modified files:
	cman/lib       : libcman.h 

Log message:
	rename 'private' to 'privdata' so that it doesn't upset c++

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.h.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2.2.4&r2=1.2.2.5

--- cluster/cman/lib/libcman.h	2006/04/26 08:54:33	1.2.2.4
+++ cluster/cman/lib/libcman.h	2006/09/01 08:36:16	1.2.2.5
@@ -81,22 +81,22 @@
 } cman_cluster_t;
 
 /* Callback routine for a membership event */
-typedef void (*cman_callback_t)(cman_handle_t handle, void *private, int reason, int arg);
+typedef void (*cman_callback_t)(cman_handle_t handle, void *privdata, int reason, int arg);
 
 /* Callback routine for data received */
-typedef void (*cman_datacallback_t)(cman_handle_t handle, void *private,
+typedef void (*cman_datacallback_t)(cman_handle_t handle, void *privdata,
 				    char *buf, int len, uint8_t port, int nodeid);
 
 
 /* cman_init    returns the handle you need to pass to the other API calls,
    cman_finish  destroys that handle
 */
-cman_handle_t cman_init(void *private);
+cman_handle_t cman_init(void *privdata);
 int cman_finish(cman_handle_t handle);
 
 /* Update/retrieve private data */
-int cman_set_private(cman_handle_t *h, void *private);
-int cman_get_private(cman_handle_t *h, void **private);
+int cman_set_private(cman_handle_t *h, void *privdata);
+int cman_get_private(cman_handle_t *h, void **privdata);
 
 /* Notification of membership change events. NOte that these are sent after
    a transition so multiple nodes may have left the cluster (but a maximum of



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/cman/lib libcman.h
@ 2007-12-11 10:48 pcaulfield
  0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2007-12-11 10:48 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield at sourceware.org	2007-12-11 10:48:02

Modified files:
	cman/lib       : libcman.h 

Log message:
	Tidy comments

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.h.diff?cvsroot=cluster&r1=1.38&r2=1.39

--- cluster/cman/lib/libcman.h	2007/12/05 14:28:58	1.38
+++ cluster/cman/lib/libcman.h	2007/12/11 10:48:01	1.39
@@ -50,7 +50,8 @@
 #define CMAN_NODEID_ALL 0
 
 /*
- * Hang onto this, it's your key into the library. get one from cman_init() or cman_admin_init()
+ * Hang onto this, it's your key into the library. get one from cman_init() or
+ * cman_admin_init()
  */
 typedef void *cman_handle_t;
 
@@ -58,11 +59,12 @@
  * Reasons we get an event callback.
  * PORTOPENED & TRY_SHUTDOWN only exist when LIBCMAN_VERSION >= 2
  *
- * The 'arg' parameter varies dependng on the callback type.
+ * The 'arg' parameter varies depending on the callback type.
  * for PORTCLOSED/PORTOPENED  arg == the port opened/closed
  * for STATECHANGE            arg should be ignored
- * for TRY_SHUTDOWN           arg == 1 for ANYWAY, otherwise 0 (ie if arg == 1 then cman WILL shutdown regardless
- *                            of your reponse, think of this as advance warning)
+ * for TRY_SHUTDOWN           arg == 1 for ANYWAY, otherwise 0 (ie if arg == 1 
+ * 			      then cman WILL shutdown regardless
+ *                            of your response, think of this as advance warning)
  */
 typedef enum {CMAN_REASON_PORTCLOSED,
 	      CMAN_REASON_STATECHANGE,
@@ -78,7 +80,8 @@
 
 /*
  * Flags for cman_shutdown
- *    ANYWAY   -  cman will shutdown regardless of clients' responses (but they will still get told)
+ *    ANYWAY   -  cman will shutdown regardless of clients' responses (but they
+ *    		   will still get told)
  *    REMOVED  -  the rest of the cluster will adjust quorum to stay quorate
  */
 #define CMAN_SHUTDOWN_ANYWAY   1
@@ -87,8 +90,10 @@
 /*
  * Flags passed to cman_dispatch():
  * CMAN_DISPATCH_ONE dispatches a single message then returns,
- * CMAN_DISPATCH_ALL dispatches all outstanding messages (ie till EAGAIN) then returns,
- * CMAN_DISPATCH_BLOCKING forces it to wait for a message (cleans MSG_DONTWAIT in recvmsg)
+ * CMAN_DISPATCH_ALL dispatches all outstanding messages (ie till EAGAIN) then 
+ *                   returns,
+ * CMAN_DISPATCH_BLOCKING forces it to wait for a message (clears MSG_DONTWAIT 
+ * 			  in recvmsg)
  * CMAN_DISPATCH_IGNORE_* allows the caller to select which messages to process.
  */
 #define CMAN_DISPATCH_ONE           0
@@ -240,42 +245,47 @@
 
 /*
  * Get the internal CMAN fd so you can pass it into poll() or select().
- * When it's active then call cman_dispatch() on the handle to process the event.
+ * When it's active then call cman_dispatch() on the handle to process the event
  * NOTE: This fd can change between calls to cman_dispatch() so always call this
  * routine to get the latest one. (This is mainly due to message caching).
- * One upshot of this is that you must never read or write this FD (it may on occasion
- * point to /dev/zero if you have messages cached!)
+ * One upshot of this is that you must never read or write this FD (it may on 
+ * occasion point to /dev/zero if you have messages cached!)
  */
 int cman_get_fd(cman_handle_t handle);
 
 /*
  * cman_dispatch() will return -1 with errno == EHOSTDOWN if the cluster is
- * shut down, 0 if nothing was read, or a positive number if something was dispatched.
+ * shut down, 0 if nothing was read, or a positive number if something was 
+ * dispatched.
  */
 
 int cman_dispatch(cman_handle_t handle, int flags);
 
 
 /*
- * ----------------------------------------------------------------------------------------
+ * -----------------------------------------------------------------------------
  * Get info calls.
  */
 
 /* Return the number of nodes we know about. This will normally
-   be the number of nodes in CCS */
+ *  be the number of nodes in CCS 
+ */
 int cman_get_node_count(cman_handle_t handle);
 
-/* Returns the number of connected clients. This isn't as useful as a it used to be
-   as a count >1 does not automatically mean cman won't shut down. Subsystems
-   can decide for themselves whether a clean shutdown is possible. */
+/* Returns the number of connected clients. This isn't as useful as a it used to
+ * be as a count >1 does not automatically mean cman won't shut down. Subsystems
+ * can decide for themselves whether a clean shutdown is possible. 
+ */
 int cman_get_subsys_count(cman_handle_t handle);
 
 /* Returns an array of node info structures. Call cman_get_node_count() first
-   to determine how big your array needs to be */
+ * to determine how big your array needs to be 
+ */
 int cman_get_nodes(cman_handle_t handle, int maxnodes, int *retnodes, cman_node_t *nodes);
 
-/* Returns a list of nodes that are known to AIS but blocked from joining the CMAN
-   cluster because they rejoined with cluster without a cman_tool join */
+/* Returns a list of nodes that are known to AIS but blocked from joining the
+ * CMAN cluster because they rejoined with cluster without a cman_tool join 
+ */
 int cman_get_disallowed_nodes(cman_handle_t handle, int maxnodes, int *retnodes, cman_node_t *nodes);
 
 /*
@@ -289,14 +299,14 @@
 
 /* cman_get_node() only returns the first address of a node (whatever /that/
  * may mean). If you want to know all of them you need to call this.
- * max_addrs is the size of the 'addrs' array. num_addrs will be filled in by the
- * number of addresses the node has, regardless of the size of max_addrs. So if you
- * don't allocate enough space for the first call, you should know how much is needed
- * for a second!
+ * max_addrs is the size of the 'addrs' array. num_addrs will be filled in by 
+ * the number of addresses the node has, regardless of the size of max_addrs. 
+ * So if you don't allocate enough space for the first call, you should know how
+ * much is needed for a second!
  */
 int cman_get_node_addrs(cman_handle_t handle, int nodeid, int max_addrs, int *num_addrs, struct cman_node_address *addrs);
 
-/* Returns 1 if cman has completed initaialisation and aisexec is running */
+/* Returns 1 if cman has completed initialisation and aisexec is running */
 int cman_is_active(cman_handle_t handle);
 
 /*
@@ -328,13 +338,14 @@
 int cman_get_extra_info(cman_handle_t handle, cman_extra_info_t *info, int maxlen);
 
 /*
- * ----------------------------------------------------------------------------------------
- * Admin functions. You will need privileges and have a handle created by cman_admin_init()
- * to use them.
+ * -----------------------------------------------------------------------------
+ * Admin functions. You will need privileges and have a handle created by 
+ * cman_admin_init() to use them.
  */
 
-/* Change the config file version. This should be needed much less now, as cman will
-   re-read the config file if a new node joins with a new config versoin */
+/* Change the config file version. This should be needed much less now, as 
+ * cman will re-read the config file if a new node joins with a new config 
+ * version */
 int cman_set_version(cman_handle_t handle, const cman_version_t *version);
 
 /* Deprecated in favour of cman_shutdown(). Use cman_tool anyway please. */
@@ -358,7 +369,7 @@
  * cman_shutdown() will send a REASON_TRY_SHUTDOWN event to all
  * clients registered for notifications. They should respond by calling
  * cman_replyto_shutdown() to indicate whether they will allow
- * cman to close down or not. If cman gets >=1 "no" (0) or the
+ * cman to close down or not. If cman gets >=1 "no" (0) replies or the
  * request times out (default 5 seconds) then shutdown will be
  * cancelled and cman_shutdown() will return -1 with errno == EBUSY.
  *
@@ -370,7 +381,7 @@
  */
 int cman_shutdown(cman_handle_t, int flags);
 
-/* ----------------------------------------------------------------------------------------
+/* -----------------------------------------------------------------------------
  * Data transmission API. Uses the same FD as the rest of the calls.
  * If the nodeid passed to cman_send_data() is zero then it will be
  * broadcast to all nodes in the cluster.



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/cman/lib libcman.h
@ 2007-08-28 13:30 pcaulfield
  0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2007-08-28 13:30 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield at sourceware.org	2007-08-28 13:30:23

Modified files:
	cman/lib       : libcman.h 

Log message:
	Fix spelling of DAEMON, sigh

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.h.diff?cvsroot=cluster&r1=1.33&r2=1.34

--- cluster/cman/lib/libcman.h	2007/08/28 13:14:10	1.33
+++ cluster/cman/lib/libcman.h	2007/08/28 13:30:23	1.34
@@ -405,7 +405,7 @@
 #define CMAN_DEBUGLOG_NONE       0
 #define CMAN_DEBUGLOG_BARRIER    2
 #define CMAN_DEBUGLOG_MEMBERSHIP 4
-#define CMAN_DEBUGLOG_DEAMON     8
+#define CMAN_DEBUGLOG_DAEMON     8
 #define CMAN_DEBUGLOG_AIS       16
 
 int cman_set_debuglog(cman_handle_t handle, int subsystems);



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/cman/lib libcman.h
@ 2007-08-22  7:09 pcaulfield
  0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2007-08-22  7:09 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield at sourceware.org	2007-08-22 07:09:45

Modified files:
	cman/lib       : libcman.h 

Log message:
	Document that cman_set_dirty() needs an admin socket.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.h.diff?cvsroot=cluster&r1=1.31&r2=1.32

--- cluster/cman/lib/libcman.h	2007/08/20 14:37:26	1.31
+++ cluster/cman/lib/libcman.h	2007/08/22 07:09:44	1.32
@@ -393,7 +393,7 @@
  * Sets the dirty bit inside cman. This indicates that the node has
  * some internal 'state' (eg in a daemon, filesystem or lock manager)
  * and cannot merge with another cluster that already has state.
- * This cannot be reset.
+ * This needs an admin socket. It cannot be reset. 
  */
 int cman_set_dirty(cman_handle_t handle);
 



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/cman/lib libcman.h
@ 2006-09-01  8:47 pcaulfield
  0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2006-09-01  8:47 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield at sourceware.org	2006-09-01 08:47:40

Modified files:
	cman/lib       : libcman.h 

Log message:
	Rename 'private' to 'privdata' so it doesn't upset C++

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.h.diff?cvsroot=cluster&r1=1.27&r2=1.28

--- cluster/cman/lib/libcman.h	2006/08/17 13:22:39	1.27
+++ cluster/cman/lib/libcman.h	2006/09/01 08:47:40	1.28
@@ -174,14 +174,14 @@
  */
 
 /* Callback routine for a membership event */
-typedef void (*cman_callback_t)(cman_handle_t handle, void *private, int reason, int arg);
+typedef void (*cman_callback_t)(cman_handle_t handle, void *privdata, int reason, int arg);
 
 /* Callback routine for data received */
-typedef void (*cman_datacallback_t)(cman_handle_t handle, void *private,
+typedef void (*cman_datacallback_t)(cman_handle_t handle, void *privdata,
 				    char *buf, int len, uint8_t port, int nodeid);
 
 
-typedef void (*cman_confchgcallback_t)(cman_handle_t handle, void *private,
+typedef void (*cman_confchgcallback_t)(cman_handle_t handle, void *privdata,
 				       unsigned int *member_list, int member_list_entries,
 				       unsigned int *left_list, int left_list_entries,
 				       unsigned int *joined_list, int joined_list_entries);
@@ -193,13 +193,13 @@
  *
  * Note that admin sockets can't send data messages or receive callbacks.
  */
-cman_handle_t cman_init(void *private);
-cman_handle_t cman_admin_init(void *private);
+cman_handle_t cman_init(void *privdata);
+cman_handle_t cman_admin_init(void *privdata);
 int cman_finish(cman_handle_t handle);
 
 /* Update/retrieve the private data */
-int cman_set_private(cman_handle_t *h, void *private);
-int cman_get_private(cman_handle_t *h, void **private);
+int cman_set_private(cman_handle_t *h, void *privdata);
+int cman_get_private(cman_handle_t *h, void **privdata);
 
 /*
  * Notification of membership change events. Note that these are sent after



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/cman/lib libcman.h
@ 2006-09-01  8:37 pcaulfield
  0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2006-09-01  8:37 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	STABLE
Changes by:	pcaulfield at sourceware.org	2006-09-01 08:37:10

Modified files:
	cman/lib       : libcman.h 

Log message:
	Rename 'private' to 'privdata' so it doesn't upset c++

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.h.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.6.1.2.5&r2=1.2.6.1.2.6

--- cluster/cman/lib/libcman.h	2006/04/26 08:55:26	1.2.6.1.2.5
+++ cluster/cman/lib/libcman.h	2006/09/01 08:37:10	1.2.6.1.2.6
@@ -81,22 +81,22 @@
 } cman_cluster_t;
 
 /* Callback routine for a membership event */
-typedef void (*cman_callback_t)(cman_handle_t handle, void *private, int reason, int arg);
+typedef void (*cman_callback_t)(cman_handle_t handle, void *privdata, int reason, int arg);
 
 /* Callback routine for data received */
-typedef void (*cman_datacallback_t)(cman_handle_t handle, void *private,
+typedef void (*cman_datacallback_t)(cman_handle_t handle, void *privdata,
 				    char *buf, int len, uint8_t port, int nodeid);
 
 
 /* cman_init    returns the handle you need to pass to the other API calls,
    cman_finish  destroys that handle
 */
-cman_handle_t cman_init(void *private);
+cman_handle_t cman_init(void *privdata);
 int cman_finish(cman_handle_t handle);
 
 /* Update/retrieve private data */
-int cman_set_private(cman_handle_t *h, void *private);
-int cman_get_private(cman_handle_t *h, void **private);
+int cman_set_private(cman_handle_t *h, void *privdata);
+int cman_get_private(cman_handle_t *h, void **privdata);
 
 /* Notification of membership change events. NOte that these are sent after
    a transition so multiple nodes may have left the cluster (but a maximum of



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Cluster-devel] cluster/cman/lib libcman.h
@ 2006-06-20 15:27 pcaulfield
  0 siblings, 0 replies; 7+ messages in thread
From: pcaulfield @ 2006-06-20 15:27 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	pcaulfield at sourceware.org	2006-06-20 15:27:04

Modified files:
	cman/lib       : libcman.h 

Log message:
	Make it clear that admin sockets can't receive callbacks either.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/lib/libcman.h.diff?cvsroot=cluster&r1=1.24&r2=1.25

--- cluster/cman/lib/libcman.h	2006/05/25 08:12:40	1.24
+++ cluster/cman/lib/libcman.h	2006/06/20 15:27:04	1.25
@@ -185,7 +185,7 @@
  * cman_admin_init  opens admin socket for privileged operations.
  * cman_finish      destroys that handle.
  *
- * Note that admin sockets can't send data messages.
+ * Note that admin sockets can't send data messages or receive callbacks.
  */
 cman_handle_t cman_init(void *private);
 cman_handle_t cman_admin_init(void *private);



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-12-11 10:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-01  8:36 [Cluster-devel] cluster/cman/lib libcman.h pcaulfield
  -- strict thread matches above, loose matches on Subject: below --
2007-12-11 10:48 pcaulfield
2007-08-28 13:30 pcaulfield
2007-08-22  7:09 pcaulfield
2006-09-01  8:47 pcaulfield
2006-09-01  8:37 pcaulfield
2006-06-20 15:27 pcaulfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).