;//Local system uses a modem to connect to the Internet. ; //Local system uses a local area network to connect to the Internet. ;//Local system uses a proxy server to connect to the Internet. ; //No longer used. ; //Local system has a valid connectio…
转自:http://stackoverflow.com/questions/808560/how-to-detect-the-physical-connected-state-of-a-network-cable-connector You want to look at the nodes in /sys/class/net/ I experimented with mine: Wire Plugged in: eth0/carrier:1eth0/operstate:unknown Wire…