[sr-dev] Linux-specific modules

Daniel-Constantin Mierla miconda at gmail.com
Fri Jan 23 12:20:10 CET 2015


Hello,

On 23/01/15 11:03, Olle E. Johansson wrote:
> Hi!
>
> One of the benefits of Kamailio according to the marketing litterature is that we're highly portable across
> all *IX platforms.

well, I would say that is valid for core and common sip routing modules
that don't depend on external libraries. In other words, the code has to
be written on standard C & Posix API, not various extensions. If there
is a component depending on a library, we won't reject a module if that
library is not available somewhere else.


>  I do understand why a kernel-interfacing module is depending on a specific os
> (thinking about the kernel-level RTPPROXY), but not why other modules depend on Linux.
>
> If they do, I propose that we treat that as a bug and implement a work around or get help from other
> developers to get the same functionality on as many platforms as possible. At least, get the basic
> functionality working in a platform-neutral way.

Any contribution to get something working on new platforms is always
welcome!

But labeling being a bug or an improvement has to be done analyzing each
case.

>
> The ratelimit/pipelimit modules still work on other Unixes, but have specific extra functionality on Linux.
>
> The jsonrpc-c module fails to compile on non-LInux systems, and I don't see a reason for that module to fail on 
> other platforms.

I read shortly about the functions used there, they might bring relevant
advantages for some needs (kpoll/epoll based monitoring for timer
events) -- as you can consider in-kernel forwarding (which can be done
in user space as well). I haven't implemented the module nor used it so
far. From web, it might work on recent *BSD as well, because timerfd api
seems to be available there -- I don't have access to such box. The
functions are in glibc from v2.8 -- so maybe this lib needs to be added
as dependency.

Then, we do strive to keep most of the modules work on all free and open
source unixes as long as libraries are available there.

Mac OS X is not free to use nor open source, most of developers don't
have access to it. It has roots in freebsd that made porting core and
most of the modules easily possible, but there are many differences. I
do try keep the modules I use work on Mac OS X, but at my expense and
trying to point the solution if someone brings in something not
compatible. I don't run production kamailio on mac os x, just it comes
sometime handly to develop and test on it.
 
> What do you think? Should we continue to work like this or should we move to LInux-only?
>

It will stay portable for anything that doesn't have an external
dependency. Otherwise, we cannot port all libraries to everywhere.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-dev mailing list