diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-12-14 11:41:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-15 13:52:21 -0500 |
commit | 2d07a49aded490a0a4a2748e64030a0f59b6b8be (patch) | |
tree | 002bb4a971000aeeadcc77611c04136314d20496 /include/linux/sctp.h | |
parent | 024778095aa340960fdfd7f7db293290454fbce2 (diff) |
sctp: add basic structures and make chunk function for ifwdtsn
sctp_ifwdtsn_skip, sctp_ifwdtsn_hdr and sctp_ifwdtsn_chunk are used to
define and parse I-FWD TSN chunk format, and sctp_make_ifwdtsn is a
function to build the chunk.
The I-FORWARD-TSN Chunk Format is defined in section 2.3.1 of RFC8260.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo R. Leitner <marcelo.leitner@gmail.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 38e2cf66195f..b36c76635f18 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h | |||
@@ -110,6 +110,7 @@ enum sctp_cid { | |||
110 | 110 | ||
111 | /* Use hex, as defined in ADDIP sec. 3.1 */ | 111 | /* Use hex, as defined in ADDIP sec. 3.1 */ |
112 | SCTP_CID_ASCONF = 0xC1, | 112 | SCTP_CID_ASCONF = 0xC1, |
113 | SCTP_CID_I_FWD_TSN = 0xC2, | ||
113 | SCTP_CID_ASCONF_ACK = 0x80, | 114 | SCTP_CID_ASCONF_ACK = 0x80, |
114 | SCTP_CID_RECONF = 0x82, | 115 | SCTP_CID_RECONF = 0x82, |
115 | }; /* enum */ | 116 | }; /* enum */ |
@@ -616,6 +617,22 @@ struct sctp_fwdtsn_chunk { | |||
616 | struct sctp_fwdtsn_hdr fwdtsn_hdr; | 617 | struct sctp_fwdtsn_hdr fwdtsn_hdr; |
617 | }; | 618 | }; |
618 | 619 | ||
620 | struct sctp_ifwdtsn_skip { | ||
621 | __be16 stream; | ||
622 | __u8 reserved; | ||
623 | __u8 flags; | ||
624 | __be32 mid; | ||
625 | }; | ||
626 | |||
627 | struct sctp_ifwdtsn_hdr { | ||
628 | __be32 new_cum_tsn; | ||
629 | struct sctp_ifwdtsn_skip skip[0]; | ||
630 | }; | ||
631 | |||
632 | struct sctp_ifwdtsn_chunk { | ||
633 | struct sctp_chunkhdr chunk_hdr; | ||
634 | struct sctp_ifwdtsn_hdr fwdtsn_hdr; | ||
635 | }; | ||
619 | 636 | ||
620 | /* ADDIP | 637 | /* ADDIP |
621 | * Section 3.1.1 Address Configuration Change Chunk (ASCONF) | 638 | * Section 3.1.1 Address Configuration Change Chunk (ASCONF) |