Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2023 11:32:26 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        =?UTF-8?Q?Mina_Gali=c4=87?= <freebsd@igalic.co>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, "freebsd-infiniband@FreeBSD.org" <freebsd-infiniband@FreeBSD.org>
Subject:   Re: Ifconfig limitations
Message-ID:  <fff88b1b-8d61-3941-78a1-cfe9b24bad9f@selasky.org>
In-Reply-To: <IVmRoS9TeDkyGukaM0qZFV5cJHYqgRVSK9j6QcGojTxcZO5PIXxaXLWyoMNCyfwsjJDMtGJpRy0wQlbZFHej-eOh8zg_HFPI6urBrV8FB9I=@igalic.co>
References:  <IVmRoS9TeDkyGukaM0qZFV5cJHYqgRVSK9j6QcGojTxcZO5PIXxaXLWyoMNCyfwsjJDMtGJpRy0wQlbZFHej-eOh8zg_HFPI6urBrV8FB9I=@igalic.co>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

All the `/sys/class/net/<device>/*` entries are sysctl(8) entries, like 
Sobczak, pointed out. They are converted simply by replacing "/" with 
".", and there are some helper functions in:

contrib/ofed/libibumad/sysfs.c:	if (sysctlbyname(PATH_TO_SYS(path), str, 
&len, NULL, 0) == -1)

To do this conversion automagically. you specify the Linux equivalent as 
a "const char *" pointer, and then it looks up the value for you under 
FreeBSD.

We may not have all the entries, but most you need is there, and some 
additions specific to FreeBSD.

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fff88b1b-8d61-3941-78a1-cfe9b24bad9f>