title: Problems with linux network driver
body: <p>I have some trouble in developing a Linux driver for an underwater acoustic modem. The general idea of my project is to bring IPv6 to the underwater network. The expected result is that the underwater sensor network will have access from any typical internet devices. To achieve and implement my target, I have to provide the modem a driver so that I can use the routing protocols provided by the Linux kernel. However, due to the differences of underwater communication and typical RF communication, I have to do some processes on the packets, including fragmenting, header compressing and mesh routing. But all these process should be transparent, and the modem should be used as any other network interfaces.</p>
  
  <p>The modem can communicate with computer with serial port. But I have to use the pl2303 USB to serial converter to connect it. Also the device which drives the modem is not only computer, but also an embedded Linux system called Gumstix.   I tried several different ways to do it, but I cannot achieve my final goal.</p>
  
  <p>The first solution is to make a pure user mode driver. It can be easy to handle but I cannot create an interface like eth0, and I cannot ping through it. What’s worse, I have to implement all the IPv6 standard by myself, which I believe is actually a waste of time.</p>
  
  <p>The second solution is to make a pure kernel mode driver. The advantage is that I can exploit the existed code to deal with the IPv6 and upper level stuff, and I can have a beautiful interface.  But it is not recommended to open serial port as a file in kernel mode. Although I have tried to do that, I always receives some garbage bytes.</p>
  
  <p>Later I have tried a third solution. I make a daemon program that sends and receives from the serial port and use a net link socket to communication with the driver in the kernel. I wonder if any driver is doing so. But if any user wants to use my driver, they have to compile for their device and start it up by hand. Moreover, the inter-process communication is not reliable and I have no idea if the kernel has received my packet.</p>