---
name: "getdns_list_create"
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_create"
---

# getdns\_list\_create(3)

## NAME

**getdns\_list,** **getdns\_list\_create,** **getdns\_list\_create\_with\_extended\_memory\_functions,** **getdns\_list\_create\_with\_memory\_functions,** **getdns\_list\_destroy** -- getdns list create and destroy routines

## LIBRARY

DNS Resolver library (libgetdns, -lgetdns)

## SYNOPSIS

\#include \<getdns.h\>

getdns\_list \* \
 **getdns\_list\_create** ()

getdns\_list \*\
 **getdns\_list\_create\_with\_extended\_memory\_functions**

(void \*userarg,\
 void \*(\*malloc)(void \*userarg, size\_t sz),\
 void \*(\*realloc)(void \*userarg, void \*buf, size\_t sz),\
 void (\*free)(void \*userarg, void \*buf)

getdns\_list \*\
 **getdns\_list\_create\_with\_memory\_functions**

(void \*userarg,\
 void \*(\*malloc)(size\_t sz),\
 void \*(\*realloc)(void \*buf, size\_t sz),\
 void (\*free)(void \*buf)

void \
 **getdns\_list\_destroy** (getdns\_list \*this\_dict)

## DESCRIPTION

The getdns\_list type is used to manage heterogeneous indexed lists name/value pairs in which the data types of the values include

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

The destroy function performs a "deep" destroy, freeing storage for all of the members of the list before destroying the list.  There are a number of helper functions that provide access to the list object, see their respective man pages.

*userarg* pass this argument to the user specified memory management functions for operations on lists created using extended memory functions

*this\_list* the list to destroy

## RETURN VALUES

Upon successful completion the getdns\_list\_create function returns a valid (empty)  list structure that should be freed via a call to getdns\_list\_destroy.  If a parameter in invalid or in the event of some error getdns\_list\_create returns NULL.

## EXAMPLES

TBD

## SEE ALSO

[**libgetdns**(3)](/libgetdns/3.md), [**getdns\_dict**(3)](/getdns_dict/3.md), [**getdns\_list\_get**(3)](/getdns_list_get/3.md), [**getdns\_list\_set**(3)](/getdns_list_set/3.md)
