title: printing sequence number of a sniffed packet
body: <p>i am using pcap to create a packet sniffer.<br>
  i have this tcp structure:  </p>
  
  <pre><code>typedef struct TSP_header{  
    unsigned short int   sport;  
    unsigned short int   dport;  
    unsigned int         seqnum;  
    unsigned int         acknum;  
    unsigned char        reserved:4, offset:4;  
    unsigned int
      tcp_res1:4,       //little-endian  
      tcph_hlen:4,      //length of tcp header in 32-bit words  
      tcph_fin:1,       //Finish flag "fin"  
      tcph_syn:1,       //Synchronize sequence numbers to start a   connection
      tcph_rst:1,       //Reset flag   
      tcph_psh:1,       //Push, sends data to the application  
      tcph_ack:1,       //acknowledge  
      tcph_urg:1,       //urgent pointer  
      tcph_res2:2;
    unsigned short int tcph_win;  
    unsigned short int tcph_chksum;  
    unsigned short int tcph_urgptr;  
  }TSP_header;    
  </code></pre>
  
  <p>how can i print the sequence number?<br>
  should i use htons(sequence_number)??  because it isn't working this way!!  </p>
  
  <p>my other question is what is the number after the variable declaration?<br>
  what does 4 mean in tcph_hlen:4 </p>