aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/sm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp/sm.h')
-rw-r--r--include/net/sctp/sm.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 70fb397f65b0..2883c43c5258 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -197,10 +197,14 @@ struct sctp_chunk *sctp_make_cookie_ack(const struct sctp_association *asoc,
197struct sctp_chunk *sctp_make_cwr(const struct sctp_association *asoc, 197struct sctp_chunk *sctp_make_cwr(const struct sctp_association *asoc,
198 const __u32 lowest_tsn, 198 const __u32 lowest_tsn,
199 const struct sctp_chunk *chunk); 199 const struct sctp_chunk *chunk);
200struct sctp_chunk *sctp_make_datafrag_empty(struct sctp_association *asoc, 200struct sctp_chunk *sctp_make_idata(const struct sctp_association *asoc,
201 __u8 flags, int paylen, gfp_t gfp);
202struct sctp_chunk *sctp_make_ifwdtsn(const struct sctp_association *asoc,
203 __u32 new_cum_tsn, size_t nstreams,
204 struct sctp_ifwdtsn_skip *skiplist);
205struct sctp_chunk *sctp_make_datafrag_empty(const struct sctp_association *asoc,
201 const struct sctp_sndrcvinfo *sinfo, 206 const struct sctp_sndrcvinfo *sinfo,
202 int len, const __u8 flags, 207 int len, __u8 flags, gfp_t gfp);
203 __u16 ssn, gfp_t gfp);
204struct sctp_chunk *sctp_make_ecne(const struct sctp_association *asoc, 208struct sctp_chunk *sctp_make_ecne(const struct sctp_association *asoc,
205 const __u32 lowest_tsn); 209 const __u32 lowest_tsn);
206struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc); 210struct sctp_chunk *sctp_make_sack(const struct sctp_association *asoc);
@@ -342,7 +346,7 @@ static inline __u16 sctp_data_size(struct sctp_chunk *chunk)
342 __u16 size; 346 __u16 size;
343 347
344 size = ntohs(chunk->chunk_hdr->length); 348 size = ntohs(chunk->chunk_hdr->length);
345 size -= sizeof(struct sctp_data_chunk); 349 size -= sctp_datahdr_len(&chunk->asoc->stream);
346 350
347 return size; 351 return size;
348} 352}
@@ -358,6 +362,12 @@ static inline __u16 sctp_data_size(struct sctp_chunk *chunk)
358 typecheck(__u32, b) && \ 362 typecheck(__u32, b) && \
359 ((__s32)((a) - (b)) <= 0)) 363 ((__s32)((a) - (b)) <= 0))
360 364
365/* Compare two MIDs */
366#define MID_lt(a, b) \
367 (typecheck(__u32, a) && \
368 typecheck(__u32, b) && \
369 ((__s32)((a) - (b)) < 0))
370
361/* Compare two SSNs */ 371/* Compare two SSNs */
362#define SSN_lt(a,b) \ 372#define SSN_lt(a,b) \
363 (typecheck(__u16, a) && \ 373 (typecheck(__u16, a) && \