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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? packet32.h

?? ddk wizard demo for vc programe
?? H
字號(hào):
/*
 * Copyright (c) 1999, 2000
 *	Politecnico di Torino.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that: (1) source code distributions
 * retain the above copyright notice and this paragraph in its entirety, (2)
 * distributions including binary code include the above copyright notice and
 * this paragraph in its entirety in the documentation or other materials
 * provided with the distribution, and (3) all advertising materials mentioning
 * features or use of this software display the following acknowledgement:
 * ``This product includes software developed by the Politecnico
 * di Torino, and its contributors.'' Neither the name of
 * the University nor the names of its contributors may be used to endorse
 * or promote products derived from this software without specific prior
 * written permission.
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

/** @ingroup packetapi
 *  @{ 
 */

/** @defgroup packet32h Packet.dll definitions and data structures
 *  Packet32.h contains the data structures and the definitions used by packet.dll.
 *  The file is used both by the Win9x and the WinNTx versions of packet.dll, and can be included
 *  by the applications that use the functions of this library
 *  @{
 */

#ifndef __PACKET32
#define __PACKET32

#include <winsock2.h>
#include "devioctl.h"

// Working modes
#define PACKET_MODE_CAPT 0x0 ///< Capture mode
#define PACKET_MODE_STAT 0x1 ///< Statistical mode
#define PACKET_MODE_DUMP 0x10 ///< Dump mode
#define PACKET_MODE_STAT_DUMP MODE_DUMP | MODE_STAT ///< Statistical dump Mode

// ioctls
#define FILE_DEVICE_PROTOCOL        0x8000

#define IOCTL_PROTOCOL_STATISTICS   CTL_CODE(FILE_DEVICE_PROTOCOL, 2 , METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_PROTOCOL_RESET        CTL_CODE(FILE_DEVICE_PROTOCOL, 3 , METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_PROTOCOL_READ         CTL_CODE(FILE_DEVICE_PROTOCOL, 4 , METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_PROTOCOL_WRITE        CTL_CODE(FILE_DEVICE_PROTOCOL, 5 , METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_PROTOCOL_MACNAME      CTL_CODE(FILE_DEVICE_PROTOCOL, 6 , METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_OPEN                  CTL_CODE(FILE_DEVICE_PROTOCOL, 7 , METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_CLOSE                 CTL_CODE(FILE_DEVICE_PROTOCOL, 8 , METHOD_BUFFERED, FILE_ANY_ACCESS)

#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  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 Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))

/*!
  \brief Network type structure.

  This structure is used by the PacketGetNetType() function to return information on the current adapter's type and speed.
*/
typedef struct NetType
{
	UINT LinkType;	///< The MAC of the current network adapter (see function PacketGetNetType() for more information)
	UINT LinkSpeed;	///< The speed of the network in bits per second
}NetType;


//some definitions stolen from libpcap

#ifndef BPF_MAJOR_VERSION

/*!
  \brief A BPF pseudo-assembly program.

  The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet. 
*/
struct bpf_program {
	UINT bf_len;				///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow.
	struct bpf_insn *bf_insns;	///< A pointer to the first instruction of the program.
};

/*!
  \brief A single BPF pseudo-instruction.

  bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver.
*/
struct bpf_insn {
	USHORT	code;		///< Instruction type and addressing mode.
	UCHAR 	jt;			///< Jump if true
	UCHAR 	jf;			///< Jump if false
	int k;				///< Generic field used for various purposes.
};

/*!
  \brief Structure that contains a couple of statistics values on the current capture.

  It is used by packet.dll to return statistics about a capture session.
*/
struct bpf_stat {
	UINT bs_recv;		///< Number of packets that the driver received from the network adapter 
						///< from the beginning of the current capture. This value includes the packets 
						///< lost by the driver.
	UINT bs_drop;		///< number of packets that the driver lost from the beginning of a capture. 
						///< Basically, a packet is lost when the the buffer of the driver is full. 
						///< In this situation the packet cannot be stored and the driver rejects it.
	UINT ps_ifdrop;		///< drops by interface. XXX not yet supported
	UINT bs_capt;		///< number of packets that pass the filter, find place in the kernel buffer and
						///< thus reach the application.
};

/*!
  \brief Packet header.

  This structure defines the header associated with every packet delivered to the application.
*/
struct bpf_hdr {
	struct timeval	bh_tstamp;	///< The timestamp associated with the captured packet. 
								///< It is stored in a TimeVal structure.
	UINT	bh_caplen;			///< Length of captured portion. The captured portion <b>can be different</b>
								///< 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	bh_datalen;			///< Original length of packet
	USHORT		bh_hdrlen;		///< Length of bpf header (this struct plus alignment padding). In some cases,
								///< a padding could be added between the end of this structure and the packet
								///< data for performance reasons. This filed can be used to retrieve the actual data 
								///< of the packet.
};

/*!
  \brief Dump packet header.

  This structure defines the header associated with the packets in a buffer to be used with PacketSendPackets().
  It is simpler than the bpf_hdr, because it corresponds to the header associated by WinPcap and libpcap to a
  packet in a dump file. This makes straightforward sending WinPcap dump files to the network.
*/
struct dump_bpf_hdr{
    struct timeval	ts;			///< Time stamp of the packet
    UINT			caplen;		///< Length of captured portion. The captured portion can smaller than the 
								///< 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).
};


#endif

#define        DOSNAMEPREFIX   TEXT("Packet_")	///< Prefix added to the adapters device names to create the WinPcap devices
#define        MAX_LINK_NAME_LENGTH	64			//< Maximum length of the devices symbolic links
#define        NMAX_PACKET 65535

/*!
  \brief Describes a 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
}  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;

/*!
  \brief Addresses of a network adapter.

  This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with 
  an adapter.
*/
typedef struct npf_if_addr {
	struct sockaddr IPAddress;	///< IP address.
	struct sockaddr SubnetMask;	///< Netmask for that address.
	struct sockaddr Broadcast;	///< Broadcast address.
}npf_if_addr;

#ifdef __cplusplus
extern "C" {
#endif

/**
 *  @}
 */

//---------------------------------------------------------------------------
// FUNCTIONS
//---------------------------------------------------------------------------

PCHAR PacketGetVersion();
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);
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(LPTSTR 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 PacketGetNetInfo(LPTSTR AdapterName, PULONG netp, PULONG maskp);
BOOLEAN PacketGetNetInfoEx(LPTSTR 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

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲精品一区二区三区 | 亚洲v精品v日韩v欧美v专区| 亚洲国产成人午夜在线一区| 国产偷国产偷亚洲高清人白洁| 欧美成人a∨高清免费观看| 日韩一区二区免费在线电影| 日韩视频中午一区| 精品久久人人做人人爱| 2019国产精品| 国产精品色婷婷久久58| 亚洲欧洲国产日韩| 一个色在线综合| 五月婷婷综合激情| 久久成人久久爱| 国产69精品久久久久毛片| 成人一级黄色片| 色综合久久久久综合体| 欧美日韩视频第一区| 日韩欧美在线影院| 久久久久国产精品厨房| 中文字幕av不卡| 亚洲精品老司机| 日韩电影网1区2区| 国产一区三区三区| fc2成人免费人成在线观看播放| 99久久伊人网影院| 欧美三区在线观看| 欧美成人一区二区三区在线观看| 日本一区二区高清| 亚洲综合在线免费观看| 日本不卡中文字幕| 福利电影一区二区| 91电影在线观看| 日韩精品一区二区在线观看| 国产精品久久久久久久浪潮网站 | 国产成人午夜精品影院观看视频 | 欧美一区二区视频在线观看2020| 2021久久国产精品不只是精品| 中文字幕欧美日本乱码一线二线| 亚洲女爱视频在线| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产成人无遮挡在线视频| 色噜噜狠狠色综合欧洲selulu| 5月丁香婷婷综合| 国产日产欧美一区| 亚洲综合区在线| 国产综合久久久久久鬼色| 91啪在线观看| 精品国产三级a在线观看| 亚洲丝袜自拍清纯另类| 秋霞电影网一区二区| 成人h动漫精品一区二区| 3751色影院一区二区三区| 国产亲近乱来精品视频| 午夜国产精品一区| 波多野结衣视频一区| 91精品国产综合久久精品| 亚洲国产成人在线| 久久国产福利国产秒拍| 欧美性欧美巨大黑白大战| 久久久久久99精品| 日本va欧美va欧美va精品| 色综合久久中文综合久久97| 久久久久九九视频| 蜜桃视频一区二区三区| 欧美在线三级电影| 中文欧美字幕免费| 狠狠色综合色综合网络| 欧美日韩aaaaaa| 亚洲欧美另类在线| 懂色一区二区三区免费观看| 日韩欧美一区二区免费| 亚洲第一久久影院| 91老师片黄在线观看| 国产欧美日韩在线| 精品一区二区三区蜜桃| 在线成人高清不卡| 一区二区三区高清| av一区二区三区黑人| 久久精品一级爱片| 麻豆91精品91久久久的内涵| 欧美日韩国产中文| 夜夜嗨av一区二区三区中文字幕| 成人黄色一级视频| 久久久久亚洲综合| 国产真实乱对白精彩久久| 欧美一区二区三区视频在线 | 成人h动漫精品| 国产性做久久久久久| 激情综合网av| 欧美精品一区二区三区很污很色的 | 成人久久视频在线观看| 2020日本不卡一区二区视频| 看电影不卡的网站| 欧美变态口味重另类| 全国精品久久少妇| 日韩欧美亚洲国产另类 | www.激情成人| 亚洲国产精品黑人久久久| 国产成人精品影视| 国产日韩v精品一区二区| 国产精品资源在线看| 久久久99免费| 国产91丝袜在线播放0| 欧美—级在线免费片| 国产麻豆午夜三级精品| 久久久久国产免费免费| 国产成人99久久亚洲综合精品| 国产日韩欧美麻豆| 不卡一区二区在线| 亚洲精品乱码久久久久久 | 亚洲素人一区二区| 91免费版pro下载短视频| 综合久久久久综合| 欧美在线观看禁18| 午夜精品久久久久久久蜜桃app | 亚洲免费资源在线播放| 在线观看av一区二区| 午夜精品久久久久影视| 日韩欧美一级二级三级久久久| 精品一区二区三区视频在线观看 | 激情偷乱视频一区二区三区| 久久五月婷婷丁香社区| www.亚洲色图| 亚洲第一二三四区| 精品国产免费一区二区三区香蕉| 国产精品性做久久久久久| 中文字幕一区二区三区蜜月| 日本道免费精品一区二区三区| 五月天一区二区三区| 欧美一卡2卡3卡4卡| 国产1区2区3区精品美女| 日韩一区中文字幕| 91精选在线观看| 国产99久久久国产精品潘金| 亚洲乱码国产乱码精品精98午夜| 在线播放国产精品二区一二区四区 | 国产成人亚洲综合色影视| 亚洲日韩欧美一区二区在线| 欧美精品 国产精品| 国产精品一区在线观看乱码| 亚洲欧美激情插| 91精品国产综合久久精品app| 高清在线成人网| 一区二区三区精密机械公司| 日韩免费高清电影| 色呦呦网站一区| 韩国三级电影一区二区| 亚洲欧美国产毛片在线| 精品国产欧美一区二区| 一本一本久久a久久精品综合麻豆| 日韩—二三区免费观看av| 欧美高清在线视频| 欧美一区二区二区| 91一区在线观看| 国产一区二区三区免费看| 亚洲综合成人在线视频| 国产欧美中文在线| 欧美乱熟臀69xxxxxx| 成人动漫一区二区| 免费看欧美美女黄的网站| 亚洲欧美一区二区三区极速播放| 欧美本精品男人aⅴ天堂| 97久久精品人人爽人人爽蜜臀| 麻豆精品一区二区| 亚洲一区视频在线观看视频| 国产视频911| 日韩精品一区二区三区在线观看 | 日韩精品一区二区三区在线| 色偷偷久久一区二区三区| 国产激情91久久精品导航| 日韩国产成人精品| 一区二区三区四区激情| 国产人妖乱国产精品人妖| 日韩精品在线网站| 欧美精品久久久久久久久老牛影院| 99精品热视频| 国产成人精品免费一区二区| 麻豆精品久久精品色综合| 婷婷久久综合九色综合绿巨人| 中文字幕欧美一区| 日本一区二区成人在线| 久久综合久久综合亚洲| 91麻豆精品久久久久蜜臀| 色先锋资源久久综合| 99精品在线观看视频| 成人毛片视频在线观看| 国产精品小仙女| 国产一区在线不卡| 精品一区二区久久久| 日日嗨av一区二区三区四区| 亚洲高清免费在线| 一级特黄大欧美久久久| 日韩美女精品在线| 亚洲国产高清aⅴ视频| 中文字幕的久久| 国产精品系列在线| 中文字幕在线观看一区| 亚洲欧美自拍偷拍色图| 亚洲欧洲精品一区二区精品久久久|