hi harald,
i would also suggest to combine mncc.h of openbsc and osmocom-bb first, and move it to libosmocore. this way the LCR (or other mncc_socket client) does not depend on any files of openbsc and osmocom-bb, just on libosmocore.
because i like to use the same socket interface for osmocom-bb, i would suggest to to put mncc_sock.c into libosmocore too, so it must not be implemented twice.
then i would make lcr to be able to connect to both osmocom-bb and openbsc sockets. finally there is no more polling of file descriptor required at lcr.
if you agree, can you move the code to libosmocore? i will work on the socket configuration and see what i can do with the versioning.
andreas
-----Ursprüngliche Nachricht----- Von: Harald Welte [mailto:laforge@gnumonks.org] Gesendet: Dienstag, 22. Februar 2011 13:22 An: Andreas.Eversberg Cc: openbsc@lists.gnumonks.org Betreff: Re: fix of chan_lcr / new socket interface for openbsc
Andreas,
thanks for integrating the mncc socket patch into lcr.
I would personally like to see the following improvements: * add some (preferrable automatically computed) version to the mncc, to make sure you cannot run lcr + bsc_hack built from a different mncc.h file. We could do something like a md5sum over the header at compilation time, stored in both openbsc and lcr. Once they connect the mncc socket, they request the remote side md5-value and compare it with the local-side value. If they don't match, print an error message and exit the program.
* make the socket path configurable, which is required for running multiple instances of openbsc+lcr on the same machine.
If you (or anyone else on this list) happens to have some time to work on that, it would be greatly appreciated.
Regards, Harald
Hi Andreas,
On 02/22/2011 07:46 AM, Andreas.Eversberg wrote:
if you agree, can you move the code to libosmocore? i will work on the socket configuration and see what i can do with the versioning.
Sure, move it to libosmocore.
At some point we will have to split libosmocore into seperate functional blocks though. Right now it is just a conglomeration of various different things, some of them generally usefule, others GSM specific, yet again others specific to OpenBSC or OsmocomBB.
But this is an entirely separate discussion. I'm just saying, sooner or later I want to split libosmocore in 2-3 separate libraries, where the *core library really only contains stuff like the select/timer/... stuff, and another one (maybe libosmogsm) then contains the stuff related to GSM.
Cheers, Harald