public String nextCalledName() { if( calledName == hostName.name ) { calledName = SMBSERVER_NAME; } else if( calledName == SMBSERVER_NAME ) { NbtAddress[] addrs; try { addrs = CLIENT.getNodeStatus( this ); if( hostName.hexCode == 0x1D ) { for( int i = 0; i < addrs.length; i++ ) { if( addrs[i].hostName.hexCode == 0x20 ) { return addrs[i].hostName.name; } } return null; } else if( isDataFromNodeStatus ) { /* 'this' has been updated and should now * have a real NetBIOS name */ calledName = null; return hostName.name; } } catch( UnknownHostException uhe ) { calledName = null; } } else { calledName = null; } return calledName; }
public String nextCalledName() { if( calledName == hostName.name ) { calledName = SMBSERVER_NAME; } else if( calledName == SMBSERVER_NAME ) { NbtAddress[] addrs; try { addrs = CLIENT.getNodeStatus( this ); if( hostName.hexCode == 0x1D ) { for( int i = 0; i < addrs.length; i++ ) { if( addrs[i].hostName.hexCode == 0x20 ) { return addrs[i].hostName.name; } } return null; } else if( isDataFromNodeStatus ) { /* 'this' has been updated and should now * have a real NetBIOS name */ calledName = null; return hostName.name; } } catch( UnknownHostException uhe ) { calledName = null; } } else { calledName = null; } return calledName; }
public String nextCalledName() { if( calledName == hostName.name ) { calledName = SMBSERVER_NAME; } else if( calledName == SMBSERVER_NAME ) { NbtAddress[] addrs; try { addrs = CLIENT.getNodeStatus( this ); if( hostName.hexCode == 0x1D ) { for( int i = 0; i < addrs.length; i++ ) { if( addrs[i].hostName.hexCode == 0x20 ) { return addrs[i].hostName.name; } } return null; } else if( isDataFromNodeStatus ) { /* 'this' has been updated and should now * have a real NetBIOS name */ calledName = null; return hostName.name; } } catch( UnknownHostException uhe ) { calledName = null; } } else { calledName = null; } return calledName; }
public String nextCalledName() { if( calledName == hostName.name ) { calledName = SMBSERVER_NAME; } else if( calledName == SMBSERVER_NAME ) { NbtAddress[] addrs; try { addrs = CLIENT.getNodeStatus( this ); if( hostName.hexCode == 0x1D ) { for( int i = 0; i < addrs.length; i++ ) { if( addrs[i].hostName.hexCode == 0x20 ) { return addrs[i].hostName.name; } } return null; } else if( isDataFromNodeStatus ) { /* 'this' has been updated and should now * have a real NetBIOS name */ calledName = null; return hostName.name; } } catch( UnknownHostException uhe ) { calledName = null; } } else { calledName = null; } return calledName; }
/** * Retrieve all addresses of a host by it's address. NetBIOS hosts can * have many names for a given IP address. The name and IP address make the * NetBIOS address. This provides a way to retrieve the other names for a * host with the same IP address. * * @param addr the address to query * @throws UnknownHostException if address cannot be resolved */ public static NbtAddress[] getAllByAddress( NbtAddress addr ) throws UnknownHostException { try { NbtAddress[] addrs = CLIENT.getNodeStatus( addr ); cacheAddressArray( addrs ); return addrs; } catch( UnknownHostException uhe ) { throw new UnknownHostException( "no name with type 0x" + Hexdump.toHexString( addr.hostName.hexCode, 2 ) + ((( addr.hostName.scope == null ) || ( addr.hostName.scope.length() == 0 )) ? " with no scope" : " with scope " + addr.hostName.scope ) + " for host " + addr.getHostAddress() ); } }
/** * Retrieve all addresses of a host by it's address. NetBIOS hosts can * have many names for a given IP address. The name and IP address make the * NetBIOS address. This provides a way to retrieve the other names for a * host with the same IP address. * * @param addr the address to query * @throws UnknownHostException if address cannot be resolved */ public static NbtAddress[] getAllByAddress( NbtAddress addr ) throws UnknownHostException { try { NbtAddress[] addrs = CLIENT.getNodeStatus( addr ); cacheAddressArray( addrs ); return addrs; } catch( UnknownHostException uhe ) { throw new UnknownHostException( "no name with type 0x" + Hexdump.toHexString( addr.hostName.hexCode, 2 ) + ((( addr.hostName.scope == null ) || ( addr.hostName.scope.length() == 0 )) ? " with no scope" : " with scope " + addr.hostName.scope ) + " for host " + addr.getHostAddress() ); } }
/** * Retrieve all addresses of a host by it's address. NetBIOS hosts can * have many names for a given IP address. The name and IP address make the * NetBIOS address. This provides a way to retrieve the other names for a * host with the same IP address. * * @param addr the address to query * @throws UnknownHostException if address cannot be resolved */ public static NbtAddress[] getAllByAddress( NbtAddress addr ) throws UnknownHostException { try { NbtAddress[] addrs = CLIENT.getNodeStatus( addr ); cacheAddressArray( addrs ); return addrs; } catch( UnknownHostException uhe ) { throw new UnknownHostException( "no name with type 0x" + Hexdump.toHexString( addr.hostName.hexCode, 2 ) + ((( addr.hostName.scope == null ) || ( addr.hostName.scope.length() == 0 )) ? " with no scope" : " with scope " + addr.hostName.scope ) + " for host " + addr.getHostAddress() ); } }
/** * Retrieve all addresses of a host by it's address. NetBIOS hosts can * have many names for a given IP address. The name and IP address make the * NetBIOS address. This provides a way to retrieve the other names for a * host with the same IP address. * * @param addr the address to query * @throws UnknownHostException if address cannot be resolved */ public static NbtAddress[] getAllByAddress( NbtAddress addr ) throws UnknownHostException { try { NbtAddress[] addrs = CLIENT.getNodeStatus( addr ); cacheAddressArray( addrs ); return addrs; } catch( UnknownHostException uhe ) { throw new UnknownHostException( "no name with type 0x" + Hexdump.toHexString( addr.hostName.hexCode, 2 ) + ((( addr.hostName.scope == null ) || ( addr.hostName.scope.length() == 0 )) ? " with no scope" : " with scope " + addr.hostName.scope ) + " for host " + addr.getHostAddress() ); } }