Lines Matching refs:ka

27 static void nat_keepalive_init(struct nat_keepalive *ka, struct xfrm_state *x)  in nat_keepalive_init()  argument
29 ka->net = xs_net(x); in nat_keepalive_init()
30 ka->family = x->props.family; in nat_keepalive_init()
31 ka->saddr = x->props.saddr; in nat_keepalive_init()
32 ka->daddr = x->id.daddr; in nat_keepalive_init()
33 ka->encap_sport = x->encap->encap_sport; in nat_keepalive_init()
34 ka->encap_dport = x->encap->encap_dport; in nat_keepalive_init()
35 ka->smark = xfrm_smark_get(0, x); in nat_keepalive_init()
39 struct nat_keepalive *ka) in nat_keepalive_send_ipv4() argument
41 struct net *net = ka->net; in nat_keepalive_send_ipv4()
50 ka->daddr.a4, ka->saddr.a4, ka->encap_dport, in nat_keepalive_send_ipv4()
51 ka->encap_sport, sock_net_uid(net, NULL)); in nat_keepalive_send_ipv4()
68 struct nat_keepalive *ka, in nat_keepalive_send_ipv6() argument
71 struct net *net = ka->net; in nat_keepalive_send_ipv6()
79 uh->check = csum_ipv6_magic(&ka->saddr.in6, &ka->daddr.in6, in nat_keepalive_send_ipv6()
86 fl6.saddr = ka->saddr.in6; in nat_keepalive_send_ipv6()
87 fl6.daddr = ka->daddr.in6; in nat_keepalive_send_ipv6()
89 fl6.fl6_sport = ka->encap_sport; in nat_keepalive_send_ipv6()
90 fl6.fl6_dport = ka->encap_dport; in nat_keepalive_send_ipv6()
105 static void nat_keepalive_send(struct nat_keepalive *ka) in nat_keepalive_send() argument
124 uh->source = ka->encap_sport; in nat_keepalive_send()
125 uh->dest = ka->encap_dport; in nat_keepalive_send()
129 skb->mark = ka->smark; in nat_keepalive_send()
131 switch (ka->family) { in nat_keepalive_send()
133 err = nat_keepalive_send_ipv4(skb, ka); in nat_keepalive_send()
137 err = nat_keepalive_send_ipv6(skb, ka, uh); in nat_keepalive_send()
154 struct nat_keepalive ka; in nat_keepalive_work_single() local
173 nat_keepalive_init(&ka, x); in nat_keepalive_work_single()
180 nat_keepalive_send(&ka); in nat_keepalive_work_single()