RE: searching exported symbols from modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-04-19 at 18:34 +0300, Antti Halonen wrote:
> Thanks for your persistence!
> 
> > but to what purpose?
> > what on earth do you need this for?
> > Again you talk about solutions not about the problem you're trying to
> > solve.
> 
> I have module which has set of algorithms. When I load my module, I will
> initialize my function pointer interface to point to these algorithms.
> And then go ahead and use my pointers trough the application...
> 
> This way I can easily add new algorithm implementations into my product
> and decide on the fly which ones to initialize into use.
>  
> Now. It happens that I have another module which offers algorithms I
> want to be able to use. So when I shoot up my module it should be able
> to initialize
> either the ones the external module offers or use the internal
> algorithms. In order to do this, I need to figure out on the fly if the
> other module is present, where it is, where I can find the function
> addresses...

a better way would be then to have a "core" module which is basically
collecting these algorithms, and then have the algorithm modules, when
they are loaded, register themselves with this core module. (and
unregister at unload). It's sort of inside-out with they way you're
trying to do it, but it'll work out a lot nicer. Obviously the user of
the algorithms can be another module in addition to this core module.
(and even register algorithms itself)
There's many examples in the kernel that work similar to this, for
example the crypto framework.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux