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