summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/dummy
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-05 16:33:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-05 16:33:03 +0000
commit46cb96817631043fa460d34843b75594a6a14974 (patch)
treebfb97f48856378c474f69a775ee204ae426408cf /cpukit/libmisc/dummy
parent2008-08-05 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-46cb96817631043fa460d34843b75594a6a14974.tar.bz2
2008-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 741/networking * libmisc/dummy/dummy.c: Add dummy network configuration.
Diffstat (limited to 'cpukit/libmisc/dummy')
-rw-r--r--cpukit/libmisc/dummy/dummy.c38
1 files changed, 31 insertions, 7 deletions
diff --git a/cpukit/libmisc/dummy/dummy.c b/cpukit/libmisc/dummy/dummy.c
index 7402d34d25..9362951a17 100644
--- a/cpukit/libmisc/dummy/dummy.c
+++ b/cpukit/libmisc/dummy/dummy.c
@@ -17,12 +17,6 @@
#include <rtems.h>
-rtems_task Init(
- rtems_task_argument ignored
-)
-{
-}
-
int main( int, char **, char **);
/* configuration information */
@@ -42,4 +36,34 @@ int main( int, char **, char **);
#include <rtems/confdefs.h>
-/* global variables */
+/* Loopback Network Configuration */
+#if defined(RTEMS_NETWORKING)
+ #include <rtems/rtems_bsdnet.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+
+ 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
+