From owner-freebsd-net@FreeBSD.ORG Mon Feb 20 03:06:28 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE8B6106566B for ; Mon, 20 Feb 2012 03:06:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3896C8FC08 for ; Mon, 20 Feb 2012 03:06:27 +0000 (UTC) Received: by wibhn14 with SMTP id hn14so4180057wib.13 for ; Sun, 19 Feb 2012 19:06:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=DIXwJFNs/SYnLqTZOD5IBkXN2Jf0fBiL70+28aJXRH4=; b=Yb6DJYbbj8QmqkdhpZ1iIe98K5q2/CB0Eav944fLyNd+IbZTsaq2KKMBaSq353Pp4b jfyQFQRBVw7cD/+Q+XePJQa4BvgmwSwJ2R7YnSZgLSJdGrVNL44xQftIrsfPMSER5kkk 1GDWOt9Sna89BPdZxr/PmJLkdg7y44f5FrlUE= MIME-Version: 1.0 Received: by 10.180.96.8 with SMTP id do8mr12166271wib.21.1329707187122; Sun, 19 Feb 2012 19:06:27 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.154.199 with HTTP; Sun, 19 Feb 2012 19:06:27 -0800 (PST) In-Reply-To: <4F41B789.7050705@freebsd.org> References: <338757D1-6B1E-49CF-983F-5D5851066FD3@xcllnt.net> <20120217135320.GJ55075@FreeBSD.org> <4F41B789.7050705@freebsd.org> Date: Sun, 19 Feb 2012 19:06:27 -0800 X-Google-Sender-Auth: PKhUEQ_Y8gz9aASE1TulZerWS3o Message-ID: From: Adrian Chadd To: Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: net@freebsd.org, Marcel Moolenaar Subject: Re: Abstracting struct ifnet X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 03:06:28 -0000 2012/2/19 Julian Elischer : >> For example: you can introduce a define that either old or >> new drivers use to indicate whether they need full visibility >> or whether an abstract type works. This then drives what is >> defined/declared and how it's defined/declared. >> > The trouble is that core debugging is not doable via methods > > i.e. > =A0 netstat -i | -I interface [-abdhntW] [-f address_family] [-M core] > =A0 =A0 =A0 =A0 =A0 =A0 [-N system] > > becomes much more difficult to achieve. Why? For the default kernel they'd just evaluate to whatever they are right now. There's room for doing extra debugging and logging in the accessor methods, but the accessor methods are still accessing the same underlying structures. You could still inspect the direct data and keep those structures the "FreeBSD Kernel ABI" so tools like netstat can still directly fondle them. This is just for portability and modularity. If a vendor like Juniper wants to override that stuff, let's let them? :) Adrian