[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] some questions
From: |
Adam Dunkels |
Subject: |
[lwip-users] Re: [lwip] some questions |
Date: |
Wed, 08 Jan 2003 22:35:54 -0000 |
Hi John!
On Friday 08 February 2002 20.30, you wrote:
> 1) I am unclear about the need for tcp_ack_now()
> in the TIME_WAIT state in tcp_input.c
>
> My understanding (admittedly vague) of the state
> diagram suggests that an ACK would be sent if
> necessary in the transistion to this state, and
> thus no acks would be generated from this state?
>
> I'm asking as I occasionally see an infinite loop
> when closing a connection with the two sides
> endlessly ack'ing each others ack's.
You are right - an ACK should only be sent if the incoming segment contains
data (or a FIN). I.e., if the TCP length is > 0. The reason for sending an
ACK in the TIME-WAIT state is that the other side might be trying to
retransmit the FIN, which should be ACKed.
> 3) I have written some code to implement non-blocking
> socket commands. I added two functions (netconn_recv_avail
> and netconn_accept_avail) to the netconn layer, and
> a sys_mbox_peek function to the mbox. Of course some changes in
> the lwip_socket library, including ioctlsocket, select, and
> tests of the non-blocking flags where required. Are these
> of interest?
It is very interesting, especially with an implementation of select() in the
socket library!
> 4) ~line 100 of tcp_input.c (tcp_input), the ip_addr_ismulticast()
> function call. I think that this requires ntohl(iphdr->dest.addr).
> (I think that this problem occurs elsewhere as well).
Yes, ip_addr_ismulticast() was flawed - it required some ntohl() stuff!
Thanks!
/adam
--
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] some questions,
Adam Dunkels <=