2 /* $KAME: qop_cbq.h,v 1.2 2000/10/18 09:15:18 kjc Exp $ */
4 * Copyright (c) Sun Microsystems, Inc. 1993-1998 All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * 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 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by the SMCC Technology
20 * Development Group at Sun Microsystems, Inc.
22 * 4. The name of the Sun Microsystems, Inc nor may not be used to endorse or
23 * promote products derived from this software without specific prior
26 * SUN MICROSYSTEMS DOES NOT CLAIM MERCHANTABILITY OF THIS SOFTWARE OR THE
27 * SUITABILITY OF THIS SOFTWARE FOR ANY PARTICULAR PURPOSE. The software is
28 * provided "as is" without express or implied warranty of any kind.
30 * These notices must be retained in any copies of any part of this software.
33 #include <altq/altq_rmclass.h>
34 #include <altq/altq_cbq.h>
36 /* cbq admission types */
46 * cbq private ifinfo structure
49 struct classinfo
*root_class
; /* root class */
50 struct classinfo
*default_class
; /* default class */
51 struct classinfo
*ctl_class
; /* control class */
53 double nsPerByte
; /* bandwidth in ns per sec */
54 int is_wrr
; /* use weighted-round robin */
55 int is_efficient
; /* use work-conserving */
59 * cbq private classinfo structure
61 struct cbq_classinfo
{
62 u_int bandwidth
; /* bandwidth in bps */
63 u_int allocated
; /* bandwidth used by children */
71 cbq_class_spec_t class_spec
; /* class parameters */
74 int cbq_interface_parser(const char *ifname
, int argc
, char **argv
);
75 int cbq_class_parser(const char *ifname
, const char *class_name
,
76 const char *parent_name
, int argc
, char **argv
);
78 int qcmd_cbq_add_if(const char *ifname
, u_int bandwidth
,
79 int is_wrr
, int efficient
);
80 int qcmd_cbq_add_class(const char *ifname
, const char *class_name
,
81 const char *parent_name
, const char *borrow_name
,
82 u_int pri
, u_int bandwidth
,
83 u_int maxdelay
, u_int maxburst
, u_int minburst
,
84 u_int av_pkt_size
, u_int max_pkt_size
,
85 int admission_type
, int flags
);
86 int qcmd_cbq_modify_class(const char *ifname
, const char *class_name
,
87 u_int pri
, u_int bandwidth
,
88 u_int maxdelay
, u_int maxburst
, u_int minburst
,
89 u_int av_pkt_size
, u_int max_pkt_size
, int flags
);
91 int qop_cbq_add_if(struct ifinfo
**rp
, const char *ifname
,
92 u_int bandwidth
, int is_wrr
, int efficient
);
93 int qop_cbq_add_class(struct classinfo
**rp
, const char *class_name
,
94 struct ifinfo
*ifinfo
, struct classinfo
*parent
,
95 struct classinfo
*borrow
, u_int pri
, u_int bandwidth
,
96 u_int maxdelay
, u_int maxburst
, u_int minburst
,
97 u_int av_pkt_size
, u_int max_pkt_size
,
98 int admission_type
, int flags
);
99 int qop_cbq_modify_class(struct classinfo
*clinfo
, u_int pri
, u_int bandwidth
,
100 u_int maxdelay
, u_int maxburst
, u_int minburst
,
101 u_int av_pkt_size
, u_int max_pkt_size
, int flags
);