Searched refs:pfk (Results 1 - 1 of 1) sorted by relevance

/linux-4.4.14/net/key/
H A Daf_key.c80 static void pfkey_terminate_dump(struct pfkey_sock *pfk) pfkey_terminate_dump() argument
82 if (pfk->dump.dump) { pfkey_terminate_dump()
83 if (pfk->dump.skb) { pfkey_terminate_dump()
84 kfree_skb(pfk->dump.skb); pfkey_terminate_dump()
85 pfk->dump.skb = NULL; pfkey_terminate_dump()
87 pfk->dump.done(pfk); pfkey_terminate_dump()
88 pfk->dump.dump = NULL; pfkey_terminate_dump()
89 pfk->dump.done = NULL; pfkey_terminate_dump()
239 struct pfkey_sock *pfk = pfkey_sk(sk); pfkey_broadcast() local
246 if (pfk->promisc) pfkey_broadcast()
256 !pfk->registered) pfkey_broadcast()
279 static int pfkey_do_dump(struct pfkey_sock *pfk) pfkey_do_dump() argument
284 rc = pfk->dump.dump(pfk); pfkey_do_dump()
288 if (pfk->dump.skb) { pfkey_do_dump()
289 if (!pfkey_can_dump(&pfk->sk)) pfkey_do_dump()
292 hdr = (struct sadb_msg *) pfk->dump.skb->data; pfkey_do_dump()
295 pfkey_broadcast(pfk->dump.skb, BROADCAST_ONE, pfkey_do_dump()
296 &pfk->sk, sock_net(&pfk->sk)); pfkey_do_dump()
297 pfk->dump.skb = NULL; pfkey_do_dump()
300 pfkey_terminate_dump(pfk); pfkey_do_dump()
1651 struct pfkey_sock *pfk = pfkey_sk(sk); pfkey_register() local
1658 if (pfk->registered&(1<<hdr->sadb_msg_satype)) pfkey_register()
1660 pfk->registered |= (1<<hdr->sadb_msg_satype); pfkey_register()
1668 pfk->registered &= ~(1<<hdr->sadb_msg_satype); pfkey_register()
1749 struct pfkey_sock *pfk = ptr; dump_sa() local
1753 if (!pfkey_can_dump(&pfk->sk)) dump_sa()
1761 out_hdr->sadb_msg_version = pfk->dump.msg_version; dump_sa()
1767 out_hdr->sadb_msg_pid = pfk->dump.msg_portid; dump_sa()
1769 if (pfk->dump.skb) dump_sa()
1770 pfkey_broadcast(pfk->dump.skb, BROADCAST_ONE, dump_sa()
1771 &pfk->sk, sock_net(&pfk->sk)); dump_sa()
1772 pfk->dump.skb = out_skb; dump_sa()
1777 static int pfkey_dump_sa(struct pfkey_sock *pfk) pfkey_dump_sa() argument
1779 struct net *net = sock_net(&pfk->sk); pfkey_dump_sa()
1780 return xfrm_state_walk(net, &pfk->dump.u.state, dump_sa, (void *) pfk); pfkey_dump_sa()
1783 static void pfkey_dump_sa_done(struct pfkey_sock *pfk) pfkey_dump_sa_done() argument
1785 struct net *net = sock_net(&pfk->sk); pfkey_dump_sa_done()
1787 xfrm_state_walk_done(&pfk->dump.u.state, net); pfkey_dump_sa_done()
1794 struct pfkey_sock *pfk = pfkey_sk(sk); pfkey_dump() local
1796 if (pfk->dump.dump != NULL) pfkey_dump()
1819 pfk->dump.msg_version = hdr->sadb_msg_version; pfkey_dump()
1820 pfk->dump.msg_portid = hdr->sadb_msg_pid; pfkey_dump()
1821 pfk->dump.dump = pfkey_dump_sa; pfkey_dump()
1822 pfk->dump.done = pfkey_dump_sa_done; pfkey_dump()
1823 xfrm_state_walk_init(&pfk->dump.u.state, proto, filter); pfkey_dump()
1825 return pfkey_do_dump(pfk); pfkey_dump()
1830 struct pfkey_sock *pfk = pfkey_sk(sk); pfkey_promisc() local
1838 pfk->promisc = satype; pfkey_promisc()
2633 struct pfkey_sock *pfk = ptr; dump_sp() local
2638 if (!pfkey_can_dump(&pfk->sk)) dump_sp()
2650 out_hdr->sadb_msg_version = pfk->dump.msg_version; dump_sp()
2655 out_hdr->sadb_msg_pid = pfk->dump.msg_portid; dump_sp()
2657 if (pfk->dump.skb) dump_sp()
2658 pfkey_broadcast(pfk->dump.skb, BROADCAST_ONE, dump_sp()
2659 &pfk->sk, sock_net(&pfk->sk)); dump_sp()
2660 pfk->dump.skb = out_skb; dump_sp()
2665 static int pfkey_dump_sp(struct pfkey_sock *pfk) pfkey_dump_sp() argument
2667 struct net *net = sock_net(&pfk->sk); pfkey_dump_sp()
2668 return xfrm_policy_walk(net, &pfk->dump.u.policy, dump_sp, (void *) pfk); pfkey_dump_sp()
2671 static void pfkey_dump_sp_done(struct pfkey_sock *pfk) pfkey_dump_sp_done() argument
2673 struct net *net = sock_net((struct sock *)pfk); pfkey_dump_sp_done()
2675 xfrm_policy_walk_done(&pfk->dump.u.policy, net); pfkey_dump_sp_done()
2680 struct pfkey_sock *pfk = pfkey_sk(sk); pfkey_spddump() local
2682 if (pfk->dump.dump != NULL) pfkey_spddump()
2685 pfk->dump.msg_version = hdr->sadb_msg_version; pfkey_spddump()
2686 pfk->dump.msg_portid = hdr->sadb_msg_pid; pfkey_spddump()
2687 pfk->dump.dump = pfkey_dump_sp; pfkey_spddump()
2688 pfk->dump.done = pfkey_dump_sp_done; pfkey_spddump()
2689 xfrm_policy_walk_init(&pfk->dump.u.policy, XFRM_POLICY_TYPE_MAIN); pfkey_spddump()
2691 return pfkey_do_dump(pfk); pfkey_spddump()
3637 struct pfkey_sock *pfk = pfkey_sk(sk); pfkey_recvmsg() local
3664 if (pfk->dump.dump != NULL && pfkey_recvmsg()
3666 pfkey_do_dump(pfk); pfkey_recvmsg()

Completed in 238 milliseconds