Retire SCTP_BUF_EXTEND_SIZE. This patch was suggested by
Robert Watson.
This commit is contained in:
parent
a5e9a6d56f
commit
296d0b9495
@ -381,17 +381,7 @@ sctp_get_mbuf_for_msg(unsigned int space_needed, int want_header,
|
||||
return (m);
|
||||
}
|
||||
if (allonebuf) {
|
||||
int siz;
|
||||
|
||||
if (SCTP_BUF_IS_EXTENDED(m)) {
|
||||
siz = SCTP_BUF_EXTEND_SIZE(m);
|
||||
} else {
|
||||
if (want_header)
|
||||
siz = MHLEN;
|
||||
else
|
||||
siz = MLEN;
|
||||
}
|
||||
if (siz < space_needed) {
|
||||
if (SCTP_BUF_SIZE(m) < space_needed) {
|
||||
m_freem(m);
|
||||
return (NULL);
|
||||
}
|
||||
|
@ -5967,19 +5967,6 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
sctp_print_mbuf_chain(struct mbuf *m)
|
||||
{
|
||||
for (; m; m = SCTP_BUF_NEXT(m)) {
|
||||
SCTP_PRINTF("%p: m_len = %ld\n", (void *)m, SCTP_BUF_LEN(m));
|
||||
if (SCTP_BUF_IS_EXTENDED(m))
|
||||
SCTP_PRINTF("%p: extend_size = %d\n", (void *)m, SCTP_BUF_EXTEND_SIZE(m));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef INET
|
||||
void
|
||||
sctp_input_with_port(struct mbuf *i_pak, int off, uint16_t port)
|
||||
|
@ -299,7 +299,7 @@ typedef struct callout sctp_os_timer_t;
|
||||
#define SCTP_BUF_RESV_UF(m, size) m->m_data += size
|
||||
#define SCTP_BUF_AT(m, size) m->m_data + size
|
||||
#define SCTP_BUF_IS_EXTENDED(m) (m->m_flags & M_EXT)
|
||||
#define SCTP_BUF_EXTEND_SIZE(m) (m->m_ext.ext_size)
|
||||
#define SCTP_BUF_SIZE M_SIZE
|
||||
#define SCTP_BUF_TYPE(m) (m->m_type)
|
||||
#define SCTP_BUF_RECVIF(m) (m->m_pkthdr.rcvif)
|
||||
#define SCTP_BUF_PREPEND M_PREPEND
|
||||
|
Loading…
Reference in New Issue
Block a user