[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Lwip Socket Library
From: |
Dennis Sandwiese |
Subject: |
Re: [lwip-users] Lwip Socket Library |
Date: |
Thu, 13 Jul 2006 13:14:29 -0700 (PDT) |
>> Thank you, Kieran. Most of the missing symbols went
>> away after making the following changes to lib
>> project:
>>
>> - Add $(LWIPDIR)/core/raw.c to COREFILES
>> - Add $(LWIPDIR)/core/ipv4/ip_frag.c to CORE4FILES
>> - Add $(LWIPARCH)/*.c and $(LWIPARCH)/netif/*.c to
>> ARCHFILES
>> - Add the macros for enabling/disabling debugging
per
>> module to lwipopts.h
>
> Thanks for the helpful list.
>
>> But one symbol - sys_now - remains undefined. I
tried
>> setting NO_SYS to 1 in lwipopts.h, but that creates
>> many other cascading problems. Is there a way out
of
>> this problem?
>
> sys_now() should be defined in one of the unix port
(architecture
> specific files), but doesn't seem to be. I'm not
sure why not. It only
> seems to be used in the delif.c file, which is not
necessary for most
> people - I think this just simulates a link of a
certain delay. Try
> omitting that file and see if it helps. Otherwise
take a look to see if
Thanks for the suggestion, Kieran. After removing
delif, I am able to build it without any missing
symbols. But I encountered a new problem - ip_input
was dropping all the packets it received because the
interface was not up. So I added a call to
netif_set_up after netif_set_default in _init and the
interface became responsive. However, when I try to
connect using an echo client, it seg faults. Please
see the trace below. Does this ring a bell for you?
tcpip_thread: IP packet 0xffeb838
ip_input: iphdr->dest 0xc0a80002 netif->ip_addr
0xc0a80002 (0xc0a80000, 0xc0a80000, 0x2) up:1 any:0
ip_input: packet accepted on interface tp
ip_input:
IP header:
+-------------------------------+
| 4 | 5 | 0x00 | 40 | (v, hl, tos, len)
+-------------------------------+
| 28018 |010| 0 | (id, flags, offset)
+-------------------------------+
| 64 | 6 | 0x4c0a | (ttl, proto, chksum)
+-------------------------------+
| 192 | 168 | 0 | 1 | (src)
+-------------------------------+
| 192 | 168 | 0 | 2 | (dest)
+-------------------------------+
ip_input: p->len 40 p->tot_len 40
TCP header:
+-------------------------------+
| 57784 | 7 | (src port, dest
port)
+-------------------------------+
| 3244626500 | (seq no)
+-------------------------------+
| 0000006511 | (ack no)
+-------------------------------+
| 5 | |010000| 5840 | (hdrlen, flags (ACK
), win)
+-------------------------------+
| 0x48d8 | 0 | (chksum, urgp)
+-------------------------------+
pbuf_header: old 0xffeb8a2 new 0xffeb8b6 (-20)
inet_chksum_pseudo(): checksumming pbuf 0xffeb884 (has
next (nil))
inet_chksum_pseudo(): pbuf chain lwip_chksum()=ffff
pbuf_header: old 0xffeb8b6 new 0xffeb8ca (-20)
+-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags ACK
-+-+-+-+-+-+-+-+-+-+-+-+-+-+
State: SYN_RCVD
TCP connection established 57784 -> 7.
State: ESTABLISHED
sys_mbox_post: mbox 0x10012810 msg 0xffeb68c
tcp_receive: window update 5840
tcp_receive: slow start cwnd 129
tcp_receive: ACK for 6511, unacked->seqno 6510:6511
tcp_receive: removing 6510:6511 from pcb->unacked
tcp_receive: queuelen 1 ... sys_mbox_fetch: mbox
0x10012810 msg 0x4000
pbuf_free(0xffea75c)
pbuf_free: deallocating 0xffea75c
0 (after freeing unacked)
tcp_receive: pcb->rttest 0 rtseq 6510 ackno 6511
tcp_output: nothing to send ((nil))
tcp_output: snd_wnd 5840, cwnd 128, wnd 128, seg ==
NULL, ack 6511
pbuf_free(0xffeb884)
pbuf_free: deallocating 0xffeb884
State: ESTABLISHED
Segmentation fault
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
- [lwip-users] Lwip Socket Library, e8h3wy, 2006/07/10
- Re: [lwip-users] Lwip Socket Library, Kieran Mansley, 2006/07/11
- Re: [lwip-users] Lwip Socket Library, Christiaan Simons, 2006/07/11
- Re: [lwip-users] Lwip Socket Library, Dennis Sandwiese, 2006/07/11
- Re: [lwip-users] Lwip Socket Library, Kieran Mansley, 2006/07/12
- Re: [lwip-users] Lwip Socket Library,
Dennis Sandwiese <=
- Re: [lwip-users] Lwip Socket Library, Kieran Mansley, 2006/07/14
- Re: [lwip-users] Lwip Socket Library, Dennis Sandwiese, 2006/07/17
- [lwip-users] Sharing Lwip between unrelated processes, Dennis Sandwiese, 2006/07/19
- Re: [lwip-users] Sharing Lwip between unrelated processes, Kieran Mansley, 2006/07/20