Lines Matching refs:samsg

1078 	sadb_msg_t *samsg = (sadb_msg_t *)mp->b_rptr;  in keysock_error()  local
1083 if (samsg->sadb_msg_type < SADB_GETSPI || in keysock_error()
1084 samsg->sadb_msg_type > SADB_MAX) in keysock_error()
1085 samsg->sadb_msg_type = SADB_RESERVED; in keysock_error()
1090 ASSERT(mp->b_rptr + sizeof (*samsg) <= mp->b_datap->db_lim); in keysock_error()
1091 mp->b_wptr = mp->b_rptr + sizeof (*samsg); in keysock_error()
1092 samsg->sadb_msg_len = SADB_8TO64(sizeof (sadb_msg_t)); in keysock_error()
1093 samsg->sadb_msg_errno = (uint8_t)error; in keysock_error()
1094 samsg->sadb_x_msg_diagnostic = (uint16_t)diagnostic; in keysock_error()
1096 keysock_passup(mp, samsg, ks->keysock_serial, NULL, B_FALSE, keystack); in keysock_error()
1380 sadb_msg_t *samsg = (sadb_msg_t *)mp->b_rptr; in keysock_do_flushdump() local
1387 (void) keysock_get_ext(extv, samsg, SADB_64TO8(samsg->sadb_msg_len), in keysock_do_flushdump()
1400 if (samsg->sadb_msg_satype == SADB_SATYPE_UNSPEC) { in keysock_do_flushdump()
1404 start = samsg->sadb_msg_satype; in keysock_do_flushdump()
1405 finish = samsg->sadb_msg_satype; in keysock_do_flushdump()
1576 keysock_inverse_acquire(mblk_t *mp, sadb_msg_t *samsg, sadb_ext_t *extv[], in keysock_inverse_acquire() argument
1608 reply_mp = ipsec_construct_inverse_acquire(samsg, extv, in keysock_inverse_acquire()
1616 keysock_error(ks, mp, samsg->sadb_msg_errno, in keysock_inverse_acquire()
1617 samsg->sadb_x_msg_diagnostic); in keysock_inverse_acquire()
1699 sadb_msg_t *samsg; in keysock_parse() local
1709 samsg = (sadb_msg_t *)mp->b_rptr; in keysock_parse()
1711 samsg->sadb_msg_type)); in keysock_parse()
1713 msgsize = SADB_64TO8(samsg->sadb_msg_len); in keysock_parse()
1741 samsg = (sadb_msg_t *)mp->b_rptr; in keysock_parse()
1745 switch (keysock_get_ext(extv, samsg, msgsize, keystack)) { in keysock_parse()
1784 if (samsg->sadb_msg_satype == SADB_X_SATYPE_TCPSIG) { in keysock_parse()
1785 tcpsig_sa_handler(ks, mp, samsg, extv); in keysock_parse()
1789 switch (samsg->sadb_msg_type) { in keysock_parse()
1799 if (samsg->sadb_msg_satype == SADB_SATYPE_UNSPEC) { in keysock_parse()
1818 if (samsg->sadb_msg_satype != SADB_SATYPE_UNSPEC) { in keysock_parse()
1819 keysock_passdown(ks, mp, samsg->sadb_msg_satype, extv, in keysock_parse()
1827 if (samsg->sadb_msg_satype == SADB_SATYPE_UNSPEC) { in keysock_parse()
1830 keysock_passdown(ks, mp, samsg->sadb_msg_satype, extv, in keysock_parse()
1844 if (samsg->sadb_msg_errno != 0) { in keysock_parse()
1845 satype = samsg->sadb_msg_satype; in keysock_parse()
1868 if (samsg->sadb_msg_satype == SADB_SATYPE_UNSPEC) { in keysock_parse()
1872 keysock_passup(mp, samsg, 0, NULL, B_FALSE, in keysock_parse()
1925 if (samsg->sadb_msg_satype == 0) in keysock_parse()
1929 keysock_passup(mp, samsg, ks->keysock_serial, NULL, B_FALSE, in keysock_parse()
1933 keysock_inverse_acquire(mp, samsg, extv, ks); in keysock_parse()
1937 samsg->sadb_msg_type)); in keysock_parse()
2122 keysock_passup(mblk_t *mp, sadb_msg_t *samsg, minor_t serial, in keysock_passup() argument
2126 uint8_t satype = samsg->sadb_msg_satype; in keysock_passup()
2145 switch (samsg->sadb_msg_type) { in keysock_passup()
2160 samsg->sadb_msg_type)); in keysock_passup()
2181 ASSERT(samsg->sadb_msg_errno != 0); in keysock_passup()
2193 samsg->sadb_msg_satype = satype; in keysock_passup()
2233 samsg->sadb_msg_type)); in keysock_passup()
2396 sadb_msg_t *samsg; in keysock_rput() local
2428 samsg = (sadb_msg_t *)mp1->b_rptr; in keysock_rput()
2429 if (samsg->sadb_msg_type == SADB_FLUSH || in keysock_rput()
2430 (samsg->sadb_msg_type == SADB_DUMP && in keysock_rput()
2431 samsg->sadb_msg_len == SADB_8TO64(sizeof (*samsg)))) { in keysock_rput()
2442 if (samsg->sadb_msg_errno != 0) in keysock_rput()
2444 samsg->sadb_msg_errno; in keysock_rput()
2455 " more to go.\n", samsg->sadb_msg_satype)); in keysock_rput()
2460 samsg->sadb_msg_errno = in keysock_rput()
2462 if (samsg->sadb_msg_type == SADB_DUMP) { in keysock_rput()
2463 samsg->sadb_msg_seq = 0; in keysock_rput()
2466 keysock_passup(mp1, samsg, serial, kc, in keysock_rput()
2467 (samsg->sadb_msg_type == SADB_DUMP), keystack); in keysock_rput()