Lines Matching full:esp
11 * This file is derived from net/ipv4/esp.c
22 #include <net/esp.h>
161 /* Move ESP header back into place. */
226 int esp6_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp) in esp6_output_head() argument
233 int tailen = esp->tailen; in esp6_output_head()
248 esp->inplace = false; in esp6_output_head()
266 esp_output_fill_trailer(tail, esp->tfclen, esp->plen, esp->proto); in esp6_output_head()
299 esp_output_fill_trailer(tail, esp->tfclen, esp->plen, esp->proto); in esp6_output_head()
307 int esp6_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp) in esp6_output_tail() argument
335 tmp = esp_alloc_tmp(aead, esp->nfrags + 2, seqhilen); in esp6_output_tail()
344 if (esp->inplace) in esp6_output_tail()
347 dsg = &sg[esp->nfrags]; in esp6_output_tail()
351 sg_init_table(sg, esp->nfrags); in esp6_output_tail()
354 assoclen + ivlen + esp->clen + alen); in esp6_output_tail()
358 if (!esp->inplace) { in esp6_output_tail()
382 assoclen + ivlen + esp->clen + alen); in esp6_output_tail()
392 aead_request_set_crypt(req, sg, dsg, ivlen + esp->clen, iv); in esp6_output_tail()
396 memcpy(iv + ivlen - min(ivlen, 8), (u8 *)&esp->seqno + 8 - min(ivlen, 8), in esp6_output_tail()
431 struct esp_info esp; in esp6_output() local
433 esp.inplace = true; in esp6_output()
435 esp.proto = *skb_mac_header(skb); in esp6_output()
443 esp.tfclen = 0; in esp6_output()
450 esp.tfclen = padto - skb->len; in esp6_output()
453 esp.clen = ALIGN(skb->len + 2 + esp.tfclen, blksize); in esp6_output()
454 esp.plen = esp.clen - skb->len - esp.tfclen; in esp6_output()
455 esp.tailen = esp.tfclen + esp.plen + alen; in esp6_output()
457 esp.nfrags = esp6_output_head(x, skb, &esp); in esp6_output()
458 if (esp.nfrags < 0) in esp6_output()
459 return esp.nfrags; in esp6_output()
465 esp.seqno = cpu_to_be64(XFRM_SKB_CB(skb)->seq.output.low + in esp6_output()
470 return esp6_output_tail(x, skb, &esp); in esp6_output()
499 net_dbg_ratelimited("ipsec esp packet is garbage padlen=%d, elen=%d\n", in esp_remove_trailer()
824 pr_info("ESP: %s digestsize %u != %hu\n", in esp_init_authenc()