From owner-freebsd-hackers Tue Apr 7 16:35:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA18999 for freebsd-hackers-outgoing; Tue, 7 Apr 1998 16:35:28 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from rrz.Hanse.DE (rrz.Hanse.DE [193.174.9.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA18978 for ; Tue, 7 Apr 1998 16:35:17 -0700 (PDT) (envelope-from stb@transit.hanse.de) Received: from daemon.Hanse.DE (daemon.Hanse.DE [193.174.9.17]) by rrz.Hanse.DE (8.8.8/8.8.8) with ESMTP id BAA21330; Wed, 8 Apr 1998 01:35:01 +0200 (CEST) (envelope-from stb@transit.hanse.de) Received: from transit.hanse.de (transit.Hanse.DE [193.174.9.161]) by daemon.Hanse.DE (8.8.8/8.8.8) with ESMTP id BAA16500; Wed, 8 Apr 1998 01:33:53 +0200 (CEST) (envelope-from stb@transit.hanse.de) Received: (from stb@localhost) by transit.hanse.de (8.8.8/8.8.8) id BAA03396; Wed, 8 Apr 1998 01:33:52 +0200 (MET DST) Date: Wed, 8 Apr 1998 01:33:39 +0200 (MET DST) From: Stefan Bethke To: Chris Radek cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Accton EtherPocket device driver porting help In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 7 Apr 1998, Chris Radek wrote: > I am wanting to port the Linux driver for the Accton EtherPocket > parallel port ethernet device to FreeBSD. I am having trouble finding a > starting point - the FreeBSD Device Driver Writer's Guide looks great > for character devices, but is unhelpful (empty!) for network devices. [ snip ] > If not, where does a person begin when porting a network driver? I am > not allergic to digging through existing code, but a summary of the > necessary parts would be very helpful. Perhaps something like Linux's > skeleton.c? For "standard" ISA or PCI devices, take a look at one of the existing drivers; many of them are quite simple in their structure. In your case, however, you'd might be better off by looking at lp(4), the IP-over-parallel (aka PLIP) driver, in sys/isa/lpt.c, which basically does what you want, but with a different low-level interface. If you have enougth info on how to communicate with the adapter, this is probably the way to go (note, however, that having the Linux source might not necessarily be considered "enought info", depending on how much you'd be willing to do trial-and-error). You might also consider adding a line discipline a la PPP or SLIP to be loaded on top of the standard lpt driver, if that would be more suitable for the way to communicate to the adapter. Stefan -- Stefan Bethke Muehlendamm 12 Phone: +49-40-256848, +49-177-3504009 D-22087 Hamburg Hamburg, Germany To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message