]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: dns: comments in types/dns.h about structures endianness
authorBaptiste Assmann <bedis9@gmail.com>
Mon, 5 Sep 2016 17:09:49 +0000 (19:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 12 Sep 2016 18:02:22 +0000 (20:02 +0200)
To avoid issues when porting code to some architecture, we need to know
the endianess the structures are currently used.
This patch simply had a short notice before those structures to report
endianess and ease contributor's job.

include/types/dns.h

index 5d6b5a1fbf4f283ae114bcf3163fe457609cc5e1..b33924907748c4debd985713363fd67401188589 100644 (file)
@@ -90,11 +90,13 @@ struct dns_header {
 } __attribute__ ((packed));
 
 /* short structure to describe a DNS question */
+/* NOTE: big endian structure */
 struct dns_question {
        unsigned short  qtype;          /* question type */
        unsigned short  qclass;         /* query class */
 };
 
+/* NOTE: big endian structure */
 struct dns_query_item {
        struct list list;
        char name[DNS_MAX_NAME_SIZE];           /* query name */
@@ -102,6 +104,7 @@ struct dns_query_item {
        unsigned short class;                   /* query class */
 };
 
+/* NOTE: big endian structure */
 struct dns_answer_item {
        struct list list;
        char *name;                             /* answer name