Lines Matching refs:sa_parms
554 pfkey_send_update2(struct pfkey_send_sa_args *sa_parms) in pfkey_send_update2() argument
558 sa_parms->type = SADB_UPDATE; in pfkey_send_update2()
559 if ((len = pfkey_send_x1(sa_parms)) < 0) in pfkey_send_update2()
573 pfkey_send_add2(struct pfkey_send_sa_args *sa_parms) in pfkey_send_add2() argument
577 sa_parms->type = SADB_ADD; in pfkey_send_add2()
578 if ((len = pfkey_send_x1(sa_parms)) < 0) in pfkey_send_add2()
1225 pfkey_send_x1(struct pfkey_send_sa_args *sa_parms) in pfkey_send_x1() argument
1234 if (sa_parms->src == NULL || sa_parms->dst == NULL) { in pfkey_send_x1()
1238 if (sa_parms->src->sa_family != sa_parms->dst->sa_family) { in pfkey_send_x1()
1242 switch (sa_parms->src->sa_family) { in pfkey_send_x1()
1254 switch (sa_parms->satype) { in pfkey_send_x1()
1256 if (sa_parms->e_type == SADB_EALG_NONE) { in pfkey_send_x1()
1262 if (sa_parms->e_type != SADB_EALG_NONE) { in pfkey_send_x1()
1266 if (sa_parms->a_type == SADB_AALG_NONE) { in pfkey_send_x1()
1272 if (sa_parms->e_type == SADB_X_CALG_NONE) { in pfkey_send_x1()
1276 if (sa_parms->a_type != SADB_AALG_NONE) { in pfkey_send_x1()
1283 if (sa_parms->e_type != SADB_EALG_NONE) { in pfkey_send_x1()
1287 if (sa_parms->a_type != SADB_X_AALG_TCP_MD5) { in pfkey_send_x1()
1303 + PFKEY_ALIGN8(sysdep_sa_len(sa_parms->src)) in pfkey_send_x1()
1305 + PFKEY_ALIGN8(sysdep_sa_len(sa_parms->dst)) in pfkey_send_x1()
1309 if (sa_parms->e_type != SADB_EALG_NONE && in pfkey_send_x1()
1310 sa_parms->satype != SADB_X_SATYPE_IPCOMP) in pfkey_send_x1()
1312 PFKEY_ALIGN8(sa_parms->e_keylen)); in pfkey_send_x1()
1313 if (sa_parms->a_type != SADB_AALG_NONE) in pfkey_send_x1()
1315 PFKEY_ALIGN8(sa_parms->a_keylen)); in pfkey_send_x1()
1318 if (sa_parms->ctxstr != NULL) in pfkey_send_x1()
1320 + PFKEY_ALIGN8(sa_parms->ctxstrlen)); in pfkey_send_x1()
1325 if (sa_parms->l_natt_type) { in pfkey_send_x1()
1326 switch(sa_parms->satype) { in pfkey_send_x1()
1338 if (sa_parms->l_natt_oa) in pfkey_send_x1()
1340 PFKEY_ALIGN8(sysdep_sa_len(sa_parms->l_natt_oa)); in pfkey_send_x1()
1342 if (sa_parms->l_natt_frag) in pfkey_send_x1()
1354 p = pfkey_setsadbmsg((void *)newmsg, ep, sa_parms->type, (u_int)len, in pfkey_send_x1()
1355 sa_parms->satype, sa_parms->seq, getpid()); in pfkey_send_x1()
1360 p = pfkey_setsadbsa(p, ep, sa_parms->spi, sa_parms->wsize, in pfkey_send_x1()
1361 sa_parms->a_type, sa_parms->e_type, in pfkey_send_x1()
1362 sa_parms->flags); in pfkey_send_x1()
1367 p = pfkey_setsadbxsa2(p, ep, sa_parms->mode, sa_parms->reqid); in pfkey_send_x1()
1372 p = pfkey_setsadbaddr(p, ep, SADB_EXT_ADDRESS_SRC, sa_parms->src, in pfkey_send_x1()
1378 p = pfkey_setsadbaddr(p, ep, SADB_EXT_ADDRESS_DST, sa_parms->dst, in pfkey_send_x1()
1385 if (sa_parms->e_type != SADB_EALG_NONE && in pfkey_send_x1()
1386 sa_parms->satype != SADB_X_SATYPE_IPCOMP) { in pfkey_send_x1()
1388 sa_parms->keymat, sa_parms->e_keylen); in pfkey_send_x1()
1394 if (sa_parms->a_type != SADB_AALG_NONE) { in pfkey_send_x1()
1396 sa_parms->keymat + sa_parms->e_keylen, in pfkey_send_x1()
1397 sa_parms->a_keylen); in pfkey_send_x1()
1406 sa_parms->l_alloc, sa_parms->l_bytes, in pfkey_send_x1()
1407 sa_parms->l_addtime, sa_parms->l_usetime); in pfkey_send_x1()
1413 sa_parms->l_alloc, sa_parms->l_bytes, in pfkey_send_x1()
1414 sa_parms->l_addtime, sa_parms->l_usetime); in pfkey_send_x1()
1420 if (sa_parms->ctxstr != NULL) { in pfkey_send_x1()
1421 p = pfkey_setsecctx(p, ep, SADB_X_EXT_SEC_CTX, sa_parms->ctxdoi, in pfkey_send_x1()
1422 sa_parms->ctxalg, sa_parms->ctxstr, in pfkey_send_x1()
1423 sa_parms->ctxstrlen); in pfkey_send_x1()
1433 if (sa_parms->l_natt_type) { in pfkey_send_x1()
1435 sa_parms->l_natt_type); in pfkey_send_x1()
1442 sa_parms->l_natt_sport); in pfkey_send_x1()
1449 sa_parms->l_natt_dport); in pfkey_send_x1()
1455 if (sa_parms->l_natt_oa) { in pfkey_send_x1()
1457 sa_parms->l_natt_oa, in pfkey_send_x1()
1458 (u_int)PFKEY_ALIGN8(sysdep_sa_len(sa_parms->l_natt_oa)), in pfkey_send_x1()
1467 if (sa_parms->l_natt_frag) { in pfkey_send_x1()
1469 sa_parms->l_natt_frag); in pfkey_send_x1()
1485 len = pfkey_send(sa_parms->so, newmsg, len); in pfkey_send_x1()