Here you can find the source of getIntfFromLabelAdva(int n, Inet4Address ip)
public static int getIntfFromLabelAdva(int n, Inet4Address ip)
//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; } }