mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
On Windows, we have our own ether_ntohost(); declare it.
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.
This commit is contained in:
parent
c331dc185f
commit
0d9efb9596
@ -355,6 +355,8 @@ EXTRA_DIST = \
|
||||
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 \
|
||||
@ -368,8 +370,7 @@ EXTRA_DIST = \
|
||||
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`
|
||||
|
||||
|
@ -40,7 +40,13 @@
|
||||
#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)
|
||||
/*
|
||||
|
@ -29,13 +29,11 @@
|
||||
|
||||
#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 */
|
@ -741,7 +741,7 @@ SOURCE=..\..\tcpdump.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Src\ether_ntohost.c
|
||||
SOURCE=..\..\missing\win_ether_ntohost.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -3791,7 +3791,7 @@
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
|
||||
<File RelativePath="..\Src\ether_ntohost.c">
|
||||
<File RelativePath="..\..\missing\win_ether_ntohost.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user