OpenVAS Libraries  8.0.3
Macros | Functions
bpf_share.c File Reference
#include <pcap.h>
#include "openvas_logging.h"

Macros

#define NUM_CLIENTS   128
 

Functions

int bpf_open_live (char *iface, char *filter)
 
u_char * bpf_next_tv (int bpf, int *caplen, struct timeval *tv)
 
u_char * bpf_next (int bpf, int *caplen)
 
int bpf_datalink (int bpf)
 
void bpf_close (int bpf)
 

Macro Definition Documentation

#define NUM_CLIENTS   128
Todo:
There once was a BPF sharing feature with the same API as the methods below, but trying to share BPF among the daemon processes. What remains is a thin abstraction of the pcap API. Eventually it needs to be analysed whether this makes sense or can further be simplified.

Function Documentation

void bpf_close ( int  bpf)
int bpf_datalink ( int  bpf)
u_char* bpf_next ( int  bpf,
int *  caplen 
)
u_char* bpf_next_tv ( int  bpf,
int *  caplen,
struct timeval tv 
)
int bpf_open_live ( char *  iface,
char *  filter 
)
Returns
-1 in case of error, index of the opened pcap_t in pcaps otherwise.