History

netlink/diag: report flags for netlink sockets

cb_running is reported in /proc/self/net/netlink and it is reported by the ss tool, when it gets information from the proc files. sock_diag is a new interface which is used instead of proc files, so it looks reasonable that this interface has to report no less information about sockets than proc files. We use these flags to dump and restore netlink sockets.

Andrey Vagin committed 9 years ago

Commit 457c79e1 parent c8004604 files · +43 −8Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/netlink_diag.h+10−0
@@ -38,6 +38,7 @@ enum { · 37 unmodified lines
38 NETLINK_DIAG_GROUPS,38 NETLINK_DIAG_GROUPS,
39 NETLINK_DIAG_RX_RING,39 NETLINK_DIAG_RX_RING,
40 NETLINK_DIAG_TX_RING,40 NETLINK_DIAG_TX_RING,
41 NETLINK_DIAG_FLAGS,
41 42
42 __NETLINK_DIAG_MAX,43 __NETLINK_DIAG_MAX,
43};44};
@@ -52,5 +53,14 @@ enum { · 8 unmodified lines
52/* deprecated since 4.6 */53/* deprecated since 4.6 */
53#define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */54#define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */
54#endif55#endif
56#define NDIAG_SHOW_FLAGS 0x00000008 /* show flags of a netlink socket */
57
58/* flags */
59#define NDIAG_FLAG_CB_RUNNING 0x00000001
60#define NDIAG_FLAG_PKTINFO 0x00000002
61#define NDIAG_FLAG_BROADCAST_ERROR 0x00000004
62#define NDIAG_FLAG_NO_ENOBUFS 0x00000008
63#define NDIAG_FLAG_LISTEN_ALL_NSID 0x00000010
64#define NDIAG_FLAG_CAP_ACK 0x00000020
55 65
56#endif66#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t