OpenVAS Scanner 23.23.1
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
11
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
22int
23v6_is_local_ip (struct in6_addr *);
24
25int
26islocalhost (struct in_addr *);
27
28int
29v6_islocalhost (struct in6_addr *);
30
31int
33
34char *
35routethrough (struct in_addr *, struct in_addr *);
36
37char *
38v6_routethrough (struct in6_addr *, struct in6_addr *);
39
40int
41v6_getsourceip (struct in6_addr *, struct in6_addr *);
42
43char *
44get_iface_from_ip (const char *);
45
46int
47get_iface_index (struct in6_addr *, int *);
48
49#endif
int get_datalink_size(int)
Definition pcap.c:298
int get_iface_index(struct in6_addr *, int *)
Get the interface index depending on the target's IP.
Definition pcap.c:1334
char * get_iface_from_ip(const char *)
Given an IP address, determines which interface belongs to.
Definition pcap.c:1280
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:234
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:851
int islocalhost(struct in_addr *)
Tests whether a packet sent to IP is LIKELY to route through the kernel localhost interface.
Definition pcap.c:271
int v6_is_local_ip(struct in6_addr *)
Definition pcap.c:115
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:1070
int v6_getsourceip(struct in6_addr *, struct in6_addr *)
Definition pcap.c:487