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

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

?? packet32.h

?? “網絡安全技術實踐與代碼詳解”實例代碼
?? 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一区二区三区免费野_久草精品视频
久久精品国产一区二区| 中文字幕一区二区三区av| 色国产综合视频| 99热在这里有精品免费| 成人av网址在线观看| 高清在线不卡av| 成人综合激情网| av一本久道久久综合久久鬼色| 国产精品综合在线视频| 成人小视频在线| 99国产精品久久久久久久久久| 93久久精品日日躁夜夜躁欧美| 91丨porny丨最新| 欧美日本免费一区二区三区| 欧美一区二区高清| 久久夜色精品一区| 亚洲欧美日韩国产一区二区三区 | 欧美一区二区三区视频免费| 91精品国产综合久久精品性色 | 国产精品一级在线| 国产成人精品在线看| a级高清视频欧美日韩| 欧美在线色视频| 欧美电视剧在线看免费| 国产亚洲成av人在线观看导航| 亚洲私人黄色宅男| 日韩国产高清在线| 成人视屏免费看| 欧美性xxxxx极品少妇| 欧美成人免费网站| 亚洲精品老司机| 欧美aaaaaa午夜精品| 懂色中文一区二区在线播放| 欧美性高清videossexo| 久久久久国产精品人| 亚洲综合成人在线视频| 国产乱码精品一区二区三区av| 91在线无精精品入口| 日韩手机在线导航| 亚洲欧美区自拍先锋| 精品一区二区免费在线观看| 色天天综合久久久久综合片| 精品国产1区二区| 亚洲高清中文字幕| 成+人+亚洲+综合天堂| 91精品国产91久久久久久一区二区 | 欧美日韩夫妻久久| 亚洲国产成人在线| 免播放器亚洲一区| 在线一区二区三区四区| 国产色综合一区| 日本美女视频一区二区| 色乱码一区二区三区88| 久久精品这里都是精品| 蜜臀av性久久久久av蜜臀妖精| 91色在线porny| 中文字幕欧美区| 国产曰批免费观看久久久| 91精品国产91久久久久久一区二区| 亚洲欧洲日产国产综合网| 国产裸体歌舞团一区二区| 欧美一级黄色片| 日韩激情中文字幕| 欧美日韩在线观看一区二区| 亚洲精品成人少妇| 91在线观看免费视频| 国产目拍亚洲精品99久久精品| 麻豆91精品视频| 91精品国产品国语在线不卡| 午夜电影网亚洲视频| 欧美性做爰猛烈叫床潮| 亚洲一区二区三区在线播放| 91理论电影在线观看| 亚洲女同ⅹxx女同tv| 不卡欧美aaaaa| 国产精品黄色在线观看| fc2成人免费人成在线观看播放| 亚洲欧美视频在线观看| 成人综合在线观看| 亚洲情趣在线观看| 色噜噜偷拍精品综合在线| 一区二区在线观看av| 欧美自拍丝袜亚洲| 亚洲成人av中文| 在线综合亚洲欧美在线视频 | 日韩精品一区二区三区视频播放 | 亚洲一区二区三区自拍| 欧美日韩五月天| 免费人成网站在线观看欧美高清| 日韩一区二区三| 国产99久久久精品| 18成人在线视频| 欧洲精品一区二区| 免费在线成人网| 久久久99免费| 91在线国内视频| 亚洲成人精品一区二区| 日韩精品影音先锋| 成人h动漫精品一区二| 一区二区在线观看免费视频播放| 91精品国产麻豆国产自产在线| 国产一区啦啦啦在线观看| 最近中文字幕一区二区三区| 欧美性感一类影片在线播放| 国产综合一区二区| 综合电影一区二区三区| 这里只有精品视频在线观看| 国产成人综合亚洲91猫咪| 亚洲伦在线观看| 日韩一区二区三区三四区视频在线观看| 精品午夜一区二区三区在线观看 | 欧美在线|欧美| 九九**精品视频免费播放| 国产精品国产三级国产三级人妇 | 性感美女久久精品| 26uuu国产一区二区三区| 在线一区二区三区四区五区| 寂寞少妇一区二区三区| 一级中文字幕一区二区| 国产日产欧美精品一区二区三区| 欧美日韩视频在线一区二区| 成人毛片视频在线观看| 蜜桃视频一区二区| 一区二区三区不卡视频在线观看| 久久综合国产精品| 欧美老肥妇做.爰bbww| 成人动漫一区二区在线| 欧美日韩日日摸| 9l国产精品久久久久麻豆| 久久爱www久久做| 午夜欧美一区二区三区在线播放| 国产精品福利一区| 久久久久久久久久看片| 日韩一区二区免费电影| 欧美三级中文字幕在线观看| av在线这里只有精品| 国产成人免费视频| 国产一区二区三区在线观看精品 | 欧美精品一区二区高清在线观看 | 青娱乐精品视频在线| 亚洲午夜久久久久中文字幕久| 中文字幕在线不卡视频| 国产日韩欧美在线一区| 日韩精品一区二区三区中文精品| 欧美日韩国产天堂| 欧美三级蜜桃2在线观看| 色久综合一二码| 色噜噜狠狠成人网p站| 99re这里只有精品首页| 色域天天综合网| 色哟哟一区二区| 在线免费观看日韩欧美| 色综合久久综合中文综合网| 色视频成人在线观看免| 在线亚洲一区观看| 欧美日韩中文一区| 欧美男生操女生| 欧美一二三四在线| 精品国产一区二区三区久久影院 | 日本丰满少妇一区二区三区| 99re在线精品| 欧美系列日韩一区| 日韩一卡二卡三卡| 精品欧美一区二区三区精品久久| 精品精品欲导航| 国产嫩草影院久久久久| 亚洲欧美区自拍先锋| 视频在线观看国产精品| 麻豆高清免费国产一区| 国产福利一区在线| 日本黄色一区二区| 日韩一区二区三区在线| 久久久久久久久久看片| 亚洲三级小视频| 日韩不卡手机在线v区| 国产精品一二三区| 日本久久电影网| 日韩三区在线观看| 中文字幕av不卡| 亚洲国产美女搞黄色| 九色综合国产一区二区三区| 丁香婷婷深情五月亚洲| 欧美中文字幕久久| 欧美精品一区二区三区在线| 亚洲天天做日日做天天谢日日欢 | 国产高清无密码一区二区三区| 成人激情黄色小说| 欧美一卡2卡3卡4卡| 亚洲欧美综合色| 美女诱惑一区二区| 91麻豆产精品久久久久久 | 国产成人午夜视频| 欧美自拍偷拍午夜视频| 日本一区二区三区国色天香| 亚洲h在线观看| 日本高清不卡aⅴ免费网站| 国产亚洲一区二区三区| 日韩精品一级中文字幕精品视频免费观看| 国产一区二区在线观看视频| 欧美日韩mp4|