Java Code Examples for java.net.Inet6Address#getLocalHost()
The following examples show how to use
java.net.Inet6Address#getLocalHost() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ErrorSpecIPv6.java From netphony-network-protocols with Apache License 2.0 | 6 votes |
public ErrorSpecIPv6(){ classNum = 6; cType = 2; length = 24; bytes = new byte[length]; try{ errorNodeAddress = (Inet6Address) Inet6Address.getLocalHost(); }catch(UnknownHostException e){ } flags = 0; errorCode = 0; errorValue = 0; }
Example 2
Source File: SessionIPv6.java From netphony-network-protocols with Apache License 2.0 | 6 votes |
/** * */ public SessionIPv6(){ classNum = 1; cType = 2; length = 24; bytes = new byte[length]; try{ destAddress = (Inet6Address) Inet6Address.getLocalHost(); }catch(UnknownHostException e){ } protocolId = 0; flags = 0; destPort = 0; }
Example 3
Source File: TestInetAddressServlet.java From appengine-java-vm-runtime with Apache License 2.0 | 5 votes |
/** * Get instances of InetAddress by calling InetAddress.getLocalHost(), * InetAddres4.getLocalHost() and Inet6Address.getLocalHost() and then test * their properties. * @param response HttpServletResponse used to return failure message * @throws IOException * @throws AssertionFailedException If an assertion fails */ private static void testGetLocalHost(HttpServletResponse response) throws IOException, AssertionFailedException { InetAddress localHost = InetAddress.getLocalHost(); testLocalHost(localHost, response); testLocalHost4((Inet4Address) localHost, response); localHost = Inet4Address.getLocalHost(); testLocalHost(localHost, response); localHost = Inet6Address.getLocalHost(); testLocalHost(localHost, response); }
Example 4
Source File: FlowLabelFilterSpecIPv6.java From netphony-network-protocols with Apache License 2.0 | 5 votes |
public FlowLabelFilterSpecIPv6(){ classNum = 10; cType = 3; length = 24; bytes = new byte[length]; try{ srcAddress = (Inet6Address) Inet6Address.getLocalHost(); }catch(UnknownHostException e){ } flowLabel = 0; }
Example 5
Source File: FilterSpecIPv6.java From netphony-network-protocols with Apache License 2.0 | 5 votes |
public FilterSpecIPv6(){ classNum = 10; cType = 2; length = 24; bytes = new byte[length]; try{ srcAddress = (Inet6Address) Inet6Address.getLocalHost(); }catch(UnknownHostException e){ } srcPort = 0; }
Example 6
Source File: ResvConfirmIPv6.java From netphony-network-protocols with Apache License 2.0 | 5 votes |
public ResvConfirmIPv6(){ classNum = 15; cType = 2; length = 20; bytes = new byte[length]; try{ receiverAddress = (Inet6Address) Inet6Address.getLocalHost(); }catch(UnknownHostException e){ } }
Example 7
Source File: RSVPHopIPv6.java From netphony-network-protocols with Apache License 2.0 | 5 votes |
public RSVPHopIPv6(){ classNum = 3; cType = 2; length = 24; bytes = new byte[length]; try{ next_previousHopAddress = (Inet6Address) Inet6Address.getLocalHost(); }catch(UnknownHostException e){ } logicalInterfaceHandle = 0; }