Lines Matching refs:samsg
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()
54 samsg->sadb_msg_len = SADB_8TO64(sizeof (*samsg) + sizeof (*ereg)); in main()
63 rc = write(s, buf, sizeof (*samsg) + sizeof (*ereg)); in main()
78 } while (samsg->sadb_msg_seq != 1 || in main()
79 samsg->sadb_msg_pid != pid || in main()
80 samsg->sadb_msg_type != SADB_REGISTER); in main()
82 if (samsg->sadb_msg_errno != 0) { in main()
83 if (samsg->sadb_msg_errno == EPROTONOSUPPORT) { in main()
85 samsg->sadb_msg_satype); in main()
87 errno = samsg->sadb_msg_errno; in main()
92 switch (samsg->sadb_msg_satype) { in main()
101 samsg->sadb_msg_satype); in main()