Trait mutnet::udp::UdpMethods
source · pub trait UdpMethods: HeaderMetadata + PseudoHeaderChecksum + BufferAccess {
// Provided methods
fn udp_source_port(&self) -> u16 { ... }
fn udp_destination_port(&self) -> u16 { ... }
fn udp_length(&self) -> u16 { ... }
fn udp_checksum(&self) -> u16 { ... }
fn udp_calculate_checksum(&self) -> u16 { ... }
}
Expand description
Methods available for DataBuffer
containing a
Udp
header.
Provided Methods§
sourcefn udp_source_port(&self) -> u16
fn udp_source_port(&self) -> u16
Returns the UDP source port.
sourcefn udp_destination_port(&self) -> u16
fn udp_destination_port(&self) -> u16
Returns the UDP destination port.
sourcefn udp_length(&self) -> u16
fn udp_length(&self) -> u16
Returns the UDP length.
sourcefn udp_checksum(&self) -> u16
fn udp_checksum(&self) -> u16
Returns the UDP checksum.
sourcefn udp_calculate_checksum(&self) -> u16
fn udp_calculate_checksum(&self) -> u16
Calculates and returns the UDP checksum.
This takes lower layers into account.
If there is an IPv4
or IPv6
layer present,
the pseudo header will be included.
If there is a NoPreviousHeader
present,
the pseudo header is set to zero.
Object Safety§
This trait is not object safe.