Print interface name for each ARP entry.

Prodded by:	Igor Podlesny <poige@morning.ru>
MFC after:	1 week
This commit is contained in:
ru 2001-10-08 11:52:23 +00:00
parent 28baac583a
commit 1671bd567b

View File

@ -479,6 +479,7 @@ print_entry(struct sockaddr_dl *sdl,
{
const char *host;
struct hostent *hp;
char ifname[IF_NAMESIZE];
int seg;
if (nflag == 0)
@ -498,6 +499,8 @@ print_entry(struct sockaddr_dl *sdl,
ether_print(LLADDR(sdl));
else
printf("(incomplete)");
if (if_indextoname(sdl->sdl_index, ifname) != NULL)
printf(" on %s", ifname);
if (rtm->rtm_rmx.rmx_expire == 0)
printf(" permanent");
if (sin->sin_other & SIN_PROXY)