From owner-cvs-all Mon Jan 21 8:40:35 2002 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id A41FF37B405; Mon, 21 Jan 2002 08:40:08 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id g0LGdl887593; Mon, 21 Jan 2002 18:39:47 +0200 (EET) (envelope-from ru) Date: Mon, 21 Jan 2002 18:39:47 +0200 From: Ruslan Ermilov To: "M. Warner Losh" Cc: rwatson@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net if.c if.h route.h rtsock.c src/share/man/man4 route.4 src/sbin/route route.c Message-ID: <20020121183947.A83821@sunbay.com> References: <20020121103822.A16527@sunbay.com> <20020121173406.A77567@sunbay.com> <20020121.085527.98102760.imp@village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020121.085527.98102760.imp@village.org> User-Agent: Mutt/1.3.23i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Jan 21, 2002 at 08:55:27AM -0700, M. Warner Losh wrote: > In message: <20020121173406.A77567@sunbay.com> > Ruslan Ermilov writes: > : I'm talking about IFF_UP thing here, not sure what do you mean. > > Robert is talking about connecting and disconnecting the cable. This > changes the "link status": > > fxp0: flags=8843 mtu 1500 > inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 > ether 00:20:e0:68:17:ae > media: Ethernet autoselect (none) > status: no carrier > > to > > fxp0: flags=8843 mtu 1500 > inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 > ether 00:20:e0:68:17:ae > media: Ethernet autoselect (none) > status: active > Nope, this actually changes the "media status", that is where my confusion comes from. I've looked at several device drivers, and some get asynchronous notifications about media status changes (like ti(4)), and some don't (like dc(4) using dcphy_status() through mii_pollstat()). This means that the only reliable way is to periodically query the driver about media status changes through the SIOCGIFMEDIA ioctl. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message