- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello! I was looking at the dns query table and don't understand the formatting (and, as a result, don't really know where to look to fill in that knowledge gap).
Below is the code for the dns_query_table (in dns_redirect.c):
static const dns_query_table_entry_t valid_dns_query_table[] =
{
DNS_QUERY_TABLE_ENTRY("\x0A""securedemo""\x05""wiced""\x08""cypress""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x05""apple""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x03""www""\x05""apple""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x06""google""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x03""www""\x06""google""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x04""bing""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x03""www""\x04""bing""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x08""facebook""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x03""www""\x08""facebook""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x08""cypress""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x03""www""\x08""cypress""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x05""wiced""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x03""www""\x05""wiced""\x03""com"),
DNS_QUERY_TABLE_ENTRY("\x08""clients3""\x06""google""\x03""com"),
};
I have been able to use apple.com and wiced.com but most the other options there haven't worked for me. Both of those used a "\x05" and "\x03" but I don't really know what those are referencing. Similarly, I don't know what 0x6, 0x8, or 0xA are to try the other websites. I was hoping someone might be able to help me understand this format a bit better. Any help you can give me would be greatly appreciated. Thanks!
Solved! Go to Solution.
- Labels:
-
Wireless
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jaydev,
The domain names that need to be stored as DNS entries should be converted to domain format from the dot format. An example piece of code is given here https://chromium.googlesource.com/chromium/src/+/refs/heads/main/net/dns/dns_util.h
I see one of the examples as - "dotted: a string in dotted form: "Foo Printer._tcp.local" out: a result in DNS form: "\x0bFoo Printer\x04_tcp\x05local\x00"" . This is the format how a dns response is expected from a DNS server. I'll update this if I find more info on the spec.
Best Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jaydev,
Let me check for some more info and get back.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jaydev,
The domain names that need to be stored as DNS entries should be converted to domain format from the dot format. An example piece of code is given here https://chromium.googlesource.com/chromium/src/+/refs/heads/main/net/dns/dns_util.h
I see one of the examples as - "dotted: a string in dotted form: "Foo Printer._tcp.local" out: a result in DNS form: "\x0bFoo Printer\x04_tcp\x05local\x00"" . This is the format how a dns response is expected from a DNS server. I'll update this if I find more info on the spec.
Best Regards,