Skip to content

Commit

Permalink
Remove unused kernel dump mode (never part of npcap)
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Oct 15, 2021
1 parent 946c435 commit db67919
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 1,388 deletions.
6 changes: 3 additions & 3 deletions Common/Packet32.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ extern "C"
BOOLEAN PacketGetNetInfoEx(PCCH AdapterName, npf_if_addr* buffer, PLONG NEntries);
BOOLEAN PacketRequest(LPADAPTER AdapterObject, BOOLEAN Set, PPACKET_OID_DATA OidData);
HANDLE PacketGetReadEvent(LPADAPTER AdapterObject);
BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void* name, int len);
BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks);
BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync);
__declspec(deprecated("Kernel dump mode is not supported")) BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void* name, int len);
__declspec(deprecated("Kernel dump mode is not supported")) BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks);
__declspec(deprecated("Kernel dump mode is not supported")) BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync);
BOOL PacketStopDriver();
BOOL PacketStopDriver60();
VOID PacketCloseAdapter(LPADAPTER lpAdapter);
Expand Down
161 changes: 0 additions & 161 deletions Examples/kdump/kdump.c

This file was deleted.

143 changes: 0 additions & 143 deletions Examples/kdump/kdump.vcxproj

This file was deleted.

3 changes: 0 additions & 3 deletions create_examples.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ xcopy /s/e/v /Y %WINPCAPSOURCEDIR%\Examples %WPDPACKDESTDIR%\Examples-remote >n
rem *** Delete Netmeter since it's no more part of the Developer's pack ***
rd /S /Q %WPDPACKDESTDIR%\Examples-remote\NetMeter\

rem *** Delete kdump since the feature is not available at the moment ***
rd /S /Q %WPDPACKDESTDIR%\Examples-remote\kdump\

xcopy /s/e/v /Y %WINPCAPSOURCEDIR%\Examples-pcap %WPDPACKDESTDIR%\Examples-pcap >nul

rem *** Delete WinPcapStress, since it's not a real example ***
Expand Down
30 changes: 1 addition & 29 deletions docs/npcap-internals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
-->

<para>NPF is able to perform a number of different operations: capture,
monitoring, dump to disk, packet injection. The following paragraphs
monitoring, packet injection. The following paragraphs
will describe shortly each of these operations.</para>
<sect4 id="npcap-internals-capture">
<title>Packet Capture</title>
Expand Down Expand Up @@ -322,34 +322,6 @@
user. No buffers are allocated at kernel and user level.</para>
</sect4>

<!-- This functionality does not work in Npcap and did not work in the latest WinPcap either.
<sect4 id="npcap-internals-dump">
<title>Dump to disk</title>
<para>The dump to disk capability can be used to save the network data to
disk directly from kernel mode.</para>
--><!-- TODO: update this figure
<p align="center"><img border="0" src="npf-dump.gif" width="400" height="187">
</para>
<p align="center"><b>Figure 3: packet capture versus kernel-level dump.</b>
</para>
--><!-- kernel dump doesn't work
<para>In traditional systems, every packet is copied several times, and
normally 4 buffers are allocated: the one of the capture driver, the
one in the application that keeps the captured data, the one of the
stdio functions (or similar) that are used by the application to write
on file, and finally the one of the file system.</para>
<para>When the kernel-level traffic logging feature of NPF is enabled,
the capture driver addresses the file system directly. Only two
buffers and a single copy are necessary, the number of system call is
drastically reduced, therefore the performance is considerably
better.</para>
<para>Current implementation dumps the to disk in the widely used libpcap
format. It gives also the possibility to filter the traffic before the
dump process in order to select the packet that will go to the disk.</para>
</sect4>
-->
</sect3>
</sect2>
<sect2 id="npcap-internals-references">
Expand Down
13 changes: 0 additions & 13 deletions packetWin7/Dll/Packet32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2326,19 +2326,6 @@ BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN Sync)
return Result;
}

/*!
\brief Header associated to a packet in the driver's buffer when the driver is in dump mode.
Similar to the bpf_hdr structure, but simpler.
*/
struct sf_pkthdr {
struct timeval ts; ///< time stamp
UINT caplen; ///< Length of captured portion. The captured portion can be different from
///< the original packet, because it is possible (with a proper filter) to
///< instruct the driver to capture only a portion of the packets.
UINT len; ///< Length of the original packet (off wire).
};


/*!
\brief Sends a buffer of packets to the network.
\param AdapterObject Pointer to an _ADAPTER structure identifying the network adapter that will
Expand Down
Loading

0 comments on commit db67919

Please sign in to comment.