1/* 2 * Copyright (c) 2012, 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 shiva_vlan SHIVA_VLAN 18 * @{ 19 */ 20#ifndef _SHIVA_VLAN_H_ 21#define _SHIVA_VLAN_H_ 22 23#ifdef __cplusplus 24extern "C" { 25#endif /* __cplusplus */ 26 27#include "fal/fal_vlan.h" 28 29 sw_error_t 30 shiva_vlan_init(a_uint32_t dev_id); 31 32#ifdef IN_VLAN 33#define SHIVA_VLAN_INIT(rv, dev_id) \ 34 { \ 35 rv = shiva_vlan_init(dev_id); \ 36 SW_RTN_ON_ERROR(rv); \ 37 } 38#else 39#define SHIVA_VLAN_INIT(rv, dev_id) 40#endif 41 42#ifdef HSL_STANDALONG 43 44 45 HSL_LOCAL sw_error_t 46 shiva_vlan_entry_append(a_uint32_t dev_id, const fal_vlan_t * vlan_entry); 47 48 49 HSL_LOCAL sw_error_t 50 shiva_vlan_create(a_uint32_t dev_id, a_uint32_t vlan_id); 51 52 53 HSL_LOCAL sw_error_t 54 shiva_vlan_next(a_uint32_t dev_id, a_uint32_t vlan_id, fal_vlan_t * p_vlan); 55 56 57 HSL_LOCAL sw_error_t 58 shiva_vlan_find(a_uint32_t dev_id, a_uint32_t vlan_id, fal_vlan_t * p_vlan); 59 60 61 HSL_LOCAL sw_error_t 62 shiva_vlan_member_update(a_uint32_t dev_id, a_uint32_t vlan_id, 63 fal_pbmp_t member, fal_pbmp_t u_member); 64 65 66 HSL_LOCAL sw_error_t 67 shiva_vlan_delete(a_uint32_t dev_id, a_uint32_t vlan_id); 68 69 70 HSL_LOCAL sw_error_t 71 shiva_vlan_flush(a_uint32_t dev_id); 72 73 74#endif 75 76#ifdef __cplusplus 77} 78#endif /* __cplusplus */ 79 80#endif /* _SHIVA_VLAN_H_ */ 81/** 82 * @} 83 */ 84