summaryrefslogtreecommitdiffstats
path: root/include/net.h
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-03-26 11:40:53 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-04-03 11:39:29 +0800
commit9c29dab5aab70d399c51d2cae73d9e40c5948707 (patch)
treecb41214c7a35bbe1fe15d2fac47c7dab67e28666 /include/net.h
parentf76899fa9805178cf7c71daaecd4065d43ca068f (diff)
downloadbarebox-9c29dab5aab70d399c51d2cae73d9e40c5948707.tar.gz
barebox-9c29dab5aab70d399c51d2cae73d9e40c5948707.tar.xz
net: env: getenv_ip use resolv
Introduce getenv_ip_dns to be able to do not do the resolv when using it in resolv for the nameserver (Do not loop). Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h
index 2eec47fb52..0ebe19823a 100644
--- a/include/net.h
+++ b/include/net.h
@@ -277,7 +277,11 @@ char *ip_to_string (IPaddr_t x, char *s);
/* Convert a string to ip address */
int string_to_ip(const char *s, IPaddr_t *ip);
-IPaddr_t getenv_ip(const char *name);
+IPaddr_t getenv_ip_dns(const char *name, int dns);
+static inline IPaddr_t getenv_ip(const char *name)
+{
+ return getenv_ip_dns(name, 0);
+}
int setenv_ip(const char *name, IPaddr_t ip);
int string_to_ethaddr(const char *str, char *enetaddr);