#define pBIOCSETBUFFERSIZE 9592 ///< IOCTL code: set kernel buffer size.
#define pBIOCSETF 9030 ///< IOCTL code: set packet filtering program.
#define pBIOCGSTATS 9031 ///< IOCTL code: get the capture stats.
#define pBIOCSRTIMEOUT 7416 ///< IOCTL code: set the read timeout.
#define pBIOCSMODE 7412 ///< IOCTL code: set working mode.
#define pBIOCSWRITEREP 7413 ///< IOCTL code: set number of physical repetions of every packet written by the app.
#define pBIOCSMINTOCOPY 7414 ///< IOCTL code: set minimum amount of data in the kernel buffer that unlocks a read call.
#define pBIOCSETOID 2147483648 ///< IOCTL code: set an OID value.
#define pBIOCQUERYOID 2147483652 ///< IOCTL code: get an OID value.
#define pATTACHPROCESS 7117 ///< IOCTL code: attach a process to the driver. Used in Win9x only.
#define pDETACHPROCESS 7118 ///< IOCTL code: detach a process from the driver. Used in Win9x only.
#define pBIOCSETDUMPFILENAME 9029 ///< IOCTL code: set the name of a the file used by kernel dump mode.
#define pBIOCEVNAME 7415 ///< IOCTL code: get the name of the event that the driver signals when some data is present in the buffer.
#define pBIOCSENDPACKETSNOSYNC 9032 ///< IOCTL code: Send a buffer containing multiple packets to the network, ignoring the timestamps associated with the packets.
#define pBIOCSENDPACKETSSYNC 9033 ///< IOCTL code: Send a buffer containing multiple packets to the network, respecting the timestamps associated with the packets.
#define pBIOCSETDUMPLIMITS 9034 ///< IOCTL code: Set the dump file limits. See the PacketSetDumpLimits() function.
#define pBIOCISETLOBBEH 7410
#define pBIOCISDUMPENDED 7411 ///< IOCTL code: Get the status of the kernel dump process. See the PacketIsDumpEnded() function.
#define pBIOCSTIMEZONE 7471 ///< IOCTL code: set time zone. Used in Win9x only.
/// Alignment macro. Defines the alignment size.
#define Packet_ALIGNMENT sizeof(int)
/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT.
#define ADAPTER_NAME_LENGTH 256 + 12 ///< Maximum length for the name of an adapter. The value is the same used by the IP Helper API.
#define ADAPTER_DESC_LENGTH 128 ///< Maximum length for the description of an adapter. The value is the same used by the IP Helper API.
#define MAX_MAC_ADDR_LENGTH 8 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
#define MAX_NETWORK_ADDRESSES 16 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API.
typedefstructWAN_ADAPTER_INTWAN_ADAPTER;///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
typedefWAN_ADAPTER*PWAN_ADAPTER;///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
#define INFO_FLAG_NDIS_ADAPTER 0 ///< Flag for ADAPTER_INFO: this is a traditional ndis adapter
#define INFO_FLAG_NDISWAN_ADAPTER 1 ///< Flag for ADAPTER_INFO: this is a NdisWan adapter
#define INFO_FLAG_DAG_CARD 2 ///< Flag for ADAPTER_INFO: this is a DAG card
#define INFO_FLAG_DAG_FILE 6 ///< Flag for ADAPTER_INFO: this is a DAG file
#define INFO_FLAG_DONT_EXPORT 8 ///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones.
HANDLEhFile;///< \internal Handle to an open instance of the NPF driver.
CHARSymbolicLink[MAX_LINK_NAME_LENGTH];///< \internal A string containing the name of the network adapter currently opened.
intNumWrites;///< \internal Number of times a packets written on this adapter will be repeated
///< on the wire.
HANDLEReadEvent;///< A notification event associated with the read calls on the adapter.
///< It can be passed to standard Win32 functions (like WaitForSingleObject
///< or WaitForMultipleObjects) to wait until the driver's buffer contains some
///< data. It is particularly useful in GUI applications that need to wait
///< concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy()
///< function can be used to define the minimum amount of data in the kernel buffer
///< that will cause the event to be signalled.
UINTReadTimeOut;///< \internal The amount of time after which a read on the driver will be released and
///< ReadEvent will be signaled, also if no packets were captured
CHARName[ADAPTER_NAME_LENGTH];
PWAN_ADAPTERpWanAdapter;
UINTFlags;///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API.
#ifdef HAVE_DAG_API
dagc_t*pDagCard;///< Pointer to the dagc API adapter descriptor for this adapter
PCHARDagBuffer;///< Pointer to the buffer with the packets that is received from the DAG card
structtimevalDagReadTimeout;///< Read timeout. The dagc API requires a timeval structure
unsignedDagFcsLen;///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry
DWORDDagFastProcess;///< 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).