1ldns(3) Library Functions Manual ldns(3)
2
3
4
6 ldns_duration_type, ldns_duration_create, ldns_duration_cre‐
7 ate_from_string, ldns_duration_cleanup, ldns_duration_compare, ldns_du‐
8 ration2string, ldns_duration2time - duration type and related functions
9
10
12 #include <stdint.h>
13 #include <stdbool.h>
14
15 #include <ldns/ldns.h>
16
17 ldns_duration_type* ldns_duration_create(void);
18
19 ldns_duration_type* ldns_duration_create_from_string(const char* str);
20
21 void ldns_duration_cleanup(ldns_duration_type* duration);
22
23 int ldns_duration_compare(const ldns_duration_type* d1, const ldns_du‐
24 ration_type* d2);
25
26 char* ldns_duration2string(const ldns_duration_type* duration);
27
28 time_t ldns_duration2time(const ldns_duration_type* duration);
29
31 ldns_duration_type
32 Duration.
33
34 struct ldns_duration_struct
35 {
36 time_t years;
37 time_t months;
38 time_t weeks;
39 time_t days;
40 time_t hours;
41 time_t minutes;
42 time_t seconds;
43 };
44
45 typedef struct ldns_duration_struct ldns_duration_type;
46
47 ldns_duration_create() Create a new 'instant' duration.
48 Returns ldns_duration_type* created duration
49
50
51 ldns_duration_create_from_string() Create a duration from string.
52 str: string-format duration
53 Returns ldns_duration_type* created duration
54
55
56 ldns_duration_cleanup() Clean up duration.
57 duration: duration to be cleaned up
58
59
60 ldns_duration_compare() Compare durations.
61 d1: one duration
62 d2: another duration
63 Returns int 0 if equal, -1 if d1 < d2, 1 if d2 < d1
64
65
66 ldns_duration2string() Convert a duration to a string.
67 duration: duration to be converted
68 Returns char* string-format duration
69
70
71 ldns_duration2time() Convert a duration to a time.
72 duration: duration to be converted
73 Returns time_t time-format duration
74
75
77 The ldns team at NLnet Labs.
78
79
81 Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
82 http://www.nlnetlabs.nl/bugs/index.html
83
84
86 Copyright (c) 2004 - 2006 NLnet Labs.
87
88 Licensed under the BSD License. There is NO warranty; not even for MER‐
89 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
90
92 perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035.
93
95 This manpage was automatically generated from the ldns source code.
96
97
98
99 30 May 2006 ldns(3)