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

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

?? packet32.h

?? ngrep strives to provide most of GNU grep s common features, applying them to the network layer. ngr
?? H
字號:
/*
 * 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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人在线综合网| 麻豆成人在线观看| 国产亚洲一区字幕| 久久综合九色综合97婷婷| 4438成人网| 欧美一区二区三区视频免费播放| 在线视频亚洲一区| 欧美性受极品xxxx喷水| 欧美最猛性xxxxx直播| 欧美精品v日韩精品v韩国精品v| 欧美日韩国产综合一区二区三区 | 欧美成人bangbros| 日韩一区二区三免费高清| 日韩女优制服丝袜电影| 久久精品免费在线观看| 亚洲视频一区在线| 午夜久久电影网| 国产精品资源在线看| 99久久久久久| 欧美日韩日日摸| 精品国精品国产| 亚洲欧美在线观看| 亚洲成av人在线观看| 九九精品一区二区| 成人黄色综合网站| 欧美精品乱码久久久久久| 久久久久久日产精品| 亚洲欧美一区二区三区国产精品 | 中文字幕一区二区在线播放| 亚洲欧洲国产日韩| 水蜜桃久久夜色精品一区的特点 | 午夜亚洲国产au精品一区二区| 日韩精品一级二级| 成人动漫精品一区二区| 欧美日韩国产乱码电影| 国产人成亚洲第一网站在线播放 | av一区二区三区在线| 欧美精选午夜久久久乱码6080| 久久中文字幕电影| 亚洲国产婷婷综合在线精品| 韩国精品主播一区二区在线观看| 91蜜桃免费观看视频| 精品美女一区二区| 亚洲综合久久久久| 成人三级伦理片| 欧美mv日韩mv亚洲| 亚洲午夜精品在线| 成人app网站| 欧美sm极限捆绑bd| 日韩专区中文字幕一区二区| jizz一区二区| 久久伊99综合婷婷久久伊| 午夜精品福利久久久| 91一区在线观看| 国产午夜精品久久久久久免费视| 日日噜噜夜夜狠狠视频欧美人| heyzo一本久久综合| 久久久久久综合| 喷白浆一区二区| 欧美日韩亚洲综合| 亚洲乱码日产精品bd| 成人丝袜视频网| 国产视频911| 国产一区激情在线| 精品乱人伦小说| 久久爱另类一区二区小说| 欧美精品1区2区3区| 亚洲午夜精品久久久久久久久| 94-欧美-setu| 日韩毛片精品高清免费| hitomi一区二区三区精品| 中文字幕欧美激情| 国产精品1024| 久久九九影视网| 国产老妇另类xxxxx| 久久久99精品久久| 国产成人h网站| 国产精品免费丝袜| 国产+成+人+亚洲欧洲自线| 久久精品一二三| 成人在线综合网站| 最近日韩中文字幕| 在线视频亚洲一区| 亚洲高清不卡在线观看| 欧美欧美欧美欧美| 日本亚洲电影天堂| xf在线a精品一区二区视频网站| 久99久精品视频免费观看| 久久综合久久综合久久综合| 国产传媒一区在线| 亚洲色图视频免费播放| 欧美日产国产精品| 另类的小说在线视频另类成人小视频在线| 91精品国产欧美一区二区18| 麻豆极品一区二区三区| 国产亚洲综合在线| 在线亚洲免费视频| 免费成人小视频| 国产精品欧美久久久久一区二区| 97精品国产97久久久久久久久久久久| 一区二区三区在线观看国产| 欧美午夜精品一区| 激情小说亚洲一区| 亚洲精品中文字幕在线观看| 制服丝袜日韩国产| 福利电影一区二区三区| 一区二区三区国产豹纹内裤在线| 欧美一区二区三区四区高清| 国产91精品入口| 亚洲444eee在线观看| 久久精品亚洲国产奇米99| 色综合久久88色综合天天免费| 婷婷激情综合网| 久久久777精品电影网影网| 91麻豆精品一区二区三区| 美脚の诱脚舐め脚责91| 亚洲人123区| 久久久亚洲精品石原莉奈| 欧美在线视频日韩| 成人午夜免费av| 老司机精品视频在线| 亚洲成人综合网站| 久久综合九色综合欧美98| 色狠狠色噜噜噜综合网| 韩国v欧美v日本v亚洲v| 亚洲夂夂婷婷色拍ww47| 蜜臀久久99精品久久久久久9| 欧美三级日本三级少妇99| 夜夜嗨av一区二区三区中文字幕| 日韩亚洲欧美中文三级| 欧美xfplay| 国产欧美综合色| 亚洲视频在线观看一区| 亚洲福利视频一区二区| 免费在线观看日韩欧美| 国产乱码精品一区二区三区av| 成人美女在线视频| 欧美亚洲综合一区| 欧美大片一区二区| 国产精品灌醉下药二区| 亚洲一区二区三区国产| 日本欧美久久久久免费播放网| 韩国精品免费视频| 色综合网色综合| 日韩美女天天操| 日韩毛片一二三区| 日本视频中文字幕一区二区三区| 国模一区二区三区白浆| 91亚洲男人天堂| 欧美一卡2卡3卡4卡| 国产精品欧美一级免费| 亚洲大片精品永久免费| 国产麻豆成人精品| 欧美视频在线一区| 久久九九久久九九| 午夜在线成人av| 国产成人自拍高清视频在线免费播放| 波多野结衣中文一区| 欧美高清激情brazzers| 国产精品欧美久久久久一区二区| 天堂av在线一区| 99re在线精品| 久久影音资源网| 亚洲成年人影院| 99精品久久久久久| 精品国产凹凸成av人导航| 一区二区三区在线观看动漫| 91久久精品一区二区三| 久久人人爽人人爽| 婷婷开心激情综合| 91蝌蚪porny九色| 精品国产一区二区三区四区四| 亚洲综合无码一区二区| 成人黄页在线观看| 久久新电视剧免费观看| 日本aⅴ免费视频一区二区三区| 99精品视频在线观看| 久久久久国产精品麻豆ai换脸 | 欧美日韩午夜在线| 欧美极品美女视频| 精品在线观看视频| 欧美一区二区三区在线电影| 亚洲图片欧美综合| 91在线播放网址| 国产精品久线在线观看| 国产一区999| 国产亚洲欧美日韩日本| 极品销魂美女一区二区三区| 欧美一区二区三区免费大片| 亚洲在线视频网站| 日本韩国欧美一区| 一个色妞综合视频在线观看| 91亚洲精品一区二区乱码| 国产精品麻豆网站| 成人小视频在线观看| 国产精品日产欧美久久久久| 国产精品一区二区黑丝| 国产午夜精品一区二区三区视频 | 免费高清成人在线| 日韩一级二级三级精品视频|