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

Return Ipv4Packet in Packet builder #2

Open
zhitaoli-6 opened this issue Aug 28, 2024 · 0 comments
Open

Return Ipv4Packet in Packet builder #2

zhitaoli-6 opened this issue Aug 28, 2024 · 0 comments

Comments

@zhitaoli-6
Copy link

zhitaoli-6 commented Aug 28, 2024

Hi, thank you for this open source project! It does help me to use pnet.

I have some comment for the following code:

/// Convert `Pkt` to a immutable `TcpPacket`

Ipv4Packet maybe more clear because we are working in Lay3 though TcpPacket can work here. I have test Ipv4Packet here and it does work.

BTW, could you tell me why total_length can be missing in the ip_header? It seems that someone replaces this field with the right value and re-calculate the CRC of ip header.

// Miss: total length

@zhitaoli-6 zhitaoli-6 changed the title Ipv4Packet maybe more clear because we are working in Lay3 though TcpPacket can work here Return Ipv4Packet in Packet builder Aug 28, 2024
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

1 participant