Mercurial > hg > y16 > e165731 > os > ex7.2
changeset 0:ddefd797b06d default tip
ex7.2
author | aryu <e165731@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 11 Feb 2018 20:49:06 +0900 |
parents | |
children | |
files | getAdd.java getAdd.log ifconfig.log |
diffstat | 3 files changed, 89 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/getAdd.java Sun Feb 11 20:49:06 2018 +0900 @@ -0,0 +1,17 @@ +import java.net.UnknownHostException; +import java.net.InetAddress; + +public class getAdd{ + public static void main(String[] args){ + try{ + InetAddress addr = InetAddress.getLocalHost(); + InetAddress[] Addresses = InetAddress.getAllByName(addr.getHostName()); + System.out.println("Local Host Name\t IP Address"); + for(InetAddress add : Addresses){ + System.out.println(add.getHostName()+"\t\t"+add.getHostAddress()); + } + }catch(UnknownHostException e){ + e.printStackTrace(); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/getAdd.log Sun Feb 11 20:49:06 2018 +0900 @@ -0,0 +1,7 @@ +Local Host Name IP Address +aryu.local 25.44.111.246 +aryu.local 10.10.8.186 +aryu.local fe80:0:0:0:106d:f16f:531e:3c78%4 +aryu.local fe80:0:0:0:7879:19ff:fe2c:6ff6%10 +aryu.local 2001:2f8:1c:a506:18b0:9e2d:6a9c:6713 +aryu.local 2620:9b:0:0:0:0:192c:6ff6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ifconfig.log Sun Feb 11 20:49:06 2018 +0900 @@ -0,0 +1,65 @@ +lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 + options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP> + inet 127.0.0.1 netmask 0xff000000 + inet6 ::1 prefixlen 128 + inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 + nd6 options=201<PERFORMNUD,DAD> +gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280 +stf0: flags=0<> mtu 1280 +en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 + ether f4:5c:89:8b:c6:1b + inet6 fe80::106d:f16f:531e:3c78%en0 prefixlen 64 secured scopeid 0x4 + inet6 2001:2f8:1c:a506:18b0:9e2d:6a9c:6713 prefixlen 64 autoconf secured + inet6 2001:2f8:1c:a506:11aa:45f6:c2f9:f0fd prefixlen 64 autoconf temporary + inet 10.10.8.186 netmask 0xfffff000 broadcast 10.10.15.255 + nd6 options=201<PERFORMNUD,DAD> + media: autoselect + status: active +en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500 + options=60<TSO4,TSO6> + ether 4a:00:04:6a:be:20 + media: autoselect <full-duplex> + status: inactive +en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500 + options=60<TSO4,TSO6> + ether 4a:00:04:6a:be:21 + media: autoselect <full-duplex> + status: inactive +bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 + options=63<RXCSUM,TXCSUM,TSO4,TSO6> + ether 4a:00:04:6a:be:20 + Configuration: + id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0 + maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200 + root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0 + ipfilter disabled flags 0x2 + member: en1 flags=3<LEARNING,DISCOVER> + ifmaxaddr 0 port 5 priority 0 path cost 0 + member: en2 flags=3<LEARNING,DISCOVER> + ifmaxaddr 0 port 6 priority 0 path cost 0 + nd6 options=201<PERFORMNUD,DAD> + media: <unknown type> + status: inactive +p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304 + ether 06:5c:89:8b:c6:1b + media: autoselect + status: inactive +awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484 + ether 7e:1c:41:40:06:83 + inet6 fe80::7c1c:41ff:fe40:683%awdl0 prefixlen 64 scopeid 0x9 + nd6 options=201<PERFORMNUD,DAD> + media: autoselect + status: active +ham0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1404 + ether 7a:79:19:2c:6f:f6 + inet 25.44.111.246 netmask 0xff000000 broadcast 25.255.255.255 + inet6 fe80::7879:19ff:fe2c:6ff6%ham0 prefixlen 64 scopeid 0xa + inet6 2620:9b::192c:6ff6 prefixlen 96 + nd6 options=201<PERFORMNUD,DAD> + open (pid 88) +utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000 + inet6 fe80::8fe3:367c:d3f6:2bb6%utun0 prefixlen 64 scopeid 0xb + nd6 options=201<PERFORMNUD,DAD> +utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380 + inet6 fe80::794:c9ec:6315:ae6%utun1 prefixlen 64 scopeid 0xc + nd6 options=201<PERFORMNUD,DAD>