Lines Matching refs:portid

138 	NETLINK_CB(new).portid = NETLINK_CB(skb).portid;  in netlink_to_full_skb()
790 NETLINK_CB(skb).portid = nlk->portid; in netlink_mmap_sendmsg()
1021 u32 portid; member
1026 (offsetof(struct netlink_compare_arg, portid) + sizeof(u32))
1034 return nlk->portid != x->portid || in netlink_compare()
1039 struct net *net, u32 portid) in netlink_compare_arg_init() argument
1043 arg->portid = portid; in netlink_compare_arg_init()
1046 static struct sock *__netlink_lookup(struct netlink_table *table, u32 portid, in __netlink_lookup() argument
1051 netlink_compare_arg_init(&arg, net, portid); in __netlink_lookup()
1060 netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->portid); in __netlink_insert()
1066 static struct sock *netlink_lookup(struct net *net, int protocol, u32 portid) in netlink_lookup() argument
1072 sk = __netlink_lookup(table, portid, net); in netlink_lookup()
1106 static int netlink_insert(struct sock *sk, u32 portid) in netlink_insert() argument
1113 err = nlk_sk(sk)->portid == portid ? 0 : -EBUSY; in netlink_insert()
1122 nlk_sk(sk)->portid = portid; in netlink_insert()
1140 nlk_sk(sk)->bound = portid; in netlink_insert()
1308 if (nlk->portid && nlk->bound) { in netlink_release()
1312 .portid = nlk->portid, in netlink_release()
1353 s32 portid = task_tgid_vnr(current); in netlink_autobind() local
1361 ok = !__netlink_lookup(table, portid, net); in netlink_autobind()
1370 portid = rover--; in netlink_autobind()
1374 err = netlink_insert(sk, portid); in netlink_autobind()
1548 if (nladdr->nl_pid != nlk->portid) in netlink_bind()
1647 nladdr->nl_pid = nlk->portid; in netlink_getname()
1653 static struct sock *netlink_getsockbyportid(struct sock *ssk, u32 portid) in netlink_getsockbyportid() argument
1658 sock = netlink_lookup(sock_net(ssk), ssk->sk_protocol, portid); in netlink_getsockbyportid()
1665 nlk->dst_portid != nlk_sk(ssk)->portid) { in netlink_getsockbyportid()
1844 u32 portid, int nonblock) in netlink_unicast() argument
1854 sk = netlink_getsockbyportid(ssk, portid); in netlink_unicast()
1987 u32 portid; member
2008 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups || in do_one_broadcast()
2076 int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb, u32 portid, in netlink_broadcast_filtered() argument
2089 info.portid = portid; in netlink_broadcast_filtered()
2127 int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid, in netlink_broadcast() argument
2130 return netlink_broadcast_filtered(ssk, skb, portid, group, allocation, in netlink_broadcast()
2137 u32 portid; member
2153 if (nlk->portid == p->portid || p->group - 1 >= nlk->ngroups || in do_one_set_err()
2178 int netlink_set_err(struct sock *ssk, u32 portid, u32 group, int code) in netlink_set_err() argument
2185 info.portid = portid; in netlink_set_err()
2490 NETLINK_CB(skb).portid = nlk->portid; in netlink_sendmsg()
2575 addr->nl_pid = NETLINK_CB(skb).portid; in netlink_recvmsg()
2759 __nlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, int type, int len, int flags) in __nlmsg_put() argument
2768 nlh->nlmsg_pid = portid; in __nlmsg_put()
2812 skb = netlink_alloc_skb(sk, alloc_size, nlk->portid, in netlink_dump()
2819 skb = netlink_alloc_skb(sk, alloc_size, nlk->portid, in netlink_dump()
2900 sk = netlink_lookup(sock_net(ssk), ssk->sk_protocol, NETLINK_CB(skb).portid); in __netlink_dump_start()
2968 NETLINK_CB(in_skb).portid, GFP_KERNEL); in netlink_ack()
2974 NETLINK_CB(in_skb).portid); in netlink_ack()
2983 rep = __nlmsg_put(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq, in netlink_ack()
2988 netlink_unicast(in_skb->sk, skb, NETLINK_CB(in_skb).portid, MSG_DONTWAIT); in netlink_ack()
3043 int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 portid, in nlmsg_notify() argument
3053 exclude_portid = portid; in nlmsg_notify()
3064 err2 = nlmsg_unicast(sk, skb, portid); in nlmsg_notify()
3183 nlk->portid, in netlink_seq_show()
3306 netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->portid); in netlink_hash()