Greenbone Vulnerability Management Libraries
20.8.0
|
Go to the documentation of this file.
32 #include <netinet/in.h>
69 struct in6_addr
addr6;
gchar * name
Definition: hosts.h:67
size_t count
Definition: hosts.h:96
int gvm_host_resolve(const gvm_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: hosts.c:2038
gvm_hosts_t * gvm_hosts_new(const gchar *)
Creates a new gvm_hosts_t structure and the associated hosts objects from the provided hosts_str.
Definition: hosts.c:1281
size_t removed
Definition: hosts.h:97
enum host_type gvm_host_type(const gvm_host_t *)
Gets a host object's type.
Definition: hosts.c:1950
int gvm_hosts_reverse_lookup_only(gvm_hosts_t *)
Removes hosts that don't reverse-lookup from the hosts collection. Not to be used while iterating ove...
Definition: hosts.c:1779
gchar * gvm_host_value_str(const gvm_host_t *)
Gets a host's value in printable format.
Definition: hosts.c:1981
@ HOST_TYPE_IPV6
Definition: hosts.h:43
gvm_host_t * gvm_host_from_str(const gchar *hosts_str)
Creates a new gvm_host_t from a host string.
Definition: hosts.c:1604
size_t max_size
Definition: hosts.h:94
gvm_vhost_t * gvm_vhost_new(char *, char *)
Creates a new gvm_vhost_t object.
Definition: hosts.c:884
@ HOST_TYPE_RANGE_SHORT
Definition: hosts.h:41
gvm_host_t * gvm_hosts_next(gvm_hosts_t *)
Gets the next gvm_host_t from a gvm_hosts_t structure. The state of iteration is kept internally with...
Definition: hosts.c:1295
enum host_type type
Definition: hosts.h:71
int gvm_hosts_exclude(gvm_hosts_t *, const char *)
Excludes a set of hosts provided as a string from a hosts collection. Not to be used while iterating ...
Definition: hosts.c:1588
The structure for a single vhost object.
Definition: hosts.h:79
@ HOST_TYPE_IPV4
Definition: hosts.h:39
void gvm_hosts_shuffle(gvm_hosts_t *)
Randomizes the order of the hosts objects in the collection. Not to be used while iterating over the ...
Definition: hosts.c:1333
gvm_host_t ** hosts
Definition: hosts.h:93
gchar * gvm_host_type_str(const gvm_host_t *)
Gets a host's type in printable format.
Definition: hosts.c:1965
The structure for a single host object.
Definition: hosts.h:64
@ HOST_TYPE_CIDR6_BLOCK
Definition: hosts.h:44
unsigned int gvm_hosts_count(const gvm_hosts_t *)
Gets the count of single hosts objects in a hosts collection.
Definition: hosts.c:1868
size_t current
Definition: hosts.h:95
char * value
Definition: hosts.h:80
@ HOST_TYPE_RANGE_LONG
Definition: hosts.h:42
int gvm_host_get_addr6(const gvm_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: hosts.c:2059
struct in_addr addr
Definition: hosts.h:68
void gvm_host_add_reverse_lookup(gvm_host_t *)
Add a host's reverse-lookup name to the vhosts list.
Definition: hosts.c:1737
@ HOST_TYPE_RANGE6_LONG
Definition: hosts.h:45
void gvm_hosts_free(gvm_hosts_t *)
Frees memory occupied by an gvm_hosts_t structure.
Definition: hosts.c:1310
int gvm_get_host_type(const gchar *)
Determines the host type in a buffer.
Definition: hosts.c:823
char * source
Definition: hosts.h:81
char * gvm_host_reverse_lookup(gvm_host_t *)
Checks for a host object reverse dns lookup existence.
Definition: hosts.c:1653
@ HOST_TYPE_MAX
Definition: hosts.h:47
gchar * orig_str
Definition: hosts.h:92
host_type
Definition: hosts.h:37
int gvm_host_in_hosts(const gvm_host_t *, const struct in6_addr *, const gvm_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: hosts.c:1900
struct in6_addr addr6
Definition: hosts.h:69
@ HOST_TYPE_CIDR_BLOCK
Definition: hosts.h:40
GSList * gvm_hosts_resolve(gvm_hosts_t *)
Resolves host objects of type name in a hosts collection, replacing hostnames with IPv4 values....
Definition: hosts.c:1391
@ HOST_TYPE_RANGE6_SHORT
Definition: hosts.h:46
void gvm_hosts_reverse(gvm_hosts_t *)
Reverses the order of the hosts objects in the collection. Not to be used while iterating over the si...
Definition: hosts.c:1365
int gvm_hosts_reverse_lookup_unify(gvm_hosts_t *)
Removes hosts duplicates that reverse-lookup to the same value. Not to be used while iterating over t...
Definition: hosts.c:1818
int gvm_hosts_exclude_with_max(gvm_hosts_t *, const char *, unsigned int)
Excludes a set of hosts provided as a string from a hosts collection. Not to be used while iterating ...
Definition: hosts.c:1514
void gvm_hosts_add(gvm_hosts_t *, gvm_host_t *)
Inserts a host object at the end of a hosts collection.
Definition: hosts.c:953
unsigned int gvm_hosts_removed(const gvm_hosts_t *)
Gets the count of single values in hosts string that were removed (duplicates / excluded....
Definition: hosts.c:1882
@ HOST_TYPE_NAME
Definition: hosts.h:38
gvm_hosts_t * gvm_hosts_new_with_max(const gchar *, unsigned int)
Creates a new gvm_hosts_t structure and the associated hosts objects from the provided hosts_str.
Definition: hosts.c:1086
GSList * vhosts
Definition: hosts.h:72
The structure for Hosts collection.
Definition: hosts.h:91
int gvm_vhosts_exclude(gvm_host_t *, const char *)
Exclude a list of vhosts from a host's vhosts list.
Definition: hosts.c:1459