Commit 96a69148 by Paul Warren

Fix mac address display

iftop would display portions of mac address with large ffffff prefixes.
Make if_hw_addr type consistent.  Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
1 parent 014c6e62
Pipeline #67 skipped in 0 seconds
......@@ -6,6 +6,9 @@ Unattributed items are by Paul Warren and Chris Lightfoot.
1.0
* Fix MAC address display
Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
* Clean up libpcap on exit
Brian Russell <brian.russell@brocade.com>
......
......@@ -50,7 +50,7 @@ extern char *strncat2(char *dest, char *src, int n);
*/
int
get_addrs_dlpi(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr)
get_addrs_dlpi(char *interface, u_int8_t if_hw_addr[], struct in_addr *if_ip_addr)
{
int got_hw_addr = 0;
int got_ip_addr = 0;
......
......@@ -45,7 +45,7 @@
*/
int
get_addrs_ioctl(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr, struct in6_addr *if_ip6_addr)
get_addrs_ioctl(char *interface, u_int8_t if_hw_addr[], struct in_addr *if_ip_addr, struct in6_addr *if_ip6_addr)
{
int s;
struct ifreq ifr = {};
......
......@@ -7,6 +7,6 @@
#define __ADDRS_IOCTL_H_
int
get_addrs_ioctl(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr, struct in6_addr *if_ip6_addr);
get_addrs_ioctl(char *interface, u_int8_t if_hw_addr[], struct in_addr *if_ip_addr, struct in6_addr *if_ip6_addr);
#endif /* __ADDRS_IOCTL_H_ */
......@@ -55,7 +55,7 @@
/* ethernet address of interface. */
int have_hw_addr = 0;
char if_hw_addr[6];
u_int8_t if_hw_addr[6];
/* IP address of interface */
int have_ip_addr = 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!