in reply to How Do I Do an IP Broadcast in Perl?
Perhaps I'm misunderstanding your question, but this doesn't sound like anything unusual. E.g., here's a standard ARP interaction, shown via 'tcpdump':
0:80:c8:f8:4a:51 ff:ff:ff:ff:ff:ff 42: arp who-has 192.168.99.254 tell + 192.168.99.35 0:80:c8:f8:5c:73 0:80:c8:f8:4a:51 60: arp reply 192.168.99.254 is-at 0 +:80:c8:f8:5c:73
Note that the call goes out to ff:ff:ff:ff:ff:ff - that's the hardware broadcast address - and you get back a reply with the MAC and the IP, which should tell you that the machine is up (unless, of course, you have some reason to suspect somebody faking those.) At a higher level, you could just use 'ping' (since you already know the IP). Unless you really need that machine to send back text (neither ICMP nor UDP are all that useful in that situation), it seems like either of these approaches would take care of "finding" the machine you're looking for.
Both of these can be implemented in Perl, but I'm reluctant to start cranking code without feeling like I actually understand what you're trying to do.
|
|---|