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

WinPcap: 内部结构与定义

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

数据结构

structactivehosts
Keeps a list of all the opened connections in the active mode. More...
structrpcap_header
Common header for all the RPCAP messages. More...
structrpcap_findalldevs_if
Format of the message for the interface description (findalldevs command). More...
structrpcap_findalldevs_ifaddr
Format of the message for the address listing (findalldevs command). More...
structrpcap_openreply
Format of the message of the connection opening reply (open command). More...
structrpcap_startcapreq
Format of the message that starts a remote capture (startcap command). More...
structrpcap_startcapreply
Format of the reply message that devoted to start a remote capture (startcap reply command). More...
structrpcap_pkthdr
Format of the header which encapsulates captured packets when transmitted on the network. More...
structrpcap_filter
General header used for the pcap_setfilter() command; keeps just the number of BPF instructions. More...
structrpcap_filterbpf_insn
Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header. More...
structrpcap_auth
Structure that keeps the data required for the authentication on the remote host. More...
structrpcap_stats
Structure that keeps the statistics about the number of packets captured, dropped, etc. More...
structrpcap_sampling
Structure that is needed to set sampling parameters. More...

定义

#defineRPCAP_DEFAULT_NETPORT"2002"
#defineRPCAP_DEFAULT_NETPORT_ACTIVE"2003"
#defineRPCAP_DEFAULT_NETADDR""
#defineRPCAP_VERSION0
#defineRPCAP_TIMEOUT_INIT90
#defineRPCAP_TIMEOUT_RUNTIME180
#defineRPCAP_ACTIVE_WAIT30
#defineRPCAP_SUSPEND_WRONGAUTH1
#defineRPCAP_NETBUF_SIZE64000
Buffer used by socket functions to send-receive packets. In case you plan to have messages larger than this value, you have to increase it.
#defineRPCAP_HOSTLIST_SEP" ,;nr"
Separators used for the host list.
#defineRPCAP_MSG_ERROR1
#defineRPCAP_MSG_FINDALLIF_REQ2
#defineRPCAP_MSG_OPEN_REQ3
#defineRPCAP_MSG_STARTCAP_REQ4
#defineRPCAP_MSG_UPDATEFILTER_REQ5
#defineRPCAP_MSG_CLOSE6
#defineRPCAP_MSG_PACKET7
#defineRPCAP_MSG_AUTH_REQ8
#defineRPCAP_MSG_STATS_REQ9
#defineRPCAP_MSG_ENDCAP_REQ10
#defineRPCAP_MSG_SETSAMPLING_REQ11
#defineRPCAP_MSG_FINDALLIF_REPLY(128+RPCAP_MSG_FINDALLIF_REQ)
#defineRPCAP_MSG_OPEN_REPLY(128+RPCAP_MSG_OPEN_REQ)
#defineRPCAP_MSG_STARTCAP_REPLY(128+RPCAP_MSG_STARTCAP_REQ)
#defineRPCAP_MSG_UPDATEFILTER_REPLY(128+RPCAP_MSG_UPDATEFILTER_REQ)
#defineRPCAP_MSG_AUTH_REPLY(128+RPCAP_MSG_AUTH_REQ)
#defineRPCAP_MSG_STATS_REPLY(128+RPCAP_MSG_STATS_REQ)
#defineRPCAP_MSG_ENDCAP_REPLY(128+RPCAP_MSG_ENDCAP_REQ)
#defineRPCAP_MSG_SETSAMPLING_REPLY(128+RPCAP_MSG_SETSAMPLING_REQ)
#defineRPCAP_STARTCAPREQ_FLAG_PROMISC1
#defineRPCAP_STARTCAPREQ_FLAG_DGRAM2
#defineRPCAP_STARTCAPREQ_FLAG_SERVEROPEN4
#defineRPCAP_STARTCAPREQ_FLAG_INBOUND8
#defineRPCAP_STARTCAPREQ_FLAG_OUTBOUND16
#defineRPCAP_UPDATEFILTER_BPF1
#definePCAP_ERR_NETW1
#definePCAP_ERR_INITTIMEOUT2
#definePCAP_ERR_AUTH3
#definePCAP_ERR_FINDALLIF4
#definePCAP_ERR_NOREMOTEIF5
#definePCAP_ERR_OPEN6
#definePCAP_ERR_UPDATEFILTER7
#definePCAP_ERR_GETSTATS8
#definePCAP_ERR_READEX9
#definePCAP_ERR_HOSTNOAUTH10
#definePCAP_ERR_REMOTEACCEPT11
#definePCAP_ERR_STARTCAPTURE12
#definePCAP_ERR_ENDCAPTURE13
#definePCAP_ERR_RUNTIMETIMEOUT14
#definePCAP_ERR_SETSAMPLING15
#definePCAP_ERR_WRONGMSG16
#definePCAP_ERR_WRONGVER17

自定义类型

typedef unsigned charuint8
Provides an 8-bits unsigned integer.
typedef unsigned shortuint16
Provides a 16-bits unsigned integer.
typedef unsigned intuint32
Provides a 32-bits unsigned integer.
typedef intint32
Provides a 32-bits integer.