From owner-freebsd-net@FreeBSD.ORG Wed Dec 15 17:16:07 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9DF310656B6 for ; Wed, 15 Dec 2010 17:16:07 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-fx0-f49.google.com (mail-fx0-f49.google.com [209.85.161.49]) by mx1.freebsd.org (Postfix) with ESMTP id 394238FC13 for ; Wed, 15 Dec 2010 17:16:06 +0000 (UTC) Received: by fxm19 with SMTP id 19so2246609fxm.36 for ; Wed, 15 Dec 2010 09:16:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=KLCTeT7alum4xVO1p1/Rym+snEezJTfe1vnPnnj40nc=; b=PdAp6qkiFRh+BdromVE/GsueiqRF19ExOjnHtrkaCH5GFY66RqEBxxT9jqQxTtyOsw qsLMeYOkuvAHklWqZglDoOc6h7uK91YtP8vq+A+nY8xHvkinxjTJbTh8w9TWRlVxcDxR 9Q8l4EJqQLx+ywwLLAZ6OyQCMb3/fSl9QULQ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=HzCs/KP1HrIxajFOajbiVHXdoEeCwfKJED+wIGpW0ITRh06LvnN4ZNUUgbTkS5DlgG CkQr+HDw3FR4nyHwVQQWAFAJwWGHFcksMMDGK8E1NwKCfk43mIQfjNUYaZEOB/z5kTjJ jS7GWdslWBGjsmTvDX3XPin1GPAIq3B7Zvpw8= Received: by 10.223.120.73 with SMTP id c9mr7739356far.50.1292433365345; Wed, 15 Dec 2010 09:16:05 -0800 (PST) Received: from [10.129.23.105] ([217.18.249.148]) by mx.google.com with ESMTPS id 21sm540047fav.17.2010.12.15.09.16.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 15 Dec 2010 09:16:03 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1082) From: Nikolay Denev In-Reply-To: Date: Wed, 15 Dec 2010 19:16:00 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: freebsd-net@freebsd.org X-Mailer: Apple Mail (2.1082) Subject: Re: Generating RTM_IFINFO messages on interface description change? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 17:16:07 -0000 On 13 Dec, 2010, at 13:21 , Nikolay Denev wrote: > Hello, >=20 > I'm currently trying to enable bsnmpd to export the interface > descriptions that are supported on FreeBSD 8+ as ifDescr and > while doing it I'm wondering if RTM_IFINFO msgs should be generated > on description set/change. This would greatly simplify the = functionality > in bsnmpd and would prevent needless polls/ioctls. >=20 > My opinion is that it probably is OK to generate RTM_IFINFO on this = event but are there other opinions? >=20 >=20 > Regards, > Nikolay Ok, This simple patch will enable the RTM_IFINFO messages when interface = description is changed : --- /usr/src/sys/net.old/if.c 2010-12-15 17:32:59.000000000 +0100 +++ /usr/src/sys/net/if.c 2010-12-15 17:36:08.000000000 +0100 @@ -2176,6 +2176,7 @@ =20 getmicrotime(&ifp->if_lastchange); free(odescrbuf, M_IFDESCR); + rt_ifmsg(ifp); break; =20 case SIOCSIFFLAGS: With this patch the message will be generated, but without information = about what changed. But I wonder if adding the description in if_data isn't too much...