Trait mutnet::ipv6::Ipv6MethodsMut
source · pub trait Ipv6MethodsMut: HeaderManipulation + BufferAccessMut + Ipv6Methods + Sized {
// Provided methods
fn set_ipv6_traffic_class(&mut self, traffic_class: u8) { ... }
fn set_ipv6_flow_label(&mut self, flow_label: u32) { ... }
fn set_ipv6_payload_length(
&mut self,
payload_length: u16
) -> Result<(), SetPayloadLengthError> { ... }
fn set_ipv6_next_header(&mut self, next_header: u8) { ... }
fn set_ipv6_hop_limit(&mut self, hop_limit: u8) { ... }
fn set_ipv6_source(&mut self, source: Ipv6Addr) { ... }
fn set_ipv6_destination(&mut self, destination: Ipv6Addr) { ... }
}
Expand description
Methods available for DataBuffer
containing an
Ipv6
header and wrapping a mutable data buffer.
Provided Methods§
sourcefn set_ipv6_traffic_class(&mut self, traffic_class: u8)
fn set_ipv6_traffic_class(&mut self, traffic_class: u8)
Sets the IPv6 traffic class.
sourcefn set_ipv6_flow_label(&mut self, flow_label: u32)
fn set_ipv6_flow_label(&mut self, flow_label: u32)
Sets the IPv6 flow label.
Ignores the 12 most significant bits of flow_label
because the field is only 20 bits long.
sourcefn set_ipv6_payload_length(
&mut self,
payload_length: u16
) -> Result<(), SetPayloadLengthError>
fn set_ipv6_payload_length( &mut self, payload_length: u16 ) -> Result<(), SetPayloadLengthError>
Sets the IPv6 payload length.
§Errors
Returns an error if:
payload_length
exceeds the available space.- the length of
payload_length
would cause already parsed upper layers to be cut of.
sourcefn set_ipv6_next_header(&mut self, next_header: u8)
fn set_ipv6_next_header(&mut self, next_header: u8)
Sets the IPv6 next header.
sourcefn set_ipv6_hop_limit(&mut self, hop_limit: u8)
fn set_ipv6_hop_limit(&mut self, hop_limit: u8)
Sets the IPv6 hop limit.
sourcefn set_ipv6_source(&mut self, source: Ipv6Addr)
fn set_ipv6_source(&mut self, source: Ipv6Addr)
Sets the IPv6 source.
sourcefn set_ipv6_destination(&mut self, destination: Ipv6Addr)
fn set_ipv6_destination(&mut self, destination: Ipv6Addr)
Sets the IPv6 destination.
Object Safety§
This trait is not object safe.