The raw API is a very direct interface, and is "close to the metal". In particular,
the mechanism by which incoming packets are injected into the TCP/IP stack, or outgoing
packets are sent by the stack are largely left to the application. This means that it is
generally better not to use the cyg_lwip_init() function that is
used for sequential or BSD API applications. Instead the application should perform
its own stack initialisation.
Note that if you do decide to use cyg_lwip_init() and the
configuration option CYGFUN_LWIP_SEQUENTIAL_API is
disabled so that solely the raw API is available, then the application will
need to provide its own alternative to the tcpip_input() function which had
previously been used to inject received packets into the stack. This
function must be declared as follows:
See below for further details on initialisation.
Declarations for the API functions are found in header files within the lwIP include tree. The TCP functions are found in <lwip/tcp.h>, and UDP in <lwip/udp.h>.
The raw API uses many of the same types and definitions used in the sequential
API. In particular the raw API functions use
struct
ip_addr and err_t error codes.