]> granicus.if.org Git - libevent/commit
Added DNS header mask definitions.
authorNathan French <nate@cl0d.com>
Thu, 7 Feb 2019 16:43:14 +0000 (11:43 -0500)
committerAzat Khuzhin <azat@libevent.org>
Tue, 12 Feb 2019 08:15:52 +0000 (11:15 +0300)
commitfb134939160a4baad89fd4ab20c49afd617057e3
tree622b809f501a2cbdb2b82af1fc220a9e90d32104
parent63c6669fd831088825dfc0000737a33853bb36e8
Added DNS header mask definitions.

Currently, we do a lot of data munging with manual hex. This is ugly
and can lead to bugs. I defined the following:

_QR_MASK    0x8000U
_OP_MASK    0x7800U
_AA_MASK    0x0400U
_TC_MASK    0x0200U
_RD_MASK    0x0100U
_RA_MASK    0x0080U
_Z_MASK     0x0040U
_AD_MASK    0x0020U
_CD_MASK    0x0010U
_RCODE_MASK 0x000fU

So that we can more easily twiddle flags.

v2: make evdns flag masks unsigned literal
Closes: #756 (cherry-picked)
evdns.c