---
name: "ldns_getaddrinfo"
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_getaddrinfo"
---

# ldns\_getaddrinfo(3)

mimic libc getaddrinfo

## NAME

ldns\_getaddrinfo - mimic libc getaddrinfo

## SYNOPSIS

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

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

uint16\_t ldns\_getaddrinfo(ldns\_resolver \*res, const ldns\_rdf \*node, ldns\_rr\_class c, ldns\_rr\_list \*\*list);

## DESCRIPTION

*ldns\_getaddrinfo*() This function is a wrapper function for ldns\_get\_rr\_list\_name\_by\_addr and ldns\_get\_rr\_list\_addr\_by\_name. It's name is from the getaddrinfo()  library call. It tries to mimic that call, but without the lowlevel stuff. .br **res**: The resolver. If this value is NULL then a resolver will be created by ldns\_getaddrinfo. .br **node**: the name or ip address to look up .br **c**: the class to look in .br **list**: put the found RR's in this list .br Returns the number of RR found.

## 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

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

## REMARKS

This manpage was automatically generated from the ldns source code.
