title: Find the number of retransmitted packets
body: <p>I am using tcp_info to print out the information about a specific socket.
  I am using tcpi_total_retrans to print out the total number of the retransmitted packets. However, when I compared the result to tcpdump result of the number of retransmitted packets it is different (tcpi_total_retrans shows larger number than tcpdump). Any ideas why is that happening? Isn't tcpi_total_retrans suppose to calculate the total number of the retransmitted packets?
  I am modifying a code for a tool called BWdetail to print out the total number of retransmitted packets, you can find the tool code <a href="http://www.ece.virginia.edu/cheetah/software/software.html" rel="nofollow">here</a>.
  Also, I am running tcpdump just before running the tool, then killing it directly after the tool finished running.
  This is tcpdump output:</p>
  
  <pre><code> a-&gt;b:                b-&gt;a:
       total packets:         81852           total packets:        130675      
       ack pkts sent:         81852           ack pkts sent:        130675      
       pure acks sent:            0           pure acks sent:       130675      
       sack pkts sent:            0           sack pkts sent:            0      
       dsack pkts sent:           0           dsack pkts sent:           0      
       max sack blks/ack:         0           max sack blks/ack:         0      
       unique bytes sent: 1088069192           unique bytes sent:         0      
       actual data pkts:      81852           actual data pkts:          0      
       actual data bytes: 1088083672           actual data bytes:         0      
       rexmt data pkts:          10           rexmt data pkts:           0      
       rexmt data bytes:      14480           rexmt data bytes:          0      
       zwnd probe pkts:           0           zwnd probe pkts:           0      
       zwnd probe bytes:          0           zwnd probe bytes:          0      
       outoforder pkts:           0           outoforder pkts:           0      
       pushed data pkts:       2737           pushed data pkts:          0      
       SYN/FIN pkts sent:       0/0           SYN/FIN pkts sent:       0/0      
       req 1323 ws/ts:          N/Y           req 1323 ws/ts:          N/Y      
       urgent data pkts:          0 pkts      urgent data pkts:          0 pkts 
       urgent data bytes:         0 bytes     urgent data bytes:         0 bytes
       mss requested:             0 bytes     mss requested:             0 bytes
       max segm size:         33304 bytes     max segm size:             0 bytes
       min segm size:          1448 bytes     min segm size:             0 bytes
       avg segm size:         13293 bytes     avg segm size:             0 bytes
       max win adv:             192 bytes     max win adv:             232 bytes
       min win adv:             192 bytes     min win adv:             181 bytes
       zero win adv:              0 times     zero win adv:              0 times
       avg win adv:             192 bytes     avg win adv:             228 bytes
       initial window:        17376 bytes     initial window:            0 bytes
       initial window:            1 pkts      initial window:            0 pkts 
       ttl stream length:        NA           ttl stream length:        NA      
       missed data:              NA           missed data:              NA      
       truncated data:    1087756264 bytes     truncated data:            0 bytes
       truncated packets:     81852 pkts      truncated packets:         0 pkts 
       data xmit time:        9.986 secs      data xmit time:        0.000 secs 
       idletime max:           15.7 ms        idletime max:           15.3 ms   
       throughput:        108955360 Bps       throughput:                0 Bps  
  </code></pre>
  
  <p>Thank you.</p>