Class Portmapper

java.lang.Object
com.emc.ecs.nfsclient.portmap.Portmapper

public final class Portmapper extends Object
Used to query the port used for a service (mount or NFS), as specified by https://tools.ietf.org/html/rfc1833.
  • Method Details

    • queryPortFromPortMap

      public static int queryPortFromPortMap(int program, int version, String serverIP) throws IOException
      Given program and version of a service, query its tcp port number
      Parameters:
      program - The program number, used to identify it for RPC calls.
      version - The program version number, used to identify it for RPC calls.
      serverIP - The server IP address.
      Returns:
      The port number for the program.
      Throws:
      IOException