mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-10-16 03:24:14 +00:00
6929a67489
Added select() functionality to sockets library. Support for errno in sockets library. Byte ordering fixes. basic lwip_ioctl(), FIONREAD, get/setsockopt() etc. support - added additional argument to netif_add to pass state pointer so that the if_init function has access to context information before the interface is added, without accessing globals. - added netif_remove() - to conserve cpu load the tcpip_tcp_timer should only be active when tcbs that need it exist. - pass length of available data to callbacks for NETCONN_EVT_RCV events - added tcpip_link_input(), a hack to allow processing of PPP packets in tcpip_thread() context. This saves threads and context switches. - renamed incompatible ASSERT() macro to LWIP_ASSERT() to avoid name collision. - changed a bunch of %d's to %u's in format strings for unsigned values. - added ip_frag to lwip_stats. - changed IP_REASS_MAXAGE and IP_REASS_TMO defaults to more realistic values. - added sys_timeout_remove() function to cancel timeouts (needed by PPP amongst other things). - tolerate NULL returns from sys_arch_timeouts() since some threads might not need to use or have timeouts. - added sys_sem_wait_timeout() - moved mem_malloc() function to end of mem.c to work around tasking compiler bug. - automatically bind to local tcp port if 0. - allow customization of port ranges for automatic local bindings. - corrected various typos, spelling errors, etc.. Thanks to Marc Boucher for many of these changes. |
||
---|---|---|
.. | ||
apps | ||
lwipopts.h | ||
Makefile | ||
README | ||
simhost.c | ||
simnode.c | ||
simrouter.c |
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. * 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/.