Struct netsim::wire::UdpPacket [] [src]

pub struct UdpPacket { /* fields omitted */ }

A UDP packet

Methods

impl UdpPacket
[src]

[src]

Create a new UDP packet from the given header fields and payload.

[src]

Write a UDP packet to the given empty buffer.

[src]

Parse a UDP packet from the given buffer.

[src]

Set the header fields of this UDP packet.

[src]

Get the packet's source port.

[src]

Get the packet's destination port.

[src]

Get the packet's payload data.

[src]

Get the entire packet as a raw byte buffer.

[src]

Verify the checksum of the packet. The source/destination IP addresses of the packet are needed to calculate the checksum.

Trait Implementations

impl Clone for UdpPacket
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for UdpPacket
[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 UdpPacket
[src]

[src]

Formats the value using the given formatter.