The fields of this structure are as follows:
.TP
.I sdiag_family
-The address family, it should be set to
+The address family; it should be set to
.BR AF_UNIX .
.PP
.I sdiag_protocol
Only those sockets whose states are in this mask will be reported.
Ignored when querying for an individual socket.
Supported values are:
-.PD 0
-.RS
-.IP "" 2
+
+.RS 12
1 <<
.B TCP_ESTABLISHED
-.IP
+
1 <<
.B TCP_LISTEN
.RE
-.PD
.TP
.I udiag_ino
This is an inode number when querying for an individual socket.
The attribute reported in answer to this request is
.BR UNIX_DIAG_MEMINFO .
The payload associated with this attribute is an array of __u32 values
-described below in "Socket memory information" subsection.
+described below in the subsection "Socket memory information".
.PP
The following attributes are reported back without any specific request:
.TP
.IR "struct unix_diag_req" .
.TP
.I udiag_type
-This is set to one of the following constants:
-.PD 0
-.RS
-.IP "" 2
-.B SOCK_PACKET
-.IP
-.B SOCK_STREAM
-.IP
-.B SOCK_SEQPACKET
-.RE
-.PD
+This is set to one of
+.BR SOCK_PACKET ,
+.BR SOCK_STREAM ,
+or
+.BR SOCK_SEQPACKET .
.TP
.I udiag_state
-This is set to one of the following constants:
-.PD 0
-.RS
-.IP "" 2
-.B TCP_LISTEN
-.IP
-.B TCP_ESTABLISHED
-.RE
-.PD
+This is set to one of
+.BR TCP_LISTEN
+or
+.BR TCP_ESTABLISHED .
.TP
.I pad
This field is set to 0.
.I udiag_cookie
This is an array of opaque identifiers that could be used in subsequent
queries.
-
+.\"
.SS IPv4 and IPv6 sockets
-For IPv4 and IPv6 sockets the request is represented in the following structure:
+For IPv4 and IPv6 sockets,
+the request is represented in the following structure:
.in +4n
.nf
.B AF_INET
or
.B AF_INET6
-for
-.B IPv4
-or
-.B IPv6
-sockets respectively.
+for IPv4 or IPv6 sockets respectively.
.TP
.I sdiag_protocol
-This should be set to one of the following constants:
-.PD 0
-.RS
-.IP "" 2
-.B IPPROTO_TCP
-.IP
-.B IPPROTO_UDP
-.IP
-.B IPPROTO_UDPLITE
-.RE
-.PD
+This should be set to one of
+.BR IPPROTO_TCP ,
+.BR IPPROTO_UDP ,
+or
+.BR IPPROTO_UDPLITE .
.TP
.I idiag_ext
This is a set of flags defining what kind of extended information to report.
The payload associated with this attribute is a __u8 value
which is the TClass of the socket.
IPv6 sockets only.
-For LISTEN and CLOSE sockets this is followed by
+For LISTEN and CLOSE sockets, this is followed by
.B INET_DIAG_SKV6ONLY
attribute with associated __u8 payload value meaning whether the socket
is IPv6-only or not.
.TP
.B INET_DIAG_SKMEMINFO
The payload associated with this attribute is an array of __u32 values
-described below in "Socket memory information" subsection.
+described below in the subsection "Socket memory information".
.TP
.B INET_DIAG_INFO
The payload associated with this attribute is specific to the address family.
This should be set to 0.
.TP
.I idiag_states
-This is a bit mask that defines a filter of sockets states.
+This is a bit mask that defines a filter of socket states.
Only those sockets whose states are in this mask will be reported.
Ignored when querying for an individual socket.
.TP
.I id
-This is a socket id object that is used in dump requests, in queries
+This is a socket ID object that is used in dump requests, in queries
about individual sockets, and is reported back in each response.
Unlike UNIX domain sockets, IPv4 and IPv6 sockets are identified
using addresses and ports.
For TCP sockets, this field describes the type of timer that is currently
active for the socket.
It is set to one of the following constants:
-.RS
+
+.PD 0
+.RS 12
.TP
.B 0
no timer is active
.B 4
a zero window probe timer
.RE
+.PD
.IP
.RS
-For non-TCP sockets this field is set to 0.
+For non-TCP sockets, this field is set to 0.
.RE
.TP
.I idiag_retrans
For
.I idiag_timer
-values 1, 2, and 4 this field contains the number of retransmits.
+values 1, 2, and 4, this field contains the number of retransmits.
For other
.I idiag_timer
-values this field is set to 0.
+values, this field is set to 0.
.TP
.I idiag_expires
-For TCP sockets that have an active timer this field describes its expiration
+For TCP sockets that have an active timer, this field describes its expiration
time in milliseconds.
-For other sockets this field is set to 0.
+For other sockets, this field is set to 0.
.TP
.I idiag_rqueue
-.RS 7
-.IP "listening sockets:" 2
-The number of pending connections.
-.IP "other sockets:"
-The amount of data in incoming queue.
+For listening sockets:
+the number of pending connections.
+
+For other sockets:
+the amount of data in the incoming queue.
.RE
.TP
.I idiag_wqueue
-.RS 7
-.IP "listening sockets:" 2
-The backlog length.
-.IP "other sockets:"
-The amount of memory available for sending.
+For listening sockets:
+the backlog length.
+
+Fother sockets:
+the amount of memory available for sending.
.RE
.TP
.I idiag_uid
.TP
.I idiag_inode
This is the socket inode number.
-
+.\"
.SS Socket memory information
The payload associated with
.B UNIX_DIAG_MEMINFO
The amount of data queued by TCP, but not yet sent.
.TP
.B SK_MEMINFO_OPTMEM
-The amount of memory allocated for socket's service needs (e.g. socket
+The amount of memory allocated for the socket's service needs (e.g., socket
filter).
.TP
.B SK_MEMINFO_BACKLOG
and
.B AF_INET6
sockets only.
-In Linux 3.3 it was renamed to
+In Linux 3.3, it was renamed to
.B NETLINK_SOCK_DIAG
and extended to support
.B AF_UNIX