114
114
#define SCTP_I_DATA 0x40
115
115
#define SCTP_FORWARD_CUM_TSN 0xc0
116
116
#define SCTP_RELIABLE_CNTL 0xc1
117
- #define SCTP_RELIABLE_CNTL_ACK 0xc2
117
+ #define SCTP_I_FORWARD_TSN 0xc2
118
118
119
119
static const struct tok sctp_chunkid_str [] = {
120
120
{ SCTP_DATA , "DATA" },
@@ -135,7 +135,7 @@ static const struct tok sctp_chunkid_str[] = {
135
135
{ SCTP_I_DATA , "I-DATA" },
136
136
{ SCTP_FORWARD_CUM_TSN , "FOR CUM TSN" },
137
137
{ SCTP_RELIABLE_CNTL , "REL CTRL" },
138
- { SCTP_RELIABLE_CNTL_ACK , "REL CTRL ACK" },
138
+ { SCTP_I_FORWARD_TSN , "I-FORWARD-FSN" },
139
139
{ 0 , NULL }
140
140
};
141
141
@@ -148,6 +148,9 @@ static const struct tok sctp_chunkid_str[] = {
148
148
#define SCTP_DATA_UNORDERED 0x04
149
149
#define SCTP_DATA_SACK_IMM 0x08
150
150
151
+ /* I-Forward-TSN Specific Flag */
152
+ #define SCTP_I_FORWARD_UNORDERED 0x01
153
+
151
154
#define SCTP_ADDRMAX 60
152
155
153
156
#define CHAN_HP 6704
@@ -361,6 +364,16 @@ struct sctpIData{
361
364
nd_uint32_t PPID_FSN ;
362
365
};
363
366
367
+ struct sctpIForward {
368
+ nd_uint32_t new_cum_TSN ;
369
+ };
370
+
371
+ struct sctpIForwardEntry {
372
+ nd_uint16_t streamId ;
373
+ nd_uint16_t flag ;
374
+ nd_uint32_t MID ;
375
+ };
376
+
364
377
struct sctpUnifiedDatagram {
365
378
struct sctpChunkDesc uh ;
366
379
struct sctpDataPart dp ;
@@ -729,6 +742,40 @@ sctp_print(netdissect_options *ndo,
729
742
chunkLengthRemaining -= payload_size ;
730
743
break ;
731
744
}
745
+ case SCTP_I_FORWARD_TSN :
746
+ {
747
+ const struct sctpIForward * dataHdrPtr ;
748
+ const struct sctpIForwardEntry * entry ;
749
+ const size_t entry_len = sizeof (struct sctpIForwardEntry );
750
+
751
+ ND_ICHECKMSG_ZU ("chunk length" , chunkLengthRemaining , < , sizeof (* dataHdrPtr ));
752
+ dataHdrPtr = (const struct sctpIForward * )bp ;
753
+ ND_PRINT ("[TSN: %u] " , GET_BE_U_4 (dataHdrPtr -> new_cum_TSN ));
754
+
755
+ bp += sizeof (* dataHdrPtr );
756
+ sctpPacketLengthRemaining -= sizeof (* dataHdrPtr );
757
+ chunkLengthRemaining -= sizeof (* dataHdrPtr );
758
+
759
+ if (ndo -> ndo_vflag >= 2 ) {
760
+ while (entry_len <= chunkLengthRemaining ) {
761
+ entry = (const struct sctpIForwardEntry * )bp ;
762
+
763
+ ND_PRINT ("[SID: %u] " , GET_BE_U_2 (entry -> streamId ));
764
+ if ((GET_BE_U_2 (entry -> flag ) & SCTP_I_FORWARD_UNORDERED ))
765
+ ND_PRINT ("(U)" ); /* if U bit is set */
766
+ ND_PRINT ("[MID: %u] " , GET_BE_U_4 (entry -> MID ));
767
+
768
+ chunkLengthRemaining -= entry_len ;
769
+ sctpPacketLengthRemaining -= entry_len ;
770
+ bp += entry_len ;
771
+ }
772
+ }
773
+
774
+ bp += chunkLengthRemaining ;
775
+ sctpPacketLengthRemaining -= chunkLengthRemaining ;
776
+ chunkLengthRemaining = 0 ;
777
+ break ;
778
+ }
732
779
case SCTP_INITIATION :
733
780
{
734
781
const struct sctpInitiation * init ;
0 commit comments