| 4951 | } |
| 4952 | |
| 4953 | struct mbuf * |
| 4954 | sctp_generate_no_user_data_cause(uint32_t tsn) |
| 4955 | { |
| 4956 | struct mbuf *m; |
| 4957 | struct sctp_error_no_user_data *no_user_data_cause; |
| 4958 | uint16_t len; |
| 4959 | |
| 4960 | len = (uint16_t)sizeof(struct sctp_error_no_user_data); |
| 4961 | m = sctp_get_mbuf_for_msg(len, 0, M_NOWAIT, 1, MT_DATA); |
| 4962 | if (m != NULL) { |
| 4963 | SCTP_BUF_LEN(m) = len; |
| 4964 | no_user_data_cause = mtod(m, struct sctp_error_no_user_data *); |
| 4965 | no_user_data_cause->cause.code = htons(SCTP_CAUSE_NO_USER_DATA); |
| 4966 | no_user_data_cause->cause.length = htons(len); |
| 4967 | no_user_data_cause->tsn = htonl(tsn); |
| 4968 | } |
| 4969 | return (m); |
| 4970 | } |
| 4971 | |
| 4972 | #ifdef SCTP_MBCNT_LOGGING |
| 4973 | void |
no test coverage detected