I think that the problem still stands in the code, also if I call lorcon_open_inject the program crashes,regarding the code probably the "_context" make some type of error:use strict; use warnings; my $interface = 'wlo1'; my $driver = 'madwifing'; use Net::Lorcon2 qw(:subs); my $lorcon = Net::Lorcon2->new( interface => $interface, driver => $driver, ); $lorcon->setInjectMode;
The most interesting part is at the end, it calls lorcon_open_inject with $self->_context which is intoour @AS = qw( driver interface _drv _context ); __PACKAGE__->cgBuildAccessorsScalar(\@AS); __PACKAGE__->cgBuildIndices; # ... sub new { my $drv = lorcon_find_driver($self->driver); if (! $drv) { die "[*] new: lorcon_find_driver: failed\n"; return; } $self->driver( $drv ) ; my $context = lorcon_create($self->interface, $drv); #_drv if (! $context) { die "[*] new: lorcon_create: failed\n"; return; } $self->_context($context) or die $!; return $self; } sub setInjectMode { my $self = shift; my $r = lorcon_open_inject($self->_context);#->_context);
but I haven't still understood for what stands. also the lorcon_open_inject( $lorcon ); # where $lorcon = lorcon_create($if, $driver) causes a crash regards. Edoardo M.our @AS = qw( driver interface _drv _context );
In reply to Re^12: Help with Lorcon XS library
by Bpl
in thread Help with Lorcon XS library
by Bpl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |