1ldns(3)                    Library Functions Manual                    ldns(3)
2
3
4

NAME

6       ldns_duration_type, ldns_duration_create, ldns_duration_cre‐
7       ate_from_string, ldns_duration_cleanup, ldns_duration_compare,
8       ldns_duration2string, ldns_duration2time - duration type and related
9       functions
10
11

SYNOPSIS

13       #include <stdint.h>
14       #include <stdbool.h>
15
16       #include <ldns/ldns.h>
17
18       ldns_duration_type* ldns_duration_create(void);
19
20       ldns_duration_type* ldns_duration_create_from_string(const char* str);
21
22       void ldns_duration_cleanup(ldns_duration_type* duration);
23
24       int ldns_duration_compare(const ldns_duration_type* d1, const
25       ldns_duration_type* d2);
26
27       char* ldns_duration2string(const ldns_duration_type* duration);
28
29       time_t ldns_duration2time(const ldns_duration_type* duration);
30

DESCRIPTION

32       ldns_duration_type
33              Duration.
34
35              struct ldns_duration_struct
36              {
37                  time_t years;
38                  time_t months;
39                  time_t weeks;
40                  time_t days;
41                  time_t hours;
42                  time_t minutes;
43                  time_t seconds;
44              };
45
46              typedef struct ldns_duration_struct ldns_duration_type;
47
48       ldns_duration_create() Create a new 'instant' duration.
49              Returns ldns_duration_type* created duration
50
51
52       ldns_duration_create_from_string() Create a duration from string.
53              str: string-format duration
54              Returns ldns_duration_type* created duration
55
56
57       ldns_duration_cleanup() Clean up duration.
58              duration: duration to be cleaned up
59
60
61       ldns_duration_compare() Compare durations.
62              d1: one duration
63              d2: another duration
64              Returns int 0 if equal, -1 if d1 < d2, 1 if d2 < d1
65
66
67       ldns_duration2string() Convert a duration to a string.
68              duration: duration to be converted
69              Returns char* string-format duration
70
71
72       ldns_duration2time() Convert a duration to a time.
73              duration: duration to be converted
74              Returns time_t time-format duration
75
76

AUTHOR

78       The ldns team at NLnet Labs. Which consists out of Jelte Jansen and
79       Miek Gieben.
80
81

REPORTING BUGS

83       Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
84       http://www.nlnetlabs.nl/bugs/index.html
85
86
88       Copyright (c) 2004 - 2006 NLnet Labs.
89
90       Licensed under the BSD License. There is NO warranty; not even for MER‐
91       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
92

SEE ALSO

94       perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
95

REMARKS

97       This manpage was automatically generated from the ldns source code by
98       use of Doxygen and some perl.
99
100
101
102                                  30 May 2006                          ldns(3)
Impressum