in reply to Re^11: Help with Lorcon XS library
in thread Help with Lorcon XS library
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 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^13: Help with Lorcon XS library
by syphilis (Archbishop) on Jul 22, 2020 at 09:25 UTC | |
by Bpl (Scribe) on Jul 22, 2020 at 09:40 UTC | |
by syphilis (Archbishop) on Jul 22, 2020 at 09:55 UTC | |
by Bpl (Scribe) on Jul 22, 2020 at 09:59 UTC | |
by Bpl (Scribe) on Jul 22, 2020 at 17:47 UTC | |
by Bpl (Scribe) on Jul 22, 2020 at 22:10 UTC |