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 ;
@@ -728,6 +741,40 @@ sctp_print(netdissect_options *ndo,
728
741
chunkLengthRemaining -= payload_size ;
729
742
break ;
730
743
}
744
+ case SCTP_I_FORWARD_TSN :
745
+ {
746
+ const struct sctpIForward * dataHdrPtr ;
747
+ const struct sctpIForwardEntry * entry ;
748
+ const size_t entry_len = sizeof (struct sctpIForwardEntry );
749
+
750
+ ND_ICHECKMSG_ZU ("chunk length" , chunkLengthRemaining , < , sizeof (* dataHdrPtr ));
751
+ dataHdrPtr = (const struct sctpIForward * )bp ;
752
+ ND_PRINT ("[TSN: %u] " , GET_BE_U_4 (dataHdrPtr -> new_cum_TSN ));
753
+
754
+ bp += sizeof (* dataHdrPtr );
755
+ sctpPacketLengthRemaining -= sizeof (* dataHdrPtr );
756
+ chunkLengthRemaining -= sizeof (* dataHdrPtr );
757
+
758
+ if (ndo -> ndo_vflag >= 2 ) {
759
+ while (entry_len <= chunkLengthRemaining ) {
760
+ entry = (const struct sctpIForwardEntry * )bp ;
761
+
762
+ ND_PRINT ("[SID: %u] " , GET_BE_U_2 (entry -> streamId ));
763
+ if ((GET_BE_U_2 (entry -> flag ) & SCTP_I_FORWARD_UNORDERED ))
764
+ ND_PRINT ("(U)" ); /* if U bit is set */
765
+ ND_PRINT ("[MID: %u] " , GET_BE_U_4 (entry -> MID ));
766
+
767
+ chunkLengthRemaining -= entry_len ;
768
+ sctpPacketLengthRemaining -= entry_len ;
769
+ bp += entry_len ;
770
+ }
771
+ }
772
+
773
+ bp += chunkLengthRemaining ;
774
+ sctpPacketLengthRemaining -= chunkLengthRemaining ;
775
+ chunkLengthRemaining = 0 ;
776
+ break ;
777
+ }
731
778
case SCTP_INITIATION :
732
779
{
733
780
const struct sctpInitiation * init ;
0 commit comments