> > I can't quite imagine how this would look... could you elaborate? Some > > autoconfiguration could be achieved, but things like TE/NT mode would > > still need to be in a configuration script yes? > > They need to be in a configuration file. When the system boots or detects > a card being inserted (hotpluggable PCI or simply USB) it would call > hotplug/udev which would run a script which in turn would search for the > appropriate configuration and apply it to the new card.
I'm sure there's a good reason for this, but why is the netdev creation initiated from userspace? Shouldn't the modules themselves create the network devices? If that happened, then udev could trigger a script that is called on creation of the visdnX interface, where the script would configure the parameters (protocol, role, mode) and then (assuming my thinking is right) attach the port to it. Obviously this leaves the netdev interface numbering up to the kernel, but udev supports interface renaming so this shouldn't pose a significant problem anyway (assuming the visdnX interfaces allow it), and I think it would be kind of neat to name my netdevs with more meaningful names :) So just to summarise my ideas, the configuration would be done as follows: #1 /etc/init.d/visdn loads the core modules at boot (before udev starts or visdn driver modules are loaded hopefully) #2 the adapter is detected (either it was already plugged in on boot, or it has been connected later) and the module is loaded which creates the required netdevs. Netdevs are optionally named in the udev rules, possibly based on of some unique identifier on the card. I think bus address is the only thing to go on and I have no idea how this works for usb, which may be a show stopper. #3 udev detects the creation of visdn netdevs and RUN's a configure script, netdevs are identified in the config script by name. #4 if required (and if it's running), the scripts also send a message to asterisk to re-load the visdn (and optionally extensions) configuration files. Comments? (btw, what is the significance of the port? Eg st0? Have I got my head on backwards here and the port is the most significant entity and the netdevs just hang off of it?) James _______________________________________________ Visdn-hackers mailing list [email protected] https://mailman.uli.it/mailman/listinfo/visdn-hackers
