ldns_pkt_set_answerfrom(3)

ldns_pkt_set_answerfrom3

Set ldns_pkt attributes

Usage

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

#include <ldns/ldns.h>

bool ldns_pkt_set_flags(ldns_pkt *pkt, uint16_t flags);

void ldns_pkt_set_id(ldns_pkt *p, uint16_t id);

void ldns_pkt_set_qr(ldns_pkt *p, bool b);

void ldns_pkt_set_aa(ldns_pkt *p, bool b);

void ldns_pkt_set_tc(ldns_pkt *p, bool b);

void ldns_pkt_set_rd(ldns_pkt *p, bool b);

void ldns_pkt_set_cd(ldns_pkt *p, bool b);

void ldns_pkt_set_ra(ldns_pkt *p, bool b);

void ldns_pkt_set_ad(ldns_pkt *p, bool b);

void ldns_pkt_set_opcode(ldns_pkt *p, ldns_pkt_opcode c);

void ldns_pkt_set_rcode(ldns_pkt *p, uint8_t c);

void ldns_pkt_set_qdcount(ldns_pkt *p, uint16_t c);

void ldns_pkt_set_ancount(ldns_pkt *p, uint16_t c);

void ldns_pkt_set_nscount(ldns_pkt *p, uint16_t c);

void ldns_pkt_set_arcount(ldns_pkt *p, uint16_t c);

void ldns_pkt_set_answerfrom(ldns_pkt *p, ldns_rdf *r);

void ldns_pkt_set_querytime(ldns_pkt *p, uint32_t t);

void ldns_pkt_set_size(ldns_pkt *p, size_t s);

void ldns_pkt_set_section_count(ldns_pkt *p, ldns_pkt_section s, uint16_t x);

void ldns_pkt_set_tsig(ldns_pkt *p, ldns_rr *t);

Overview

ldns_pkt_set_flags() sets the flags in a packet. .br pkt: the packet to operate on .br flags: ORed values: LDNS_QR| LDNS_AR for instance .br Returns true on success otherwise false

ldns_pkt_set_id() Set the packet's id .br p: the packet .br id: the id to set

ldns_pkt_set_qr() Set the packet's qr bit .br p: the packet .br b: the value to set (boolean)

ldns_pkt_set_aa() Set the packet's aa bit .br p: the packet .br b: the value to set (boolean)

ldns_pkt_set_tc() Set the packet's tc bit .br p: the packet .br b: the value to set (boolean)

ldns_pkt_set_rd() Set the packet's rd bit .br p: the packet .br b: the value to set (boolean)

ldns_pkt_set_cd() Set the packet's cd bit .br p: the packet .br b: the value to set (boolean)

ldns_pkt_set_ra() Set the packet's ra bit .br p: the packet .br b: the value to set (boolean)

ldns_pkt_set_ad() Set the packet's ad bit .br p: the packet .br b: the value to set (boolean)

ldns_pkt_set_opcode() Set the packet's opcode .br p: the packet .br c: the opcode

ldns_pkt_set_rcode() Set the packet's response code .br p: the packet .br c: the rcode

ldns_pkt_set_qdcount() Set the packet's qd count .br p: the packet .br c: the count

ldns_pkt_set_ancount() Set the packet's an count .br p: the packet .br c: the count

ldns_pkt_set_nscount() Set the packet's ns count .br p: the packet .br c: the count

ldns_pkt_set_arcount() Set the packet's arcount .br p: the packet .br c: the count

ldns_pkt_set_answerfrom() Set the packet's answering server .br p: the packet .br r: the address

ldns_pkt_set_querytime() Set the packet's query time .br p: the packet .br t: the querytime in msec

ldns_pkt_set_size() Set the packet's size .br p: the packet .br s: the size

ldns_pkt_set_section_count() Set a packet's section count to x .br p: the packet .br s: the section .br x: the section count

ldns_pkt_set_tsig() Set the packet's tsig rr .br p: the packet .br t: the tsig rr

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.