summaryrefslogtreecommitdiff
path: root/include/uapi/linux/tipc.h
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@ericsson.com>2014-04-24 16:26:47 +0200
committerDavid S. Miller <davem@davemloft.net>2014-04-26 12:13:24 -0400
commit78acb1f9b898e85fa2c1e28e700b54b66b288e8d (patch)
tree0520313d3d6afcc42d7aaf27fbe699e8bc71e2d5 /include/uapi/linux/tipc.h
parenta89778d8baf19cd7e728d81121a294a06cedaad1 (diff)
tipc: add ioctl to fetch link names
We add a new ioctl for AF_TIPC that can be used to fetch the logical name for a link to a remote node on a given bearer. This should be used in combination with link state subscriptions. The logical name size limit definitions are moved to tipc.h, as they are now also needed by the new ioctl. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/tipc.h')
-rw-r--r--include/uapi/linux/tipc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/uapi/linux/tipc.h b/include/uapi/linux/tipc.h
index 53cd7902d34e..6f71b9b41595 100644
--- a/include/uapi/linux/tipc.h
+++ b/include/uapi/linux/tipc.h
@@ -38,6 +38,7 @@
#define _LINUX_TIPC_H_
#include <linux/types.h>
+#include <linux/sockios.h>
/*
* TIPC addressing primitives
@@ -207,4 +208,25 @@ struct sockaddr_tipc {
#define TIPC_NODE_RECVQ_DEPTH 131 /* Default: none (read only) */
#define TIPC_SOCK_RECVQ_DEPTH 132 /* Default: none (read only) */
+/*
+ * Maximum sizes of TIPC bearer-related names (including terminating NULL)
+ * The string formatting for each name element is:
+ * media: media
+ * interface: media:interface name
+ * link: Z.C.N:interface-Z.C.N:interface
+ *
+ */
+
+#define TIPC_MAX_MEDIA_NAME 16
+#define TIPC_MAX_IF_NAME 16
+#define TIPC_MAX_BEARER_NAME 32
+#define TIPC_MAX_LINK_NAME 60
+
+#define SIOCGETLINKNAME SIOCPROTOPRIVATE
+
+struct tipc_sioc_ln_req {
+ __u32 peer;
+ __u32 bearer_id;
+ char linkname[TIPC_MAX_LINK_NAME];
+};
#endif