Move the source to our own ether_ntohost() to the "missing" directory,
just as we do in libpcap for the Windows snprintf() wrapper around
_snprintf().
Add a header file for it, and include it in both the wrapper and in
addrtoname.c on Windows.
missing/strlcat.c \
missing/strlcpy.c \
missing/strsep.c \
+ missing/win_ether_ntohost.c \
+ missing/win_ether_ntohost.h \
mkdep \
packetdat.awk \
pcap_dump_ftell.c \
win32/prj/WinDump.dsp \
win32/prj/WinDump.dsw \
win32/prj/WinDump.sln \
- win32/prj/WinDump.vcproj \
- win32/src/ether_ntohost.c
+ win32/prj/WinDump.vcproj
TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print`
#define HTONS(x) (x) = htons(x)
#endif
-#ifndef _WIN32
+#ifdef _WIN32
+ /*
+ * We have our own ether_ntohost(), reading from the system's
+ * Ethernet address file.
+ */
+ #include "missing/win_ether_ntohost.h"
+#else
#ifdef USE_ETHER_NTOHOST
#if defined(NET_ETHERNET_H_DECLARES_ETHER_NTOHOST)
/*
#include <netdissect-stdinc.h>
+#include "missing/win_ether_ntohost.h"
+
#include "netdissect.h"
#include "addrtoname.h"
-typedef struct ether_addr {
- unsigned char octet[MAC_ADDR_LEN];
- } ether_address;
-
typedef struct ether_entry {
ether_address eth_addr; /* MAC address */
char *name; /* name of MAC-address */
# End Source File
# Begin Source File
-SOURCE=..\Src\ether_ntohost.c
+SOURCE=..\..\missing\win_ether_ntohost.c
# End Source File
# Begin Source File
</FileConfiguration>
</File>
- <File RelativePath="..\Src\ether_ntohost.c">
+ <File RelativePath="..\..\missing\win_ether_ntohost.c">
<FileConfiguration
Name="Debug|Win32"
>