Lines Matching refs:mhp
200 caddr_t mhp[SADB_EXT_MAX + 1]; in pfkey_handler() local
242 if (pfkey_align(msg, mhp)) { in pfkey_handler()
248 if (pfkey_check(mhp)) { in pfkey_handler()
254 msg = (struct sadb_msg *)mhp[0]; in pfkey_handler()
271 if ((pkrecvf[msg->sadb_msg_type])(mhp) < 0) in pfkey_handler()
928 pk_recvgetspi(mhp) in pk_recvgetspi() argument
929 caddr_t *mhp; in pk_recvgetspi()
941 if (mhp[SADB_EXT_SA] == NULL
942 || mhp[SADB_EXT_ADDRESS_DST] == NULL) {
947 msg = (struct sadb_msg *)mhp[0];
948 sa = (struct sadb_sa *)mhp[SADB_EXT_SA];
949 dst = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_SRC]); /* note SA dir */
1170 pk_recvupdate(mhp) in pk_recvupdate() argument
1171 caddr_t *mhp; in pk_recvupdate()
1186 if (mhp[0] == NULL
1187 || mhp[SADB_EXT_SA] == NULL
1188 || mhp[SADB_EXT_ADDRESS_SRC] == NULL
1189 || mhp[SADB_EXT_ADDRESS_DST] == NULL) {
1194 msg = (struct sadb_msg *)mhp[0];
1195 src = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_SRC]);
1196 dst = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_DST]);
1197 sa = (struct sadb_sa *)mhp[SADB_EXT_SA];
1199 sa_mode = mhp[SADB_X_EXT_SA2] == NULL
1201 : ((struct sadb_x_sa2 *)mhp[SADB_X_EXT_SA2])->sadb_x_sa2_mode;
1460 pk_recvadd(mhp) in pk_recvadd() argument
1461 caddr_t *mhp; in pk_recvadd()
1474 if (mhp[0] == NULL
1475 || mhp[SADB_EXT_SA] == NULL
1476 || mhp[SADB_EXT_ADDRESS_SRC] == NULL
1477 || mhp[SADB_EXT_ADDRESS_DST] == NULL) {
1482 msg = (struct sadb_msg *)mhp[0];
1483 src = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_SRC]);
1484 dst = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_DST]);
1485 sa = (struct sadb_sa *)mhp[SADB_EXT_SA];
1487 sa_mode = mhp[SADB_X_EXT_SA2] == NULL
1489 : ((struct sadb_x_sa2 *)mhp[SADB_X_EXT_SA2])->sadb_x_sa2_mode;
1525 pk_recvexpire(mhp) in pk_recvexpire() argument
1526 caddr_t *mhp; in pk_recvexpire()
1535 if (mhp[0] == NULL
1536 || mhp[SADB_EXT_SA] == NULL
1537 || mhp[SADB_EXT_ADDRESS_SRC] == NULL
1538 || mhp[SADB_EXT_ADDRESS_DST] == NULL
1539 || (mhp[SADB_EXT_LIFETIME_HARD] != NULL
1540 && mhp[SADB_EXT_LIFETIME_SOFT] != NULL)) {
1545 msg = (struct sadb_msg *)mhp[0];
1546 sa = (struct sadb_sa *)mhp[SADB_EXT_SA];
1547 src = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_SRC]);
1548 dst = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_DST]);
1550 sa_mode = mhp[SADB_X_EXT_SA2] == NULL
1552 : ((struct sadb_x_sa2 *)mhp[SADB_X_EXT_SA2])->sadb_x_sa2_mode;
1635 pk_recvacquire(mhp) in pk_recvacquire() argument
1636 caddr_t *mhp; in pk_recvacquire()
1657 if (mhp[0] == NULL
1658 || mhp[SADB_EXT_ADDRESS_SRC] == NULL
1659 || mhp[SADB_EXT_ADDRESS_DST] == NULL
1660 || mhp[SADB_X_EXT_POLICY] == NULL) {
1665 msg = (struct sadb_msg *)mhp[0];
1666 xpl = (struct sadb_x_policy *)mhp[SADB_X_EXT_POLICY];
1667 src = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_SRC]);
1668 dst = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_DST]);
1671 m_sec_ctx = (struct sadb_x_sec_ctx *)mhp[SADB_X_EXT_SEC_CTX];
1695 struct sockaddr *sa = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_DST]);
1721 struct sockaddr *sa = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_SRC]);
1823 iph2[n]->dst = dupsaddr(PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_DST]));
1828 iph2[n]->src = dupsaddr(PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_SRC]));
1921 pk_recvdelete(mhp) in pk_recvdelete() argument
1922 caddr_t *mhp; in pk_recvdelete()
1935 if (mhp[0] == NULL
1936 || mhp[SADB_EXT_SA] == NULL
1937 || mhp[SADB_EXT_ADDRESS_SRC] == NULL
1938 || mhp[SADB_EXT_ADDRESS_DST] == NULL) {
1943 msg = (struct sadb_msg *)mhp[0];
1944 sa = (struct sadb_sa *)mhp[SADB_EXT_SA];
1945 src = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_SRC]);
1946 dst = PFKEY_ADDR_SADDR(mhp[SADB_EXT_ADDRESS_DST]);
1991 pk_recvflush(mhp) in pk_recvflush() argument
1992 caddr_t *mhp; in pk_recvflush()
1999 if (mhp[0] == NULL) {
2217 pk_recvspdupdate(mhp) in pk_recvspdupdate() argument
2218 caddr_t *mhp; in pk_recvspdupdate()
2228 if (mhp[0] == NULL
2229 || mhp[SADB_EXT_ADDRESS_SRC] == NULL
2230 || mhp[SADB_EXT_ADDRESS_DST] == NULL
2231 || mhp[SADB_X_EXT_POLICY] == NULL) {
2236 saddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_SRC];
2237 daddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_DST];
2238 xpl = (struct sadb_x_policy *)mhp[SADB_X_EXT_POLICY];
2239 lt = (struct sadb_lifetime*)mhp[SADB_EXT_LIFETIME_HARD];
2267 if (mhp[SADB_X_EXT_SEC_CTX] != NULL) {
2270 ctx = (struct sadb_x_sec_ctx *)mhp[SADB_X_EXT_SEC_CTX];
2288 if (addnewsp(mhp) < 0)
2339 pk_recvspdadd(mhp) in pk_recvspdadd() argument
2340 caddr_t *mhp; in pk_recvspdadd()
2350 if (mhp[0] == NULL
2351 || mhp[SADB_EXT_ADDRESS_SRC] == NULL
2352 || mhp[SADB_EXT_ADDRESS_DST] == NULL
2353 || mhp[SADB_X_EXT_POLICY] == NULL) {
2358 saddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_SRC];
2359 daddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_DST];
2360 xpl = (struct sadb_x_policy *)mhp[SADB_X_EXT_POLICY];
2361 lt = (struct sadb_lifetime*)mhp[SADB_EXT_LIFETIME_HARD];
2389 if (mhp[SADB_X_EXT_SEC_CTX] != NULL) {
2392 ctx = (struct sadb_x_sec_ctx *)mhp[SADB_X_EXT_SEC_CTX];
2410 if (addnewsp(mhp) < 0)
2456 pk_recvspddelete(mhp) in pk_recvspddelete() argument
2457 caddr_t *mhp; in pk_recvspddelete()
2467 if (mhp[0] == NULL
2468 || mhp[SADB_EXT_ADDRESS_SRC] == NULL
2469 || mhp[SADB_EXT_ADDRESS_DST] == NULL
2470 || mhp[SADB_X_EXT_POLICY] == NULL) {
2475 saddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_SRC];
2476 daddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_DST];
2477 xpl = (struct sadb_x_policy *)mhp[SADB_X_EXT_POLICY];
2478 lt = (struct sadb_lifetime*)mhp[SADB_EXT_LIFETIME_HARD];
2506 if (mhp[SADB_X_EXT_SEC_CTX] != NULL) {
2509 ctx = (struct sadb_x_sec_ctx *)mhp[SADB_X_EXT_SEC_CTX];
2532 pk_recvspdexpire(mhp) in pk_recvspdexpire() argument
2533 caddr_t *mhp; in pk_recvspdexpire()
2543 if (mhp[0] == NULL
2544 || mhp[SADB_EXT_ADDRESS_SRC] == NULL
2545 || mhp[SADB_EXT_ADDRESS_DST] == NULL
2546 || mhp[SADB_X_EXT_POLICY] == NULL) {
2551 saddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_SRC];
2552 daddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_DST];
2553 xpl = (struct sadb_x_policy *)mhp[SADB_X_EXT_POLICY];
2554 lt = (struct sadb_lifetime*)mhp[SADB_EXT_LIFETIME_HARD];
2582 if (mhp[SADB_X_EXT_SEC_CTX] != NULL) {
2585 ctx = (struct sadb_x_sec_ctx *)mhp[SADB_X_EXT_SEC_CTX];
2608 pk_recvspdget(mhp) in pk_recvspdget() argument
2609 caddr_t *mhp; in pk_recvspdget()
2612 if (mhp[0] == NULL) {
2622 pk_recvspddump(mhp) in pk_recvspddump() argument
2623 caddr_t *mhp; in pk_recvspddump()
2634 if (mhp[0] == NULL) {
2639 msg = (struct sadb_msg *)mhp[0];
2641 saddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_SRC];
2642 daddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_DST];
2643 xpl = (struct sadb_x_policy *)mhp[SADB_X_EXT_POLICY];
2644 lt = (struct sadb_lifetime*)mhp[SADB_EXT_LIFETIME_HARD];
2678 if (mhp[SADB_X_EXT_SEC_CTX] != NULL) {
2681 ctx = (struct sadb_x_sec_ctx *)mhp[SADB_X_EXT_SEC_CTX];
2699 if (addnewsp(mhp) < 0)
2706 pk_recvspdflush(mhp) in pk_recvspdflush() argument
2707 caddr_t *mhp; in pk_recvspdflush()
2710 if (mhp[0] == NULL) {
2883 addnewsp(mhp) in addnewsp() argument
2884 caddr_t *mhp; in addnewsp()
2893 if (mhp[SADB_EXT_ADDRESS_SRC] == NULL
2894 || mhp[SADB_EXT_ADDRESS_DST] == NULL
2895 || mhp[SADB_X_EXT_POLICY] == NULL) {
2901 saddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_SRC];
2902 daddr = (struct sadb_address *)mhp[SADB_EXT_ADDRESS_DST];
2903 xpl = (struct sadb_x_policy *)mhp[SADB_X_EXT_POLICY];
2904 lt = (struct sadb_lifetime*)mhp[SADB_EXT_LIFETIME_HARD];
2909 lt = (struct sadb_lifetime*)mhp[SADB_EXT_LIFETIME_HARD];
3082 if (mhp[SADB_X_EXT_SEC_CTX] != NULL) {
3085 ctx = (struct sadb_x_sec_ctx *)mhp[SADB_X_EXT_SEC_CTX];