From owner-freebsd-net@FreeBSD.ORG Tue May 11 01:21:05 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A0C616A4CE for ; Tue, 11 May 2004 01:21:05 -0700 (PDT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B16143D45 for ; Tue, 11 May 2004 01:21:04 -0700 (PDT) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i4B8PrLI001587 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 May 2004 11:25:54 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.12.11/8.12.11) id i4B8LLr4065831; Tue, 11 May 2004 11:21:21 +0300 (EEST) (envelope-from ru) Date: Tue, 11 May 2004 11:21:21 +0300 From: Ruslan Ermilov To: Juan Rodriguez Hervella Message-ID: <20040511082121.GA64972@ip.net.ua> References: <200405102102.51399.jrh@it.uc3m.es> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline In-Reply-To: <200405102102.51399.jrh@it.uc3m.es> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-net@freebsd.org Subject: Re: How to use the RTM_IFINFO message of a Routing Socket X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2004 08:21:05 -0000 --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 10, 2004 at 09:02:51PM +0200, Juan Rodriguez Hervella wrote: > Hello, >=20 > I dont understand, looking at "man 4 route", how to use the RTM_IFINFO > message of a Routing Socket. >=20 > I mean, do I have to make a "write" on the socket with a=20 > "struct if_msghdr" of type =3D RTM_IFINFO and later on a "read" with > the same data structure ? >=20 > Or can I just open the PF_ROUTE socket and then make a "read" with=20 > a "struct if_msghdr" data structure, w/out doing a "write" ? >=20 > I'm really lost, and I haven't found documentation about this topic, so= =20 > please if somebody can give me an example or pointing me to > somewhere to learn to use this, I'd be delighted. Looking at=20 > "usr/src/bin/route.c" is simple another big mess for me. >=20 > I'm looking forward to your answers, net-people ! >=20 A kernel emits the RTM_IFINFO message on a routing socket by ether reacting to the NET_RT_IFLIST sysctl(3), or when the interface's status changes (see "route monitor" for one such example). Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --d6Gm4EdcadzBjdND Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAoI0BUkv4P6juNwoRAsH7AJsF+1HA1f4a1xGZ59pFUTCtbtENVgCfVLIA HQqyiytW9qP/sKP4WzKcM00= =Xxy3 -----END PGP SIGNATURE----- --d6Gm4EdcadzBjdND--