mtree(8): Fix crc() prototype.
[dragonfly.git] / sys / net / altq / altq.h
blob4962f898e7c7026eb1e0e6d56e4ef9234c90649c
1 /* $KAME: altq.h,v 1.10 2003/07/10 12:07:47 kjc Exp $ */
2 /* $DragonFly: src/sys/net/altq/altq.h,v 1.2 2008/04/06 18:58:15 dillon Exp $ */
4 /*
5 * Copyright (C) 1998-2003
6 * Sony Computer Science Laboratories Inc. All rights reserved.
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.
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.
29 #ifndef _ALTQ_ALTQ_H_
30 #define _ALTQ_ALTQ_H_
32 /* altq discipline type */
33 #define ALTQT_NONE 0 /* reserved */
34 #define ALTQT_CBQ 1 /* cbq */
35 #define ALTQT_RED 2 /* red */
36 #define ALTQT_RIO 3 /* rio */
37 #define ALTQT_HFSC 4 /* hfsc */
38 #define ALTQT_PRIQ 5 /* priority queue */
39 #define ALTQT_FAIRQ 6 /* fair queue (requires keep state) */
40 #define ALTQT_MAX 7 /* should be max discipline type + 1 */
42 /* simple token packet meter profile */
43 struct tb_profile {
44 u_int rate; /* rate in bit-per-sec */
45 u_int depth; /* depth in bytes */
49 * generic packet counter
51 struct pktcntr {
52 uint64_t packets;
53 uint64_t bytes;
56 #define PKTCNTR_ADD(cntr, len) do { \
57 (cntr)->packets++; (cntr)->bytes += len; \
58 } while (0)
60 #ifdef _KERNEL
61 #include <net/altq/altq_var.h>
62 #endif
64 #endif /* _ALTQ_ALTQ_H_ */