[PC-BSD Dev] Network manager improvements

Claudio claudio at hpgcc3.org
Fri Apr 26 18:45:24 PDT 2013


Hello,
I started looking at the network manager. I have a vague idea of what is 
needed so let's open it for discussion.
I think you want something like in Windows, that shows in the icon when 
internet is not available (even if the interface is up), and then offer 
troubleshooting help, which I've never seen actually fixing anything, 
just offering useless advice and renewing the dhcp lease. But if that's 
what we need to do, then here's what I think needs to be implemented:
1- Check if there's internet access. This could be done by pinging an 
external server regularly (every 10 seconds?), but which server/site 
should we ping? Any company receiving a flood of pings from pc-bsd 
machines will certainly not like it, and I'm sure many people won't like 
their computers sending ping packets all the time. So how do we do it?
2- Check if there's LAN access. This can be done by pinging the local 
gateway registered in the connection.
3- Check if there's DNS. This one is easy. Also we can check other 
alternative DNS servers like OpenDNS and offer the user those if the 
default DNS is down.
4- Check if the interface has an IP, if not then try to renew the DHCP 
lease (or just get another IP on IPv6), or if it's static, then show the 
network configuration for the user to manually fix.
5- Check if the interface is up, and the link shows as connected.

The tests above should be done every perhaps 10 seconds (maybe 
quicker?), and the icon be updated if something goes wrong.

The list above requires a lot of 'pings'. Forking the ping command will 
be very slow and resource intensive. I looked at the library liboping in 
the ports, and it looks like it could work. However, I'm not sure the 
network tray process will have the proper permissions (needs to be root 
to send ping packets). Perhaps we should have a separate deamon that 
checks the status of the connection? Then the tray manager can get the 
status info without any privileges?.

Am I even on the right track?

Any comments are welcome.
Claudio


More information about the Dev mailing list