arp.c (23717fc46a574b84f6dabff1ddb211d255ea8437) | arp.c (596e374dac03cbfa29cc70e81d77bde8c888d0e4) |
---|---|
1/* 2 * Copyright (c) 1984, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Sun Microsystems, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 509 unchanged lines hidden (view full) --- 518 host = hp->h_name; 519 else { 520 host = "?"; 521 if (h_errno == TRY_AGAIN) 522 nflag = 1; 523 } 524 printf("%s (%s) at ", host, inet_ntoa(addr->sin_addr)); 525 if (sdl->sdl_alen) { | 1/* 2 * Copyright (c) 1984, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Sun Microsystems, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 509 unchanged lines hidden (view full) --- 518 host = hp->h_name; 519 else { 520 host = "?"; 521 if (h_errno == TRY_AGAIN) 522 nflag = 1; 523 } 524 printf("%s (%s) at ", host, inet_ntoa(addr->sin_addr)); 525 if (sdl->sdl_alen) { |
526 if (sdl->sdl_type == IFT_ETHER && | 526 if ((sdl->sdl_type == IFT_ETHER || 527 sdl->sdl_type == IFT_L2VLAN) && |
527 sdl->sdl_alen == ETHER_ADDR_LEN) 528 printf("%s", ether_ntoa((struct ether_addr *)LLADDR(sdl))); 529 else { 530 int n = sdl->sdl_nlen > 0 ? sdl->sdl_nlen + 1 : 0; 531 532 printf("%s", link_ntoa(sdl) + n); 533 } 534 } else --- 260 unchanged lines hidden --- | 528 sdl->sdl_alen == ETHER_ADDR_LEN) 529 printf("%s", ether_ntoa((struct ether_addr *)LLADDR(sdl))); 530 else { 531 int n = sdl->sdl_nlen > 0 ? sdl->sdl_nlen + 1 : 0; 532 533 printf("%s", link_ntoa(sdl) + n); 534 } 535 } else --- 260 unchanged lines hidden --- |