summaryrefslogtreecommitdiff
path: root/include/net.h
diff options
context:
space:
mode:
authorRobin Getz <rgetz@blackfin.uclinux.org>2009-07-20 14:53:54 -0400
committerBen Warren <biggerbadderben@gmail.com>2009-07-22 22:53:44 -0700
commit1a32bf41881b5dbe3119cb77a33572b4d462cabf (patch)
treedda370cbcb7a6614e111ad2399661392322bab0b /include/net.h
parent88ad3fd91c83a4343b25385fd78fd8e29ebb723f (diff)
Add DNS support
On 04 Oct 2008 Pieter posted a dns implementation for U-Boot. http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg10216.html > > DNS can be enabled by setting CFG_CMD_DNS. After performing a query, > the serverip environment var is updated. > > Probably there are some cosmetic issues with the patch. Unfortunatly I > do not have the time to correct these. So if anybody else likes DNS > support in U-Boot and has the time, feel free to patch it in the main tree. Here it is again - slightly modified & smaller: - update to 2009-06 (Pieter's patch was for U-Boot 1.2.0) - README.dns is added - syntax is changed (now takes a third option, the env var to store the result in) - add a random port() function in net.c - sort Makefile in ./net/Makefile - dns just returns unless a env var is given - run through checkpatch, and clean up style issues - remove packet from stack - cleaned up some comments - failure returns much faster (if server responds, don't wait for timeout) - use built in functions (memcpy) rather than byte copy. Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Pieter Voorthuijsen <pieter.voorthuijsen@prodrive.nl> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h
index 88a951357..4a03717ae 100644
--- a/include/net.h
+++ b/include/net.h
@@ -361,6 +361,11 @@ typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP
/* from net/net.c */
extern char BootFile[128]; /* Boot File name */
+#if defined(CONFIG_CMD_DNS)
+extern char *NetDNSResolve; /* The host to resolve */
+extern char *NetDNSenvvar; /* the env var to put the ip into */
+#endif
+
#if defined(CONFIG_CMD_PING)
extern IPaddr_t NetPingIP; /* the ip address to ping */
#endif