qop_red.h revision 1.2
11.2Sitojun/* $NetBSD: qop_red.h,v 1.2 2001/08/16 07:48:14 itojun Exp $ */ 21.1Sthorpej/* $KAME: qop_red.h,v 1.2 2000/10/18 09:15:20 kjc Exp $ */ 31.1Sthorpej/* 41.1Sthorpej * Copyright (C) 1999-2000 51.1Sthorpej * Sony Computer Science Laboratories, Inc. All rights reserved. 61.1Sthorpej * 71.1Sthorpej * Redistribution and use in source and binary forms, with or without 81.1Sthorpej * modification, are permitted provided that the following conditions 91.1Sthorpej * are met: 101.1Sthorpej * 1. Redistributions of source code must retain the above copyright 111.1Sthorpej * notice, this list of conditions and the following disclaimer. 121.1Sthorpej * 2. Redistributions in binary form must reproduce the above copyright 131.1Sthorpej * notice, this list of conditions and the following disclaimer in the 141.1Sthorpej * documentation and/or other materials provided with the distribution. 151.1Sthorpej * 161.1Sthorpej * THIS SOFTWARE IS PROVIDED BY SONY CSL AND CONTRIBUTORS ``AS IS'' AND 171.1Sthorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 181.1Sthorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 191.1Sthorpej * ARE DISCLAIMED. IN NO EVENT SHALL SONY CSL OR CONTRIBUTORS BE LIABLE 201.1Sthorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 211.1Sthorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 221.1Sthorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 231.1Sthorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 241.1Sthorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 251.1Sthorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 261.1Sthorpej * SUCH DAMAGE. 271.1Sthorpej */ 281.1Sthorpej 291.1Sthorpej/* 301.1Sthorpej * red private ifinfo structure 311.1Sthorpej */ 321.1Sthorpejstruct red_ifinfo { 331.1Sthorpej int weight; /* weight for EWMA */ 341.1Sthorpej int inv_pmax; /* inverse of max drop probability */ 351.1Sthorpej int th_min; /* red min threshold */ 361.1Sthorpej int th_max; /* red max threshold */ 371.1Sthorpej int qlimit; /* max queue length */ 381.1Sthorpej int pkttime; /* average packet time in usec */ 391.1Sthorpej int flags; /* see below */ 401.1Sthorpej}; 411.1Sthorpej 421.1Sthorpejint red_interface_parser(const char *ifname, int argc, char **argv); 431.1Sthorpejint qcmd_red_add_if(const char *ifname, u_int bandwidth, int weight, 441.1Sthorpej int inv_pmax, int th_min, int th_max, int qlimit, 451.1Sthorpej int pkttime, int flags); 461.1Sthorpejint qop_red_add_if(struct ifinfo **rp, const char *ifname, 471.1Sthorpej u_int bandwidth, int weight, int inv_pmax, int th_min, 481.1Sthorpej int th_max, int qlimit, int pkttime, int flags); 49