• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Find ip address of a device

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good morning

Right now, i have a doubt; i can't find the ip address of a device connected to my network. I tried using network interface, but only gives me the loopback address and my pc address; the code that i used is:


Also, i used PrintServiceLookup ,but the methods of that class doesn't give the ip address (the device is a card printer); the code that i used is:



Anyone has a different point of view or perspective to solve the issue?

Thanks in advance
 
Bartender
Posts: 1357
39
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did not understand well... Do you want to execute an ipscan and search for a particular device? I think you' better look for any free library which allows you to deal with DNS, DNS queries, SNMP and so on. First approach in your code will simply enumerate NICs onboard the host your program is running on;using Print service to lookup up a network printer and then try to retrieve its IP address...well, I don't know if it may be work, but seems a bit naive approach.
 
reply
    Bookmark Topic Watch Topic
  • New Topic