Struct pnet_packet::tcp::TcpPacket [] [src]

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

A structure enabling manipulation of on the wire packets

Methods

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

[src]

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

[src]

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

[src]

Maps from a TcpPacket to a TcpPacket

[src]

Maps from a TcpPacket to a TcpPacket while consuming the source

[src]

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

[src]

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

[src]

Get the source field. This field is always stored big-endian within the struct, but this accessor returns host order.

[src]

Get the destination field. This field is always stored big-endian within the struct, but this accessor returns host order.

[src]

Get the sequence field. This field is always stored big-endian within the struct, but this accessor returns host order.

[src]

Get the acknowledgement field. This field is always stored big-endian within the struct, but this accessor returns host order.

[src]

Get the data_offset field.

[src]

Get the reserved field.

[src]

Get the flags field. This field is always stored big-endian within the struct, but this accessor returns host order.

[src]

Get the window field. This field is always stored big-endian within the struct, but this accessor returns host order.

[src]

Get the checksum field. This field is always stored big-endian within the struct, but this accessor returns host order.

[src]

Get the urgent_ptr field. This field is always stored big-endian within the struct, but this accessor returns host order.

[src]

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

[src]

Get the value of the options field (copies contents)

Important traits for TcpOptionIterable<'a>
[src]

Get the value of the options field as iterator

Trait Implementations

impl<'p> PartialEq for TcpPacket<'p>
[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<'a> PacketSize for TcpPacket<'a>
[src]

[src]

Get the calculated size of the packet

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

[src]

Retreive the underlying buffer for the packet

[src]

Retreive the payload for the packet

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

The type of the packet to convert from

[src]

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

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

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'p> Send for TcpPacket<'p>

impl<'p> Sync for TcpPacket<'p>