I
Iñaki Baz Castillo
Hi, basically I'm looking for a way to find all the IP's in the
network interfaces of my computer in a reliable way.
I know a "workaround":
--------------------------
UDPSocket.open {|s| s.connect "1.2.3.4", 80; s.addr }
---------------------------
=3D> ["AF_INET", 33564, "192.168.1.16", "192.168.1.16"]
But this method knows nothing about other IP's in the same interface,
neither allows me to discover other IP's in other interfaces with
different routes.
Is there something as "ifconfig" or "ip addr show" commands for Ruby?
Thanks a lot.
--=20
I=C3=B1aki Baz Castillo
<[email protected]>
network interfaces of my computer in a reliable way.
I know a "workaround":
--------------------------
UDPSocket.open {|s| s.connect "1.2.3.4", 80; s.addr }
---------------------------
=3D> ["AF_INET", 33564, "192.168.1.16", "192.168.1.16"]
But this method knows nothing about other IP's in the same interface,
neither allows me to discover other IP's in other interfaces with
different routes.
Is there something as "ifconfig" or "ip addr show" commands for Ruby?
Thanks a lot.
--=20
I=C3=B1aki Baz Castillo
<[email protected]>