Skip to content

Commit

Permalink
Remove DAG support (unused). Fixes nmap#203
Browse files Browse the repository at this point in the history
Prior to this, some minor modifications would result in Packet.dll
building with DAG support (add HAVE_DAG_API to preprocessor definitions,
fix some compiler errors), but we do not have hardware or DLLs for
testing and have no interest in supporting it.
  • Loading branch information
bonsaiviking committed Jul 24, 2020
1 parent a463a33 commit 6701d5a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 776 deletions.
14 changes: 1 addition & 13 deletions Common/Packet32.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ typedef struct _AirpcapHandle* PAirpcapHandle;
#endif /* AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ */
#endif /* HAVE_AIRPCAP_API */

#ifdef HAVE_DAG_API
#include <dagc.h>
#endif /* HAVE_DAG_API */

// Libpcap/wpcap recognizes this macro and knows Npcap Packet API is provided for compilation.
#define HAVE_NPCAP_PACKET_API

Expand Down Expand Up @@ -303,19 +299,11 @@ typedef struct _ADAPTER
///< ReadEvent will be signaled, also if no packets were captured
CHAR Name[ADAPTER_NAME_LENGTH];
PWAN_ADAPTER pWanAdapter;
UINT Flags; ///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API.
UINT Flags; ///< Adapter's flags. Tell if this adapter must be treated in a different way.

#ifdef HAVE_AIRPCAP_API
PAirpcapHandle AirpcapAd;
#endif // HAVE_AIRPCAP_API

#ifdef HAVE_DAG_API
dagc_t* pDagCard; ///< Pointer to the dagc API adapter descriptor for this adapter
PCHAR DagBuffer; ///< Pointer to the buffer with the packets that is received from the DAG card
struct timeval DagReadTimeout; ///< Read timeout. The dagc API requires a timeval structure
unsigned DagFcsLen; ///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry
DWORD DagFastProcess; ///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps).
#endif // HAVE_DAG_API
} ADAPTER, * LPADAPTER;

/*!
Expand Down
227 changes: 0 additions & 227 deletions Common/dagc.h

This file was deleted.

Loading

0 comments on commit 6701d5a

Please sign in to comment.