title: How to use tun/tap interface to split packets, tunnel and then reassemble. (similar to MLPPP)
body: <p>I am looking to create a client/server application that I can use to slit network packets in half, tunnel each half of the packet over a separate udp connection (because each udp connection will be going over a different wifi link) and then reassemble the split packets on the other end. In addition to splitting the packets each half packet will also have to have an ID and sequence number so that they can be reassembled properly. </p>
  
  <p>Basically I am trying to do something similar to <a href="http://www.juniper.net/techpubs/software/erx/junose72/swconfig-link/html/mlppp-config2.html" rel="nofollow">MLPPP</a> </p>
  
  <p>I am looking to do this using python and the TUN/TAP network driver.
  I have found the following python code samples and modules that I think might be helpful for this project.</p>
  
  <p><em>Python tun/tap</em> </p>
  
  <ul>
  <li><a href="http://www.secdev.org/projects/tuntap_udp/files/tunproxy.py" rel="nofollow">http://www.secdev.org/projects/tuntap_udp/files/tunproxy.py</a></li>
  <li><a href="http://twistedmatrix.com/trac/browser/trunk/twisted/pair/tuntap.py" rel="nofollow">http://twistedmatrix.com/trac/browser/trunk/twisted/pair/tuntap.py</a></li>
  <li><a href="http://pastebin.com/gMB8zUfj" rel="nofollow">http://pastebin.com/gMB8zUfj</a></li>
  </ul>
  
  <p><em>Python raw packet manipulation</em></p>
  
  <ul>
  <li><a href="http://libdnet.sourceforge.net/" rel="nofollow">http://libdnet.sourceforge.net/</a></li>
  <li><a href="http://pypi.python.org/pypi/pyip/" rel="nofollow">http://pypi.python.org/pypi/pyip/</a></li>
  <li><a href="http://code.google.com/p/python-packet/" rel="nofollow">http://code.google.com/p/python-packet/</a></li>
  </ul>
  
  <p>My question is can the necessary packet modification be done using python and what would be a possible way to approach this? Can I use the modules above to do this or is there a better solution? I am looking for some input that will steer me in the right direction as I am not an experienced programmer. Any code samples or additional links are welcome.</p>