I'm trying to find where in linux i would be able to setup the network interface for g_ether. Basically I want to run avahi-autoipd and dhcpd on the usb0 interface when it comes up. The problem is that linux isn't as transparent about how all this things are supposed to work. I worked with wince previously and what I want to do was really simple registry options...
So in my /etc/network/interfaces I have set usb0 as manual with custom scripts for up/down.
iface usb0 inet manual
When I plug in my device to a host pc, neither is run. I guess i don't really understand how g_ether acts as a network interface since it doesn't seem to know its available, and doesn't run ifup for it. If i run ifup usb0 the scripts will run.
I'm thinking i can create a udev rule, when the usb is plugged in, to run ifup usb0 and ifdown usb0 depending on the state.
Any help would be much appreciated.