当前位置: 首页 > 文档资料 > WinPcap 中文手册 >

WinPcap: remote-ext.h File Reference

优质
小牛编辑
128浏览
2023-12-01

Go to the source code of this file.

Data Structures

structpcap_rmtauth
This structure keeps the information needed to autheticate the user on a remote machine. More...
structpcap_samp
This structure defines the information related to sampling. More...

Defines

#definePCAP_BUF_SIZE1024
Defines the maximum buffer size in which address, port, interface names are kept.
#definePCAP_SRC_FILE2
Internal representation of the type of source in use (file, remote/local interface).
#definePCAP_SRC_IFLOCAL3
Internal representation of the type of source in use (file, remote/local interface).
#definePCAP_SRC_IFREMOTE4
Internal representation of the type of source in use (file, remote/local interface).
#definePCAP_SRC_FILE_STRING"file://"
String that will be used to determine the type of source in use (file, remote/local interface).
#definePCAP_SRC_IF_STRING"rpcap://"
String that will be used to determine the type of source in use (file, remote/local interface).
#definePCAP_OPENFLAG_PROMISCUOUS1
Defines if the adapter has to go in promiscuous mode.
#definePCAP_OPENFLAG_DATATX_UDP2
Defines if the data trasfer (in case of a remote capture) has to be done with UDP protocol.
#definePCAP_OPENFLAG_NOCAPTURE_RPCAP4
Defines if the remote probe will capture its own generated traffic.
#definePCAP_OPENFLAG_NOCAPTURE_LOCAL8
Defines if the local adapter will capture its own generated traffic.
#definePCAP_OPENFLAG_MAX_RESPONSIVENESS16
This flag configures the adapter for maximum responsiveness.
#definePCAP_SAMP_NOSAMP0
No sampling has to be done on the current capture.
#definePCAP_SAMP_1_EVERY_N1
It defines that only 1 out of N packets must be returned to the user.
#definePCAP_SAMP_FIRST_AFTER_N_MS2
It defines that we have to return 1 packet every N milliseconds.
#defineRPCAP_RMTAUTH_NULL0
It defines the NULL authentication.
#defineRPCAP_RMTAUTH_PWD1
It defines the username/password authentication.
#defineRPCAP_HOSTLIST_SIZE1024
Maximum lenght of an host name (needed for the RPCAP active mode).

Functions

New WinPcap functions
This section lists the new functions that are able to help considerably in writing WinPcap programs because of their easiness of use.

pcap_t *pcap_open (const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
intpcap_createsrcstr (char *source, int type, const char *host, const char *port, const char *name, char *errbuf)
intpcap_parsesrcstr (const char *source, int *type, char *host, char *port, char *name, char *errbuf)
intpcap_findalldevs_ex (char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
pcap_samp *pcap_setsampling (pcap_t *p)
Remote Capture functions
SOCKETpcap_remoteact_accept (const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf)
intpcap_remoteact_list (char *hostlist, char sep, int size, char *errbuf)
intpcap_remoteact_close (const char *host, char *errbuf)
voidpcap_remoteact_cleanup ()