src/net/dns/record_rdata_unittest.cc
// Writes a dns_extensions ESNIRecord block containing given the address
// set to |writer|. This involves:
// - writing the 16-bit length prefix for the dns_extensions block
// - writing the 16-bit extension type (0x1001 "address_set")
// - writing the 16-bit length prefix for the address set extension
// - writing the extension itself
Writes a dns_extensions ESNIRecord block containing given the address
set to |writer|. This involves:
writing the 16-bit length prefix for the dns_extensions block
writing the 16-bit extension type (0x1001 "address_set")
writing the 16-bit length prefix for the address set extension
writing the extension itself
Writes a dns_extensions ESNIRecord block containing given the address set to |writer| . This involves : writing the 16 - bit length prefix for the dns_extensions block writing the 16 - bit extension type ( 0x1001 " address_set " ) writing the 16 - bit length prefix for the address set extension writing the extension itself
void AppendDnsExtensionsBlock(base::BigEndianWriter* writer,
                              const std::vector<uint8_t>& address_list) {
  CHECK(writer);
  writer->WriteU16(4 +
                   address_list.size());  
  writer->WriteU16(EsniRecordRdata::kAddressSetExtensionType);
  writer->WriteU16(address_list.size());  
  writer->WriteBytes(address_list.data(), address_list.size());
}
void AppendDnsExtensionsBlock ( base :: BigEndianWriter * writer , const std :: vector < uint8_t > & address_list ) { CHECK ( writer ) ; writer -> WriteU16 ( 4 + address_list . size ( ) ) ; writer -> WriteU16 ( EsniRecordRdata :: kAddressSetExtensionType ) ; writer -> WriteU16 ( address_list . size ( ) ) ; writer -> WriteBytes ( address_list . data ( ) , address_list . size ( ) ) ; }
Writes a dns_extensions ESNIRecord block containing given the address
set to |writer|.
Writes a dns_extensions ESNIRecord block containing given the address set to |writer| .
// 2 bytes for the DNS extension type // length of the dns_extensions field // length of the address set