11#ifndef _GVM_BASE_NETWORKING_H
12#define _GVM_BASE_NETWORKING_H
void addr6_to_str(const struct in6_addr *addr6, char *str)
Stringifies an IP address.
int ipv6_is_enabled(void)
Checks if IPv6 support is enabled.
void ipv4_as_ipv6(const struct in_addr *ip4, struct in6_addr *ip6)
Maps an IPv4 address as an IPv6 address. eg. 192.168.10.20 would map to ::ffff:192....
char * gvm_get_outgoing_iface(struct sockaddr_storage *target_addr)
Get the outgoing interface name for a given destination addr.
array_t * port_range_ranges(const char *port_range)
Create a range array from a port_range string.
void gvm_source_addr6(void *addr6)
Gives the source IPv6 address.
void gvm_source_addr(void *addr)
Gives the source IPv4 address.
int gvm_resolve(const char *name, void *dst, int family)
Resolves a hostname to an IPv4 or IPv6 address.
void gvm_source_addr_as_addr6(struct in6_addr *addr6)
Gives the source IPv4 mapped as an IPv6 address. eg. 192.168.20.10 would map to ::ffff:192....
void sockaddr_as_str(const struct sockaddr_storage *addr, char *str)
Convert an IP address to string format.
int validate_port_range(const char *port_range)
Validate a port range string.
char * addr6_as_str(const struct in6_addr *addr6)
Stringifies an IP address.
int gvm_resolve_as_addr6(const char *name, struct in6_addr *ip6)
Resolves a hostname to an IPv4-mapped IPv6 or IPv6 address.
int gvm_source_iface_init(const char *iface)
Initializes the source network interface name and related information.
gchar * gvm_routethrough(struct sockaddr_storage *storage_dest, struct sockaddr_storage *storage_source)
Get Interface which should be used for routing to destination addr.
char * gvm_source_addr6_str(void)
Gives the source IPv6 address in string format.
int gvm_source_set_socket(int socket, int port, int family)
Binds a socket to use the global source address.
int port_in_port_ranges(int pnum, port_protocol_t ptype, array_t *pranges)
Checks if a port num is in port ranges array.
GSList * gvm_resolve_list(const char *name)
Returns a list of addresses that a hostname resolves to.
int gvm_source_iface_is_set(void)
Check if global_source global_source_iface is set.
char * gvm_source_addr_str(void)
Gives the source IPv4 address in string format.
port_protocol_t
Possible port types.