text: /*
   * DO NOT EDIT THIS FILE!
   * This file is auto-generated.
   * Edits to this file will be lost when it is regenerated.
   *
   * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
   * 
   * Copyright 2007-2020 Broadcom Inc. All rights reserved.
   */
  
  #ifndef BCMI_LTSW_OBM_H
  #define BCMI_LTSW_OBM_H
  
  #include <bcm/types.h>
  
  #include <bcm_int/ltsw/obm.h>
  
  /*!
   * \brief Enumerator for port controls for parsing different packets in the OBM buffer.
   */
  typedef enum bcmi_ltsw_obm_port_control_s {
  
      /*! Port header type 0:Ethernet, 1:GSH */
      bcmiObmPortControlHeaderType = 0,
  
      /*! Enable to map dscp 0:disable, 1:enable */
      bcmiObmPortControlDscpMapEnable = 1,
  
      /*! Enable to map mpls exp 0:disable, 1:enable */
      bcmiObmPortControlMplsMapEnable = 2,
  
      /*! Enable to map etag 0:disable, 1:enable */
      bcmiObmPortControlEtagMapEnable = 3,
  
      /*! Enable Inner TPID 0:disable, 1:enable */
      bcmiObmPortControlInnerTpidEnable = 4,
  
      /*! Inner TPID value */
      bcmiObmPortControlInnerTpid = 5,
  
      /*! Enable Outer TPID0 0:disable, 1:enable */
      bcmiObmPortControlOuterTpid0Enable = 6,
  
      /*! Enable Outer TPID1 0:disable, 1:enable */
      bcmiObmPortControlOuterTpid1Enable = 7,
  
      /*! Enable Outer TPID2 0:disable, 1:enable */
      bcmiObmPortControlOuterTpid2Enable = 8,
  
      /*! Enable Outer TPID3 0:disable, 1:enable */
      bcmiObmPortControlOuterTpid3Enable = 9,
  
      /*! Outer TPID0 value */
      bcmiObmPortControlOuterTpid0 = 10,
  
      /*! Outer TPID1 value */
      bcmiObmPortControlOuterTpid1 = 11,
  
      /*! Outer TPID2 value */
      bcmiObmPortControlOuterTpid2 = 12,
  
      /*! Outer TPID3 value */
      bcmiObmPortControlOuterTpid3 = 13,
  
      /*! Default priority value */
      bcmiObmPortControlDefaultPktPri = 14,
  
      /*! Ethertype to identify ETAG packets */
      bcmiObmPortControlEtagEthertype = 15,
  
      /*! Ethertype to identify VNTAG packets */
      bcmiObmPortControlVntagEthertype = 16,
  
      /*! Ethertype to identify higig3 packets */
      bcmiObmPortControlHigig3Ethertype = 17,
  
      /*! Parse type count. */
      bcmiObmPortControlCount = 18
  
  } bcmi_ltsw_obm_port_control_t;
  
  #define BCMI_LTSW_OBM_PORT_CONTROL_STR \
  { \
      "HeaderType", \
      "DscpMapEnable", \
      "MplsMapEnable", \
      "EtagMapEnable", \
      "InnerTpidEnable", \
      "InnerTpid", \
      "OuterTpid0Enable", \
      "OuterTpid1Enable", \
      "OuterTpid2Enable", \
      "OuterTpid3Enable", \
      "OuterTpid0", \
      "OuterTpid1", \
      "OuterTpid2", \
      "OuterTpid3", \
      "DefaultPktPri", \
      "EtagEthertype", \
      "VntagEthertype", \
      "Higig3Ethertype" \
  }
  
  /*!
   * \brief Initialize the obm module.
   *
   * \param [in] unit Unit Number.
   *
   * \retval SHR_E_NONE No errors.
   * \retval !SHR_E_NONE Failure.
   */
  extern int
  bcmi_ltsw_obm_init(int unit);
  
  /*!
   * \brief Detach the obm module.
   *
   * \param [in] unit Unit Number.
   *
   * \retval SHR_E_NONE No errors.
   * \retval !SHR_E_NONE Failure.
   */
  extern int
  bcmi_ltsw_obm_detach(int unit);
  
  /*!
   * \brief Enable obm port flow control setting.
   *
   * \param [in] unit Unit Number.
   * \param [in] lport Logical port ID.
   * \param [in] fc_type Flow control type, 0: parse, 1: PFC.
   *
   * \retval SHR_E_NONE No errors.
   * \retval !SHR_E_NONE Failure.
   */
  extern int
  bcmi_ltsw_obm_port_fc_enable_set(
      int unit,
      int lport,
      int fc_type);
  
  /*!
   * \brief Get port controls for OBM parsing
   *
   * \param [in] unit Unit Number.
   * \param [in] port Port ID.
   * \param [in] type Parse type.
   * \param [out] arg arg.
   *
   * \retval SHR_E_NONE No errors.
   * \retval !SHR_E_NONE Failure.
   */
  extern int
  bcmi_ltsw_obm_port_control_get(
      int unit,
      bcm_port_t port,
      bcmi_ltsw_obm_port_control_t type,
      int *arg);
  
  /*!
   * \brief Set port controls for OBM parsing
   *
   * \param [in] unit Unit Number.
   * \param [in] port Port ID.
   * \param [in] type Parse type.
   * \param [in] arg arg.
   *
   * \retval SHR_E_NONE No errors.
   * \retval !SHR_E_NONE Failure.
   */
  extern int
  bcmi_ltsw_obm_port_control_set(
      int unit,
      bcm_port_t port,
      bcmi_ltsw_obm_port_control_t type,
      int arg);
  
  /*!
   * \brief Get pm port controls for OBM parsing
   *
   * \param [in] unit Unit Number.
   * \param [in] pm_id PM ID.
   * \param [in] type Parse type.
   * \param [out] arg arg.
   *
   * \retval SHR_E_NONE No errors.
   * \retval !SHR_E_NONE Failure.
   */
  extern int
  bcmi_ltsw_obm_pm_port_control_get(
      int unit,
      int pm_id,
      bcmi_ltsw_obm_port_control_t type,
      int *arg);
  
  /*!
   * \brief Set pm port controls for OBM parsing
   *
   * \param [in] unit Unit Number.
   * \param [in] pm_id PM ID.
   * \param [in] type Parse type.
   * \param [in] arg arg.
   *
   * \retval SHR_E_NONE No errors.
   * \retval !SHR_E_NONE Failure.
   */
  extern int
  bcmi_ltsw_obm_pm_port_control_set(
      int unit,
      int pm_id,
      bcmi_ltsw_obm_port_control_t type,
      int arg);
  
  /*!
   * \brief Get the mapping of bcm_obm_code_point to bcm_obm_priority
   *
   * \param [in] unit Unit Number.
   * \param [in] gport gport for a given port.
   * \param [in] switch_obm_classifier_type type of switch_obm_classifier.
   * \param [in] array_max Maximum number of elements in switch_obm_classifier.
   * \param [out] switch_obm_classifier Array of bcm_switch_obm_classifier_t.
   * \param [out] array_count Number of elements in switch_obm_classifier.
   *
   * \retval SHR_E_NONE No errors.
   * \retval !SHR_E_NONE Failure.
   */
  extern int
  bcmi_ltsw_obm_classifier_mapping_multi_get(
      int unit,
      bcm_gport_t gport,
      bcm_switch_obm_classifier_type_t switch_obm_classifier_type,
      int array_max,
      bcm_switch_obm_classifier_t *switch_obm_classifier,
      int *array_count);
  
  /*!
   * \brief Set the mapping of bcm_obm_code_point to bcm_obm_priority
   *
   * \param [in] unit Unit Number.
   * \param [in] gport gport for a given port.
   * \param [in] switch_obm_classifier_type type of switch_obm_classifier.
   * \param [in] array_count Number of elements in switch_obm_classifier.
   * \param [in] switch_obm_classifier Array of bcm_switch_obm_classifier_t.
   *
   * \retval SHR_E_NONE No errors.
   * \retval !SHR_E_NONE Failure.
   */
  extern int
  bcmi_ltsw_obm_classifier_mapping_multi_set(
      int unit,
      bcm_gport_t gport,
      bcm_switch_obm_classifier_type_t switch_obm_classifier_type,
      int array_count,
      bcm_switch_obm_classifier_t *switch_obm_classifier);
  
  #endif /* BCMI_LTSW_OBM_H */
  