From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 13 08:57:59 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F33016A41F for ; Tue, 13 Sep 2005 08:57:59 +0000 (GMT) (envelope-from fergus@cobbled.net) Received: from ni-mail2.dna.utvinternet.net (mail2.u.tv [194.46.8.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id DECF243D45 for ; Tue, 13 Sep 2005 08:57:58 +0000 (GMT) (envelope-from fergus@cobbled.net) Received: from mail.cobbled.net (unverified [195.218.110.91]) by ni-mail2.dna.utvinternet.net (Vircom SMTPRS 4.1.361.18) with ESMTP id ; Tue, 13 Sep 2005 09:57:56 +0100 Received: from eyore.cobbled.net (localhost [127.0.0.1]) by mail.cobbled.net (8.12.10/8.12.10) with ESMTP id j8D8vt1c002995; Tue, 13 Sep 2005 09:57:55 +0100 (BST) (envelope-from fergus@eyore.public.cobbled.net) Received: (from fergus@localhost) by eyore.cobbled.net (8.12.10/8.12.10/Submit) id j8D8vs9p002994; Tue, 13 Sep 2005 09:57:54 +0100 (BST) (envelope-from fergus) Date: Tue, 13 Sep 2005 09:57:54 +0100 From: n0g0013 To: rashmi ns Message-ID: <20050913085754.GB2948@eyore.cobbled.net> Mail-Followup-To: rashmi ns , bugi@lists.redbrick.dcu.ie, freebsd-hackers@freebsd.org References: <9f99931605091200085048847a@mail.gmail.com> <9f99931605091221463addc8a4@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f99931605091221463addc8a4@mail.gmail.com> X-Mailman-Approved-At: Tue, 13 Sep 2005 10:46:26 +0000 Cc: freebsd-hackers@freebsd.org, bugi@lists.redbrick.dcu.ie Subject: Re: [BUGI] Re: Porting from linux to freebsd help needed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2005 08:57:59 -0000 On 13.09-10:16, rashmi ns wrote: [ ... ] > I wanted to add a psuedo network driver can any one tell me what else needs > to be done here to provide a simple psuedo interface not to repeat what david said but look at /usr/src/sys/net/if_disc.c for information. the code supplied is only enough to handle the module loading -- nothing to do with network interfaces (except that they may also be modules). most of the magic is handled by the macro definitions and kernel callbacks. if you're really stuck try posting the full source. if you are looking to implement a pseudo device you may wish to look at netgraph -- i have no experience of it but rumour suggests it is an effective way to stack protocol handlers, drivers and other network magic. -- t t w