ldns_pkt_additional(3)

ldns_pkt_additional3

Get ldns_pkt attributes

Usage

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

#include <ldns/ldns.h>

ldns_pkt_id();

bool ldns_pkt_qr(const ldns_pkt *p);

bool ldns_pkt_aa(const ldns_pkt *p);

bool ldns_pkt_tc(const ldns_pkt *p);

bool ldns_pkt_rd(const ldns_pkt *p);

bool ldns_pkt_cd(const ldns_pkt *p);

bool ldns_pkt_ra(const ldns_pkt *p);

bool ldns_pkt_ad(const ldns_pkt *p);

ldns_pkt_opcode ldns_pkt_get_opcode(const ldns_pkt *p);

ldns_pkt_rcode ldns_pkt_get_rcode(const ldns_pkt *p);

uint16_t ldns_pkt_qdcount(const ldns_pkt *p);

uint16_t ldns_pkt_ancount(const ldns_pkt *p);

uint16_t ldns_pkt_nscount(const ldns_pkt *p);

uint16_t ldns_pkt_arcount(const ldns_pkt *p);

ldns_rdf* ldns_pkt_answerfrom(const ldns_pkt *p);

uint32_t ldns_pkt_querytime(const ldns_pkt *p);

size_t ldns_pkt_size(const ldns_pkt *p);

ldns_rr* ldns_pkt_tsig(const ldns_pkt *p);

ldns_rr_list* ldns_pkt_question(const ldns_pkt *p);

ldns_rr_list* ldns_pkt_answer(const ldns_pkt *p);

ldns_rr_list* ldns_pkt_authority(const ldns_pkt *p);

ldns_rr_list* ldns_pkt_additional(const ldns_pkt *p);

ldns_rr_list* ldns_pkt_get_section_clone(const ldns_pkt *p, ldns_pkt_section s);

ldns_rr_list* ldns_pkt_rr_list_by_name(const ldns_pkt *p, const ldns_rdf *r, ldns_pkt_section s);

ldns_rr_list* ldns_pkt_rr_list_by_type(const ldns_pkt *p, ldns_rr_type t, ldns_pkt_section s);

ldns_rr_list* ldns_pkt_rr_list_by_name_and_type(const ldns_pkt *packet, const ldns_rdf *ownername, ldns_rr_type type, ldns_pkt_section sec);

Overview

ldns_pkt_id()

ldns_pkt_qr() Read the packet's qr bit .br p: the packet .br Returns value of the bit

ldns_pkt_aa() Read the packet's aa bit .br p: the packet .br Returns value of the bit

ldns_pkt_tc() Read the packet's tc bit .br p: the packet .br Returns value of the bit

ldns_pkt_rd() Read the packet's rd bit .br p: the packet .br Returns value of the bit

ldns_pkt_cd() Read the packet's cd bit .br p: the packet .br Returns value of the bit

ldns_pkt_ra() Read the packet's ra bit .br p: the packet .br Returns value of the bit

ldns_pkt_ad() Read the packet's ad bit .br p: the packet .br Returns value of the bit

ldns_pkt_get_opcode() Read the packet's code .br p: the packet .br Returns the opcode

ldns_pkt_get_rcode() Return the packet's response code .br p: the packet .br Returns the response code

ldns_pkt_qdcount() Return the packet's qd count .br p: the packet .br Returns the qd count

ldns_pkt_ancount() Return the packet's an count .br p: the packet .br Returns the an count

ldns_pkt_nscount() Return the packet's ns count .br p: the packet .br Returns the ns count

ldns_pkt_arcount() Return the packet's ar count .br p: the packet .br Returns the ar count

ldns_pkt_answerfrom() Return the packet's answerfrom .br p: packet .br Returns the name of the server

ldns_pkt_querytime() Return the packet's querytime .br p: the packet .br Returns the querytime

ldns_pkt_size() Return the packet's size in bytes .br p: the packet .br Returns the size

ldns_pkt_tsig() Return the packet's tsig pseudo rr's .br p: the packet .br Returns the tsig rr

ldns_pkt_question() Return the packet's question section .br p: the packet .br Returns the section

ldns_pkt_answer() Return the packet's answer section .br p: the packet .br Returns the section

ldns_pkt_authority() Return the packet's authority section .br p: the packet .br Returns the section

ldns_pkt_additional() Return the packet's additional section .br p: the packet .br Returns the section

ldns_pkt_get_section_clone() return all the rr_list's in the packet. Clone the lists, instead of returning pointers. .br p: the packet to look in .br s: what section(s) to return .br Returns ldns_rr_list with the rr's or NULL if none were found

ldns_pkt_rr_list_by_name() return all the rr with a specific name from a packet. Optionally specify from which section in the packet .br p: the packet .br r: the name .br s: the packet's section .br Returns a list with the rr's or NULL if none were found

ldns_pkt_rr_list_by_type() return all the rr with a specific type from a packet. Optionally specify from which section in the packet .br p: the packet .br t: the type .br s: the packet's section .br Returns a list with the rr's or NULL if none were found

ldns_pkt_rr_list_by_name_and_type() return all the rr with a specific type and type from a packet. Optionally specify from which section in the packet .br packet: the packet .br ownername: the name .br type: the type .br sec: the packet's section .br Returns a list with the rr's or NULL if none were found

Remarks

This manpage was automatically generated from the ldns source code.

Releases

10 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0–7
  3. 8
  4. 9–10
  5. 11
  6. 12
  7. 13–Arch

Author

The ldns team at NLnet Labs.

Reporting bugs

Please report bugs to [email protected] or on GitHub at https://github.com/NLnetLabs/ldns/issues

From ldns 1.9.2-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.