Lines Matching full:portid

177 	NETLINK_CB(new).portid = NETLINK_CB(skb).portid;  in netlink_to_full_skb()
468 u32 portid; member
473 (offsetof(struct netlink_compare_arg, portid) + sizeof(u32))
481 return nlk->portid != x->portid || in netlink_compare()
486 struct net *net, u32 portid) in netlink_compare_arg_init() argument
490 arg->portid = portid; in netlink_compare_arg_init()
493 static struct sock *__netlink_lookup(struct netlink_table *table, u32 portid, in __netlink_lookup() argument
498 netlink_compare_arg_init(&arg, net, portid); in __netlink_lookup()
507 netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->portid); in __netlink_insert()
513 static struct sock *netlink_lookup(struct net *net, int protocol, u32 portid) in netlink_lookup() argument
519 sk = __netlink_lookup(table, portid, net); in netlink_lookup()
553 static int netlink_insert(struct sock *sk, u32 portid) in netlink_insert() argument
560 err = nlk_sk(sk)->portid == portid ? 0 : -EBUSY; in netlink_insert()
564 /* portid can be read locklessly from netlink_getname(). */ in netlink_insert()
565 WRITE_ONCE(nlk_sk(sk)->portid, portid); in netlink_insert()
587 WRITE_ONCE(nlk_sk(sk)->bound, portid); in netlink_insert()
758 if (nlk->portid && nlk->bound) { in netlink_release()
762 .portid = nlk->portid, in netlink_release()
807 s32 portid = task_tgid_vnr(current); in netlink_autobind() local
815 ok = !__netlink_lookup(table, portid, net); in netlink_autobind()
818 /* Bind collision, search negative portid values. */ in netlink_autobind()
824 portid = rover--; in netlink_autobind()
828 err = netlink_insert(sk, portid); in netlink_autobind()
1004 /* Ensure nlk->portid is up-to-date. */ in netlink_bind()
1007 if (nladdr->nl_pid != nlk->portid) in netlink_bind()
1122 nladdr->nl_pid = READ_ONCE(nlk->portid); in netlink_getname()
1138 static struct sock *netlink_getsockbyportid(struct sock *ssk, u32 portid) in netlink_getsockbyportid() argument
1143 sock = netlink_lookup(sock_net(ssk), ssk->sk_protocol, portid); in netlink_getsockbyportid()
1151 READ_ONCE(nlk->dst_portid) != nlk_sk(ssk)->portid) { in netlink_getsockbyportid()
1322 u32 portid, int nonblock) in netlink_unicast() argument
1332 sk = netlink_getsockbyportid(ssk, portid); in netlink_unicast()
1398 u32 portid; member
1419 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups || in do_one_broadcast()
1491 u32 portid, in netlink_broadcast_filtered() argument
1504 info.portid = portid; in netlink_broadcast_filtered()
1542 int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid, in netlink_broadcast() argument
1545 return netlink_broadcast_filtered(ssk, skb, portid, group, allocation, in netlink_broadcast()
1552 u32 portid; member
1568 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups || in do_one_set_err()
1586 * @portid: the PORTID of a process that we want to skip (if any)
1593 int netlink_set_err(struct sock *ssk, u32 portid, u32 group, int code) in netlink_set_err() argument
1601 info.portid = portid; in netlink_set_err()
1861 NETLINK_CB(skb).portid = nlk->portid; in netlink_sendmsg()
1945 addr->nl_pid = NETLINK_CB(skb).portid; in netlink_recvmsg()
2127 __nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags) in __nlmsg_put() argument
2136 nlh->nlmsg_pid = portid; in __nlmsg_put()
2380 sk = netlink_lookup(sock_net(ssk), ssk->sk_protocol, NETLINK_CB(skb).portid); in __netlink_dump_start()
2474 rep = nlmsg_put(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq, in netlink_ack()
2495 nlmsg_unicast(in_skb->sk, skb, NETLINK_CB(in_skb).portid); in netlink_ack()
2556 * @portid: destination netlink portid for reports or 0
2561 int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 portid, in nlmsg_notify() argument
2571 exclude_portid = portid; in nlmsg_notify()
2584 err2 = nlmsg_unicast(sk, skb, portid); in nlmsg_notify()
2689 nlk->portid, in netlink_native_seq_show()
2858 netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->portid); in netlink_hash()