Struct pnet::packet::tcp::MutableTcpPacket [] [src]

pub struct MutableTcpPacket<'p> { /* fields omitted */ }

A structure enabling manipulation of on the wire packets

Methods

impl<'a> MutableTcpPacket<'a>
[src]

Constructs a new MutableTcpPacket. If the provided buffer is less than the minimum required packet size, this will return None.

Constructs a new MutableTcpPacket. If the provided buffer is less than the minimum required packet size, this will return None. With this constructor the MutableTcpPacket will own its own data and the underlying buffer will be dropped when the MutableTcpPacket is.

Maps from a MutableTcpPacket to a TcpPacket

Maps from a MutableTcpPacket to a TcpPacket while consuming the source

The minimum size (in bytes) a packet of this type can be. It's based on the total size of the fixed-size fields.

The size (in bytes) of a Tcp instance when converted into a byte-array

Populates a TcpPacket using a Tcp structure

Get the source field

Get the destination field

Get the sequence field

Get the acknowledgement field

Get the data_offset field

Get the reserved field

Get the flags field

Get the window field

Get the checksum field

Get the urgent_ptr field

Get the raw &[u8] value of the options field, without copying

Get the value of the options field (copies contents)

Get the value of the options field as iterator

Set the source field

Set the destination field

Set the sequence field

Set the acknowledgement field

Set the data_offset field

Set the reserved field

Set the flags field

Set the window field

Set the checksum field

Set the urgent_ptr field

Get the raw &mut [u8] value of the options field, without copying

Set the value of the options field (copies contents)

Set the value of the payload field (copies contents)

Trait Implementations

impl<'p> PartialEq for MutableTcpPacket<'p>
[src]

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

This method tests for !=.

impl<'a> PacketSize for MutableTcpPacket<'a>
[src]

Get the calculated size of the packet

impl<'a> MutablePacket for MutableTcpPacket<'a>
[src]

Retreive the underlying, mutable, buffer for the packet

Retreive the mutable payload for the packet

Initialize this packet by cloning another

impl<'a> Packet for MutableTcpPacket<'a>
[src]

Retreive the underlying buffer for the packet

Retreive the payload for the packet

impl<'p> FromPacket for MutableTcpPacket<'p>
[src]

The type of the packet to convert from

Converts a wire-format packet to #[packet] struct format

impl<'p> Debug for MutableTcpPacket<'p>
[src]

Formats the value using the given formatter.