This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-libzt/ext/lwip-contrib/ports/unix

This port contains infrastructure and examples for running lwIP on Unix-like
operating systems (Linux, OpenBSD, cygwin). Much of this is targetted towards
testing lwIP applications.

* port/sys_arch.c, port/perf.c, port/include/arch/: Generic platform porting,
  for both states of NO_SYS. (Mapping debugging to printf, providing 
  sys_now & co from the system time etc.)

* check: Runs the unit tests shipped with main lwIP on the Unix port.

* fuzz: Helper application for fuzzing the lwIP stack

* port/netif, port/include/netif: Various network interface implementations and
  their helpers, some explicitly for Unix infrastructure, some generic (but most
  useful on an easy to debug system):

  * delif: Network interface that inserts delay before receiving or sending
    packages

  * fifo: Helper for sio

  * list: Helper for unixif

  * pcapif: Network interface that replays packages from a PCAP dump file, and
    discards packages sent out from it

  * sio: Mapping Unix character devices to lwIP's sio mechanisms

  * tapif: Network interface that is mapped to a tap interface (Unix user
    space layer 2 network device). Uses lwIP threads.

  * tcpdump: Utility functions to dump pbufs into a tcpdump formatted log
    file

  * tunif: Network interface that is mapped to a tun interface (Unix user
    space layer 3 network device). Uses lwIP threads.

  * unixif: Network interface that allows lwIP Unix programs to "meet" at Unix
    socket address and exchange traffic over it.

* lib: Compiling lwIP as a shared library

* minimal: Standalone example program that runs in NO_SYS=1 mode.
  Contains the mintapif network interface implementation, which is similar to
  netif/tapif, but runs without threads.

  Runs an echo server and SNMP.

* unixsim: Standalone example program that runs in NO_SYS=0 mode. Uses
  the tapif network interface.

  Runs an HTTP server.