Support of ISDN Subsystem under Freebsd 6.x/7.x - amd64
Oliver von Bueren
maillist at ovb.ch
Sun Dec 2 03:31:07 PST 2007
Hans Petter Selasky wrote:
> On Saturday 01 December 2007, Gary Jennejohn wrote:
>
>> On Sat, 01 Dec 2007 12:53:55 +0100
>>
>> Oliver von Bueren <maillist at ovb.ch> wrote:
>>
>>> I still don't know why nobody bothers to include the i4b by HPS into the
>>> main tree. I couldn't use the built-in stack since ages because of the
>>> lack of proper card support for passive cards with CAPI support, which
>>> is working in his version. Active ones might be better in the tree.
>>>
>> HPS has a rather arcane coding style which makes it hard to maintain
>> his code in the tree. We don't want code in the tree which can be
>> maintained/understood by only one external developer.
>>
>> As a port it would probably be OK, but it might be difficult to
>> integrate it cleanly. Still, there are other ports which touch the
>> kernel, so it should be doable. AFAIK HPS hasn't considered this
>> possiblility.
>>
>
> Hi Gary,
>
> Regarding code style I have a script that will make the code more FreeBSD KNF
> compliant. I just haven't had time to work so much at it. If you think you
> can do better I will gladly accept patches and improvements into my SVN repo.
>
> When I started out on ISDN4BSD more than 6 years ago everything was greek to
> me. Now I understand it all. Maybe that is the problem. You have to spend
> more time to understand others code ?
>
>
Hi Gary and Hans Petter
I'm not a contributor to FreeBSD but I do software development in the
ISDN area and like to add some comments myself about the coding style
and usability for the end-user of the ISDN stack in FreeBSD in general.
It can be debated which coding style one should use for C programming.
C/R is one, it is quite good, with some small problems as it was thought
out in the days where the display was 80x25. I don't think this is the
case today.
The code in i4b is formated well. Compared to other randomly picked code
in the sys/-tree I can't see much differences. If you like to debate the
location of the opening { after an if/else/... statement, I prefer the
one on the next line, which is not C/R. It just makes it very clear what
a block is, start to end. It's much harder to match a starting if with
the closing } as it is to match two braces, opening { to closing }
aligned correctly.
So IMHO the style of code formating can't be the problem with the code
written by HPS. This leaves only the complexity of the code itself, or
better what it has to provide a solution for. Having programmed ISDN
protocols myself, I've to say that he sticked to the layer model of ISDN
quite well.
That said, and with the comment HPS made himself, with the knowledge he
now has, it would be far easier to re-write the complete code into a
cleaner structure. I value the work HPS has done a lot and would never
ask him to re-do that just for the sake of a somewhat cleaner code
structure. And I'm not sure this would achieve a goal in terms of
maintainability anyway.
What it does not change is the complexity of the ISDN protocol itself.
Without reading some ECMA or ITU-T documents nobody will get what the
code does. But that is nothing the developer can be blamed for. ISDN is
a protocol which evolved over some generations which introduced quirks
one would not start with in the first place.
So it you like to tell us that the ISDN protocol itself is arcane, there
is some truth about it. It did take me some time to get used to it, but
with some practice every programmer able to read technical documentation
can maintain that code, given enough time to get into it.
For me FreeBSD is the OS of choice for many years now, starting out with
2.1x. The ISDN support in the current system is still the one done by
Hellmuth at that time. For todays needs it is no more what is required.
He did good work in that time but at some point he quit that project and
moved on. He has to get credits for starting this of and maintaining it
for some time.
So for me it's the choice of having old code in the tree, which kind of
works but does not cover my needs anymore OR move on and incorporate a
newer version having moved into the current days with support of
hardware that is available. Or does someone still use the 8bit Teles ISA
ISDN card? I have once, but they are long gone, don't have a system with
ISA anymore.
My rant has got quite long and I do not intend to start a war about
coding style. These are just my thoughts about usability form an
end-user point of view. Integrating it into the main tree would perhaps
attract some more developers and it would be possible to have it on all
builds, amd64 included, as a working stack, if enough interest is around.
Cheers,
Oliver
More information about the freebsd-isdn
mailing list