OpenVAS Scanner
7.0.0~git
|
Header file for module pcap. More...
#include <arpa/inet.h>
#include <pcap.h>
#include <sys/param.h>
Go to the source code of this file.
Functions | |
int | v6_is_local_ip (struct in6_addr *) |
int | islocalhost (struct in_addr *) |
Tests whether a packet sent to IP is LIKELY to route through the kernel localhost interface. More... | |
int | v6_islocalhost (struct in6_addr *) |
Tests whether a packet sent to IP is LIKELY to route through the kernel localhost interface. More... | |
int | get_datalink_size (int) |
char * | routethrough (struct in_addr *, struct in_addr *) |
An awesome function to determine what interface a packet to a given destination should be routed through. More... | |
char * | v6_routethrough (struct in6_addr *, struct in6_addr *) |
An awesome function to determine what interface a packet to a given destination should be routed through. More... | |
int | v6_getsourceip (struct in6_addr *, struct in6_addr *) |
Header file for module pcap.
Definition in file pcap_openvas.h.
int get_datalink_size | ( | int | ) |
Definition at line 295 of file pcap.c.
Referenced by capture_next_packet(), capture_next_v6_packet(), nasl_pcap_next(), nasl_send_capture(), and scan().
int islocalhost | ( | struct in_addr * | ) |
char* routethrough | ( | struct in_addr * | dest, |
struct in_addr * | source | ||
) |
An awesome function to determine what interface a packet to a given destination should be routed through.
It returns NULL if no appropriate interface is found, otherwise it returns the device name and fills in the source parameter. Some of the stuff is from Stevens' Unix Network Programming V2. He had an easier suggestion for doing this (in the book), but it isn't portable :(
Definition at line 975 of file pcap.c.
References myroute::dest, myroute::dev, getinterfaces(), islocalhost(), myroute::mask, MAXROUTES, interface_info::name, and name.
Referenced by init_capture_device(), nasl_pcap_next(), nasl_send_capture(), nasl_tcp_ping(), and openbpf().
int v6_getsourceip | ( | struct in6_addr * | , |
struct in6_addr * | |||
) |
Definition at line 478 of file pcap.c.
References name.
Referenced by nasl_this_host(), and v6_routethrough().
int v6_is_local_ip | ( | struct in6_addr * | ) |
Definition at line 117 of file pcap.c.
References getipv6routes(), ipv6addrmask(), MAXROUTES, name, and v6_getinterfaces().
Referenced by nasl_islocalnet().
int v6_islocalhost | ( | struct in6_addr * | ) |
Tests whether a packet sent to IP is LIKELY to route through the kernel localhost interface.
Definition at line 231 of file pcap.c.
References interface_info::addr, and v6_ipaddr2devname().
Referenced by init_v6_capture_device(), nasl_islocalhost(), nasl_send_v6packet(), nasl_tcp_v6_ping(), nasl_this_host(), and v6_routethrough().
char* v6_routethrough | ( | struct in6_addr * | dest, |
struct in6_addr * | source | ||
) |
An awesome function to determine what interface a packet to a given destination should be routed through.
It returns NULL if no appropriate interface is found, otherwise it returns the device name and fills in the source parameter. Some of the stuff is from Stevens' Unix Network Programming V2. He had an easier suggestion for doing this (in the book), but it isn't portable :(
Definition at line 789 of file pcap.c.
References myroute::dev, getipv4routes(), getipv6routes(), ipv6addrmask(), MAXROUTES, interface_info::name, v6_getinterfaces(), v6_getsourceip(), and v6_islocalhost().
Referenced by init_v6_capture_device(), nasl_pcap_next(), nasl_send_capture(), nasl_tcp_v6_ping(), and v6_openbpf().