---
name: "ldns_rr_dnskey_set_algorithm"
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_rr_dnskey_set_algorithm"
---

# ldns\_rr\_dnskey\_set\_algorithm(3)

get and set DNSKEY RR rdata fields

## NAME

ldns\_rr\_dnskey\_flags, ldns\_rr\_dnskey\_set\_flags, ldns\_rr\_dnskey\_protocol, ldns\_rr\_dnskey\_set\_protocol, ldns\_rr\_dnskey\_algorithm, ldns\_rr\_dnskey\_set\_algorithm, ldns\_rr\_dnskey\_key, ldns\_rr\_dnskey\_set\_key - get and set DNSKEY RR rdata fields

## SYNOPSIS

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

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

ldns\_rdf\* ldns\_rr\_dnskey\_flags(const ldns\_rr \*r);

bool ldns\_rr\_dnskey\_set\_flags(ldns\_rr \*r, ldns\_rdf \*f);

ldns\_rdf\* ldns\_rr\_dnskey\_protocol(const ldns\_rr \*r);

bool ldns\_rr\_dnskey\_set\_protocol(ldns\_rr \*r, ldns\_rdf \*f);

ldns\_rdf\* ldns\_rr\_dnskey\_algorithm(const ldns\_rr \*r);

bool ldns\_rr\_dnskey\_set\_algorithm(ldns\_rr \*r, ldns\_rdf \*f);

ldns\_rdf\* ldns\_rr\_dnskey\_key(const ldns\_rr \*r);

bool ldns\_rr\_dnskey\_set\_key(ldns\_rr \*r, ldns\_rdf \*f);

## DESCRIPTION

*ldns\_rr\_dnskey\_flags*() returns the flags of a LDNS\_RR\_TYPE\_DNSKEY rr .br **r**: the resource record .br Returns a ldns\_rdf\* with the flags or NULL on failure

*ldns\_rr\_dnskey\_set\_flags*() sets the flags of a LDNS\_RR\_TYPE\_DNSKEY rr .br **r**: the rr to use .br **f**: the flags to set .br Returns true on success, false otherwise

*ldns\_rr\_dnskey\_protocol*() returns the protocol of a LDNS\_RR\_TYPE\_DNSKEY rr .br **r**: the resource record .br Returns a ldns\_rdf\* with the protocol or NULL on failure

*ldns\_rr\_dnskey\_set\_protocol*() sets the protocol of a LDNS\_RR\_TYPE\_DNSKEY rr .br **r**: the rr to use .br **f**: the protocol to set .br Returns true on success, false otherwise

*ldns\_rr\_dnskey\_algorithm*() returns the algorithm of a LDNS\_RR\_TYPE\_DNSKEY rr .br **r**: the resource record .br Returns a ldns\_rdf\* with the algorithm or NULL on failure

*ldns\_rr\_dnskey\_set\_algorithm*() sets the algorithm of a LDNS\_RR\_TYPE\_DNSKEY rr .br **r**: the rr to use .br **f**: the algorithm to set .br Returns true on success, false otherwise

*ldns\_rr\_dnskey\_key*() returns the key data of a LDNS\_RR\_TYPE\_DNSKEY rr .br **r**: the resource record .br Returns a ldns\_rdf\* with the key data or NULL on failure

*ldns\_rr\_dnskey\_set\_key*() sets the key data of a LDNS\_RR\_TYPE\_DNSKEY rr .br **r**: the rr to use .br **f**: the key data to set .br Returns true on success, false otherwise

## 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\_rr*. And **perldoc Net::DNS**, **RFC1034**, **RFC1035**, **RFC4033**, **RFC4034**  and **RFC4035**.

## REMARKS

This manpage was automatically generated from the ldns source code.
