Results 1 to 1 of 1
- 07-13-2011, 02:19 PM #1
Member
- Join Date
- Jul 2011
- Posts
- 1
- Rep Power
- 0
getNetworkPrefixLength() returns strange subnet mask
The following code:
returns:Java Code:InetAddress localHost = Inet4Address.getLocalHost(); NetworkInterface networkInterface = NetworkInterface.getByInetAddress(localHost); for (InterfaceAddress address : networkInterface.getInterfaceAddresses()) { System.out.println(address.getAddress() + "/" + address.getNetworkPrefixLength()); }
My subnet mask is /24, not /128. Is it a Java bug?Java Code:/fe80:0:0:0:11da:433a:412a:8c23%13/64 /192.168.1.107/128
Similar Threads
-
Average returns 0
By jehduncs in forum New To JavaReplies: 2Last Post: 12-03-2010, 06:29 PM -
Creating a mask for animation
By micah11 in forum New To JavaReplies: 2Last Post: 10-25-2010, 04:31 AM -
.DAY_OF_WEEK always returns 7
By shurgs in forum New To JavaReplies: 2Last Post: 08-20-2010, 02:32 PM -
How to mask password characters
By Roselicious in forum New To JavaReplies: 4Last Post: 04-16-2010, 02:26 AM -
How to Mask input string
By nmc.091 in forum New To JavaReplies: 1Last Post: 02-23-2009, 03:49 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks