]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: implement link_ntop() DTrace subroutine logic
authorGirish Moodalbail <girish.moodalbail@oracle.com>
Tue, 11 Apr 2017 00:39:14 +0000 (17:39 -0700)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 21 Apr 2017 14:44:58 +0000 (15:44 +0100)
commitbc7666bf8cf51f174593f12cf21ef6e3026afa2a
tree73cc342ce8dc9cefa6f25ecc9f1bc825ca0d4293
parenta7de10c09aaa80fc87647d47c2193bd6816313cc
dtrace: implement link_ntop() DTrace subroutine logic

The signature of the link_ntop() DTrace subroutine is:

    string link_ntop(int hardware_type, void *addr);

link_ntop() takes a pointer to a hardware address and returns a string
which is the translation of that address to a string representation,
with content depending on the provided hardware type.  Supported
hardware types are ARPHRD_ETHER and ARPHRD_INFINIBAND, both of which
are defined for use in D programs.

This is the link-level equivalent of inet_ntop().

Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
[nca: reworded commit message a bit]
Orabug: 25931479
dtrace/.gitignore
dtrace/dtrace_dif.c
dtrace/include/uapi/linux/dtrace/dif_defines.h