Skip to content

Instantly share code, notes, and snippets.

@Bost
Created May 3, 2015 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bost/152c06f66a681c44c10e to your computer and use it in GitHub Desktop.
Save Bost/152c06f66a681c44c10e to your computer and use it in GitHub Desktop.
network-interface-list
(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