## 6 Transport Layer in WMSN
### Congestion Control  
Congestion control is one of the services done by transport layer protocols to mitigate congestion in the network. Congestion, in wireless sensor networks, not only wastes the scarce energy due to a large number of retransmissions and packet drops, but also hinders the event detection reliability and link utilization. As we pointed before, there are two main reasons for causing congestion in WMSN: The first one is called node-level congestion that is due to the packet arrival rate exceeds the packet-service rate causing buffer overflow in the node and can result in packet loss, and increasing queuing delay. This is more likely happen at sensor nodes close to the sink, as they usually carry more combined upstream traffic. The second one is link-level congestion that is related to the wireless channel condition due to contention, interference, and bit-error rate. Congestion control mechanism consists of three steps: congestion detection, congestion notification, and rate adjustment. There are two ways to detect congestion either using active method such as timer or acknowledgment, or proactive method using queue length as in QCCP-PS [50], LRCC [51], CODA [52], packet service time as in CCF [53], or ratio of packet service time over packet inter-arrival time as in PCCP [54]. Congestion notification can be done either explicitly by using special control messages as in LRCC [51], or implicitly by piggybacking congestion information in normal data packets (e.g., using congestion notification, CN, bit as in QCCP-PS [50], Fusion [55], CCF [53]). Rate adjustment is done by step-by-step decreasing of the traffic rate into the congested area in case of using CN bit as in QCCP-PS [50], or using accurate rate adjustment if there is enough available information as in PCCP [54]. Some techniques as in LRCC [51] try to reduce the traffic rate into the congested area, but in the same time, avoid reducing the source stream traffic rate -in order to maintain the received quality of multimedia  
Figure 3: WMSN Transport Protocols Classification. streaming- by balancing the stream traffic over multiple paths and reducing the traffic toward the current congested path. A Queue based Congestion Control Protocol with Priority Support (QCCP-PS) is presented in [50] to deal with congestion control in the transport layer. QCCP-PS focuses only on congestion control as it is very important for WMSN to support different applications. QCCP-PS congestion control mechanism is based on hop-by-hop approach and consists of three parts: congestion detection unit, congestion notification unit, and rate adjustment unit. To detect congestion, QCCP-PS uses the queue length as an indication of congestion degree where there is separate queue to store input packets from each child node in addition to a queue for the source traffic from the receiving node itself. The output of this detection process is called congestion index. QCCP-PS assumes that each sensor node has different priority, and depending on that the rate assignment to each traffic source, as well as its local traffic source, is based on its priority index and its congestion index. Therefore, the sending rate of each traffic source is increased or decreased depending on its congestion degree and its priority. Congestion notification and the new adjusted rates are sent implicitly by piggybacking the new rate value of each child node with the sending data of each sensor node. It has been shown that QCCP-PS has better performance than other protocols such as Priority based Congestion Control Protocol (PCCP) that uses priority index for decreasing rate only in case of congestion. Another congestion control framework for WMSN is proposed in [51] to provide the necessary bandwidth and to alleviate the congestion problem to multimedia streaming. The proposed congestion control mechanism is implemented on the top of multipath routing facility.