Created
January 19, 2015 02:55
-
-
Save spencerwi/ccbd32e4afa2fac23383 to your computer and use it in GitHub Desktop.
Quick util to print out the IP addresses on a machine. Requires Quicklisp.
This file contains hidden or 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
(ql:quickload :ip-interfaces) | |
(defun ip-as-string (interface) | |
(format nil "~{~A~^~.~}" (map 'list (lambda (x) x) (ip-interfaces:ip-interface-address interface)))) | |
(defun print-interface-ip (interface) | |
(format t "~A: ~A~%" (ip-interfaces:ip-interface-name interface) (ip-as-string interface))) | |
(loop for interface in (ip-interfaces:get-ip-interfaces) | |
do (print-interface-ip interface)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment