5#ifndef BITCOIN_SEEDER_TEST_DNS_UTIL_H
6#define BITCOIN_SEEDER_TEST_DNS_UTIL_H
14static std::vector<uint8_t>
16 std::vector<uint8_t> nameField;
18 size_t labelIndex = 0;
19 while (i < queryName.size()) {
20 if (queryName[i] ==
'.') {
22 nameField.push_back(i - labelIndex);
23 while (labelIndex < i) {
24 nameField.push_back(queryName[labelIndex]);
32 nameField.push_back(i - labelIndex);
33 while (labelIndex < i) {
34 nameField.push_back(queryName[labelIndex]);
static std::vector< uint8_t > CreateDNSQuestionNameField(const std::string &queryName)
static const uint8_t END_OF_NAME_FIELD