Java IP Address Get getIntfFromLabelAdva(int n, Inet4Address ip)

Here you can find the source of getIntfFromLabelAdva(int n, Inet4Address ip)

Description

get Intf From Label Adva

License

Apache License

Declaration

public static int getIntfFromLabelAdva(int n, Inet4Address ip) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.net.Inet4Address;

public class Main {
    public static int getIntfFromLabelAdva(int n, Inet4Address ip) {
        if ((n == 5) && (ip.getHostAddress().equals("172.16.1.40"))) {
            return 27;
        } else if ((n == 8) && (ip.getHostAddress().equals("172.16.1.40"))) {
            return 25;
        } else if ((n == 8) && (ip.getHostAddress().equals("172.16.1.38"))) {
            return 21;
        } else if ((n == 7) && (ip.getHostAddress().equals("172.16.1.38"))) {
            return 17;
        } else if ((n == 7) && (ip.getHostAddress().equals("172.16.1.34"))) {
            return 3;
        } else if ((n == 5) && (ip.getHostAddress().equals("172.16.1.34"))) {
            return 1;
        }/*from w w  w  . j  a v a 2s.c o  m*/
        return 0;
    }
}

Related

  1. getInterfaceAddress(final String ifaceName, final boolean ipV4)
  2. getInterfaceIPs()
  3. getInternalIp()
  4. getInternalIp()
  5. getInternetIpAddress()
  6. getIntranetIp()
  7. getIp()
  8. getIp()
  9. getIP()