Forum Discussion
Jon_Macy
Altostratus
Feb 08, 2018Another Binary Scan Question - Parsing Binary Flag Fields
Hi All
On an LTM only license (so no DNS:: objects which would be much easier I agree, but $$$) I'm trying to parse flag field values out of a DNS UDP Message packet. The packet layout and what I've...
Stanislas_Piro2
Cumulonimbus
Feb 08, 2018you 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.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects