mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-18 04:10:54 -04:00
Add dns_name_dupwithoffsets().
This commit is contained in:
parent
63c8c8f2a1
commit
18a4aa1dc8
1 changed files with 19 additions and 0 deletions
|
|
@ -197,6 +197,7 @@ struct dns_name {
|
|||
#define DNS_NAMEATTR_ABSOLUTE 0x0001
|
||||
#define DNS_NAMEATTR_READONLY 0x0002
|
||||
#define DNS_NAMEATTR_DYNAMIC 0x0004
|
||||
#define DNS_NAMEATTR_DYNOFFSETS 0x0008
|
||||
/*
|
||||
* Attributes below 0x0100 reserved for name.c usage.
|
||||
*/
|
||||
|
|
@ -1034,6 +1035,24 @@ dns_name_dup(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target);
|
|||
* 'mctx' is a valid memory context.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_name_dupwithoffsets(dns_name_t *source, isc_mem_t *mctx,
|
||||
dns_name_t *target);
|
||||
/*
|
||||
* Make 'target' a read-only dynamically allocated copy of 'source'.
|
||||
* 'target' will also have a dynamically allocated offsets table.
|
||||
*
|
||||
* Requires:
|
||||
*
|
||||
* 'source' is a valid non-empty name.
|
||||
*
|
||||
* 'target' is a valid name that is not read-only.
|
||||
*
|
||||
* 'target' has no offsets table.
|
||||
*
|
||||
* 'mctx' is a valid memory context.
|
||||
*/
|
||||
|
||||
void
|
||||
dns_name_free(dns_name_t *name, isc_mem_t *mctx);
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue