Clean up more #include files. Create an internal __boolean_t so two or
[dragonfly.git] / sys / net / altq / altq_var.h
CommitLineData
4d723e5a 1/* $KAME: altq_var.h,v 1.17 2004/04/20 05:09:08 kjc Exp $ */
03d6a592 2/* $DragonFly: src/sys/net/altq/altq_var.h,v 1.2 2006/05/21 03:43:46 dillon Exp $ */
4d723e5a
JS
3
4/*
5 * Copyright (C) 1998-2003
6 * Sony Computer Science Laboratories Inc. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY SONY CSL AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL SONY CSL OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29#ifndef _ALTQ_ALTQ_VAR_H_
30#define _ALTQ_ALTQ_VAR_H_
31
32#ifdef _KERNEL
33
03d6a592 34#ifndef _SYS_PARAM_H_
4d723e5a 35#include <sys/param.h>
03d6a592
MD
36#endif
37#ifndef _SYS_KERNEL_H_
4d723e5a 38#include <sys/kernel.h>
03d6a592
MD
39#endif
40#ifndef _SYS_MALLOC_H_
4d723e5a 41#include <sys/malloc.h>
03d6a592
MD
42#endif
43#ifndef _SYS_QUEUE_H_
4d723e5a 44#include <sys/queue.h>
03d6a592 45#endif
4d723e5a
JS
46
47MALLOC_DECLARE(M_ALTQ);
48
49/*
50 * machine dependent clock
51 * a 64bit high resolution time counter.
52 */
53extern int machclk_usepcc;
54extern uint32_t machclk_freq;
55extern uint32_t machclk_per_tick;
56
57void init_machclk(void);
58uint64_t read_machclk(void);
59
60#define m_pktlen(m) ((m)->m_pkthdr.len)
61
62extern int pfaltq_running;
63
64struct ifnet;
65struct mbuf;
66struct pf_altq;
67
68void *altq_lookup(const char *, int);
69uint8_t read_dsfield(struct mbuf *, struct altq_pktattr *);
70void write_dsfield(struct mbuf *, struct altq_pktattr *, uint8_t);
71int tbr_set(struct ifaltq *, struct tb_profile *);
72int tbr_get(struct ifaltq *, struct tb_profile *);
73
74int altq_pfattach(struct pf_altq *);
75int altq_pfdetach(struct pf_altq *);
76int altq_add(struct pf_altq *);
77int altq_remove(struct pf_altq *);
78int altq_add_queue(struct pf_altq *);
79int altq_remove_queue(struct pf_altq *);
80int altq_getqstats(struct pf_altq *, void *, int *);
81
82int cbq_pfattach(struct pf_altq *);
83int cbq_add_altq(struct pf_altq *);
84int cbq_remove_altq(struct pf_altq *);
85int cbq_add_queue(struct pf_altq *);
86int cbq_remove_queue(struct pf_altq *);
87int cbq_getqstats(struct pf_altq *, void *, int *);
88
89int priq_pfattach(struct pf_altq *);
90int priq_add_altq(struct pf_altq *);
91int priq_remove_altq(struct pf_altq *);
92int priq_add_queue(struct pf_altq *);
93int priq_remove_queue(struct pf_altq *);
94int priq_getqstats(struct pf_altq *, void *, int *);
95
96int hfsc_pfattach(struct pf_altq *);
97int hfsc_add_altq(struct pf_altq *);
98int hfsc_remove_altq(struct pf_altq *);
99int hfsc_add_queue(struct pf_altq *);
100int hfsc_remove_queue(struct pf_altq *);
101int hfsc_getqstats(struct pf_altq *, void *, int *);
102
103#endif /* _KERNEL */
104#endif /* _ALTQ_ALTQ_VAR_H_ */