congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MsrpcShareEnum.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
jcifs.dcerpc.msrpc.MsrpcShareEnum
constructor

Best Java code snippets using jcifs.dcerpc.msrpc.MsrpcShareEnum.<init> (Showing top 6 results out of 315)

origin: org.codelibs/jcifs

static FileEntry[] doMsrpcShareEnum ( CIFSContext ctx, SmbResourceLocator loc, Address address ) throws IOException {
  try ( DcerpcHandle handle = DcerpcHandle.getHandle("ncacn_np:" + getRPCTarget(ctx, loc, address) + "[\\PIPE\\srvsvc]", ctx) ) {
    MsrpcShareEnum rpc = new MsrpcShareEnum(loc.getServer());
    handle.sendrecv(rpc);
    if ( rpc.retval != 0 ) {
      throw new SmbException(rpc.retval, true);
    }
    return rpc.getEntries();
  }
}
origin: AgNO3/jcifs-ng

static FileEntry[] doMsrpcShareEnum ( CIFSContext ctx, SmbResourceLocator loc, Address address ) throws IOException {
  try ( DcerpcHandle handle = DcerpcHandle.getHandle("ncacn_np:" + getRPCTarget(ctx, loc, address) + "[\\PIPE\\srvsvc]", ctx) ) {
    MsrpcShareEnum rpc = new MsrpcShareEnum(loc.getServer());
    handle.sendrecv(rpc);
    if ( rpc.retval != 0 ) {
      throw new SmbException(rpc.retval, true);
    }
    return rpc.getEntries();
  }
}
origin: jcifs/jcifs

FileEntry[] doMsrpcShareEnum() throws IOException {
  MsrpcShareEnum rpc;
  DcerpcHandle handle;
  rpc = new MsrpcShareEnum(url.getHost());
  /* JCIFS will build a composite list of shares if the target host has
   * multiple IP addresses such as when domain-based DFS is in play. Because
   * of this, to ensure that we query each IP individually without re-resolving
   * the hostname and getting a different IP, we must use the current addresses
   * IP rather than just url.getHost() like we were using prior to 1.2.16.
   */
  handle = DcerpcHandle.getHandle("ncacn_np:" +
        getAddress().getHostAddress() +
        "[\\PIPE\\srvsvc]", auth);
  try {
    handle.sendrecv(rpc);
    if (rpc.retval != 0)
      throw new SmbException(rpc.retval, true);
    return rpc.getEntries();
  } finally {
    try {
      handle.close();
    } catch(IOException ioe) {
      if (log.level >= 4)
        ioe.printStackTrace(log);
    }
  }
}
FileEntry[] doNetShareEnum() throws SmbException {
origin: org.samba.jcifs/jcifs

FileEntry[] doMsrpcShareEnum() throws IOException {
  MsrpcShareEnum rpc;
  DcerpcHandle handle;
  rpc = new MsrpcShareEnum(url.getHost());
  /* JCIFS will build a composite list of shares if the target host has
   * multiple IP addresses such as when domain-based DFS is in play. Because
   * of this, to ensure that we query each IP individually without re-resolving
   * the hostname and getting a different IP, we must use the current addresses
   * IP rather than just url.getHost() like we were using prior to 1.2.16.
   */
  handle = DcerpcHandle.getHandle("ncacn_np:" +
        getAddress().getHostAddress() +
        "[\\PIPE\\srvsvc]", auth);
  try {
    handle.sendrecv(rpc);
    if (rpc.retval != 0)
      throw new SmbException(rpc.retval, true);
    return rpc.getEntries();
  } finally {
    try {
      handle.close();
    } catch(IOException ioe) {
      if (log.level >= 4)
        ioe.printStackTrace(log);
    }
  }
}
FileEntry[] doNetShareEnum() throws SmbException {
origin: com.jaeksoft/jcifs-krb5-jdk7

FileEntry[] doMsrpcShareEnum() throws IOException {
  MsrpcShareEnum rpc;
  DcerpcHandle handle;
  rpc = new MsrpcShareEnum(url.getHost());
  /* JCIFS will build a composite list of shares if the target host has
   * multiple IP addresses such as when domain-based DFS is in play. Because
   * of this, to ensure that we query each IP individually without re-resolving
   * the hostname and getting a different IP, we must use the current addresses
   * IP rather than just url.getHost() like we were using prior to 1.2.16.
   */
  handle = DcerpcHandle.getHandle("ncacn_np:" +
        getAddress().getHostAddress() +
        "[\\PIPE\\srvsvc]", auth);
  try {
    handle.sendrecv(rpc);
    if (rpc.retval != 0)
      throw new SmbException(rpc.retval, true);
    return rpc.getEntries();
  } finally {
    try {
      handle.close();
    } catch(IOException ioe) {
      if (log.level >= 4)
        ioe.printStackTrace(log);
    }
  }
}
FileEntry[] doNetShareEnum() throws SmbException {
origin: kohsuke/jcifs

FileEntry[] doMsrpcShareEnum() throws IOException {
  MsrpcShareEnum rpc;
  DcerpcHandle handle;
  rpc = new MsrpcShareEnum(url.getHost());
  /* JCIFS will build a composite list of shares if the target host has
   * multiple IP addresses such as when domain-based DFS is in play. Because
   * of this, to ensure that we query each IP individually without re-resolving
   * the hostname and getting a different IP, we must use the current addresses
   * IP rather than just url.getHost() like we were using prior to 1.2.16.
   */
  handle = DcerpcHandle.getHandle("ncacn_np:" +
        getAddress().getHostAddress() +
        "[\\PIPE\\srvsvc]", auth);
  try {
    handle.sendrecv(rpc);
    if (rpc.retval != 0)
      throw new SmbException(rpc.retval, true);
    return rpc.getEntries();
  } finally {
    try {
      handle.close();
    } catch(IOException ioe) {
      if (log.level >= 4)
        ioe.printStackTrace(log);
    }
  }
}
FileEntry[] doNetShareEnum() throws SmbException {
jcifs.dcerpc.msrpcMsrpcShareEnum<init>

Popular methods of MsrpcShareEnum

  • getEntries

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now