From owner-freebsd-isdn@FreeBSD.ORG Sun Dec 2 11:31:07 2007 Return-Path: Delivered-To: freebsd-isdn@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22AD516A419 for ; Sun, 2 Dec 2007 11:31:07 +0000 (UTC) (envelope-from maillist@ovb.ch) Received: from ovbis01.ovb.ch (ovbis01.ovb.ch [213.188.32.144]) by mx1.freebsd.org (Postfix) with ESMTP id BD4BD13C458 for ; Sun, 2 Dec 2007 11:31:06 +0000 (UTC) (envelope-from maillist@ovb.ch) Received: from ovbas07.ovb.ch ([213.180.173.199] helo=[192.168.30.103]) by ovbis01.ovb.ch with esmtpa (Exim 4.68) (envelope-from ) id 1Iyn2P-000DLe-8c for freebsd-isdn@freebsd.org; Sun, 02 Dec 2007 12:31:05 +0100 Message-ID: <47529779.3070901@ovb.ch> Date: Sun, 02 Dec 2007 12:31:05 +0100 From: Oliver von Bueren User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: freebsd-isdn@freebsd.org References: <474EE92C.3000406@merlin-home.dtdns.net> <47514B53.9000409@ovb.ch> <20071201153523.15682288@peedub.jennejohn.org> <200712011820.09373.hselasky@c2i.net> In-Reply-To: <200712011820.09373.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Id: ovb Subject: Re: Support of ISDN Subsystem under Freebsd 6.x/7.x - amd64 X-BeenThere: freebsd-isdn@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using ISDN with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Dec 2007 11:31:07 -0000 Hans Petter Selasky wrote: > On Saturday 01 December 2007, Gary Jennejohn wrote: > >> On Sat, 01 Dec 2007 12:53:55 +0100 >> >> Oliver von Bueren 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