in reply to How to print Compressed data in DNS
You're getting wishy-washy answers because you've asked a wishy-washy question.
Can some one tell how to print a DNS packet answer
First of all, by what means are you capturing the DNS packet? Or put differently, what are you starting with?
the answer part it has the domain name compressed
The answer to most requests ("A") is an IPv4 address, not a domain name. It's not compressed. It's stored as a 32-bit int in network byte order.
When doing a reverse lookup ("PTR"), you get a domain name. It's not stored as a single string, but it's not compressed either. It's stored as a number of NUL-terminated strings, one for each segment of the full domain name, plus an empty one.
RFC 1035: Domain Names - Implementation and Specification
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to print Compressed data in DNS
by deewanagan (Novice) on Nov 28, 2008 at 20:36 UTC | |
by Anonymous Monk on Nov 30, 2008 at 04:42 UTC |