summaryrefslogtreecommitdiff
path: root/core/lwip/src/netif
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-04-12 00:05:58 -0700
committerEric W. Biederman <ebiederm@xmission.com>2011-04-12 14:41:24 -0700
commit7a4d7ed51f4440cbcf8dfa6a75f0c74f9bd12856 (patch)
treef6d10c9c6b4af2f60df4dd1724d539888338c864 /core/lwip/src/netif
parentd4c8170ad3d62cdb1bf7df845d6baaa2659a0586 (diff)
downloadsyslinux-7a4d7ed51f4440cbcf8dfa6a75f0c74f9bd12856.tar.gz
lwip: Clean up the initialization sequence
Implement an initialization sequence for lwip that is essentially sane, and remove the previous udp stack support. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'core/lwip/src/netif')
-rw-r--r--core/lwip/src/netif/undiif.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/core/lwip/src/netif/undiif.c b/core/lwip/src/netif/undiif.c
index 9d8a84da..a2787f2f 100644
--- a/core/lwip/src/netif/undiif.c
+++ b/core/lwip/src/netif/undiif.c
@@ -1250,7 +1250,7 @@ void undiif_input(t_PXENV_UNDI_ISR *isr)
* ERR_MEM if private data couldn't be allocated
* any other err_t on error
*/
-err_t
+static err_t
undiif_init(struct netif *netif)
{
LWIP_ASSERT("netif != NULL", (netif != NULL));
@@ -1278,22 +1278,17 @@ undiif_init(struct netif *netif)
return ERR_OK;
}
-err_t undi_tcpip_start(struct ip_addr *ipaddr,
- struct ip_addr *netmask,
- struct ip_addr *gw)
+int undiif_start(uint32_t ip, uint32_t netmask, uint32_t gw)
{
err_t err;
- // Start the TCP/IP thread & init stuff
- tcpip_init(NULL, NULL);
-
// This should be done *after* the threading system and receive thread
// have both been started.
dprintf("undi_netif: ip %d.%d.%d.%d netmask %d.%d.%d.%d gw %d.%d.%d.%d\n",
- ((uint8_t *)ipaddr)[0],
- ((uint8_t *)ipaddr)[1],
- ((uint8_t *)ipaddr)[2],
- ((uint8_t *)ipaddr)[3],
+ ((uint8_t *)ip)[0],
+ ((uint8_t *)ip)[1],
+ ((uint8_t *)ip)[2],
+ ((uint8_t *)ip)[3],
((uint8_t *)netmask)[0],
((uint8_t *)netmask)[1],
((uint8_t *)netmask)[2],
@@ -1302,8 +1297,9 @@ err_t undi_tcpip_start(struct ip_addr *ipaddr,
((uint8_t *)gw)[1],
((uint8_t *)gw)[2],
((uint8_t *)gw)[3]);
- err = netifapi_netif_add(&undi_netif, ipaddr, netmask, gw, NULL,
- undiif_init, ip_input);
+ err = netifapi_netif_add(&undi_netif,
+ (struct ip_addr *)&ip, (struct ip_addr *)&netmask, (struct ip_addr *)gw,
+ NULL, undiif_init, ip_input);
if (err)
return err;