root/altq/altq.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


    1 /*      $OpenBSD: altq.h,v 1.6 2003/04/03 05:11:28 kjc Exp $    */
    2 /*      $KAME: altq.h,v 1.6 2000/12/14 08:12:45 thorpej Exp $   */
    3 
    4 /*
    5  * Copyright (C) 1998-2000
    6  *      Sony Computer Science Laboratories Inc.  All rights reserved.
    7  *
    8  * Redistribution and use in source and binary forms, with or without
    9  * modification, are permitted provided that the following conditions
   10  * are met:
   11  * 1. Redistributions of source code must retain the above copyright
   12  *    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.
   16  *
   17  * THIS SOFTWARE IS PROVIDED BY SONY CSL AND CONTRIBUTORS ``AS IS'' AND
   18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   20  * ARE DISCLAIMED.  IN NO EVENT SHALL SONY CSL OR CONTRIBUTORS BE LIABLE
   21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   27  * SUCH DAMAGE.
   28  */
   29 
   30 #ifndef _ALTQ_ALTQ_H_
   31 #define _ALTQ_ALTQ_H_
   32 
   33 /* altq discipline type */
   34 #define ALTQT_NONE               0      /* reserved */
   35 #define ALTQT_CBQ                1      /* cbq */
   36 #define ALTQT_WFQ                2      /* wfq */
   37 #define ALTQT_AFMAP              3      /* afmap */
   38 #define ALTQT_FIFOQ              4      /* fifoq */
   39 #define ALTQT_RED                5      /* red */
   40 #define ALTQT_RIO                6      /* rio */
   41 #define ALTQT_LOCALQ             7      /* local use */
   42 #define ALTQT_HFSC               8      /* hfsc */
   43 #define ALTQT_CDNR               9      /* traffic conditioner */
   44 #define ALTQT_BLUE              10      /* blue */
   45 #define ALTQT_PRIQ              11      /* priority queue */
   46 #define ALTQT_MAX               12      /* should be max discipline type + 1 */
   47 
   48 /* simple token backet meter profile */
   49 struct tb_profile {
   50         u_int   rate;   /* rate in bit-per-sec */
   51         u_int   depth;  /* depth in bytes */
   52 };
   53 
   54 /*
   55  * generic packet counter
   56  */
   57 struct pktcntr {
   58         u_int64_t       packets;
   59         u_int64_t       bytes;
   60 };
   61 
   62 #define PKTCNTR_ADD(cntr, len)  \
   63         do { (cntr)->packets++; (cntr)->bytes += len; } while (0)
   64 
   65 #ifdef _KERNEL
   66 #include <altq/altq_var.h>
   67 #endif
   68 
   69 #endif /* _ALTQ_ALTQ_H_ */

/* [<][>][^][v][top][bottom][index][help] */