aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Broadcasting to addresses Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Broadcasting to addresses" Watch "Broadcasting to addresses" New topic
Author

Broadcasting to addresses

Danny Carson
Greenhorn

Joined: Aug 05, 2008
Posts: 18
Hey guys n gals,

I am trying to check all addresses on a LAN to determine if they use port 9100.

I have looked at DatagramSocket/Packet but I could be missing something.

Can you tell me if this is possible to do in Java?

Code below is to test the Datagram on one address but this doesnt work either.



Cheers
T.A. Nguyen
Ranch Hand

Joined: Sep 02, 2008
Posts: 36

See the following example from sun:

http://java.sun.com/docs/books/tutorial/networking/datagrams/broadcasting.html

enjoy!


T.A. Nguyen
http://ta.cnci.org
http://www.linkedin.com/in/nguyenta
Danny Carson
Greenhorn

Joined: Aug 05, 2008
Posts: 18
Im looking for an example of how to scan a network to find all ip's with a specific open port.

Any ideas?

cheers
T.A. Nguyen
Ranch Hand

Joined: Sep 02, 2008
Posts: 36

You might want to visit:

http://sourceforge.net/projects/ipscan/

for detail.
Danny Carson
Greenhorn

Joined: Aug 05, 2008
Posts: 18
Hey man,

Thats a cool app, I was looking to itegrate a java version similar to this into my current project.

I can scan a network much like this although I am using sockets to ping the addresses, which takes an age. Is there any way to speed it up?

Cheers
T.A. Nguyen
Ranch Hand

Joined: Sep 02, 2008
Posts: 36

Yeah, read on more about the Multicast DNS. Make sure to read it carefully, you can potentially doing harm to your network. http://www.multicastdns.org/

Enjoy!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Broadcasting to addresses