Skip to content

Return Ipv4Packet in Packet builder #2

@zhitaoli-6

Description

@zhitaoli-6

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions