Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Aug 2008 13:36:26 +0200
From:      "Adrian Penisoara" <ady@freebsd.ady.ro>
To:        "Ryan French" <rfrench@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Looking for the FreeBSD equivalent of an OpenBSD function
Message-ID:  <78cb3d3f0808090436h565dbe9foea6cf8df55c3cf14@mail.gmail.com>
In-Reply-To: <200808092209.55478.rfrench@freebsd.org>
References:  <200808092209.55478.rfrench@freebsd.org>

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

On Sat, Aug 9, 2008 at 12:09 PM, Ryan French <rfrench@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?78cb3d3f0808090436h565dbe9foea6cf8df55c3cf14>