Lines Matching refs:newmsg

381 	struct sadb_msg *newmsg;  in pfkey_send_getspi()  local
426 if ((newmsg = CALLOC((size_t)len, struct sadb_msg *)) == NULL) { in pfkey_send_getspi()
430 ep = ((caddr_t)(void *)newmsg) + len; in pfkey_send_getspi()
432 p = pfkey_setsadbmsg((void *)newmsg, ep, SADB_GETSPI, in pfkey_send_getspi()
435 free(newmsg); in pfkey_send_getspi()
441 free(newmsg); in pfkey_send_getspi()
449 free(newmsg); in pfkey_send_getspi()
457 free(newmsg); in pfkey_send_getspi()
466 free(newmsg); in pfkey_send_getspi()
481 free(newmsg); in pfkey_send_getspi()
486 len = pfkey_send(so, newmsg, len); in pfkey_send_getspi()
487 free(newmsg); in pfkey_send_getspi()
566 struct sadb_msg *newmsg; in pfkey_send_delete_all() local
600 if ((newmsg = CALLOC((size_t)len, struct sadb_msg *)) == NULL) { in pfkey_send_delete_all()
604 ep = ((caddr_t)(void *)newmsg) + len; in pfkey_send_delete_all()
606 p = pfkey_setsadbmsg((void *)newmsg, ep, SADB_DELETE, (u_int)len, in pfkey_send_delete_all()
609 free(newmsg); in pfkey_send_delete_all()
615 free(newmsg); in pfkey_send_delete_all()
621 free(newmsg); in pfkey_send_delete_all()
626 len = pfkey_send(so, newmsg, len); in pfkey_send_delete_all()
627 free(newmsg); in pfkey_send_delete_all()
703 struct sadb_msg *newmsg; in pfkey_recv_register() local
708 if ((newmsg = pfkey_recv(so)) == NULL) in pfkey_recv_register()
710 if (newmsg->sadb_msg_type == SADB_REGISTER && in pfkey_recv_register()
711 newmsg->sadb_msg_pid == pid) in pfkey_recv_register()
713 free(newmsg); in pfkey_recv_register()
717 newmsg->sadb_msg_len = PFKEY_UNUNIT64(newmsg->sadb_msg_len); in pfkey_recv_register()
719 error = pfkey_set_supported(newmsg, newmsg->sadb_msg_len); in pfkey_recv_register()
720 free(newmsg); in pfkey_recv_register()
1075 struct sadb_msg *newmsg; in pfkey_send_migrate() local
1115 if ((newmsg = CALLOC(len, struct sadb_msg *)) == NULL) { in pfkey_send_migrate()
1119 ep = ((caddr_t)newmsg) + len; in pfkey_send_migrate()
1121 p = pfkey_setsadbmsg((caddr_t)newmsg, ep, SADB_X_MIGRATE, (u_int)len, in pfkey_send_migrate()
1124 free(newmsg); in pfkey_send_migrate()
1129 free(newmsg); in pfkey_send_migrate()
1134 free(newmsg); in pfkey_send_migrate()
1140 len = pfkey_send(so, newmsg, len); in pfkey_send_migrate()
1141 free(newmsg); in pfkey_send_migrate()
1156 struct sadb_msg *newmsg; in pfkey_send_x1() local
1277 if ((newmsg = CALLOC((size_t)len, struct sadb_msg *)) == NULL) { in pfkey_send_x1()
1281 ep = ((caddr_t)(void *)newmsg) + len; in pfkey_send_x1()
1283 p = pfkey_setsadbmsg((void *)newmsg, ep, sa_parms->type, (u_int)len, in pfkey_send_x1()
1286 free(newmsg); in pfkey_send_x1()
1293 free(newmsg); in pfkey_send_x1()
1298 free(newmsg); in pfkey_send_x1()
1304 free(newmsg); in pfkey_send_x1()
1310 free(newmsg); in pfkey_send_x1()
1319 free(newmsg); in pfkey_send_x1()
1328 free(newmsg); in pfkey_send_x1()
1338 free(newmsg); in pfkey_send_x1()
1345 free(newmsg); in pfkey_send_x1()
1354 free(newmsg); in pfkey_send_x1()
1366 free(newmsg); in pfkey_send_x1()
1373 free(newmsg); in pfkey_send_x1()
1380 free(newmsg); in pfkey_send_x1()
1390 free(newmsg); in pfkey_send_x1()
1400 free(newmsg); in pfkey_send_x1()
1409 free(newmsg); in pfkey_send_x1()
1414 len = pfkey_send(sa_parms->so, newmsg, len); in pfkey_send_x1()
1415 free(newmsg); in pfkey_send_x1()
1430 struct sadb_msg *newmsg; in pfkey_send_x2() local
1465 if ((newmsg = CALLOC((size_t)len, struct sadb_msg *)) == NULL) { in pfkey_send_x2()
1469 ep = ((caddr_t)(void *)newmsg) + len; in pfkey_send_x2()
1471 p = pfkey_setsadbmsg((void *)newmsg, ep, type, (u_int)len, satype, 0, in pfkey_send_x2()
1474 free(newmsg); in pfkey_send_x2()
1479 free(newmsg); in pfkey_send_x2()
1485 free(newmsg); in pfkey_send_x2()
1491 free(newmsg); in pfkey_send_x2()
1496 len = pfkey_send(so, newmsg, len); in pfkey_send_x2()
1497 free(newmsg); in pfkey_send_x2()
1513 struct sadb_msg *newmsg; in pfkey_send_x3() local
1545 if ((newmsg = CALLOC((size_t)len, struct sadb_msg *)) == NULL) { in pfkey_send_x3()
1549 ep = ((caddr_t)(void *)newmsg) + len; in pfkey_send_x3()
1551 p = pfkey_setsadbmsg((void *)newmsg, ep, type, (u_int)len, satype, 0, in pfkey_send_x3()
1554 free(newmsg); in pfkey_send_x3()
1559 len = pfkey_send(so, newmsg, len); in pfkey_send_x3()
1560 free(newmsg); in pfkey_send_x3()
1575 struct sadb_msg *newmsg; in pfkey_send_x4() local
1616 if ((newmsg = CALLOC((size_t)len, struct sadb_msg *)) == NULL) { in pfkey_send_x4()
1620 ep = ((caddr_t)(void *)newmsg) + len; in pfkey_send_x4()
1622 p = pfkey_setsadbmsg((void *)newmsg, ep, type, (u_int)len, in pfkey_send_x4()
1625 free(newmsg); in pfkey_send_x4()
1630 free(newmsg); in pfkey_send_x4()
1635 free(newmsg); in pfkey_send_x4()
1641 free(newmsg); in pfkey_send_x4()
1647 len = pfkey_send(so, newmsg, len); in pfkey_send_x4()
1648 free(newmsg); in pfkey_send_x4()
1661 struct sadb_msg *newmsg; in pfkey_send_x5() local
1671 if ((newmsg = CALLOC((size_t)len, struct sadb_msg *)) == NULL) { in pfkey_send_x5()
1675 ep = ((caddr_t)(void *)newmsg) + len; in pfkey_send_x5()
1677 p = pfkey_setsadbmsg((void *)newmsg, ep, type, (u_int)len, in pfkey_send_x5()
1680 free(newmsg); in pfkey_send_x5()
1685 free(newmsg); in pfkey_send_x5()
1695 len = pfkey_send(so, newmsg, len); in pfkey_send_x5()
1696 free(newmsg); in pfkey_send_x5()
1765 struct sadb_msg buf, *newmsg; in pfkey_recv() local
1783 if ((newmsg = CALLOC((size_t)reallen, struct sadb_msg *)) == 0) { in pfkey_recv()
1788 while ((len = recv(so, (void *)newmsg, (socklen_t)reallen, 0)) < 0) { in pfkey_recv()
1792 free(newmsg); in pfkey_recv()
1798 free(newmsg); in pfkey_recv()
1803 if (PFKEY_UNUNIT64(newmsg->sadb_msg_len) != len) { in pfkey_recv()
1805 free(newmsg); in pfkey_recv()
1810 return newmsg; in pfkey_recv()