44
44
// | Chunk Value |
45
45
// | |
46
46
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
47
+ //
48
+ // TODO: Maksim Proshin: add checks on params length
47
49
void
48
50
spindump_protocols_sctp_chunk_header_parse (const unsigned char * header ,
49
51
struct spindump_sctp_chunk_header * decoded ){
@@ -54,6 +56,7 @@ spindump_protocols_sctp_chunk_header_parse(const unsigned char* header,
54
56
}
55
57
56
58
// TODO: Maksim Proshin: add INIT chunk description and function description
59
+ // TODO: Maksim Proshin: add checks on params length
57
60
void
58
61
spindump_protocols_sctp_chunk_init_parse (const unsigned char * header ,
59
62
struct spindump_sctp_chunk_init * decoded ){
@@ -67,3 +70,19 @@ spindump_protocols_sctp_chunk_init_parse(const unsigned char* header,
67
70
spindump_decode2byteint (decoded -> inStreams ,header ,pos ); // Num of Inbound Streams
68
71
spindump_decode4byteint (decoded -> initTsn ,header ,pos ); // Initial TSN
69
72
}
73
+
74
+ // TODO: Maksim Proshin: add INIT ACK chunk description and function description
75
+ // TODO: Maksim Proshin: add checks on params length
76
+ void
77
+ spindump_protocols_sctp_chunk_init_ack_parse (const unsigned char * header ,
78
+ struct spindump_sctp_chunk_init_ack * decoded ){
79
+ unsigned int pos = 0 ;
80
+ spindump_decodebyte (decoded -> header .ch_type ,header ,pos ); // Chunk Type
81
+ spindump_decodebyte (decoded -> header .ch_flags ,header ,pos ); // Chunk Flags
82
+ spindump_decode2byteint (decoded -> header .ch_length ,header ,pos ); // Chunk Length
83
+ spindump_decode4byteint (decoded -> initiateTag ,header ,pos ); // Initiate Tag
84
+ spindump_decode4byteint (decoded -> arwnd ,header ,pos ); // Advertised Receiver Window
85
+ spindump_decode2byteint (decoded -> outStreams ,header ,pos ); // Num of Outbound Streams
86
+ spindump_decode2byteint (decoded -> inStreams ,header ,pos ); // Num of Inbound Streams
87
+ spindump_decode4byteint (decoded -> initTsn ,header ,pos ); // Initial TSN
88
+ }
0 commit comments