diff -c -r1.45 iftop.c *** iftop.c 21 May 2003 21:14:00 -0000 1.45 --- iftop.c 23 May 2003 16:02:19 -0000 *************** *** 452,457 **** --- 452,468 ---- memcpy(if_hw_addr, ifr.ifr_hwaddr.sa_data, 6); have_hw_addr = 1; } + #elif defined(SIOCGENADDR) /* Solaris */ + if (ioctlsocket(s, SIOCGENADDR, &ifr) < 0) + { + fprintf(stderr, "Error getting hardware address for interface: %s\n", options.interface); + perror("ioctl(SIOCGIFHWADDR)"); + } + else + { + memcpy(if_hw_addr, ifr.ifr_hwaddr.sa_data, 6); + have_hw_addr = 1; + } #else fprintf(stderr, "Cannot obtain hardware address on this platform\n"); #endif