I've seen the "header format" section of rfc 1035, but it only says that the id can be a random value. Now can this random value be a 0 or not, that's what I want to know.
我已经看过rfc 1035的“标题格式”部分,但它只说id可以是一个随机值。现在这个随机值是否为0,这就是我想知道的。
1 个解决方案
#1
RFC1035 makes no restriction on the transaction ID, except that it is 16 bits long, so 0 is perfectly fine. Whatever you send there will be copied to the response.
RFC1035对事务ID没有限制,除了它是16位长,所以0完全没问题。无论发送什么,都会被复制到响应中。
To further verify this, I have checked the source code of the resolvers below and they all seem to agree that all 16 bits of the ID are yours to take.
为了进一步验证这一点,我检查了下面解析器的源代码,他们似乎都同意ID的所有16位都是你的。
- Unbound: ID is any random value between 0 - 0xffff.
- ARSoft.Tools.Net: ID is any random value between 0 - 0xffff.
- Synapse (Delphi networking library): ID is any random value between 0 - 0xffff.
未绑定:ID是0 - 0xffff之间的任意随机值。
ARSoft.Tools.Net:ID是0到0xffff之间的任意随机值。
Synapse(Delphi网络库):ID是0到0xffff之间的任意随机值。
#1
RFC1035 makes no restriction on the transaction ID, except that it is 16 bits long, so 0 is perfectly fine. Whatever you send there will be copied to the response.
RFC1035对事务ID没有限制,除了它是16位长,所以0完全没问题。无论发送什么,都会被复制到响应中。
To further verify this, I have checked the source code of the resolvers below and they all seem to agree that all 16 bits of the ID are yours to take.
为了进一步验证这一点,我检查了下面解析器的源代码,他们似乎都同意ID的所有16位都是你的。
- Unbound: ID is any random value between 0 - 0xffff.
- ARSoft.Tools.Net: ID is any random value between 0 - 0xffff.
- Synapse (Delphi networking library): ID is any random value between 0 - 0xffff.
未绑定:ID是0 - 0xffff之间的任意随机值。
ARSoft.Tools.Net:ID是0到0xffff之间的任意随机值。
Synapse(Delphi网络库):ID是0到0xffff之间的任意随机值。