|
OpenVAS Libraries
4.0+rc3.SVN
|
#include <arpa/inet.h>#include <ctype.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "network.h"#include "hosts_gatherer.h"#include "hg_utils.h"#include "hg_filter.h"#include "hg_add_hosts.h"#include "hg_subnet.h"Macros | |
| #define | OCTETRANGE "%3d%*1[-]%3d" |
| #define | OCTET "%3d" |
| #define | DOT "%*1[.]" |
| #define | COMP "%7[0-9-]" |
| #define | REMINDER "%s" |
Functions | |
| int | hg_add_comma_delimited_hosts (struct hg_globals *globals, int limit) |
| 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) |
| 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. | |
| void | hg_add_domain (struct hg_globals *globals, char *domain) |
| void | hg_add_subnet (struct hg_globals *globals, struct in_addr ip, int netmask) |
Functions to add hosts to a hg_globals host list.
Possible input values for host/hostname:
'hostname' or 'xx.xx.xx.xx' or 'hostname/netmask' or 'xx.xx.xx.xx/netmask' or '[xx|xx-xx].[xx|xx-xx].[xx|xx-xx].[xx|xx-xx]' (by Alex Butcher, Articon-Integralis AG)
| #define OCTETRANGE "%3d%*1[-]%3d" |
| 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.
| [in,out] | globals | hg_globals to add hosts to. |
| [in] | limit | Maximum number of hosts to resolve, might well break before. Smaller or equal to 0 means "no limit". |
| 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.
| [in,out] | globals | hg_globals to add host to. |
| [in] | hostname | hostname. |
| 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 | ||
| ) |
| ip_max | Ignored. |
1.8.1.1