mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 06:41:32 +02:00
MINOR: dns: new bitmasks to use against DNS flags
Current DNS client code implementation doesn't take care of response flags setup by the server. This patch introduces a couple of bitmasks one can use to retrieve the truncated flag and the reply code available in the 2-bytes flag field.
This commit is contained in:
parent
01daef3162
commit
042d0a1f8c
@ -51,6 +51,10 @@
|
|||||||
#define DNS_RCODE_NX_DOMAIN 3 /* non existent domain */
|
#define DNS_RCODE_NX_DOMAIN 3 /* non existent domain */
|
||||||
#define DNS_RCODE_REFUSED 5 /* query refused */
|
#define DNS_RCODE_REFUSED 5 /* query refused */
|
||||||
|
|
||||||
|
/* dns flags masks */
|
||||||
|
#define DNS_FLAG_TRUNCATED 0x0200 /* mask for truncated flag */
|
||||||
|
#define DNS_FLAG_REPLYCODE 0x000F /* mask for reply code */
|
||||||
|
|
||||||
/* DNS request or response header structure */
|
/* DNS request or response header structure */
|
||||||
struct dns_header {
|
struct dns_header {
|
||||||
unsigned short id:16; /* identifier */
|
unsigned short id:16; /* identifier */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user