1 /* 2 * Copyright (C) 1999-2011, Broadcom Corporation 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * 16 * Fundamental types and constants relating to 802.1D 17 * 18 * $Id: 802.1d.h,v 9.3 2007-04-10 21:33:06 Exp $ 19 */ 20 21 22 #ifndef _802_1_D_ 23 #define _802_1_D_ 24 25 26 #define PRIO_8021D_NONE 2 27 #define PRIO_8021D_BK 1 28 #define PRIO_8021D_BE 0 29 #define PRIO_8021D_EE 3 30 #define PRIO_8021D_CL 4 31 #define PRIO_8021D_VI 5 32 #define PRIO_8021D_VO 6 33 #define PRIO_8021D_NC 7 34 #define MAXPRIO 7 35 #define NUMPRIO (MAXPRIO + 1) 36 37 #define ALLPRIO -1 38 39 40 #define PRIO2PREC(prio) \ 41 (((prio) == PRIO_8021D_NONE || (prio) == PRIO_8021D_BE) ? ((prio^2)) : (prio)) 42 43 #endif 44