summaryrefslogtreecommitdiff
path: root/test/dns-proto-test.cc
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2022-01-10 13:52:00 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2022-01-10 13:52:16 +0900
commit450be02682da219c984870e56ac2c3098efbe68a (patch)
tree9d63f8326e88f5cd4b623309eb0ac4a918511d90 /test/dns-proto-test.cc
parentbff27be9aa171a5afc25df79cd652337aa1ecbb0 (diff)
downloadc-ares-450be02682da219c984870e56ac2c3098efbe68a.tar.gz
c-ares-450be02682da219c984870e56ac2c3098efbe68a.tar.bz2
c-ares-450be02682da219c984870e56ac2c3098efbe68a.zip
Imported Upstream version 1.18.1upstream/1.18.1
Change-Id: I5e47fe8a8445aff4c3382d9f334bd8a976ae15dd
Diffstat (limited to 'test/dns-proto-test.cc')
-rw-r--r--test/dns-proto-test.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/dns-proto-test.cc b/test/dns-proto-test.cc
index 0c36a0c..3dadeee 100644
--- a/test/dns-proto-test.cc
+++ b/test/dns-proto-test.cc
@@ -9,8 +9,8 @@ namespace test {
TEST(DNSProto, EncodeQuestions) {
DNSPacket pkt;
pkt.set_qid(0x1234).set_response().set_aa()
- .add_question(new DNSQuestion("example.com.", ns_t_a))
- .add_question(new DNSQuestion("www.example.com", ns_t_aaaa, ns_c_chaos));
+ .add_question(new DNSQuestion("example.com.", T_A))
+ .add_question(new DNSQuestion("www.example.com", T_AAAA, C_CHAOS));
std::vector<byte> data = {
0x12, 0x34, // qid
@@ -42,7 +42,7 @@ TEST(DNSProto, EncodeSingleNameAnswers) {
pkt.qid_ = 0x1234;
pkt.response_ = true;
pkt.aa_ = true;
- pkt.opcode_ = ns_o_query;
+ pkt.opcode_ = O_QUERY;
pkt.add_answer(new DNSCnameRR("example.com", 0x01020304, "other.com."));
pkt.add_auth(new DNSPtrRR("www.example.com", 0x01020304, "www.other.com"));
@@ -87,7 +87,7 @@ TEST(DNSProto, EncodeAddressAnswers) {
pkt.qid_ = 0x1234;
pkt.response_ = true;
pkt.aa_ = true;
- pkt.opcode_ = ns_o_query;
+ pkt.opcode_ = O_QUERY;
std::vector<byte> addrv4 = {0x02, 0x03, 0x04, 0x05};
pkt.add_answer(new DNSARR("example.com", 0x01020304, addrv4));
byte addrv6[16] = {0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02,