/illumos-gate/usr/src/test/os-tests/tests/pf_key/ |
H A D | eacq-enabler.c | 35 sadb_msg_t *samsg; in main() local 45 samsg = (sadb_msg_t *)buf; in main() 46 ereg = (sadb_x_ereg_t *)(samsg + 1); in main() 47 samsg->sadb_msg_version = PF_KEY_V2; in main() 48 samsg->sadb_msg_type = SADB_REGISTER; in main() 49 samsg->sadb_msg_errno = 0; in main() 50 samsg->sadb_msg_satype = SADB_SATYPE_UNSPEC; in main() 51 samsg->sadb_msg_reserved = 0; in main() 52 samsg->sadb_msg_seq = 1; in main() 53 samsg->sadb_msg_pid = pid; in main() [all …]
|
H A D | kmc-updater.c | 38 write_and_read(int s, sadb_msg_t *samsg, uint64_t *readbuf, int readlen, in write_and_read() argument 42 uint8_t msgtype = samsg->sadb_msg_type; in write_and_read() 43 pid_t pid = samsg->sadb_msg_pid; in write_and_read() 44 uint8_t seq = samsg->sadb_msg_seq; in write_and_read() 46 rc = write(s, samsg, SADB_64TO8(samsg->sadb_msg_len)); in write_and_read() 51 samsg = (sadb_msg_t *)readbuf; in write_and_read() 56 } while (samsg->sadb_msg_seq != seq || samsg->sadb_msg_pid != pid || in write_and_read() 57 samsg->sadb_msg_type != msgtype); in write_and_read() 59 if (samsg->sadb_msg_errno != expected) { in write_and_read() 60 errno = samsg->sadb_msg_errno; in write_and_read() [all …]
|
/illumos-gate/usr/src/uts/common/inet/ip/ |
H A D | keysock.c | 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() [all …]
|
H A D | ipsecah.c | 530 sadb_msg_t *samsg; in ah_register_out() local 533 uint_t allocsize = sizeof (*samsg); in ah_register_out() 592 nextext = (sadb_ext_t *)(mp->b_cont->b_rptr + sizeof (*samsg)); in ah_register_out() 645 samsg = (sadb_msg_t *)mp->b_cont->b_rptr; in ah_register_out() 646 samsg->sadb_msg_version = PF_KEY_V2; in ah_register_out() 647 samsg->sadb_msg_type = SADB_REGISTER; in ah_register_out() 648 samsg->sadb_msg_errno = 0; in ah_register_out() 649 samsg->sadb_msg_satype = SADB_SATYPE_AH; in ah_register_out() 650 samsg->sadb_msg_len = SADB_8TO64(allocsize); in ah_register_out() 651 samsg->sadb_msg_reserved = 0; in ah_register_out() [all …]
|
H A D | ipsecesp.c | 2767 sadb_msg_t *samsg; in esp_register_out() local 2771 uint_t allocsize = sizeof (*samsg); in esp_register_out() 2840 nextext = (sadb_ext_t *)(pfkey_msg_mp->b_rptr + sizeof (*samsg)); in esp_register_out() 2939 samsg = (sadb_msg_t *)pfkey_msg_mp->b_rptr; in esp_register_out() 2940 samsg->sadb_msg_version = PF_KEY_V2; in esp_register_out() 2941 samsg->sadb_msg_type = SADB_REGISTER; in esp_register_out() 2942 samsg->sadb_msg_errno = 0; in esp_register_out() 2943 samsg->sadb_msg_satype = SADB_SATYPE_ESP; in esp_register_out() 2944 samsg->sadb_msg_len = SADB_8TO64(allocsize); in esp_register_out() 2945 samsg->sadb_msg_reserved = 0; in esp_register_out() [all …]
|
H A D | sadb.c | 543 sadb_msg_t *samsg) in sadb_dump_deliver() argument 550 answer->b_cont = sadb_sa2msg(ipsa, samsg); in sadb_dump_deliver() 594 sadb_msg_t *samsg; in sadb_dump_fanout() local 603 samsg = (sadb_msg_t *)mp->b_cont->b_rptr; in sadb_dump_fanout() 620 walker, samsg); in sadb_dump_fanout() 632 original_answer, walker, samsg); in sadb_dump_fanout() 1068 sadb_sa2msg(ipsa_t *ipsa, sadb_msg_t *samsg) in sadb_sa2msg() argument 1259 *newsamsg = *samsg; in sadb_sa2msg() 1511 sadb_strip(sadb_msg_t *samsg) in sadb_strip() argument 1516 int sofar = SADB_8TO64(sizeof (*samsg)); in sadb_strip() [all …]
|
/illumos-gate/usr/src/uts/common/inet/tcp/ |
H A D | tcp_sig.c | 382 sadb_msg_t *samsg; in tcpsig_sa_expiremsg() local 398 samsg = (sadb_msg_t *)mp->b_rptr; in tcpsig_sa_expiremsg() 399 samsg->sadb_msg_version = PF_KEY_V2; in tcpsig_sa_expiremsg() 400 samsg->sadb_msg_type = SADB_EXPIRE; in tcpsig_sa_expiremsg() 401 samsg->sadb_msg_errno = 0; in tcpsig_sa_expiremsg() 402 samsg->sadb_msg_satype = SADB_X_SATYPE_TCPSIG; in tcpsig_sa_expiremsg() 403 samsg->sadb_msg_reserved = 0; in tcpsig_sa_expiremsg() 404 samsg->sadb_msg_seq = 0; in tcpsig_sa_expiremsg() 405 samsg->sadb_msg_pid = 0; in tcpsig_sa_expiremsg() 406 samsg->sadb_msg_len = (uint16_t)SADB_8TO64(alloclen); in tcpsig_sa_expiremsg() [all …]
|
/illumos-gate/usr/src/lib/libipsecutil/common/ |
H A D | ipsec_util.c | 1736 print_sadb_msg(FILE *file, struct sadb_msg *samsg, time_t wallclock, in print_sadb_msg() argument 1746 samsg->sadb_msg_version); in print_sadb_msg() 1747 switch (samsg->sadb_msg_type) { in print_sadb_msg() 1796 "Unknown (%u)"), samsg->sadb_msg_type); in print_sadb_msg() 1801 switch (samsg->sadb_msg_satype) { in print_sadb_msg() 1829 "<unknown %u>"), samsg->sadb_msg_satype); in print_sadb_msg() 1835 if (samsg->sadb_msg_errno != 0) { in print_sadb_msg() 1838 strerror(samsg->sadb_msg_errno)); in print_sadb_msg() 1839 print_diagnostic(file, samsg->sadb_x_msg_diagnostic); in print_sadb_msg() 1844 SADB_64TO8(samsg->sadb_msg_len), samsg->sadb_msg_seq, in print_sadb_msg() [all …]
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/ipsecutils/ |
H A D | ipseckey.c | 3376 struct sadb_msg *samsg; in domonitor() local 3387 samsg = (struct sadb_msg *)get_buffer; in domonitor() 3390 msg_init(samsg, SADB_X_PROMISC, 1); /* Turn ON promisc. */ in domonitor() 3391 rc = key_write(keysock, samsg, sizeof (*samsg)); in domonitor() 3404 rc = read(keysock, samsg, sizeof (get_buffer)); in domonitor()
|