MCPcopy Create free account
hub / github.com/defold/defold / WriteCanonicalRecord

Function WriteCanonicalRecord

engine/dlib/src/dlib/mdns.cpp:958–966  ·  view source on GitHub ↗

Writes a canonical record header plus already-encoded rdata. Probes and responses both use this so SRV/TXT bytes are built in one place.

Source from the content-addressed store, hash-verified

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)

Callers 3

WriteRecordAFunction · 0.85
BuildResponseMessageFunction · 0.85
BuildProbeMessageFunction · 0.85

Calls 2

WriteRecordHeaderFunction · 0.85
WriteRecordDataFunction · 0.85

Tested by

no test coverage detected