mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
IfAPI: Add if_altq_is_enabled() interface.
Summary: The only user of the ALTQ_IS_ENABLED() in a driver checks against the ifnet queue. Abstract that all out and present the interface to check if ALTQ is enabled on the interface. Sponsored by: Juniper Networks, Inc. Reviewed By: glebius Differential Revision: https://reviews.freebsd.org/D38204
This commit is contained in:
parent
31cfaf191b
commit
d79539e6f2
2 changed files with 8 additions and 0 deletions
|
|
@ -4905,6 +4905,12 @@ if_getcounter(if_t ifp, ift_counter counter)
|
|||
return (ifp->if_get_counter(ifp, counter));
|
||||
}
|
||||
|
||||
bool
|
||||
if_altq_is_enabled(if_t ifp)
|
||||
{
|
||||
return (ALTQ_IS_ENABLED(&ifp->if_snd));
|
||||
}
|
||||
|
||||
struct vnet *
|
||||
if_getvnet(if_t ifp)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -646,6 +646,8 @@ struct bpf_if *if_getbpf(if_t ifp);
|
|||
uint8_t if_getpcp(if_t ifp);
|
||||
void *if_getl2com(if_t ifp);
|
||||
struct ifvlantrunk *if_getvlantrunk(if_t ifp);
|
||||
bool if_altq_is_enabled(if_t ifp);
|
||||
|
||||
void *if_getafdata(if_t ifp, int);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue