instru.h (1974B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 6 * 7 * This file contains dnxInstrumentation module definitions internal to the BCM library. 8 */ 9 10 #ifndef BCM_DNX_SUPPORT 11 #error "This file is for use by DNX (JR2) family only!" 12 #endif 13 14 #ifndef _INSTRU_H_INCLUDED__ 15 #define _INSTRU_H_INCLUDED__ 16 17 #include <bcm/types.h> 18 #include <bcm/tunnel.h> 19 #include <soc/dnx/dbal/dbal_structures.h> 20 21 /* 22 * structure to hold all information related to trajectory trace EEDB entry 23 */ 24 typedef struct 25 { 26 uint32 flags; /* Configuration flags. */ 27 bcm_gport_t trajectory_trace_id; /* Tunnel id */ 28 int observation_domain; /* IPFIX obseravtion domain. */ 29 int template_id; /* PSAMP template-ID */ 30 bcm_if_t egress_tunnel_if; /* next_ptr */ 31 } bcm_instru_trajectory_trace_t; 32 33 /** 34 * \brief 35 * * Write to IPFIX/PSAMP encapsulation out-LIF table. 36 * 37 * \par DIRECT INPUT 38 * \param [in] unit - 39 * Relevant unit. 40 * \param [in] trajectory_trace - 41 * A pointer to the struct that holds information for the trajectory trace entry, 42 * see \ref bcm_instru_trajectory_trace_t. 43 * \par DIRECT OUTPUT: 44 * \retval Zero in case of NO ERROR. 45 * \retval Negative in case of an error, see \ref shr_error_e. 46 */ 47 shr_error_e dnx_instru_tragectory_trace_create( 48 int unit, 49 bcm_instru_trajectory_trace_t * trajectory_trace); 50 51 /** 52 * \brief - 53 * Init procedure for intru module 54 * 55 * \param [in] unit - Unit-ID 56 * \return 57 * See shr_error_e 58 * \remark 59 * * None 60 * \see 61 * * None 62 */ 63 shr_error_e dnx_instru_init( 64 int unit); 65 66 /** 67 * \brief - 68 * De-Init procedure for intru module 69 * 70 * \param [in] unit - Unit-ID 71 * \return 72 * See shr_error_e 73 * \remark 74 * * None 75 * \see 76 * * None 77 */ 78 shr_error_e dnx_instru_deinit( 79 int unit); 80 81 #endif /* _INSTRU_H_INCLUDED__ */