---
name: "getdns_list_get"
section: "3"
platform: "linux"
package: "getdns"
version: "1.7.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/getdns_list_get"
---

# getdns\_list\_get(3)

## NAME

**getdns\_list\_get,** **getdns\_list\_get\_bindata,** **getdns\_list\_get\_data\_type,** **getdns\_list\_get\_dict,** **getdns\_list\_get\_length,** **getdns\_list\_get\_list,** **getdns\_list\_get\_int** -- get a value by index from a getdns list

## LIBRARY

DNS Resolver library (libgetdns, -lgetdns)

## SYNOPSIS

\#include \<getdns.h\>

getdns\_return\_t \
 **getdns\_list\_get\_bindata** (getdns\_list \*this\_list,

size\_t index,\
 getdns\_bindata \*\*answer)

getdns\_return\_t \
 **getdns\_list\_get\_data\_type** (getdns\_list \*this\_list,

size\_t index,\
 getdns\_data\_type \*answer)

getdns\_return\_t\
 **getdns\_list\_get\_dict** (getdns\_list \*this\_list,

size\_t index,\
 getdns\_dict \*\*answer)

getdns\_return\_t \
 **getdns\_list\_get\_length** (getdns\_list \*this\_list,

size\_t \*answer)

getdns\_return\_t \
 **getdns\_list\_get\_list** (getdns\_list \*this\_list,

size\_t index,\
 getdns\_list \*\*answer)

getdns\_return\_t \
 **getdns\_list\_get\_int** (getdns\_list \*this\_list,

size\_t index,\
 uint32\_t \*answer)

## DESCRIPTION

The getdns\_list type is used to manage heterogeneous lists in which the objects are each one of the data types:

getdns\_bindata\
 getdns\_dict\
 getdns\_list\
 uint32\_t

*this\_list* the list from which to retrieve the object

*index* the numeric index (0 based) of the item in the list you would like copied to answer

*answer* a copy of the object in the list is placed in answer, the caller is responsible for freeing the storage associated with that object by calling the appropriate destroy function.

## RETURN VALUES

Upon successful completion the functions return **GETDNS\_RETURN\_GOOD** , otherwise the following error values are returned:

**GETDNS\_RETURN\_GENERIC\_ERROR** if this\_list is not a valid list

**GETDNS\_RETURN\_NO\_SUCH\_LIST\_ITEM** if index is out of range

**GETDNS\_RETURN\_WRONG\_TYPE\_REQUESTED** if the requested data type doesn't match the contents of the indexed argument

## EXAMPLES

TBD

## SEE ALSO

[**libgetdns**(3)](/libgetdns/3.md), [**getdns\_address**(3)](/getdns_address/3.md), [**getdns\_dict**(3)](/getdns_dict/3.md), [**getdns\_general**(3)](/getdns_general/3.md), [**getdns\_hostname**(3)](/getdns_hostname/3.md), [**getdns\_service**(3)](/getdns_service/3.md),
