Remove offsets from the dns_name and dns_fixedname structures
The offsets were meant to speed-up the repeated dns_name operations, but it was experimentally proven that there's actually no real-world benefit. Remove the offsets and labels fields from the dns_name and the static offsets fields to save 128 bytes from the fixedname in favor of calculating labels and offsets only when needed.
This commit is contained in:
@@ -650,10 +650,8 @@ There are three methods for copying name objects:
|
||||
a buffer.
|
||||
|
||||
- `dns_name_dup()` copies a name into a new name object, dynamically
|
||||
allocating buffer space as needed. `dns_name_dupwithoffsets()` does
|
||||
the same, but also dynamically allocates space for the copied offset
|
||||
table. Targets created by these functions must be freed by calling
|
||||
`dns_name_free()`.
|
||||
allocating buffer space as needed. Target created by this function
|
||||
must be freed by calling `dns_name_free()`.
|
||||
|
||||
##### Wire format
|
||||
|
||||
|
||||
Reference in New Issue
Block a user