Friday, May 3, 2013

Clojure: What is my IP address?

I needed to get the IP address of the current host and came across an article Detect your host IP with Clojure which had some good ideas. Unfortunately, this code does not take into account some of issues like network interfaces that are not up. My box is a Windows 7 64-bit box with VirtualBox installed as well as sometimes being docked and sometimes working wirelessly. Using that code as a base, I wrote this code: This code returns a seq of vectors of IP address and the interface name. It only returns interfaces that are up and are not the loopback.

1 comment:

Odis Carnovale said...

IP addresses are either classified as dynamic or static.Static IP addresses will permanently stay the same. They offer a unadorned and efficient way pro distant notebook systems and Internet service providers to get on to friend with you.Dynamic IP addresses can be altered.
For more this information view my friend website what is my ip