Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tcp: fixed TcpHeader parsim/unparsim (issue #961)
Verified with next code in Tcp::handleLowerPacket(): { cCommBuffer *b = check_and_cast<cCommBuffer *>(createOne("omnetpp::cMemCommBuffer")); tcpHeader.get()->parsimPack(b); auto h = makeShared<TcpHeader>(); h->parsimUnpack(b); ASSERT(h->getChunkLength() == tcpHeader->getChunkLength()); ASSERT(h->getHeaderOptionArrayLength() == tcpHeader->getHeaderOptionArrayLength()); MemoryOutputStream s1, s2; Chunk::serialize(s1, tcpHeader); Chunk::serialize(s2, h); ASSERT(s1.getData() == s2.getData()); }
- Loading branch information