From eab373a2d781134b9704cfecd6750550b7c3c258 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 5 Aug 2008 16:33:12 +0000 Subject: [PATCH] 2008-08-05 Joel Sherrill PR 741/networking * libmisc/dummy/dummy.c: Add dummy network configuration. --- cpukit/ChangeLog | 5 +++++ cpukit/libmisc/dummy/dummy.c | 38 +++++++++++++++++++++++++++++------- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 8e0a72a4e2..6b2edeee91 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2008-08-05 Joel Sherrill + + PR 741/networking + * libmisc/dummy/dummy.c: Add dummy network configuration. + 2008-08-05 Xudong Guan PR 1212/cpukit diff --git a/cpukit/libmisc/dummy/dummy.c b/cpukit/libmisc/dummy/dummy.c index c59114375c..8688023425 100644 --- a/cpukit/libmisc/dummy/dummy.c +++ b/cpukit/libmisc/dummy/dummy.c @@ -21,12 +21,6 @@ #include -rtems_task Init( - rtems_task_argument ignored -) -{ -} - int main( int, char **, char **); /* configuration information */ @@ -42,4 +36,34 @@ int main( int, char **, char **); #include -/* global variables */ +/* Loopback Network Configuration */ +#if defined(RTEMS_NETWORKING) + #include + #include + #include + + extern int rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig *, int); + + static struct rtems_bsdnet_ifconfig loopback_config = { + "lo0", /* name */ + rtems_bsdnet_loopattach, /* attach function */ + NULL, /* link to next interface */ + "127.0.0.1", /* IP address */ + "255.0.0.0", /* IP net mask */ + }; + + struct rtems_bsdnet_config rtems_bsdnet_config = { + &loopback_config, /* Network interface */ + NULL, /* Use fixed network configuration */ + 0, /* Default network task priority */ + 0, /* Default mbuf capacity */ + 0, /* Default mbuf cluster capacity */ + "testSystem", /* Host name */ + "nowhere.com", /* Domain name */ + "127.0.0.1", /* Gateway */ + "127.0.0.1", /* Log host */ + {"127.0.0.1" }, /* Name server(s) */ + {"127.0.0.1" }, /* NTP server(s) */ + }; +#endif +