Mercurial > flash_v2
changeset 499:87027e29073d
* src/network_support.c (init_all_network_interfaces): Added
support for a hard coded domain name. Inspired by Motoya Kurotsu.
* src/network_support.c (init_all_network_interfaces): Added
support for a hard coded, default DNS server address.
| author | jlarmour |
|---|---|
| date | Sat, 18 Jan 2003 03:46:17 +0000 |
| parents | ae6f2695b07a |
| children | b6080ba5b75a |
| files | packages/net/common/current/ChangeLog packages/net/common/current/src/network_support.c |
| diffstat | 2 files changed, 35 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/common/current/ChangeLog +++ b/packages/net/common/current/ChangeLog @@ -1,3 +1,13 @@ +2003-01-10 Andrew Lunn <andrew.lunn@ascom.ch> + + * src/network_support.c (init_all_network_interfaces): Added + support for a hard coded domain name. Inspired by Motoya Kurotsu. + +2003-01-09 Andrew Lunn <andrew.lunn@ascom.ch> + + * src/network_support.c (init_all_network_interfaces): Added + support for a hard coded, default DNS server address. + 2003-01-12 Jonathan Larmour <jifl@eCosCentric.com> * src/bootp_support.c: Fix licence which should always have been
--- a/packages/net/common/current/src/network_support.c +++ b/packages/net/common/current/src/network_support.c @@ -9,6 +9,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2003 Andrew Lunn <andrew.lunn@ascom.ch> // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -83,6 +84,10 @@ #include <dhcp.h> #endif +#ifdef CYGPKG_NS_DNS +#include <pkgconf/ns_dns.h> +#endif + #ifdef CYGHWR_NET_DRIVER_ETH0 struct bootp eth0_bootp_data; cyg_bool_t eth0_up = false; @@ -451,6 +456,26 @@ init_all_network_interfaces(void) ipv6_start_routing_thread(); #endif +#ifdef CYGDAT_NS_DNS_DEFAULT_SERVER +#define _SERVER string(CYGDAT_NS_DNS_DEFAULT_SERVER) + + { + struct in_addr server; + + inet_aton(_SERVER, &server); + cyg_dns_res_init(&server); + } +#endif + +#ifdef CYGDAT_NS_DNS_DOMAINNAME_NAME +#define _NAME string(CYGDAT_NS_DNS_DOMAINNAME_NAME) + { + char buf[] = _NAME; + int len = strlen(_NAME); + + setdomainname(buf,len); + } +#endif // Open the monitor to other threads. in_init_all_network_interfaces = 0;
