Enum etherparse::TransportHeader [−][src]
Expand description
The possible headers on the transport layer
Variants
Udp(UdpHeader)
Tuple Fields
0: UdpHeader
Tcp(TcpHeader)
Tuple Fields
0: TcpHeader
Implementations
Returns Result::Some containing the udp header if self has the value Udp. Otherwise None is returned.
Returns Result::Some containing the udp header if self has the value Udp. Otherwise None is returned.
Returns Result::Some containing the tcp header if self has the value Tcp. Otherwise None is returned.
Returns Result::Some containing a mutable refernce to the tcp header if self has the value Tcp. Otherwise None is returned.
Returns the size of the transport header (in case of UDP fixed, in case of TCP cotanining the options).dd
pub fn update_checksum_ipv4(
&mut self,
ip_header: &Ipv4Header,
payload: &[u8]
) -> Result<(), ValueError>
pub fn update_checksum_ipv4(
&mut self,
ip_header: &Ipv4Header,
payload: &[u8]
) -> Result<(), ValueError>
Calculates the checksum for the transport header & sets it in the header for an ipv4 header.
pub fn update_checksum_ipv6(
&mut self,
ip_header: &Ipv6Header,
payload: &[u8]
) -> Result<(), ValueError>
pub fn update_checksum_ipv6(
&mut self,
ip_header: &Ipv6Header,
payload: &[u8]
) -> Result<(), ValueError>
Calculates the checksum for the transport header & sets it in the header for an ipv6 header.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for TransportHeader
impl Send for TransportHeader
impl Sync for TransportHeader
impl Unpin for TransportHeader
impl UnwindSafe for TransportHeader
Blanket Implementations
Mutably borrows from an owned value. Read more