亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? packet32.h

?? 基于WINPCAP的嗅探程序
?? H
?? 第 1 頁 / 共 2 頁
字號:

#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.


typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API
typedef WAN_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.

/*!
  \brief Contains comprehensive information about a network adapter.

  This structure is filled with all the accessory information that the user can need about an adapter installed
  on his system.
*/
typedef struct _ADAPTER_INFO  
{
	struct _ADAPTER_INFO *Next;				///< Pointer to the next adapter in the list.
	CHAR Name[ADAPTER_NAME_LENGTH + 1];		///< Name of the device representing the adapter.
	CHAR Description[ADAPTER_DESC_LENGTH + 1];	///< Human understandable description of the adapter
	UINT MacAddressLen;						///< Length of the link layer address.
	UCHAR MacAddress[MAX_MAC_ADDR_LENGTH];	///< Link layer address.
	NetType LinkLayer;						///< Physical characteristics of this adapter. This NetType structure contains the link type and the speed of the adapter.
	INT NNetworkAddresses;					///< Number of network layer addresses of this adapter.
	npf_if_addr *NetworkAddresses;			///< Pointer to an array of npf_if_addr, each of which specifies a network address of this adapter.
	UINT Flags;								///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API.
}
ADAPTER_INFO, *PADAPTER_INFO;

/*!
  \brief Describes an opened network adapter.

  This structure is the most important for the functioning of packet.dll, but the great part of its fields
  should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters
*/
typedef struct _ADAPTER  { 
	HANDLE hFile;				///< \internal Handle to an open instance of the NPF driver.
	CHAR  SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened.
	int NumWrites;				///< \internal Number of times a packets written on this adapter will be repeated 
								///< on the wire.
	HANDLE ReadEvent;			///< 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. 
	
	UINT ReadTimeOut;			///< \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
	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.
#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;

/*!
  \brief Structure that contains a group of packets coming from the driver.

  This structure defines the header associated with every packet delivered to the application.
*/
typedef struct _PACKET {  
	HANDLE       hEvent;		///< \deprecated Still present for compatibility with old applications.
	OVERLAPPED   OverLapped;	///< \deprecated Still present for compatibility with old applications.
	PVOID        Buffer;		///< Buffer with containing the packets. See the PacketReceivePacket() for
								///< details about the organization of the data in this buffer
	UINT         Length;		///< Length of the buffer
	DWORD        ulBytesReceived;	///< Number of valid bytes present in the buffer, i.e. amount of data
									///< received by the last call to PacketReceivePacket()
	BOOLEAN      bIoComplete;	///< \deprecated Still present for compatibility with old applications.
}  PACKET, *LPPACKET;

/*!
  \brief Structure containing an OID request.

  It is used by the PacketRequest() function to send an OID to the interface card driver. 
  It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, 
  the list of the multicast groups defined on it, and so on.
*/
struct _PACKET_OID_DATA {
    ULONG Oid;					///< OID code. See the Microsoft DDK documentation or the file ntddndis.h
								///< for a complete list of valid codes.
    ULONG Length;				///< Length of the data field
    UCHAR Data[1];				///< variable-lenght field that contains the information passed to or received 
								///< from the adapter.
}; 
typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA;


#if _DBG
#define ODS(_x) OutputDebugString(TEXT(_x))
#define ODSEx(_x, _y)
#else
#ifdef _DEBUG_TO_FILE
/*! 
  \brief Macro to print a debug string. The behavior differs depending on the debug level
*/
#define ODS(_x) { \
	FILE *f; \
	f = fopen("winpcap_debug.txt", "a"); \
	fprintf(f, "%s", _x); \
	fclose(f); \
}
/*! 
  \brief Macro to print debug data with the printf convention. The behavior differs depending on 
  the debug level
*/
#define ODSEx(_x, _y) { \
	FILE *f; \
	f = fopen("winpcap_debug.txt", "a"); \
	fprintf(f, _x, _y); \
	fclose(f); \
}



LONG PacketDumpRegistryKey(PCHAR KeyName, PCHAR FileName);
#else
#define ODS(_x)		
#define ODSEx(_x, _y)
#endif
#endif

/* We load dinamically the dag library in order link it only when it's present on the system */
#ifdef HAVE_DAG_API
typedef dagc_t* (*dagc_open_handler)(const char *source, unsigned flags, char *ebuf);	///< prototype used to dynamically load the dag dll
typedef void (*dagc_close_handler)(dagc_t *dagcfd);										///< prototype used to dynamically load the dag dll
typedef int (*dagc_getlinktype_handler)(dagc_t *dagcfd);								///< prototype used to dynamically load the dag dll
typedef int (*dagc_getlinkspeed_handler)(dagc_t *dagcfd);								///< prototype used to dynamically load the dag dll
typedef int (*dagc_setsnaplen_handler)(dagc_t *dagcfd, unsigned snaplen);				///< prototype used to dynamically load the dag dll
typedef unsigned (*dagc_getfcslen_handler)(dagc_t *dagcfd);								///< prototype used to dynamically load the dag dll
typedef int (*dagc_receive_handler)(dagc_t *dagcfd, u_char **buffer, u_int *bufsize);	///< prototype used to dynamically load the dag dll
typedef int (*dagc_stats_handler)(dagc_t *dagcfd, dagc_stats_t *ps);					///< prototype used to dynamically load the dag dll
typedef int (*dagc_wait_handler)(dagc_t *dagcfd, struct timeval *timeout);				///< prototype used to dynamically load the dag dll
typedef int (*dagc_finddevs_handler)(dagc_if_t **alldevsp, char *ebuf);					///< prototype used to dynamically load the dag dll
typedef int (*dagc_freedevs_handler)(dagc_if_t *alldevsp);								///< prototype used to dynamically load the dag dll
#endif // HAVE_DAG_API

#ifdef __cplusplus
extern "C" {
#endif

/**
 *  @}
 */

// The following is used to check the adapter name in PacketOpenAdapterNPF and prevent 
// opening of firewire adapters 
#define FIREWIRE_SUBSTR L"1394"

void PacketPopulateAdaptersInfoList();
PWCHAR SChar2WChar(PCHAR string);
PCHAR WChar2SChar(PWCHAR string);
BOOL PacketGetFileVersion(LPTSTR FileName, PCHAR VersionBuff, UINT VersionBuffLen);
PADAPTER_INFO PacketFindAdInfo(PCHAR AdapterName);
BOOLEAN PacketUpdateAdInfo(PCHAR AdapterName);
BOOLEAN IsFireWire(TCHAR *AdapterDesc);


//---------------------------------------------------------------------------
// EXPORTED FUNCTIONS
//---------------------------------------------------------------------------

PCHAR PacketGetVersion();
PCHAR PacketGetDriverVersion();
BOOLEAN PacketSetMinToCopy(LPADAPTER AdapterObject,int nbytes);
BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject,int nwrites);
BOOLEAN PacketSetMode(LPADAPTER AdapterObject,int mode);
BOOLEAN PacketSetReadTimeout(LPADAPTER AdapterObject,int timeout);
BOOLEAN PacketSetBpf(LPADAPTER AdapterObject,struct bpf_program *fp);
INT PacketSetSnapLen(LPADAPTER AdapterObject,int snaplen);
BOOLEAN PacketGetStats(LPADAPTER AdapterObject,struct bpf_stat *s);
BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject,struct bpf_stat *s);
BOOLEAN PacketSetBuff(LPADAPTER AdapterObject,int dim);
BOOLEAN PacketGetNetType (LPADAPTER AdapterObject,NetType *type);
LPADAPTER PacketOpenAdapter(PCHAR AdapterName);
BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET pPacket,BOOLEAN Sync);
INT PacketSendPackets(LPADAPTER AdapterObject,PVOID PacketBuff,ULONG Size, BOOLEAN Sync);
LPPACKET PacketAllocatePacket(void);
VOID PacketInitPacket(LPPACKET lpPacket,PVOID  Buffer,UINT  Length);
VOID PacketFreePacket(LPPACKET lpPacket);
BOOLEAN PacketReceivePacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN Sync);
BOOLEAN PacketSetHwFilter(LPADAPTER AdapterObject,ULONG Filter);
BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG  BufferSize);
BOOLEAN PacketGetNetInfoEx(PCHAR 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);
BOOL PacketStopDriver();
VOID PacketCloseAdapter(LPADAPTER lpAdapter);

#ifdef __cplusplus
}
#endif 

#endif //__PACKET32

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
全国精品久久少妇| 亚洲一区欧美一区| 婷婷国产v国产偷v亚洲高清| 国产原创一区二区三区| 91精品国产综合久久久久久久| 精品国产一区二区三区四区四| 亚洲第一二三四区| 91在线视频网址| 亚洲视频中文字幕| 成人性色生活片| 国产精品久久久久7777按摩| 懂色av噜噜一区二区三区av| 国产欧美日韩视频在线观看| 99久久久无码国产精品| 亚洲一区二区在线视频| 日韩欧美一二三| 成人三级在线视频| 亚洲妇女屁股眼交7| 精品国产伦一区二区三区观看体验| 福利电影一区二区三区| 亚洲综合图片区| 精品福利在线导航| 99国产精品99久久久久久| 日韩国产成人精品| 国产精品久久久久久妇女6080| 欧美三级电影一区| 丁香婷婷综合网| 亚洲永久免费视频| 久久蜜桃香蕉精品一区二区三区| 色综合久久综合网| 国产一区二区在线电影| 亚洲免费观看高清完整版在线观看| 欧美一区二区观看视频| 91在线观看地址| 精品一区二区三区在线观看国产| 综合久久给合久久狠狠狠97色| 91精品欧美一区二区三区综合在| 成人国产电影网| 日韩二区三区四区| 亚洲在线观看免费| 中文字幕精品三区| 精品日韩欧美在线| 欧美日韩美女一区二区| 成人免费看黄yyy456| 日韩精品一级中文字幕精品视频免费观看| 欧美国产精品久久| 欧美精品一区二| 欧美顶级少妇做爰| 在线亚洲免费视频| 成人激情av网| 国产精品一区二区无线| 免费观看一级欧美片| 亚洲一区影音先锋| 中文字幕人成不卡一区| 久久午夜老司机| 日韩欧美www| 欧美日韩久久久| 欧美视频一区在线| 91精彩视频在线| a级精品国产片在线观看| 国产精品2024| 国产精品一区二区不卡| 韩国欧美国产一区| 免费人成在线不卡| 琪琪一区二区三区| 欧美aaa在线| 丝袜亚洲精品中文字幕一区| 亚洲自拍偷拍综合| 一区二区三区四区精品在线视频| 中文av一区二区| 中文字幕 久热精品 视频在线| 精品剧情在线观看| 精品三级在线看| 久久综合久久99| 精品国产91久久久久久久妲己| 精品欧美乱码久久久久久 | 男女男精品视频| 日日摸夜夜添夜夜添亚洲女人| 亚洲成人你懂的| 亚洲图片欧美色图| 亚洲成在人线在线播放| 日韩精品福利网| 日本欧美大码aⅴ在线播放| 日韩电影一区二区三区| 免费观看在线综合色| 青青草97国产精品免费观看无弹窗版| 日韩 欧美一区二区三区| 美国欧美日韩国产在线播放| 蜜臀av性久久久久av蜜臀妖精| 卡一卡二国产精品 | 国产美女av一区二区三区| 国产自产2019最新不卡| 久久99最新地址| 黑人精品欧美一区二区蜜桃| 丁香另类激情小说| 欧美亚洲综合在线| 在线电影一区二区三区| 精品91自产拍在线观看一区| 国产日韩欧美一区二区三区综合| 欧美激情一区二区三区| 樱桃国产成人精品视频| 五月激情六月综合| 国产黄人亚洲片| 在线观看精品一区| 日韩一级黄色大片| 国产精品久久精品日日| 亚洲第一搞黄网站| 国产一区二区三区视频在线播放| av高清久久久| 欧美一区二区三区免费视频| 国产欧美日韩在线| 亚洲成人午夜电影| 成人综合在线视频| 亚洲色图.com| 精品一区二区三区在线观看| 日韩欧美一区电影| 欧美性大战久久久久久久蜜臀| 日韩欧美高清在线| 亚洲天堂免费看| 捆绑紧缚一区二区三区视频| 99国产精品国产精品毛片| 欧美一区二区在线播放| 国产精品久久免费看| 日本伊人色综合网| 99国产精品久| 精品国产不卡一区二区三区| 亚洲在线中文字幕| 不卡一区中文字幕| 日韩美女天天操| 亚洲妇熟xx妇色黄| 成人毛片视频在线观看| 日韩亚洲国产中文字幕欧美| 亚洲色欲色欲www| 国产精品一区三区| 日韩一级在线观看| 亚洲不卡在线观看| 91亚洲精华国产精华精华液| 精品福利一二区| 日本高清成人免费播放| 精品成人一区二区| 日精品一区二区| 日本道精品一区二区三区 | 成人国产免费视频| 日韩精品中文字幕一区| 亚洲成人1区2区| 色综合久久99| 亚洲四区在线观看| 丁香婷婷深情五月亚洲| 久久美女高清视频| 精东粉嫩av免费一区二区三区| 欧美美女bb生活片| 亚洲电影欧美电影有声小说| 色综合久久88色综合天天| 欧美国产一区视频在线观看| 韩国理伦片一区二区三区在线播放| 欧美日韩一区 二区 三区 久久精品| 亚洲欧美二区三区| 99国产精品久| 18成人在线观看| 99精品1区2区| 樱花草国产18久久久久| 91免费版在线| 一区二区三区四区高清精品免费观看 | 久久久久高清精品| 国内久久婷婷综合| 国产亚洲一二三区| 国产乱码精品一区二区三区av| 精品噜噜噜噜久久久久久久久试看 | 国产精品一二三区| 久久精品在这里| 国产.欧美.日韩| 国产精品成人免费在线| 99久久婷婷国产综合精品电影| 最新中文字幕一区二区三区 | 一区二区三区**美女毛片| 91久久奴性调教| 午夜在线电影亚洲一区| 欧美一区二区三区电影| 蜜臀av一区二区三区| www久久精品| 成人app网站| 一区二区三区在线免费视频| 精品1区2区3区| 美女视频黄 久久| 久久日韩精品一区二区五区| 国产999精品久久| 亚洲欧美另类久久久精品| 欧美日韩黄色影视| 黑人巨大精品欧美一区| 国产精品久久影院| 欧美日韩国产美女| 极品少妇xxxx偷拍精品少妇| 欧美激情一区二区三区不卡 | 日韩欧美一区二区免费| 国产在线精品一区二区| 国产精品成人一区二区三区夜夜夜 | 亚洲视频免费观看| 91精品在线观看入口| 国产成人精品亚洲日本在线桃色| 日韩毛片视频在线看|