MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sctp_generate_no_user_data_cause

Function sctp_generate_no_user_data_cause

freebsd/netinet/sctputil.c:4953–4970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4951}
4952
4953struct mbuf *
4954sctp_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
4973void

Callers 1

Calls 1

sctp_get_mbuf_for_msgFunction · 0.85

Tested by

no test coverage detected