* Set data into sadb_x_sa_replay. */
| 3887 | * Set data into sadb_x_sa_replay. |
| 3888 | */ |
| 3889 | static struct mbuf * |
| 3890 | key_setsadbxsareplay(u_int32_t replay) |
| 3891 | { |
| 3892 | struct mbuf *m; |
| 3893 | struct sadb_x_sa_replay *p; |
| 3894 | size_t len; |
| 3895 | |
| 3896 | len = PFKEY_ALIGN8(sizeof(struct sadb_x_sa_replay)); |
| 3897 | m = m_get2(len, M_NOWAIT, MT_DATA, 0); |
| 3898 | if (m == NULL) |
| 3899 | return (NULL); |
| 3900 | m_align(m, len); |
| 3901 | m->m_len = len; |
| 3902 | p = mtod(m, struct sadb_x_sa_replay *); |
| 3903 | |
| 3904 | bzero(p, len); |
| 3905 | p->sadb_x_sa_replay_len = PFKEY_UNIT64(len); |
| 3906 | p->sadb_x_sa_replay_exttype = SADB_X_EXT_SA_REPLAY; |
| 3907 | p->sadb_x_sa_replay_replay = (replay << 3); |
| 3908 | |
| 3909 | return m; |
| 3910 | } |
| 3911 | |
| 3912 | /* |
| 3913 | * Set a type in sadb_x_nat_t_type. |
no test coverage detected