#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    INDIA
    Posts
    31
    Rep Power
    11

    Sending broadcast message over network and collecting the return IP Address in list


    Hi well subject line itself is quite explaining. I just wann know how to implement following

    A function in which i need to send broadcast message and then i have to collect the list of all the IPs which have responded

    So that i can return list of ip from my function

    Say my broadcast IP address be 192.168.100.255

    How to do this????

    TIA

    Sandeep
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11
    I want to do something similar like sending messages to one of the network computer and then that user being able to reply...

    Out o my head I would say something with a socket and a threading thing...

    the threading can be left out just sometimes the program might crash since when you and him send it at the same time something happens just don't know what...:P

    EDIT: As I just looked a telnet would be able to work for my requirment so maybe also yours...
    Last edited by monkeyman23555; July 15th, 2005 at 08:05 AM.
    Those people who think they know everything are a great annoyance to those of us who do.
  4. #3
  5. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    Broadcast pings are not a reliable way to discover all devices on a network. A lot of devices will just ignore the broadcast. If they do respond there will also be a lot of packet collisions so some devices will be hidden that way too.

    (Try "ping 192.168.100.255" and see what happens - for me I only discovered my router)

    IMO Your only option is to iterate all IP addresses on the sub-net and a ping a variety of ports for each address.

    Here are some links you might find useful:
    http://pynms.sourceforge.net/
    http://www.python.org/~jeremy/python.html

    grim

IMN logo majestic logo threadwatch logo seochat tools logo