I'm not sure I understand the question, so let me know if my answer doesn't make sense.
I see you have defined functions for .ndo_open
, .ndo_stop
, and .ndo_start_xmit
. .ndo_open
is called by the kernel when you configure the interface using ifconfig up
or use ifconfig to assign an address to the interface. .ndo_stop
is called by the kernel when you remove the module or if you shutdown the interface using ifconfig down
.
ifconfig is described here: http://linux.die.net/man/8/ifconfig
.ndo_start_xmit
is called by the kernel network stack when a socket is used to transmit a packet. So, to transmit data using .ndo_start_xmit
you'll need to create a socket, assign an appropriate destination address, and send the data via the socket. If you're using IP, there are tools you can use send packets easily, such as netperf or iperf.