Plug-In Interface for application - Linux
This is a discussion on Plug-In Interface for application - Linux ; Hi,
I am the maintainer a lead developer for an alternate syslogd (rsyslog
- http://www.rsyslog.com ).
I am currently thinking about how a plug-in interface could be best
implemented. I've never done that under Linux. Are there any
resources, web ...
-
Plug-In Interface for application
Hi,
I am the maintainer a lead developer for an alternate syslogd (rsyslog
- http://www.rsyslog.com).
I am currently thinking about how a plug-in interface could be best
implemented. I've never done that under Linux. Are there any
resources, web links or such that I could consult in order to do it
right?
Help deeply appreciated,
Rainer Gerhards
-
Re: Plug-In Interface for application
On Jul 5, 5:53 pm, rgerhards wrote:
> Hi,
>
> I am the maintainer a lead developer for an alternate syslogd (rsyslog
> -http://www.rsyslog.com).
>
> I am currently thinking about how a plug-in interface could be best
> implemented. I've never done that under Linux. Are there any
> resources, web links or such that I could consult in order to do it
> right?
>
> Help deeply appreciated,
> Rainer Gerhards
Look into dlopen/dlsym. These functions let you load libraries at
runtime by hand. Design an interface for your program to interact with
the library, for instance initialization functions/communication
functions. It's not too difficult.
http://www.dwheeler.com/program-libr...libraries.html
http://users.actcom.co.il/~choo/lupg...libraries.html
http://ehuss.com/shared/
Alternatively, you could have a plugin process running externally and
communicate with some kind of IPC, such as shared memory, named pipes,
or sockets.