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#ifndef _ISISC_MIRROR_H_ 17#define _ISISC_MIRROR_H_ 18 19#ifdef __cplusplus 20extern "C" { 21#endif /* __cplusplus */ 22 23#include "fal/fal_mirror.h" 24#define MIRROR_ANALYZER_NONE 0xf 25 26 sw_error_t isisc_mirr_init(a_uint32_t dev_id); 27 28#ifdef IN_MIRROR 29#define ISISC_MIRR_INIT(rv, dev_id) \ 30 { \ 31 rv = isisc_mirr_init(dev_id); \ 32 SW_RTN_ON_ERROR(rv); \ 33 } 34#else 35#define ISISC_MIRR_INIT(rv, dev_id) 36#endif 37 38#ifdef HSL_STANDALONG 39 40 HSL_LOCAL sw_error_t 41 isisc_mirr_analysis_port_set(a_uint32_t dev_id, fal_port_t port_id); 42 43 44 HSL_LOCAL sw_error_t 45 isisc_mirr_analysis_port_get(a_uint32_t dev_id, fal_port_t * port_id); 46 47 48 HSL_LOCAL sw_error_t 49 isisc_mirr_port_in_set(a_uint32_t dev_id, fal_port_t port_id, 50 a_bool_t enable); 51 52 53 HSL_LOCAL sw_error_t 54 isisc_mirr_port_in_get(a_uint32_t dev_id, fal_port_t port_id, 55 a_bool_t * enable); 56 57 58 HSL_LOCAL sw_error_t 59 isisc_mirr_port_eg_set(a_uint32_t dev_id, fal_port_t port_id, 60 a_bool_t enable); 61 62 63 HSL_LOCAL sw_error_t 64 isisc_mirr_port_eg_get(a_uint32_t dev_id, fal_port_t port_id, 65 a_bool_t * enable); 66 67#endif 68 69#ifdef __cplusplus 70} 71#endif /* __cplusplus */ 72#endif /* _ISISC_MIRROR_H_ */ 73 74