From owner-freebsd-hackers Sun Oct 20 14:20:10 2002 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 A4C6237B406 for ; Sun, 20 Oct 2002 14:20:08 -0700 (PDT) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C4CC43E91 for ; Sun, 20 Oct 2002 14:20:07 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc02.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021020212006.STZG26432.sccrmhc02.attbi.com@InterJet.elischer.org>; Sun, 20 Oct 2002 21:20:06 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id OAA19407; Sun, 20 Oct 2002 14:18:23 -0700 (PDT) Date: Sun, 20 Oct 2002 14:18:22 -0700 (PDT) From: Julian Elischer To: Steve Tremblett Cc: freebsd-hackers@freebsd.org Subject: Re: dumb Q: netgraph node init? In-Reply-To: <20021020171139.B1512@sjt-u10.cisco.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 20 Oct 2002, Steve Tremblett wrote: > +---- Julian Elischer wrote: > | > I have NETGRAPH_ETHER and NETGRAPH_PPPOE in my kernel config. I don't > | > start pppoe at boot time. Before ppp is up, ngctl shows ng_ether but > | > not pppoe. What defines how ng_ether is loaded and hooked at boot time > | > as opposed to ng_pppoe loaded and hooked automatically? > | > | ng_ether nodes are attached automatically to all exisiting ethernet > | interfaces. > | ng_pppoe nodes are only created when you ask for one. > | > | do a 'types' commnad in ngctl to see possible types to make. > > How does invoking pppd result in the PPPoE node being hooked and > initialized? It looks like pppd treats a device called "PPPoE:xl0" as > a serial device or am I missing something? Firstly it's not "pppd" but "ppp".. they are different programs. ppp opens a netgraph control socket and issues all the netgraph control messages needed to make a pppoe node and attach it to the selected interface. ng_ether has an init routine that is called during boot or when the module is loaded, (or when a new ethernet interfaace is added if it's already loaded). ng_pppoe has such a function too but it doesn't create any nodes up front, but just sets up some internal linkages (in fact I think it uses the default function provided by netgraph and doesn't have it's own). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message