## 6 Transport Layer in WMSN  
Transport layer is a group of protocols that run over the network layer to enable end-to-end message transmission. Transport layer aims to provide several services such as: same order delivery, data reliability and loss recovery, flow and congestion control, and possibly QoS requirements (e.g., fairness and timing). TCP and UDP are examples of standard transport protocol that are currently used for the Internet. However, these traditional transport protocols cannot be directly implemented over wireless sensor network [6, 49] because WSN in general and WMSN in particular have their distinctive features, which make them different than typical Internet network, and they have very wide range of applications that need special requirements. Some of the features of WMSN are the following:* _Network topology_: The network topology of WMSN is dynamic due to wireless link condition and node status, and generally it takes the shape of multihop many-to-one (like a star-tree) topology that is either flat or hierarchal. These variations in network topology should be taken into account in designing a transport protocol for WMSN. * _Traffic characteristics_: Most of the traffic in WMSN is generated from the source nodes toward the sink and, depending on the application, this traffic can be continues, event-driven, query-driven, or hybrid. Also in many cases, the source node can send its multimedia traffic using multipath route to the sink and this feature can be exploited to design a suitable transport protocol for keeping the quality of multimedia streaming. * _Resource constrains_: The sensor nodes have limited resources in terms of battery power, communication bandwidth, and memory that require less expensive and more energy efficient solutions for congestion control and reliability. * _Application-specific QoS_: As we mentioned before, WMSN has diverse applications from surveillance and target tracking to environmental and industrial applications. These applications may focus on different sensory data (scalar, snapshot, or streaming) and therefore they need different QoS requirements in terms of reliability level, real-time delivery, certain data rate, fairness, _etc._
* in general
- in WMSN has relatively high redundancy and hence many WMSN applications use multimedia processing, such as feature extraction, data compression, data fusion, and aggregation to decrease the amount of data while keeping the important information. Therefore, reliability against packet loss becomes an issue in WMSN especially if these packets contain important original data such as Region of Interest (ROI). UDP (User Datagram Protocol) uses a simple transmission model without implicit hand-shaking mechanism to provide timeliness for real-time applications like streaming media, but it does not guarantee data reliability, nor does it provide flow and congestion control. On the other hand, TCP (Transmission Control Protocol) is connection-oriented transport protocol based on 3-way hand-shaking mechanism to provide reliable and ordered delivery of data. However, TCP has several disadvantages with respect to WMSN, which are:  
* Overhead of the connection establishment mechanism in TCP might not be suitable for event-driven applications. * TCP uses end-to-end congestion control that requires longer response time (comparing with hop-by-hop control) and may cause more packet loss in case of congestion. * The reliability mechanism in TCP is also based on end-to-end retransmission which consumes more energy and bandwidth than hop-by-hop retransmission. * TCP assumes that packet loss is due to congestion only and hence triggers the rate adjustment process to reduce the traffic rate whenever it detects packet loss. This behavior in TCP leads to decrease the throughput in WMSN because congestion is not only the reason for packet loss, also wireless link condition and bit-error level cause packet loss that cannot be solved by rate reduction.