1/* 2 * Copyright (c) 2014, The Linux Foundation. All rights reserved. 3 * Permission to use, copy, modify, and/or distribute this software for 4 * any purpose with or without fee is hereby granted, provided that the 5 * above copyright notice and this permission notice appear in all copies. 6 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 7 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 8 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 9 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 10 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 11 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 12 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 13 */ 14 15 16/** 17 * @defgroup fal_stp FAL_STP 18 * @{ 19 */ 20#ifndef _FAL_STP_H_ 21#define _FAL_STP_H_ 22 23#ifdef __cplusplus 24extern "C" { 25#endif /* __cplusplus */ 26 27#include "common/sw.h" 28#include "fal/fal_type.h" 29 30#define FAL_SINGLE_STP_ID 0 31 32 /** 33 @brief This enum defines port state for spanning tree. 34 */ 35 typedef enum { 36 FAL_STP_DISABLED = 0, /**< disable state*/ 37 FAL_STP_BLOKING, /**< blocking state*/ 38 FAL_STP_LISTENING, /**< listening state*/ 39 FAL_STP_LEARNING, /**< learning state*/ 40 FAL_STP_FARWARDING, /**< forwarding state*/ 41 FAL_STP_STATE_BUTT 42 } 43 fal_stp_state_t; 44 45 46 47 sw_error_t 48 fal_stp_port_state_set(a_uint32_t dev_id, a_uint32_t st_id, 49 fal_port_t port_id, fal_stp_state_t state); 50 51 52 53 sw_error_t 54 fal_stp_port_state_get(a_uint32_t dev_id, a_uint32_t st_id, 55 fal_port_t port_id, fal_stp_state_t * state); 56 57 58#ifdef __cplusplus 59} 60#endif /* __cplusplus */ 61#endif /* _FAL_STP_H_ */ 62 63/** 64 * @} 65 */ 66