http://www.perlmonks.org?node_id=862199


in reply to Re: How Do I Do an IP Broadcast in Perl?
in thread How Do I Do an IP Broadcast in Perl?

How does this relate to what the OP is asking? Your code still relies to the client knowing the servers IP address and won't help him solve his problem. Which (if you read the thread) he did anyway, almost 12 hours before you posted your node, so what's the point? Also:

UDP requires root privileges, IIRC

Err, no. Stick to port numbers <1024 >1024 and you can send/receive UDP just fine as an unprivileged user.

Update: corrected port numbers, thanks Corion for the heads up.


All dogma is stupid.

Replies are listed 'Best First'.
Re^3: How Do I Do an IP Broadcast in Perl?
by zentara (Archbishop) on Sep 27, 2010 at 12:38 UTC
    (I know how to get the subnet and all else, just can't send the broadcast!)

    Just showing him a working example of sending the broadcast, and many systems are setup that non-root user access is disallowed for ports < 1024


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
      Just showing him a working example of sending the broadcast,

      But you don't, you're sending to localhost.

      and many systems are setup that non-root user access is disallowed for ports < 1024
      It should be >1024 of course (as Corion rightly pointed out to me). But no "normal" system I know entirely restricts users from sending UDP packets over the network.

      All dogma is stupid.