title: detect packet fragmentation in kernel module netfilter hooking
body: <p>I am not able to detect if packet fragmented or not and packet offset.</p>
  
  <p>I dump header data</p>
  
  <pre><code> printk("frt_offset=%d ", ((ip_header-&gt;frag_off)));//print all, not 13 bytes of it
   printk("fr_cf=%d ", (ntohs(ip_header-&gt;frag_off) &amp; IP_CE) &gt; 0);
   printk("frt_df=%d ", (ntohs(ip_header-&gt;frag_off) &amp; IP_DF) &gt; 0);
   printk("fr_mf=%d ", (ntohs(ip_header-&gt;frag_off) &amp; IP_MF) &gt; 0);
  </code></pre>
  
  <p>but when I downloaded file with module enabled I got this output:</p>
  
  <pre><code>[40432.831134] packet size=1514 timestamp=-790555865  frt_id=60370 frt_offset=64 fr_xf=0    frt_df=1 fr_mf=0
  [40432.831318] packet size=1514 timestamp=-790371858  frt_id=60626 frt_offset=64 fr_xf=0 frt_df=1 fr_mf=0 
  [40432.831496] packet size=1514 timestamp=-790193971 frt_id=60882 frt_offset=64 fr_xf=0   frt_df=1 fr_mf=0 
  [40432.831905] packet size=1514 timestamp=-789785167 frt_id=61138 frt_offset=64 fr_xf=0 frt_df=1 fr_mf=0 
  [40432.832098] packet size=1514 timestamp=-789592131 frt_id=61394 frt_offset=64 fr_xf=0 frt_df=1 fr_mf=0 
  [40432.832504] packet size=1514 timestamp=-789186978 frt_id=61650 frt_offset=64 fr_xf=0 frt_df=1 fr_mf=0 
  [40436.131049] packet size=45 timestamp=-1785619342 frt_id=4464 frt_offset=0 fr_xf=0 frt_df=0 fr_mf=0 
  </code></pre>
  
  <p>But as I understood, for fragmented packets I must got the same id, various offset, flag mf=1. We have something another here. Last packet here may be packet from another session.</p>
  
  <p>I lost my way...</p>