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

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

?? packet32.h

?? 基于WINPCAP的嗅探程序
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Copyright (c) 1999 - 2003
 * NetGroup, Politecnico di Torino (Italy)
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the Politecnico di Torino 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

/** @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"
#ifdef HAVE_DAG_API
#include <dagc.h>
#endif /* HAVE_DAG_API */

// Working modes
#define PACKET_MODE_CAPT 0x0 ///< Capture mode
#define PACKET_MODE_STAT 0x1 ///< Statistical mode
#define PACKET_MODE_MON 0x2 ///< Monitoring 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))


#define NdisMediumNull	-1		// Custom linktype: NDIS doesn't provide an equivalent
#define NdisMediumCHDLC	-2		// Custom linktype: NDIS doesn't provide an equivalent
#define NdisMediumPPPSerial	-3	// Custom linktype: NDIS doesn't provide an equivalent

/*!
  \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)
	ULONGLONG 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 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_storage IPAddress;	///< IP address.
	struct sockaddr_storage SubnetMask;	///< Netmask for that address.
	struct sockaddr_storage Broadcast;	///< Broadcast address.
}npf_if_addr;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩综合在线视频| 中文字幕欧美日韩一区| 久久综合色8888| 中文乱码免费一区二区| 夜夜操天天操亚洲| 蜜桃视频在线观看一区| 国产成人在线视频免费播放| 国产99久久久国产精品潘金 | 91亚洲精品一区二区乱码| 久久久久久99精品| 夜色激情一区二区| 91行情网站电视在线观看高清版| 欧美一区二区三区四区久久| 国产校园另类小说区| 午夜精品123| 色综合色综合色综合色综合色综合 | 国产99久久久国产精品免费看| 欧美日韩一区二区不卡| 中文字幕一区二区三区乱码在线 | 欧美日韩在线精品一区二区三区激情 | 国产日韩欧美麻豆| 亚洲成av人片在线观看| 成人a区在线观看| 日本一区二区免费在线| 久久精品国产久精国产爱| 在线免费观看视频一区| 亚洲色图另类专区| 色综合天天综合网国产成人综合天 | 国产精品久久久久四虎| 国产精品996| 国产免费久久精品| 波多野结衣一区二区三区| 国产人久久人人人人爽| 处破女av一区二区| 国产精品久久久久毛片软件| 大尺度一区二区| 亚洲天堂2014| 欧美日韩二区三区| 日本不卡免费在线视频| 日韩一二三区不卡| 丰满白嫩尤物一区二区| 最新不卡av在线| 欧美日韩电影在线| 国产一区二区中文字幕| 成人欧美一区二区三区1314| 欧美性受xxxx黑人xyx| 久久精品99国产精品日本| 国产欧美久久久精品影院| 色诱亚洲精品久久久久久| 亚洲精品免费在线| 91精品国产一区二区三区香蕉 | 欧美丰满一区二区免费视频 | 国产亚洲一区二区三区四区| 国产伦精品一区二区三区免费| 专区另类欧美日韩| 日韩欧美一区中文| 欧美日韩一区二区在线视频| 成人性视频免费网站| 亚洲一区二区视频在线观看| 久久众筹精品私拍模特| 在线免费观看视频一区| www.日韩av| 国产精品一区二区久久不卡| 丝袜a∨在线一区二区三区不卡| 国产亚洲精品7777| 国产精品不卡一区二区三区| 精品国产乱码久久久久久1区2区| 91浏览器在线视频| 丁香婷婷综合网| 激情五月播播久久久精品| 日韩成人免费在线| 丝袜美腿亚洲色图| 久久99精品国产麻豆婷婷洗澡| 亚洲免费在线播放| 亚洲天天做日日做天天谢日日欢| 久久九九久精品国产免费直播| 91麻豆精品国产91久久久久久久久| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 亚洲精品日日夜夜| 亚洲在线视频一区| 蜜臀av性久久久久蜜臀aⅴ| 蜜桃一区二区三区在线| 美国欧美日韩国产在线播放| 蜜臀久久久久久久| 国产专区综合网| 成人天堂资源www在线| 色一情一伦一子一伦一区| 欧洲国产伦久久久久久久| 欧美成人a在线| 国产精品国产自产拍在线| 国产日产欧美一区| 亚洲v中文字幕| 韩国毛片一区二区三区| 91在线国内视频| 91精品国产综合久久精品图片| 精品国产乱码久久久久久牛牛| 久久亚洲精精品中文字幕早川悠里| 国产亚洲自拍一区| 日韩av在线免费观看不卡| 波多野结衣精品在线| 日韩精品一区二区三区在线观看| 久久久影院官网| 日本视频一区二区| 一本到一区二区三区| 精品国产三级a在线观看| 亚洲免费大片在线观看| 国产一区高清在线| 777午夜精品视频在线播放| 成人欧美一区二区三区小说| 国模一区二区三区白浆| 欧美一区二区精美| 亚洲午夜激情av| 色综合久久66| 亚洲青青青在线视频| 成人一区二区视频| 久久久久高清精品| 国产精品羞羞答答xxdd| 26uuu色噜噜精品一区二区| 午夜激情一区二区三区| 在线精品国精品国产尤物884a| 中文字幕欧美国产| 99久久婷婷国产| 国产精品狼人久久影院观看方式| 国内精品久久久久影院色| 精品国精品自拍自在线| 国内精品在线播放| 久久久久久久久久久久久女国产乱 | 99视频精品全部免费在线| 欧美一三区三区四区免费在线看| 亚洲一区二区三区在线| 欧美在线观看视频在线| 亚洲成人综合网站| 精品国产第一区二区三区观看体验| 日韩经典中文字幕一区| 日韩欧美不卡一区| 国产91精品免费| 一区二区三区**美女毛片| 日韩精品中文字幕一区| 成人精品在线视频观看| 五月天一区二区| 国产亚洲欧美激情| 欧美日韩电影一区| 国产福利视频一区二区三区| 自拍偷在线精品自拍偷无码专区| 欧美视频中文字幕| 狠狠色伊人亚洲综合成人| 亚洲精品写真福利| 国产喷白浆一区二区三区| 欧美日韩激情一区二区三区| 成人免费视频一区二区| 五月天激情综合| 亚洲区小说区图片区qvod| 欧美精品一区二区三区蜜桃| 欧美性猛交xxxx乱大交退制版| 国产一区二区三区免费看| 亚洲国产一区二区三区| 中文字幕中文乱码欧美一区二区| 日韩丝袜情趣美女图片| 日本丶国产丶欧美色综合| 国产黄色精品视频| 日韩av一区二区在线影视| 亚洲日本丝袜连裤袜办公室| 国产三区在线成人av| 精品久久久久久久一区二区蜜臀| 欧美日韩国产在线播放网站| 日本电影亚洲天堂一区| 欧美手机在线视频| 欧美私模裸体表演在线观看| 欧美性欧美巨大黑白大战| 色婷婷精品久久二区二区蜜臂av| 成人免费高清在线| 成人h版在线观看| 色综合久久久久综合| 波多野结衣在线aⅴ中文字幕不卡| 欧美色综合影院| 91社区在线播放| 欧美日韩在线播放三区| 91麻豆精品国产综合久久久久久 | 亚洲免费观看视频| 亚洲午夜精品一区二区三区他趣| 一区二区国产盗摄色噜噜| 亚洲成人激情av| 国产一区二区电影| 成人成人成人在线视频| 欧美区一区二区三区| 久久久久久亚洲综合影院红桃| 国产精品久久久久久妇女6080 | 在线欧美小视频| 精品国产伦一区二区三区观看方式 | 亚洲成人av一区| 高清不卡一区二区| 欧美性色aⅴ视频一区日韩精品| 日韩欧美视频在线| 亚洲免费资源在线播放| 精品系列免费在线观看| 色综合av在线| 国产精品久久久久国产精品日日 | 91精品国产高清一区二区三区蜜臀| 精品国产凹凸成av人导航| 一二三区精品视频|