diff options
Diffstat (limited to 'net/tipc/name_distr.c')
-rw-r--r-- | net/tipc/name_distr.c | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c index 41cbaf1..830f909 100644 --- a/net/tipc/name_distr.c +++ b/net/tipc/name_distr.c @@ -114,10 +114,10 @@ static struct sk_buff *named_prepare_buf(u32 type, u32 size, u32 dest) } /** - * named_publish - tell other nodes about a new publication by this node + * tipc_named_publish - tell other nodes about a new publication by this node */ -void named_publish(struct publication *publ) +void tipc_named_publish(struct publication *publ) { struct sk_buff *buf; struct distr_item *item; @@ -133,15 +133,15 @@ void named_publish(struct publication *publ) item = (struct distr_item *)msg_data(buf_msg(buf)); publ_to_item(item, publ); - dbg("named_withdraw: broadcasting publish msg\n"); - cluster_broadcast(buf); + dbg("tipc_named_withdraw: broadcasting publish msg\n"); + tipc_cltr_broadcast(buf); } /** - * named_withdraw - tell other nodes about a withdrawn publication by this node + * tipc_named_withdraw - tell other nodes about a withdrawn publication by this node */ -void named_withdraw(struct publication *publ) +void tipc_named_withdraw(struct publication *publ) { struct sk_buff *buf; struct distr_item *item; @@ -157,15 +157,15 @@ void named_withdraw(struct publication *publ) item = (struct distr_item *)msg_data(buf_msg(buf)); publ_to_item(item, publ); - dbg("named_withdraw: broadcasting withdraw msg\n"); - cluster_broadcast(buf); + dbg("tipc_named_withdraw: broadcasting withdraw msg\n"); + tipc_cltr_broadcast(buf); } /** - * named_node_up - tell specified node about all publications by this node + * tipc_named_node_up - tell specified node about all publications by this node */ -void named_node_up(unsigned long node) +void tipc_named_node_up(unsigned long node) { struct publication *publ; struct distr_item *item = 0; @@ -175,7 +175,7 @@ void named_node_up(unsigned long node) u32 max_item_buf; assert(in_own_cluster(node)); - read_lock_bh(&nametbl_lock); + read_lock_bh(&tipc_nametbl_lock); max_item_buf = TIPC_MAX_USER_MSG_SIZE / ITEM_SIZE; max_item_buf *= ITEM_SIZE; rest = publ_cnt * ITEM_SIZE; @@ -196,15 +196,15 @@ void named_node_up(unsigned long node) left -= ITEM_SIZE; if (!left) { msg_set_link_selector(buf_msg(buf), node); - dbg("named_node_up: sending publish msg to " + dbg("tipc_named_node_up: sending publish msg to " "<%u.%u.%u>\n", tipc_zone(node), tipc_cluster(node), tipc_node(node)); - link_send(buf, node, node); + tipc_link_send(buf, node, node); buf = 0; } } exit: - read_unlock_bh(&nametbl_lock); + read_unlock_bh(&tipc_nametbl_lock); } /** @@ -221,73 +221,73 @@ exit: static void node_is_down(struct publication *publ) { struct publication *p; - write_lock_bh(&nametbl_lock); + write_lock_bh(&tipc_nametbl_lock); dbg("node_is_down: withdrawing %u, %u, %u\n", publ->type, publ->lower, publ->upper); publ->key += 1222345; - p = nametbl_remove_publ(publ->type, publ->lower, - publ->node, publ->ref, publ->key); + p = tipc_nametbl_remove_publ(publ->type, publ->lower, + publ->node, publ->ref, publ->key); assert(p == publ); - write_unlock_bh(&nametbl_lock); + write_unlock_bh(&tipc_nametbl_lock); if (publ) kfree(publ); } /** - * named_recv - process name table update message sent by another node + * tipc_named_recv - process name table update message sent by another node */ -void named_recv(struct sk_buff *buf) +void tipc_named_recv(struct sk_buff *buf) { struct publication *publ; struct tipc_msg *msg = buf_msg(buf); struct distr_item *item = (struct distr_item *)msg_data(msg); u32 count = msg_data_sz(msg) / ITEM_SIZE; - write_lock_bh(&nametbl_lock); + write_lock_bh(&tipc_nametbl_lock); while (count--) { if (msg_type(msg) == PUBLICATION) { - dbg("named_recv: got publication for %u, %u, %u\n", + dbg("tipc_named_recv: got publication for %u, %u, %u\n", ntohl(item->type), ntohl(item->lower), ntohl(item->upper)); - publ = nametbl_insert_publ(ntohl(item->type), - ntohl(item->lower), - ntohl(item->upper), - TIPC_CLUSTER_SCOPE, - msg_orignode(msg), - ntohl(item->ref), - ntohl(item->key)); + publ = tipc_nametbl_insert_publ(ntohl(item->type), + ntohl(item->lower), + ntohl(item->upper), + TIPC_CLUSTER_SCOPE, + msg_orignode(msg), + ntohl(item->ref), + ntohl(item->key)); if (publ) { - nodesub_subscribe(&publ->subscr, - msg_orignode(msg), - publ, - (net_ev_handler)node_is_down); + tipc_nodesub_subscribe(&publ->subscr, + msg_orignode(msg), + publ, + (net_ev_handler)node_is_down); } } else if (msg_type(msg) == WITHDRAWAL) { - dbg("named_recv: got withdrawl for %u, %u, %u\n", + dbg("tipc_named_recv: got withdrawl for %u, %u, %u\n", ntohl(item->type), ntohl(item->lower), ntohl(item->upper)); - publ = nametbl_remove_publ(ntohl(item->type), - ntohl(item->lower), - msg_orignode(msg), - ntohl(item->ref), - ntohl(item->key)); + publ = tipc_nametbl_remove_publ(ntohl(item->type), + ntohl(item->lower), + msg_orignode(msg), + ntohl(item->ref), + ntohl(item->key)); if (publ) { - nodesub_unsubscribe(&publ->subscr); + tipc_nodesub_unsubscribe(&publ->subscr); kfree(publ); } } else { - warn("named_recv: unknown msg\n"); + warn("tipc_named_recv: unknown msg\n"); } item++; } - write_unlock_bh(&nametbl_lock); + write_unlock_bh(&tipc_nametbl_lock); buf_discard(buf); } /** - * named_reinit - re-initialize local publication list + * tipc_named_reinit - re-initialize local publication list * * This routine is called whenever TIPC networking is (re)enabled. * All existing publications by this node that have "cluster" or "zone" scope @@ -295,15 +295,15 @@ void named_recv(struct sk_buff *buf) * (If the node's address is unchanged, the update loop terminates immediately.) */ -void named_reinit(void) +void tipc_named_reinit(void) { struct publication *publ; - write_lock_bh(&nametbl_lock); + write_lock_bh(&tipc_nametbl_lock); list_for_each_entry(publ, &publ_root, local_list) { if (publ->node == tipc_own_addr) break; publ->node = tipc_own_addr; } - write_unlock_bh(&nametbl_lock); + write_unlock_bh(&tipc_nametbl_lock); } |