25 #ifndef _GVMD_MANAGE_UTILS_H 26 #define _GVMD_MANAGE_UTILS_H 32 #include <libical/ical.h> 36 #define SEVERITY_LOG 0.0 38 #define SEVERITY_FP -1.0 40 #define SEVERITY_DEBUG -2.0 42 #define SEVERITY_ERROR -3.0 44 #define SEVERITY_MISSING -99.0 46 #define SEVERITY_UNDEFINED -98.0 48 #define SEVERITY_MAX 10.0 50 #define SEVERITY_SUBDIVISIONS 10 59 next_time (time_t,
int,
int,
int,
const char *,
int);
time_t add_months(time_t time, int months)
Add months to a time.
Definition: manage_utils.c:295
long current_offset(const char *zone)
Get the current offset from UTC of a timezone.
Definition: manage_utils.c:138
int hosts_str_contains(const char *hosts_str, const char *find_host_str, int max_hosts)
Returns whether a host has an equal host in a hosts string.
Definition: manage_utils.c:728
time_t icalendar_next_time_from_string(const char *ical_string, const char *default_tzid, int periods_offset)
Get the next or previous due time from a VCALENDAR string. The string must be a VCALENDAR simplified ...
Definition: manage_utils.c:1726
time_t next_time(time_t first, int period, int period_months, int byday, const char *zone, int periods_offset)
Calculate the next time from now given a start time and a period.
Definition: manage_utils.c:378
time_t icalendar_first_time_from_vcalendar(icalcomponent *vcalendar, const char *default_tzid)
Get the first time from a VCALENDAR component. The VCALENDAR must have simplified with icalendar_from...
Definition: manage_utils.c:1784
double level_max_severity(const char *level, const char *class)
Get the minimum severity for a severity level and class.
Definition: manage_utils.c:684
int manage_count_hosts_max(const char *given_hosts, const char *exclude_hosts, int max_hosts)
Return number of hosts described by a hosts string.
Definition: manage_utils.c:612
double level_min_severity(const char *level, const char *class)
Get the minimum severity for a severity level and class.
Definition: manage_utils.c:644
int parse_time(const gchar *string, int *seconds)
Try convert an OTP NVT tag time string into epoch time.
Definition: manage_utils.c:505
icalcomponent * icalendar_from_old_schedule_data(time_t first_time, time_t period, time_t period_months, time_t duration, int byday_mask, const char *zone)
Create an iCalendar component from old schedule data.
Definition: manage_utils.c:841
int icalendar_duration_from_vcalendar(icalcomponent *vcalendar)
Get the duration VCALENDAR component. The VCALENDAR must have simplified with icalendar_from_string f...
Definition: manage_utils.c:1750
icalcomponent * icalendar_from_string(const char *ical_string, gchar **error)
Creates a new, simplified VCALENDAR component from a string.
Definition: manage_utils.c:1146
int valid_db_resource_type(const char *type)
Check whether a resource type table name is valid.
Definition: manage_utils.c:758
time_t icalendar_next_time_from_vcalendar(icalcomponent *vcalendar, const char *default_tzid, int periods_offset)
Get the next or previous due time from a VCALENDAR component. The VCALENDAR must have simplified with...
Definition: manage_utils.c:1648
int icalendar_approximate_rrule_from_vcalendar(icalcomponent *vcalendar, time_t *period, time_t *period_months, int *byday_mask)
Approximate the recurrence of a VCALENDAR as classic schedule data. The VCALENDAR must have simplifie...
Definition: manage_utils.c:1323