ia64/xen-unstable

diff extras/mini-os/daytime.c @ 17275:7fc9767f966a

minios: Automatically set IP from XenStore information

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Mar 19 16:20:14 2008 +0000 (2008-03-19)
parents 3c49ae5641b0
children
line diff
     1.1 --- a/extras/mini-os/daytime.c	Wed Mar 19 16:19:10 2008 +0000
     1.2 +++ b/extras/mini-os/daytime.c	Wed Mar 19 16:20:14 2008 +0000
     1.3 @@ -15,16 +15,19 @@ static char message[29];
     1.4  void run_server(void *p)
     1.5  {
     1.6      struct ip_addr listenaddr = { 0 };
     1.7 -    struct ip_addr ipaddr = { htonl(0x0a000001) };
     1.8 -    struct ip_addr netmask = { htonl(0xff000000) };
     1.9 -    struct ip_addr gw = { 0 };
    1.10      struct netconn *listener;
    1.11      struct netconn *session;
    1.12      struct timeval tv;
    1.13      err_t rc;
    1.14  
    1.15      start_networking();
    1.16 -    networking_set_addr(&ipaddr, &netmask, &gw);
    1.17 +
    1.18 +    if (0) {
    1.19 +        struct ip_addr ipaddr = { htonl(0x0a000001) };
    1.20 +        struct ip_addr netmask = { htonl(0xff000000) };
    1.21 +        struct ip_addr gw = { 0 };
    1.22 +        networking_set_addr(&ipaddr, &netmask, &gw);
    1.23 +    }
    1.24  
    1.25      tprintk("Opening connection\n");
    1.26