/** * {@inheritDoc} * * @see jcifs.SmbResourceLocator#isWorkgroup() */ @Override public boolean isWorkgroup () throws CIFSException { if ( this.type == SmbConstants.TYPE_WORKGROUP || this.url.getHost().length() == 0 ) { this.type = SmbConstants.TYPE_WORKGROUP; return true; } if ( getShare() == null ) { NetbiosAddress addr = getAddress().unwrap(NetbiosAddress.class); if ( addr != null ) { int code = addr.getNameType(); if ( code == 0x1d || code == 0x1b ) { this.type = SmbConstants.TYPE_WORKGROUP; return true; } } this.type = SmbConstants.TYPE_SERVER; } return false; }
/** * {@inheritDoc} * * @see jcifs.SmbResourceLocator#isWorkgroup() */ @Override public boolean isWorkgroup () throws CIFSException { if ( this.type == SmbConstants.TYPE_WORKGROUP || this.url.getHost().length() == 0 ) { this.type = SmbConstants.TYPE_WORKGROUP; return true; } if ( getShare() == null ) { NetbiosAddress addr = getAddress().unwrap(NetbiosAddress.class); if ( addr != null ) { int code = addr.getNameType(); if ( code == 0x1d || code == 0x1b ) { this.type = SmbConstants.TYPE_WORKGROUP; return true; } } this.type = SmbConstants.TYPE_SERVER; } return false; }
NetbiosAddress nbaddr = getAddress().unwrap(NetbiosAddress.class); if ( nbaddr != null ) { int code = nbaddr.getNameType(); if ( code == 0x1d || code == 0x1b ) { this.type = SmbConstants.TYPE_WORKGROUP;
NetbiosAddress nbaddr = getAddress().unwrap(NetbiosAddress.class); if ( nbaddr != null ) { int code = nbaddr.getNameType(); if ( code == 0x1d || code == 0x1b ) { this.type = SmbConstants.TYPE_WORKGROUP;
@Override public NbtAddress[] getNbtAllByAddress ( NetbiosAddress addr ) throws UnknownHostException { try { NbtAddress[] addrs = getNodeStatus(addr); cacheAddressArray(addrs); return addrs; } catch ( UnknownHostException uhe ) { throw new UnknownHostException( "no name with type 0x" + Hexdump.toHexString(addr.getNameType(), 2) + ( ( ( addr.getName().getScope() == null ) || ( addr.getName().getScope().isEmpty() ) ) ? " with no scope" : " with scope " + addr.getName().getScope() ) + " for host " + addr.getHostAddress()); } }
@Override public NbtAddress[] getNbtAllByAddress ( NetbiosAddress addr ) throws UnknownHostException { try { NbtAddress[] addrs = getNodeStatus(addr); cacheAddressArray(addrs); return addrs; } catch ( UnknownHostException uhe ) { throw new UnknownHostException( "no name with type 0x" + Hexdump.toHexString(addr.getNameType(), 2) + ( ( ( addr.getName().getScope() == null ) || ( addr.getName().getScope().isEmpty() ) ) ? " with no scope" : " with scope " + addr.getName().getScope() ) + " for host " + addr.getHostAddress()); } }
if ( this.getNameType() == 0x1D ) { for ( int i = 0; i < addrs.length; i++ ) { if ( addrs[ i ].getNameType() == 0x20 ) { return addrs[ i ].getHostName();
if ( this.getNameType() == 0x1D ) { for ( int i = 0; i < addrs.length; i++ ) { if ( addrs[ i ].getNameType() == 0x20 ) { return addrs[ i ].getHostName();