/**
   * This method is used to establish package against IP list mapping, with which, the IP list is
   * selected per package via the configured filter rules from the database.
   */
  private void createPackageIpListMap() {
    m_pkgIpMap = new HashMap<Package, List<InetAddress>>();
    m_pkgIntMap = new HashMap<String, Map<String, Interface>>();

    for (Package pkg : packages()) {

      Map<String, Interface> interfaceMap = new HashMap<String, Interface>();
      for (Interface interf : pkg.getInterfaceCollection()) {
        interfaceMap.put(interf.getName(), interf);
      }
      m_pkgIntMap.put(pkg.getName(), interfaceMap);
      // Get a list of IP addresses per package against the filter rules from
      // database and populate the package, IP list map.
      //
      try {
        List<InetAddress> ipList = getIpList(pkg);
        if (log().isDebugEnabled())
          log()
              .debug(
                  "createPackageIpMap: package "
                      + pkg.getName()
                      + ": ipList size =  "
                      + ipList.size());

        if (ipList.size() > 0) {
          if (log().isDebugEnabled())
            log()
                .debug(
                    "createPackageIpMap: package "
                        + pkg.getName()
                        + ". IpList size is "
                        + ipList.size());
          m_pkgIpMap.put(pkg, ipList);
        }
      } catch (Throwable t) {
        log()
            .error(
                "createPackageIpMap: failed to map package: "
                    + pkg.getName()
                    + " to an IP List: "
                    + t,
                t);
      }
    }
  }