Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发现一个错误: #1

Open
wants to merge 317 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
317 commits
Select commit Hold shift + click to select a range
0225b8d
Fixed the script so that it copies the driver from the right location.
Nov 28, 2005
fb7db38
Added some code in the compilation script to solve some quirks with copy
Nov 29, 2005
c913582
Added a couple of trace messages.
Nov 29, 2005
d19c167
Added several trace messages.
Nov 29, 2005
d8d9566
Added an extern declaration for g_StillToInit.
Nov 29, 2005
cdf2c16
Enabled buffer security checks (/GS) to packet.dll (NT2k)
Nov 29, 2005
a310711
Fixed some wrong paths.
Nov 29, 2005
79f7e5a
Cleaned up the code checking for Woem activation (now both activation…
Nov 29, 2005
44870da
Added versioning info.
Nov 30, 2005
d8f2bde
Added a global version file for the entire WinPcap OEM project.
Nov 30, 2005
24c56f4
Added some code to copy the proper NPF.RC version file into the driver
Nov 30, 2005
7af139d
Added some code to copy the proper NPF.RC version file into the driver
Nov 30, 2005
2dce9c6
Added version info to packet.dll (NT5) for WinPcap OEM.
Nov 30, 2005
f2b1061
Added version info to packet.dll (NT4) for WinPcap OEM.
Nov 30, 2005
6cfdef8
Enabled Buffer Security Checks (/GS).
Nov 30, 2005
ecab8c0
Cleaned up the resource file:
Nov 30, 2005
0fa8f3f
Added a string containing the version of libpcap (quick fix).
Nov 30, 2005
f4b8645
Added the project for wpcap.dll OEM (and its related RC files for ver…
Nov 30, 2005
931cdb8
Added a new source file containing pcap_start_oem() (used by WinPcap OEM
Nov 30, 2005
615926b
Added a preliminary doxygen project for WinPcap OEM.
Nov 30, 2005
c3d6cab
Added all the scripts to generate the WinPcap OEM deleveloper's pack
Nov 30, 2005
fb80efe
Added wpcap.dll to the master solution file.
Nov 30, 2005
551b145
Added some garbage zeroes in the tools.bin fake file, to make the res…
Nov 30, 2005
779a717
Renamed the XXX_Security configurations to XXX_TNT (since this is the…
Nov 30, 2005
d93c487
Fixed some wrong lib paths. Enabled /GS in the debug build as well.
Nov 30, 2005
5814ff8
Fixed an error string (if we can retrieve the version string, PacketG…
Nov 30, 2005
e0cdc93
Disabled the creation/deletion of registry keys for the customization of
Dec 2, 2005
4ea64da
Updated version info to 3.2.1.337.tnt
Dec 2, 2005
d1dcbb1
Updated version info to 3.2.1.337.
Dec 2, 2005
6f8e08c
Updated version info to 3.2.1.337.woem.
Dec 2, 2005
551e35e
Fixed a couple of copy commands.
Dec 2, 2005
39b80c7
Added some quotes in the prebuild scripts to avoid problems with path…
Jan 11, 2006
81b5691
Updated the v 3.2.91.375 (for Ben Greear).
Jan 11, 2006
72c4bdd
Updated the version number to 3.2.91.378 (for Leaf Networks, Jeff Cap…
Jan 13, 2006
7713bc2
Updated some strings.
Jan 26, 2006
831b277
Updated version info to 3.2.1.391.tnt
Jan 26, 2006
6170b7a
Added a document explaining how to release OEM WinPcap for the Toolkit.
Jan 26, 2006
3dc7a58
Cleaned up the linking options.
Feb 13, 2006
97bb589
Added all the libpcap files into the wpcap OEM project.
Feb 13, 2006
fce14d2
Modification done by the IDE.
Feb 13, 2006
715ac29
Moved the image to .\\pics
Feb 13, 2006
96436c2
Added the OEM and CACE logos.
Feb 13, 2006
490d853
Updated the header and footer to include the OEM logo plus some navig…
Feb 13, 2006
b59845b
General cleanup of the main page.
Feb 13, 2006
1c061a7
Moved several doxygen related files here from the main WinPcap distri…
Feb 13, 2006
92a6885
General cleanup of the doxygen project.
Feb 13, 2006
442dd6c
Cleaned up the script to copy the appropriate image files.
Feb 13, 2006
9aa4249
Fixed some error messages still using the old name "WinPcap OEM".
Feb 22, 2006
9e68f26
Fix due to a change in the parameters of create_docs_oem.bat
Feb 22, 2006
deafb13
Added a short paragraph detailing how to use OEM WinPcap in a third p…
Feb 22, 2006
b4e6c1d
General reordering of the links.
Feb 22, 2006
f70dc70
Removed an unneeded parameter. Added a check for the existence of a l…
Feb 22, 2006
dddc588
Added a script to create a local copy of the samples and patch them w…
Feb 22, 2006
bc18d59
Added a local copy of some documentation files.
Feb 22, 2006
ea935ec
Added two new configurations, so that the TNT build is separated from…
Feb 22, 2006
bb2eeef
Added a document explaining how to release OEM WinPcap.
Feb 23, 2006
a084129
Removed the dependency on VS6.
Feb 23, 2006
91e7d25
Added the Software License Agreement to the repository.
Feb 23, 2006
9de95ba
Added a build step to copy the License to the developer's pack.
Feb 23, 2006
a10788e
Fixed some wrong comment related to the modified files in winpcap_oem…
Feb 23, 2006
1d2a2f7
Updated version to 3.2.2.418 (i.e. OEM WinPcap 3.2).
Feb 23, 2006
65e0b53
Fixed the names of the zip files for SCM archival.
Feb 23, 2006
2ace907
Renamed WinPcap_docs.html into OEM_WinPcap_docs.html.
Feb 23, 2006
67c9831
Renamed WinPcap_docs.html into OEM_WinPcap_docs.html.
Feb 23, 2006
e2946c2
Windows 2000 was missing in the list of supported OSes.
Feb 23, 2006
372fae7
Updated to the correct version (it's 3.2.2.419.oem for OEM WinPcap!!).
Feb 23, 2006
ce7a09a
Updated version to 3.2.2.473 (i.e. OEM WinPcap 3.2a).
Apr 18, 2006
e509f61
Fixed a wrong patch in the Examples-remote.
Apr 18, 2006
29113ee
Merged the new compilation environment from the vanilla WinPcap.
Jul 10, 2006
4478e5a
Obsoleted the old compilation scripts.
Jul 10, 2006
56cc6c0
Updated the release procedures after the modification to the driver b…
Jul 10, 2006
0fc2095
Modified the paths of the NT4 driver after the modification to the dr…
Jul 10, 2006
c8faa36
Added some scripting to remove winpcap_stress from the public samples.
Jul 13, 2006
2e8ffda
Commented some copy directives: all the pthreads include files should…
Jul 13, 2006
505d04d
Updated the diff file to patch the UserBridge sample.
Jul 13, 2006
5ac16d4
Fixed the TARGETPATH directive for the AMD64 build.
Jul 14, 2006
81842bc
Added a prebuild step to copy the AMD64 driver into the binaries folder.
Jul 14, 2006
d3670f3
Added a new resource ID for the AMD64 driver.
Jul 14, 2006
55c13f8
Added a new binary resource for the AMD64 npf driver.
Jul 14, 2006
8285701
Removed some leftover debugging code.
Jul 14, 2006
11b4f6f
Added the prebuild scripts to the project for easier editing.
Jul 14, 2006
9842607
Modified WoemSaveResourceToDisk to enable/disable the WOW64 FS redire…
Jul 14, 2006
7567a0f
Added support for AMD64 OSes:
Jul 14, 2006
2e52de5
Updated the version of OEM WinPcap.
Jul 14, 2006
215102a
Modified the compilation script to use the correct RC file for the ve…
Jul 14, 2006
202a0a0
Added the RC version file for the x64 version of the driver.
Jul 14, 2006
75c47c2
Updated the release procedures to account for the x64 driver and some…
Jul 25, 2006
cb61975
Fixed a detail related to doxygen.
Jul 25, 2006
aa05ce0
Added the patches for tcptop, savedump and sendcap.
Jul 27, 2006
d5c7e03
Modified the documentation to account for the new support of Vista and
Aug 1, 2006
42aabbe
Fixed a bug in the generation of the samples for the devpack: we were…
Aug 2, 2006
e922fe1
Updated the instructions to account for the dependency on Airpcap.
Aug 9, 2006
a50fe2a
Added the dynamic loading of PacketGetAirPcapHandle.
Aug 9, 2006
8896575
Added support for the AIRPCAP_API.
Aug 9, 2006
9b911db
Added a directive to copy the RC file for the NT4 build.
Aug 10, 2006
a631751
Updated version info to 4.0.2.592.
Aug 16, 2006
299e161
Added the patch for the sendpack sample.
Aug 17, 2006
736f45d
Fixed a bug in WoemcreateBinaryNames, causing OEM not to work on win2…
Aug 17, 2006
4bb8d5b
Fixed some wrong instructions.
Aug 17, 2006
d4b9fbd
Updated the release procedures to take into account
Sep 13, 2006
9744453
Other minor mods related to SCM procedures and md5 hashing.
Sep 13, 2006
27a5a41
Updated version to 4.0.1.592 (for TNT).
Sep 13, 2006
872421d
Updated version to 4.0.1.592 (for TNT): one string was not modified c…
Sep 13, 2006
38d26da
Updated version to 4.0.2.655
Oct 17, 2006
4b7d17b
Updated version info to 4.0.2.668
Oct 30, 2006
5871959
Updated version info to 4.0.2.668 (attempt #2, one of the numbers was…
Oct 30, 2006
2b9634e
Increased the warning level to W4. Enabled generation of pdb files.
Nov 18, 2006
bb2a01f
Added support for embedding the Vista version of Packet.dll.
Nov 18, 2006
524175c
Added a new project for Packet.dll under Vista.
Nov 18, 2006
7638fa9
Added a script for the generation of a devpack including the NpfIm lo…
Nov 22, 2006
c8da62e
Added some code to copy the NpfImLoader documentation.
Nov 22, 2006
bd2f7a3
Made the script less verbose.
Nov 22, 2006
a3a669b
Small changes due to the new layout of the NpfIm devpacks.
Nov 22, 2006
4c4f2fd
Updated version info to 4.0.2.691
Nov 22, 2006
6f813e6
Updated the release procedures to take NpfIm into account.
Nov 27, 2006
ffee21d
Modified several paths.
Dec 6, 2006
562d24d
Made the scripts less verbose in case of success. Fixed some wrong pr…
Dec 6, 2006
e7f871a
Removed, as replaced by a more complete release procedures file.
Dec 6, 2006
cf15ca4
Updated the note to account for the fact the binaries here are moved …
Dec 6, 2006
294a83c
Cleaned up a bit the mess related to the NpfIm integration.
Dec 6, 2006
086d108
More cleanup to the scripts.
Dec 6, 2006
07bdc82
Fixes to the documentation.
Dec 6, 2006
de1ef6f
Updated version to 4.0.2.705.
Dec 6, 2006
8ff8c47
Fixed a dependency problem with the Packet Vista build.
Dec 6, 2006
c51f2af
Fixed the paths for the NpfIm files.
Dec 6, 2006
4be9c5e
Fixed a typo in a comment.
Dec 13, 2006
935f075
Modified the preprocessor definitions needed to enable DLL tracing.
Dec 13, 2006
8e720cf
Fixed the code dynamically extracting the driver on vista x64.
Dec 13, 2006
6f55b3b
Added a new configuration for building the packet wrapper with the ce…
Dec 13, 2006
0cee13f
Disabled some compilation warnings due to deprecated functions.
Dec 14, 2006
9f74834
Migrated from FILE based operations to the Win32 ones (CreateFile, Re…
Dec 14, 2006
b87fb65
Updated version info to 4.0.2.730 and copyright year to 2007.
Jan 10, 2007
317156b
Renamed all the occurrences of OEM WinPcap into WinPcap Professional.
Jan 22, 2007
03d411a
Renamed all the occurrences of OEM WinPcap into WinPcap Professional.
Jan 22, 2007
608707b
Renamed the SECURITY define to TNT_BUILD.
Jan 22, 2007
69cdf44
Updated the release procedures after the renaming of OEM into WinPcap
Jan 22, 2007
72bf63c
Renamed all the occurrences of OEM WinPcap into WinPcap Professional.
Jan 22, 2007
3b56f29
Removed, as replaced by the pro one.
Jan 22, 2007
8db3622
Added the new License Agreement.
Jan 22, 2007
285b40d
The link to the stylesheet was pointing to the wrong file.
Jan 22, 2007
5c600e6
Updated the style to the default one shipped with doxygen 1.5.1, with…
Jan 22, 2007
122719e
Renamed OEM_WinPcap_docs into WinPcapPro_docs
Jan 22, 2007
5a5f43e
Renamed a couple minor files.
Jan 22, 2007
914f586
Removed as no longer in use, and just generate confusion.
Jan 22, 2007
80aff27
Added a temporary new logo for WinPcap Professional.
Jan 22, 2007
8251da3
Added some new build configurations for the signed version.
Jan 22, 2007
e9dedcb
Modified the script to copy the signed binaries if possible.
Jan 22, 2007
78f9ad3
Added a new configuration for the SIGNED build.
Jan 22, 2007
c16d5f9
Changed the path of the embedded binaries in the signed build.
Jan 22, 2007
adc2f45
Added some messages to detail which version of the DLLs has been used.
Jan 22, 2007
ad20715
Updated the release procedures to take binary signing into account.
Jan 22, 2007
3853a30
Updated the image with the release one.
Jan 23, 2007
22f48d4
Updated version info to 4.0.2.755
Jan 30, 2007
793c6ed
Updated version info to 4.0.1.755 (aka WinPcap Pro 4.0 for TNT)
May 8, 2007
0dd03de
Updated the release procedures to take signing into account.
May 9, 2007
582b77b
Updated the project to take signing into account.
May 9, 2007
0749e29
Updated version to 4.0.2.901 (aka WinPcap Pro 4.0.1).
Jul 3, 2007
bd2dfb5
Updated version to 4.0.1.901 (WinPcap Pro 4.0.1 for TNT).
Aug 22, 2007
9d2cb31
Added a missing export (pcap_get_airpcap_handle).
Sep 20, 2007
9f7529e
Renamed the PDB files to Packet2k.pdb (to fix a problem when debugging
Oct 30, 2007
cb1cbda
Renamed the PDB files to PacketNT4.pdb (to fix a problem when debugging
Oct 30, 2007
0f6439b
Renamed the PDB files to PacketVista.pdb (to fix a problem when debug…
Oct 30, 2007
ccbee30
Enabled the generation of PDB files for all the builds.
Oct 30, 2007
7bc9d2a
Fixed a comment in the file.
Oct 30, 2007
af15f8d
Enabled the generation of proper symbols in the release build.
Oct 30, 2007
9ba8dda
Added the /release linker option to generate the embed the checksum i…
Oct 31, 2007
31c82ba
Bumped version to 4.1.0.1036 (iDefense prebuild version).
Nov 2, 2007
fc3bbd6
General cleanup. Disabled support for the TME extensions.
Nov 6, 2007
3e851cc
Added a note related to a workaround from step 16s of the build proce…
Nov 7, 2007
e81da36
Bumped version to 4.0.2.1040
Nov 7, 2007
27a055e
Updated version to 4.0.1.1040 (aka WinPcap Pro 4.0.2 for TNT)
Nov 8, 2007
82354ec
Wait for up to MAX_DELAY_STOP_SERVICE checking if the service is stopped
Nov 16, 2007
8455a78
Added a couple new functions to sweep the open handles to the NPF driver
Nov 16, 2007
85d88dc
The usual #ifdef/#define at the beginning of the include file for com…
Nov 16, 2007
4905953
Bumped version to 4.0.2.1123 (WinPcap Pro 4.0.3)
Jan 28, 2008
f3fbc22
Fix for a problem reported by IBM on win2k8 x64. Upon OEM startup, if
Apr 8, 2008
75956ae
Bumped version to 4.0.2.1194 (WinPcap Pro 4.0.4)
Apr 8, 2008
62a57c9
Added PacketStartOemEx to allow passing some flags to the function.
Jun 3, 2008
1585632
Added a missing initialization.
Jun 3, 2008
7dc28b6
Generate the checksum for wpcap.dll.
Jun 3, 2008
b10f78d
Added a new configuration enabled for tracing.
Jun 3, 2008
295aebe
Documented a new flag for pcap_start_oem
Jun 3, 2008
723cd42
Updated version to 4.0.2.1252
Jun 4, 2008
3aab0ad
Fixed some warnings reported by VS2005. Do not disable the FS redirector
Aug 14, 2008
59fabca
Migrated the project to VS2005. Simplified the build, still work in p…
Aug 14, 2008
f1dc1b8
Cleaned up the script.
Aug 15, 2008
bfd022b
Copy the x64 binaries. Updated the paths to the binaries after migrat…
Aug 15, 2008
65c2014
Created two new solution configurations for the signed build.
Aug 15, 2008
0f302ed
Fixed a compilation warning in x64 mode.
Aug 15, 2008
5412c39
Migrated the project to VS2005. Simplified the build, still work in p…
Aug 15, 2008
5ae9aad
Updated project to doxygen 1.5.4
Aug 18, 2008
e0fc103
Added a preprocessor definition to avoid some CRT warnings.
Aug 18, 2008
a367e8d
Create the output folders if they don't exist.
Aug 18, 2008
6af5552
Updated the release procedures after migrating to VS2005.
Aug 18, 2008
0c3e8db
Got rid of the "Release STEP 1" configuration.
Aug 18, 2008
9716f2c
Updated version to 4.0.2.1325
Aug 18, 2008
8f3f63e
Renamed the global solution into MakeAll.sln
Aug 18, 2008
a592e6a
Fixed a lib path.
Aug 18, 2008
ea0f14d
Build the NT4 x64 version of packet.dll, even if not needed, due to t…
Aug 18, 2008
792be4a
Added a fake project to copy the files to be embedded as resources in…
Aug 19, 2008
ff8996b
Moved the prebuild step into a fake separate project.
Aug 19, 2008
dc19493
Moved the prebuild step into a fake separate project.
Aug 19, 2008
47dfdb9
Update copyright year.
Aug 19, 2008
a566435
Updated the compilation instructions to account for Visual Studio 200…
Aug 19, 2008
258e392
Added Win2008 among the supported OSes.
Aug 19, 2008
4c882c9
Updated version to 4.0.2.1328
Aug 21, 2008
24bd3de
Fixed a typo causing the x86 driver not to be extracted properly from…
Aug 22, 2008
5a28923
Minor fixes.
Aug 22, 2008
15c8e8b
Updated version to 4.0.2.1329
Aug 22, 2008
af1bd73
Updated version to 4.0.2.1340
Sep 2, 2008
34857d7
Added a VS2005 project for the driver.
Nov 19, 2008
33afa3d
Added a new compilation script based on ddkbuild
Nov 19, 2008
3fa7b33
Changed the driver project, changed the build dependencies.
Nov 19, 2008
7db773b
Added YY_NO_UNISTD_H to the preprocessor definitions.
Nov 19, 2008
703b17b
Fixed the driver compilation under all the operating systems and WDK …
Jul 14, 2009
6b2d48e
Fixed some issues. In particular, this is a fake project, dont try to…
Jul 14, 2009
45aa666
Exported a bunch of new functions.
Jul 14, 2009
7ef8b8a
Added support for the turbocap adapters.
Jul 14, 2009
b6b7fc1
Fixed some issues. In particular, this is a fake project, dont try to…
Jul 14, 2009
08d2f26
Fixed the output folder for the PDBs.
Jul 14, 2009
abbcdd7
Updated the patch.
Jul 14, 2009
6ddd25a
Updated the patch.
Jul 14, 2009
a059415
Updated the include files.
Jul 14, 2009
77dd2a6
Added a note regarding Win7.
Jul 15, 2009
bc389b7
Updated the release procedures.
Jul 15, 2009
cf3d10c
Updated the documentation.
Oct 8, 2009
04523b5
Update version to 4.1.2.1741. Updated copyright to 2009.
Oct 8, 2009
33abadd
Update version to 4.1.2.1741. Updated copyright to 2009.
Oct 8, 2009
e904e6c
Update version to 4.1.2.1742. Updated copyright to 2009.
Oct 8, 2009
6061d18
Update version to 4.1.2.1742. Updated copyright to 2009.
Oct 8, 2009
430c570
Do not delete the driver immediately after we have loaded it. It caus…
Dec 17, 2009
6a7ada6
Updated version to 4.1.2.1810
Dec 17, 2009
2341701
Updated version to 4.1.2.1810
Dec 17, 2009
ec4c58e
Play with the x64 FS redirector only in the 32bit version of the DLL.
Feb 23, 2010
edf5295
Updated version to 4.1.2.1879 (4.1.1).
Feb 23, 2010
7d0b853
Exported pcap_freedatalinks.
Jun 23, 2010
141b5cf
Updated version to 4.1.2.1999
Jun 23, 2010
52c37d0
Updated version to 4.1.2.2001
Jun 25, 2010
9311230
Bug fixing: a registry handle was released twice on a 64bit OS when
Aug 27, 2010
30aee33
Do not copy the license.
Jan 12, 2011
71bf5a4
Modified the code and signature of create_driver_service and start_se…
Jun 17, 2011
7cbdbac
Modified the code and signature of create_driver_service and start_se…
Jun 17, 2011
b87821c
Modified the code and signature of create_driver_service and start_se…
Jun 17, 2011
edb4783
Bumped version to 4.1.2.2358 and Riverbed Technology.
Jun 17, 2011
3d8b0c2
Bumped version to 4.1.2.2529 (WPRO_41_2529)
Dec 5, 2011
62f1a72
Bumped version to 4.1.2.2536 (WPRO_41_2536)
Dec 12, 2011
1ad7ba8
Remove the old CACE Technologies license agreement.
geraldcombs Jun 3, 2015
12365f9
Apply the WinPcap license and a Riverbed copyright.
geraldcombs Jun 3, 2015
3e11ff9
Move everything into winpcap_oem.
geraldcombs Jun 3, 2015
3e0335d
Merge in winpcap_oem/master.
geraldcombs Jun 3, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions winpcap_oem/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# CVS default ignores begin
tags
TAGS
.make.state
.nse_depinfo
*~
#*
.#*
,*
_$*
*$
*.old
*.bak
*.BAK
*.orig
*.rej
.del-*
*.a
*.olb
*.o
*.obj
*.so
*.exe
*.Z
*.elc
*.ln
core
# CVS default ignores end
255 changes: 255 additions & 0 deletions winpcap_oem/Examples-pcap.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
diff -urb ..\WinPcap\Examples-pcap/UDPdump/udpdump.c .\Examples-pcap/UDPdump/udpdump.c
--- ..\WinPcap\Examples-pcap/UDPdump/udpdump.c 2008-12-23 02:54:49.000000000 -0800
+++ .\Examples-pcap/UDPdump/udpdump.c 2009-07-14 16:51:15.796875000 -0700
@@ -39,6 +39,8 @@
#define _CRT_SECURE_NO_WARNINGS
#endif

+#define WPCAP //this is needed to use pcap_start_oem
+
#include "pcap.h"

/* 4 bytes IP address */
@@ -91,6 +93,13 @@
char packet_filter[] = "ip and udp";
struct bpf_program fcode;

+ /* start WinPcap Professional */
+ if (pcap_start_oem(errbuf, 0) == -1)
+ {
+ fprintf(stderr, "Error starting WinPcap Professional: %s\n", errbuf);
+ exit(1);
+ }
+
/* Retrieve the device list */
if(pcap_findalldevs(&alldevs, errbuf) == -1)
{
diff -urb ..\WinPcap\Examples-pcap/basic_dump/basic_dump.c .\Examples-pcap/basic_dump/basic_dump.c
--- ..\WinPcap\Examples-pcap/basic_dump/basic_dump.c 2008-12-23 02:54:48.000000000 -0800
+++ .\Examples-pcap/basic_dump/basic_dump.c 2009-07-14 16:48:44.203125000 -0700
@@ -6,6 +6,8 @@
#define _CRT_SECURE_NO_WARNINGS
#endif

+#define WPCAP //this is needed to use pcap_start_oem
+
#include "pcap.h"

/* prototype of the packet handler */
@@ -20,6 +22,13 @@
pcap_t *adhandle;
char errbuf[PCAP_ERRBUF_SIZE];

+ /* start WinPcap Professional */
+ if (pcap_start_oem(errbuf, 0) == -1)
+ {
+ fprintf(stderr, "Error starting WinPcap Professional: %s\n", errbuf);
+ exit(1);
+ }
+
/* Retrieve the device list */
if(pcap_findalldevs(&alldevs, errbuf) == -1)
{
diff -urb ..\WinPcap\Examples-pcap/basic_dump_ex/basic_dump_ex.c .\Examples-pcap/basic_dump_ex/basic_dump_ex.c
--- ..\WinPcap\Examples-pcap/basic_dump_ex/basic_dump_ex.c 2008-12-23 02:54:48.000000000 -0800
+++ .\Examples-pcap/basic_dump_ex/basic_dump_ex.c 2009-07-14 16:49:28.671875000 -0700
@@ -6,6 +6,8 @@
#define _CRT_SECURE_NO_WARNINGS
#endif

+#define WPCAP //this is needed to use pcap_start_oem
+
#include "pcap.h"

int main()
@@ -23,6 +25,12 @@
const u_char *pkt_data;
time_t local_tv_sec;

+ /* start WinPcap Professional */
+ if (pcap_start_oem(errbuf, 0) == -1)
+ {
+ fprintf(stderr, "Error starting WinPcap Professional: %s\n", errbuf);
+ exit(1);
+ }

/* Retrieve the device list */
if(pcap_findalldevs(&alldevs, errbuf) == -1)
diff -urb ..\WinPcap\Examples-pcap/iflist/iflist.c .\Examples-pcap/iflist/iflist.c
--- ..\WinPcap\Examples-pcap/iflist/iflist.c 2008-12-23 02:54:48.000000000 -0800
+++ .\Examples-pcap/iflist/iflist.c 2009-07-14 16:49:28.625000000 -0700
@@ -39,6 +39,8 @@
#define _CRT_SECURE_NO_WARNINGS
#endif

+#define WPCAP //this is needed to use pcap_start_oem
+
#include "pcap.h"

#ifndef WIN32
@@ -61,6 +63,13 @@
pcap_if_t *d;
char errbuf[PCAP_ERRBUF_SIZE+1];

+ /* start WinPcap Professional */
+ if (pcap_start_oem(errbuf, 0) == -1)
+ {
+ fprintf(stderr, "Error starting WinPcap Professional: %s\n", errbuf);
+ exit(1);
+ }
+
/* Retrieve the device list */
if(pcap_findalldevs(&alldevs, errbuf) == -1)
{
diff -urb ..\WinPcap\Examples-pcap/pcap_filter/pcap_filter.c .\Examples-pcap/pcap_filter/pcap_filter.c
--- ..\WinPcap\Examples-pcap/pcap_filter/pcap_filter.c 2006-02-22 09:28:33.000000000 -0800
+++ .\Examples-pcap/pcap_filter/pcap_filter.c 2009-07-14 16:49:28.593750000 -0700
@@ -35,6 +35,8 @@
#include <stdlib.h>
#include <stdio.h>

+#define WPCAP //this is needed to use pcap_start_oem
+
#include <pcap.h>

#define MAX_PRINT 80
@@ -90,6 +92,13 @@
}
}

+ /* start WinPcap Professional */
+ if (pcap_start_oem(errbuf, 0) == -1)
+ {
+ fprintf(stderr, "Error starting WinPcap Professional: %s\n", errbuf);
+ exit(1);
+ }
+
// open a capture from the network
if (source != NULL)
{
diff -urb ..\WinPcap\Examples-pcap/pktdump_ex/pktdump_ex.c .\Examples-pcap/pktdump_ex/pktdump_ex.c
--- ..\WinPcap\Examples-pcap/pktdump_ex/pktdump_ex.c 2008-12-23 02:54:49.000000000 -0800
+++ .\Examples-pcap/pktdump_ex/pktdump_ex.c 2009-07-14 16:50:29.265625000 -0700
@@ -42,6 +42,8 @@
#include <stdlib.h>
#include <stdio.h>

+#define WPCAP //this is needed to use pcap_start_oem
+
#include <pcap.h>

#define LINE_LEN 16
@@ -63,6 +65,13 @@
" pktdump_ex -s file.acp\n"
" pktdump_ex -s \\Device\\NPF_{C8736017-F3C3-4373-94AC-9A34B7DAD998}\n\n");

+ /* start WinPcap Professional */
+ if (pcap_start_oem(errbuf, 0) == -1)
+ {
+ fprintf(stderr, "Error starting WinPcap Professional: %s\n", errbuf);
+ exit(1);
+ }
+
if(argc < 3)
{
printf("\nNo adapter selected: printing the device list:\n");
diff -urb ..\WinPcap\Examples-pcap/readfile/readfile.c .\Examples-pcap/readfile/readfile.c
--- ..\WinPcap\Examples-pcap/readfile/readfile.c 2008-12-23 02:54:49.000000000 -0800
+++ .\Examples-pcap/readfile/readfile.c 2009-07-14 16:48:44.187500000 -0700
@@ -1,4 +1,5 @@
#include <stdio.h>
+#define WPCAP //this is needed to use pcap_start_oem
#include <pcap.h>

#define LINE_LEN 16
@@ -17,6 +18,13 @@

}

+ /* start WinPcap Professional */
+ if (pcap_start_oem(errbuf, 0) == -1)
+ {
+ fprintf(stderr, "Error starting WinPcap Professional: %s\n", errbuf);
+ exit(1);
+ }
+
/* Open the capture file */
if ((fp = pcap_open_offline(argv[1], // name of the device
errbuf // error buffer
diff -urb ..\WinPcap\Examples-pcap/readfile_ex/readfile_ex.c .\Examples-pcap/readfile_ex/readfile_ex.c
--- ..\WinPcap\Examples-pcap/readfile_ex/readfile_ex.c 2005-07-20 16:02:59.000000000 -0700
+++ .\Examples-pcap/readfile_ex/readfile_ex.c 2009-07-14 16:50:47.281250000 -0700
@@ -1,4 +1,7 @@
#include <stdio.h>
+
+#define WPCAP //this is needed to use pcap_start_oem
+
#include <pcap.h>

#define LINE_LEN 16
@@ -19,6 +22,13 @@

}

+ /* start WinPcap Professional */
+ if (pcap_start_oem(errbuf, 0) == -1)
+ {
+ fprintf(stderr, "Error starting WinPcap Professional: %s\n", errbuf);
+ exit(1);
+ }
+
/* Open the capture file */
if ((fp = pcap_open_offline(argv[1], // name of the device
errbuf // error buffer
diff -urb ..\WinPcap\Examples-pcap/savedump/savedump.c .\Examples-pcap/savedump/savedump.c
--- ..\WinPcap\Examples-pcap/savedump/savedump.c 2008-12-23 02:54:49.000000000 -0800
+++ .\Examples-pcap/savedump/savedump.c 2009-07-14 16:50:56.765625000 -0700
@@ -6,6 +6,8 @@
#define _CRT_SECURE_NO_WARNINGS
#endif

+#define WPCAP //this is needed to use pcap_start_oem
+
#include "pcap.h"

/* prototype of the packet handler */
@@ -29,6 +31,13 @@
return -1;
}

+ /* start WinPcap Professional */
+ if (pcap_start_oem(errbuf, 0) == -1)
+ {
+ fprintf(stderr, "Error starting WinPcap Professional: %s\n", errbuf);
+ exit(1);
+ }
+
/* Retrieve the device list on the local machine */
if (pcap_findalldevs(&alldevs, errbuf) == -1)
{
diff -urb ..\WinPcap\Examples-pcap/sendpack/sendpack.c .\Examples-pcap/sendpack/sendpack.c
--- ..\WinPcap\Examples-pcap/sendpack/sendpack.c 2008-12-23 02:54:49.000000000 -0800
+++ .\Examples-pcap/sendpack/sendpack.c 2009-07-14 16:51:04.453125000 -0700
@@ -1,6 +1,8 @@
#include <stdlib.h>
#include <stdio.h>

+#define WPCAP //this is needed to use pcap_start_oem
+
#include <pcap.h>


@@ -18,6 +20,13 @@
return 1;
}

+ /* start WinPcap Professional */
+ if (pcap_start_oem(errbuf, 0) == -1)
+ {
+ fprintf(stderr, "Error starting WinPcap Professional: %s\n", errbuf);
+ exit(1);
+ }
+
/* Open the adapter */
if ((fp = pcap_open_live(argv[1], // name of the device
65536, // portion of the packet to capture. It doesn't matter in this case
Loading