/linux-4.4.14/net/tipc/ |
H A D | name_distr.c | 115 struct sk_buff *tipc_named_publish(struct net *net, struct publication *publ) tipc_named_publish() argument 121 list_add_tail_rcu(&publ->local_list, tipc_named_publish() 122 &tn->nametbl->publ_list[publ->scope]); tipc_named_publish() 124 if (publ->scope == TIPC_NODE_SCOPE) tipc_named_publish() 134 publ_to_item(item, publ); tipc_named_publish() 141 struct sk_buff *tipc_named_withdraw(struct net *net, struct publication *publ) tipc_named_withdraw() argument 146 list_del(&publ->local_list); tipc_named_withdraw() 148 if (publ->scope == TIPC_NODE_SCOPE) tipc_named_withdraw() 158 publ_to_item(item, publ); tipc_named_withdraw() 171 struct publication *publ; named_distribute() local 178 list_for_each_entry(publ, pls, local_list) { list_for_each_entry() 191 publ_to_item(item, publ); list_for_each_entry() 229 static void tipc_publ_subscribe(struct net *net, struct publication *publ, tipc_publ_subscribe() argument 245 list_add_tail(&publ->nodesub_list, &node->publ_list); tipc_publ_subscribe() 250 static void tipc_publ_unsubscribe(struct net *net, struct publication *publ, tipc_publ_unsubscribe() argument 260 list_del_init(&publ->nodesub_list); tipc_publ_unsubscribe() 271 static void tipc_publ_purge(struct net *net, struct publication *publ, u32 addr) tipc_publ_purge() argument 277 p = tipc_nametbl_remove_publ(net, publ->type, publ->lower, tipc_publ_purge() 278 publ->node, publ->ref, publ->key); tipc_publ_purge() 283 if (p != publ) { tipc_publ_purge() 286 publ->type, publ->lower, publ->node, publ->ref, tipc_publ_purge() 287 publ->key); tipc_publ_purge() 295 struct publication *publ, *tmp; tipc_publ_notify() local 297 list_for_each_entry_safe(publ, tmp, nsub_list, nodesub_list) tipc_publ_notify() 298 tipc_publ_purge(net, publ, addr); tipc_publ_notify() 311 struct publication *publ = NULL; tipc_update_nametbl() local 314 publ = tipc_nametbl_insert_publ(net, ntohl(i->type), tipc_update_nametbl() 319 if (publ) { tipc_update_nametbl() 320 tipc_publ_subscribe(net, publ, node); tipc_update_nametbl() 324 publ = tipc_nametbl_remove_publ(net, ntohl(i->type), tipc_update_nametbl() 328 if (publ) { tipc_update_nametbl() 329 tipc_publ_unsubscribe(net, publ, node); tipc_update_nametbl() 330 kfree_rcu(publ, rcu); tipc_update_nametbl() 426 struct publication *publ; tipc_named_reinit() local 432 list_for_each_entry_rcu(publ, &tn->nametbl->publ_list[scope], tipc_named_reinit() 434 publ->node = tn->own_addr; tipc_named_reinit()
|
H A D | name_table.c | 124 struct publication *publ = kzalloc(sizeof(*publ), GFP_ATOMIC); publ_create() local 125 if (publ == NULL) { publ_create() 130 publ->type = type; publ_create() 131 publ->lower = lower; publ_create() 132 publ->upper = upper; publ_create() 133 publ->scope = scope; publ_create() 134 publ->node = node; publ_create() 135 publ->ref = port_ref; publ_create() 136 publ->key = key; publ_create() 137 INIT_LIST_HEAD(&publ->pport_list); publ_create() 138 return publ; publ_create() 240 struct publication *publ; tipc_nameseq_insert_publ() local 256 list_for_each_entry(publ, &info->zone_list, zone_list) { tipc_nameseq_insert_publ() 257 if ((publ->ref == port) && (publ->key == key) && tipc_nameseq_insert_publ() 258 (!publ->node || (publ->node == node))) tipc_nameseq_insert_publ() 314 publ = publ_create(type, lower, upper, scope, node, port, key); tipc_nameseq_insert_publ() 315 if (!publ) tipc_nameseq_insert_publ() 318 list_add(&publ->zone_list, &info->zone_list); tipc_nameseq_insert_publ() 322 list_add(&publ->cluster_list, &info->cluster_list); tipc_nameseq_insert_publ() 327 list_add(&publ->node_list, &info->node_list); tipc_nameseq_insert_publ() 333 tipc_subscrp_report_overlap(s, publ->lower, publ->upper, tipc_nameseq_insert_publ() 334 TIPC_PUBLISHED, publ->ref, tipc_nameseq_insert_publ() 335 publ->node, created_subseq); tipc_nameseq_insert_publ() 337 return publ; tipc_nameseq_insert_publ() 356 struct publication *publ; tipc_nameseq_remove_publ() local 369 list_for_each_entry(publ, &info->zone_list, zone_list) { tipc_nameseq_remove_publ() 370 if ((publ->key == key) && (publ->ref == ref) && tipc_nameseq_remove_publ() 371 (!publ->node || (publ->node == node))) tipc_nameseq_remove_publ() 378 list_del(&publ->zone_list); tipc_nameseq_remove_publ() 383 list_del(&publ->cluster_list); tipc_nameseq_remove_publ() 389 list_del(&publ->node_list); tipc_nameseq_remove_publ() 403 tipc_subscrp_report_overlap(s, publ->lower, publ->upper, tipc_nameseq_remove_publ() 404 TIPC_WITHDRAWN, publ->ref, tipc_nameseq_remove_publ() 405 publ->node, removed_subseq); tipc_nameseq_remove_publ() 408 return publ; tipc_nameseq_remove_publ() 465 struct publication *publ; tipc_nametbl_insert_publ() local 482 publ = tipc_nameseq_insert_publ(net, seq, type, lower, upper, tipc_nametbl_insert_publ() 485 return publ; tipc_nametbl_insert_publ() 492 struct publication *publ; tipc_nametbl_remove_publ() local 499 publ = tipc_nameseq_remove_publ(net, seq, lower, node, ref, key); tipc_nametbl_remove_publ() 505 return publ; tipc_nametbl_remove_publ() 508 return publ; tipc_nametbl_remove_publ() 530 struct publication *publ; tipc_nametbl_translate() local 551 publ = list_first_entry(&info->node_list, tipc_nametbl_translate() 554 list_move_tail(&publ->node_list, tipc_nametbl_translate() 557 publ = list_first_entry(&info->cluster_list, tipc_nametbl_translate() 560 list_move_tail(&publ->cluster_list, tipc_nametbl_translate() 563 publ = list_first_entry(&info->zone_list, tipc_nametbl_translate() 566 list_move_tail(&publ->zone_list, tipc_nametbl_translate() 575 publ = list_first_entry(&info->node_list, struct publication, tipc_nametbl_translate() 577 list_move_tail(&publ->node_list, &info->node_list); tipc_nametbl_translate() 581 publ = list_first_entry(&info->cluster_list, struct publication, tipc_nametbl_translate() 583 list_move_tail(&publ->cluster_list, &info->cluster_list); tipc_nametbl_translate() 585 publ = list_first_entry(&info->zone_list, struct publication, tipc_nametbl_translate() 587 list_move_tail(&publ->zone_list, &info->zone_list); tipc_nametbl_translate() 590 ref = publ->ref; tipc_nametbl_translate() 591 node = publ->node; tipc_nametbl_translate() 630 struct publication *publ; tipc_nametbl_mc_translate() local 636 list_for_each_entry(publ, &info->node_list, node_list) { tipc_nametbl_mc_translate() 637 if (publ->scope <= limit) tipc_nametbl_mc_translate() 638 tipc_plist_push(dports, publ->ref); tipc_nametbl_mc_translate() 657 struct publication *publ; tipc_nametbl_publish() local 669 publ = tipc_nametbl_insert_publ(net, type, lower, upper, scope, tipc_nametbl_publish() 671 if (likely(publ)) { tipc_nametbl_publish() 673 buf = tipc_named_publish(net, publ); tipc_nametbl_publish() 681 return publ; tipc_nametbl_publish() 690 struct publication *publ; tipc_nametbl_withdraw() local 695 publ = tipc_nametbl_remove_publ(net, type, lower, tn->own_addr, tipc_nametbl_withdraw() 697 if (likely(publ)) { tipc_nametbl_withdraw() 699 skb = tipc_named_withdraw(net, publ); tipc_nametbl_withdraw() 702 list_del_init(&publ->pport_list); tipc_nametbl_withdraw() 703 kfree_rcu(publ, rcu); tipc_nametbl_withdraw() 796 struct publication *publ, *safe; tipc_purge_publications() local 803 list_for_each_entry_safe(publ, safe, &info->zone_list, zone_list) { tipc_purge_publications() 804 tipc_nameseq_remove_publ(net, seq, publ->lower, publ->node, tipc_purge_publications() 805 publ->ref, publ->key); tipc_purge_publications() 806 kfree_rcu(publ, rcu); tipc_purge_publications() 848 struct nlattr *publ; __tipc_nl_add_nametable_publ() local 875 publ = nla_nest_start(msg->skb, TIPC_NLA_NAME_TABLE_PUBL); __tipc_nl_add_nametable_publ() 876 if (!publ) __tipc_nl_add_nametable_publ() 894 nla_nest_end(msg->skb, publ); __tipc_nl_add_nametable_publ() 903 nla_nest_cancel(msg->skb, publ); __tipc_nl_add_nametable_publ()
|
H A D | name_distr.h | 70 struct sk_buff *tipc_named_publish(struct net *net, struct publication *publ); 71 struct sk_buff *tipc_named_withdraw(struct net *net, struct publication *publ);
|
H A D | netlink_compat.c | 757 struct nlattr *publ[TIPC_NLA_PUBL_MAX + 1]; tipc_nl_compat_name_table_dump() local 765 nla_parse_nested(publ, TIPC_NLA_PUBL_MAX, nt[TIPC_NLA_NAME_TABLE_PUBL], tipc_nl_compat_name_table_dump() 776 (type != nla_get_u32(publ[TIPC_NLA_PUBL_TYPE]))) tipc_nl_compat_name_table_dump() 778 if (lowbound && (lowbound > nla_get_u32(publ[TIPC_NLA_PUBL_UPPER]))) tipc_nl_compat_name_table_dump() 780 if (upbound && (upbound < nla_get_u32(publ[TIPC_NLA_PUBL_LOWER]))) tipc_nl_compat_name_table_dump() 784 nla_get_u32(publ[TIPC_NLA_PUBL_TYPE])); tipc_nl_compat_name_table_dump() 790 nla_get_u32(publ[TIPC_NLA_PUBL_LOWER]), tipc_nl_compat_name_table_dump() 791 nla_get_u32(publ[TIPC_NLA_PUBL_UPPER])); tipc_nl_compat_name_table_dump() 796 node = nla_get_u32(publ[TIPC_NLA_PUBL_NODE]); tipc_nl_compat_name_table_dump() 798 tipc_node(node), nla_get_u32(publ[TIPC_NLA_PUBL_REF])); tipc_nl_compat_name_table_dump() 805 nla_get_u32(publ[TIPC_NLA_PUBL_KEY]), tipc_nl_compat_name_table_dump() 806 scope_str[nla_get_u32(publ[TIPC_NLA_PUBL_SCOPE])]); tipc_nl_compat_name_table_dump() 817 struct nlattr *publ[TIPC_NLA_PUBL_MAX + 1]; __tipc_nl_compat_publ_dump() local 819 nla_parse_nested(publ, TIPC_NLA_PUBL_MAX, attrs[TIPC_NLA_PUBL], NULL); __tipc_nl_compat_publ_dump() 821 type = nla_get_u32(publ[TIPC_NLA_PUBL_TYPE]); __tipc_nl_compat_publ_dump() 822 lower = nla_get_u32(publ[TIPC_NLA_PUBL_LOWER]); __tipc_nl_compat_publ_dump() 823 upper = nla_get_u32(publ[TIPC_NLA_PUBL_UPPER]); __tipc_nl_compat_publ_dump()
|
H A D | socket.c | 2185 struct publication *publ; tipc_sk_publish() local 2194 publ = tipc_nametbl_publish(net, seq->type, seq->lower, seq->upper, tipc_sk_publish() 2196 if (unlikely(!publ)) tipc_sk_publish() 2199 list_add(&publ->pport_list, &tsk->publications); tipc_sk_publish() 2209 struct publication *publ; tipc_sk_withdraw() local 2213 list_for_each_entry_safe(publ, safe, &tsk->publications, pport_list) { tipc_sk_withdraw() 2215 if (publ->scope != scope) tipc_sk_withdraw() 2217 if (publ->type != seq->type) tipc_sk_withdraw() 2219 if (publ->lower != seq->lower) tipc_sk_withdraw() 2221 if (publ->upper != seq->upper) tipc_sk_withdraw() 2223 tipc_nametbl_withdraw(net, publ->type, publ->lower, tipc_sk_withdraw() 2224 publ->ref, publ->key); tipc_sk_withdraw() 2228 tipc_nametbl_withdraw(net, publ->type, publ->lower, tipc_sk_withdraw() 2229 publ->ref, publ->key); tipc_sk_withdraw() 2723 struct publication *publ) __tipc_nl_add_sk_publ() 2737 if (nla_put_u32(skb, TIPC_NLA_PUBL_KEY, publ->key)) __tipc_nl_add_sk_publ() 2739 if (nla_put_u32(skb, TIPC_NLA_PUBL_TYPE, publ->type)) __tipc_nl_add_sk_publ() 2741 if (nla_put_u32(skb, TIPC_NLA_PUBL_LOWER, publ->lower)) __tipc_nl_add_sk_publ() 2743 if (nla_put_u32(skb, TIPC_NLA_PUBL_UPPER, publ->upper)) __tipc_nl_add_sk_publ() 2721 __tipc_nl_add_sk_publ(struct sk_buff *skb, struct netlink_callback *cb, struct publication *publ) __tipc_nl_add_sk_publ() argument
|