Writes a canonical record header plus already-encoded rdata. Probes and responses both use this so SRV/TXT bytes are built in one place.
| 956 | // Writes a canonical record header plus already-encoded rdata. Probes and |
| 957 | // responses both use this so SRV/TXT bytes are built in one place. |
| 958 | static bool WriteCanonicalRecord(uint8_t* buffer, uint32_t buffer_size, uint32_t* offset, |
| 959 | const char* name, uint16_t type, uint16_t klass, uint32_t ttl, |
| 960 | const uint8_t* rdata, uint16_t rdlength) |
| 961 | { |
| 962 | if (!WriteRecordHeader(buffer, buffer_size, offset, name, type, klass, ttl, rdlength)) |
| 963 | return false; |
| 964 | |
| 965 | return WriteRecordData(buffer, buffer_size, offset, rdata, rdlength); |
| 966 | } |
| 967 | |
| 968 | static bool WriteRecordPtr(uint8_t* buffer, uint32_t buffer_size, uint32_t* offset, |
| 969 | const char* service_type_local, const char* full_service_name, uint32_t ttl) |
no test coverage detected