title: Develop simple net_device in the linux kernel
body: <p>I am trying to implement a netdevice (net_device)  in linux kernel. This is simple net_device  which pass the command/data from user space to kernel space and vice versa this is the goal of this simple net_device. I am using socket for passing command/data from user space to kernel space . After googling  i successed in registering net_device and able to see my device in /sys/class/net/abc0 (device name)
  when coming to file operation there is no clear idea of the flow </p>
  
  <pre><code> struct net_device_ops
   {   
     .ndo_open  =open,
  
     .ndo_close = close,
  
     .ndo_start_xmit = start_xmit   
   }
  </code></pre>
  
  <ul>
  <li><p>if i issue <strong>write</strong> in <strong><em>socket</em></strong> will it call start_xmit in data link layer.</p></li>
  <li><p>If i want to call open method, how to call it using <strong>socket</strong></p></li>
  <li><p>How to call start_xmit using <strong>socket</strong> </p></li>
  <li><p>How will i find , there is data packet in the receive buffer and pass it to user space. </p></li>
  </ul>
  
  <p>There is no clear flow/information about simple net_device (except ethernet) can any suggest a link/pdf.</p>
  
  <p>I tried writing simple socket program to test open,close,start_xmit. where socket read/write is not calling open,close,star_xmit . 
  <strong>Is there any way to test the developed net_device ?</strong>    </p>
  
  <p>Thank you</p>