Merge branch 'next'
[u-boot/qq2440-u-boot.git] / net / dns.h
blobdbc3890df9d3651a18406d35a1cdb67b9f7b6f53
1 /*
2 * (C) Masami Komiya <mkomiya@sonare.it> 2005
3 * Copyright 2009, Robin Getz <rgetz@blackfin.uclinux.org>
5 * SPDX-License-Identifier: GPL-2.0+
6 */
8 #ifndef __DNS_H__
9 #define __DNS_H__
11 #define DNS_SERVICE_PORT 53
12 #define DNS_TIMEOUT 10000UL
14 /* http://en.wikipedia.org/wiki/List_of_DNS_record_types */
15 enum dns_query_type {
16 DNS_A_RECORD = 0x01,
17 DNS_CNAME_RECORD = 0x05,
18 DNS_MX_RECORD = 0x0f,
22 * DNS network packet
24 struct header {
25 uint16_t tid; /* Transaction ID */
26 uint16_t flags; /* Flags */
27 uint16_t nqueries; /* Questions */
28 uint16_t nanswers; /* Answers */
29 uint16_t nauth; /* Authority PRs */
30 uint16_t nother; /* Other PRs */
31 unsigned char data[1]; /* Data, variable length */
34 extern void DnsStart(void); /* Begin DNS */
36 #endif