OpenVAS Libraries  9.0.1
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

◆ NUM_CLIENTS

#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

◆ bpf_close()

void bpf_close ( int  bpf)

◆ bpf_datalink()

int bpf_datalink ( int  bpf)

◆ bpf_next()

u_char* bpf_next ( int  bpf,
int *  caplen 
)

◆ bpf_next_tv()

u_char* bpf_next_tv ( int  bpf,
int *  caplen,
struct timeval tv 
)

◆ bpf_open_live()

int bpf_open_live ( char *  iface,
char *  filter 
)
Returns
-1 in case of error, index of the opened pcap_t in pcaps otherwise.