title: How to create a kernel module that can intercept all packets coming to/from a network interface
body: <p>I have 2 port NIC on my system - eth0 and eth1 as seen by Linux.<br>
  I want to intercept all packets coming in/to eth0, send them out through eth1 to an external device connected to the same switch as eth1 is. So I need to slap on an additional header to make it reach the correct external device.  </p>
  
  <p>I know that there is a concept of network taps that both the transmit and receive code in the kernel send to, but how do I create one? Also I want to capture not just IP, but all ethernet packets, I know <code>NETFILTER_HOOK</code> would have helped me get me IPv4 packets.</p>