Since revision 1.11 the usage of the label 'ip_send_nolen' isn't solely depending on UIP_UDP anymore.

This commit is contained in:
oliverschmidt 2008-02-15 17:12:46 +00:00
parent df441f50a3
commit 8f81934bfd

View file

@ -41,7 +41,7 @@
*
* This file is part of the uIP TCP/IP stack.
*
* $Id: uip.c,v 1.11 2008/02/07 01:34:25 adamdunkels Exp $
* $Id: uip.c,v 1.12 2008/02/15 17:12:46 oliverschmidt Exp $
*
*/
@ -1146,6 +1146,7 @@ uip_process(u8_t flag)
uip_sappdata = uip_appdata = &uip_buf[UIP_LLH_LEN + UIP_IPUDPH_LEN];
uip_slen = 0;
UIP_UDP_APPCALL();
udp_send:
if(uip_slen == 0) {
goto drop;
@ -1201,7 +1202,6 @@ uip_process(u8_t flag)
goto drop;
}
/* Demultiplex this segment. */
/* First check any active connections. */
for(uip_connr = &uip_conns[0]; uip_connr <= &uip_conns[UIP_CONNS - 1];
@ -1231,8 +1231,8 @@ uip_process(u8_t flag)
/* No matching connection found, so we send a RST packet. */
UIP_STAT(++uip_stat.tcp.synrst);
reset:
reset:
/* We do not send resets in response to resets. */
if(BUF->flags & TCP_RST) {
goto drop;
@ -1450,7 +1450,6 @@ uip_process(u8_t flag)
uip_connr->snd_nxt[2] = uip_acc32[2];
uip_connr->snd_nxt[3] = uip_acc32[3];
/* Do RTT estimation, unless we have done retransmissions. */
if(uip_connr->nrtx == 0) {
signed char m;
@ -1803,20 +1802,22 @@ uip_process(u8_t flag)
}
goto drop;
/* We jump here when we are ready to send the packet, and just want
to set the appropriate TCP sequence numbers in the TCP header. */
tcp_send_ack:
BUF->flags = TCP_ACK;
tcp_send_nodata:
uip_len = UIP_IPTCPH_LEN;
tcp_send_noopts:
BUF->tcpoffset = (UIP_TCPH_LEN / 4) << 4;
tcp_send:
/* We're done with the input processing. We are now ready to send a
reply. Our job is to fill in all the fields of the TCP and IP
headers before calculating the checksum and finally send the
packet. */
tcp_send:
BUF->ackno[0] = uip_connr->rcv_nxt[0];
BUF->ackno[1] = uip_connr->rcv_nxt[1];
BUF->ackno[2] = uip_connr->rcv_nxt[2];
@ -1862,10 +1863,7 @@ uip_process(u8_t flag)
BUF->tcpchksum = 0;
BUF->tcpchksum = ~(uip_tcpchksum());
#if UIP_UDP
ip_send_nolen:
#endif /* UIP_UDP */
#if UIP_CONF_IPV6
BUF->vtc = 0x60;
BUF->tcflow = 0x00;
@ -1881,9 +1879,9 @@ uip_process(u8_t flag)
BUF->ipchksum = 0;
BUF->ipchksum = ~(uip_ipchksum());
DEBUG_PRINTF("uip ip_send_nolen: chkecum 0x%04x\n", uip_ipchksum());
#endif /* UIP_CONF_IPV6 */
#endif /* UIP_CONF_IPV6 */
UIP_STAT(++uip_stat.tcp.sent);
send:
DEBUG_PRINTF("Sending packet with length %d (%d)\n", uip_len,
(BUF->len[0] << 8) | BUF->len[1]);
@ -1892,6 +1890,7 @@ uip_process(u8_t flag)
/* Return and let the caller do the actual transmission. */
uip_flags = 0;
return;
drop:
uip_len = 0;
uip_flags = 0;