mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-21 14:21:48 +00:00
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>
This commit is contained in:
parent
96b120b3c1
commit
ad05a7a05e
4 changed files with 26 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue