dotpcap/packetnet

how to create tcp packet with custom tcp options?

johnwas opened this issue · 2 comments

I can create a tcp packet with class TcpPacket by using constructor:
public TcpPacket(ushort sourcePort, ushort destinationPort)

But if I Change Property OptionsCollection, it will throw exception, becouse the tcp header's length is not big enough to hold the options. Is this a bug or not implemented?

You need to preallocate a buffer large enough to hold the data.