SctpData header does not decode multiple SCTP data chunks from bundled SCTP packet.

No replies
Joined: 11/14/2016

My application is receiving an SCTP packet with multiple data chunks and I am wondering why the following logic is not decoding the multiple data chunks properly:

PcapPacketHandler jpacketHandler = new PcapPacketHandler() {

public void nextPacket(PcapPacket packet, String user) {
//user defined headers that are registered properly
GREHeader greHeader = new GREHeader();
ERSPANHeader erspanHeader = new ERSPANHeader();
try {
if (packet.hasHeader(greHeader)) {
if (packet.hasHeader(erspanHeader)) {

JPacket jpacket = new JMemoryPacket(Ethernet.ID, erspanHeader.getPayload());
Iterator sctpData = jpacket.iterator(SctpData.class);
//only loops once even though there are 4 data chunks
while (sctpData.hasNext()) {

SctpData current =;
//returns a payload length of all the data chunks
} catch (Throwable ex) {