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

NAME

6       ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32,
7       ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2na‐
8       tive_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage,
9       ldns_rdf2native_time_t - rdf numeric conversion functions
10
11

SYNOPSIS

13       #include <stdint.h>
14       #include <stdbool.h>
15
16       #include <ldns/ldns.h>
17
18       ldns_rdf* ldns_native2rdf_int8(ldns_rdf_type type, uint8_t value);
19
20       ldns_rdf* ldns_native2rdf_int16(ldns_rdf_type type, uint16_t value);
21
22       ldns_rdf* ldns_native2rdf_int32(ldns_rdf_type type, uint32_t value);
23
24       ldns_rdf* ldns_native2rdf_int16_data(size_t size, uint8_t *data);
25
26       uint8_t ldns_rdf2native_int8(const ldns_rdf *rd);
27
28       uint16_t ldns_rdf2native_int16(const ldns_rdf *rd);
29
30       uint32_t ldns_rdf2native_int32(const ldns_rdf *rd);
31
32        ldns_rdf2native_sockaddr_storage();
33
34       time_t ldns_rdf2native_time_t(const ldns_rdf *rd);
35

DESCRIPTION

37       ldns_native2rdf_int8() returns the rdf containing the native uint8_t
38              repr.
39              type: the ldns_rdf type to use
40              value: the uint8_t to use
41              Returns ldns_rdf* with the converted value
42
43       ldns_native2rdf_int16() returns the rdf containing the native uint16_t
44              representation.
45              type: the ldns_rdf type to use
46              value: the uint16_t to use
47              Returns ldns_rdf* with the converted value
48
49       ldns_native2rdf_int32() returns an rdf that contains the given int32
50              value.
51
52              Because multiple rdf types can contain an int32, the type must
53              be specified
54              type: the ldns_rdf type to use
55              value: the uint32_t to use
56              Returns ldns_rdf* with the converted value
57
58       ldns_native2rdf_int16_data() returns an int16_data rdf that contains
59              the data in the given array, preceded by an int16 specifying the
60              length.
61
62              The memory is copied, and an LDNS_RDF_TYPE_INT16DATA is returned
63              size: the size of the data
64              *data: pointer to the actual data
65
66              Returns ldns_rd* the rdf with the data
67
68       ldns_rdf2native_int8() returns the native uint8_t representation from
69              the rdf.
70              rd: the ldns_rdf to operate on
71              Returns uint8_t the value extracted
72
73       ldns_rdf2native_int16() returns the native uint16_t representation from
74              the rdf.
75              rd: the ldns_rdf to operate on
76              Returns uint16_t the value extracted
77
78       ldns_rdf2native_int32() returns the native uint32_t representation from
79              the rdf.
80              rd: the ldns_rdf to operate on
81              Returns uint32_t the value extracted
82
83       ldns_rdf2native_sockaddr_storage()
84
85       ldns_rdf2native_time_t() returns the native time_t representation from
86              the rdf.
87              rd: the ldns_rdf to operate on
88              Returns time_t the value extracted (32 bits currently)
89

AUTHOR

91       The ldns team at NLnet Labs.
92
93

REPORTING BUGS

95       Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at
96       http://www.nlnetlabs.nl/bugs/index.html
97
98
100       Copyright (c) 2004 - 2006 NLnet Labs.
101
102       Licensed under the BSD License. There is NO warranty; not even for MER‐
103       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
104
105

SEE ALSO

107       ldns_rdf.  And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034
108       and RFC4035.
109

REMARKS

111       This manpage was automatically generated from the ldns source code.
112
113
114
115                                  30 May 2006                          ldns(3)
Impressum