kdig: add +[no]opttext option
This commit adds a kdig flag +opttext
that attempts to print unknown
EDNS options as text if all of the octets are printable characters. If
any octets are not printable, the whole option will be printed in
hexadecimal, as if the +opttext
option were not specified.
My use case for this feature is that I have a knot module that uses a private EDNS option which is encoded using printable characters. I'd like to send the option using kdig and also show the contents of the private option in the response from the server. Showing the data in hexadecimal is not very readable.