Lines Matching refs:sadb_msg
192 sizeof(struct sadb_msg), /* SADB_EXT_RESERVED */
214 sizeof(struct sadb_msg), /* SADB_EXT_RESERVED */
397 struct sadb_msg *msg;
973 if (result->m_len < sizeof(struct sadb_msg)) {
975 sizeof(struct sadb_msg));
983 mtod(result, struct sadb_msg *)->sadb_msg_len =
1914 len = PFKEY_ALIGN8(sizeof(struct sadb_msg));
1924 m_copydata(m, 0, sizeof(struct sadb_msg),
2187 struct sadb_msg *newmsg;
2190 /* create new sadb_msg to reply. */
2209 newmsg = mtod(n, struct sadb_msg *);
2214 mpolicy = m_pulldown(n, PFKEY_ALIGN8(sizeof(struct sadb_msg)),
2348 struct sadb_msg *newmsg;
2352 /* create new sadb_msg to reply. */
2357 newmsg = mtod(n, struct sadb_msg *);
2416 struct sadb_msg *newmsg;
2419 /* create new sadb_msg to reply. */
2420 len = PFKEY_ALIGN8(sizeof(struct sadb_msg));
2439 m_copydata(m, 0, sizeof(struct sadb_msg), mtod(n, caddr_t) + off);
2440 off += PFKEY_ALIGN8(sizeof(struct sadb_msg));
2458 newmsg = mtod(n, struct sadb_msg *);
2574 /* create new sadb_msg to reply. */
2586 mtod(result, struct sadb_msg *)->sadb_msg_len =
2615 struct sadb_msg *newmsg;
2623 if (m->m_len != PFKEY_ALIGN8(sizeof(struct sadb_msg)))
2634 if (sizeof(struct sadb_msg) > m->m_len + M_TRAILINGSPACE(m)) {
2642 m->m_pkthdr.len = m->m_len = PFKEY_ALIGN8(sizeof(struct sadb_msg));
2643 newmsg = mtod(m, struct sadb_msg *);
2769 if (result->m_len < sizeof(struct sadb_msg)) {
2770 result = m_pullup(result, sizeof(struct sadb_msg));
2779 mtod(result, struct sadb_msg *)->sadb_msg_len =
2912 if (result->m_len < sizeof(struct sadb_msg)) {
2913 result = m_pullup(result, sizeof(struct sadb_msg));
2924 mtod(result, struct sadb_msg *)->sadb_msg_len =
3960 if (result->m_len < sizeof(struct sadb_msg)) {
3961 result = m_pullup(result, sizeof(struct sadb_msg));
3970 mtod(result, struct sadb_msg *)->sadb_msg_len =
3982 * set data into sadb_msg.
3993 struct sadb_msg *p;
3996 len = PFKEY_ALIGN8(sizeof(struct sadb_msg));
4012 p = mtod(m, struct sadb_msg *);
5297 struct sadb_msg *newmsg;
5300 /* create new sadb_msg to reply. */
5301 len = PFKEY_ALIGN8(sizeof(struct sadb_msg)) +
5321 m_copydata(m, 0, sizeof(struct sadb_msg), mtod(n, caddr_t) + off);
5322 off += PFKEY_ALIGN8(sizeof(struct sadb_msg));
5343 if (n->m_len < sizeof(struct sadb_msg)) {
5344 n = m_pullup(n, sizeof(struct sadb_msg));
5353 newmsg = mtod(n, struct sadb_msg *);
5912 /* create new sadb_msg to reply. */
5917 if (n->m_len < sizeof(struct sadb_msg)) {
5918 n = m_pullup(n, sizeof(struct sadb_msg));
5922 mtod(n, struct sadb_msg *)->sadb_msg_errno = 0;
5923 mtod(n, struct sadb_msg *)->sadb_msg_len =
6030 struct sadb_msg *newmsg;
6034 /* create new sadb_msg to reply. */
6039 if (n->m_len < sizeof(struct sadb_msg)) {
6040 n = m_pullup(n, sizeof(struct sadb_msg));
6044 newmsg = mtod(n, struct sadb_msg *);
6111 struct sadb_msg *newmsg;
6115 /* create new sadb_msg to reply. */
6120 if (n->m_len < sizeof(struct sadb_msg)) {
6121 n = m_pullup(n, sizeof(struct sadb_msg));
6125 newmsg = mtod(n, struct sadb_msg *);
6223 /* create new sadb_msg to reply. */
6670 if (result->m_len < sizeof(struct sadb_msg)) {
6671 result = m_pullup(result, sizeof(struct sadb_msg));
6682 mtod(result, struct sadb_msg *)->sadb_msg_len =
6836 * message is equal to the size of sadb_msg structure.
6841 if (mhp->msg->sadb_msg_len == PFKEY_UNIT64(sizeof(struct sadb_msg))) {
6994 struct sadb_msg *newmsg;
7001 /* create new sadb_msg to reply. */
7019 len = sizeof(struct sadb_msg) + alen + elen;
7039 m_copydata(m, 0, sizeof(struct sadb_msg), mtod(n, caddr_t) + off);
7040 newmsg = mtod(n, struct sadb_msg *);
7043 off += PFKEY_ALIGN8(sizeof(struct sadb_msg));
7246 if (result->m_len < sizeof(struct sadb_msg)) {
7247 result = m_pullup(result, sizeof(struct sadb_msg));
7258 mtod(result, struct sadb_msg *)->sadb_msg_len =
7287 struct sadb_msg *newmsg;
7335 if (m->m_len < sizeof(struct sadb_msg) ||
7336 sizeof(struct sadb_msg) > m->m_len + M_TRAILINGSPACE(m)) {
7344 m->m_pkthdr.len = m->m_len = sizeof(struct sadb_msg);
7345 newmsg = mtod(m, struct sadb_msg *);
7503 if (olen < sizeof(struct sadb_msg)) {
7510 } else if (olen == sizeof(struct sadb_msg)) {
7535 m_adj(m, PFKEY_ALIGN8(sizeof(struct sadb_msg)));
7570 * parse sadb_msg buffer to process PFKEYv2,
7585 struct sadb_msg *msg;
7599 ipseclog((LOG_DEBUG, "key_parse: passed sadb_msg\n"));
7603 if (m->m_len < sizeof(struct sadb_msg)) {
7604 m = m_pullup(m, sizeof(struct sadb_msg));
7608 msg = mtod(m, struct sadb_msg *);
7841 struct sadb_msg *msg;
7845 if (m->m_len < sizeof(struct sadb_msg))
7848 msg = mtod(m, struct sadb_msg *);
7872 if (m->m_len < sizeof(struct sadb_msg))
7878 mhp->msg = mtod(m, struct sadb_msg *);
7883 for (off = sizeof(struct sadb_msg); off < end; off += extlen) {