35 #ifndef _OPENVAS_HOSTS_H 36 #define _OPENVAS_HOSTS_H 46 #include <arpa/inet.h> The structure for a single host object.
openvas_host_t * openvas_hosts_next(openvas_hosts_t *)
Gets the next openvas_host_t from a openvas_hosts_t structure. The state of iteration is kept interna...
int openvas_host_resolve(const openvas_host_t *, void *, int)
Resolves a host object's name to an IPv4 or IPv6 address. Host object should be of type HOST_TYPE_NAM...
unsigned int openvas_hosts_removed(const openvas_hosts_t *)
Gets the count of single values in hosts string that were removed (duplicates / excluded.)
gchar * openvas_host_type_str(const openvas_host_t *)
Gets a host's type in printable format.
int openvas_hosts_exclude(openvas_hosts_t *, const gchar *, int)
void openvas_hosts_reverse(openvas_hosts_t *)
Reverses the order of the hosts objects in the collection. Not to be used while iterating over the si...
int openvas_hosts_reverse_lookup_only(openvas_hosts_t *)
Removes hosts that don't reverse-lookup from the hosts collection. Not to be used while iterating ove...
int openvas_host_get_addr6(const openvas_host_t *, struct in6_addr *)
Gives a host object's value as an IPv6 address. If the host type is hostname, it resolves the IPv4 ad...
char * openvas_host_reverse_lookup(openvas_host_t *)
Checks for a host object reverse dns lookup existence.
int openvas_get_host_type(const gchar *)
Determines the host type in a buffer.
void openvas_hosts_shuffle(openvas_hosts_t *)
Randomizes the order of the hosts objects in the collection. Not to be used while iterating over the ...
enum host_type openvas_host_type(const openvas_host_t *)
Gets a host object's type.
The structure for Hosts collection.
gchar * openvas_host_value_str(const openvas_host_t *)
Gets a host's value in printable format.
void openvas_hosts_resolve(openvas_hosts_t *)
Resolves host objects of type name in a hosts collection, replacing hostnames with IPv4 values...
void openvas_hosts_free(openvas_hosts_t *)
Frees memory occupied by an openvas_hosts_t structure.
int openvas_hosts_reverse_lookup_unify(openvas_hosts_t *)
Removes hosts duplicates that reverse-lookup to the same value. Not to be used while iterating over t...
openvas_hosts_t * openvas_hosts_new_with_max(const gchar *, unsigned int)
Creates a new openvas_hosts_t structure and the associated hosts objects from the provided hosts_str...
openvas_hosts_t * openvas_hosts_new(const gchar *)
Creates a new openvas_hosts_t structure and the associated hosts objects from the provided hosts_str...
unsigned int openvas_hosts_count(const openvas_hosts_t *)
Gets the count of single hosts objects in a hosts collection.
int openvas_host_in_hosts(const openvas_host_t *, const struct in6_addr *, const openvas_hosts_t *)
Returns whether a host has an equal host in a hosts collection. eg. 192.168.10.1 has an equal in list...