Looking for the FreeBSD equivalent of an OpenBSD function
Adrian Penisoara
ady at freebsd.ady.ro
Sat Aug 9 11:36:27 UTC 2008
Hi,
On Sat, Aug 9, 2008 at 12:09 PM, Ryan French <rfrench at freebsd.org> wrote:
> Hi all,
>
> First of all thank you for all the help with my question yesterday, my problem
> today is unfortunately not something syntactical like the last one.
>
> I am working on moving over code from OpenBSDs implementation ofMPLS to
> FreeBSD, and I have run up against a function called 'sysctl_ifq' and I was
> wondering if anyone knew of an equivalent in FreeBSD. The code that calls the
> function is shown below. Thanks for any help.
You mean the following one:
http://fxr.watson.org/fxr/source/net/if.c?v=OPENBSD#L1944
In FreeBSD I think one can extract the values for queue (maximum)
length and drops stats from the ifq structure using the
_IF_DROP()/_IF_QLEN() macros here:
http://fxr.watson.org/fxr/source/net/if_var.h?im=bigexcerpts#L247
I'm not sure whether you might need to use locking primitives to query
these values for MP reasons with IF_LOCK()/IF_UNLOCK().
Regards,
Adrian.
More information about the freebsd-net
mailing list