Struct netsim::wire::Ipv4Packet [] [src]

pub struct Ipv4Packet { /* fields omitted */ }

An Ipv4 packet.

Methods

impl Ipv4Packet
[src]

[src]

Create a new Ipv4Packet with the given header fields and payload. If you are also creating the packet's payload data it can be more efficient to use new_from_fields_recursive and save an allocation/copy.

[src]

Create a new Ipv4Packet with the given header fields and payload fields.

[src]

Create a new Ipv4 packet by writing it to the given empty buffer.

[src]

Parse an Ipv4 packet from the given buffer.

[src]

Get the header of fields of this packet.

[src]

Set the packet's header fields.

[src]

Get the source Ipv4 address.

[src]

Get the destination Ipv4 address.

[src]

Get the hop count/time-to-live of this packet.

[src]

Get the packet's payload

[src]

Returns the underlying packet data.

[src]

Check that this packet has a valid checksum.

Trait Implementations

impl Clone for Ipv4Packet
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Ipv4Packet
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Debug for Ipv4Packet
[src]

[src]

Formats the value using the given formatter.