tipc: introduce ioctl for fetching node identity
After the introduction of a 128-bit node identity it may be difficult for a user to correlate between this identity and the generated node hash address. We now try to make this easier by introducing a new ioctl() call for fetching a node identity by using the hash value as key. This will be particularly useful when we extend some of the commands in the 'tipc' tool, but we also expect regular user applications to need this feature. Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
79741a38b4
commit
3e5cf362c3
@@ -209,16 +209,16 @@ struct tipc_group_req {
|
||||
* The string formatting for each name element is:
|
||||
* media: media
|
||||
* interface: media:interface name
|
||||
* link: Z.C.N:interface-Z.C.N:interface
|
||||
*
|
||||
* link: node:interface-node:interface
|
||||
*/
|
||||
|
||||
#define TIPC_NODEID_LEN 16
|
||||
#define TIPC_MAX_MEDIA_NAME 16
|
||||
#define TIPC_MAX_IF_NAME 16
|
||||
#define TIPC_MAX_BEARER_NAME 32
|
||||
#define TIPC_MAX_LINK_NAME 68
|
||||
|
||||
#define SIOCGETLINKNAME SIOCPROTOPRIVATE
|
||||
#define SIOCGETLINKNAME SIOCPROTOPRIVATE
|
||||
#define SIOCGETNODEID (SIOCPROTOPRIVATE + 1)
|
||||
|
||||
struct tipc_sioc_ln_req {
|
||||
__u32 peer;
|
||||
@@ -226,6 +226,10 @@ struct tipc_sioc_ln_req {
|
||||
char linkname[TIPC_MAX_LINK_NAME];
|
||||
};
|
||||
|
||||
struct tipc_sioc_nodeid_req {
|
||||
__u32 peer;
|
||||
char node_id[TIPC_NODEID_LEN];
|
||||
};
|
||||
|
||||
/* The macros and functions below are deprecated:
|
||||
*/
|
||||
|
Reference in New Issue
Block a user