title: Simulate dropped packets on Linux, based on protocol (UDP, TCP etc)
body: <p>I know I can use tc and netem to do </p>
  
  <pre><code>tc qdisc add dev eth0 root netem loss 50%
  </code></pre>
  
  <p>This would drop 50% of packets in all of eth0 traffic. However, I would like to specify a protocol (UDP, TCP etc), so only packets of this protocol would be dropped. </p>