2 * Copyright (c) 2001 Daniel Hartmeier
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following
13 * disclaimer in the documentation and/or other materials provided
14 * with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
19 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
20 * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
26 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE.
29 * $OpenBSD: pfvar.h,v 1.282 2009/01/29 15:12:28 pyr Exp $
33 #ifndef _NET_PF_ALTQ_H_
34 #define _NET_PF_ALTQ_H_
59 /* real-time service curve */
60 u_int rtsc_m1; /* slope of the 1st segment in bps */
61 u_int rtsc_d; /* the x-projection of m1 in msec */
62 u_int rtsc_m2; /* slope of the 2nd segment in bps */
63 /* link-sharing service curve */
67 /* upper-limit service curve */
75 * XXX this needs some work
82 /* link sharing service curve */
89 char ifname[IFNAMSIZ];
91 void *altq_disc; /* discipline-specific state */
92 TAILQ_ENTRY(pf_altq) entries;
95 uint8_t scheduler; /* scheduler type */
96 uint16_t tbrsize; /* tokenbucket regulator size */
97 uint32_t ifbandwidth; /* interface bandwidth */
100 char qname[PF_QNAME_SIZE]; /* queue name */
101 char parent[PF_QNAME_SIZE]; /* parent name */
102 uint32_t parent_qid; /* parent queue id */
103 uint32_t bandwidth; /* queue bandwidth */
104 uint8_t priority; /* priority */
105 uint8_t local_flags; /* dynamic interface */
106 #define PFALTQ_FLAG_IF_REMOVED 0x01
108 uint16_t qlimit; /* queue size limit */
109 uint16_t flags; /* misc flags */
111 struct cbq_opts cbq_opts;
112 struct codel_opts codel_opts;
113 struct priq_opts priq_opts;
114 struct hfsc_opts hfsc_opts;
115 struct fairq_opts fairq_opts;
118 uint32_t qid; /* return value */
121 #endif /* _NET_PF_ALTQ_H_ */