Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

# Internal Structures and Definitions
[Remote Capture]

## Data Structures
struct | activehosts
| Keeps a list of all the opened connections in the active mode. More...
struct | rpcap_header
| Common header for all the RPCAP messages. More...
struct | rpcap_findalldevs_if
| Format of the message for the interface description (findalldevs command). More...
struct | rpcap_findalldevs_ifaddr
| Format of the message for the address listing (findalldevs command). More...
struct | rpcap_openreply
| Format of the message of the connection opening reply (open command). More...
struct | rpcap_startcapreq
| Format of the message that starts a remote capture (startcap command). More...
struct | rpcap_startcapreply
| Format of the reply message that devoted to start a remote capture (startcap reply command). More...
struct | rpcap_pkthdr
| Format of the header which encapsulates captured packets when transmitted on the network. More...
struct | rpcap_filter
| General header used for the pcap_setfilter() command; keeps just the number of BPF instructions. More...
struct | rpcap_filterbpf_insn
| Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header. More...
struct | rpcap_auth
| Structure that keeps the data required for the authentication on the remote host. More...
struct | rpcap_stats
| Structure that keeps the statistics about the number of packets captured, dropped, etc. More...
struct | rpcap_sampling
| Structure that is needed to set sampling parameters. More...
## Defines
#define | RPCAP_DEFAULT_NETPORT "2002" /*!< Default port on which the RPCAP daemon is waiting for connections. */
#define | RPCAP_DEFAULT_NETPORT_ACTIVE "2003"
#define | RPCAP_DEFAULT_NETADDR "" /*!< Default network address on which the RPCAP daemon binds to. */
#define | RPCAP_VERSION 0 /*!< Present version of the RPCAP protocol (0 = Experimental). */
#define | RPCAP_TIMEOUT_INIT 90 /*!< Initial timeout for RPCAP connections (default: 90 sec) */
#define | RPCAP_TIMEOUT_RUNTIME 180 /*!< Run-time timeout for RPCAP connections (default: 3 min) */
#define | RPCAP_ACTIVE_WAIT 30 /*!< Waiting time betweek two attempts to open a connection, in active mode (default: 30 sec) */
#define | RPCAP_SUSPEND_WRONGAUTH 1 /*!< If the authentication is wrong, stops 1 sec before accepting a new auth message */
#define | RPCAP_NETBUF_SIZE 64000
| 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.
#define | RPCAP_HOSTLIST_SEP " ,;\n\r"
| Separators used for the host list.
#define | RPCAP_MSG_ERROR 1 /*!< Message that keeps an error notification */
#define | RPCAP_MSG_FINDALLIF_REQ 2 /*!< Request to list all the remote interfaces */
#define | RPCAP_MSG_OPEN_REQ 3 /*!< Request to open a remote device */
#define | RPCAP_MSG_STARTCAP_REQ 4 /*!< Request to start a capture on a remote device */
#define | RPCAP_MSG_UPDATEFILTER_REQ 5 /*!< Send a compiled filter into the remote device */
#define | RPCAP_MSG_CLOSE 6 /*!< Close the connection with the remote peer */
#define | RPCAP_MSG_PACKET 7 /*!< This is a 'data' message, which carries a network packet */
#define | RPCAP_MSG_AUTH_REQ 8 /*!< Message that keeps the authentication parameters */
#define | RPCAP_MSG_STATS_REQ 9 /*!< It requires to have network statistics */
#define | RPCAP_MSG_ENDCAP_REQ 10 /*!< Stops the current capture, keeping the device open */
#define | RPCAP_MSG_SETSAMPLING_REQ 11 /*!< Sset sampling parameters */
#define | RPCAP_MSG_FINDALLIF_REPLY (128+RPCAP_MSG_FINDALLIF_REQ) /*!< Keeps the list of all the remote interfaces */
#define | RPCAP_MSG_OPEN_REPLY (128+RPCAP_MSG_OPEN_REQ) /*!< The remote device has been opened correctly */
#define | RPCAP_MSG_STARTCAP_REPLY (128+RPCAP_MSG_STARTCAP_REQ) /*!< The capture is staarting correctly */
#define | RPCAP_MSG_UPDATEFILTER_REPLY (128+RPCAP_MSG_UPDATEFILTER_REQ) /*!< The filter has been applied correctly on the remote device */
#define | RPCAP_MSG_AUTH_REPLY (128+RPCAP_MSG_AUTH_REQ) /*!< Sends a message that says 'ok, authorization successful' */
#define | RPCAP_MSG_STATS_REPLY (128+RPCAP_MSG_STATS_REQ) /*!< Message that keeps the network statistics */
#define | RPCAP_MSG_ENDCAP_REPLY (128+RPCAP_MSG_ENDCAP_REQ) /*!< Confirms that the capture stopped succesfully */
#define | RPCAP_MSG_SETSAMPLING_REPLY (128+RPCAP_MSG_SETSAMPLING_REQ) /*!< Confirms that the capture stopped succesfully */
#define | RPCAP_STARTCAPREQ_FLAG_PROMISC 1 /*!< Enables promiscuous mode (default: disabled) */
#define | RPCAP_STARTCAPREQ_FLAG_DGRAM 2 /*!< Use a datagram (i.e. UDP) connection for the data stream (default: use TCP)*/
#define | RPCAP_STARTCAPREQ_FLAG_SERVEROPEN 4 /*!< The server has to open the data connection toward the client */
#define | RPCAP_STARTCAPREQ_FLAG_INBOUND 8 /*!< Capture only inbound packets (take care: the flag has no effects with promiscuous enabled) */
#define | RPCAP_STARTCAPREQ_FLAG_OUTBOUND 16 /*!< Capture only outbound packets (take care: the flag has no effects with promiscuous enabled) */
#define | RPCAP_UPDATEFILTER_BPF 1 /*!< This code tells us that the filter is encoded with the BPF/NPF syntax */
#define | PCAP_ERR_NETW 1 /*!< Network error */
#define | PCAP_ERR_INITTIMEOUT 2 /*!< The RPCAP initial timeout has expired */
#define | PCAP_ERR_AUTH 3 /*!< Generic authentication error */
#define | PCAP_ERR_FINDALLIF 4 /*!< Generic findalldevs error */
#define | PCAP_ERR_NOREMOTEIF 5 /*!< The findalldevs was ok, but the remote end had no interfaces to list */
#define | PCAP_ERR_OPEN 6 /*!< Generic pcap_open error */
#define | PCAP_ERR_UPDATEFILTER 7 /*!< Generic updatefilter error */
#define | PCAP_ERR_GETSTATS 8 /*!< Generic pcap_stats error */
#define | PCAP_ERR_READEX 9 /*!< Generic pcap_next_ex error */
#define | PCAP_ERR_HOSTNOAUTH 10 /*!< The host is not authorized to connect to this server */
#define | PCAP_ERR_REMOTEACCEPT 11 /*!< Generic pcap_remoteaccept error */
#define | PCAP_ERR_STARTCAPTURE 12 /*!< Generic pcap_startcapture error */
#define | PCAP_ERR_ENDCAPTURE 13 /*!< Generic pcap_endcapture error */
#define | PCAP_ERR_RUNTIMETIMEOUT 14 /*!< The RPCAP run-time timeout has expired */
#define | PCAP_ERR_SETSAMPLING 15 /*!< Error diring the settings of sampling parameters */
#define | PCAP_ERR_WRONGMSG 16 /*!< The other end endpoint sent a message which has not been recognized */
#define | PCAP_ERR_WRONGVER 17 /*!< The other end endpoint ahs a version number that is not compatible with our */
## Typedefs
typedef unsigned char | uint8
| Provides an 8-bits unsigned integer.
typedef unsigned short | uint16
| Provides a 16-bits unsigned integer.
typedef unsigned int | uint32
| Provides a 32-bits unsigned integer.
typedef int | int32
| Provides a 32-bits integer.

## Detailed Description

## Define Documentation

#define PCAP_ERR_AUTH 3 /*!< Generic authentication error */

| Generic authentication error Definition at line 312 of file pcap-remote.h. Referenced by daemon_serviceloop().

#define PCAP_ERR_ENDCAPTURE 13 /*!< Generic pcap_endcapture error */

| Generic pcap_endcapture error Definition at line 322 of file pcap-remote.h. Referenced by daemon_serviceloop().

#define PCAP_ERR_FINDALLIF 4 /*!< Generic findalldevs error */

| Generic findalldevs error Definition at line 313 of file pcap-remote.h. Referenced by daemon_findalldevs().

#define PCAP_ERR_GETSTATS 8 /*!< Generic pcap_stats error */

| Generic pcap_stats error Definition at line 317 of file pcap-remote.h. Referenced by daemon_getstats(), and daemon_getstatsnopcap().

#define PCAP_ERR_HOSTNOAUTH 10 /*!< The host is not authorized to connect to this server */

| The host is not authorized to connect to this server Definition at line 319 of file pcap-remote.h. Referenced by main_passive().

#define PCAP_ERR_INITTIMEOUT 2 /*!< The RPCAP initial timeout has expired */

| The RPCAP initial timeout has expired Definition at line 311 of file pcap-remote.h. Referenced by daemon_serviceloop().

#define PCAP_ERR_NETW 1 /*!< Network error */

| Network error Definition at line 310 of file pcap-remote.h. Referenced by daemon_serviceloop().

#define PCAP_ERR_NOREMOTEIF 5 /*!< The findalldevs was ok, but the remote end had no interfaces to list */

| The findalldevs was ok, but the remote end had no interfaces to list Definition at line 314 of file pcap-remote.h. Referenced by daemon_findalldevs().

#define PCAP_ERR_OPEN 6 /*!< Generic pcap_open error */

| Generic pcap_open error Definition at line 315 of file pcap-remote.h. Referenced by daemon_opensource(), and daemon_startcapture().

#define PCAP_ERR_READEX 9 /*!< Generic pcap_next_ex error */

| Generic pcap_next_ex error Definition at line 318 of file pcap-remote.h. Referenced by daemon_thrdatamain().

#define PCAP_ERR_REMOTEACCEPT 11 /*!< Generic pcap_remoteaccept error */

| Generic pcap_remoteaccept error Definition at line 320 of file pcap-remote.h. Referenced by pcap_remoteact_accept().

#define PCAP_ERR_RUNTIMETIMEOUT 14 /*!< The RPCAP run-time timeout has expired */

| The RPCAP run-time timeout has expired Definition at line 323 of file pcap-remote.h. Referenced by daemon_serviceloop().

#define PCAP_ERR_SETSAMPLING 15 /*!< Error diring the settings of sampling parameters */

| Error diring the settings of sampling parameters Definition at line 324 of file pcap-remote.h. Referenced by daemon_setsampling().

#define PCAP_ERR_STARTCAPTURE 12 /*!< Generic pcap_startcapture error */

| Generic pcap_startcapture error Definition at line 321 of file pcap-remote.h. Referenced by daemon_startcapture().

#define PCAP_ERR_UPDATEFILTER 7 /*!< Generic updatefilter error */

| Generic updatefilter error Definition at line 316 of file pcap-remote.h. Referenced by daemon_serviceloop(), and daemon_updatefilter().

#define PCAP_ERR_WRONGMSG 16 /*!< The other end endpoint sent a message which has not been recognized */

| The other end endpoint sent a message which has not been recognized Definition at line 325 of file pcap-remote.h. Referenced by daemon_serviceloop().

#define PCAP_ERR_WRONGVER 17 /*!< The other end endpoint ahs a version number that is not compatible with our */

| The other end endpoint ahs a version number that is not compatible with our Definition at line 326 of file pcap-remote.h. Referenced by daemon_serviceloop().

#define RPCAP_ACTIVE_WAIT 30 /*!< Waiting time betweek two attempts to open a connection, in active mode (default: 30 sec) */

| Waiting time betweek two attempts to open a connection, in active mode (default: 30 sec) Definition at line 91 of file pcap-remote.h. Referenced by main_active().

#define RPCAP_DEFAULT_NETADDR "" /*!< Default network address on which the RPCAP daemon binds to. */

| Default network address on which the RPCAP daemon binds to. Definition at line 87 of file pcap-remote.h. Referenced by main().

#define RPCAP_DEFAULT_NETPORT "2002" /*!< Default port on which the RPCAP daemon is waiting for connections. */

| Default port on which the RPCAP daemon is waiting for connections. Definition at line 84 of file pcap-remote.h. Referenced by main(), pcap_findalldevs_ex(), pcap_opensource_remote(), and printusage().

#define RPCAP_DEFAULT_NETPORT_ACTIVE "2003"

| Default port on which the client workstation is waiting for connections in case of active mode. Definition at line 86 of file pcap-remote.h. Referenced by fileconf_read(), main(), pcap_remoteact_accept(), and printusage().

#define RPCAP_HOSTLIST_SEP " ,;\n\r"

| Separators used for the host list. It is used: by the rpcapd daemon, when you types a list of allowed connecting hosts by the rpcap in active mode, when the client waits for incoming connections from other hosts Definition at line 108 of file pcap-remote.h. Referenced by fileconf_read(), fileconf_save(), main(), main_passive(), and pcap_remoteact_accept().

#define RPCAP_MSG_AUTH_REPLY (128+RPCAP_MSG_AUTH_REQ) /*!< Sends a message that says 'ok, authorization successful' */

| Sends a message that says 'ok, authorization successful' Definition at line 295 of file pcap-remote.h. Referenced by daemon_checkauth(), and rpcap_sendauth().

#define RPCAP_MSG_AUTH_REQ 8 /*!< Message that keeps the authentication parameters */

| Message that keeps the authentication parameters Definition at line 286 of file pcap-remote.h. Referenced by daemon_checkauth(), and rpcap_sendauth().

#define RPCAP_MSG_CLOSE 6 /*!< Close the connection with the remote peer */

| Close the connection with the remote peer Definition at line 284 of file pcap-remote.h. Referenced by daemon_checkauth(), daemon_serviceloop(), pcap_close_remote(), and pcap_remoteact_close().

#define RPCAP_MSG_ENDCAP_REPLY (128+RPCAP_MSG_ENDCAP_REQ) /*!< Confirms that the capture stopped succesfully */

| Confirms that the capture stopped succesfully Definition at line 297 of file pcap-remote.h. Referenced by daemon_endcapture().

#define RPCAP_MSG_ENDCAP_REQ 10 /*!< Stops the current capture, keeping the device open */

| Stops the current capture, keeping the device open Definition at line 288 of file pcap-remote.h. Referenced by daemon_serviceloop(), and pcap_close_remote().

#define RPCAP_MSG_ERROR 1 /*!< Message that keeps an error notification */

| Message that keeps an error notification Definition at line 279 of file pcap-remote.h. Referenced by daemon_checkauth(), daemon_serviceloop(), pcap_findalldevs_ex(), pcap_opensource_remote(), pcap_setsampling_remote(), pcap_startcapture_remote(), rpcap_checkmsg(), rpcap_sendauth(), rpcap_senderror(), and rpcap_stats_remote().

#define RPCAP_MSG_FINDALLIF_REPLY (128+RPCAP_MSG_FINDALLIF_REQ) /*!< Keeps the list of all the remote interfaces */

| Keeps the list of all the remote interfaces Definition at line 291 of file pcap-remote.h. Referenced by daemon_findalldevs(), and pcap_findalldevs_ex().

#define RPCAP_MSG_FINDALLIF_REQ 2 /*!< Request to list all the remote interfaces */

| Request to list all the remote interfaces Definition at line 280 of file pcap-remote.h. Referenced by daemon_serviceloop(), and pcap_findalldevs_ex().

#define RPCAP_MSG_OPEN_REPLY (128+RPCAP_MSG_OPEN_REQ) /*!< The remote device has been opened correctly */

| The remote device has been opened correctly Definition at line 292 of file pcap-remote.h. Referenced by daemon_opensource(), and pcap_opensource_remote().

#define RPCAP_MSG_OPEN_REQ 3 /*!< Request to open a remote device */

| Request to open a remote device Definition at line 281 of file pcap-remote.h. Referenced by daemon_serviceloop(), and pcap_opensource_remote().

#define RPCAP_MSG_PACKET 7 /*!< This is a 'data' message, which carries a network packet */

| This is a 'data' message, which carries a network packet Definition at line 285 of file pcap-remote.h. Referenced by daemon_thrdatamain(), and pcap_read_nocb_remote().

#define RPCAP_MSG_SETSAMPLING_REPLY (128+RPCAP_MSG_SETSAMPLING_REQ) /*!< Confirms that the capture stopped succesfully */

| Confirms that the capture stopped succesfully Definition at line 298 of file pcap-remote.h. Referenced by daemon_setsampling(), and pcap_setsampling_remote().

#define RPCAP_MSG_SETSAMPLING_REQ 11 /*!< Sset sampling parameters */

| Sset sampling parameters Definition at line 289 of file pcap-remote.h. Referenced by daemon_serviceloop(), and pcap_setsampling_remote().

#define RPCAP_MSG_STARTCAP_REPLY (128+RPCAP_MSG_STARTCAP_REQ) /*!< The capture is staarting correctly */

| The capture is staarting correctly Definition at line 293 of file pcap-remote.h. Referenced by daemon_startcapture(), and pcap_startcapture_remote().

#define RPCAP_MSG_STARTCAP_REQ 4 /*!< Request to start a capture on a remote device */

| Request to start a capture on a remote device Definition at line 282 of file pcap-remote.h. Referenced by daemon_serviceloop(), and pcap_startcapture_remote().

#define RPCAP_MSG_STATS_REPLY (128+RPCAP_MSG_STATS_REQ) /*!< Message that keeps the network statistics */

| Message that keeps the network statistics Definition at line 296 of file pcap-remote.h. Referenced by daemon_getstats(), daemon_getstatsnopcap(), and rpcap_stats_remote().

#define RPCAP_MSG_STATS_REQ 9 /*!< It requires to have network statistics */

| It requires to have network statistics Definition at line 287 of file pcap-remote.h. Referenced by daemon_serviceloop(), and rpcap_stats_remote().

#define RPCAP_MSG_UPDATEFILTER_REPLY (128+RPCAP_MSG_UPDATEFILTER_REQ) /*!< The filter has been applied correctly on the remote device */

| The filter has been applied correctly on the remote device Definition at line 294 of file pcap-remote.h. Referenced by daemon_updatefilter(), and pcap_updatefilter_remote().

#define RPCAP_MSG_UPDATEFILTER_REQ 5 /*!< Send a compiled filter into the remote device */

| Send a compiled filter into the remote device Definition at line 283 of file pcap-remote.h. Referenced by daemon_serviceloop(), and pcap_updatefilter_remote().

#define RPCAP_NETBUF_SIZE 64000

| 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. Definition at line 98 of file pcap-remote.h. Referenced by daemon_findalldevs(), daemon_getstats(), daemon_getstatsnopcap(), daemon_opensource(), daemon_startcapture(), daemon_thrdatamain(), pcap_opensource_remote(), pcap_pack_bpffilter(), pcap_read_nocb_remote(), pcap_setsampling_remote(), pcap_startcapture_remote(), pcap_updatefilter_remote(), rpcap_sendauth(), and rpcap_senderror().

#define RPCAP_STARTCAPREQ_FLAG_DGRAM 2 /*!< Use a datagram (i.e. UDP) connection for the data stream (default: use TCP)*/

| Use a datagram (i.e. UDP) connection for the data stream (default: use TCP) Definition at line 301 of file pcap-remote.h. Referenced by daemon_startcapture(), and pcap_startcapture_remote().

#define RPCAP_STARTCAPREQ_FLAG_INBOUND 8 /*!< Capture only inbound packets (take care: the flag has no effects with promiscuous enabled) */

| Capture only inbound packets (take care: the flag has no effects with promiscuous enabled) Definition at line 303 of file pcap-remote.h.

#define RPCAP_STARTCAPREQ_FLAG_OUTBOUND 16 /*!< Capture only outbound packets (take care: the flag has no effects with promiscuous enabled) */

| Capture only outbound packets (take care: the flag has no effects with promiscuous enabled) Definition at line 304 of file pcap-remote.h.

#define RPCAP_STARTCAPREQ_FLAG_PROMISC 1 /*!< Enables promiscuous mode (default: disabled) */

| Enables promiscuous mode (default: disabled) Definition at line 300 of file pcap-remote.h. Referenced by daemon_startcapture(), and pcap_startcapture_remote().

#define RPCAP_STARTCAPREQ_FLAG_SERVEROPEN 4 /*!< The server has to open the data connection toward the client */

| The server has to open the data connection toward the client Definition at line 302 of file pcap-remote.h. Referenced by daemon_startcapture(), and pcap_startcapture_remote().

#define RPCAP_SUSPEND_WRONGAUTH 1 /*!< If the authentication is wrong, stops 1 sec before accepting a new auth message */

| If the authentication is wrong, stops 1 sec before accepting a new auth message Definition at line 92 of file pcap-remote.h. Referenced by daemon_serviceloop().

#define RPCAP_TIMEOUT_INIT 90 /*!< Initial timeout for RPCAP connections (default: 90 sec) */

| Initial timeout for RPCAP connections (default: 90 sec) Definition at line 89 of file pcap-remote.h. Referenced by daemon_serviceloop().

#define RPCAP_TIMEOUT_RUNTIME 180 /*!< Run-time timeout for RPCAP connections (default: 3 min) */

| Run-time timeout for RPCAP connections (default: 3 min) Definition at line 90 of file pcap-remote.h. Referenced by daemon_serviceloop().

#define RPCAP_UPDATEFILTER_BPF 1 /*!< This code tells us that the filter is encoded with the BPF/NPF syntax */

| This code tells us that the filter is encoded with the BPF/NPF syntax Definition at line 306 of file pcap-remote.h. Referenced by daemon_unpackapplyfilter(), and pcap_pack_bpffilter().

#define RPCAP_VERSION 0 /*!< Present version of the RPCAP protocol (0 = Experimental). */

| Present version of the RPCAP protocol (0 = Experimental). Definition at line 88 of file pcap-remote.h. Referenced by rpcap_checkver(), and rpcap_createhdr().

## Typedef Documentation

typedef int int32

| Provides a 32-bits integer. Definition at line 117 of file pcap-remote.h. Referenced by pcap_pack_bpffilter(), and rpcap_checkmsg().

typedef unsigned short uint16

| Provides a 16-bits unsigned integer. Definition at line 115 of file pcap-remote.h. Referenced by daemon_findalldevs(), daemon_getstats(), daemon_getstatsnopcap(), daemon_thrdatamain(), rpcap_sendauth(), and rpcap_senderror().

typedef unsigned int uint32

| Provides a 32-bits unsigned integer. Definition at line 116 of file pcap-remote.h.

typedef unsigned char uint8

| Provides an 8-bits unsigned integer. Definition at line 114 of file pcap-remote.h. Referenced by rpcap_checkmsg().

documentation. Copyright (c) 2002-2003 Politecnico di Torino. All rights reserved.