#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <errno.h>
#include <pcap.h>
#include <pcap-int.h>
#include <pcap-remote.h>
#include <sockutils.h>
Go to the source code of this file.
Defines | |
#define | PCAP_STATS_STANDARD 0 /*!< Used by pcap_stats_remote to see if we want standard or extended statistics */ |
#define | PCAP_STATS_EX 1 /*!< Used by pcap_stats_remote to see if we want standard or extended statistics */ |
Functions | |
int | rpcap_checkver (SOCKET sock, struct rpcap_header *header, char *errbuf) |
Checks if the version contained into the message is compatible with the one handled by this implementation. | |
pcap_stat * | rpcap_stats_remote (pcap_t *p, struct pcap_stat *ps, int mode) |
It retrieves network statistics from the other peer. | |
int | pcap_pack_bpffilter (pcap_t *fp, char *sendbuf, int *sendbufidx, struct bpf_program *prog) |
Takes a bpf program and sends it to the other host. | |
int | pcap_createfilter_norpcappkt (pcap_t *fp, struct bpf_program *prog) |
Update the current filter in order not to capture rpcap packets. | |
int | rpcap_deseraddr (struct sockaddr_storage *sockaddrin, struct sockaddr_storage **sockaddrout, char *errbuf) |
It traslates (i.e. de-serializes) a 'sockaddr_storage' structure from the network byte order to the host byte order. | |
int | pcap_read_nocb_remote (pcap_t *p, struct pcap_pkthdr **pkt_header, u_char **pkt_data) |
It reads a packet from the network socket. This does not make use of callback (hence the "nocb" string into its name). | |
int | pcap_read_remote (pcap_t *p, int cnt, pcap_handler callback, u_char *user) |
It reads a packet from the network socket. | |
void | pcap_close_remote (pcap_t *fp) |
It sends a CLOSE command to the capture server. | |
int | pcap_stats_remote (pcap_t *p, struct pcap_stat *ps) |
It retrieves network statistics from the other peer. | |
pcap_stat * | pcap_stats_ex_remote (pcap_t *p) |
It retrieves network statistics from the other peer. | |
pcap_t * | pcap_opensource_remote (const char *source, struct pcap_rmtauth *auth, char *errbuf) |
It opens a remote adapter by opening an RPCAP connection and so on. | |
int | pcap_startcapture_remote (pcap_t *fp) |
It starts a remote capture. | |
int | pcap_updatefilter_remote (pcap_t *fp, struct bpf_program *prog) |
Update a filter on a remote host. | |
int | pcap_setfilter_remote (pcap_t *fp, struct bpf_program *prog) |
Send a filter to a remote host. | |
int | pcap_setsampling_remote (pcap_t *p) |
Set sampling parameters in the remote host. | |
int | rpcap_senderror (SOCKET sock, char *error, unsigned short errcode, char *errbuf) |
It sends a RPCAP error to the other peer. | |
int | rpcap_sendauth (SOCKET sock, struct pcap_rmtauth *auth, char *errbuf) |
Sends the authentication message. | |
void | rpcap_createhdr (struct rpcap_header *header, uint8 type, uint16 value, uint32 length) |
Creates a structure of type rpcap_header. | |
int | rpcap_checkmsg (char *errbuf, SOCKET sock, struct rpcap_header *header, uint8 first,...) |
Checks if the header of the received message is correct. | |
int | rpcap_remoteact_getsock (const char *host, char *errbuf) |
It returns the socket currently used for this active connection (active mode only). | |
Variables | |
activehosts * | activeHosts |
Keeps a list of all the opened connections in the active mode. |
This file keeps also the functions that are 'private', i.e. are needed by the RPCAP protocol but are not exported to the user.
Definition in file pcap-remote.c.
|
Used by pcap_stats_remote to see if we want standard or extended statistics Definition at line 66 of file pcap-remote.c. Referenced by pcap_stats_ex_remote(). |
|
Used by pcap_stats_remote to see if we want standard or extended statistics Definition at line 65 of file pcap-remote.c. Referenced by pcap_stats_remote(), and rpcap_stats_remote(). |
|
Takes a bpf program and sends it to the other host. This function can be called in two cases:
This function serializes the filter into the sending buffer ('sendbuf', passed as a parameter) and return back. It does not send anything on the network.
Definition at line 1289 of file pcap-remote.c. References bpf_program::bf_insns, bpf_program::bf_len, bpf_insn::code, int32, pcap_compile(), PCAP_ERRBUF_SIZE, RPCAP_NETBUF_SIZE, RPCAP_UPDATEFILTER_BPF, sock_bufferize(), and SOCKBUF_CHECKONLY. Referenced by pcap_startcapture_remote(), and pcap_updatefilter_remote(). |
|
Keeps a list of all the opened connections in the active mode.
Definition at line 71 of file pcap-remote.c. Referenced by pcap_close_remote(), pcap_remoteact_accept(), pcap_remoteact_close(), pcap_remoteact_list(), pcap_startcapture_remote(), and rpcap_remoteact_getsock(). |
documentation. Copyright (c) 2002-2003 Politecnico di Torino. All rights reserved.