#ifndef _ALTQ_ALTQ_VAR_H_
#define _ALTQ_ALTQ_VAR_H_
#ifdef _KERNEL
#ifndef _SYS_PARAM_H_
#include <sys/param.h>
#endif
#ifndef _SYS_KERNEL_H_
#include <sys/kernel.h>
#endif
#ifndef _SYS_QUEUE_H_
#include <sys/queue.h>
#endif
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_ALTQ);
#endif
extern uint64_t machclk_freq;
extern uint32_t machclk_per_tick;
void init_machclk(void);
uint64_t read_machclk(void);
#define m_pktlen(m) ((m)->m_pkthdr.len)
extern int pfaltq_running;
struct ifnet;
struct mbuf;
struct pf_altq;
struct pf_mtag;
void *altq_lookup(const char *, int);
uint8_t read_dsfield(struct mbuf *, struct altq_pktattr *);
void write_dsfield(struct mbuf *, struct altq_pktattr *, uint8_t);
int tbr_set(struct ifaltq *, struct tb_profile *);
int tbr_get(struct ifaltq *, struct tb_profile *);
int altq_pfattach(struct pf_altq *);
int altq_pfdetach(struct pf_altq *);
int altq_add(struct pf_altq *);
int altq_remove(struct pf_altq *);
int altq_add_queue(struct pf_altq *);
int altq_remove_queue(struct pf_altq *);
int altq_getqstats(struct pf_altq *, void *, int *);
int cbq_pfattach(struct pf_altq *, struct ifaltq *);
int cbq_add_altq(struct pf_altq *);
int cbq_remove_altq(struct pf_altq *);
int cbq_add_queue(struct pf_altq *);
int cbq_remove_queue(struct pf_altq *);
int cbq_getqstats(struct pf_altq *, void *, int *);
int priq_pfattach(struct pf_altq *, struct ifaltq *);
int priq_add_altq(struct pf_altq *);
int priq_remove_altq(struct pf_altq *);
int priq_add_queue(struct pf_altq *);
int priq_remove_queue(struct pf_altq *);
int priq_getqstats(struct pf_altq *, void *, int *);
int hfsc_pfattach(struct pf_altq *, struct ifaltq *);
int hfsc_add_altq(struct pf_altq *);
int hfsc_remove_altq(struct pf_altq *);
int hfsc_add_queue(struct pf_altq *);
int hfsc_remove_queue(struct pf_altq *);
int hfsc_getqstats(struct pf_altq *, void *, int *);
int fairq_pfattach(struct pf_altq *, struct ifaltq *);
int fairq_add_altq(struct pf_altq *);
int fairq_remove_altq(struct pf_altq *);
int fairq_add_queue(struct pf_altq *);
int fairq_remove_queue(struct pf_altq *);
int fairq_getqstats(struct pf_altq *, void *, int *);
#endif
#endif