Skip to content

Commit 2fc019f

Browse files
marceloleitnerdavem330
authored andcommitted
sctp: introduce sctp_chunk_stream_no
Add a helper to fetch the stream number from a given chunk. Tested-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f952be7 commit 2fc019f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎include/net/sctp/structs.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,11 @@ void sctp_init_addrs(struct sctp_chunk *, union sctp_addr *,
642642
union sctp_addr *);
643643
const union sctp_addr *sctp_source(const struct sctp_chunk *chunk);
644644

645+
static inline __u16 sctp_chunk_stream_no(struct sctp_chunk *ch)
646+
{
647+
return ntohs(ch->subh.data_hdr->stream);
648+
}
649+
645650
enum {
646651
SCTP_ADDR_NEW, /* new address added to assoc/ep */
647652
SCTP_ADDR_SRC, /* address can be used as source */

0 commit comments

Comments
 (0)