---
name: "ldns_native2rdf_int8"
section: "3"
platform: "linux"
package: "ldns"
version: "1.9.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ldns_native2rdf_int8"
---

# ldns\_native2rdf\_int8(3)

rdf numeric conversion functions

## NAME

ldns\_native2rdf\_int8, ldns\_native2rdf\_int16, ldns\_native2rdf\_int32, ldns\_native2rdf\_int16\_data, ldns\_rdf2native\_int8, ldns\_rdf2native\_int16, ldns\_rdf2native\_int32, ldns\_rdf2native\_sockaddr\_storage, ldns\_rdf2native\_time\_t - rdf numeric conversion functions

## SYNOPSIS

\#include \<stdint.h\>\
 \#include \<stdbool.h\>\

\#include \<ldns/ldns.h\>

ldns\_rdf\* ldns\_native2rdf\_int8(ldns\_rdf\_type type, uint8\_t value);

ldns\_rdf\* ldns\_native2rdf\_int16(ldns\_rdf\_type type, uint16\_t value);

ldns\_rdf\* ldns\_native2rdf\_int32(ldns\_rdf\_type type, uint32\_t value);

ldns\_rdf\* ldns\_native2rdf\_int16\_data(size\_t size, uint8\_t \*data);

uint8\_t ldns\_rdf2native\_int8(const ldns\_rdf \*rd);

uint16\_t ldns\_rdf2native\_int16(const ldns\_rdf \*rd);

uint32\_t ldns\_rdf2native\_int32(const ldns\_rdf \*rd);

struct sockaddr\_storage \* ldns\_rdf2native\_sockaddr\_storage(const ldns\_rdf \*rd, uint16\_t port, size\_t \*size);

time\_t ldns\_rdf2native\_time\_t(const ldns\_rdf \*rd);

## DESCRIPTION

*ldns\_native2rdf\_int8*() returns the rdf containing the native uint8\_t repr. .br **type**: the ldns\_rdf type to use .br **value**: the uint8\_t to use .br Returns ldns\_rdf\* with the converted value

*ldns\_native2rdf\_int16*() returns the rdf containing the native uint16\_t representation. .br **type**: the ldns\_rdf type to use .br **value**: the uint16\_t to use .br Returns ldns\_rdf\* with the converted value

*ldns\_native2rdf\_int32*() returns an rdf that contains the given int32 value.

Because multiple rdf types can contain an int32, the type must be specified .br **type**: the ldns\_rdf type to use .br **value**: the uint32\_t to use .br Returns ldns\_rdf\* with the converted value

*ldns\_native2rdf\_int16\_data*() returns an int16\_data rdf that contains the data in the given array, preceded by an int16 specifying the length.

The memory is copied, and an LDNS\_RDF\_TYPE\_INT16DATA is returned .br **size**: the size of the data .br **\*data**: pointer to the actual data

.br Returns ldns\_rd\* the rdf with the data

*ldns\_rdf2native\_int8*() returns the native uint8\_t representation from the rdf. .br **rd**: the ldns\_rdf to operate on .br Returns uint8\_t the value extracted

*ldns\_rdf2native\_int16*() returns the native uint16\_t representation from the rdf. .br **rd**: the ldns\_rdf to operate on .br Returns uint16\_t the value extracted

*ldns\_rdf2native\_int32*() returns the native uint32\_t representation from the rdf. .br **rd**: the ldns\_rdf to operate on .br Returns uint32\_t the value extracted

*ldns\_rdf2native\_sockaddr\_storage*() returns the native sockaddr representation from the rdf. .br **rd**: the ldns\_rdf to operate on .br **port**: what port to use. 0 means; use default (53) .br **size**: what is the size of the sockaddr\_storage .br Returns struct sockaddr\* the address in the format so other functions can use it (sendto)

*ldns\_rdf2native\_time\_t*() returns the native time\_t representation from the rdf. .br **rd**: the ldns\_rdf to operate on .br Returns time\_t the value extracted (32 bits currently)

## AUTHOR

The ldns team at NLnet Labs.

## REPORTING BUGS

Please report bugs to dns-team@nlnetlabs.nl or on GitHub at https://github.com/NLnetLabs/ldns/issues

## COPYRIGHT

Copyright (c) 2004 - 2006 NLnet Labs.

Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

## SEE ALSO

*ldns\_rdf*. And **perldoc Net::DNS**, **RFC1034**, **RFC1035**, **RFC4033**, **RFC4034**  and **RFC4035**.

## REMARKS

This manpage was automatically generated from the ldns source code.
