Enum bip_utracker::announce::SourceIP
[−]
[src]
pub enum SourceIP { ImpliedV4, ExplicitV4(Ipv4Addr), ImpliedV6, ExplicitV6(Ipv6Addr), }
Client specified IP address to send the response to.
Variants
ImpliedV4
Infer the IPv4 address from the sender address.
ExplicitV4(Ipv4Addr)
Send the response to the given IPv4 address.
ImpliedV6
Infer the IPv6 address from the sender address.
ExplicitV6(Ipv6Addr)
Send the response to the given IPv6 address.
Methods
impl SourceIP
[src]
fn from_bytes_v4(bytes: &[u8]) -> IResult<&[u8], SourceIP>
[src]
Construct the IPv4 SourceIP from the given bytes.
fn from_bytes_v6(bytes: &[u8]) -> IResult<&[u8], SourceIP>
[src]
Construct the IPv6 SourceIP from the given bytes.
fn write_bytes<W>(&self, writer: W) -> Result<()> where
W: Write,
[src]
W: Write,
Write the SourceIP to the given writer.
fn is_ipv6(&self) -> bool
[src]
Whether or not the source is an IPv6 address.
fn is_ipv4(&self) -> bool
[src]
Whether or not the source is an IPv4 address.
Trait Implementations
impl Debug for SourceIP
[src]
impl PartialEq for SourceIP
[src]
fn eq(&self, __arg_0: &SourceIP) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SourceIP) -> bool
[src]
This method tests for !=
.