how to get sctp layer from the packet using pcapplusplus library?

86 Views Asked by At
// let's get the TCP layer
pcpp::TcpLayer* tcpLayer = parsedPacket.getLayerOfType<pcpp::TcpLayer>();
if (tcpLayer == NULL) {
    cout << "NO TCP LAYER" << endl;
}
else {
    // change source port
    tcpLayer->getTcpHeader()->portSrc = pcpp::hostToNet16(12345);
    // add URG flag
    tcpLayer->getTcpHeader()->urgFlag = 1;
}

this is the code to get TCP layer from the parsed packet. i want to know how to get the sctp layer from the packet.

i want to get the code of it.

0

There are 0 best solutions below