OpenVAS Libraries  6.0+beta5
Functions
hg_add_hosts.h File Reference

Go to the source code of this file.

Functions

int hg_add_comma_delimited_hosts (struct hg_globals *, int)
 
void hg_add_host_with_options (struct hg_globals *, char *, struct in_addr, int, int, int, struct in_addr *)
 Appends a new hg_host to the hg_globals hostlist. More...
 
void hg_add_ipv6host_with_options (struct hg_globals *, char *, struct in6_addr *, int, int, int, struct in6_addr *)
 
void hg_add_domain (struct hg_globals *, char *)
 
void hg_add_subnet (struct hg_globals *, struct in_addr, int)
 

Function Documentation

int hg_add_comma_delimited_hosts ( struct hg_globals globals,
int  limit 
)

Add hosts of the form :

host1/nm,host2/nm,xxx.xxx.xxx.xxx/xxx, ....

, progressing the "marker" of the globals argument. Hosts can be separated by comma or semicolons.

Parameters
[in,out]globalshg_globals to add hosts to.
[in]limitMaximum number of hosts to resolve, might well break before. Smaller or equal to 0 means "no limit".
Returns
0 if all or limit hosts have been added, -1 on errors.
void hg_add_domain ( struct hg_globals ,
char *   
)
void hg_add_host_with_options ( struct hg_globals globals,
char *  hostname,
struct in_addr  ip,
int  alive,
int  netmask,
int  use_max,
struct in_addr *  ip_max 
)

Appends a new hg_host to the hg_globals hostlist.

Parameters
[in,out]globalshg_globals to add host to.
[in]hostnamehostname.
Todo:
consider const for hostname parameter
void hg_add_ipv6host_with_options ( struct hg_globals globals,
char *  hostname,
struct in6_addr *  ip,
int  alive,
int  netmask,
int  use_max,
struct in6_addr *  ip_max 
)
Parameters
ip_maxIgnored.
Todo:
We will probably segfault sooner or later if inet_ntop fails.
void hg_add_subnet ( struct hg_globals ,
struct in_addr  ,
int   
)