Enum netlink_packet_sock_diag::unix::nlas::Nla [−][src]
pub enum Nla {
Name(String),
Vfs(Vfs),
Peer(u32),
PendingConnections(Vec<u32>),
ReceiveQueueLength(u32, u32),
MemInfo(MemInfo),
Shutdown(u8),
Other(DefaultNla),
}
Variants
Name(String)
Tuple Fields
0: String
Path to which the socket was bound. This attribute is known as
UNIX_DIAG_NAME
in the kernel.
Vfs(Vfs)
Tuple Fields
0: Vfs
VFS information for this socket. This attribute is known as
UNIX_DIAG_VFS
in the kernel.
Peer(u32)
Tuple Fields
0: u32
Inode number of the socket’s peer. This attribute is reported
for connected socket only. This attribute is known as
UNIX_DIAG_PEER
in the kernel.
PendingConnections(Vec<u32>)
The payload associated with this attribute is an array of
inode numbers of sockets that have passed the connect(2)
call, but haven’t been processed with accept(2)
yet. This
attribute is reported for listening sockets only. This
attribute is known as UNIX_DIAG_ICONS
in the kernel.
ReceiveQueueLength(u32, u32)
This attribute corresponds to the UNIX_DIAG_RQLEN
. It
reports the length of the socket receive queue, and the queue
size limit. Note that for listening sockets the receive
queue is used to store actual data sent by other sockets. It
is used to store pending connections. So the meaning of this
attribute differs for listening sockets.
For listening sockets:
- the first the number is the number of pending
connections. It should be equal to
Nla::PendingConnections
value’s length. - the second number is the backlog queue maximum length, which
equals to the value passed as the second argument to
listen(2)
For other sockets:
- the first number is the amount of data in receive queue
(note: I am not sure if it is the actual amount of data
or the amount of memory allocated. The two might differ
because of memory allocation strategies: more memory than
strictly necessary may be allocated for a given
sk_buff
) - the second number is the memory used by outgoing data. Note that strictly UNIX sockets don’t have a send queue, since the data they send is directly written into the destination socket receive queue. But the memory allocated for this data is still counted from the sender point of view.
MemInfo(MemInfo)
Tuple Fields
0: MemInfo
Socket memory information. See MemInfo
for more details.
Shutdown(u8)
Tuple Fields
0: u8
Other(DefaultNla)
Tuple Fields
0: DefaultNla
Unknown attribute
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Nla
impl UnwindSafe for Nla
Blanket Implementations
Mutably borrows from an owned value. Read more