diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-12-08 16:04:00 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-11 19:23:04 +0300 |
commit | ad05a7a05ede28ba6dd935d9e932264a22518b1f (patch) | |
tree | 9a60d1b471879cce652cd1eeae0f0735913aa039 /include/linux/sctp.h | |
parent | 96b120b3c1397c90b64d1f4b2300fb7ce4aa8a68 (diff) | |
download | linux-ad05a7a05ede28ba6dd935d9e932264a22518b1f.tar.xz |
sctp: add basic structures and make chunk function for idata
sctp_idatahdr and sctp_idata_chunk are used to define and parse
I-DATA chunk format, and sctp_make_idata is a function to build
the chunk.
The I-DATA Chunk Format is defined in section 2.1 of RFC8260.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/sctp.h')
-rw-r--r-- | include/linux/sctp.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 6d2bd64b6ffe..38e2cf66195f 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h @@ -243,6 +243,23 @@ struct sctp_data_chunk { struct sctp_datahdr data_hdr; }; +struct sctp_idatahdr { + __be32 tsn; + __be16 stream; + __be16 reserved; + __be32 mid; + union { + __u32 ppid; + __be32 fsn; + }; + __u8 payload[0]; +}; + +struct sctp_idata_chunk { + struct sctp_chunkhdr chunk_hdr; + struct sctp_idatahdr data_hdr; +}; + /* DATA Chuck Specific Flags */ enum { SCTP_DATA_MIDDLE_FRAG = 0x00, |