[clug-progsig] Perl Net::RawIP not allowing broadcast ?

Michael Gale michael.gale at bluesuperman.com
Sun Aug 14 23:32:04 PDT 2005


Hello,

I have created the following piece of code in perl to use the Net::RawIP

my $packet = new Net::RawIP({udp=>{}});

$packet-> set({
			ip => {	saddr => '192.168.0.15',
					daddr =>  '255.255.255.255',
					id => $ipid,
					frag_off => 0,
					tos => 0,
					protocol => 0x11,
				},
			udp => {	source =>  68,
					dest =>  67,
					len => 556,
					data => 'Testing'
				}
			});
			
$packet->send;

$packet->ethnew($settings->get('ip_setup.device'));
$packet->ethset(dest=> $settings->get('ip_setup.dest_mac'));
$packet->ethsend;

How ever it does not work because I am specifing a broadcast destination
IP address. If I change the IP address to a anything else it works.

Any suggestions ? Would this be a bug ? or am I doing something wrong ?

Michael

-- 
To unsubscribe, e-mail: beginners-unsubscribe at perl.org
For additional commands, e-mail: beginners-help at perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>





More information about the clug-progsig mailing list