lwip-contrib-mac/ports/unix/proj/unixsim
jifl ba11c223fa 2008-09-30 David Woodhouse <dwmw2@infradead.org> :
* ports/unix/sys_arch.c, ports/unix/include/arch/cc.h,
        ports/unix/netif/tcpdump.c, ports/unix/proj/unixsim/simhost.c:
        Fix 64-bit issues in unix port.
        * ports/unix/include/arch/cc.h: silence warning about packed
        attribute on fields, since whole struct is packed.
        * ports/unix/proj/unixsim/apps/shell.c: Remove rexmit fields
        from stat data, in line with lwip stats changes.
2008-09-30 13:48:07 +00:00
..
apps 2008-09-30 David Woodhouse <dwmw2@infradead.org> : 2008-09-30 13:48:07 +00:00
lwipopts.h Update unix port to 1.3.0 before release 2008-01-15 13:10:51 +00:00
Makefile Update unix port to 1.3.0 before release 2008-01-15 13:10:51 +00:00
README Added command line options for debug and ping output. 2006-04-19 07:30:02 +00:00
simhost.c 2008-09-30 David Woodhouse <dwmw2@infradead.org> : 2008-09-30 13:48:07 +00:00
simnode.c Update for new sys_thread_new parameters (see task #7252 : "Create sys_thread_new_ex()" ). Some @todo are integrate to do some suggestions to port maintainers. 2007-09-05 16:48:11 +00:00
simrouter.c Update for new sys_thread_new parameters (see task #7252 : "Create sys_thread_new_ex()" ). Some @todo are integrate to do some suggestions to port maintainers. 2007-09-05 16:48:11 +00:00

This directory contains an example of how a project using lwIP might
look. It is also the development platform of lwIP, since it can be run
as a user process under FreeBSD or Linux. There are also a number of
example applications (including a simple web server) in the apps/
directory.

Some short instructions on how to build and run lwIP on a FreeBSD or
Linux host. For FreeBSD, the tap interface must be enabled in the
kernel configuration and the kernel must be recompiled. The tap
interface is enabled by adding the line "pseudo-device tap" in the
kernel configuration. See Chapter 9 in the FreeBSD handbook for
instructions on how to build a custom FreeBSD kernel.

For Linux you might need to create a device node with

  > mknod /dev/net/tun c 10 200

* Compile the code. This must be done by using GNU Make. Under
  FreeBSD, GNU Make can be found in the ports collection under
  /usr/ports/devel/gmake (type "make install distclean" to
  install). Under Linux, GNU Make is the default "make".

  > gmake         (FreeBSD)

  > make          (Linux)

* The compilation process produces the executable file "simhost". To
  run this, you have to be root.

  > su            (Type password for the root account)
  # ./simhost

* The lwIP TCP/IP stack is now running with IP address
  192.168.0.2. Some things that you can try:

  To see the packets that are going to and from the lwIP stack, run
  tcpdump:

  # tcpdump -l -n -i tap0

  You can ping lwIP:

  > ping 192.168.0.2

  For a telnet shell, run:

  > telnet 192.168.0.2
  
  Finally, "simhost" also includes a simple web server; the URL is
  of course http://192.168.0.2/.

* Simhost has some extra features that can be
  selected with command line options.
  
  To enable runtime debug output (project must be build with -DLWIP_DEBUG):
  
  # ./simhost -d
  
  To ping any host, e.g. the gateway:
  
  # ./simhost -p 192.168.0.1