Lines Matching refs:xpl0
1554 key_msg2sp(struct sadb_x_policy *xpl0, size_t len, int *error) in key_msg2sp() argument
1558 IPSEC_ASSERT(xpl0 != NULL, ("null xpl0")); in key_msg2sp()
1559 IPSEC_ASSERT(len >= sizeof(*xpl0), ("policy too short: %zu", len)); in key_msg2sp()
1561 if (len != PFKEY_EXTLEN(xpl0)) { in key_msg2sp()
1572 newsp->spidx.dir = xpl0->sadb_x_policy_dir; in key_msg2sp()
1573 newsp->policy = xpl0->sadb_x_policy_type; in key_msg2sp()
1574 newsp->priority = xpl0->sadb_x_policy_priority; in key_msg2sp()
1578 switch (xpl0->sadb_x_policy_type) { in key_msg2sp()
1592 if (PFKEY_EXTLEN(xpl0) < sizeof(*xpl0)) { in key_msg2sp()
1600 tlen = PFKEY_EXTLEN(xpl0) - sizeof(*xpl0); in key_msg2sp()
1601 xisr = (struct sadb_x_ipsecrequest *)(xpl0 + 1); in key_msg2sp()
2038 struct sadb_x_policy *xpl0, *xpl; in key_spdadd() local
2075 xpl0 = (struct sadb_x_policy *)mhp->ext[SADB_X_EXT_POLICY]; in key_spdadd()
2078 switch (xpl0->sadb_x_policy_dir) { in key_spdadd()
2087 if (xpl0->sadb_x_policy_type != IPSEC_POLICY_DISCARD && in key_spdadd()
2088 xpl0->sadb_x_policy_type != IPSEC_POLICY_NONE && in key_spdadd()
2089 xpl0->sadb_x_policy_type != IPSEC_POLICY_IPSEC) { in key_spdadd()
2095 if (xpl0->sadb_x_policy_type == IPSEC_POLICY_IPSEC && in key_spdadd()
2096 mhp->extlen[SADB_X_EXT_POLICY] <= sizeof(*xpl0)) { in key_spdadd()
2110 KEY_SETSECSPIDX(xpl0->sadb_x_policy_dir, in key_spdadd()
2134 if ((newsp = key_msg2sp(xpl0, PFKEY_EXTLEN(xpl0), &error)) == NULL) { in key_spdadd()
2300 struct sadb_x_policy *xpl0; in key_spddelete() local
2326 xpl0 = (struct sadb_x_policy *)mhp->ext[SADB_X_EXT_POLICY]; in key_spddelete()
2329 switch (xpl0->sadb_x_policy_dir) { in key_spddelete()
2338 if (xpl0->sadb_x_policy_type != IPSEC_POLICY_DISCARD && in key_spddelete()
2339 xpl0->sadb_x_policy_type != IPSEC_POLICY_NONE && in key_spddelete()
2340 xpl0->sadb_x_policy_type != IPSEC_POLICY_IPSEC) { in key_spddelete()
2351 KEY_SETSECSPIDX(xpl0->sadb_x_policy_dir, in key_spddelete()
2366 xpl0->sadb_x_policy_id = sp->id; in key_spddelete()