Lines Matching +refs:port +refs:id +refs:attrs
186 static struct tipc_node *tipc_node_find_by_id(struct net *net, u8 *id);
191 u32 port; member
232 bool tipc_node_get_id(struct net *net, u32 addr, u8 *id) in tipc_node_get_id() argument
241 memcpy(id, own_id, TIPC_NODEID_LEN); in tipc_node_get_id()
248 memcpy(id, &n->peer_id, TIPC_NODEID_LEN); in tipc_node_get_id()
354 static struct tipc_node *tipc_node_find_by_id(struct net *net, u8 *id) in tipc_node_find_by_id() argument
363 if (!memcmp(id, n->peer_id, 16) && in tipc_node_find_by_id()
694 int tipc_node_add_conn(struct net *net, u32 dnode, u32 port, u32 peer_port) in tipc_node_add_conn() argument
714 conn->port = port; in tipc_node_add_conn()
725 void tipc_node_remove_conn(struct net *net, u32 dnode, u32 port) in tipc_node_remove_conn() argument
739 if (port != conn->port) in tipc_node_remove_conn()
1135 u32 tipc_node_try_addr(struct net *net, u8 *id, u32 addr) in tipc_node_try_addr() argument
1145 if (!memcmp(n->peer_id, id, NODE_ID_LEN)) in tipc_node_try_addr()
1154 n = tipc_node_find_by_id(net, id); in tipc_node_try_addr()
1550 conn->peer_node, conn->port, in node_lost_contact()
1599 struct nlattr *attrs; in __tipc_nl_add_node() local
1606 attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_NODE); in __tipc_nl_add_node()
1607 if (!attrs) in __tipc_nl_add_node()
1616 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_node()
1622 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_node()
2108 n = tipc_node_find_by_id(net, ehdr->id); in tipc_rcv()
2244 struct nlattr *attrs[TIPC_NLA_NET_MAX + 1]; in tipc_nl_peer_rm() local
2253 if (!info->attrs[TIPC_NLA_NET]) in tipc_nl_peer_rm()
2256 err = nla_parse_nested_deprecated(attrs, TIPC_NLA_NET_MAX, in tipc_nl_peer_rm()
2257 info->attrs[TIPC_NLA_NET], in tipc_nl_peer_rm()
2265 if (attrs[TIPC_NLA_NET_ADDR]) { in tipc_nl_peer_rm()
2266 addr = nla_get_u32(attrs[TIPC_NLA_NET_ADDR]); in tipc_nl_peer_rm()
2271 if (attrs[TIPC_NLA_NET_NODEID]) { in tipc_nl_peer_rm()
2272 if (!attrs[TIPC_NLA_NET_NODEID_W1]) in tipc_nl_peer_rm()
2274 *w0 = nla_get_u64(attrs[TIPC_NLA_NET_NODEID]); in tipc_nl_peer_rm()
2275 *w1 = nla_get_u64(attrs[TIPC_NLA_NET_NODEID_W1]); in tipc_nl_peer_rm()
2426 struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1]; in tipc_nl_node_set_link() local
2431 if (!info->attrs[TIPC_NLA_LINK]) in tipc_nl_node_set_link()
2434 err = nla_parse_nested_deprecated(attrs, TIPC_NLA_LINK_MAX, in tipc_nl_node_set_link()
2435 info->attrs[TIPC_NLA_LINK], in tipc_nl_node_set_link()
2440 if (!attrs[TIPC_NLA_LINK_NAME]) in tipc_nl_node_set_link()
2443 name = nla_data(attrs[TIPC_NLA_LINK_NAME]); in tipc_nl_node_set_link()
2446 return tipc_nl_bc_link_set(net, attrs); in tipc_nl_node_set_link()
2460 if (attrs[TIPC_NLA_LINK_PROP]) { in tipc_nl_node_set_link()
2463 err = tipc_nl_parse_link_prop(attrs[TIPC_NLA_LINK_PROP], props); in tipc_nl_node_set_link()
2501 struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1]; in tipc_nl_node_get_link() local
2509 if (!info->attrs[TIPC_NLA_LINK]) in tipc_nl_node_get_link()
2512 err = nla_parse_nested_deprecated(attrs, TIPC_NLA_LINK_MAX, in tipc_nl_node_get_link()
2513 info->attrs[TIPC_NLA_LINK], in tipc_nl_node_get_link()
2518 if (!attrs[TIPC_NLA_LINK_NAME]) in tipc_nl_node_get_link()
2521 name = nla_data(attrs[TIPC_NLA_LINK_NAME]); in tipc_nl_node_get_link()
2570 struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1]; in tipc_nl_node_reset_link_stats() local
2575 if (!info->attrs[TIPC_NLA_LINK]) in tipc_nl_node_reset_link_stats()
2578 err = nla_parse_nested_deprecated(attrs, TIPC_NLA_LINK_MAX, in tipc_nl_node_reset_link_stats()
2579 info->attrs[TIPC_NLA_LINK], in tipc_nl_node_reset_link_stats()
2584 if (!attrs[TIPC_NLA_LINK_NAME]) in tipc_nl_node_reset_link_stats()
2587 link_name = nla_data(attrs[TIPC_NLA_LINK_NAME]); in tipc_nl_node_reset_link_stats()
2665 struct nlattr **attrs = genl_dumpit_info(cb)->info.attrs; in tipc_nl_node_dump_link() local
2681 if (attrs && attrs[TIPC_NLA_LINK]) { in tipc_nl_node_dump_link()
2684 attrs[TIPC_NLA_LINK], in tipc_nl_node_dump_link()
2755 struct nlattr *attrs[TIPC_NLA_MON_MAX + 1]; in tipc_nl_node_set_monitor() local
2759 if (!info->attrs[TIPC_NLA_MON]) in tipc_nl_node_set_monitor()
2762 err = nla_parse_nested_deprecated(attrs, TIPC_NLA_MON_MAX, in tipc_nl_node_set_monitor()
2763 info->attrs[TIPC_NLA_MON], in tipc_nl_node_set_monitor()
2769 if (attrs[TIPC_NLA_MON_ACTIVATION_THRESHOLD]) { in tipc_nl_node_set_monitor()
2772 val = nla_get_u32(attrs[TIPC_NLA_MON_ACTIVATION_THRESHOLD]); in tipc_nl_node_set_monitor()
2783 struct nlattr *attrs; in __tipc_nl_add_monitor_prop() local
2792 attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_MON); in __tipc_nl_add_monitor_prop()
2793 if (!attrs) in __tipc_nl_add_monitor_prop()
2801 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_monitor_prop()
2807 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_monitor_prop()
2873 struct nlattr **attrs = genl_dumpit_info(cb)->info.attrs; in tipc_nl_node_dump_monitor_peer() local
2876 if (!attrs[TIPC_NLA_MON]) in tipc_nl_node_dump_monitor_peer()
2880 attrs[TIPC_NLA_MON], in tipc_nl_node_dump_monitor_peer()
2916 static int tipc_nl_retrieve_key(struct nlattr **attrs, in tipc_nl_retrieve_key() argument
2919 struct nlattr *attr = attrs[TIPC_NLA_NODE_KEY]; in tipc_nl_retrieve_key()
2936 static int tipc_nl_retrieve_nodeid(struct nlattr **attrs, u8 **node_id) in tipc_nl_retrieve_nodeid() argument
2938 struct nlattr *attr = attrs[TIPC_NLA_NODE_ID]; in tipc_nl_retrieve_nodeid()
2950 static int tipc_nl_retrieve_rekeying(struct nlattr **attrs, u32 *intv) in tipc_nl_retrieve_rekeying() argument
2952 struct nlattr *attr = attrs[TIPC_NLA_NODE_REKEYING]; in tipc_nl_retrieve_rekeying()
2963 struct nlattr *attrs[TIPC_NLA_NODE_MAX + 1]; in __tipc_nl_node_set_key() local
2969 u8 *id, *own_id, mode; in __tipc_nl_node_set_key() local
2973 if (!info->attrs[TIPC_NLA_NODE]) in __tipc_nl_node_set_key()
2976 rc = nla_parse_nested(attrs, TIPC_NLA_NODE_MAX, in __tipc_nl_node_set_key()
2977 info->attrs[TIPC_NLA_NODE], in __tipc_nl_node_set_key()
2988 rc = tipc_nl_retrieve_rekeying(attrs, &intv); in __tipc_nl_node_set_key()
2992 rc = tipc_nl_retrieve_key(attrs, &ukey); in __tipc_nl_node_set_key()
3002 rc = tipc_nl_retrieve_nodeid(attrs, &id); in __tipc_nl_node_set_key()
3006 master_key = !!(attrs[TIPC_NLA_NODE_KEY_MASTER]); in __tipc_nl_node_set_key()
3010 if (memcmp(id, own_id, NODE_ID_LEN)) { in __tipc_nl_node_set_key()
3011 n = tipc_node_find_by_id(net, id) ?: in __tipc_nl_node_set_key()
3012 tipc_node_create(net, 0, id, 0xffffu, 0, true); in __tipc_nl_node_set_key()