aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/constants.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp/constants.h')
-rw-r--r--include/net/sctp/constants.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index deaafa9b09cb..20ff237c5eb2 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -145,12 +145,13 @@ SCTP_SUBTYPE_CONSTRUCTOR(OTHER, enum sctp_event_other, other)
145SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, enum sctp_event_primitive, primitive) 145SCTP_SUBTYPE_CONSTRUCTOR(PRIMITIVE, enum sctp_event_primitive, primitive)
146 146
147 147
148#define sctp_chunk_is_data(a) (a->chunk_hdr->type == SCTP_CID_DATA) 148#define sctp_chunk_is_data(a) (a->chunk_hdr->type == SCTP_CID_DATA || \
149 a->chunk_hdr->type == SCTP_CID_I_DATA)
149 150
150/* Calculate the actual data size in a data chunk */ 151/* Calculate the actual data size in a data chunk */
151#define SCTP_DATA_SNDSIZE(c) ((int)((unsigned long)(c->chunk_end)\ 152#define SCTP_DATA_SNDSIZE(c) ((int)((unsigned long)(c->chunk_end) - \
152 - (unsigned long)(c->chunk_hdr)\ 153 (unsigned long)(c->chunk_hdr) - \
153 - sizeof(struct sctp_data_chunk))) 154 sctp_datachk_len(&c->asoc->stream)))
154 155
155/* Internal error codes */ 156/* Internal error codes */
156enum sctp_ierror { 157enum sctp_ierror {