From: Adam D. <ada...@us...> - 2009-04-29 11:40:39
|
Update of /cvsroot/contiki/contiki-2.x/core/net In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30755/net Modified Files: uip-over-mesh.c Log Message: Tag outgoing TCP packets with the ERELIABLE attribute so that an underlying power-saving MAC protocol can treat them differently, because it knows that an ACK might be arriving soon Index: uip-over-mesh.c =================================================================== RCS file: /cvsroot/contiki/contiki-2.x/core/net/uip-over-mesh.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** uip-over-mesh.c 12 Mar 2009 21:58:20 -0000 1.11 --- uip-over-mesh.c 29 Apr 2009 11:40:33 -0000 1.12 *************** *** 234,238 **** packetbuf_copyfrom(&uip_buf[UIP_LLH_LEN], uip_len); ! rt = route_lookup(&receiver); if(rt == NULL) { --- 234,245 ---- packetbuf_copyfrom(&uip_buf[UIP_LLH_LEN], uip_len); ! ! /* Send TCP data with the PACKETBUF_ATTR_ERELIABLE set so that ! an underlying power-saving MAC layer knows that it should be ! waiting for an ACK. */ ! if(BUF->proto == UIP_PROTO_TCP) { ! packetbuf_set_attr(PACKETBUF_ATTR_ERELIABLE, 1); ! } ! rt = route_lookup(&receiver); if(rt == NULL) { |