Lines Matching refs:encap
434 .encap = XFRM_MODE_BEET,
439 .encap = XFRM_MODE_TRANSPORT,
443 .encap = XFRM_MODE_TUNNEL,
451 .encap = XFRM_MODE_BEET,
456 .encap = XFRM_MODE_ROUTEOPTIMIZATION,
460 .encap = XFRM_MODE_TRANSPORT,
464 .encap = XFRM_MODE_TUNNEL,
470 static const struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family) in xfrm_get_mode() argument
474 if (unlikely(encap >= XFRM_MODE_MAX)) in xfrm_get_mode()
479 mode = &xfrm4_mode_map[encap]; in xfrm_get_mode()
484 mode = &xfrm6_mode_map[encap]; in xfrm_get_mode()
509 kfree(x->encap); in ___xfrm_state_destroy()
1508 struct xfrm_encap_tmpl *encap) in xfrm_state_clone() argument
1551 if (encap || orig->encap) { in xfrm_state_clone()
1552 if (encap) in xfrm_state_clone()
1553 x->encap = kmemdup(encap, sizeof(*x->encap), in xfrm_state_clone()
1556 x->encap = kmemdup(orig->encap, sizeof(*x->encap), in xfrm_state_clone()
1559 if (!x->encap) in xfrm_state_clone()
1661 struct xfrm_encap_tmpl *encap) in xfrm_state_migrate() argument
1665 xc = xfrm_state_clone(x, encap); in xfrm_state_migrate()
1741 if (x->encap && x1->encap && in xfrm_state_update()
1742 x->encap->encap_type == x1->encap->encap_type) in xfrm_state_update()
1743 memcpy(x1->encap, x->encap, sizeof(*x1->encap)); in xfrm_state_update()
1744 else if (x->encap || x1->encap) in xfrm_state_update()
2307 const struct xfrm_encap_tmpl *encap) in km_migrate() argument
2317 encap); in km_migrate()