in reply to Re^14: Help with Lorcon XS library
in thread Help with Lorcon XS library

I'll ask this to Gomor

Point out to him that examples/inject.pl is crashing.
That is a bug in Net::Lorcon2, and might just be enough to get him involved in fixing the problem.
Let us know if he still refuses to do anything about it ... I could probably try harder if needed ;-)

Presumably you've built the liborcon2 library from source. Could you provide the link to that source.

Cheers,
Rob

Replies are listed 'Best First'.
Re^16: Help with Lorcon XS library
by Bpl (Scribe) on Jul 22, 2020 at 09:59 UTC
    the library is from github: https://github.com/kismetwireless/lorcon Regards Edoardo M. p.s I think that I'll spent more and more time developing it :(
Re^16: Help with Lorcon XS library
by Bpl (Scribe) on Jul 22, 2020 at 17:47 UTC
    Hi friend, after some hours of works I think I've finally understood the problem, in few words in the source code
    our @AS = qw( driver interface _drv _context ); __PACKAGE__->cgBuildAccessorsScalar(\@AS); __PACKAGE__->cgBuildIndices; sub new { my $self = shift->SUPER::new( driver => "madwifing", interface => "wlo1", @_, );
    the @_ (under the "new" ) assign a value to $self->_drv and $self->_context, this explain the "undef" obtained in the previous posts, the output of this small program confirm it:
    udo perl -e ' use Net::Lorcon2 qw( :subs ); my $lorcon = Net::Lorcon2->new(); use Data::Dumper; print Dumper($lorcon); '
    outputs
    $VAR1 = bless( [ 'madwifing', 'wlo1', \152948280, \152839568 ], 'Net::Lorcon2' );
    including the $lorcon variable into the  Net::Lorcon2::lorcon_open_inject( $lorcon ) still crash but I think that the problem now stands in the BLESS reference, some hints? Regards Edoardo M
      Hi again, I've tried to convert the example script "inject.pl" into an executable file though pp and then, with GDB, I've analyzed the SIGSEGV causes, the output is the following:
      Program received signal SIGSEGV, Segmentation fault. 0xb78ab7a7 in madwifing_openmon_cb (context=0x890eda8) at drv_madwifin +g.c:71 71 drv_madwifing.c: File o directory not exists.
      Now I am pretty sure that the library search a file which has the _drv and the  driver parameters, the situation seems more intrigate than I expected, I've already examined the Lorcon2.so file which is auto generate inside blib/arch/auto/Net/ ... but it doesn't seem to exist the  madwifing_openmon_cb symbols, any hints? Thanks again Rob, Edoardo M.