Using this page as reference: https://netty.io/4.1/api/io/netty/handler/codec/dns/DnsResponseCode.html
Hi I am looking for a way to get the DNS return rcode int value given the DNS return message string. Ex. given “FORMERR”, should return 1. I am trying to use the netty library so I don’t have to make the conversion manually but it doesn’t seem like there is this functionality.
I’ve tried
val test = new DnsResponseCode(-1, "FORMERR")
println(test.intValue)
but this just returns -1, even though the rcode int value should be 1. Doesn’t look like there is just a string constructor.
FORMERR The ‘FormErr’ DNS RCODE (1), as defined
in RFC1035.
Am I just missing something (I’m not an expert in Scala) or does this functionality just not exist?
Thanks