I want extract all IP Address and device details(Mac address,Device Name,DNS whatever possible) which is connected with that IP Address for different subnet not only for local subnet. So, is there any command, library for JAVA or Open source API?
Other solution than nmap
"Connected" as in with a socket to the local system?
netstat
et al)If you mean "connected to the network" you'll need an ARP scan for the local segment (try to resolve each IP address and see if a MAC is returned) and for the remote segment, there's just a ping sweep (where you won't see device not answering to ICMP echo requests or where the response is filtered in between).