Writes prebuilt rdata bytes after a record header. Probe construction uses this so the same canonical rdata can be shared between comparisons and I/O.
| 730 | // Writes prebuilt rdata bytes after a record header. Probe construction uses |
| 731 | // this so the same canonical rdata can be shared between comparisons and I/O. |
| 732 | static bool WriteRecordData(uint8_t* buffer, uint32_t buffer_size, uint32_t* offset, |
| 733 | const uint8_t* data, uint16_t data_length) |
| 734 | { |
| 735 | if (*offset + data_length > buffer_size) |
| 736 | return false; |
| 737 | |
| 738 | memcpy(buffer + *offset, data, data_length); |
| 739 | *offset += data_length; |
| 740 | return true; |
| 741 | } |
| 742 | |
| 743 | // Builds canonical SRV rdata once so probes, responses, and tiebreak |
| 744 | // comparisons all operate on the same byte representation. |
no outgoing calls
no test coverage detected