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