Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

ares_dns.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define DNS__16BIT(p)   (((p)[0] << 8) | (p)[1])
#define DNS__32BIT(p)
#define DNS__SET16BIT(p, v)
#define DNS__SET32BIT(p, v)
#define DNS_HEADER_QID(h)   DNS__16BIT(h)
#define DNS_HEADER_QR(h)   (((h)[2] >> 7) & 0x1)
#define DNS_HEADER_OPCODE(h)   (((h)[2] >> 3) & 0xf)
#define DNS_HEADER_AA(h)   (((h)[2] >> 2) & 0x1)
#define DNS_HEADER_TC(h)   (((h)[2] >> 1) & 0x1)
#define DNS_HEADER_RD(h)   ((h)[2] & 0x1)
#define DNS_HEADER_RA(h)   (((h)[3] >> 7) & 0x1)
#define DNS_HEADER_Z(h)   (((h)[3] >> 4) & 0x7)
#define DNS_HEADER_RCODE(h)   ((h)[3] & 0xf)
#define DNS_HEADER_QDCOUNT(h)   DNS__16BIT((h) + 4)
#define DNS_HEADER_ANCOUNT(h)   DNS__16BIT((h) + 6)
#define DNS_HEADER_NSCOUNT(h)   DNS__16BIT((h) + 8)
#define DNS_HEADER_ARCOUNT(h)   DNS__16BIT((h) + 10)
#define DNS_HEADER_SET_QID(h, v)   DNS__SET16BIT(h, v)
#define DNS_HEADER_SET_QR(h, v)   ((h)[2] |= (((v) & 0x1) << 7))
#define DNS_HEADER_SET_OPCODE(h, v)   ((h)[2] |= (((v) & 0xf) << 3))
#define DNS_HEADER_SET_AA(h, v)   ((h)[2] |= (((v) & 0x1) << 2))
#define DNS_HEADER_SET_TC(h, v)   ((h)[2] |= (((v) & 0x1) << 1))
#define DNS_HEADER_SET_RD(h, v)   ((h)[2] |= (((v) & 0x1)))
#define DNS_HEADER_SET_RA(h, v)   ((h)[3] |= (((v) & 0x1) << 7))
#define DNS_HEADER_SET_Z(h, v)   ((h)[3] |= (((v) & 0x7) << 4))
#define DNS_HEADER_SET_RCODE(h, v)   ((h)[3] |= (((v) & 0xf)))
#define DNS_HEADER_SET_QDCOUNT(h, v)   DNS__SET16BIT((h) + 4, v)
#define DNS_HEADER_SET_ANCOUNT(h, v)   DNS__SET16BIT((h) + 6, v)
#define DNS_HEADER_SET_NSCOUNT(h, v)   DNS__SET16BIT((h) + 8, v)
#define DNS_HEADER_SET_ARCOUNT(h, v)   DNS__SET16BIT((h) + 10, v)
#define DNS_QUESTION_TYPE(q)   DNS__16BIT(q)
#define DNS_QUESTION_CLASS(q)   DNS__16BIT((q) + 2)
#define DNS_QUESTION_SET_TYPE(q, v)   DNS__SET16BIT(q, v)
#define DNS_QUESTION_SET_CLASS(q, v)   DNS__SET16BIT((q) + 2, v)
#define DNS_RR_TYPE(r)   DNS__16BIT(r)
#define DNS_RR_CLASS(r)   DNS__16BIT((r) + 2)
#define DNS_RR_TTL(r)   DNS__32BIT((r) + 4)
#define DNS_RR_LEN(r)   DNS__16BIT((r) + 8)
#define DNS_RR_SET_TYPE(r)   DNS__SET16BIT(r, v)
#define DNS_RR_SET_CLASS(r)   DNS__SET16BIT((r) + 2, v)
#define DNS_RR_SET_TTL(r)   DNS__SET32BIT((r) + 4, v)
#define DNS_RR_SET_LEN(r)   DNS__SET16BIT((r) + 8, v)


Define Documentation

#define DNS__16BIT  )     (((p)[0] << 8) | (p)[1])
 

Definition at line 28 of file ares_dns.h.

#define DNS__32BIT  ) 
 

Value:

(((p)[0] << 24) | ((p)[1] << 16) | \
                                         ((p)[2] << 8) | (p)[3])

Definition at line 29 of file ares_dns.h.

#define DNS__SET16BIT p,
 ) 
 

Value:

(((p)[0] = ((v) >> 8) & 0xff), \
                                         ((p)[1] = (v) & 0xff))

Definition at line 31 of file ares_dns.h.

#define DNS__SET32BIT p,
 ) 
 

Value:

(((p)[0] = ((v) >> 24) & 0xff), \
                                         ((p)[1] = ((v) >> 16) & 0xff), \
                                         ((p)[2] = ((v) >> 8) & 0xff), \
                                         ((p)[3] = (v) & 0xff))

Definition at line 33 of file ares_dns.h.

#define DNS_HEADER_AA  )     (((h)[2] >> 2) & 0x1)
 

Definition at line 42 of file ares_dns.h.

#define DNS_HEADER_ANCOUNT  )     DNS__16BIT((h) + 6)
 

Definition at line 49 of file ares_dns.h.

Referenced by ares_parse_a_reply(), ares_parse_ptr_reply(), and qcallback().

#define DNS_HEADER_ARCOUNT  )     DNS__16BIT((h) + 10)
 

Definition at line 51 of file ares_dns.h.

#define DNS_HEADER_NSCOUNT  )     DNS__16BIT((h) + 8)
 

Definition at line 50 of file ares_dns.h.

#define DNS_HEADER_OPCODE  )     (((h)[2] >> 3) & 0xf)
 

Definition at line 41 of file ares_dns.h.

#define DNS_HEADER_QDCOUNT  )     DNS__16BIT((h) + 4)
 

Definition at line 48 of file ares_dns.h.

Referenced by ares_parse_a_reply(), ares_parse_ptr_reply(), and same_questions().

#define DNS_HEADER_QID  )     DNS__16BIT(h)
 

Definition at line 39 of file ares_dns.h.

Referenced by ares_send(), and process_answer().

#define DNS_HEADER_QR  )     (((h)[2] >> 7) & 0x1)
 

Definition at line 40 of file ares_dns.h.

#define DNS_HEADER_RA  )     (((h)[3] >> 7) & 0x1)
 

Definition at line 45 of file ares_dns.h.

#define DNS_HEADER_RCODE  )     ((h)[3] & 0xf)
 

Definition at line 47 of file ares_dns.h.

Referenced by process_answer(), and qcallback().

#define DNS_HEADER_RD  )     ((h)[2] & 0x1)
 

Definition at line 44 of file ares_dns.h.

#define DNS_HEADER_SET_AA h,
 )     ((h)[2] |= (((v) & 0x1) << 2))
 

Definition at line 57 of file ares_dns.h.

#define DNS_HEADER_SET_ANCOUNT h,
 )     DNS__SET16BIT((h) + 6, v)
 

Definition at line 64 of file ares_dns.h.

#define DNS_HEADER_SET_ARCOUNT h,
 )     DNS__SET16BIT((h) + 10, v)
 

Definition at line 66 of file ares_dns.h.

#define DNS_HEADER_SET_NSCOUNT h,
 )     DNS__SET16BIT((h) + 8, v)
 

Definition at line 65 of file ares_dns.h.

#define DNS_HEADER_SET_OPCODE h,
 )     ((h)[2] |= (((v) & 0xf) << 3))
 

Definition at line 56 of file ares_dns.h.

Referenced by ares_mkquery().

#define DNS_HEADER_SET_QDCOUNT h,
 )     DNS__SET16BIT((h) + 4, v)
 

Definition at line 63 of file ares_dns.h.

Referenced by ares_mkquery().

#define DNS_HEADER_SET_QID h,
 )     DNS__SET16BIT(h, v)
 

Definition at line 54 of file ares_dns.h.

Referenced by ares_mkquery().

#define DNS_HEADER_SET_QR h,
 )     ((h)[2] |= (((v) & 0x1) << 7))
 

Definition at line 55 of file ares_dns.h.

#define DNS_HEADER_SET_RA h,
 )     ((h)[3] |= (((v) & 0x1) << 7))
 

Definition at line 60 of file ares_dns.h.

#define DNS_HEADER_SET_RCODE h,
 )     ((h)[3] |= (((v) & 0xf)))
 

Definition at line 62 of file ares_dns.h.

#define DNS_HEADER_SET_RD h,
 )     ((h)[2] |= (((v) & 0x1)))
 

Definition at line 59 of file ares_dns.h.

Referenced by ares_mkquery().

#define DNS_HEADER_SET_TC h,
 )     ((h)[2] |= (((v) & 0x1) << 1))
 

Definition at line 58 of file ares_dns.h.

#define DNS_HEADER_SET_Z h,
 )     ((h)[3] |= (((v) & 0x7) << 4))
 

Definition at line 61 of file ares_dns.h.

#define DNS_HEADER_TC  )     (((h)[2] >> 1) & 0x1)
 

Definition at line 43 of file ares_dns.h.

Referenced by process_answer().

#define DNS_HEADER_Z  )     (((h)[3] >> 4) & 0x7)
 

Definition at line 46 of file ares_dns.h.

#define DNS_QUESTION_CLASS  )     DNS__16BIT((q) + 2)
 

Definition at line 70 of file ares_dns.h.

Referenced by same_questions().

#define DNS_QUESTION_SET_CLASS q,
 )     DNS__SET16BIT((q) + 2, v)
 

Definition at line 74 of file ares_dns.h.

Referenced by ares_mkquery().

#define DNS_QUESTION_SET_TYPE q,
 )     DNS__SET16BIT(q, v)
 

Definition at line 73 of file ares_dns.h.

Referenced by ares_mkquery().

#define DNS_QUESTION_TYPE  )     DNS__16BIT(q)
 

Definition at line 69 of file ares_dns.h.

Referenced by same_questions().

#define DNS_RR_CLASS  )     DNS__16BIT((r) + 2)
 

Definition at line 78 of file ares_dns.h.

Referenced by ares_parse_a_reply(), and ares_parse_ptr_reply().

#define DNS_RR_LEN  )     DNS__16BIT((r) + 8)
 

Definition at line 80 of file ares_dns.h.

Referenced by ares_parse_a_reply(), and ares_parse_ptr_reply().

#define DNS_RR_SET_CLASS  )     DNS__SET16BIT((r) + 2, v)
 

Definition at line 84 of file ares_dns.h.

#define DNS_RR_SET_LEN  )     DNS__SET16BIT((r) + 8, v)
 

Definition at line 86 of file ares_dns.h.

#define DNS_RR_SET_TTL  )     DNS__SET32BIT((r) + 4, v)
 

Definition at line 85 of file ares_dns.h.

#define DNS_RR_SET_TYPE  )     DNS__SET16BIT(r, v)
 

Definition at line 83 of file ares_dns.h.

#define DNS_RR_TTL  )     DNS__32BIT((r) + 4)
 

Definition at line 79 of file ares_dns.h.

#define DNS_RR_TYPE  )     DNS__16BIT(r)
 

Definition at line 77 of file ares_dns.h.

Referenced by ares_parse_a_reply(), and ares_parse_ptr_reply().


Generated on Wed Jan 14 12:59:00 2004 for RTL-lwIP-0.4 by doxygen 1.3.4