X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=ziffy%2Fhooks.c;h=cec5e507adb8997d6bdb7f1c2819d90b52143613;hp=7645f749ad9350f2a91924022eac0474a62faa6a;hb=b0aea56b51603b34d526bbfb94fed2ae0976fb0f;hpb=6b90776a33987cb5df962be1db7c28b63e2213dd diff --git a/ziffy/hooks.c b/ziffy/hooks.c index 7645f74..cec5e50 100644 --- a/ziffy/hooks.c +++ b/ziffy/hooks.c @@ -36,10 +36,15 @@ #include #include -#include #include +#if HAVE_NET_IF_H #include +#endif + +#if HAVE_NETINET_IN_H +#include +#endif #if HAVE_NETINET_IF_ETHER_H #include @@ -210,9 +215,9 @@ z3950apdu * pduhook (const struct pcap_pkthdr * h, const u_char * p) 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");