aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorRichard Alpe <richard.alpe@ericsson.com>2014-11-20 04:29:10 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-21 15:01:30 -0500
commit34b78a127c4fd57cf3d5c64031693d10a8e0fae1 (patch)
treefbba2542705341c45f9a270e46aca9b819ed17f7 /include/uapi/linux
parent315c00bc9f2bd17f7ad7ed8119ca49b1125af507 (diff)
tipc: add sock dump to new netlink api
Add TIPC_NL_SOCK_GET command to the new tipc netlink API. This command supports dumping of all available sockets with their associated connection or publication(s). It could be extended to reply with a single socket if the NLM_F_DUMP isn't set. The information about a socket includes reference, address, connection information / publication information. Netlink logical layout of response message: -> socket -> reference -> address [ -> connection -> node -> socket [ -> connected flag -> type -> instance ] ] [ -> publication flag ] Signed-off-by: Richard Alpe <richard.alpe@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/tipc_netlink.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/uapi/linux/tipc_netlink.h b/include/uapi/linux/tipc_netlink.h
index f446fba6a0c7..8c87e2490bc7 100644
--- a/include/uapi/linux/tipc_netlink.h
+++ b/include/uapi/linux/tipc_netlink.h
@@ -45,6 +45,7 @@ enum {
45 TIPC_NL_BEARER_ENABLE, 45 TIPC_NL_BEARER_ENABLE,
46 TIPC_NL_BEARER_GET, 46 TIPC_NL_BEARER_GET,
47 TIPC_NL_BEARER_SET, 47 TIPC_NL_BEARER_SET,
48 TIPC_NL_SOCK_GET,
48 49
49 __TIPC_NL_CMD_MAX, 50 __TIPC_NL_CMD_MAX,
50 TIPC_NL_CMD_MAX = __TIPC_NL_CMD_MAX - 1 51 TIPC_NL_CMD_MAX = __TIPC_NL_CMD_MAX - 1
@@ -54,6 +55,7 @@ enum {
54enum { 55enum {
55 TIPC_NLA_UNSPEC, 56 TIPC_NLA_UNSPEC,
56 TIPC_NLA_BEARER, /* nest */ 57 TIPC_NLA_BEARER, /* nest */
58 TIPC_NLA_SOCK, /* nest */
57 59
58 __TIPC_NLA_MAX, 60 __TIPC_NLA_MAX,
59 TIPC_NLA_MAX = __TIPC_NLA_MAX - 1 61 TIPC_NLA_MAX = __TIPC_NLA_MAX - 1
@@ -70,6 +72,32 @@ enum {
70 TIPC_NLA_BEARER_MAX = __TIPC_NLA_BEARER_MAX - 1 72 TIPC_NLA_BEARER_MAX = __TIPC_NLA_BEARER_MAX - 1
71}; 73};
72 74
75/* Socket info */
76enum {
77 TIPC_NLA_SOCK_UNSPEC,
78 TIPC_NLA_SOCK_ADDR, /* u32 */
79 TIPC_NLA_SOCK_REF, /* u32 */
80 TIPC_NLA_SOCK_CON, /* nest */
81 TIPC_NLA_SOCK_HAS_PUBL, /* flag */
82
83 __TIPC_NLA_SOCK_MAX,
84 TIPC_NLA_SOCK_MAX = __TIPC_NLA_SOCK_MAX - 1
85};
86
87/* Nest, connection info */
88enum {
89 TIPC_NLA_CON_UNSPEC,
90
91 TIPC_NLA_CON_FLAG, /* flag */
92 TIPC_NLA_CON_NODE, /* u32 */
93 TIPC_NLA_CON_SOCK, /* u32 */
94 TIPC_NLA_CON_TYPE, /* u32 */
95 TIPC_NLA_CON_INST, /* u32 */
96
97 __TIPC_NLA_CON_MAX,
98 TIPC_NLA_CON_MAX = __TIPC_NLA_CON_MAX - 1
99};
100
73/* Nest, link propreties. Valid for link, media and bearer */ 101/* Nest, link propreties. Valid for link, media and bearer */
74enum { 102enum {
75 TIPC_NLA_PROP_UNSPEC, 103 TIPC_NLA_PROP_UNSPEC,