[OpenSER-Devel] Request for comment: module interface extension

Henning Westerholt henning.westerholt at 1und1.de
Tue Dec 18 10:47:42 UTC 2007


On Tuesday 18 December 2007, Dan Pascu wrote:
> > [...]
>
> function(struct sip_msg *msg, ...) {}
> function(struct sip_msg *msg, char *uri, char* fl, ...) {}
>
> So how is the array thing simpler than this? This is just a way to be able
> to receive more arguments than 2 without having to force all module
> functions to accept 10 arguments while still using the same mechanism we
> already have. Only the script parser method of calling the functions has
> to change (by passing more than 2 arguments) and by adding the ellipsis
> to all module exported functions (we can even get away without the latter
> by using typecasting so we don't even have to use the ellipsis notation
> and varargs at all, unless we want to have a single function handle
> multiple signatures).

Hello Dan,

Ah, now i understand.. :-) It hard to get the _exact_ structure of a interface 
without any example code or implementation.

I was not aware that this is possible within the C language and stdargs.h. I 
begin to like this.. ;-)

This proposed interface is ok for us. Bogdan, what do you think?

Cheers,

Henning



More information about the Devel mailing list