Does uip_connected() return > 0 (or does the appcall function get called)
after the device sends a SYN, and receives a SYN+ACK for an active outgoing
connection,  or does it return > 0 after the device sends a SYN, receives a
SYN+ACK,  and then sends an ACK  back to the remote host (end of 3 way
handshake) ?

 

I am trying to send stock quote requests to yahoo via http and yahoo doesn't
reply in the same manner when the device, vs my pc send the same request.

 

What happens is that the application gets called via the appcall function
after I call uip_connect().  From this point,  I assume we are fully
connected and check this using the following condition:

 

      if (uip_connected() || uip_rexmit()) 

 

to determine if I should call uip_send(). After calling uip_send(), the
device sends an ACK+PUSH (with the request) to yahoo. This is fine. However,
this is where the difference is.

 

When the PC does this, it is after a FULL 3 way handshake (SYN, SYN+ACK,
ACK). Yahoo then pushes the data back and closes the connection. The device
however sends the ACK+PUSH after SYN, SYN+ACK, where the next packet is
ACK+PUSH. Yahoo doesn't seem to like this without the final ACK in the
handshake and they don't close the connection, they do however send some
data back (and repeat it many times since we don't ack back properly) but
uIP doesn't seem to detect the received data when the appcall function runs
again and I check for uip_newdata(). 

 

Any ideas?

 

Should I be waiting a bit longer before calling uip_send() to ensure a full
connection is made and all 3 steps of the handshake are complete? 

 

Thanks,

 

--Eric

 

 

 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Eric Shufro
Sent: Tuesday, December 12, 2006 7:20 PM
To: uip-users@sics.se
Subject: [uip-users] DHCP bug

 

http://www.mail-archive.com/uip-users@sics.se/msg00117.html

 

I spent the entire day until I found this post online trying to figure out
why DHCP locks up in an infinite loop.

 

I swapped the 2 PT_WAIT_UNTIL macros with PT_YIELD_UNTIL and now everything
works.

 

Can someone please update the dhcp source files. This would make life much
easier for people trying to use DHCP that don't follow the message threads.

 

Thanks

 

--Eric

Reply via email to