35 #ifndef _OPENVAS_HOSTS_H 36 #define _OPENVAS_HOSTS_H 46 #include <arpa/inet.h> The structure for a single host object.
Definition: openvas_hosts.h:76
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...
Definition: openvas_hosts.c:1125
Definition: openvas_hosts.h:60
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...
Definition: openvas_hosts.c:1697
Definition: openvas_hosts.h:54
unsigned int openvas_hosts_removed(const openvas_hosts_t *)
Gets the count of single values in hosts string that were removed (duplicates / excluded.)
Definition: openvas_hosts.c:1539
Definition: openvas_hosts.h:52
Definition: openvas_hosts.h:53
gchar * openvas_host_type_str(const openvas_host_t *)
Gets a host's type in printable format.
Definition: openvas_hosts.c:1624
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...
Definition: openvas_hosts.c:1206
unsigned int removed
Definition: openvas_hosts.h:98
Definition: openvas_hosts.h:61
Definition: openvas_hosts.h:55
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...
Definition: openvas_hosts.c:1430
GList * current
Definition: openvas_hosts.h:96
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...
Definition: openvas_hosts.c:1718
gchar * orig_str
Definition: openvas_hosts.h:94
char * openvas_host_reverse_lookup(openvas_host_t *)
Checks for a host object reverse dns lookup existence.
Definition: openvas_hosts.c:1378
GList * hosts
Definition: openvas_hosts.h:95
int openvas_get_host_type(const gchar *)
Determines the host type in a buffer.
Definition: openvas_hosts.c:758
struct in_addr addr
Definition: openvas_hosts.h:80
struct in6_addr addr6
Definition: openvas_hosts.h:81
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 ...
Definition: openvas_hosts.c:1166
host_type
Definition: openvas_hosts.h:51
Definition: openvas_hosts.h:58
enum host_type openvas_host_type(const openvas_host_t *)
Gets a host object's type.
Definition: openvas_hosts.c:1609
The structure for Hosts collection.
Definition: openvas_hosts.h:92
enum host_type type
Definition: openvas_hosts.h:83
gchar * openvas_host_value_str(const openvas_host_t *)
Gets a host's value in printable format.
Definition: openvas_hosts.c:1640
gchar * name
Definition: openvas_hosts.h:79
Definition: openvas_hosts.h:56
Definition: openvas_hosts.h:59
void openvas_hosts_resolve(openvas_hosts_t *)
Resolves host objects of type name in a hosts collection, replacing hostnames with IPv4 values...
Definition: openvas_hosts.c:1244
unsigned int count
Definition: openvas_hosts.h:97
void openvas_hosts_free(openvas_hosts_t *)
Frees memory occupied by an openvas_hosts_t structure.
Definition: openvas_hosts.c:1145
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...
Definition: openvas_hosts.c:1472
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...
Definition: openvas_hosts.c:912
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...
Definition: openvas_hosts.c:1111
unsigned int openvas_hosts_count(const openvas_hosts_t *)
Gets the count of single hosts objects in a hosts collection.
Definition: openvas_hosts.c:1525
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...
Definition: openvas_hosts.c:1557
Definition: openvas_hosts.h:57