OpenVAS Scanner
7.0.0~git
|
#include "capture_packet.h"
#include "../misc/bpf_share.h"
#include "../misc/pcap_openvas.h"
#include <arpa/inet.h>
#include <glib.h>
#include <netinet/ip.h>
#include <pcap.h>
#include <string.h>
#include <sys/param.h>
Go to the source code of this file.
Functions | |
int | islocalhost (struct in_addr *) |
Tests whether a packet sent to IP is LIKELY to route through the kernel localhost interface. More... | |
int | init_capture_device (struct in_addr src, struct in_addr dest, char *filter) |
Set up the pcap filter, and select the correct interface. More... | |
struct ip * | capture_next_packet (int bpf, int timeout, int *sz) |
int | init_v6_capture_device (struct in6_addr src, struct in6_addr dest, char *filter) |
struct ip6_hdr * | capture_next_v6_packet (int bpf, int timeout, int *sz) |
struct ip* capture_next_packet | ( | int | bpf, |
int | timeout, | ||
int * | sz | ||
) |
Definition at line 86 of file capture_packet.c.
References bpf_datalink(), bpf_next(), get_datalink_size(), and timeval().
Referenced by nasl_send_packet().
struct ip6_hdr* capture_next_v6_packet | ( | int | bpf, |
int | timeout, | ||
int * | sz | ||
) |
Definition at line 186 of file capture_packet.c.
References bpf_datalink(), bpf_next(), get_datalink_size(), and timeval().
Referenced by nasl_send_v6packet().
int init_capture_device | ( | struct in_addr | src, |
struct in_addr | dest, | ||
char * | filter | ||
) |
Set up the pcap filter, and select the correct interface.
The filter will be changed only if this is necessary
Definition at line 44 of file capture_packet.c.
References bpf_open_live(), islocalhost(), and routethrough().
Referenced by nasl_send_packet(), and nasl_tcp_ping().
int init_v6_capture_device | ( | struct in6_addr | src, |
struct in6_addr | dest, | ||
char * | filter | ||
) |
Definition at line 143 of file capture_packet.c.
References bpf_open_live(), name, v6_islocalhost(), and v6_routethrough().
Referenced by nasl_send_v6packet(), and nasl_tcp_v6_ping().
int islocalhost | ( | struct in_addr * | ) |
Tests whether a packet sent to IP is LIKELY to route through the kernel localhost interface.
Definition at line 268 of file pcap.c.
References interface_info::addr, and ipaddr2devname().
Referenced by init_capture_device(), nasl_send_packet(), nasl_tcp_ping(), plugin_run_synscan(), and routethrough().