Struct netlink_packet_sock_diag::unix::UnixResponseHeader
source · pub struct UnixResponseHeader {
pub kind: u8,
pub state: u8,
pub inode: u32,
pub cookie: [u8; 8],
}
Expand description
The response to a query for IPv4 or IPv6 sockets
Fields§
§kind: u8
One of SOCK_PACKET
, SOCK_STREAM
, or SOCK_SEQPACKET
state: u8
State of the socket. According to man 7 sock_diag
it can be
either TCP_ESTABLISHED
or TCP_LISTEN
. However datagram
UNIX sockets are not connection oriented so I would assume
that this field can also take other value (maybe 0
) for
these sockets.
inode: u32
Socket inode number.
Trait Implementations§
source§impl Clone for UnixResponseHeader
impl Clone for UnixResponseHeader
source§fn clone(&self) -> UnixResponseHeader
fn clone(&self) -> UnixResponseHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UnixResponseHeader
impl Debug for UnixResponseHeader
source§impl Emitable for UnixResponseHeader
impl Emitable for UnixResponseHeader
source§impl<'a, T: AsRef<[u8]> + ?Sized> Parseable<UnixResponseBuffer<&'a T>> for UnixResponseHeader
impl<'a, T: AsRef<[u8]> + ?Sized> Parseable<UnixResponseBuffer<&'a T>> for UnixResponseHeader
source§fn parse(buf: &UnixResponseBuffer<&'a T>) -> Result<Self, DecodeError>
fn parse(buf: &UnixResponseBuffer<&'a T>) -> Result<Self, DecodeError>
Deserialize the current type.
source§impl PartialEq<UnixResponseHeader> for UnixResponseHeader
impl PartialEq<UnixResponseHeader> for UnixResponseHeader
source§fn eq(&self, other: &UnixResponseHeader) -> bool
fn eq(&self, other: &UnixResponseHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for UnixResponseHeader
impl StructuralEq for UnixResponseHeader
impl StructuralPartialEq for UnixResponseHeader
Auto Trait Implementations§
impl RefUnwindSafe for UnixResponseHeader
impl Send for UnixResponseHeader
impl Sync for UnixResponseHeader
impl Unpin for UnixResponseHeader
impl UnwindSafe for UnixResponseHeader
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
Mutably borrows from an owned value. Read more