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