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

mbcm.h (1397B)


      1 /*! \file mbcm.h
      2  *
      3  * BCM multiplexing APIs.
      4  */
      5 /*
      6  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      7  * 
      8  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      9  */
     10 
     11 #ifndef BCMI_LTSW_MBCM_H
     12 #define BCMI_LTSW_MBCM_H
     13 
     14 /*!
     15  * \brief Common declaration of function pointer for mbcm driver.
     16  */
     17 typedef int (*mbcm_ltsw_fnptr_t)(int unit, ...);
     18 
     19 /*!
     20  * \brief Common declaration of mbcm driver structure.
     21  */
     22 typedef struct mbcm_ltsw_drv_s mbcm_ltsw_drv_t;
     23 
     24 /*! Size of function pointer. */
     25 #define MBCM_LTSW_FNPTR_SZ  (sizeof(mbcm_ltsw_fnptr_t))
     26 
     27 /*!
     28  * \brief Initialize the mbcm dirver for the indicated unit.
     29  *
     30  * \param [in]  unit   Unit number
     31  *
     32  * \retval SHR_E_NONE  No errors.
     33  */
     34 extern int
     35 mbcm_ltsw_init(int unit);
     36 
     37 /*!
     38  * \brief Detach the mbcm driver for the specified unit.
     39  *
     40  * \param [in] unit Unit number.
     41  *
     42  * \retval SHR_E_NONE No errors.
     43  */
     44 extern int
     45 mbcm_ltsw_deinit(int unit);
     46 
     47 /*!
     48  * \brief Initialize the per-module mbcm driver.
     49  *
     50  * \param [in,out] dst The mbcm driver to be updated.
     51  * \param [in] src Source mbcm driver.
     52  * \param [in] cnt Count of function pointers in mbcm driver.
     53  *
     54  * \retval SHR_E_NONE No errors.
     55  */
     56 extern void
     57 mbcm_ltsw_drv_init(mbcm_ltsw_drv_t *dst,
     58                    mbcm_ltsw_drv_t *src,
     59                    int cnt);
     60 
     61 #endif /* BCMI_LTSW_MBCM_H */
     62