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.
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -38,6 +38,7 @@ enum { · 37 unmodified lines | ||
| 38 | 38 | NETLINK_DIAG_GROUPS, |
| 39 | 39 | NETLINK_DIAG_RX_RING, |
| 40 | 40 | NETLINK_DIAG_TX_RING, |
| 41 | + NETLINK_DIAG_FLAGS, | |
| 41 | 42 | |
| 42 | 43 | __NETLINK_DIAG_MAX, |
| 43 | 44 | }; |
| @@ -52,5 +53,14 @@ enum { · 8 unmodified lines | ||
| 52 | 53 | /* deprecated since 4.6 */ |
| 53 | 54 | #define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */ |
| 54 | 55 | #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 | 66 | #endif |