Skip to content

Commit fb63b3b

Browse files
Add comprehensive SCTP protocol support
Implement full SCTP (Stream Control Transmission Protocol) layer with support for: Core Protocol (RFC 9260): - All standard chunk types (DATA, INIT, INIT-ACK, SACK, HEARTBEAT, ABORT, SHUTDOWN, ERROR, COOKIE-ECHO, COOKIE-ACK, ECNE, CWR, SHUTDOWN-COMPLETE) - CRC32c checksum calculation and validation - Chunk and parameter action bits helpers - Bundling validation per RFC 9260 - Host Name Address deprecation detection Extensions: - AUTH chunk with HMAC-SHA1/SHA256 computation and verification (RFC 4895) - ASCONF/ASCONF-ACK for dynamic address reconfiguration (RFC 5061) - RE-CONFIG for stream reconfiguration (RFC 6525) - FORWARD-TSN for partial reliability (RFC 3758) - I-DATA and I-FORWARD-TSN for message interleaving (RFC 8260) - PAD chunk (RFC 4820) - NR-SACK experimental support (IANA registered, draft-based) - Zero Checksum Acceptable parameter (RFC 9653) Additional features: - Parameter iterators for INIT, RE-CONFIG, and ASCONF chunks - Error cause iterator for ABORT/ERROR chunks - Extended PPID enum with 70+ protocol identifiers from IANA registry - Chunk creation APIs for building SCTP packets Includes 72 test cases covering parsing, creation, and validation.
1 parent 9e03913 commit fb63b3b

22 files changed

+8882
-27
lines changed

Packet++/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ add_library(
4646
src/RadiusLayer.cpp
4747
src/RawPacket.cpp
4848
src/S7CommLayer.cpp
49+
src/SctpLayer.cpp
4950
src/SdpLayer.cpp
5051
src/SingleCommandTextProtocol.cpp
5152
src/SipLayer.cpp
@@ -125,6 +126,7 @@ set(
125126
header/RadiusLayer.h
126127
header/RawPacket.h
127128
header/S7CommLayer.h
129+
header/SctpLayer.h
128130
header/SdpLayer.h
129131
header/SingleCommandTextProtocol.h
130132
header/SipLayer.h

Packet++/header/IPv4Layer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ namespace pcpp
9797
PACKETPP_IPPROTO_DSTOPTS = 60,
9898
/// VRRP protocol
9999
PACKETPP_IPPROTO_VRRP = 112,
100+
/// SCTP (Stream Control Transmission Protocol)
101+
PACKETPP_IPPROTO_SCTP = 132,
100102
/// Raw IP packets
101103
PACKETPP_IPPROTO_RAW = 255,
102104
/// Maximum value

Packet++/header/ProtocolType.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ namespace pcpp
254254
/// FTP protocol family (FTPControl and FtpData protocols)
255255
const ProtocolTypeFamily FTP = 0x3c29;
256256

257+
/// SCTP (Stream Control Transmission Protocol)
258+
const ProtocolType SCTP = 62;
259+
257260
/// @}
258261

259262
/// An enum representing OSI model layers

0 commit comments

Comments
 (0)