NAME 字段在 RFC 1035 第 4.1.3 节中没有详细说明。
我想(以编程方式)了解 ANSWER 消息类型的此字段,并为此搜索了这些资源(数据表)。
我遵循了:
我错过了什么吗?
伪代码:
题:
byte[]{
0x00,0x00,
0x01,0x00,
0x00,0x02,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x03,0x77,0x77,0x77,
0x12,0x74,0x68,0x65,0x5f,0x70,0x61,0x63,0x6b,0x65,0x74,0x67,0x65,0x65,0x6b,
0x03,0x63,0x6f,0x6d,
0x00,
0x00,0x01,
0x00,0x01,
0x13,0x74,0x74,0x68,0x65,0x5f,0x70,0x61,0x63,0x6b,0x65,0x74,0x67,0x65,0x65,0x6b,
0x03,0x63,0x6f,0x6d,
0x00,
0x00,0x01,
0x00,0x01
}
Run Code Online (Sandbox Code Playgroud)
回答:
byte[]{
0x00,0x00,
0x81,0x80,
0x00,0x02,
0x00,0x01,
0x00,0x00,
0x00,0x00,
0x03,0x77,0x77,0x77,
0x12,0x74,0x68,0x65,0x5f,0x70,0x61,0x63,0x6b,0x65,0x74,0x67,0x65,0x65,0x6b,
0x03,0x63,0x6f,0x6d,
0x00,
0x00,0x01,
0x00,0x01,
0x13,0x74,0x74,0x68,0x65,0x5f,0x70,0x61,0x63,0x6b,0x65,0x74,0x67,0x65,0x65,0x6b,
0x03,0x63,0x6f,0x6d,
0x00,
0x00,0x01,
0x00,0x01,
0xC0,0x0C, <----- answer start here , i want to understand this value
0x00,0x00,
0x00,0x00,0x06,0xcf,
0x00,0x04,
0x07,0x00,0x00,0x01
Run Code Online (Sandbox Code Playgroud)