public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Christine Caulfield <chrissie@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: master - cman: Remove the internal get_node_addrs function Date: Wed, 28 Jan 2009 16:11:00 -0000 [thread overview] Message-ID: <20090128161049.26FC812055D@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f5a52a313cb97f76015dc09347e74f05d5509f0b Commit: f5a52a313cb97f76015dc09347e74f05d5509f0b Parent: 14339c5ff2c3e435f0b8ea02007f71b9970a0f01 Author: Christine Caulfield <ccaulfie@redhat.com> AuthorDate: Wed Jan 28 16:10:01 2009 +0000 Committer: Christine Caulfield <ccaulfie@redhat.com> CommitterDate: Wed Jan 28 16:10:01 2009 +0000 cman: Remove the internal get_node_addrs function CFG has this service now. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> --- cman/services/cman/include/corosync/ipc_cman.h | 18 +--------- cman/services/cman/services/cman.c | 40 ------------------------ 2 files changed, 2 insertions(+), 56 deletions(-) diff --git a/cman/services/cman/include/corosync/ipc_cman.h b/cman/services/cman/include/corosync/ipc_cman.h index 5946987..40ab128 100644 --- a/cman/services/cman/include/corosync/ipc_cman.h +++ b/cman/services/cman/include/corosync/ipc_cman.h @@ -11,16 +11,14 @@ enum req_cman_types { MESSAGE_REQ_CMAN_SENDMSG = 0, MESSAGE_REQ_CMAN_IS_LISTENING, MESSAGE_REQ_CMAN_BIND, - MESSAGE_REQ_CMAN_UNBIND, - MESSAGE_REQ_CMAN_GET_NODE_ADDRS, + MESSAGE_REQ_CMAN_UNBIND }; enum res_cman_types { MESSAGE_RES_CMAN_SENDMSG = 0, MESSAGE_RES_CMAN_IS_LISTENING, MESSAGE_RES_CMAN_BIND, - MESSAGE_RES_CMAN_UNBIND, - MESSAGE_RES_CMAN_GET_NODE_ADDRS, + MESSAGE_RES_CMAN_UNBIND }; #define TOTEMIP_ADDRLEN (sizeof(struct in6_addr)) @@ -57,17 +55,5 @@ struct res_lib_cman_is_listening { unsigned int status; }; -struct req_lib_cman_get_node_addrs { - mar_req_header_t header __attribute__((aligned(8))); - unsigned int nodeid; -}; - -struct res_lib_cman_get_node_addrs { - mar_res_header_t header __attribute__((aligned(8))); - unsigned int family; - unsigned int num_addrs; - char addrs[TOTEMIP_ADDRLEN][0]; -}; - #endif diff --git a/cman/services/cman/services/cman.c b/cman/services/cman/services/cman.c index c5e081b..fe61bc7 100644 --- a/cman/services/cman/services/cman.c +++ b/cman/services/cman/services/cman.c @@ -110,7 +110,6 @@ static void message_handler_req_lib_cman_is_listening (void *conn, void *msg); static void message_handler_req_lib_cman_sendmsg (void *conn, void *msg); static void message_handler_req_lib_cman_unbind (void *conn, void *msg); static void message_handler_req_lib_cman_bind (void *conn, void *msg); -static void message_handler_req_lib_cman_get_node_addrs (void *conn, void *msg); /* * Library Handler Definition @@ -140,12 +139,6 @@ static struct corosync_lib_handler cman_lib_service[] = .response_size = sizeof (mar_res_header_t), .response_id = MESSAGE_RES_CMAN_UNBIND, .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED - }, - { /* 4 */ - .lib_handler_fn = message_handler_req_lib_cman_get_node_addrs, - .response_size = sizeof (mar_res_header_t), - .response_id = MESSAGE_RES_CMAN_GET_NODE_ADDRS, - .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED } }; @@ -578,36 +571,3 @@ static void message_handler_req_lib_cman_is_listening (void *conn, void *msg) res_lib_cman_is_listening.header.error = error; corosync_api->ipc_conn_send_response(conn, &res_lib_cman_is_listening, sizeof(res_lib_cman_is_listening)); } - - -static void message_handler_req_lib_cman_get_node_addrs (void *conn, void *msg) -{ - struct totem_ip_address node_ifs[MAX_INTERFACES]; - char buf[PIPE_BUF]; - char **status; - unsigned int num_interfaces = 0; - int ret = 0; - int i; - struct req_lib_cman_get_node_addrs *req_lib_cman_get_node_addrs = (struct req_lib_cman_get_node_addrs *)msg; - struct res_lib_cman_get_node_addrs *res_lib_cman_get_node_addrs = (struct res_lib_cman_get_node_addrs *)buf; - - if (req_lib_cman_get_node_addrs->nodeid == 0) - req_lib_cman_get_node_addrs->nodeid = our_node.nodeid; - - corosync_api->totem_ifaces_get(req_lib_cman_get_node_addrs->nodeid, node_ifs, &status, &num_interfaces); - - res_lib_cman_get_node_addrs->header.size = sizeof(struct res_lib_cman_get_node_addrs) + (num_interfaces * TOTEMIP_ADDRLEN); - res_lib_cman_get_node_addrs->header.id = MESSAGE_RES_CMAN_GET_NODE_ADDRS; - res_lib_cman_get_node_addrs->header.error = ret; - res_lib_cman_get_node_addrs->num_addrs = num_interfaces; - if (num_interfaces) { - res_lib_cman_get_node_addrs->family = node_ifs[0].family; - for (i = 0; i<num_interfaces; i++) { - memcpy(&res_lib_cman_get_node_addrs->addrs[i][0], node_ifs[i].addr, TOTEMIP_ADDRLEN); - } - } - else { - res_lib_cman_get_node_addrs->header.error = EINVAL; - } - corosync_api->ipc_conn_send_response(conn, res_lib_cman_get_node_addrs, res_lib_cman_get_node_addrs->header.size); -}
reply other threads:[~2009-01-28 16:11 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090128161049.26FC812055D@lists.fedorahosted.org \ --to=chrissie@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).