pub enum SocketAddrUse {
TcpBind,
TcpListen,
TcpAccept,
TcpConnect,
UdpBind,
UdpSend,
UdpReceive,
}Expand description
The reason what a socket address is being used for.
Variants§
TcpBind
Binding TCP socket.
This is invoked for both explicit calls to bind as well as implicit
binds that are about to be performed by the OS as part of
e.g. connect & listen.
The address that is passed to the check is the address provided to
bind for explicit binds, or the wildcard address for implicit binds.
TcpListen
Put a TCP socket in listener mode.
If the socket was already bound at the time of the call, the actual
local address of the socket is passed to the check. If the socket is
about to be implicitly bound by listen, the wildcard address is passed.
TcpAccept
Accepting a new client TCP socket.
The address passed to the check is the remote address of the client that is being accepted. If the check fails, the client socket will be silently dropped before reaching the guest.
TcpConnect
Connecting a TCP socket.
The address passed to the check is the remote address that the socket is attempting to connect to.
UdpBind
Binding UDP socket.
This is invoked for both explicit calls to bind as well as implicit
binds that are about to be performed by the OS as part of
e.g. connect & send.
The address that is passed to the check is the address provided to
bind for explicit binds, or the wildcard address for implicit binds.
UdpSend
Sending a datagram on a UDP socket.
The address passed to the check is the remote address that the socket is attempting to send to.
UdpReceive
Receiving a datagram on a UDP socket.
The address passed to the check is the remote address of the datagram that is being received. If the check fails, the datagram will be silently dropped before reaching the guest.
Trait Implementations§
Source§impl Clone for SocketAddrUse
impl Clone for SocketAddrUse
Source§fn clone(&self) -> SocketAddrUse
fn clone(&self) -> SocketAddrUse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SocketAddrUse
Auto Trait Implementations§
impl Freeze for SocketAddrUse
impl RefUnwindSafe for SocketAddrUse
impl Send for SocketAddrUse
impl Sync for SocketAddrUse
impl Unpin for SocketAddrUse
impl UnsafeUnpin for SocketAddrUse
impl UnwindSafe for SocketAddrUse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more