openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

ft_user.h (4606B)


      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-2019 Broadcom Inc. All rights reserved.
      6  *
      7  * File:        ft_user.h
      8  * Purpose:     Function declarations for flowtracker user entry management.
      9  */
     10 
     11 #ifndef _BCM_INT_FT_USER_H_
     12 #define _BCM_INT_FT_USER_H_
     13 
     14 #include <soc/defs.h>
     15 
     16 #if defined(BCM_FLOWTRACKER_SUPPORT)
     17 #include <bcm_int/esw/flowtracker/ft_group.h>
     18 
     19 /*|*****************************************************|
     20  *|*****************************************************|
     21  *|           START  -  Software Insert Methods.        |
     22  *|*****************************************************|
     23  *|*****************************************************|
     24  */
     25 
     26 extern int
     27 bcmi_ft_user_init(int unit);
     28 
     29 extern void
     30 bcmi_ft_user_cleanup(int unit);
     31 
     32 /*
     33  * Function:
     34  *      bcmi_ftk_user_entry_add
     35  * Purpose:
     36  *      Add a user flow entry basis user input key elements. API
     37  *      expects that all tracking parametrs of type = 'KEY' in the
     38  *      group are specified.
     39  * Parameters:
     40  *      unit - (IN) Unit number.
     41  *      flow_group_id - (IN) Flowtracker flow group ID.
     42  *      options - (IN) Options for creting the flowtracker user entry.
     43  *      num_user_entry_params - (IN) Number of user entry params.
     44  *      user_entry_param_list - (IN) List of user entry params to add flow entry.
     45  *      entry_handle - (OUT) User entry handle corresponding to the entry added.
     46  * Returns:
     47  *      BCM_E_xxx
     48  * Notes:
     49  */
     50 extern int
     51 bcmi_ftk_user_entry_add(
     52     int unit,
     53     bcm_flowtracker_group_t flow_group_id,
     54     uint32 options,
     55     int num_user_entry_params,
     56     bcm_flowtracker_tracking_param_info_t *user_entry_param_list,
     57     bcm_flowtracker_user_entry_handle_t *entry_handle);
     58 
     59 /*
     60  * Function:
     61  *      bcmi_ftk_user_entry_get
     62  * Purpose:
     63  *      Fetch user entry info given the entry handle.
     64  * Parameters:
     65  *      unit - (IN) Unit number.
     66  *      entry_handle - (IN) Flowtracker user entry handle.
     67  *      num_user_entry_params - (IN) Number of user entry params.
     68  *      user_entry_param_list - (IN/OUT) List of user entry params added in the flow entry.
     69  *      actual_user_entry_params - (OUT) Actual number of params in the user entry.
     70  * Returns:
     71  *      BCM_E_xxx
     72  * Notes:
     73  */
     74 extern int
     75 bcmi_ftk_user_entry_get(
     76     int unit,
     77     bcm_flowtracker_user_entry_handle_t *entry_handle,
     78     int num_user_entry_params,
     79     bcm_flowtracker_tracking_param_info_t *user_entry_param_list,
     80     int *actual_user_entry_params);
     81 
     82 /*
     83  * Function:
     84  *      bcmi_ftk_user_entry_get_all
     85  * Purpose:
     86  *      Fetch all user entries added in a against a given flow group.
     87  * Parameters:
     88  *      unit - (IN) Unit number.
     89  *      flow_group_id - (IN) Flowtracker flow group ID.
     90  *      num_user_entry_handles - (IN) Number of export elements intended in the tempate.
     91  *      user_entry_handle_list - (IN/OUT) List of user entry handles corresponding to the user entries added.
     92  *      actual_user_entry_handles - (OUT) Actual number of user entry handles corresponding to the entries added.
     93  * Returns:
     94  *      BCM_E_xxx
     95  * Notes:
     96  */
     97 extern int
     98 bcmi_ftk_user_entry_get_all(
     99     int unit,
    100     bcm_flowtracker_group_t flow_group_id,
    101     int num_user_entry_handles,
    102     bcm_flowtracker_user_entry_handle_t *user_entry_handle_list,
    103     int *actual_user_entry_handles);
    104 
    105 /*
    106  * Function:
    107  *      bcmi_ftk_user_entry_delete
    108  * Purpose:
    109  *      Delete user flow entry that is added earlier.
    110  * Parameters:
    111  *      unit - (IN) Unit number.
    112  *      flow_group_id - (IN) Flowtracker flow group ID.
    113  *      entry_handle - (IN) User entry handle corresponding to the entry added.
    114  * Returns:
    115  *      BCM_E_xxx
    116  * Notes:
    117  */
    118 extern int
    119 bcmi_ftk_user_entry_delete(
    120     int unit,
    121     bcm_flowtracker_group_t flow_group_id,
    122     bcm_flowtracker_user_entry_handle_t *entry_handle);
    123 
    124 /*
    125  * Function:
    126  *      bcmi_ftk_user_entry_delete_all
    127  * Purpose:
    128  *      Delete user flow entry that is added earlier.
    129  * Parameters:
    130  *      unit - (IN) Unit number.
    131  *      flow_group_id - (IN) Flowtracker flow group ID.
    132  * Returns:
    133  *      BCM_E_xxx
    134  * Notes:
    135  */
    136 extern int
    137 bcmi_ftk_user_entry_delete_all(
    138     int unit,
    139     bcm_flowtracker_group_t flow_group_id);
    140 
    141 /*|*****************************************************|
    142  *|*****************************************************|
    143  *|           END  -  Software Insert Methods.          |
    144  *|*****************************************************|
    145  *|*****************************************************|
    146  */
    147 
    148 #endif /* BCM_FLOWTRACKER_SUPPORT */
    149 
    150 #endif /* _BCM_INT_FT_USER_H_ */
    151 
    152