Lines Matching refs:x
125 struct xfrm_state *x = skb_dst(skb)->xfrm; in ah_output_done() local
126 struct ah_data *ahp = x->data; in ah_output_done()
147 static int ah_output(struct xfrm_state *x, struct sk_buff *skb) in ah_output() argument
165 ahp = x->data; in ah_output()
176 if (x->props.flags & XFRM_STATE_ESN) { in ah_output()
215 if (x->props.flags & XFRM_STATE_ALIGN4) in ah_output()
221 ah->spi = x->id.spi; in ah_output()
229 if (x->props.flags & XFRM_STATE_ESN) { in ah_output()
271 struct xfrm_state *x = xfrm_input_state(skb); in ah_input_done() local
272 struct ah_data *ahp = x->data; in ah_input_done()
294 if (x->props.mode == XFRM_MODE_TUNNEL) in ah_input_done()
303 static int ah_input(struct xfrm_state *x, struct sk_buff *skb) in ah_input() argument
328 ahp = x->data; in ah_input()
334 if (x->props.flags & XFRM_STATE_ALIGN4) { in ah_input()
363 if (x->props.flags & XFRM_STATE_ESN) { in ah_input()
404 if (x->props.flags & XFRM_STATE_ESN) { in ah_input()
429 if (x->props.mode == XFRM_MODE_TUNNEL) in ah_input()
447 struct xfrm_state *x; in ah4_err() local
459 x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr, in ah4_err()
461 if (!x) in ah4_err()
468 xfrm_state_put(x); in ah4_err()
473 static int ah_init_state(struct xfrm_state *x) in ah_init_state() argument
479 if (!x->aalg) in ah_init_state()
482 if (x->encap) in ah_init_state()
489 ahash = crypto_alloc_ahash(x->aalg->alg_name, 0, 0); in ah_init_state()
494 if (crypto_ahash_setkey(ahash, x->aalg->alg_key, in ah_init_state()
495 (x->aalg->alg_key_len + 7) / 8)) in ah_init_state()
504 aalg_desc = xfrm_aalg_get_byname(x->aalg->alg_name, 0); in ah_init_state()
510 __func__, x->aalg->alg_name, in ah_init_state()
517 ahp->icv_trunc_len = x->aalg->alg_trunc_len/8; in ah_init_state()
519 if (x->props.flags & XFRM_STATE_ALIGN4) in ah_init_state()
520 x->props.header_len = XFRM_ALIGN4(sizeof(struct ip_auth_hdr) + in ah_init_state()
523 x->props.header_len = XFRM_ALIGN8(sizeof(struct ip_auth_hdr) + in ah_init_state()
525 if (x->props.mode == XFRM_MODE_TUNNEL) in ah_init_state()
526 x->props.header_len += sizeof(struct iphdr); in ah_init_state()
527 x->data = ahp; in ah_init_state()
539 static void ah_destroy(struct xfrm_state *x) in ah_destroy() argument
541 struct ah_data *ahp = x->data; in ah_destroy()