Lines Matching refs: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()
565 WRITE_ONCE(nlk_sk(sk)->portid, portid); in netlink_insert()
587 WRITE_ONCE(nlk_sk(sk)->bound, portid); in netlink_insert()
762 if (nlk->portid && nlk->bound) { in netlink_release()
766 .portid = nlk->portid, in netlink_release()
821 s32 portid = task_tgid_vnr(current); in netlink_autobind() local
829 ok = !__netlink_lookup(table, portid, net); in netlink_autobind()
838 portid = rover--; in netlink_autobind()
842 err = netlink_insert(sk, portid); in netlink_autobind()
1021 if (nladdr->nl_pid != nlk->portid) in netlink_bind()
1136 nladdr->nl_pid = READ_ONCE(nlk->portid); in netlink_getname()
1152 static struct sock *netlink_getsockbyportid(struct sock *ssk, u32 portid) in netlink_getsockbyportid() argument
1157 sock = netlink_lookup(sock_net(ssk), ssk->sk_protocol, portid); in netlink_getsockbyportid()
1165 READ_ONCE(nlk->dst_portid) != nlk_sk(ssk)->portid) { in netlink_getsockbyportid()
1333 u32 portid, int nonblock) in netlink_unicast() argument
1343 sk = netlink_getsockbyportid(ssk, portid); in netlink_unicast()
1409 u32 portid; member
1430 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups || in do_one_broadcast()
1502 u32 portid, in netlink_broadcast_filtered() argument
1516 info.portid = portid; in netlink_broadcast_filtered()
1554 int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid, in netlink_broadcast() argument
1557 return netlink_broadcast_filtered(ssk, skb, portid, group, allocation, in netlink_broadcast()
1564 u32 portid; member
1580 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups || in do_one_set_err()
1605 int netlink_set_err(struct sock *ssk, u32 portid, u32 group, int code) in netlink_set_err() argument
1613 info.portid = portid; in netlink_set_err()
1870 NETLINK_CB(skb).portid = nlk->portid; in netlink_sendmsg()
1954 addr->nl_pid = NETLINK_CB(skb).portid; in netlink_recvmsg()
2138 __nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags) in __nlmsg_put() argument
2147 nlh->nlmsg_pid = portid; in __nlmsg_put()
2321 sk = netlink_lookup(sock_net(ssk), ssk->sk_protocol, NETLINK_CB(skb).portid); in __netlink_dump_start()
2478 rep = nlmsg_put(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq, in netlink_ack()
2499 nlmsg_unicast(in_skb->sk, skb, NETLINK_CB(in_skb).portid); in netlink_ack()
2565 int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 portid, in nlmsg_notify() argument
2575 exclude_portid = portid; in nlmsg_notify()
2588 err2 = nlmsg_unicast(sk, skb, portid); in nlmsg_notify()
2693 nlk->portid, in netlink_native_seq_show()
2862 netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->portid); in netlink_hash()