X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fnet%2Fblip%2FTcpP.nc;h=4ade476c94f5a746cce999e839c3c5d471154d28;hb=b5f791c14df3d1a9bfebf2a49440ac118438c5fd;hp=02c42aff7f80b66eb8c3b0e9ed598dca14ddab38;hpb=c76f0ecb25bc766d836b79552b1659b7a7465b56;p=tinyos-2.x.git diff --git a/tos/lib/net/blip/TcpP.nc b/tos/lib/net/blip/TcpP.nc index 02c42aff..4ade476c 100644 --- a/tos/lib/net/blip/TcpP.nc +++ b/tos/lib/net/blip/TcpP.nc @@ -60,15 +60,6 @@ module TcpP { #include "circ.c" #include "tcplib.c" - void setSrcAddr(struct split_ip_msg *msg) { - if (msg->hdr.ip6_dst.s6_addr16[0] == htons(0xff02) || - msg->hdr.ip6_dst.s6_addr16[0] == htons(0xfe80)) { - call IPAddress.getLLAddr(&msg->hdr.ip6_src); - } else { - call IPAddress.getIPAddr(&msg->hdr.ip6_src); - } - } - struct tcplib_sock socks[uniqueCount("TCP_CLIENT")]; struct tcplib_sock *tcplib_accept(struct tcplib_sock *conn, @@ -87,7 +78,7 @@ module TcpP { void tcplib_send_out(struct split_ip_msg *msg, struct tcp_hdr *tcph) { printfUART("tcp output\n"); - setSrcAddr(msg); + call IPAddress.setSource(&msg->hdr); tcph->chksum = htons(msg_cksum(msg, IANA_TCP)); call IP.send(msg); }