Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to create tcp packet with custom tcp options? #137

Closed
johnwas opened this issue Aug 26, 2021 · 2 comments
Closed

how to create tcp packet with custom tcp options? #137

johnwas opened this issue Aug 26, 2021 · 2 comments

Comments

@johnwas
Copy link

johnwas commented Aug 26, 2021

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?

@PhyxionNL
Copy link
Collaborator

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

@mrsleepman
Copy link

I have the same problem. I read the source code but don't understand how to use it. Are there any relevant examples?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants