If you plan on using the tcpip thread, then the following is an example initialization sequence for lwIP: #include "lwip/tcpip.h" struct netif my_netif; err_t my_ip_init(struct ip_addr *ipaddr, struct ip_addr *netmask, struct ip_addr *gw, err_t (* init)(struct netif *netif), err_t (* input)(struct pbuf *p, struct netif *netif)) { // Start the TCP/IP thread & init stuff tcpip_init(NULL, NULL); // WARNING: This must only be run after the OS has been started. // Typically this is the case, however, if not, you must place this // in a post-OS initialization return netifapi_netif_add(&my_netif, ipaddr, netmask, gw, NULL, init, input); }
Attributes | Values |
---|
rdfs:label
| - Initialization using tcpip.c
|
rdfs:comment
| - If you plan on using the tcpip thread, then the following is an example initialization sequence for lwIP: #include "lwip/tcpip.h" struct netif my_netif; err_t my_ip_init(struct ip_addr *ipaddr, struct ip_addr *netmask, struct ip_addr *gw, err_t (* init)(struct netif *netif), err_t (* input)(struct pbuf *p, struct netif *netif)) { // Start the TCP/IP thread & init stuff tcpip_init(NULL, NULL); // WARNING: This must only be run after the OS has been started. // Typically this is the case, however, if not, you must place this // in a post-OS initialization return netifapi_netif_add(&my_netif, ipaddr, netmask, gw, NULL, init, input); }
|
dcterms:subject
| |
abstract
| - If you plan on using the tcpip thread, then the following is an example initialization sequence for lwIP: #include "lwip/tcpip.h" struct netif my_netif; err_t my_ip_init(struct ip_addr *ipaddr, struct ip_addr *netmask, struct ip_addr *gw, err_t (* init)(struct netif *netif), err_t (* input)(struct pbuf *p, struct netif *netif)) { // Start the TCP/IP thread & init stuff tcpip_init(NULL, NULL); // WARNING: This must only be run after the OS has been started. // Typically this is the case, however, if not, you must place this // in a post-OS initialization return netifapi_netif_add(&my_netif, ipaddr, netmask, gw, NULL, init, input); }
|