Re: [tcpdump-workers] WinDump fails to compile on latest libpcap

2016-10-06 Thread Yang Luo
Hi Guy, On Fri, Oct 7, 2016 at 2:10 AM, Guy Harris wrote: > On Oct 6, 2016, at 4:53 AM, Gisle Vanem wrote: > > > Yang Luo wrote: > > > >> Given that WinDump is kind of "official" example to use libpcap/Npcap > API, > >> it's not good that

Re: [tcpdump-workers] WinDump fails to compile on latest libpcap

2016-10-06 Thread Yang Luo
Hi Gisle, On Thu, Oct 6, 2016 at 7:53 PM, Gisle Vanem wrote: > Yang Luo wrote: > > > Given that WinDump is kind of "official" example to use libpcap/Npcap > API, > > it's not good that they can't compile. > > Why do you say that? IMHO, tcpdump

Re: [tcpdump-workers] WinDump fails to compile on latest libpcap

2016-10-06 Thread Yang Luo
s, some wrong output folders. The entire commits are here: https://github.com/hsluoyz/WinDump/commits/master I don't know if the steps are reasonable. Maybe libpcap can add the "net" folder to the repo? Cheers, Yang On Thu, Oct 6, 2016 at 4:46 PM, Yang Luo wrote: > Hi

[tcpdump-workers] WinDump fails to compile on latest libpcap

2016-10-06 Thread Yang Luo
Hi list, I'm compiling WinDump on latest Npcap/libpcap there: https://github.com/hsluoyz/windump because I need to use it to test my functions sometimes. But I got compile errors. 1>-- Build started: Project: WinDump, Configuration: Debug x64 -- 1> getopt.c 1> util.c 1>j:\github_repos\w

[tcpdump-workers] About libpcap version display on Windows

2016-07-01 Thread Yang Luo
Hi list, The current libpcap on Windows shows the version string in the "About Wireshark" window as ( https://github.com/the-tcpdump-group/libpcap/blob/master/pcap.c#L2118-L2123 ): with WinPcap version 4.0 (packet.dll version 0.07), based on libpcap version 1.x.y For latest Npcap 0.07 r17, it sho

Re: [tcpdump-workers] Add WinPcap specific functions like pcap_open() to libpcap on Windows for binary compatibility

2016-07-01 Thread Yang Luo
Hi Guy, On Tue, Jun 28, 2016 at 10:10 AM, Guy Harris wrote: > On Jun 27, 2016, at 11:22 PM, Yang Luo wrote: > > > So my thought is we need to add back those functions to libpcap on > Windows, the related source code files are remote-ext.h, pcap-new.c, etc, > which don'

Re: [tcpdump-workers] Remove the eproto_db symbol exporting to keep the DLL delay-load feature on Windows

2016-07-01 Thread Yang Luo
OK. I will try my best to keep this structure exported, if it can't be done, I will only remove the export on Windows. Cheers, Yang On Thu, Jun 30, 2016 at 1:14 PM, Guy Harris wrote: > On Jun 27, 2016, at 10:56 PM, Yang Luo wrote: > > > Because of libpcap has exported the

Re: [tcpdump-workers] Where to put the TcApi.h?

2016-07-01 Thread Yang Luo
OK. I have removed the macro and the source files related to TurboCap API in https://github.com/the-tcpdump-group/libpcap/pull/511. Cheers, Yang On Thu, Jun 30, 2016 at 6:27 PM, Guy Harris wrote: > On Jun 30, 2016, at 3:14 PM, Yang Luo wrote: > > > TcApi.h is contained in WinPca

[tcpdump-workers] Where to put the TcApi.h?

2016-06-30 Thread Yang Luo
Hi list, TcApi.h is contained in WinPcap but not in libpcap. Where to put it? For now, I put it in the "Win32-Extensions" folder, which is the same level with "libpcap" folder. The whole file structure is: Npcap repo wpcap libpcap (the libpcap repo) Win32-Extensions

Re: [tcpdump-workers] Need precompiled source files in libpcap

2016-06-30 Thread Yang Luo
Hi Guy, On Sat, Jun 25, 2016 at 11:50 AM, Guy Harris wrote: > On Jun 25, 2016, at 7:25 AM, Yang Luo wrote: > > > On Sat, Jun 25, 2016 at 3:09 PM, Guy Harris wrote: > > > >> On Jun 24, 2016, at 8:58 PM, Yang Luo wrote: > >> > >>> I found that t

Re: [tcpdump-workers] Need precompiled source files in libpcap

2016-06-30 Thread Yang Luo
On Thu, Jun 30, 2016 at 2:14 PM, Guy Harris wrote: > On Jun 30, 2016, at 12:59 PM, Yang Luo wrote: > > > But I encountered an issue here, the built out scanner.h and scanner.c > will report these errors: > > > > 1> gencode.c > > 1>..\scanner.h(239): fata

Re: [tcpdump-workers] Need precompiled source files in libpcap

2016-06-30 Thread Yang Luo
On Thu, Jun 30, 2016 at 12:36 PM, Yang Luo wrote: > Hi Guy, > > On Sat, Jun 25, 2016 at 12:09 AM, Guy Harris wrote: > >> On Jun 24, 2016, at 8:58 PM, Yang Luo wrote: >> >> > I found that there are a lot of “precompiled source code files" like >> gram

Re: [tcpdump-workers] Need precompiled source files in libpcap

2016-06-30 Thread Yang Luo
Hi Guy, On Sat, Jun 25, 2016 at 12:09 AM, Guy Harris wrote: > On Jun 24, 2016, at 8:58 PM, Yang Luo wrote: > > > I found that there are a lot of “precompiled source code files" like > grammar.c, scanner.c, grammar.h, ,scanner.h, etc. (which are also listed in > .g

Re: [tcpdump-workers] Remove the eproto_db symbol exporting to keep the DLL delay-load feature on Windows

2016-06-28 Thread Yang Luo
bol '__imp_eproto_db'; link without /DELAYLOAD:wpcap.dll Cheers, Yang On Tue, Jun 28, 2016 at 1:56 PM, Yang Luo wrote: > Hi list, > > Because of libpcap has exported the a data structure called eproto_db ( > https://github.com/the-tcpdump-group/libpcap/blob/master/nametoaddr.

[tcpdump-workers] Add WinPcap specific functions like pcap_open() to libpcap on Windows for binary compatibility

2016-06-27 Thread Yang Luo
Hi list, When compiling WinDump (https://github.com/hsluoyz/WinDump) against the latest libpcap's SDK, I encountered the following errors: 1> Generating Code... 1>wpcap.lib(wpcap.dll) : error LNK2005: pcap_list_datalinks already defined in datalinks.obj 1>wpcap.lib(wpcap.dll) : error LNK2005: pc

[tcpdump-workers] Remove the eproto_db symbol exporting to keep the DLL delay-load feature on Windows

2016-06-27 Thread Yang Luo
Hi list, Because of libpcap has exported the a data structure called eproto_db ( https://github.com/the-tcpdump-group/libpcap/blob/master/nametoaddr.c#L320), when I compiled WinDump in MSVC specifying "wpcap.dll" as a delay loaded DLL, I encountered the link error 1194. The cause is here: https://

[tcpdump-workers] Why the wpcap.dll built from the latest libpcap doesn't work for any existing applications?

2016-06-27 Thread Yang Luo
Hi list, Now libpcap can compile out the wpcap.dll to be used on Windows. But no existing applications can use that wpcap.dll, including Wireshark, Nmap and WinDump. Wireshark said "Unable to load WinPcap (wpcap.dll)". Nmap crashes when actual scanning starts. When I run WinDump in MSVC's debug

Re: [tcpdump-workers] Changes in libpcap SDK for Windows

2016-06-27 Thread Yang Luo
d any script code that generates these files (like what flex and bison does). So where does libpcap get those source files? Cheers, Yang On Tue, Jun 28, 2016 at 12:41 PM, Yang Luo wrote: > Hi list, > > I'm working on Npcap's SDK based on the latest libpcap. Is there any > di

[tcpdump-workers] Changes in libpcap SDK for Windows

2016-06-27 Thread Yang Luo
Hi list, I'm working on Npcap's SDK based on the latest libpcap. Is there any difference here since libpcap 1.0 (which is the version used by Npcap/WinPcap)? Like the headers, this bat is the used to package the headers ( https://github.com/nmap/npcap/blob/master/create_include.bat), still the or

Re: [tcpdump-workers] Is it OK to rename the MSVC project name from "libpcap" to "wpcap"?

2016-06-25 Thread Yang Luo
Hi Guy, Thanks! Then I will rename the MSVC project files later if you didn't do that. Cheers, Yang On Sun, Jun 26, 2016 at 8:21 AM, Guy Harris wrote: > On Jun 25, 2016, at 8:01 AM, Yang Luo wrote: > > > We know that the libpcap Windows version is called "wpcap&quo

[tcpdump-workers] Is it OK to rename the MSVC project name from "libpcap" to "wpcap"?

2016-06-25 Thread Yang Luo
Hi list, We know that the libpcap Windows version is called "wpcap", including the project files names (wpcap.sln, wpcap.vcxproj) and the library name (wpcap.dll). But the current libpcap trunk project is called "libpcap.sln", and the built executable is named as "libpcap.dll". Is it OK to rename

Re: [tcpdump-workers] Need precompiled source files in libpcap

2016-06-25 Thread Yang Luo
Hi Guy, On Sat, Jun 25, 2016 at 3:09 PM, Guy Harris wrote: > On Jun 24, 2016, at 8:58 PM, Yang Luo wrote: > > > I found that there are a lot of “precompiled source code files" like > grammar.c, scanner.c, grammar.h, ,scanner.h, etc. (which are also listed in > .g

[tcpdump-workers] Need precompiled source files in libpcap

2016-06-24 Thread Yang Luo
Hi list, I'm starting to look at the libpcap code, and want to integrate its latest code into Npcap (https://github.com/nmap/npcap), a fork of WinPcap library. I found that there are a lot of “precompiled source code files" like grammar.c, scanner.c, grammar.h, ,scanner.h, etc. (which are also li

Re: [tcpdump-workers] What's the difference between NdisMediumBare80211 (DLT_IEEE802_11) and NdisMediumRadio80211 (DLT_IEEE802_11_RADIO)

2016-04-06 Thread Yang Luo
will just use this value. Thanks! Cheers, Yang On Mon, Apr 4, 2016 at 3:24 PM, Guy Harris wrote: > On Apr 3, 2016, at 11:47 PM, Yang Luo wrote: > > > I'm adding Native 802.11 capture support to Npcap and demonstrate it on > > Wireshark. (See: > > > https://git

[tcpdump-workers] What's the difference between NdisMediumBare80211 (DLT_IEEE802_11) and NdisMediumRadio80211 (DLT_IEEE802_11_RADIO)

2016-04-03 Thread Yang Luo
Hi list, I'm adding Native 802.11 capture support to Npcap and demonstrate it on Wireshark. (See: https://github.com/nmap/npcap/releases/download/v0.06-r13/npcap-nmap-0.06-r13-wifi.exe). I found that the there are two 802.11 related values to show the adapter type: NdisMediumBare80211 and NdisMedi

Re: [tcpdump-workers] Adding loopback adapter detection for Windows

2016-01-25 Thread Yang Luo
On Tue, Jan 26, 2016 at 4:46 AM, Guy Harris wrote: > On Jan 24, 2016, at 7:47 PM, Yang Luo wrote: > > > My ubuntu 14.04 shows the lines below, so I think it doesn't support > IFF_LOOPBACK. > > root@ly-controller:~# ifconfig lo > > loLink encap:Local Loop

Re: [tcpdump-workers] Adding loopback adapter detection for Windows

2016-01-25 Thread Yang Luo
ong? Cheers, Yang On Mon, Jan 25, 2016 at 3:04 AM, Guy Harris wrote: > On Jan 24, 2016, at 6:46 AM, Yang Luo wrote: > > > I have implemented a loopback adapter called "Npcap Loopback Adapter" on > > Windows. It's like lo in linux. I know that libpcap recognize

Re: [tcpdump-workers] Adding loopback adapter detection for Windows

2016-01-24 Thread Yang Luo
On Mon, Jan 25, 2016 at 3:10 AM, Guy Harris wrote: > On Jan 24, 2016, at 8:30 AM, Yang Luo wrote: > > > I forgot about one most important thing that libpcap seemingly doesn't > > compile under Windows, even if there's a Win32\Prj in it. Actually I got > > many

Re: [tcpdump-workers] Adding loopback adapter detection for Windows

2016-01-24 Thread Yang Luo
Hi, I forgot about one most important thing that libpcap seemingly doesn't compile under Windows, even if there's a Win32\Prj in it. Actually I got many errors when I build libpcap under VS2005. I am quite confused with some lines like this in pcap-int.h: typedef int (*activate_op_t)(pcap_t *);

[tcpdump-workers] Adding loopback adapter detection for Windows

2016-01-24 Thread Yang Luo
Hi list, I am a developer for Npcap, a fork for WinPcap ( https://github.com/nmap/npcap). My libpcap code is still some very old version 1.0 branch 1_0_rel0b (20091008). And I want to update to the latest release. But before that happens, I need to handle some updates of mine to the libpcap folder