Date: Wed, 15 Dec 2010 19:16:00 +0200 From: Nikolay Denev <ndenev@gmail.com> To: freebsd-net@freebsd.org Subject: Re: Generating RTM_IFINFO messages on interface description change? Message-ID: <B4877D84-9274-441F-8157-86A634C8BA59@gmail.com> In-Reply-To: <FDFB7BD2-3DCD-45FA-83DA-31D9DC4A50B3@gmail.com> References: <FDFB7BD2-3DCD-45FA-83DA-31D9DC4A50B3@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B4877D84-9274-441F-8157-86A634C8BA59>