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

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

?? pcap.h

?? Windows XP下的抓包程序實現
?? H
?? 第 1 頁 / 共 5 頁
字號:
/** @defgroup wpcapfunc Exported functions
 *  @ingroup wpcap
 *  Functions exported by wpcap.dll
 *  @{
 */


/** \name Unix-compatible Functions

	These functions are part of the libpcap library, and therefore work
	both on Windows and on Linux.
	\note errbuf in pcap_open_live(), pcap_open_dead(), pcap_open_offline(), 
	pcap_setnonblock(), pcap_getnonblock(), pcap_findalldevs(), 
	pcap_lookupdev(), and pcap_lookupnet() is assumed to be able to hold at 
	least PCAP_ERRBUF_SIZE chars.
 */
//\{ 

/*! \brief Prototype of the callback function that receives the packets. 

When pcap_dispatch() or pcap_loop() are called by the user, the packets are passed to the application
by means of this callback. user is a user-defined parameter that contains the state of the
capture session, it corresponds to the \e user parameter of pcap_dispatch() and pcap_loop(). pkt_header is
the header associated by the capture driver to the packet. It is NOT a protocol header. pkt_data
points to the data of the packet, including the protocol headers.
*/
typedef void (*pcap_handler)(u_char *user, const struct pcap_pkthdr *pkt_header,
			     const u_char *pkt_data);

/*!	\brief Open a live capture from the network.

	pcap_open_live()  is  used  to  obtain a packet capture descriptor to
	look at packets on the network.  device is a  string  that  specifies
	the  network  device to open; on Linux systems with 2.2 or later kernels, 
	a device argument of "any" or NULL can be used to capture packets  
	from  all  interfaces.   snaplen specifies the maximum number of
	bytes to capture.  If this value is less than the size  of  a  packet
	that is captured, only the first snaplen bytes of that packet will be
	captured and provided as packet data.  A value  of  65535  should  be
	sufficient,  on  most  if  not  all networks, to capture all the data
	available from the packet.  promisc specifies if the interface is  to
	be  put  into promiscuous mode.  (Note that even if this parameter is
	false, the interface could well be in promiscuous mode for some other
	reason.)  For now, this doesn't work on the "any" device; if an argument 
	of "any" or NULL is  supplied,  the  promisc  flag  is  ignored.
	to_ms  specifies  the read timeout in milliseconds.  The read timeout
	is used to arrange that the read not necessarily  return  immediately
	when  a  packet  is seen, but that it wait for some amount of time to
	allow more packets to arrive and to read multiple packets from the OS
	kernel  in  one operation.  Not all platforms support a read timeout;
	on platforms that don't, the read timeout is ignored.  A  zero  value
	for  to_ms,  on  platforms  that support a read timeout, will cause a
	read to wait forever to allow enough packets to arrive, with no timeout.  
	errbuf is used to return error or warning text.  It will be set
	to error text when pcap_open_live() fails and returns  NULL.   errbuf
	may  also  be  set  to warning text when pcap_open_live() succeds; to
	detect this case the caller should  store  a  zero-length  string  in
	errbuf before calling pcap_open_live() and display the warning to the
	user if errbuf is no longer a zero-length string.

\sa pcap_open_offline(), pcap_open_dead(), pcap_findalldevs(), pcap_close()
*/
pcap_t *pcap_open_live(const char *device, int snaplen, int promisc, int to_ms, char *ebuf);


/*!	\brief Create a pcap_t structure without starting a capture.

  pcap_open_dead()  is  used for creating a pcap_t structure
  to use when calling the other functions in libpcap.  It is
  typically  used  when just using libpcap for compiling BPF
  code.

\sa pcap_open_offline(), pcap_open_live(), pcap_findalldevs(), pcap_compile(), pcap_setfilter(), pcap_close()
*/
pcap_t *pcap_open_dead(int linktype, int snaplen);


/*!	\brief Open a savefile in the tcpdump/libpcap format to read packets.

	pcap_open_offline() is called to open  a  "savefile"  for  reading.
	fname  specifies  the name of the file to open. The file has the same
	format as those used by tcpdump(1) and tcpslice(1).  The name "-"  in
	a    synonym    for    stdin.     Alternatively,    you    may   call
	pcap_fopen_offline() to read dumped data from an existing open stream
	fp.   Note  that  on  Windows, that stream should be opened in binary
	mode.  errbuf is used to return error  text  and  is  only  set  when
	pcap_open_offline() or pcap_fopen_offline() fails and returns NULL.

\sa pcap_open_live(), pcap_dump_open(), pcap_findalldevs(), pcap_close()
*/
pcap_t *pcap_open_offline(const char *fname, char *errbuf);

/*! \brief Open a file to write packets.

	pcap_dump_open()  is  called  to open a "savefile" for writing. The
	name "-" in a synonym for stdout.  NULL is returned on failure.  p is
	a pcap struct as returned by pcap_open_offline() or pcap_open_live().
	fname specifies the name of the file to open. Alternatively, you  may
	call  pcap_dump_fopen()  to write data to an existing open stream fp.
	Note that on Windows, that stream should be opened  in  binary  mode.
	If NULL is returned, pcap_geterr() can be used to get the error text.

\sa pcap_dump_close(), pcap_dump()
*/
pcap_dumper_t *pcap_dump_open(pcap_t *p, const char *fname);

/*! \brief Switch between blocking and nonblocking mode.

       pcap_setnonblock() puts a capture descriptor, opened  with
       pcap_open_live(),  into "non-blocking" mode, or takes it
       out of "non-blocking" mode,  depending  on  whether  the
       nonblock  argument  is non-zero or zero.  It has no effect
       on "savefiles".  If there is an error,  -1  is  returned
       and errbuf is filled in with an appropriate error message;
       otherwise, 0 is returned.  In  "non-blocking"  mode,  an
       attempt to read from the capture descriptor with pcap_dispatch() 
	   will, if no packets are currently available to  be
       read,  return  0  immediately rather than blocking waiting
       for packets to arrive.  pcap_loop() and  pcap_next()  will
       not work in "non-blocking" mode.

\sa pcap_getnonblock(), pcap_dispatch()
*/
int pcap_setnonblock(pcap_t *p, int nonblock, char *errbuf);


/*! \brief Get the "non-blocking" state of an interface.

       pcap_getnonblock()  returns  the  current "non-blocking"
       state of the capture descriptor; it always  returns  0  on
       "savefiles".   If  there is an error, -1 is returned and
       errbuf is filled in with an appropriate error message.

\sa pcap_setnonblock()
*/
int pcap_getnonblock(pcap_t *p, char *errbuf);

/*!	\brief Construct a list of network devices that can be 
  opened with pcap_open_live(). 
  
  \note that there may be network devices that cannot be opened with 
  pcap_open_live() by the process calling pcap_findalldevs(), because, 
  for example, that process might not have sufficient privileges to open 
  them for capturing; if so, those devices will not appear on the list.) 
  alldevsp is set to point to the first element of the list; each element 
  of the list is of type \ref pcap_if_t, 

  -1 is returned on failure, in which case errbuf is filled in with an 
  appropriate error message; 0 is returned on success.

\sa struct pcap_if, pcap_freealldevs(), pcap_open_live(), pcap_lookupdev(), pcap_lookupnet()
*/
int pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf);

/*! \brief Free an interface list returned by pcap_findalldevs().

       pcap_freealldevs()  is  used  to  free a list allocated by pcap_findalldevs().

\sa pcap_findalldevs()
*/
void pcap_freealldevs(pcap_if_t *alldevsp);

/*! 	\brief Return the first valid device in the system.
\deprecated Use \ref pcap_findalldevs() or \ref pcap_findalldevs_ex() instead.

       pcap_lookupdev() returns a pointer  to  a  network  device
       suitable  for  use  with pcap_open_live() and pcap_lookupnet().
	   If there is an error, NULL is returned and  errbuf
       is filled in with an appropriate error message.

\sa pcap_findalldevs(), pcap_open_live()
*/
char *pcap_lookupdev(char *errbuf);


/*!	\brief Return the subnet and netmask of an interface.
\deprecated Use \ref pcap_findalldevs() or \ref pcap_findalldevs_ex() instead.

       pcap_lookupnet()  is  used to determine the network number
       and mask associated with the network device device.   Both
       netp  and  maskp are bpf_u_int32 pointers.  A return of -1
       indicates an error in which case errbuf is filled in  with
       an appropriate error message.

\sa pcap_findalldevs()
*/
int pcap_lookupnet(const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, char *errbuf);

/*!	\brief Collect a group of packets.

  pcap_dispatch() is used to collect and process packets. cnt specifies the maximum 
  number of packets to process before returning. This is not a minimum number; when 
  reading a live capture, only one bufferful of packets is read at a time, so fewer 
  than cnt packets may be processed. A cnt of -1 processes all the packets received 
  in one buffer when reading a live capture, or all the packets in the file when 
  reading a ``savefile''. callback specifies a routine to be called with three 
  arguments: a u_char pointer which is passed in from pcap_dispatch(), a const 
  struct \ref pcap_pkthdr pointer,
  and a const u_char pointer to the first caplen (as given in the struct pcap_pkthdr 
  a pointer to which is passed to the callback routine) bytes of data from the packet 
  (which won't necessarily be the entire packet; to capture the entire packet, you 
  will have to provide a value for snaplen in your call to pcap_open_live() that is 
  sufficiently large to get all of the packet's data - a value of 65535 should be 
  sufficient on most if not all networks).

  The number of packets read is returned. 0 is returned if no packets were read from 
  a live capture (if, for example, they were discarded because they didn't pass the 
  packet filter, or if, on platforms that support a read timeout that starts before 
  any packets arrive, the timeout expires before any packets arrive, or if the file 
  descriptor for the capture device is in non-blocking mode and no packets were 
  available to be read) or if no more packets are available in a ``savefile.'' A return 
  of -1 indicates an error in which case pcap_perror() or pcap_geterr() may be used 
  to display the error text. A return of -2 indicates that the loop terminated due to 
  a call to pcap_breakloop() before any packets were processed. If your application 
  uses pcap_breakloop(), make sure that you explicitly check for -1 and -2, rather 
  than just checking for a return value < 0.

  \note when reading a live capture, pcap_dispatch() will not necessarily return when 
  the read times out; on some platforms, the read timeout isn't supported, and, on 
  other platforms, the timer doesn't start until at least one packet arrives. This 
  means that the read timeout should NOT be used in, for example, an interactive 
  application, to allow the packet capture loop to ``poll'' for user input periodically, 
  as there's no guarantee that pcap_dispatch() will return after the timeout expires.

\sa pcap_loop(), pcap_next(), pcap_open_live(), pcap_open_offline(), pcap_handler
*/
int pcap_dispatch(pcap_t *p, int cnt, pcap_handler callback, u_char *user);


/*!	\brief Collect a group of packets.

  pcap_loop() is similar to pcap_dispatch() except it keeps reading packets until cnt 
  packets are processed or an error occurs. It does not return when live read timeouts 
  occur. Rather, specifying a non-zero read timeout to pcap_open_live() and then calling 
  pcap_dispatch() allows the reception and processing of any packets that arrive when 
  the timeout occurs. A negative cnt causes pcap_loop() to loop forever (or at least 
  until an error occurs). -1 is returned on an error; 0 is returned if cnt is exhausted; 
  -2 is returned if the loop terminated due to a call to pcap_breakloop() before any packets
  were processed. If your application uses pcap_breakloop(), make sure that you explicitly 
  check for -1 and -2, rather than just checking for a return value < 0.

\sa pcap_dispatch(), pcap_next(), pcap_open_live(), pcap_open_offline(), pcap_handler
*/
int pcap_loop(pcap_t *p, int cnt, pcap_handler callback, u_char *user);


/*! \brief Return the next available packet.

  pcap_next() reads the next packet (by calling pcap_dispatch() with a cnt of 1) and returns 
  a u_char pointer to the data in that packet. (The pcap_pkthdr struct for that packet is not 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
1024成人网色www| 国产精品影视在线观看| 欧美日本一道本在线视频| 亚洲成人午夜电影| 精品国产91九色蝌蚪| 成人99免费视频| 日韩精品每日更新| 国产精品欧美极品| 欧美日韩一区二区在线观看视频| 一区二区三区在线免费播放 | 国内精品写真在线观看| 欧美激情一区二区三区四区| 91精品国产综合久久久久| 高清国产一区二区| 久久精品国产**网站演员| 亚洲成人av一区二区三区| 国产清纯白嫩初高生在线观看91 | 北岛玲一区二区三区四区| 三级欧美在线一区| ●精品国产综合乱码久久久久| 欧美日韩免费高清一区色橹橹| 成人午夜视频免费看| 国产成a人无v码亚洲福利| 日本欧美肥老太交大片| 亚洲综合图片区| 亚洲精品免费在线播放| 中文字幕亚洲欧美在线不卡| 久久久99久久| 中文字幕一区二区三区在线不卡| 2021久久国产精品不只是精品| 日韩一区二区三区在线观看| 欧美一区二区三区在线| 日韩欧美的一区| 国产亚洲综合在线| 中文字幕一区av| 亚洲精品欧美综合四区| 亚洲综合色自拍一区| 亚洲网友自拍偷拍| 日韩黄色免费电影| 国产麻豆91精品| 色综合天天做天天爱| 在线免费观看成人短视频| 欧美日韩二区三区| 久久综合九色综合97婷婷| 国产精品久久久久婷婷| 一区二区三区中文字幕| 奇米精品一区二区三区四区| 国产福利一区在线| 欧洲日韩一区二区三区| 粉嫩av一区二区三区| 在线免费观看日本欧美| 欧美日韩小视频| 国产精品成人一区二区三区夜夜夜 | 91精品免费在线| 亚洲日本在线a| 国产精品一级在线| 欧美理论片在线| 亚洲午夜激情av| 97se亚洲国产综合自在线观| 精品处破学生在线二十三| 亚洲人亚洲人成电影网站色| 精品亚洲免费视频| 欧美一区二区三区系列电影| 亚洲最大成人综合| 99这里只有精品| 中文字幕色av一区二区三区| 国产在线视视频有精品| 日韩精品一区二| 久久福利资源站| 日韩一区二区三免费高清| 日韩中文字幕91| 欧美电影免费观看高清完整版在| 亚洲不卡一区二区三区| 欧美三级电影精品| 青椒成人免费视频| 26uuu精品一区二区| 国产福利不卡视频| 亚洲男同1069视频| 欧美一区二区三区免费观看视频 | 亚洲小说春色综合另类电影| 欧美视频一区二区三区四区 | 欧美精品视频www在线观看| 亚洲成人1区2区| 国产亚洲一区字幕| 欧洲中文字幕精品| 精品一区二区三区在线观看 | 成人午夜精品在线| 中文字幕佐山爱一区二区免费| 欧美色视频在线观看| 国产一区二区三区电影在线观看| 国产欧美日韩在线观看| 欧美一a一片一级一片| 麻豆视频观看网址久久| 中文字幕制服丝袜一区二区三区 | 国产欧美精品在线观看| 色婷婷精品久久二区二区蜜臂av | 95精品视频在线| 国产v综合v亚洲欧| 久草在线在线精品观看| 在线观看日韩精品| 国产精品乱码人人做人人爱| 成人福利视频网站| 久久国产尿小便嘘嘘尿| 亚洲尤物在线视频观看| 亚洲欧洲另类国产综合| 精品国产1区二区| 精品理论电影在线观看| 欧美一区二区三区喷汁尤物| 欧美人与禽zozo性伦| 欧美日韩一卡二卡| 欧美日韩久久不卡| 欧美手机在线视频| 欧美日韩一区二区在线观看视频 | aaa亚洲精品| 99久久精品免费精品国产| 亚洲大尺度视频在线观看| 香蕉久久一区二区不卡无毒影院 | 久久欧美中文字幕| 中文字幕av一区二区三区免费看 | 成人亚洲精品久久久久软件| 国产不卡视频在线观看| 丰满岳乱妇一区二区三区| 成人av免费在线| 91精品办公室少妇高潮对白| 欧美日韩视频在线第一区| 日韩一级完整毛片| 国产精品久久久久久久久快鸭 | 中文字幕日韩精品一区| 一区二区三区四区不卡在线| 午夜精品久久久久久久| 国产一区在线精品| 欧美色图免费看| 国产丝袜欧美中文另类| 亚洲丶国产丶欧美一区二区三区| 久久精品二区亚洲w码| 色婷婷av一区二区三区gif| 69久久夜色精品国产69蝌蚪网| 久久久久久久久久久久久夜| 一区二区久久久久久| 国产一二精品视频| 日韩欧美一卡二卡| 亚洲午夜成aⅴ人片| 成人丝袜视频网| 久久精品这里都是精品| 午夜精品福利一区二区蜜股av| 成人av在线影院| 国产欧美一区二区三区网站| 奇米影视在线99精品| 国产成人一区在线| 精品毛片乱码1区2区3区| 亚洲综合一区二区三区| 成人免费视频一区二区| 国产欧美一区二区三区鸳鸯浴 | eeuss鲁一区二区三区| 久久久久久亚洲综合影院红桃| 久久成人免费日本黄色| 91精品国产综合久久香蕉麻豆| 亚洲成a人v欧美综合天堂| 在线国产亚洲欧美| 婷婷丁香激情综合| 日韩欧美国产午夜精品| 国产精品综合一区二区三区| 精品美女被调教视频大全网站| 精品国产区一区| 国产一区二区三区av电影 | 中文字幕在线观看不卡| 色综合夜色一区| 蜜臀av性久久久久av蜜臀妖精| 日韩欧美国产综合一区| 99视频超级精品| 日韩av电影免费观看高清完整版在线观看 | 日韩精品一区二区三区四区 | av不卡一区二区三区| 亚洲国产综合色| 久久精品视频免费| 欧美在线免费观看视频| 美国三级日本三级久久99| 亚洲国产成人一区二区三区| 在线视频欧美精品| 国内精品写真在线观看| 天涯成人国产亚洲精品一区av| 久久九九全国免费| 久久久美女毛片| 欧美少妇bbb| 成人免费看片app下载| 免费国产亚洲视频| 日韩激情在线观看| 亚洲成人激情自拍| 亚洲一区二区欧美激情| 亚洲丝袜精品丝袜在线| 久久女同精品一区二区| 欧美大白屁股肥臀xxxxxx| 欧美美女一区二区三区| 欧美视频自拍偷拍| 欧美一区在线视频| 欧美一级搡bbbb搡bbbb| 欧美久久一二三四区| 欧美一级欧美三级在线观看| 欧美日韩三级在线| 欧美一级一级性生活免费录像|