Lines Matching refs:portid
167 NETLINK_CB(new).portid = NETLINK_CB(skb).portid;
477 u32 portid;
482 (offsetof(struct netlink_compare_arg, portid) + sizeof(u32))
490 return nlk->portid != x->portid ||
495 struct net *net, u32 portid)
499 arg->portid = portid;
502 static struct sock *__netlink_lookup(struct netlink_table *table, u32 portid,
507 netlink_compare_arg_init(&arg, net, portid);
516 netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->portid);
522 static struct sock *netlink_lookup(struct net *net, int protocol, u32 portid)
528 sk = __netlink_lookup(table, portid, net);
562 static int netlink_insert(struct sock *sk, u32 portid)
569 err = nlk_sk(sk)->portid == portid ? 0 : -EBUSY;
573 /* portid can be read locklessly from netlink_getname(). */
574 WRITE_ONCE(nlk_sk(sk)->portid, portid);
596 WRITE_ONCE(nlk_sk(sk)->bound, portid);
778 if (nlk->portid && nlk->bound) {
782 .portid = nlk->portid,
820 s32 portid = task_tgid_vnr(current);
828 ok = !__netlink_lookup(table, portid, net);
831 /* Bind collision, search negative portid values. */
837 portid = rover--;
841 err = netlink_insert(sk, portid);
1017 /* Ensure nlk->portid is up-to-date. */
1020 if (nladdr->nl_pid != nlk->portid)
1135 nladdr->nl_pid = READ_ONCE(nlk->portid);
1151 static struct sock *netlink_getsockbyportid(struct sock *ssk, u32 portid)
1156 sock = netlink_lookup(sock_net(ssk), ssk->sk_protocol, portid);
1164 READ_ONCE(nlk->dst_portid) != nlk_sk(ssk)->portid) {
1332 u32 portid, int nonblock)
1342 sk = netlink_getsockbyportid(ssk, portid);
1410 u32 portid;
1431 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups ||
1500 int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 portid,
1513 info.portid = portid;
1551 int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid,
1554 return netlink_broadcast_filtered(ssk, skb, portid, group, allocation,
1561 u32 portid;
1577 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups ||
1595 * @portid: the PORTID of a process that we want to skip (if any)
1602 int netlink_set_err(struct sock *ssk, u32 portid, u32 group, int code)
1610 info.portid = portid;
1895 NETLINK_CB(skb).portid = nlk->portid;
1979 addr->nl_pid = NETLINK_CB(skb).portid;
2163 __nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags)
2172 nlh->nlmsg_pid = portid;
2333 sk = netlink_lookup(sock_net(ssk), ssk->sk_protocol, NETLINK_CB(skb).portid);
2439 rep = __nlmsg_put(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq,
2467 netlink_unicast(in_skb->sk, skb, NETLINK_CB(in_skb).portid, MSG_DONTWAIT);
2520 * @portid: destination netlink portid for reports or 0
2525 int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 portid,
2535 exclude_portid = portid;
2548 err2 = nlmsg_unicast(sk, skb, portid);
2653 nlk->portid,
2823 netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->portid);