Lines Matching full:portid

177 	NETLINK_CB(new).portid = NETLINK_CB(skb).portid;
467 u32 portid;
472 (offsetof(struct netlink_compare_arg, portid) + sizeof(u32))
480 return nlk->portid != x->portid ||
485 struct net *net, u32 portid)
489 arg->portid = portid;
492 static struct sock *__netlink_lookup(struct netlink_table *table, u32 portid,
497 netlink_compare_arg_init(&arg, net, portid);
506 netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->portid);
512 static struct sock *netlink_lookup(struct net *net, int protocol, u32 portid)
518 sk = __netlink_lookup(table, portid, net);
552 static int netlink_insert(struct sock *sk, u32 portid)
559 err = nlk_sk(sk)->portid == portid ? 0 : -EBUSY;
563 /* portid can be read locklessly from netlink_getname(). */
564 WRITE_ONCE(nlk_sk(sk)->portid, portid);
586 WRITE_ONCE(nlk_sk(sk)->bound, portid);
757 if (nlk->portid && nlk->bound) {
761 .portid = nlk->portid,
807 s32 portid = task_tgid_vnr(current);
815 ok = !__netlink_lookup(table, portid, net);
818 /* Bind collision, search negative portid values. */
824 portid = rover--;
828 err = netlink_insert(sk, portid);
1004 /* Ensure nlk->portid is up-to-date. */
1007 if (nladdr->nl_pid != nlk->portid)
1122 nladdr->nl_pid = READ_ONCE(nlk->portid);
1138 static struct sock *netlink_getsockbyportid(struct sock *ssk, u32 portid)
1143 sock = netlink_lookup(sock_net(ssk), ssk->sk_protocol, portid);
1151 READ_ONCE(nlk->dst_portid) != nlk_sk(ssk)->portid) {
1330 u32 portid, int nonblock)
1340 sk = netlink_getsockbyportid(ssk, portid);
1412 u32 portid;
1433 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups ||
1505 u32 portid,
1518 info.portid = portid;
1556 int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid,
1559 return netlink_broadcast_filtered(ssk, skb, portid, group, allocation,
1566 u32 portid;
1582 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups ||
1600 * @portid: the PORTID of a process that we want to skip (if any)
1607 int netlink_set_err(struct sock *ssk, u32 portid, u32 group, int code)
1615 info.portid = portid;
1875 NETLINK_CB(skb).portid = nlk->portid;
1959 addr->nl_pid = NETLINK_CB(skb).portid;
2141 __nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags)
2150 nlh->nlmsg_pid = portid;
2399 sk = netlink_lookup(sock_net(ssk), ssk->sk_protocol, NETLINK_CB(skb).portid);
2493 rep = nlmsg_put(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq,
2514 nlmsg_unicast(in_skb->sk, skb, NETLINK_CB(in_skb).portid);
2575 * @portid: destination netlink portid for reports or 0
2580 int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 portid,
2590 exclude_portid = portid;
2603 err2 = nlmsg_unicast(sk, skb, portid);
2708 nlk->portid,
2877 netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->portid);