OpenVAS Scanner  22.7.9
pcap_openvas.h
Go to the documentation of this file.
1 /* SPDX-FileCopyrightText: 2023 Greenbone AG
2  * SPDX-FileCopyrightText: 1998-2007 Tenable Network Security, Inc.
3  *
4  * SPDX-License-Identifier: GPL-2.0-or-later
5  */
6 
12 #ifndef MISC_PCAP_OPENVAS_H
13 #define MISC_PCAP_OPENVAS_H
14 
15 #include <arpa/inet.h>
16 #include <pcap.h>
17 #include <sys/param.h>
18 #ifdef __FreeBSD__
19 #include <netinet/in.h>
20 #endif
21 
22 int
23 v6_is_local_ip (struct in6_addr *);
24 
25 int
26 islocalhost (struct in_addr *);
27 
28 int
29 v6_islocalhost (struct in6_addr *);
30 
31 int
32 get_datalink_size (int);
33 
34 char *
35 routethrough (struct in_addr *, struct in_addr *);
36 
37 char *
38 v6_routethrough (struct in6_addr *, struct in6_addr *);
39 
40 int
41 v6_getsourceip (struct in6_addr *, struct in6_addr *);
42 
43 char *
44 get_iface_from_ip (const char *);
45 
46 int
47 get_iface_index (struct in6_addr *, int *);
48 
49 #endif
get_iface_index
int get_iface_index(struct in6_addr *, int *)
Get the interface index depending on the target's IP.
Definition: pcap.c:1324
get_datalink_size
int get_datalink_size(int)
Definition: pcap.c:288
islocalhost
int islocalhost(struct in_addr *)
Tests whether a packet sent to IP is LIKELY to route through the kernel localhost interface.
Definition: pcap.c:261
v6_is_local_ip
int v6_is_local_ip(struct in6_addr *)
Definition: pcap.c:108
v6_getsourceip
int v6_getsourceip(struct in6_addr *, struct in6_addr *)
Definition: pcap.c:477
v6_routethrough
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 thro...
Definition: pcap.c:841
routethrough
char * routethrough(struct in_addr *, struct in_addr *)
An awesome function to determine what interface a packet to a given destination should be routed thro...
Definition: pcap.c:1060
get_iface_from_ip
char * get_iface_from_ip(const char *)
Given an IP address, determines which interface belongs to.
Definition: pcap.c:1270
v6_islocalhost
int v6_islocalhost(struct in6_addr *)
Tests whether a packet sent to IP is LIKELY to route through the kernel localhost interface.
Definition: pcap.c:224