Lines Matching refs:encap
455 .encap = XFRM_MODE_BEET,
460 .encap = XFRM_MODE_TRANSPORT,
464 .encap = XFRM_MODE_TUNNEL,
472 .encap = XFRM_MODE_BEET,
477 .encap = XFRM_MODE_ROUTEOPTIMIZATION,
481 .encap = XFRM_MODE_TRANSPORT,
485 .encap = XFRM_MODE_TUNNEL,
491 static const struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family) in xfrm_get_mode() argument
495 if (unlikely(encap >= XFRM_MODE_MAX)) in xfrm_get_mode()
500 mode = &xfrm4_mode_map[encap]; in xfrm_get_mode()
505 mode = &xfrm6_mode_map[encap]; in xfrm_get_mode()
530 kfree(x->encap); in ___xfrm_state_destroy()
1660 struct xfrm_encap_tmpl *encap) in xfrm_state_clone() argument
1703 if (encap || orig->encap) { in xfrm_state_clone()
1704 if (encap) in xfrm_state_clone()
1705 x->encap = kmemdup(encap, sizeof(*x->encap), in xfrm_state_clone()
1708 x->encap = kmemdup(orig->encap, sizeof(*x->encap), in xfrm_state_clone()
1711 if (!x->encap) in xfrm_state_clone()
1813 struct xfrm_encap_tmpl *encap) in xfrm_state_migrate() argument
1817 xc = xfrm_state_clone(x, encap); in xfrm_state_migrate()
1893 if (x->encap && x1->encap && in xfrm_state_update()
1894 x->encap->encap_type == x1->encap->encap_type) in xfrm_state_update()
1895 memcpy(x1->encap, x->encap, sizeof(*x1->encap)); in xfrm_state_update()
1896 else if (x->encap || x1->encap) in xfrm_state_update()
2473 const struct xfrm_encap_tmpl *encap) in km_migrate() argument
2483 encap); in km_migrate()