lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-users] tcp_new() returns NULL


From: Tom C. Barker
Subject: RE: [lwip-users] tcp_new() returns NULL
Date: Wed, 1 Dec 2004 13:42:27 -0800

The only time I have had memp return NULL is when MEMP_NUM_SYS_TIMEOUT
was lower than the number of timeouts I wanted to use. This is one cause
of it returning NULL.

Tom

-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf
Of Chris Frost
Sent: Wednesday, December 01, 2004 1:26 PM
To: address@hidden
Subject: [lwip-users] tcp_new() returns NULL


In porting lwip I'm starting simple and so am working to listen/connect
over loopback using the raw api. I'm seeing tcp_new() return NULL, because
memp_malloc() returns null, because memp_tab[type] at core/memp.c:203
is NULL. What might cause this?

Before calling tcp_new() I:
- call sem_init, mem_init, memp_init, netif_init, pbuff_init, and tcp_init,
  in this order. 
- setup the loopback interface:

        struct netif nif;
        IP4_ADDR(&nif.gw, 127,0,0,1);
        IP4_ADDR(&nif.ip_addr, 127,0,0,1);
        IP4_ADDR(&nif.netmask, 255,0,0,0);
        if((r = loopif_init(&nif)) != ERR_OK)
                panic("loopif_init: %d", r);
  
  I don't see an error from loopif_init.


thanks for any thoughts on what I might be missing!
-- 
Chris Frost  |  <http://www.frostnet.net/chris/>
-------------+----------------------------------
Public PGP Key:
   Email address@hidden with the subject "retrieve pgp key"
   or visit <http://www.frostnet.net/chris/about/pgp_key.phtml>


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

[Prev in Thread] Current Thread [Next in Thread]