Java tutorial
import java.net.NetworkInterface; public class Main { static public void main(String args[]) throws Exception { NetworkInterface ni = NetworkInterface.getByName(args[0]); System.out.println(ni); } }