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

failover.h (3675B)


      1 /*
      2  * DO NOT EDIT THIS FILE!
      3  * This file is auto-generated.
      4  * Edits to this file will be lost when it is regenerated.
      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 BCMINT_LTSW_MBCM_FAILOVER_H
     12 #define BCMINT_LTSW_MBCM_FAILOVER_H
     13 
     14 /*!
     15  * \brief Clear failover related LT tables.
     16  *
     17  * \param [in] unit Unit Number.
     18  *
     19  * \retval SHR_E_NONE No errors.
     20  * \retval !SHR_E_NONE Failure.
     21  */
     22 typedef int (*failover_clear_f)(int unit);
     23 
     24 /*!
     25  * \brief Initialize the failover software module.
     26  *
     27  * \param [in] unit Unit Number.
     28  *
     29  * \retval SHR_E_NONE No errors.
     30  * \retval !SHR_E_NONE Failure.
     31  */
     32 typedef int (*failover_init_f)(int unit);
     33 
     34 /*!
     35  * \brief Set/Clear the active state of usage of primary/protected NH.
     36  *
     37  * \param [in] unit Unit Number.
     38  * \param [in] nh_idx Nexthop index.
     39  * \param [in] enable True for use of protected NH, False for use of Primary NH
     40  *
     41  * \retval SHR_E_NONE No errors.
     42  * \retval !SHR_E_NONE Failure.
     43  */
     44 typedef int (*failover_egress_status_set_f)(
     45     int unit,
     46     int nh_idx,
     47     int enable);
     48 
     49 /*!
     50  * \brief Get the active state of usage of primary/protected NH.
     51  *
     52  * \param [in] unit Unit Number.
     53  * \param [in] nh_idx Nexthop index.
     54  * \param [out] enable True for use of protected NH, False for use of Primary NH
     55  *
     56  * \retval SHR_E_NONE No errors.
     57  * \retval !SHR_E_NONE Failure.
     58  */
     59 typedef int (*failover_egress_status_get_f)(
     60     int unit,
     61     int nh_idx,
     62     int *enable);
     63 
     64 /*!
     65  * \brief Failover driver structure.
     66  */
     67 typedef struct mbcm_ltsw_failover_drv_s {
     68 
     69     /*! Clear failover related LT tables. */
     70     failover_clear_f failover_clear;
     71 
     72     /*! Initialize the failover software module. */
     73     failover_init_f failover_init;
     74 
     75     /*! Set/Clear the active state of usage of primary/protected NH. */
     76     failover_egress_status_set_f failover_egress_status_set;
     77 
     78     /*! Get the active state of usage of primary/protected NH. */
     79     failover_egress_status_get_f failover_egress_status_get;
     80 
     81 } mbcm_ltsw_failover_drv_t;
     82 
     83 /*!
     84  * \brief Set the FAILOVER driver of the device.
     85  *
     86  * \param [in] unit Unit Number.
     87  * \param [in] drv Failover driver to set.
     88  *
     89  * \retval SHR_E_NONE No errors.
     90  * \retval !SHR_E_NONE Failure.
     91  */
     92 extern int
     93 mbcm_ltsw_failover_drv_set(
     94     int unit,
     95     mbcm_ltsw_failover_drv_t *drv);
     96 
     97 /*!
     98  * \brief Clear failover related LT tables.
     99  *
    100  * \param [in] unit Unit Number.
    101  *
    102  * \retval SHR_E_NONE No errors.
    103  * \retval !SHR_E_NONE Failure.
    104  */
    105 extern int
    106 mbcm_ltsw_failover_clear(int unit);
    107 
    108 /*!
    109  * \brief Initialize the failover software module.
    110  *
    111  * \param [in] unit Unit Number.
    112  *
    113  * \retval SHR_E_NONE No errors.
    114  * \retval !SHR_E_NONE Failure.
    115  */
    116 extern int
    117 mbcm_ltsw_failover_init(int unit);
    118 
    119 /*!
    120  * \brief Set/Clear the active state of usage of primary/protected NH.
    121  *
    122  * \param [in] unit Unit Number.
    123  * \param [in] nh_idx Nexthop index.
    124  * \param [in] enable True for use of protected NH, False for use of Primary NH
    125  *
    126  * \retval SHR_E_NONE No errors.
    127  * \retval !SHR_E_NONE Failure.
    128  */
    129 extern int
    130 mbcm_ltsw_failover_egress_status_set(
    131     int unit,
    132     int nh_idx,
    133     int enable);
    134 
    135 /*!
    136  * \brief Get the active state of usage of primary/protected NH.
    137  *
    138  * \param [in] unit Unit Number.
    139  * \param [in] nh_idx Nexthop index.
    140  * \param [out] enable True for use of protected NH, False for use of Primary NH
    141  *
    142  * \retval SHR_E_NONE No errors.
    143  * \retval !SHR_E_NONE Failure.
    144  */
    145 extern int
    146 mbcm_ltsw_failover_egress_status_get(
    147     int unit,
    148     int nh_idx,
    149     int *enable);
    150 
    151 #endif /* BCMINT_LTSW_MBCM_FAILOVER_H */