Lines Matching refs:portid

177 	NETLINK_CB(new).portid = NETLINK_CB(skb).portid;
485 u32 portid;
490 (offsetof(struct netlink_compare_arg, portid) + sizeof(u32))
498 return nlk->portid != x->portid ||
503 struct net *net, u32 portid)
507 arg->portid = portid;
510 static struct sock *__netlink_lookup(struct netlink_table *table, u32 portid,
515 netlink_compare_arg_init(&arg, net, portid);
524 netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->portid);
530 static struct sock *netlink_lookup(struct net *net, int protocol, u32 portid)
536 sk = __netlink_lookup(table, portid, net);
570 static int netlink_insert(struct sock *sk, u32 portid)
577 err = nlk_sk(sk)->portid == portid ? 0 : -EBUSY;
581 /* portid can be read locklessly from netlink_getname(). */
582 WRITE_ONCE(nlk_sk(sk)->portid, portid);
604 WRITE_ONCE(nlk_sk(sk)->bound, portid);
789 if (nlk->portid && nlk->bound) {
793 .portid = nlk->portid,
840 s32 portid = task_tgid_vnr(current);
848 ok = !__netlink_lookup(table, portid, net);
851 /* Bind collision, search negative portid values. */
857 portid = rover--;
861 err = netlink_insert(sk, portid);
1037 /* Ensure nlk->portid is up-to-date. */
1040 if (nladdr->nl_pid != nlk->portid)
1155 nladdr->nl_pid = READ_ONCE(nlk->portid);
1171 static struct sock *netlink_getsockbyportid(struct sock *ssk, u32 portid)
1176 sock = netlink_lookup(sock_net(ssk), ssk->sk_protocol, portid);
1184 READ_ONCE(nlk->dst_portid) != nlk_sk(ssk)->portid) {
1352 u32 portid, int nonblock)
1362 sk = netlink_getsockbyportid(ssk, portid);
1428 u32 portid;
1449 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups ||
1521 u32 portid,
1535 info.portid = portid;
1573 int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid,
1576 return netlink_broadcast_filtered(ssk, skb, portid, group, allocation,
1583 u32 portid;
1599 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups ||
1617 * @portid: the PORTID of a process that we want to skip (if any)
1624 int netlink_set_err(struct sock *ssk, u32 portid, u32 group, int code)
1632 info.portid = portid;
1889 NETLINK_CB(skb).portid = nlk->portid;
1973 addr->nl_pid = NETLINK_CB(skb).portid;
2156 __nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags)
2165 nlh->nlmsg_pid = portid;
2328 sk = netlink_lookup(sock_net(ssk), ssk->sk_protocol, NETLINK_CB(skb).portid);
2486 rep = nlmsg_put(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq,
2507 nlmsg_unicast(in_skb->sk, skb, NETLINK_CB(in_skb).portid);
2568 * @portid: destination netlink portid for reports or 0
2573 int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 portid,
2583 exclude_portid = portid;
2596 err2 = nlmsg_unicast(sk, skb, portid);
2701 nlk->portid,
2870 netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->portid);