From owner-freebsd-current@FreeBSD.ORG Wed Nov 24 18:41:27 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58C2E16A4CE for ; Wed, 24 Nov 2004 18:41:27 +0000 (GMT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F5B243D5C for ; Wed, 24 Nov 2004 18:41:27 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 21811 invoked from network); 24 Nov 2004 18:41:26 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail6.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 24 Nov 2004 18:41:26 -0000 Received: from hydrogen.funkthat.com (lwxklm@localhost.funkthat.com [127.0.0.1])iAOIfPGH006231; Wed, 24 Nov 2004 10:41:26 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id iAOIfOKJ006230; Wed, 24 Nov 2004 10:41:24 -0800 (PST) Date: Wed, 24 Nov 2004 10:41:24 -0800 From: John-Mark Gurney To: Chuck Swiger Message-ID: <20041124184124.GA5166@funkthat.com> Mail-Followup-To: Chuck Swiger , "Wilkinson, Alex" , freebsd-current@freebsd.org References: <200411231226.38172.jkim@niksun.com> <200411231343.22760.jhb@FreeBSD.org> <20041124002603.GD20881@squash.dsto.defence.gov.au> <41A416E7.4030107@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41A416E7.4030107@mac.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-current@freebsd.org cc: "Wilkinson, Alex" Subject: Re: Transparent bridges (a. k. a. HUB-to-PCI bridges)? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 18:41:27 -0000 Chuck Swiger wrote this message on Wed, Nov 24, 2004 at 00:06 -0500: > Wilkinson, Alex wrote: > >2. OOPish device object (device_t) ? > > True OOP involves encapsulation, polymorphism, and inheritence, and > requires language support which is not really available in pure C. That > being said, careful programming in C lets you create several > closely-related structs for different types of "objects" which can all be > utilized by a common set of functions. You should read up on KOBJ's which is how device_t's are implemented in FreeBSD... kobj's are a loop more OOP that you think... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."