Created
May 3, 2015 22:01
-
-
Save Bost/152c06f66a681c44c10e to your computer and use it in GitHub Desktop.
network-interface-list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun test-internet () | |
(remove-if (lambda (el) | |
(string-match-p "lo.*" (car el))) | |
(network-interface-list))) | |
(test-internet) | |
(defun tzz-has-network () | |
(remove-if (lambda (i) | |
(or (string-match-p "\\(vboxnet\\|docker\\).*" i) | |
(member 'loopback (nth 4 (network-interface-info i))))) | |
(mapcar 'car (network-interface-list)))) | |
(tzz-has-network) | |
(network-interface-info "eth0") | |
(network-interface-list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment