#include <sys/socket.h>
#include <netdb.h>
-#include <netinet/in.h>
#include <arpa/inet.h>
+#if HAVE_NET_IF_H
#include <net/if.h>
+#endif
+
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
#if HAVE_NETINET_IF_ETHER_H
#include <netinet/if_ether.h>
printf ("ETHER: Total size = %d : header = %d : data = %d\n",
eth_size, eth_hlen, eth_size - eth_hlen),
printf ("ETHER: Source = %s\n",
- etheraddr_string (dlt == DLT_NULL ? NULL : (char *) & e -> ether_shost)),
+ etheraddr_string (dlt == DLT_NULL ? NULL : (u_char *) & e -> ether_shost)),
printf ("ETHER: Destination = %s\n",
- etheraddr_string (dlt == DLT_NULL ? NULL : (char *) & e -> ether_dhost)),
+ etheraddr_string (dlt == DLT_NULL ? NULL : (u_char *) & e -> ether_dhost)),
fflush (stdout),
fmemdmp (stdout, (char *) e, eth_size, "Ethernet Packet");