In ruby 1.8.5, how can I check for the existence of a named network interface like eth0 or wan0 under linux? Even checking the existence would be a start. I'm aware that I could wrap a shell command to use ifconfig or somesuch, but would rather have a pure ruby solution.
Another way of phrasing the question might be "If I was implementing ifconfig in ruby, what API would I use?"