Forum Discussion
Stanislas_Piro2
Feb 08, 2018Cumulonimbus
you can find this irule which decode dns question and encode answer.
First extract flags to bits string
binary scan [UDP::payload] SB16SSSSH* ID REQUEST_FLAGS QDCOUNT ANCOUNT NSCOUNT ARCOUNT RESOURCES
then extract bits from flags
set bit7 [string index $REQUEST_FLAGS 7]
I had the same question and it seems that b option in binary scan read the last bit of the whole byte.