BAL and Maple Release 2.2
Signed-off-by: Shad Ansari <developer@Carbon.local>
diff --git a/bal_release/src/common/include/Makefile b/bal_release/src/common/include/Makefile
new file mode 100644
index 0000000..46650aa
--- /dev/null
+++ b/bal_release/src/common/include/Makefile
@@ -0,0 +1,38 @@
+###############################################################################
+#
+# <:copyright-BRCM:2016:DUAL/GPL:standard
+#
+# Copyright (c) 2016 Broadcom
+# All Rights Reserved
+#
+# Unless you and Broadcom execute a separate written software license
+# agreement governing use of this software, this software is licensed
+# to you under the terms of the GNU General Public License version 2
+# (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+# with the following added to such license:
+#
+# As a special exception, the copyright holders of this software give
+# you permission to link this software with independent modules, and
+# to copy and distribute the resulting executable under terms of your
+# choice, provided that you also meet, for each linked independent
+# module, the terms and conditions of the license of that module.
+# An independent module is a module which is not derived from this
+# software. The special exception does not apply to any modifications
+# of the software.
+#
+# Not withstanding the above, under no circumstances may you combine
+# this software in any way with any other Broadcom software provided
+# under a license other than the GPL, without Broadcom's express prior
+# written consent.
+#
+# :>
+#
+###############################################################################
+###############################################################################
+# Common headers
+#
+MOD_NAME = common_include
+MOD_TYPE = lib
+MOD_DEPS =
+gen_bal_hdrs = bal_model_ids.h bal_model_types.h
+
diff --git a/bal_release/src/common/include/bal_buf.h b/bal_release/src/common/include/bal_buf.h
new file mode 100644
index 0000000..c5e06f7
--- /dev/null
+++ b/bal_release/src/common/include/bal_buf.h
@@ -0,0 +1,43 @@
+#ifndef BAL_BUF
+#define BAL_BUF
+
+#include "bcmolt_buf.h"
+
+typedef bcmolt_buf bcmbal_buf;
+
+#define bcmbal_buf_init(buf, size, start) bcmolt_buf_init(buf, size, start, BCMOLT_BUF_ENDIAN_FIXED)
+#define bcmbal_buf_alloc(buf, size) bcmolt_buf_alloc(buf, size, BCMOLT_BUF_ENDIAN_FIXED)
+#define bcmbal_buf_free bcmolt_buf_free
+#define bcmbal_buf_skip bcmolt_buf_skip
+#define bcmbal_buf_set_pos bcmolt_buf_set_pos
+#define bcmbal_buf_get_used bcmolt_buf_get_used
+#define bcmbal_buf_get_remaining_size bcmolt_buf_get_remaining_size
+#define bcmbal_buf_write bcmolt_buf_write
+#define bcmbal_buf_read bcmolt_buf_read
+#define bcmbal_buf_rewind bcmolt_buf_rewind
+#define bcmbal_buf_write_u8 bcmolt_buf_write_u8
+#define bcmbal_buf_read_u8 bcmolt_buf_read_u8
+#define bcmbal_buf_write_u16 bcmolt_buf_write_u16
+#define bcmbal_buf_read_u16 bcmolt_buf_read_u16
+#define bcmbal_buf_write_s16 bcmolt_buf_write_s16
+#define bcmbal_buf_read_s16 bcmolt_buf_read_s16
+#define bcmbal_buf_write_u24 bcmolt_buf_write_u24
+#define bcmbal_buf_read_u24 bcmolt_buf_read_u24
+#define bcmbal_buf_write_u32 bcmolt_buf_write_u32
+#define bcmbal_buf_read_u32 bcmolt_buf_read_u32
+#define bcmbal_buf_write_s32 bcmolt_buf_write_s32
+#define bcmbal_buf_read_s32 bcmolt_buf_read_s32
+#define bcmbal_buf_write_u64 bcmolt_buf_write_u64
+#define bcmbal_buf_read_u64 bcmolt_buf_read_u64
+#define bcmbal_buf_write_bool bcmolt_buf_write_bool
+#define bcmbal_buf_read_bool bcmolt_buf_read_bool
+#define bcmbal_buf_write_mac_address bcmolt_buf_write_mac_address
+#define bcmbal_buf_read_mac_address bcmolt_buf_read_mac_address
+#define bcmbal_buf_write_ipv4_address bcmolt_buf_write_ipv4_address
+#define bcmbal_buf_read_ipv4_address bcmolt_buf_read_ipv4_address
+#define bcmbal_buf_write_ipv6_address bcmolt_buf_write_ipv6_address
+#define bcmbal_buf_read_ipv6_address bcmolt_buf_read_ipv6_address
+#define bcmbal_buf_write_vlan_tag bcmolt_buf_write_vlan_tag
+#define bcmbal_buf_read_vlan_tag bcmolt_buf_read_vlan_tag
+
+#endif /* BAL_BUF */
diff --git a/bal_release/src/common/include/bal_common.h b/bal_release/src/common/include/bal_common.h
new file mode 100644
index 0000000..c5a2558
--- /dev/null
+++ b/bal_release/src/common/include/bal_common.h
@@ -0,0 +1,317 @@
+/******************************************************************************
+ *
+ * <:copyright-BRCM:2016:DUAL/GPL:standard
+ *
+ * Copyright (c) 2016 Broadcom
+ * All Rights Reserved
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed
+ * to you under the terms of the GNU General Public License version 2
+ * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+ * with the following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give
+ * you permission to link this software with independent modules, and
+ * to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent
+ * module, the terms and conditions of the license of that module.
+ * An independent module is a module which is not derived from this
+ * software. The special exception does not apply to any modifications
+ * of the software.
+ *
+ * Not withstanding the above, under no circumstances may you combine
+ * this software in any way with any other Broadcom software provided
+ * under a license other than the GPL, without Broadcom's express prior
+ * written consent.
+ *
+ * :>
+ *
+ *****************************************************************************/
+
+/**
+ * @file bal_common.h
+ *
+ * @brief Common include files and miscellaneous macros for the BAL source code.
+ *
+ */
+
+#ifndef BALCOMMON_H
+#define BALCOMMON_H
+
+/*@{*/
+
+/* --- system includes ---*/
+#include <bcmos_system.h>
+
+/* --- project includes ---*/
+
+/**
+ * @brief OUI Identifier
+ *
+ */
+typedef uint8_t oui_val_t[3];
+
+/*
+ * A max/min function
+ */
+#define max(a,b) ((a > b) ? a : b)
+#define min(a,b) ((a > b) ? b : a)
+
+/**
+ * @brief Maximum value for a VLAN ID
+ */
+#define MAX_VLAN_ID 4094
+
+/**
+ * @brief Minimum value for an 802.1ah I-SID
+ *
+ * Notes from IEEE:
+ * 0 - Reserved for use by future amendments to the standard.
+ * 1 - Default value, unassigned ISID.
+ * 2..FF - Reserved for use by future amendments to the standard.
+ */
+#define MIN_8021AH_ISID 0x00000100
+
+/**
+ * @brief Maximum value for an 802.1ah I-SID
+ *
+ * Notes from IEEE:
+ * FFFFFF is reserved by IEEE
+ */
+#define MAX_8021AH_ISID 0x00FFFFFE
+
+/**
+ * @brief VLAN TPID definitions
+ */
+typedef enum vlan_tpid_type
+{
+ VLAN_TPID_TYPE_DEFAULT = 0x0000, /**< Simple Bridge - i.e. VID 0, no tagging */
+ VLAN_TPID_TYPE_8021Q = 0x8100, /**< C-VLAN */
+ VLAN_TPID_TYPE_8021AD = 0x88A8, /**< S-VLAN */
+ VLAN_TPID_TYPE_9100 = 0x9100, /**< Legacy TPID */
+ VLAN_TPID_TYPE_9200 = 0x9200, /**< Legacy TPID */
+ VLAN_TPID_TYPE_9300 = 0x9300, /**< Legacy TPID */
+ VLAN_TPID_TYPE_8021AH_ITAG = 0x88E7 /**< 802.1ah I-Tag TPID */
+} vlan_tpid_type;
+
+/**
+ * @brief VLAN type definitions
+ */
+typedef enum vlan_mode_type
+{
+ VLAN_MODE_NONE, /**< Neither Shared or L2VPN */
+ VLAN_MODE_SHARED, /**< IP-based shared vlan */
+ VLAN_MODE_8021AD_EN, /**< DPoE 802.1ad (or .1q) encapsulation mode */
+ VLAN_MODE_8021AD_TP, /**< DPoE 802.1ad (or .1q) transport mode */
+ VLAN_MODE_8021AH_EN, /**< DPoE 802.1ah encapsulation mode */
+ VLAN_MODE_8021AH_TP, /**< DPoE 802.1ah transport mode */
+ VLAN_MODE_DAC /**< DPoE DEMARC Auto Configuration */
+} vlan_mode;
+
+/**
+ * @brief Macro to test if a VLAN is 802.1ad
+ */
+#define VLAN_IS_8021AD(_vlan_) (((_vlan_)->type == VLAN_MODE_8021AD_EN) || ((_vlan_)->type == VLAN_MODE_8021AD_TP))
+
+/**
+ * @brief Macro to test if a VLAN is 802.1ah
+ */
+#define VLAN_IS_8021AH(_vlan_) (((_vlan_)->type == VLAN_MODE_8021AH_EN) || ((_vlan_)->type == VLAN_MODE_8021AH_TP))
+
+/**
+ * @brief Macro to test if a VLAN is L2VPN (as opposed to 'None' or "Shared')
+ */
+#define VLAN_IS_L2VPN(_vlan_) (VLAN_IS_8021AD(_vlan_) || VLAN_IS_8021AH(_vlan_))
+
+/**
+ * @brief Macro to test if a VLAN is DPoE IP-HSD
+ */
+#define VLAN_IS_DPOE_IPHSD(_vlan_) (((_vlan_)->type == VlanType_None) && ((_vlan_)->dpoeIp.svid != 0) && ((_vlan_)->dpoeIp.cvid != 0))
+
+/**
+ * @brief Macro to test if a VLAN is Legacy IP-HSD
+ */
+#define VLAN_IS_LEGACY_IPHSD(_vlan_) (((_vlan_)->type == VlanType_None) && ((_vlan_)->dpoeIp.svid == 0))
+
+/**
+ * @brief Macro to test if a VLAN is DPoE IP-HSD with PON-NNI style tagging
+ */
+#define VLAN_IS_DPOE_IPHSD_PON_NNI(_vlan_) (VLAN_IS_DPOE_IPHSD(_vlan_) && ((_vlan_)->dot1ad[VLAN_TAG_OUTER].nniTpid != 0))
+
+/**
+ * @brief Macro to test if a VLAN is Shared
+ */
+#define VLAN_IS_SHARED(_vlan_) ((_vlan_)->type == VLAN_MODE_SHARED)
+
+/**
+ * @brief 802.1ad VLAN Tag index
+ *
+ * This enum is used in the VlanT structure to address the outer vs. the inner
+ * 802.1ad tag.
+ */
+typedef enum vlan_tag_index
+{
+ VLAN_TAG_INDEX_OUTER = 0, /**< Outer tag, typically the S-VLAN tag */
+ VLAN_TAG_INDEX_INNER = 1, /**< Inner tag, typically the C-VLAN tag */
+ VLAN_TAG_INDEX_MAX = 2
+} vlan_tag_index;
+
+/**
+ * @brief VlanT structure
+ */
+typedef struct bcmbal_vlan
+{
+ vlan_mode type; /**< Type of VLAN */
+
+ /** Intra-Chassis Tagging */
+ struct
+ {
+ uint16_t tpid; /**< ICT TPID */
+ uint16_t vid; /**< ICT VLAN ID */
+ } ict;
+
+ /** DPoE IP HSD Tagging */
+ struct
+ {
+ uint16_t svid; /**< S-TAG VID */
+ uint16_t cvid; /**< C-TAG VID */
+ } dpoe_ip;
+
+ /** 802.1ad (and 802.1q) tagging */
+ struct
+ {
+ uint16_t nni_tpid; /**< VLAN Tag TPID used on the NNI */
+ uint16_t uni_tpid; /**< VLAN Tag TPID used on the UNI */
+ uint8_t cos; /**< CoS bits used in this VLAN Tag */
+ uint16_t vid; /**< VLAN ID */
+ } dot_1ad[VLAN_TAG_INDEX_MAX];
+
+ /** 802.1ah encapsulation info */
+ struct
+ {
+ /** 802.1ah B-MACs */
+ bcmos_mac_address bda; /**< 802.1ah Destination B-MAC */
+ bcmos_mac_address bsa; /**< 802.1ah Source B-MAC */
+
+ /** 802.1ah B-Tag */
+ struct
+ {
+ uint16_t nni_tpid; /**< B-Tag TPID used on the NNI */
+ uint16_t uni_tpid; /**< B-Tag TPID used on the UNI */
+ uint16_t vid; /**< B-Tag VLAN ID */
+ } btag;
+
+ /** 802.1ah I-Tag */
+ struct
+ {
+ uint16_t nni_tpid; /**< I-Tag TPID used on the NNI */
+ uint16_t uni_tpid; /**< I-Tag TPID used on the UNI */
+ uint32_t isid; /**< I-Tag Service ID */
+ } itag;
+ } dot_1ah;
+
+ /** L2VPN specific VLAN configuration */
+ uint32_t vpn_idx; /**< Index of L2VPN that link is associated with. */
+} bcmbal_vlan;
+
+/**
+ * @brief MAC Address key structure.
+ *
+ * This structure effectively adds a length field to the MacAddressT structure
+ * which helps when handling GetNext requests that don't contain a full MAC
+ * Address.
+ */
+typedef struct mac_address_key
+{
+ bcmos_mac_address mac_addr; /**< The MAC address */
+ uint16_t len; /**< The length of the MAC address in the field above */
+} mac_address_key;
+
+/**
+ * @brief MAC Address length
+ */
+#define MAC_ADDRESS_LEN 6
+
+/**
+ * @brief Converts a MacAddressT structure into a MacAddressKeyT structure.
+ */
+#define MAC_ADDR_TO_KEY(A, K, L) { \
+ (K)->mac_addr = *(A); \
+ (K)->len = (L); \
+ }
+
+/**
+ * @brief Compares the 802.1ad (or q) fields of two VlanT objects
+ *
+ * This macro returns '1' if all fields match, and '0' otherwise.
+ *
+ * Note, this macro looks at the nniTpid only. This macro is used to determine
+ * whether or not an OLT Domain already exists for a given VLAN (which prevents
+ * configuring duplicate/overlapping OLT domain selectors).
+ *
+ */
+#define VLANS_MATCH_AD(_vlan1_, _vlan2_) (((_vlan1_)->dot1ad[VLAN_TAG_OUTER].vid == (_vlan2_)->dot1ad[VLAN_TAG_OUTER].vid) && \
+ ((_vlan1_)->dot1ad[VLAN_TAG_OUTER].nniTpid == (_vlan2_)->dot1ad[VLAN_TAG_OUTER].nniTpid) && \
+ ((_vlan1_)->dot1ad[VLAN_TAG_INNER].vid == (_vlan2_)->dot1ad[VLAN_TAG_INNER].vid) && \
+ ((_vlan1_)->dot1ad[VLAN_TAG_INNER].nniTpid == (_vlan2_)->dot1ad[VLAN_TAG_INNER].nniTpid))
+
+/**
+ * @brief Compares the 802.1ah (mac-in-mac) fields of two VlanT objects
+ *
+ * This macro returns '1' if all fields match, and '0' otherwise.
+ *
+ * Note, this macro looks at the nniTpid's only. This macro is used to
+ * determine whether or not an OLT Domain already exists for a given VLAN
+ * (which prevents configuring duplicate/overlapping OLT domain selectors).
+ *
+ */
+#define VLANS_MATCH_AH(_vlan1_, _vlan2_) (((_vlan1_)->dot1ah.btag.nniTpid == (_vlan2_)->dot1ah.btag.nniTpid) && \
+ ((_vlan1_)->dot1ah.btag.vid == (_vlan2_)->dot1ah.btag.vid) && \
+ ((_vlan1_)->dot1ah.itag.nniTpid == (_vlan2_)->dot1ah.itag.nniTpid) && \
+ ((_vlan1_)->dot1ah.itag.isid == (_vlan2_)->dot1ah.itag.isid))
+
+/**
+ * @brief Compares the ICT fields of two VlanT objects
+ *
+ * This macro returns '1' if all fields match, and '0' otherwise.
+ *
+ * Note, this macro looks at the ICT fields only. This macro is
+ * used to determine whether or not an OLT Domain already
+ * exists for a given VLAN (which prevents configuring
+ * duplicate/overlapping OLT domain selectors).
+ *
+ */
+#define VLANS_MATCH_ICT(_vlan1_, _vlan2_) (((_vlan1_)->ict.tpid == (_vlan2_)->ict.tpid) && \
+ ((_vlan1_)->ict.vid == (_vlan2_)->ict.vid))
+/**
+ * @brief Compares the 802.1ad (or q) and 802.1ah (mac-in-mac)
+ * fields of two VlanT objects
+ *
+ * This macro returns '1' if all fields match, and '0' otherwise.
+ *
+ */
+#define VLANS_MATCH(_vlan1_, _vlan2_) (VLANS_MATCH_AD(_vlan1_, _vlan2_) && VLANS_MATCH_AH(_vlan1_, _vlan2_))
+
+/**
+ * @brief Macros for setting/clearing bits inside of an integer
+ */
+#define SET_BIT(x,n) ((x) |= (1L << (n)))
+#define CLR_BIT(x,n) ((x) &= (~(1L << (n))))
+#define BIT_IS_SET(x,n) (((x) >> (n)) & 1)
+
+
+
+/**
+ * Static compile time assert used to ensure that enums and associated
+ * character arrays are equal.
+ *
+ * Use the BAL_STATIC_ASSERT function in your code to check array sizes
+ */
+#define _BAL_STATIC_ASSERT_HELPER(expr, msg) (sizeof (struct {unsigned int STATIC_ASSERT__##msg: (expr) ? 1 : -1;} ))
+
+#define BAL_STATIC_ASSERT(expr, msg) extern int (*assert_function__##msg(void)) [_BAL_STATIC_ASSERT_HELPER(expr, msg) ]
+
+/*@}*/
+
+#endif /* #ifndef BALCOMMON_H */
diff --git a/bal_release/src/common/include/bal_ids.h b/bal_release/src/common/include/bal_ids.h
new file mode 100644
index 0000000..e4239e6
--- /dev/null
+++ b/bal_release/src/common/include/bal_ids.h
@@ -0,0 +1,46 @@
+/******************************************************************************
+ *
+ * <:copyright-BRCM:2016:DUAL/GPL:standard
+ *
+ * Copyright (c) 2016 Broadcom
+ * All Rights Reserved
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed
+ * to you under the terms of the GNU General Public License version 2
+ * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+ * with the following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give
+ * you permission to link this software with independent modules, and
+ * to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent
+ * module, the terms and conditions of the license of that module.
+ * An independent module is a module which is not derived from this
+ * software. The special exception does not apply to any modifications
+ * of the software.
+ *
+ * Not withstanding the above, under no circumstances may you combine
+ * this software in any way with any other Broadcom software provided
+ * under a license other than the GPL, without Broadcom's express prior
+ * written consent.
+ *
+ * :>
+ *
+ *****************************************************************************/
+
+/**
+ * @file bal_ids.h
+ * @brief BAL IDs used in the system
+ *
+ * This file contains all of the BAL IDs used in the system
+ *
+ */
+#ifndef BALIDS_H
+#define BALIDS_H
+
+/*@{*/
+
+/*@}*/
+
+#endif /* #ifndef BALIDS_H */
diff --git a/bal_release/src/common/include/bal_model_ids.h b/bal_release/src/common/include/bal_model_ids.h
new file mode 100644
index 0000000..218b74e
--- /dev/null
+++ b/bal_release/src/common/include/bal_model_ids.h
@@ -0,0 +1,714 @@
+#ifndef BAL_MODEL_IDS_H_
+#define BAL_MODEL_IDS_H_
+
+/** \ingroup object_model_data_types
+ * \defgroup object_model_enums BAL Object Model Enumerations
+ */
+
+/** \addtogroup object_model_enums
+ * @{
+ */
+#include <bcmos_system.h>
+
+/** Identifiers for all properties contained in the access_terminal_cfg group.
+ */
+typedef enum bcmbal_access_terminal_cfg_id
+{
+ BCMBAL_ACCESS_TERMINAL_CFG_ID_ADMIN_STATE = 0, /**< Administrative state. */
+ BCMBAL_ACCESS_TERMINAL_CFG_ID_OPER_STATUS = 1, /**< Operational status. */
+ BCMBAL_ACCESS_TERMINAL_CFG_ID_IWF_MODE = 2, /**< Interworking function mode. */
+ BCMBAL_ACCESS_TERMINAL_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_access_terminal_cfg_id;
+
+/** Identifiers for all properties contained in the access_terminal_ind group.
+ */
+typedef enum bcmbal_access_terminal_ind_id
+{
+ BCMBAL_ACCESS_TERMINAL_IND_ID_ADMIN_STATE = 0, /**< Administrative state. */
+ BCMBAL_ACCESS_TERMINAL_IND_ID_OPER_STATUS = 1, /**< Operational status. */
+ BCMBAL_ACCESS_TERMINAL_IND_ID_IWF_MODE = 2, /**< Interworking function mode. */
+ BCMBAL_ACCESS_TERMINAL_IND_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_access_terminal_ind_id;
+
+/** Identifiers for all properties contained in the access_terminal_key group.
+ */
+typedef enum bcmbal_access_terminal_key_id
+{
+ BCMBAL_ACCESS_TERMINAL_KEY_ID_ACCESS_TERM_ID= 0, /**< access_term_id. */
+ BCMBAL_ACCESS_TERMINAL_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_access_terminal_key_id;
+
+/** Identifiers for all properties contained in the flow_cfg group.
+ */
+typedef enum bcmbal_flow_cfg_id
+{
+ BCMBAL_FLOW_CFG_ID_ADMIN_STATE = 0, /**< Administrative state. */
+ BCMBAL_FLOW_CFG_ID_OPER_STATUS = 1, /**< Operational status. */
+ BCMBAL_FLOW_CFG_ID_ACCESS_INT_ID = 2, /**< Access Interface ID. */
+ BCMBAL_FLOW_CFG_ID_NETWORK_INT_ID = 3, /**< Network Interface ID. */
+ BCMBAL_FLOW_CFG_ID_SUB_TERM_ID = 4, /**< Subscriber Terminal ID. */
+ BCMBAL_FLOW_CFG_ID_SUB_TERM_UNI_IDX = 5, /**< Subscriber Terminal uni port index. */
+ BCMBAL_FLOW_CFG_ID_SVC_PORT_ID = 6, /**< Service Port ID. */
+ BCMBAL_FLOW_CFG_ID_AGG_PORT_ID = 7, /**< Aggregate port ID. */
+ BCMBAL_FLOW_CFG_ID_RESOLVE_MAC = 8, /**< Resolve mac. */
+ BCMBAL_FLOW_CFG_ID_CLASSIFIER = 9, /**< Classifier. */
+ BCMBAL_FLOW_CFG_ID_ACTION = 10, /**< Action. */
+ BCMBAL_FLOW_CFG_ID_SLA = 11, /**< SLA. */
+ BCMBAL_FLOW_CFG_ID_COOKIE = 12, /**< Cookie. */
+ BCMBAL_FLOW_CFG_ID_PRIORITY = 13, /**< Priority. */
+ BCMBAL_FLOW_CFG_ID_GROUP_ID = 14, /**< Group ID. */
+ BCMBAL_FLOW_CFG_ID_QUEUE = 15, /**< Egress queue. */
+ BCMBAL_FLOW_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_flow_cfg_id;
+
+/** Identifiers for all properties contained in the flow_ind group.
+ */
+typedef enum bcmbal_flow_ind_id
+{
+ BCMBAL_FLOW_IND_ID_ADMIN_STATE = 0, /**< Administrative state. */
+ BCMBAL_FLOW_IND_ID_OPER_STATUS = 1, /**< Operational status. */
+ BCMBAL_FLOW_IND_ID_ACCESS_INT_ID = 2, /**< Access interface ID. */
+ BCMBAL_FLOW_IND_ID_NETWORK_INT_ID = 3, /**< Network Interface ID. */
+ BCMBAL_FLOW_IND_ID_SUB_TERM_ID = 4, /**< Subscriber terminal ID. */
+ BCMBAL_FLOW_IND_ID_SVC_PORT_ID = 5, /**< Service port ID. */
+ BCMBAL_FLOW_IND_ID_AGG_PORT_ID = 6, /**< Aggregate port ID. */
+ BCMBAL_FLOW_IND_ID_RESOLVE_MAC = 7, /**< Resolve mac. */
+ BCMBAL_FLOW_IND_ID_BASE_TC_ID = 8, /**< Base TCONT ID. */
+ BCMBAL_FLOW_IND_ID_CLASSIFIER = 9, /**< Classifier. */
+ BCMBAL_FLOW_IND_ID_ACTION = 10, /**< Action. */
+ BCMBAL_FLOW_IND_ID_SLA = 11, /**< SLA. */
+ BCMBAL_FLOW_IND_ID_COOKIE = 12, /**< Cookie. */
+ BCMBAL_FLOW_IND_ID_PRIORITY = 13, /**< Priority. */
+ BCMBAL_FLOW_IND_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_flow_ind_id;
+
+/** Identifiers for all properties contained in the flow_key group.
+ */
+typedef enum bcmbal_flow_key_id
+{
+ BCMBAL_FLOW_KEY_ID_FLOW_ID = 0, /**< Flow ID. */
+ BCMBAL_FLOW_KEY_ID_FLOW_TYPE = 1, /**< Flow type. */
+ BCMBAL_FLOW_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_flow_key_id;
+
+/** Identifiers for all properties contained in the flow_stat group.
+ */
+typedef enum bcmbal_flow_stat_id
+{
+ BCMBAL_FLOW_STAT_ID_RX_PACKETS = 0, /**< Received packets. */
+ BCMBAL_FLOW_STAT_ID_RX_BYTES = 1, /**< Received bytes. */
+ BCMBAL_FLOW_STAT_ID_TX_PACKETS = 2, /**< Transmitted packets. */
+ BCMBAL_FLOW_STAT_ID_TX_BYTES = 3, /**< Transmitted bytes. */
+ BCMBAL_FLOW_STAT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_flow_stat_id;
+
+/** Identifiers for all properties contained in the group_cfg group.
+ */
+typedef enum bcmbal_group_cfg_id
+{
+ BCMBAL_GROUP_CFG_ID_MEMBERS_CMD = 0, /**< Membership operation commands. */
+ BCMBAL_GROUP_CFG_ID_MEMBERS = 1, /**< Member. */
+ BCMBAL_GROUP_CFG_ID_COOKIE = 2, /**< Application cookie. */
+ BCMBAL_GROUP_CFG_ID_FLOWS = 3, /**< List of flows associated with the group . */
+ BCMBAL_GROUP_CFG_ID_OWNER = 4, /**< Owner of the group. */
+ BCMBAL_GROUP_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_group_cfg_id;
+
+/** Identifiers for all properties contained in the group_key group.
+ */
+typedef enum bcmbal_group_key_id
+{
+ BCMBAL_GROUP_KEY_ID_GROUP_ID = 0, /**< Group ID. */
+ BCMBAL_GROUP_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_group_key_id;
+
+/** Identifiers for all properties contained in the interface_cfg group.
+ */
+typedef enum bcmbal_interface_cfg_id
+{
+ BCMBAL_INTERFACE_CFG_ID_ADMIN_STATE = 0, /**< Administrative state. */
+ BCMBAL_INTERFACE_CFG_ID_OPER_STATUS = 1, /**< Operational status. */
+ BCMBAL_INTERFACE_CFG_ID_MIN_DATA_AGG_PORT_ID= 2, /**< Minimum aggregate port ID. */
+ BCMBAL_INTERFACE_CFG_ID_MIN_DATA_SVC_PORT_ID= 3, /**< Minimum service port ID. */
+ BCMBAL_INTERFACE_CFG_ID_TRANSCEIVER_TYPE = 4, /**< Transceiver type. */
+ BCMBAL_INTERFACE_CFG_ID_DS_MISS_MODE = 5, /**< Downstream unknown packet action. */
+ BCMBAL_INTERFACE_CFG_ID_MTU = 6, /**< MTU. */
+ BCMBAL_INTERFACE_CFG_ID_FLOW_CONTROL = 7, /**< Flow control. */
+ BCMBAL_INTERFACE_CFG_ID_DS_TM = 8, /**< Downstream scheduler and shaper. */
+ BCMBAL_INTERFACE_CFG_ID_US_TM = 9, /**< Upstream scheduler and shaper. */
+ BCMBAL_INTERFACE_CFG_ID_SUB_TERM_ID_LIST = 10, /**< Sub-term id list. */
+ BCMBAL_INTERFACE_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_interface_cfg_id;
+
+/** Identifiers for all properties contained in the interface_ind group.
+ */
+typedef enum bcmbal_interface_ind_id
+{
+ BCMBAL_INTERFACE_IND_ID_ADMIN_STATE = 0, /**< Administrative state. */
+ BCMBAL_INTERFACE_IND_ID_OPER_STATUS = 1, /**< Operational status. */
+ BCMBAL_INTERFACE_IND_ID_MIN_DATA_AGG_PORT_ID= 2, /**< Minimum aggregate port ID. */
+ BCMBAL_INTERFACE_IND_ID_MIN_DATA_SVC_PORT_ID= 3, /**< Minimum service port ID. */
+ BCMBAL_INTERFACE_IND_ID_TRANSCEIVER_TYPE = 4, /**< Transceiver type. */
+ BCMBAL_INTERFACE_IND_ID_DS_MISS_MODE = 5, /**< Downstream unknown packet action. */
+ BCMBAL_INTERFACE_IND_ID_MTU = 6, /**< MTU. */
+ BCMBAL_INTERFACE_IND_ID_FLOW_CONTROL = 7, /**< Flow control. */
+ BCMBAL_INTERFACE_IND_ID_DS_TM = 8, /**< Downstream scheduler and shaper. */
+ BCMBAL_INTERFACE_IND_ID_US_TM = 9, /**< Upstream scheduler and shaper. */
+ BCMBAL_INTERFACE_IND_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_interface_ind_id;
+
+/** Identifiers for all properties contained in the interface_key group.
+ */
+typedef enum bcmbal_interface_key_id
+{
+ BCMBAL_INTERFACE_KEY_ID_INTF_ID = 0, /**< intf_id. */
+ BCMBAL_INTERFACE_KEY_ID_INTF_TYPE = 1, /**< intf_type. */
+ BCMBAL_INTERFACE_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_interface_key_id;
+
+/** Identifiers for all properties contained in the interface_stat group.
+ */
+typedef enum bcmbal_interface_stat_id
+{
+ BCMBAL_INTERFACE_STAT_ID_RX_PACKETS = 0, /**< Recieved packets. */
+ BCMBAL_INTERFACE_STAT_ID_RX_BYTES = 1, /**< Received bytes. */
+ BCMBAL_INTERFACE_STAT_ID_TX_PACKETS = 2, /**< Transmitted packets. */
+ BCMBAL_INTERFACE_STAT_ID_TX_BYTES = 3, /**< Transmitted bytes. */
+ BCMBAL_INTERFACE_STAT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_interface_stat_id;
+
+/** Identifiers for all properties contained in the packet_cfg group.
+ */
+typedef enum bcmbal_packet_cfg_id
+{
+ BCMBAL_PACKET_CFG_ID_FLOW_ID = 0, /**< Flow Id. */
+ BCMBAL_PACKET_CFG_ID_FLOW_TYPE = 1, /**< Flow Type. */
+ BCMBAL_PACKET_CFG_ID_INTF_ID = 2, /**< Interface ID. */
+ BCMBAL_PACKET_CFG_ID_INTF_TYPE = 3, /**< Interface Type. */
+ BCMBAL_PACKET_CFG_ID_SVC_PORT = 4, /**< Service Port. */
+ BCMBAL_PACKET_CFG_ID_FLOW_COOKIE = 5, /**< Flow Cookie. */
+ BCMBAL_PACKET_CFG_ID_PKT = 6, /**< Packet Data. */
+ BCMBAL_PACKET_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_packet_cfg_id;
+
+/** Identifiers for all properties contained in the packet_ind group.
+ */
+typedef enum bcmbal_packet_ind_id
+{
+ BCMBAL_PACKET_IND_ID_FLOW_ID = 0, /**< Flow Id. */
+ BCMBAL_PACKET_IND_ID_FLOW_TYPE = 1, /**< Flow Type. */
+ BCMBAL_PACKET_IND_ID_INTF_ID = 2, /**< Interface ID. */
+ BCMBAL_PACKET_IND_ID_INTF_TYPE = 3, /**< Interface Type. */
+ BCMBAL_PACKET_IND_ID_SVC_PORT = 4, /**< Service Port. */
+ BCMBAL_PACKET_IND_ID_FLOW_COOKIE = 5, /**< Flow Cookie. */
+ BCMBAL_PACKET_IND_ID_PKT = 6, /**< Packet Data. */
+ BCMBAL_PACKET_IND_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_packet_ind_id;
+
+/** Identifiers for all properties contained in the packet_key group.
+ */
+typedef enum bcmbal_packet_key_id
+{
+ BCMBAL_PACKET_KEY_ID_RESERVED = 0, /**< Reserved key field. */
+ BCMBAL_PACKET_KEY_ID_PACKET_SEND_DEST = 1, /**< Packet destination. */
+ BCMBAL_PACKET_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_packet_key_id;
+
+/** Identifiers for all properties contained in the subscriber_terminal_cfg
+ * group.
+ */
+typedef enum bcmbal_subscriber_terminal_cfg_id
+{
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_ADMIN_STATE = 0, /**< Administrative state. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_OPER_STATUS = 1, /**< Operational status. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_SERIAL_NUMBER = 2, /**< Serial number. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_PASSWORD = 3, /**< Password. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_REGISTRATION_ID = 4, /**< Registration id. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_SVC_PORT_ID = 5, /**< Service port ID. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_MAC_ADDRESS = 6, /**< MAC address. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_DS_TM = 7, /**< Downstream scheduler and shaper. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_US_TM = 8, /**< Upstream scheduler and shaper. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_SVC_PORT_ID_LIST = 9, /**< svc_port_id list. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_AGG_PORT_ID_LIST = 10, /**< agg_port_id list. */
+ BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_subscriber_terminal_cfg_id;
+
+/** Identifiers for all properties contained in the subscriber_terminal_ind
+ * group.
+ */
+typedef enum bcmbal_subscriber_terminal_ind_id
+{
+ BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_ADMIN_STATE = 0, /**< Administrative state. */
+ BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_OPER_STATUS = 1, /**< Operational status. */
+ BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_SERIAL_NUMBER = 2, /**< Serial number. */
+ BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_PASSWORD = 3, /**< Password. */
+ BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_REGISTRATION_ID = 4, /**< Registration id. */
+ BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_SVC_PORT_ID = 5, /**< Service port ID. */
+ BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_MAC_ADDRESS = 6, /**< MAC address. */
+ BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_DS_TM = 7, /**< Downstream scheduler and shaper. */
+ BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_US_TM = 8, /**< Upstream scheduler and shaper. */
+ BCMBAL_SUBSCRIBER_TERMINAL_IND_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_subscriber_terminal_ind_id;
+
+/** Identifiers for all properties contained in the subscriber_terminal_key
+ * group.
+ */
+typedef enum bcmbal_subscriber_terminal_key_id
+{
+ BCMBAL_SUBSCRIBER_TERMINAL_KEY_ID_SUB_TERM_ID = 0, /**< sub_term_id. */
+ BCMBAL_SUBSCRIBER_TERMINAL_KEY_ID_INTF_ID = 1, /**< intf_id. */
+ BCMBAL_SUBSCRIBER_TERMINAL_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_subscriber_terminal_key_id;
+
+/** Identifiers for all properties contained in the subscriber_terminal_stat
+ * group.
+ */
+typedef enum bcmbal_subscriber_terminal_stat_id
+{
+ BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID_RX_PACKETS = 0, /**< Received packets. */
+ BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID_RX_BYTES = 1, /**< Received bytes. */
+ BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID_TX_PACKETS = 2, /**< Transmitted packets. */
+ BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID_TX_BYTES = 3, /**< Transmitted bytes. */
+ BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_subscriber_terminal_stat_id;
+
+/** Identifiers for all properties contained in the tm_queue_cfg group.
+ */
+typedef enum bcmbal_tm_queue_cfg_id
+{
+ BCMBAL_TM_QUEUE_CFG_ID_PRIORITY = 0, /**< priority. */
+ BCMBAL_TM_QUEUE_CFG_ID_WEIGHT = 1, /**< weight. */
+ BCMBAL_TM_QUEUE_CFG_ID_RATE = 2, /**< rate. */
+ BCMBAL_TM_QUEUE_CFG_ID_BAC = 3, /**< bac. */
+ BCMBAL_TM_QUEUE_CFG_ID_CREATION_MODE = 4, /**< creation_mode. */
+ BCMBAL_TM_QUEUE_CFG_ID_REF_COUNT = 5, /**< ref_count. */
+ BCMBAL_TM_QUEUE_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_queue_cfg_id;
+
+/** Identifiers for all properties contained in the tm_queue_ind group.
+ */
+typedef enum bcmbal_tm_queue_ind_id
+{
+ BCMBAL_TM_QUEUE_IND_ID_RET = 0, /**< ret. */
+ BCMBAL_TM_QUEUE_IND_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_queue_ind_id;
+
+/** Identifiers for all properties contained in the tm_queue_key group.
+ */
+typedef enum bcmbal_tm_queue_key_id
+{
+ BCMBAL_TM_QUEUE_KEY_ID_SCHED_ID = 0, /**< sched_id. */
+ BCMBAL_TM_QUEUE_KEY_ID_SCHED_DIR = 1, /**< sched dir. */
+ BCMBAL_TM_QUEUE_KEY_ID_ID = 2, /**< id. */
+ BCMBAL_TM_QUEUE_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_queue_key_id;
+
+/** Identifiers for all properties contained in the tm_queue_stat group.
+ */
+typedef enum bcmbal_tm_queue_stat_id
+{
+ BCMBAL_TM_QUEUE_STAT_ID_PACKETS_OK = 0, /**< packets_ok. */
+ BCMBAL_TM_QUEUE_STAT_ID_BYTES_OK = 1, /**< bytes_ok. */
+ BCMBAL_TM_QUEUE_STAT_ID_PACKETS_DISCARDED = 2, /**< packets_discarded. */
+ BCMBAL_TM_QUEUE_STAT_ID_BYTES_DISCARDED = 3, /**< bytes_discarded. */
+ BCMBAL_TM_QUEUE_STAT_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_queue_stat_id;
+
+/** Identifiers for all properties contained in the tm_sched_cfg group.
+ */
+typedef enum bcmbal_tm_sched_cfg_id
+{
+ BCMBAL_TM_SCHED_CFG_ID_OWNER = 0, /**< owner. */
+ BCMBAL_TM_SCHED_CFG_ID_SCHED_TYPE = 1, /**< type. */
+ BCMBAL_TM_SCHED_CFG_ID_SCHED_PARENT = 2, /**< parent. */
+ BCMBAL_TM_SCHED_CFG_ID_SCHED_CHILD_TYPE = 3, /**< child_type. */
+ BCMBAL_TM_SCHED_CFG_ID_RATE = 4, /**< rate. */
+ BCMBAL_TM_SCHED_CFG_ID_TCONT_SLA = 5, /**< tcont_sla. */
+ BCMBAL_TM_SCHED_CFG_ID_CREATION_MODE = 6, /**< creation_mode. */
+ BCMBAL_TM_SCHED_CFG_ID_QUEUES = 7, /**< queues. */
+ BCMBAL_TM_SCHED_CFG_ID_SUB_SCHEDS = 8, /**< sub_scheds. */
+ BCMBAL_TM_SCHED_CFG_ID_NUM_PRIORITIES = 9, /**< num_priorities. */
+ BCMBAL_TM_SCHED_CFG_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_sched_cfg_id;
+
+/** Identifiers for all properties contained in the tm_sched_ind group.
+ */
+typedef enum bcmbal_tm_sched_ind_id
+{
+ BCMBAL_TM_SCHED_IND_ID_RET = 0, /**< ret. */
+ BCMBAL_TM_SCHED_IND_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_sched_ind_id;
+
+/** Identifiers for all properties contained in the tm_sched_key group.
+ */
+typedef enum bcmbal_tm_sched_key_id
+{
+ BCMBAL_TM_SCHED_KEY_ID_DIR = 0, /**< dir. */
+ BCMBAL_TM_SCHED_KEY_ID_ID = 1, /**< id. */
+ BCMBAL_TM_SCHED_KEY_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_sched_key_id;
+
+/** All object tags for all objects in the system.
+ */
+typedef enum bcmbal_obj_tag
+{
+ BCMBAL_OBJ_TAG__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_obj_tag;
+
+/** Identifiers for all objects in the system.
+ */
+typedef enum bcmbal_obj_id
+{
+ BCMBAL_OBJ_ID__BEGIN,
+ BCMBAL_OBJ_ID_ACCESS_TERMINAL = 0, /**< BAL Access Terminal */
+ BCMBAL_OBJ_ID_FLOW = 1, /**< BAL Flow */
+ BCMBAL_OBJ_ID_GROUP = 2, /**< BAL Group */
+ BCMBAL_OBJ_ID_INTERFACE = 3, /**< BAL Interface */
+ BCMBAL_OBJ_ID_PACKET = 4, /**< packet */
+ BCMBAL_OBJ_ID_SUBSCRIBER_TERMINAL = 5, /**< BAL Subscriber Terminal */
+ BCMBAL_OBJ_ID_TM_QUEUE = 6, /**< tm_queue */
+ BCMBAL_OBJ_ID_TM_SCHED = 7, /**< tm_sched */
+ BCMBAL_OBJ_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_obj_id;
+
+/** Identifiers for all possible groups under all objects in the system.
+ */
+typedef enum bcmbal_obj_group_id
+{
+ BCMBAL_OBJ_GROUP_ID__BEGIN,
+ BCMBAL_OBJ_GROUP_ID_ACCESS_TERMINAL_KEY = 0, /**< BAL Access Terminal - key */
+ BCMBAL_OBJ_GROUP_ID_ACCESS_TERMINAL_CFG = 1, /**< BAL Access Terminal - cfg */
+ BCMBAL_OBJ_GROUP_ID_ACCESS_TERMINAL_IND = 2, /**< BAL Access Terminal - Access Terminal Indication */
+ BCMBAL_OBJ_GROUP_ID_FLOW_KEY = 3, /**< BAL Flow - key */
+ BCMBAL_OBJ_GROUP_ID_FLOW_CFG = 4, /**< BAL Flow - cfg */
+ BCMBAL_OBJ_GROUP_ID_FLOW_STAT = 5, /**< BAL Flow - stat */
+ BCMBAL_OBJ_GROUP_ID_FLOW_IND = 6, /**< BAL Flow - Flow Indication */
+ BCMBAL_OBJ_GROUP_ID_GROUP_KEY = 7, /**< BAL Group - key */
+ BCMBAL_OBJ_GROUP_ID_GROUP_CFG = 8, /**< BAL Group - cfg */
+ BCMBAL_OBJ_GROUP_ID_INTERFACE_KEY = 9, /**< BAL Interface - key */
+ BCMBAL_OBJ_GROUP_ID_INTERFACE_CFG = 10, /**< BAL Interface - cfg */
+ BCMBAL_OBJ_GROUP_ID_INTERFACE_STAT = 11, /**< BAL Interface - stat */
+ BCMBAL_OBJ_GROUP_ID_INTERFACE_IND = 12, /**< BAL Interface - Interface Indication */
+ BCMBAL_OBJ_GROUP_ID_PACKET_KEY = 13, /**< packet - key */
+ BCMBAL_OBJ_GROUP_ID_PACKET_CFG = 14, /**< packet - cfg */
+ BCMBAL_OBJ_GROUP_ID_PACKET_IND = 15, /**< packet - Packet indication */
+ BCMBAL_OBJ_GROUP_ID_SUBSCRIBER_TERMINAL_KEY = 16, /**< BAL Subscriber Terminal - key */
+ BCMBAL_OBJ_GROUP_ID_SUBSCRIBER_TERMINAL_CFG = 17, /**< BAL Subscriber Terminal - cfg */
+ BCMBAL_OBJ_GROUP_ID_SUBSCRIBER_TERMINAL_STAT = 18, /**< BAL Subscriber Terminal - stat */
+ BCMBAL_OBJ_GROUP_ID_SUBSCRIBER_TERMINAL_IND = 19, /**< BAL Subscriber Terminal - Subscriber Terminal Indication */
+ BCMBAL_OBJ_GROUP_ID_TM_QUEUE_KEY = 20, /**< tm_queue - key */
+ BCMBAL_OBJ_GROUP_ID_TM_QUEUE_CFG = 21, /**< tm_queue - cfg */
+ BCMBAL_OBJ_GROUP_ID_TM_QUEUE_STAT = 22, /**< tm_queue - stat */
+ BCMBAL_OBJ_GROUP_ID_TM_QUEUE_IND = 23, /**< tm_queue - Tm Queue Indication */
+ BCMBAL_OBJ_GROUP_ID_TM_SCHED_KEY = 24, /**< tm_sched - key */
+ BCMBAL_OBJ_GROUP_ID_TM_SCHED_CFG = 25, /**< tm_sched - cfg */
+ BCMBAL_OBJ_GROUP_ID_TM_SCHED_IND = 26, /**< tm_sched - Tm Sched Indication */
+ BCMBAL_OBJ_GROUP_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_obj_group_id;
+
+/** List of all access_terminal groups of type auto.
+ */
+typedef enum bcmbal_access_terminal_auto_id
+{
+ BCMBAL_ACCESS_TERMINAL_AUTO_ID__BEGIN,
+ BCMBAL_ACCESS_TERMINAL_AUTO_ID_IND = 0, /**< Access Terminal Indication. */
+ BCMBAL_ACCESS_TERMINAL_AUTO_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_access_terminal_auto_id;
+
+/** List of all flow groups of type auto.
+ */
+typedef enum bcmbal_flow_auto_id
+{
+ BCMBAL_FLOW_AUTO_ID__BEGIN,
+ BCMBAL_FLOW_AUTO_ID_IND = 0, /**< Flow Indication. */
+ BCMBAL_FLOW_AUTO_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_flow_auto_id;
+
+/** List of all interface groups of type auto.
+ */
+typedef enum bcmbal_interface_auto_id
+{
+ BCMBAL_INTERFACE_AUTO_ID__BEGIN,
+ BCMBAL_INTERFACE_AUTO_ID_IND = 0, /**< Interface Indication. */
+ BCMBAL_INTERFACE_AUTO_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_interface_auto_id;
+
+/** List of all packet groups of type auto.
+ */
+typedef enum bcmbal_packet_auto_id
+{
+ BCMBAL_PACKET_AUTO_ID__BEGIN,
+ BCMBAL_PACKET_AUTO_ID_IND = 0, /**< Packet indication. */
+ BCMBAL_PACKET_AUTO_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_packet_auto_id;
+
+/** List of all subscriber_terminal groups of type auto.
+ */
+typedef enum bcmbal_subscriber_terminal_auto_id
+{
+ BCMBAL_SUBSCRIBER_TERMINAL_AUTO_ID__BEGIN,
+ BCMBAL_SUBSCRIBER_TERMINAL_AUTO_ID_IND = 0, /**< Subscriber Terminal Indication. */
+ BCMBAL_SUBSCRIBER_TERMINAL_AUTO_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_subscriber_terminal_auto_id;
+
+/** List of all tm_queue groups of type auto.
+ */
+typedef enum bcmbal_tm_queue_auto_id
+{
+ BCMBAL_TM_QUEUE_AUTO_ID__BEGIN,
+ BCMBAL_TM_QUEUE_AUTO_ID_IND = 0, /**< Tm Queue Indication. */
+ BCMBAL_TM_QUEUE_AUTO_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_queue_auto_id;
+
+/** List of all tm_sched groups of type auto.
+ */
+typedef enum bcmbal_tm_sched_auto_id
+{
+ BCMBAL_TM_SCHED_AUTO_ID__BEGIN,
+ BCMBAL_TM_SCHED_AUTO_ID_IND = 0, /**< Tm Sched Indication. */
+ BCMBAL_TM_SCHED_AUTO_ID__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_sched_auto_id;
+
+#define bcmbal_access_terminal_key_id_all_properties BCMBAL_ACCESS_TERMINAL_KEY_ID__NUM_OF
+#define bcmbal_access_terminal_cfg_id_all_properties BCMBAL_ACCESS_TERMINAL_CFG_ID__NUM_OF
+#define bcmbal_access_terminal_ind_id_all_properties BCMBAL_ACCESS_TERMINAL_IND_ID__NUM_OF
+#define bcmbal_flow_cfg_id_all_properties BCMBAL_FLOW_CFG_ID__NUM_OF
+#define bcmbal_flow_key_id_all_properties BCMBAL_FLOW_KEY_ID__NUM_OF
+#define bcmbal_flow_stat_id_all_properties BCMBAL_FLOW_STAT_ID__NUM_OF
+#define bcmbal_flow_ind_id_all_properties BCMBAL_FLOW_IND_ID__NUM_OF
+#define bcmbal_group_cfg_id_all_properties BCMBAL_GROUP_CFG_ID__NUM_OF
+#define bcmbal_group_key_id_all_properties BCMBAL_GROUP_KEY_ID__NUM_OF
+#define bcmbal_interface_key_id_all_properties BCMBAL_INTERFACE_KEY_ID__NUM_OF
+#define bcmbal_interface_cfg_id_all_properties BCMBAL_INTERFACE_CFG_ID__NUM_OF
+#define bcmbal_interface_stat_id_all_properties BCMBAL_INTERFACE_STAT_ID__NUM_OF
+#define bcmbal_interface_ind_id_all_properties BCMBAL_INTERFACE_IND_ID__NUM_OF
+#define bcmbal_packet_cfg_id_all_properties BCMBAL_PACKET_CFG_ID__NUM_OF
+#define bcmbal_packet_key_id_all_properties BCMBAL_PACKET_KEY_ID__NUM_OF
+#define bcmbal_packet_ind_id_all_properties BCMBAL_PACKET_IND_ID__NUM_OF
+#define bcmbal_subscriber_terminal_key_id_all_properties BCMBAL_SUBSCRIBER_TERMINAL_KEY_ID__NUM_OF
+#define bcmbal_subscriber_terminal_cfg_id_all_properties BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID__NUM_OF
+#define bcmbal_subscriber_terminal_stat_id_all_properties BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID__NUM_OF
+#define bcmbal_subscriber_terminal_ind_id_all_properties BCMBAL_SUBSCRIBER_TERMINAL_IND_ID__NUM_OF
+#define bcmbal_tm_queue_key_id_all_properties BCMBAL_TM_QUEUE_KEY_ID__NUM_OF
+#define bcmbal_tm_queue_cfg_id_all_properties BCMBAL_TM_QUEUE_CFG_ID__NUM_OF
+#define bcmbal_tm_queue_stat_id_all_properties BCMBAL_TM_QUEUE_STAT_ID__NUM_OF
+#define bcmbal_tm_queue_ind_id_all_properties BCMBAL_TM_QUEUE_IND_ID__NUM_OF
+#define bcmbal_tm_sched_key_id_all_properties BCMBAL_TM_SCHED_KEY_ID__NUM_OF
+#define bcmbal_tm_sched_cfg_id_all_properties BCMBAL_TM_SCHED_CFG_ID__NUM_OF
+#define bcmbal_tm_sched_ind_id_all_properties BCMBAL_TM_SCHED_IND_ID__NUM_OF
+
+/* The following are required for the API Init/Set/etc macros */
+#define bcmbal_obj_id__begin BCMBAL_OBJ_ID__BEGIN
+#define bcmbal_obj_id_access_terminal BCMBAL_OBJ_ID_ACCESS_TERMINAL
+#define bcmbal_obj_id_flow BCMBAL_OBJ_ID_FLOW
+#define bcmbal_obj_id_group BCMBAL_OBJ_ID_GROUP
+#define bcmbal_obj_id_interface BCMBAL_OBJ_ID_INTERFACE
+#define bcmbal_obj_id_packet BCMBAL_OBJ_ID_PACKET
+#define bcmbal_obj_id_subscriber_terminal BCMBAL_OBJ_ID_SUBSCRIBER_TERMINAL
+#define bcmbal_obj_id_tm_queue BCMBAL_OBJ_ID_TM_QUEUE
+#define bcmbal_obj_id_tm_sched BCMBAL_OBJ_ID_TM_SCHED
+#define bcmbal_obj_id__num_of BCMBAL_OBJ_ID__NUM_OF
+#define bcmbal_access_terminal_auto_id__begin BCMBAL_ACCESS_TERMINAL_AUTO_ID__BEGIN
+#define bcmbal_access_terminal_auto_id_ind BCMBAL_ACCESS_TERMINAL_AUTO_ID_IND
+#define bcmbal_access_terminal_auto_id__num_of BCMBAL_ACCESS_TERMINAL_AUTO_ID__NUM_OF
+#define bcmbal_flow_auto_id__begin BCMBAL_FLOW_AUTO_ID__BEGIN
+#define bcmbal_flow_auto_id_ind BCMBAL_FLOW_AUTO_ID_IND
+#define bcmbal_flow_auto_id__num_of BCMBAL_FLOW_AUTO_ID__NUM_OF
+#define bcmbal_interface_auto_id__begin BCMBAL_INTERFACE_AUTO_ID__BEGIN
+#define bcmbal_interface_auto_id_ind BCMBAL_INTERFACE_AUTO_ID_IND
+#define bcmbal_interface_auto_id__num_of BCMBAL_INTERFACE_AUTO_ID__NUM_OF
+#define bcmbal_packet_auto_id__begin BCMBAL_PACKET_AUTO_ID__BEGIN
+#define bcmbal_packet_auto_id_ind BCMBAL_PACKET_AUTO_ID_IND
+#define bcmbal_packet_auto_id__num_of BCMBAL_PACKET_AUTO_ID__NUM_OF
+#define bcmbal_subscriber_terminal_auto_id__begin BCMBAL_SUBSCRIBER_TERMINAL_AUTO_ID__BEGIN
+#define bcmbal_subscriber_terminal_auto_id_ind BCMBAL_SUBSCRIBER_TERMINAL_AUTO_ID_IND
+#define bcmbal_subscriber_terminal_auto_id__num_of BCMBAL_SUBSCRIBER_TERMINAL_AUTO_ID__NUM_OF
+#define bcmbal_tm_queue_auto_id__begin BCMBAL_TM_QUEUE_AUTO_ID__BEGIN
+#define bcmbal_tm_queue_auto_id_ind BCMBAL_TM_QUEUE_AUTO_ID_IND
+#define bcmbal_tm_queue_auto_id__num_of BCMBAL_TM_QUEUE_AUTO_ID__NUM_OF
+#define bcmbal_tm_sched_auto_id__begin BCMBAL_TM_SCHED_AUTO_ID__BEGIN
+#define bcmbal_tm_sched_auto_id_ind BCMBAL_TM_SCHED_AUTO_ID_IND
+#define bcmbal_tm_sched_auto_id__num_of BCMBAL_TM_SCHED_AUTO_ID__NUM_OF
+#define bcmbal_access_terminal_key_id_access_term_id BCMBAL_ACCESS_TERMINAL_KEY_ID_ACCESS_TERM_ID
+#define bcmbal_access_terminal_key_id__num_of BCMBAL_ACCESS_TERMINAL_KEY_ID__NUM_OF
+#define bcmbal_access_terminal_cfg_id_admin_state BCMBAL_ACCESS_TERMINAL_CFG_ID_ADMIN_STATE
+#define bcmbal_access_terminal_cfg_id_oper_status BCMBAL_ACCESS_TERMINAL_CFG_ID_OPER_STATUS
+#define bcmbal_access_terminal_cfg_id_iwf_mode BCMBAL_ACCESS_TERMINAL_CFG_ID_IWF_MODE
+#define bcmbal_access_terminal_cfg_id__num_of BCMBAL_ACCESS_TERMINAL_CFG_ID__NUM_OF
+#define bcmbal_access_terminal_ind_id_admin_state BCMBAL_ACCESS_TERMINAL_IND_ID_ADMIN_STATE
+#define bcmbal_access_terminal_ind_id_oper_status BCMBAL_ACCESS_TERMINAL_IND_ID_OPER_STATUS
+#define bcmbal_access_terminal_ind_id_iwf_mode BCMBAL_ACCESS_TERMINAL_IND_ID_IWF_MODE
+#define bcmbal_access_terminal_ind_id__num_of BCMBAL_ACCESS_TERMINAL_IND_ID__NUM_OF
+#define bcmbal_flow_key_id_flow_id BCMBAL_FLOW_KEY_ID_FLOW_ID
+#define bcmbal_flow_key_id_flow_type BCMBAL_FLOW_KEY_ID_FLOW_TYPE
+#define bcmbal_flow_key_id__num_of BCMBAL_FLOW_KEY_ID__NUM_OF
+#define bcmbal_flow_cfg_id_admin_state BCMBAL_FLOW_CFG_ID_ADMIN_STATE
+#define bcmbal_flow_cfg_id_oper_status BCMBAL_FLOW_CFG_ID_OPER_STATUS
+#define bcmbal_flow_cfg_id_access_int_id BCMBAL_FLOW_CFG_ID_ACCESS_INT_ID
+#define bcmbal_flow_cfg_id_network_int_id BCMBAL_FLOW_CFG_ID_NETWORK_INT_ID
+#define bcmbal_flow_cfg_id_sub_term_id BCMBAL_FLOW_CFG_ID_SUB_TERM_ID
+#define bcmbal_flow_cfg_id_sub_term_uni_idx BCMBAL_FLOW_CFG_ID_SUB_TERM_UNI_IDX
+#define bcmbal_flow_cfg_id_svc_port_id BCMBAL_FLOW_CFG_ID_SVC_PORT_ID
+#define bcmbal_flow_cfg_id_agg_port_id BCMBAL_FLOW_CFG_ID_AGG_PORT_ID
+#define bcmbal_flow_cfg_id_resolve_mac BCMBAL_FLOW_CFG_ID_RESOLVE_MAC
+#define bcmbal_flow_cfg_id_classifier BCMBAL_FLOW_CFG_ID_CLASSIFIER
+#define bcmbal_flow_cfg_id_action BCMBAL_FLOW_CFG_ID_ACTION
+#define bcmbal_flow_cfg_id_sla BCMBAL_FLOW_CFG_ID_SLA
+#define bcmbal_flow_cfg_id_cookie BCMBAL_FLOW_CFG_ID_COOKIE
+#define bcmbal_flow_cfg_id_priority BCMBAL_FLOW_CFG_ID_PRIORITY
+#define bcmbal_flow_cfg_id_group_id BCMBAL_FLOW_CFG_ID_GROUP_ID
+#define bcmbal_flow_cfg_id_queue BCMBAL_FLOW_CFG_ID_QUEUE
+#define bcmbal_flow_cfg_id__num_of BCMBAL_FLOW_CFG_ID__NUM_OF
+#define bcmbal_flow_stat_id_rx_packets BCMBAL_FLOW_STAT_ID_RX_PACKETS
+#define bcmbal_flow_stat_id_rx_bytes BCMBAL_FLOW_STAT_ID_RX_BYTES
+#define bcmbal_flow_stat_id_tx_packets BCMBAL_FLOW_STAT_ID_TX_PACKETS
+#define bcmbal_flow_stat_id_tx_bytes BCMBAL_FLOW_STAT_ID_TX_BYTES
+#define bcmbal_flow_stat_id__num_of BCMBAL_FLOW_STAT_ID__NUM_OF
+#define bcmbal_flow_ind_id_admin_state BCMBAL_FLOW_IND_ID_ADMIN_STATE
+#define bcmbal_flow_ind_id_oper_status BCMBAL_FLOW_IND_ID_OPER_STATUS
+#define bcmbal_flow_ind_id_access_int_id BCMBAL_FLOW_IND_ID_ACCESS_INT_ID
+#define bcmbal_flow_ind_id_network_int_id BCMBAL_FLOW_IND_ID_NETWORK_INT_ID
+#define bcmbal_flow_ind_id_sub_term_id BCMBAL_FLOW_IND_ID_SUB_TERM_ID
+#define bcmbal_flow_ind_id_svc_port_id BCMBAL_FLOW_IND_ID_SVC_PORT_ID
+#define bcmbal_flow_ind_id_agg_port_id BCMBAL_FLOW_IND_ID_AGG_PORT_ID
+#define bcmbal_flow_ind_id_resolve_mac BCMBAL_FLOW_IND_ID_RESOLVE_MAC
+#define bcmbal_flow_ind_id_base_tc_id BCMBAL_FLOW_IND_ID_BASE_TC_ID
+#define bcmbal_flow_ind_id_classifier BCMBAL_FLOW_IND_ID_CLASSIFIER
+#define bcmbal_flow_ind_id_action BCMBAL_FLOW_IND_ID_ACTION
+#define bcmbal_flow_ind_id_sla BCMBAL_FLOW_IND_ID_SLA
+#define bcmbal_flow_ind_id_cookie BCMBAL_FLOW_IND_ID_COOKIE
+#define bcmbal_flow_ind_id_priority BCMBAL_FLOW_IND_ID_PRIORITY
+#define bcmbal_flow_ind_id__num_of BCMBAL_FLOW_IND_ID__NUM_OF
+#define bcmbal_group_key_id_group_id BCMBAL_GROUP_KEY_ID_GROUP_ID
+#define bcmbal_group_key_id__num_of BCMBAL_GROUP_KEY_ID__NUM_OF
+#define bcmbal_group_cfg_id_members_cmd BCMBAL_GROUP_CFG_ID_MEMBERS_CMD
+#define bcmbal_group_cfg_id_members BCMBAL_GROUP_CFG_ID_MEMBERS
+#define bcmbal_group_cfg_id_cookie BCMBAL_GROUP_CFG_ID_COOKIE
+#define bcmbal_group_cfg_id_flows BCMBAL_GROUP_CFG_ID_FLOWS
+#define bcmbal_group_cfg_id_owner BCMBAL_GROUP_CFG_ID_OWNER
+#define bcmbal_group_cfg_id__num_of BCMBAL_GROUP_CFG_ID__NUM_OF
+#define bcmbal_interface_key_id_intf_id BCMBAL_INTERFACE_KEY_ID_INTF_ID
+#define bcmbal_interface_key_id_intf_type BCMBAL_INTERFACE_KEY_ID_INTF_TYPE
+#define bcmbal_interface_key_id__num_of BCMBAL_INTERFACE_KEY_ID__NUM_OF
+#define bcmbal_interface_cfg_id_admin_state BCMBAL_INTERFACE_CFG_ID_ADMIN_STATE
+#define bcmbal_interface_cfg_id_oper_status BCMBAL_INTERFACE_CFG_ID_OPER_STATUS
+#define bcmbal_interface_cfg_id_min_data_agg_port_id BCMBAL_INTERFACE_CFG_ID_MIN_DATA_AGG_PORT_ID
+#define bcmbal_interface_cfg_id_min_data_svc_port_id BCMBAL_INTERFACE_CFG_ID_MIN_DATA_SVC_PORT_ID
+#define bcmbal_interface_cfg_id_transceiver_type BCMBAL_INTERFACE_CFG_ID_TRANSCEIVER_TYPE
+#define bcmbal_interface_cfg_id_ds_miss_mode BCMBAL_INTERFACE_CFG_ID_DS_MISS_MODE
+#define bcmbal_interface_cfg_id_mtu BCMBAL_INTERFACE_CFG_ID_MTU
+#define bcmbal_interface_cfg_id_flow_control BCMBAL_INTERFACE_CFG_ID_FLOW_CONTROL
+#define bcmbal_interface_cfg_id_ds_tm BCMBAL_INTERFACE_CFG_ID_DS_TM
+#define bcmbal_interface_cfg_id_us_tm BCMBAL_INTERFACE_CFG_ID_US_TM
+#define bcmbal_interface_cfg_id_sub_term_id_list BCMBAL_INTERFACE_CFG_ID_SUB_TERM_ID_LIST
+#define bcmbal_interface_cfg_id__num_of BCMBAL_INTERFACE_CFG_ID__NUM_OF
+#define bcmbal_interface_stat_id_rx_packets BCMBAL_INTERFACE_STAT_ID_RX_PACKETS
+#define bcmbal_interface_stat_id_rx_bytes BCMBAL_INTERFACE_STAT_ID_RX_BYTES
+#define bcmbal_interface_stat_id_tx_packets BCMBAL_INTERFACE_STAT_ID_TX_PACKETS
+#define bcmbal_interface_stat_id_tx_bytes BCMBAL_INTERFACE_STAT_ID_TX_BYTES
+#define bcmbal_interface_stat_id__num_of BCMBAL_INTERFACE_STAT_ID__NUM_OF
+#define bcmbal_interface_ind_id_admin_state BCMBAL_INTERFACE_IND_ID_ADMIN_STATE
+#define bcmbal_interface_ind_id_oper_status BCMBAL_INTERFACE_IND_ID_OPER_STATUS
+#define bcmbal_interface_ind_id_min_data_agg_port_id BCMBAL_INTERFACE_IND_ID_MIN_DATA_AGG_PORT_ID
+#define bcmbal_interface_ind_id_min_data_svc_port_id BCMBAL_INTERFACE_IND_ID_MIN_DATA_SVC_PORT_ID
+#define bcmbal_interface_ind_id_transceiver_type BCMBAL_INTERFACE_IND_ID_TRANSCEIVER_TYPE
+#define bcmbal_interface_ind_id_ds_miss_mode BCMBAL_INTERFACE_IND_ID_DS_MISS_MODE
+#define bcmbal_interface_ind_id_mtu BCMBAL_INTERFACE_IND_ID_MTU
+#define bcmbal_interface_ind_id_flow_control BCMBAL_INTERFACE_IND_ID_FLOW_CONTROL
+#define bcmbal_interface_ind_id_ds_tm BCMBAL_INTERFACE_IND_ID_DS_TM
+#define bcmbal_interface_ind_id_us_tm BCMBAL_INTERFACE_IND_ID_US_TM
+#define bcmbal_interface_ind_id__num_of BCMBAL_INTERFACE_IND_ID__NUM_OF
+#define bcmbal_packet_key_id_reserved BCMBAL_PACKET_KEY_ID_RESERVED
+#define bcmbal_packet_key_id_packet_send_dest BCMBAL_PACKET_KEY_ID_PACKET_SEND_DEST
+#define bcmbal_packet_key_id__num_of BCMBAL_PACKET_KEY_ID__NUM_OF
+#define bcmbal_packet_cfg_id_flow_id BCMBAL_PACKET_CFG_ID_FLOW_ID
+#define bcmbal_packet_cfg_id_flow_type BCMBAL_PACKET_CFG_ID_FLOW_TYPE
+#define bcmbal_packet_cfg_id_intf_id BCMBAL_PACKET_CFG_ID_INTF_ID
+#define bcmbal_packet_cfg_id_intf_type BCMBAL_PACKET_CFG_ID_INTF_TYPE
+#define bcmbal_packet_cfg_id_svc_port BCMBAL_PACKET_CFG_ID_SVC_PORT
+#define bcmbal_packet_cfg_id_flow_cookie BCMBAL_PACKET_CFG_ID_FLOW_COOKIE
+#define bcmbal_packet_cfg_id_pkt BCMBAL_PACKET_CFG_ID_PKT
+#define bcmbal_packet_cfg_id__num_of BCMBAL_PACKET_CFG_ID__NUM_OF
+#define bcmbal_packet_ind_id_flow_id BCMBAL_PACKET_IND_ID_FLOW_ID
+#define bcmbal_packet_ind_id_flow_type BCMBAL_PACKET_IND_ID_FLOW_TYPE
+#define bcmbal_packet_ind_id_intf_id BCMBAL_PACKET_IND_ID_INTF_ID
+#define bcmbal_packet_ind_id_intf_type BCMBAL_PACKET_IND_ID_INTF_TYPE
+#define bcmbal_packet_ind_id_svc_port BCMBAL_PACKET_IND_ID_SVC_PORT
+#define bcmbal_packet_ind_id_flow_cookie BCMBAL_PACKET_IND_ID_FLOW_COOKIE
+#define bcmbal_packet_ind_id_pkt BCMBAL_PACKET_IND_ID_PKT
+#define bcmbal_packet_ind_id__num_of BCMBAL_PACKET_IND_ID__NUM_OF
+#define bcmbal_subscriber_terminal_key_id_sub_term_id BCMBAL_SUBSCRIBER_TERMINAL_KEY_ID_SUB_TERM_ID
+#define bcmbal_subscriber_terminal_key_id_intf_id BCMBAL_SUBSCRIBER_TERMINAL_KEY_ID_INTF_ID
+#define bcmbal_subscriber_terminal_key_id__num_of BCMBAL_SUBSCRIBER_TERMINAL_KEY_ID__NUM_OF
+#define bcmbal_subscriber_terminal_cfg_id_admin_state BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_ADMIN_STATE
+#define bcmbal_subscriber_terminal_cfg_id_oper_status BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_OPER_STATUS
+#define bcmbal_subscriber_terminal_cfg_id_serial_number BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_SERIAL_NUMBER
+#define bcmbal_subscriber_terminal_cfg_id_password BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_PASSWORD
+#define bcmbal_subscriber_terminal_cfg_id_registration_id BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_REGISTRATION_ID
+#define bcmbal_subscriber_terminal_cfg_id_svc_port_id BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_SVC_PORT_ID
+#define bcmbal_subscriber_terminal_cfg_id_mac_address BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_MAC_ADDRESS
+#define bcmbal_subscriber_terminal_cfg_id_ds_tm BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_DS_TM
+#define bcmbal_subscriber_terminal_cfg_id_us_tm BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_US_TM
+#define bcmbal_subscriber_terminal_cfg_id_svc_port_id_list BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_SVC_PORT_ID_LIST
+#define bcmbal_subscriber_terminal_cfg_id_agg_port_id_list BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID_AGG_PORT_ID_LIST
+#define bcmbal_subscriber_terminal_cfg_id__num_of BCMBAL_SUBSCRIBER_TERMINAL_CFG_ID__NUM_OF
+#define bcmbal_subscriber_terminal_stat_id_rx_packets BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID_RX_PACKETS
+#define bcmbal_subscriber_terminal_stat_id_rx_bytes BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID_RX_BYTES
+#define bcmbal_subscriber_terminal_stat_id_tx_packets BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID_TX_PACKETS
+#define bcmbal_subscriber_terminal_stat_id_tx_bytes BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID_TX_BYTES
+#define bcmbal_subscriber_terminal_stat_id__num_of BCMBAL_SUBSCRIBER_TERMINAL_STAT_ID__NUM_OF
+#define bcmbal_subscriber_terminal_ind_id_admin_state BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_ADMIN_STATE
+#define bcmbal_subscriber_terminal_ind_id_oper_status BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_OPER_STATUS
+#define bcmbal_subscriber_terminal_ind_id_serial_number BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_SERIAL_NUMBER
+#define bcmbal_subscriber_terminal_ind_id_password BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_PASSWORD
+#define bcmbal_subscriber_terminal_ind_id_registration_id BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_REGISTRATION_ID
+#define bcmbal_subscriber_terminal_ind_id_svc_port_id BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_SVC_PORT_ID
+#define bcmbal_subscriber_terminal_ind_id_mac_address BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_MAC_ADDRESS
+#define bcmbal_subscriber_terminal_ind_id_ds_tm BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_DS_TM
+#define bcmbal_subscriber_terminal_ind_id_us_tm BCMBAL_SUBSCRIBER_TERMINAL_IND_ID_US_TM
+#define bcmbal_subscriber_terminal_ind_id__num_of BCMBAL_SUBSCRIBER_TERMINAL_IND_ID__NUM_OF
+#define bcmbal_tm_queue_key_id_sched_id BCMBAL_TM_QUEUE_KEY_ID_SCHED_ID
+#define bcmbal_tm_queue_key_id_sched_dir BCMBAL_TM_QUEUE_KEY_ID_SCHED_DIR
+#define bcmbal_tm_queue_key_id_id BCMBAL_TM_QUEUE_KEY_ID_ID
+#define bcmbal_tm_queue_key_id__num_of BCMBAL_TM_QUEUE_KEY_ID__NUM_OF
+#define bcmbal_tm_queue_cfg_id_priority BCMBAL_TM_QUEUE_CFG_ID_PRIORITY
+#define bcmbal_tm_queue_cfg_id_weight BCMBAL_TM_QUEUE_CFG_ID_WEIGHT
+#define bcmbal_tm_queue_cfg_id_rate BCMBAL_TM_QUEUE_CFG_ID_RATE
+#define bcmbal_tm_queue_cfg_id_bac BCMBAL_TM_QUEUE_CFG_ID_BAC
+#define bcmbal_tm_queue_cfg_id_creation_mode BCMBAL_TM_QUEUE_CFG_ID_CREATION_MODE
+#define bcmbal_tm_queue_cfg_id_ref_count BCMBAL_TM_QUEUE_CFG_ID_REF_COUNT
+#define bcmbal_tm_queue_cfg_id__num_of BCMBAL_TM_QUEUE_CFG_ID__NUM_OF
+#define bcmbal_tm_queue_stat_id_packets_ok BCMBAL_TM_QUEUE_STAT_ID_PACKETS_OK
+#define bcmbal_tm_queue_stat_id_bytes_ok BCMBAL_TM_QUEUE_STAT_ID_BYTES_OK
+#define bcmbal_tm_queue_stat_id_packets_discarded BCMBAL_TM_QUEUE_STAT_ID_PACKETS_DISCARDED
+#define bcmbal_tm_queue_stat_id_bytes_discarded BCMBAL_TM_QUEUE_STAT_ID_BYTES_DISCARDED
+#define bcmbal_tm_queue_stat_id__num_of BCMBAL_TM_QUEUE_STAT_ID__NUM_OF
+#define bcmbal_tm_queue_ind_id_ret BCMBAL_TM_QUEUE_IND_ID_RET
+#define bcmbal_tm_queue_ind_id__num_of BCMBAL_TM_QUEUE_IND_ID__NUM_OF
+#define bcmbal_tm_sched_key_id_dir BCMBAL_TM_SCHED_KEY_ID_DIR
+#define bcmbal_tm_sched_key_id_id BCMBAL_TM_SCHED_KEY_ID_ID
+#define bcmbal_tm_sched_key_id__num_of BCMBAL_TM_SCHED_KEY_ID__NUM_OF
+#define bcmbal_tm_sched_cfg_id_owner BCMBAL_TM_SCHED_CFG_ID_OWNER
+#define bcmbal_tm_sched_cfg_id_sched_type BCMBAL_TM_SCHED_CFG_ID_SCHED_TYPE
+#define bcmbal_tm_sched_cfg_id_sched_parent BCMBAL_TM_SCHED_CFG_ID_SCHED_PARENT
+#define bcmbal_tm_sched_cfg_id_sched_child_type BCMBAL_TM_SCHED_CFG_ID_SCHED_CHILD_TYPE
+#define bcmbal_tm_sched_cfg_id_rate BCMBAL_TM_SCHED_CFG_ID_RATE
+#define bcmbal_tm_sched_cfg_id_tcont_sla BCMBAL_TM_SCHED_CFG_ID_TCONT_SLA
+#define bcmbal_tm_sched_cfg_id_creation_mode BCMBAL_TM_SCHED_CFG_ID_CREATION_MODE
+#define bcmbal_tm_sched_cfg_id_queues BCMBAL_TM_SCHED_CFG_ID_QUEUES
+#define bcmbal_tm_sched_cfg_id_sub_scheds BCMBAL_TM_SCHED_CFG_ID_SUB_SCHEDS
+#define bcmbal_tm_sched_cfg_id_num_priorities BCMBAL_TM_SCHED_CFG_ID_NUM_PRIORITIES
+#define bcmbal_tm_sched_cfg_id__num_of BCMBAL_TM_SCHED_CFG_ID__NUM_OF
+#define bcmbal_tm_sched_ind_id_ret BCMBAL_TM_SCHED_IND_ID_RET
+#define bcmbal_tm_sched_ind_id__num_of BCMBAL_TM_SCHED_IND_ID__NUM_OF
+
+/** Checks whether the given object type has the given tag.
+ *
+ * \return true if the given object has the given tag, false otherwise
+ */
+bcmos_bool bcmbal_obj_has_tag(bcmbal_obj_id obj, bcmbal_obj_tag tag);
+
+#define BCMBAL_OBJ_ID_ANY ((bcmbal_obj_id) UINT16_MAX)
+
+/** @} */
+#endif /* BAL_MODEL_IDS_H_ */
diff --git a/bal_release/src/common/include/bal_model_types.h b/bal_release/src/common/include/bal_model_types.h
new file mode 100644
index 0000000..af683fc
--- /dev/null
+++ b/bal_release/src/common/include/bal_model_types.h
@@ -0,0 +1,1154 @@
+#ifndef BAL_MODEL_TYPES
+#define BAL_MODEL_TYPES
+
+#include <bcmos_system.h>
+#include "bal_obj.h"
+
+/** \defgroup object_model_data_types BAL Object Model Data Types
+ * @{
+ */
+typedef uint32_t bcmbal_access_id; /**< bcmbal_access_id: typed alias for a 32-bit unsigned integer. */
+typedef uint16_t bcmbal_aggregation_port_id; /**< bcmbal_aggregation_port_id: typed alias for a 16-bit unsigned integer. */
+typedef uint64_t bcmbal_cookie; /**< bcmbal_cookie: typed alias for a 64-bit unsigned integer. */
+typedef uint32_t bcmbal_intf_id; /**< bcmbal_intf_id: typed alias for a 32-bit unsigned integer. */
+typedef uint32_t bcmbal_sub_id; /**< bcmbal_sub_id: typed alias for a 32-bit unsigned integer. */
+#define BCMBAL_SUB_ID_UNKNOWN ((bcmbal_sub_id) 65535UL)
+typedef uint32_t bcmbal_flow_id; /**< bcmbal_flow_id: typed alias for a 32-bit unsigned integer. */
+typedef uint32_t bcmbal_group_id; /**< bcmbal_group_id: typed alias for a 32-bit unsigned integer. */
+typedef uint16_t bcmbal_service_port_id; /**< bcmbal_service_port_id: typed alias for a 16-bit unsigned integer. */
+typedef uint32_t bcmbal_tm_sched_id; /**< bcmbal_tm_sched_id: typed alias for a 32-bit unsigned integer. */
+#define BCMBAL_TM_SCHED_ID_UNKNOWN ((bcmbal_tm_sched_id) 65535UL)
+typedef uint8_t bcmbal_tm_queue_id; /**< bcmbal_tm_queue_id: typed alias for a 8-bit unsigned integer. */
+typedef uint8_t bcmbal_percent; /**< bcmbal_percent: typed alias for a 8-bit unsigned integer. */
+typedef uint8_t bcmbal_tm_priority; /**< bcmbal_tm_priority: typed alias for a 8-bit unsigned integer. */
+typedef uint16_t bcmbal_tm_sched_id_index; /**< bcmbal_tm_sched_id_index: typed alias for a 16-bit unsigned integer. */
+typedef uint8_t bcmbal_tm_weight; /**< bcmbal_tm_weight: typed alias for a 8-bit unsigned integer. */
+
+/** action ID.
+ */
+typedef enum bcmbal_action_id
+{
+ BCMBAL_ACTION_ID_NONE = 0,
+ BCMBAL_ACTION_ID_CMDS_BITMASK = 0x0001, /**< Commands bitmask. */
+ BCMBAL_ACTION_ID_O_VID = 0x0002, /**< Outer vid. */
+ BCMBAL_ACTION_ID_O_PBITS = 0x0004, /**< Outer pbits. */
+ BCMBAL_ACTION_ID_O_TPID = 0x0008, /**< Outer tpid. */
+ BCMBAL_ACTION_ID_I_VID = 0x0010, /**< Inner vid. */
+ BCMBAL_ACTION_ID_I_PBITS = 0x0020, /**< Inner pbits. */
+ BCMBAL_ACTION_ID_I_TPID = 0x0040, /**< Inner tpid. */
+ BCMBAL_ACTION_ID_ALL = 0x007F /**< All fields */
+} bcmbal_action_id;
+
+/** action_cmd_id.
+ */
+typedef enum bcmbal_action_cmd_id
+{
+ BCMBAL_ACTION_CMD_ID_NONE = 0,
+ BCMBAL_ACTION_CMD_ID_ADD_OUTER_TAG = 0x0001, /**< Add outer tag. */
+ BCMBAL_ACTION_CMD_ID_REMOVE_OUTER_TAG = 0x0002, /**< Remove outer tag. */
+ BCMBAL_ACTION_CMD_ID_XLATE_OUTER_TAG = 0x0004, /**< Translate outer tag. */
+ BCMBAL_ACTION_CMD_ID_XLATE_TWO_TAGS = 0x0008, /**< Translate two tags. */
+ BCMBAL_ACTION_CMD_ID_DISCARD_DS_BCAST = 0x0010, /**< Used to satisfy TR-156 Issue 3 R-111 */
+ BCMBAL_ACTION_CMD_ID_DISCARD_DS_UNKNOWN = 0x0020, /**< Used to satisfy TR-156 Issue 3 R-109 */
+ BCMBAL_ACTION_CMD_ID_ADD_TWO_TAGS = 0x0040, /**< Add two tags. */
+ BCMBAL_ACTION_CMD_ID_REMOVE_TWO_TAGS = 0x0080, /**< Remove two tags. */
+ BCMBAL_ACTION_CMD_ID_REMARK_PBITS = 0x0100, /**< Set the outer tag pbits */
+ BCMBAL_ACTION_CMD_ID_COPY_PBITS = 0x0200, /**< Copy the inner pbits to outer pbits */
+ BCMBAL_ACTION_CMD_ID_REVERSE_COPY_PBITS = 0x0400, /**< Copy the outer pbits to inner pbits */
+ BCMBAL_ACTION_CMD_ID_DSCP_TO_PBITS = 0x0800, /**< Copy the L4 DSCP to outer pbits */
+ BCMBAL_ACTION_CMD_ID_TRAP_TO_HOST = 0x1000 /**< Not a valid action for a group object member */
+} bcmbal_action_cmd_id;
+
+/** classifier ID.
+ */
+typedef enum bcmbal_classifier_id
+{
+ BCMBAL_CLASSIFIER_ID_NONE = 0,
+ BCMBAL_CLASSIFIER_ID_O_TPID = 0x0001, /**< Outer TPID of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_O_VID = 0x0002, /**< Outer VID of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_I_TPID = 0x0004, /**< Inner TPID of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_I_VID = 0x0008, /**< Inner VID of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_O_PBITS = 0x0010, /**< Outer PBITS of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_I_PBITS = 0x0020, /**< Inner PBITS of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_ETHER_TYPE = 0x0040, /**< Ethertype of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_DST_MAC = 0x0080, /**< Destination MAC address of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_SRC_MAC = 0x0100, /**< Source MAC address of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_IP_PROTO = 0x0200, /**< IP protocol of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_DST_IP = 0x0400, /**< Destination IP address of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_SRC_IP = 0x0800, /**< Source IP address of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_SRC_PORT = 0x1000, /**< Source port of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_DST_PORT = 0x2000, /**< Destination port of the packet to be classified */
+ BCMBAL_CLASSIFIER_ID_PKT_TAG_TYPE = 0x4000, /**< The tag type of the ingress packets */
+ BCMBAL_CLASSIFIER_ID_ALL = 0x7FFF /**< All fields */
+} bcmbal_classifier_id;
+
+/** Packet tag type.
+ */
+typedef enum bcmbal_pkt_tag_type
+{
+ BCMBAL_PKT_TAG_TYPE_NONE = 0,
+ BCMBAL_PKT_TAG_TYPE_UNTAGGED = 0x0001, /**< Untagged. */
+ BCMBAL_PKT_TAG_TYPE_SINGLE_TAG = 0x0002, /**< Single tag. */
+ BCMBAL_PKT_TAG_TYPE_DOUBLE_TAG = 0x0004 /**< Double tag. */
+} bcmbal_pkt_tag_type;
+
+/** Generic enable/disable enumeration
+ */
+typedef enum bcmbal_control
+{
+ BCMBAL_CONTROL_DISABLE = 0, /**< disable. */
+ BCMBAL_CONTROL_ENABLE = 1, /**< enable. */
+ BCMBAL_CONTROL__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_control;
+
+/** Destination type.
+ */
+typedef enum bcmbal_dest_type
+{
+ BCMBAL_DEST_TYPE_NNI = 1, /**< for packets being sent to the NNI */
+ BCMBAL_DEST_TYPE_SUB_TERM = 2, /**< for packets being sent to a subscriber terminal */
+ BCMBAL_DEST_TYPE_HOST = 3 /**< for packet indications received from NNI or SUB_TERM and being sent to the host */
+} bcmbal_dest_type;
+
+/** Downstrean action for unknown packets.
+ */
+typedef enum bcmbal_ds_miss_mode
+{
+ BCMBAL_DS_MISS_MODE_DISCARD = 0, /**< Discard. */
+ BCMBAL_DS_MISS_MODE_BROADCAST = 1, /**< Broadcast. */
+ BCMBAL_DS_MISS_MODE_VID = 2, /**< Vid. */
+ BCMBAL_DS_MISS_MODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_ds_miss_mode;
+
+/** Extra BW Eligibility Type
+ */
+typedef enum bcmbal_extra_bw_eligibility_type
+{
+ BCMBAL_EXTRA_BW_ELIGIBILITY_TYPE_NONE = 0, /**< None */
+ BCMBAL_EXTRA_BW_ELIGIBILITY_TYPE_NOT_ASSURED= 1, /**< Not assured */
+ BCMBAL_EXTRA_BW_ELIGIBILITY_TYPE_BEST_EFFORT= 2, /**< Best effort */
+ BCMBAL_EXTRA_BW_ELIGIBILITY_TYPE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_extra_bw_eligibility_type;
+
+/** Flow Type.
+ */
+typedef enum bcmbal_flow_type
+{
+ BCMBAL_FLOW_TYPE_UPSTREAM = 1, /**< Upstream flow */
+ BCMBAL_FLOW_TYPE_DOWNSTREAM = 2, /**< Downstream Flow */
+ BCMBAL_FLOW_TYPE_BROADCAST = 3, /**< Broadcast Flow */
+ BCMBAL_FLOW_TYPE_MULTICAST = 4 /**< Multicast Flow */
+} bcmbal_flow_type;
+
+/** Member operation type.
+ */
+typedef enum bcmbal_group_member_cmd
+{
+ BCMBAL_GROUP_MEMBER_CMD_ADD_MEMBERS = 1, /**< Add new members. */
+ BCMBAL_GROUP_MEMBER_CMD_REM_MEMBERS = 2, /**< Remove existing members. */
+ BCMBAL_GROUP_MEMBER_CMD_SET_MEMBERS = 3 /**< Replace members with new set. */
+} bcmbal_group_member_cmd;
+
+/** owner of the group
+ */
+typedef enum bcmbal_group_owner
+{
+ BCMBAL_GROUP_OWNER_NONE = 0, /**< no owner */
+ BCMBAL_GROUP_OWNER_MULTICAST = 1, /**< used as multicast group */
+ BCMBAL_GROUP_OWNER_UNICAST = 2, /**< used as unicast group */
+ BCMBAL_GROUP_OWNER__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_group_owner;
+
+/** Interface type.
+ */
+typedef enum bcmbal_intf_type
+{
+ BCMBAL_INTF_TYPE_NNI = 0, /**< NNI Interface. */
+ BCMBAL_INTF_TYPE_PON = 1, /**< POIN Interface. */
+ BCMBAL_INTF_TYPE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_intf_type;
+
+/** Interworking Function Mode.
+ */
+typedef enum bcmbal_iwf_mode
+{
+ BCMBAL_IWF_MODE_DIRECT_MAPPING = 0, /**< Direct mapping. */
+ BCMBAL_IWF_MODE_PER_FLOW = 1, /**< Per flow . */
+ BCMBAL_IWF_MODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_iwf_mode;
+
+/** SLA ID.
+ */
+typedef enum bcmbal_sla_id
+{
+ BCMBAL_SLA_ID_NONE = 0,
+ BCMBAL_SLA_ID_MIN_RATE = 0x0001, /**< The minimal rate for this flow, in kilobits per second (optional) */
+ BCMBAL_SLA_ID_MAX_RATE = 0x0002, /**< The maximum rate for this flow, in kilobits per second (optional) */
+ BCMBAL_SLA_ID_ALL = 0x0003 /**< All fields */
+} bcmbal_sla_id;
+
+/** Admin state values for access terminal object
+ */
+typedef enum bcmbal_state
+{
+ BCMBAL_STATE_UP = 1, /**< Admin state up */
+ BCMBAL_STATE_DOWN = 2, /**< Admin state down */
+ BCMBAL_STATE_TESTING = 3 /**< Admin state testing */
+} bcmbal_state;
+
+/** Oper status values
+ */
+typedef enum bcmbal_status
+{
+ BCMBAL_STATUS_UP = 1, /**< Oper status up */
+ BCMBAL_STATUS_DOWN = 2, /**< Oper status down */
+ BCMBAL_STATUS_TESTING = 3, /**< Oper status testing */
+ BCMBAL_STATUS_NOT_PRESENT = 4, /**< Oper status not present */
+ BCMBAL_STATUS_LOWER_LAYER_DOWN = 5, /**< Oper status lower layer down */
+ BCMBAL_STATUS_UNKNOWN = 6 /**< Oper status unknown */
+} bcmbal_status;
+
+/** Buffer Admission Control Type
+ */
+typedef enum bcmbal_tm_bac_type
+{
+ BCMBAL_TM_BAC_TYPE_TAILDROP = 0, /**< Taildrop */
+ BCMBAL_TM_BAC_TYPE_WTAILDROP = 1, /**< Weighted taildrop */
+ BCMBAL_TM_BAC_TYPE_RED = 2, /**< Random Early Discard */
+ BCMBAL_TM_BAC_TYPE_WRED = 3, /**< Weighted Random Early Discard */
+ BCMBAL_TM_BAC_TYPE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_bac_type;
+
+/** TM Creation Mode
+ */
+typedef enum bcmbal_tm_creation_mode
+{
+ BCMBAL_TM_CREATION_MODE_MANUAL = 0, /**< tm object created manually */
+ BCMBAL_TM_CREATION_MODE_AUTO = 1, /**< tm object created automatically */
+ BCMBAL_TM_CREATION_MODE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_creation_mode;
+
+/** Scheduling Level for the Children TM
+ */
+typedef enum bcmbal_tm_sched_child_type
+{
+ BCMBAL_TM_SCHED_CHILD_TYPE_QUEUE = 0, /**< Queue-level scheduler */
+ BCMBAL_TM_SCHED_CHILD_TYPE_SCHED = 1, /**< Scheduler-level scheduler */
+ BCMBAL_TM_SCHED_CHILD_TYPE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_sched_child_type;
+
+/** Traffic Direction
+ */
+typedef enum bcmbal_tm_sched_dir
+{
+ BCMBAL_TM_SCHED_DIR_US = 1, /**< Upstream */
+ BCMBAL_TM_SCHED_DIR_DS = 2 /**< Downstream */
+} bcmbal_tm_sched_dir;
+
+/** TM Scheduler Owner Type
+ */
+typedef enum bcmbal_tm_sched_owner_type
+{
+ BCMBAL_TM_SCHED_OWNER_TYPE_UNDEFINED = 0, /**< Undefined */
+ BCMBAL_TM_SCHED_OWNER_TYPE_INTERFACE = 1, /**< Interface */
+ BCMBAL_TM_SCHED_OWNER_TYPE_SUB_TERM = 2, /**< Subscriber terminal */
+ BCMBAL_TM_SCHED_OWNER_TYPE_AGG_PORT = 3, /**< TM scheduler is owned by aggregation port */
+ BCMBAL_TM_SCHED_OWNER_TYPE_UNI = 4, /**< TM scheduler is owned by UNI port */
+ BCMBAL_TM_SCHED_OWNER_TYPE_VIRTUAL = 5, /**< Other unspecified owner */
+ BCMBAL_TM_SCHED_OWNER_TYPE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_sched_owner_type;
+
+/** tm_sched_owner agg_port ID.
+ */
+typedef enum bcmbal_tm_sched_owner_agg_port_id
+{
+ BCMBAL_TM_SCHED_OWNER_AGG_PORT_ID_NONE = 0,
+ BCMBAL_TM_SCHED_OWNER_AGG_PORT_ID_INTF_ID = 0x0001, /**< PON interface id */
+ BCMBAL_TM_SCHED_OWNER_AGG_PORT_ID_SUB_TERM_ID = 0x0002, /**< Subscriber terminal id */
+ BCMBAL_TM_SCHED_OWNER_AGG_PORT_ID_AGG_PORT_ID = 0x0004, /**< Aggregation port id */
+ BCMBAL_TM_SCHED_OWNER_AGG_PORT_ID_ALL = 0x0007 /**< All fields */
+} bcmbal_tm_sched_owner_agg_port_id;
+
+/** tm_sched_parent ID.
+ */
+typedef enum bcmbal_tm_sched_parent_id
+{
+ BCMBAL_TM_SCHED_PARENT_ID_NONE = 0,
+ BCMBAL_TM_SCHED_PARENT_ID_SCHED_ID = 0x0001, /**< Parent scheduler id */
+ BCMBAL_TM_SCHED_PARENT_ID_PRIORITY = 0x0002, /**< Priority */
+ BCMBAL_TM_SCHED_PARENT_ID_WEIGHT = 0x0004, /**< Weight */
+ BCMBAL_TM_SCHED_PARENT_ID_ALL = 0x0007 /**< All fields */
+} bcmbal_tm_sched_parent_id;
+
+/** Scheduler Type
+ */
+typedef enum bcmbal_tm_sched_type
+{
+ BCMBAL_TM_SCHED_TYPE_NONE = 0, /**< NO scheduling */
+ BCMBAL_TM_SCHED_TYPE_WFQ = 1, /**< Weighted Fair Queue */
+ BCMBAL_TM_SCHED_TYPE_SP = 2, /**< Strict Priority */
+ BCMBAL_TM_SCHED_TYPE_SP_WFQ = 3, /**< Hybrid SP + WFQ */
+ BCMBAL_TM_SCHED_TYPE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_tm_sched_type;
+
+/** tm_shaping ID.
+ */
+typedef enum bcmbal_tm_shaping_id
+{
+ BCMBAL_TM_SHAPING_ID_NONE = 0,
+ BCMBAL_TM_SHAPING_ID_SBR = 0x0001, /**< Sustained Bit Rate (kbps) */
+ BCMBAL_TM_SHAPING_ID_PBR = 0x0002, /**< Peak Bit Rate (kbps) */
+ BCMBAL_TM_SHAPING_ID_BURST = 0x0004, /**< Max Burst Bytes at Peak Bit Rate */
+ BCMBAL_TM_SHAPING_ID_ALL = 0x0007 /**< All fields */
+} bcmbal_tm_shaping_id;
+
+/** tm_tcont_sla ID.
+ */
+typedef enum bcmbal_tm_tcont_sla_id
+{
+ BCMBAL_TM_TCONT_SLA_ID_NONE = 0,
+ BCMBAL_TM_TCONT_SLA_ID_EXTRA_BW_ELIG = 0x0001, /**< Extra BW eligibility type */
+ BCMBAL_TM_TCONT_SLA_ID_NRT_CBR = 0x0002, /**< NRT CBR */
+ BCMBAL_TM_TCONT_SLA_ID_RT_CBR = 0x0004, /**< RT_CBR */
+ BCMBAL_TM_TCONT_SLA_ID_RT_PROFILE = 0x0008, /**< RT Profile */
+ BCMBAL_TM_TCONT_SLA_ID_NRT_PROFILE = 0x0010, /**< NRT Profile */
+ BCMBAL_TM_TCONT_SLA_ID_ALL = 0x001F /**< All fields */
+} bcmbal_tm_tcont_sla_id;
+
+/** Transceiver types
+ */
+typedef enum bcmbal_trx_type
+{
+ BCMBAL_TRX_TYPE_GPON_SPS_43_48 = 0, /**< gpon_sps_43_48. */
+ BCMBAL_TRX_TYPE_GPON_SPS_SOG_4321 = 1, /**< gpon_sps_sog_4321. */
+ BCMBAL_TRX_TYPE_GPON_LTE_3680_M = 2, /**< gpon_lte_3680_m. */
+ BCMBAL_TRX_TYPE_GPON_SOURCE_PHOTONICS = 3, /**< gpon_source_photonics. */
+ BCMBAL_TRX_TYPE_GPON_LTE_3680_P = 4, /**< gpon_lte_3680_p. */
+ BCMBAL_TRX_TYPE_XGPON_LTH_7222_PC = 5, /**< xgpon_lth_7222_pc. */
+ BCMBAL_TRX_TYPE_XGPON_LTH_7226_PC = 6, /**< xgpon_lth_7226_pc. */
+ BCMBAL_TRX_TYPE_XGPON_LTH_5302_PC = 7, /**< xgpon_lth_5302_pc. */
+ BCMBAL_TRX_TYPE__NUM_OF /**< Number of enum entries, not an entry itself. */
+} bcmbal_trx_type;
+
+#define bcmbal_action_id_none BCMBAL_ACTION_ID_NONE
+#define bcmbal_action_id_cmds_bitmask BCMBAL_ACTION_ID_CMDS_BITMASK
+#define bcmbal_action_id_o_vid BCMBAL_ACTION_ID_O_VID
+#define bcmbal_action_id_o_pbits BCMBAL_ACTION_ID_O_PBITS
+#define bcmbal_action_id_o_tpid BCMBAL_ACTION_ID_O_TPID
+#define bcmbal_action_id_i_vid BCMBAL_ACTION_ID_I_VID
+#define bcmbal_action_id_i_pbits BCMBAL_ACTION_ID_I_PBITS
+#define bcmbal_action_id_i_tpid BCMBAL_ACTION_ID_I_TPID
+#define bcmbal_action_id_all BCMBAL_ACTION_ID_ALL
+#define bcmbal_classifier_id_none BCMBAL_CLASSIFIER_ID_NONE
+#define bcmbal_classifier_id_o_tpid BCMBAL_CLASSIFIER_ID_O_TPID
+#define bcmbal_classifier_id_o_vid BCMBAL_CLASSIFIER_ID_O_VID
+#define bcmbal_classifier_id_i_tpid BCMBAL_CLASSIFIER_ID_I_TPID
+#define bcmbal_classifier_id_i_vid BCMBAL_CLASSIFIER_ID_I_VID
+#define bcmbal_classifier_id_o_pbits BCMBAL_CLASSIFIER_ID_O_PBITS
+#define bcmbal_classifier_id_i_pbits BCMBAL_CLASSIFIER_ID_I_PBITS
+#define bcmbal_classifier_id_ether_type BCMBAL_CLASSIFIER_ID_ETHER_TYPE
+#define bcmbal_classifier_id_dst_mac BCMBAL_CLASSIFIER_ID_DST_MAC
+#define bcmbal_classifier_id_src_mac BCMBAL_CLASSIFIER_ID_SRC_MAC
+#define bcmbal_classifier_id_ip_proto BCMBAL_CLASSIFIER_ID_IP_PROTO
+#define bcmbal_classifier_id_dst_ip BCMBAL_CLASSIFIER_ID_DST_IP
+#define bcmbal_classifier_id_src_ip BCMBAL_CLASSIFIER_ID_SRC_IP
+#define bcmbal_classifier_id_src_port BCMBAL_CLASSIFIER_ID_SRC_PORT
+#define bcmbal_classifier_id_dst_port BCMBAL_CLASSIFIER_ID_DST_PORT
+#define bcmbal_classifier_id_pkt_tag_type BCMBAL_CLASSIFIER_ID_PKT_TAG_TYPE
+#define bcmbal_classifier_id_all BCMBAL_CLASSIFIER_ID_ALL
+#define bcmbal_sla_id_none BCMBAL_SLA_ID_NONE
+#define bcmbal_sla_id_min_rate BCMBAL_SLA_ID_MIN_RATE
+#define bcmbal_sla_id_max_rate BCMBAL_SLA_ID_MAX_RATE
+#define bcmbal_sla_id_all BCMBAL_SLA_ID_ALL
+#define bcmbal_tm_sched_owner_agg_port_id_none BCMBAL_TM_SCHED_OWNER_AGG_PORT_ID_NONE
+#define bcmbal_tm_sched_owner_agg_port_id_intf_id BCMBAL_TM_SCHED_OWNER_AGG_PORT_ID_INTF_ID
+#define bcmbal_tm_sched_owner_agg_port_id_sub_term_id BCMBAL_TM_SCHED_OWNER_AGG_PORT_ID_SUB_TERM_ID
+#define bcmbal_tm_sched_owner_agg_port_id_agg_port_id BCMBAL_TM_SCHED_OWNER_AGG_PORT_ID_AGG_PORT_ID
+#define bcmbal_tm_sched_owner_agg_port_id_all BCMBAL_TM_SCHED_OWNER_AGG_PORT_ID_ALL
+#define bcmbal_tm_sched_parent_id_none BCMBAL_TM_SCHED_PARENT_ID_NONE
+#define bcmbal_tm_sched_parent_id_sched_id BCMBAL_TM_SCHED_PARENT_ID_SCHED_ID
+#define bcmbal_tm_sched_parent_id_priority BCMBAL_TM_SCHED_PARENT_ID_PRIORITY
+#define bcmbal_tm_sched_parent_id_weight BCMBAL_TM_SCHED_PARENT_ID_WEIGHT
+#define bcmbal_tm_sched_parent_id_all BCMBAL_TM_SCHED_PARENT_ID_ALL
+#define bcmbal_tm_shaping_id_none BCMBAL_TM_SHAPING_ID_NONE
+#define bcmbal_tm_shaping_id_sbr BCMBAL_TM_SHAPING_ID_SBR
+#define bcmbal_tm_shaping_id_pbr BCMBAL_TM_SHAPING_ID_PBR
+#define bcmbal_tm_shaping_id_burst BCMBAL_TM_SHAPING_ID_BURST
+#define bcmbal_tm_shaping_id_all BCMBAL_TM_SHAPING_ID_ALL
+#define bcmbal_tm_tcont_sla_id_none BCMBAL_TM_TCONT_SLA_ID_NONE
+#define bcmbal_tm_tcont_sla_id_extra_bw_elig BCMBAL_TM_TCONT_SLA_ID_EXTRA_BW_ELIG
+#define bcmbal_tm_tcont_sla_id_nrt_cbr BCMBAL_TM_TCONT_SLA_ID_NRT_CBR
+#define bcmbal_tm_tcont_sla_id_rt_cbr BCMBAL_TM_TCONT_SLA_ID_RT_CBR
+#define bcmbal_tm_tcont_sla_id_rt_profile BCMBAL_TM_TCONT_SLA_ID_RT_PROFILE
+#define bcmbal_tm_tcont_sla_id_nrt_profile BCMBAL_TM_TCONT_SLA_ID_NRT_PROFILE
+#define bcmbal_tm_tcont_sla_id_all BCMBAL_TM_TCONT_SLA_ID_ALL
+
+/** action.
+ */
+typedef struct bcmbal_action
+{
+ bcmbal_action_id presence_mask; /**< Presence Mask. */
+ bcmbal_action_cmd_id cmds_bitmask; /**< Commands bitmask. */
+ uint16_t o_vid; /**< Outer vid. */
+ uint8_t o_pbits; /**< Outer pbits. */
+ uint16_t o_tpid; /**< Outer tpid. */
+ uint16_t i_vid; /**< Inner vid. */
+ uint8_t i_pbits; /**< Inner pbits. */
+ uint16_t i_tpid; /**< Inner tpid. */
+} bcmbal_action;
+
+/** Variable-length list of aggregation_port_id.
+ */
+typedef struct bcmbal_aggregation_port_id_list_u8
+{
+ uint8_t len; /**< List length. */
+ bcmbal_aggregation_port_id *val; /**< List contents. */
+} bcmbal_aggregation_port_id_list_u8;
+
+/** classifier.
+ */
+typedef struct bcmbal_classifier
+{
+ bcmbal_classifier_id presence_mask; /**< Presence Mask. */
+ uint16_t o_tpid; /**< Outer TPID of the packet to be classified */
+ uint16_t o_vid; /**< Outer VID of the packet to be classified */
+ uint16_t i_tpid; /**< Inner TPID of the packet to be classified */
+ uint16_t i_vid; /**< Inner VID of the packet to be classified */
+ uint8_t o_pbits; /**< Outer PBITS of the packet to be classified */
+ uint8_t i_pbits; /**< Inner PBITS of the packet to be classified */
+ uint16_t ether_type; /**< Ethertype of the packet to be classified */
+ bcmos_mac_address dst_mac; /**< Destination MAC address of the packet to be classified */
+ bcmos_mac_address src_mac; /**< Source MAC address of the packet to be classified */
+ uint8_t ip_proto; /**< IP protocol of the packet to be classified */
+ bcmos_ipv4_address dst_ip; /**< Destination IP address of the packet to be classified */
+ bcmos_ipv4_address src_ip; /**< Source IP address of the packet to be classified */
+ uint16_t src_port; /**< Source port of the packet to be classified */
+ uint16_t dst_port; /**< Destination port of the packet to be classified */
+ bcmbal_pkt_tag_type pkt_tag_type; /**< The tag type of the ingress packets */
+} bcmbal_classifier;
+
+/** Packet destination.
+ */
+typedef struct bcmbal_dest
+{
+ bcmbal_dest_type type; /**< packet destination. */
+ union
+ {
+ struct
+ {
+ bcmbal_intf_id int_id; /**< Interface ID. */
+ } nni;
+
+ struct
+ {
+ bcmbal_sub_id sub_term_id; /**< Subscriber terminal ID. */
+ uint16_t sub_term_uni; /**< Subscriber terminal UNI. */
+ uint16_t int_id; /**< Interface ID. */
+ } sub_term;
+ } u;
+} bcmbal_dest;
+
+/** Variable-length list of flow_id.
+ */
+typedef struct bcmbal_flow_id_list_u32
+{
+ uint32_t len; /**< List length. */
+ bcmbal_flow_id *val; /**< List contents. */
+} bcmbal_flow_id_list_u32;
+
+/** Queue Reference
+ */
+typedef struct bcmbal_tm_queue_ref
+{
+ bcmbal_tm_sched_id sched_id; /**< Scheduler (tm_sched) ID */
+ bcmbal_tm_queue_id queue_id; /**< Queue ID */
+} bcmbal_tm_queue_ref;
+
+/** Group Member Info.
+ */
+typedef struct bcmbal_group_member_info
+{
+ bcmbal_intf_id intf_id; /**< Access interface id for this member */
+ bcmbal_service_port_id svc_port_id; /**< The multicast "GEM" for this member */
+ bcmbal_action action; /**< VLAN actions */
+ bcmbal_tm_queue_ref queue; /**< Egress queue */
+} bcmbal_group_member_info;
+
+/** Variable-length list of group_member_info.
+ */
+typedef struct bcmbal_group_member_info_list_u16
+{
+ uint16_t len; /**< List length. */
+ bcmbal_group_member_info *val; /**< List contents. */
+} bcmbal_group_member_info_list_u16;
+
+/** Password.
+ */
+typedef struct bcmbal_password
+{
+ uint8_t arr[10]; /**< Array. */
+} bcmbal_password;
+
+/** Registration id.
+ */
+typedef struct bcmbal_registration_id
+{
+ uint8_t arr[36]; /**< ONU registration ID */
+} bcmbal_registration_id;
+
+/** Serial number.
+ */
+typedef struct bcmbal_serial_number
+{
+ uint8_t vendor_id[4]; /**< vendor id. */
+ uint8_t vendor_specific[4]; /**< vendor specific. */
+} bcmbal_serial_number;
+
+/** Variable-length list of service_port_id.
+ */
+typedef struct bcmbal_service_port_id_list_u8
+{
+ uint8_t len; /**< List length. */
+ bcmbal_service_port_id *val; /**< List contents. */
+} bcmbal_service_port_id_list_u8;
+
+/** SLA.
+ */
+typedef struct bcmbal_sla
+{
+ bcmbal_sla_id presence_mask; /**< Presence Mask. */
+ uint32_t min_rate; /**< The minimal rate for this flow, in kilobits per second (optional) */
+ uint32_t max_rate; /**< The maximum rate for this flow, in kilobits per second (optional) */
+} bcmbal_sla;
+
+/** Variable-length list of sub_id.
+ */
+typedef struct bcmbal_sub_id_list_u16
+{
+ uint16_t len; /**< List length. */
+ bcmbal_sub_id *val; /**< List contents. */
+} bcmbal_sub_id_list_u16;
+
+/** Random Early Discard Configuration
+ */
+typedef struct bcmbal_tm_red
+{
+ bcmbal_percent min_threshold; /**< Min threshold in percent of max queue size */
+ bcmbal_percent max_threshold; /**< Max threshold in percent of max queue size */
+ bcmbal_percent max_probability; /**< Discard probability for occupancy between min_threshold and max_threshold */
+} bcmbal_tm_red;
+
+/** Queue Buffer Admission Control
+ */
+typedef struct bcmbal_tm_bac
+{
+ bcmbal_tm_bac_type type; /**< Buffer Admission Control Type */
+ union
+ {
+ struct
+ {
+ uint32_t max_size; /**< max number of packets in the queue */
+ } taildrop;
+
+ struct
+ {
+ bcmbal_tm_red red; /**< Random Early Discard configuration */
+ } red;
+
+ struct
+ {
+ bcmbal_tm_red green; /**< Green Random Early Discard Configuration */
+ bcmbal_tm_red yellow; /**< Yellow Random Early Discard Configuration */
+ bcmbal_tm_red red; /**< Red Random Early Discard Configuration */
+ } wred;
+ } u;
+} bcmbal_tm_bac;
+
+/** Variable-length list of tm_queue_id.
+ */
+typedef struct bcmbal_tm_queue_id_list_u8
+{
+ uint8_t len; /**< List length. */
+ bcmbal_tm_queue_id *val; /**< List contents. */
+} bcmbal_tm_queue_id_list_u8;
+
+/** Variable-length list of tm_sched_id.
+ */
+typedef struct bcmbal_tm_sched_id_list_u8
+{
+ uint8_t len; /**< List length. */
+ bcmbal_tm_sched_id *val; /**< List contents. */
+} bcmbal_tm_sched_id_list_u8;
+
+/** TM Scheduler Owner
+ */
+typedef struct bcmbal_tm_sched_owner
+{
+ bcmbal_tm_sched_owner_type type; /**< Owner type */
+ union
+ {
+ struct
+ {
+ bcmbal_intf_type intf_type; /**< Interface Type */
+ bcmbal_intf_id intf_id; /**< Interface ID */
+ } interface;
+
+ struct
+ {
+ bcmbal_intf_id intf_id; /**< PON interface id */
+ bcmbal_sub_id sub_term_id; /**< Subscriber terminal ID */
+ } sub_term;
+
+ struct
+ {
+ bcmbal_tm_sched_owner_agg_port_id presence_mask; /**< Presence Mask. */
+ uint8_t intf_id; /**< PON interface id */
+ bcmbal_sub_id sub_term_id; /**< Subscriber terminal id */
+ bcmbal_aggregation_port_id agg_port_id; /**< Aggregation port id */
+ } agg_port;
+
+ struct
+ {
+ uint8_t intf_id; /**< PON interface id */
+ bcmbal_sub_id sub_term_id; /**< Subscriber terminal id */
+ uint8_t idx; /**< Index at subscriber terminal */
+ } uni;
+
+ struct
+ {
+ uint32_t idx; /**< Owner index */
+ } virtual;
+ } u;
+} bcmbal_tm_sched_owner;
+
+/** Scheduling Parent Connect Point
+ */
+typedef struct bcmbal_tm_sched_parent
+{
+ bcmbal_tm_sched_parent_id presence_mask; /**< Presence Mask. */
+ bcmbal_tm_sched_id sched_id; /**< Parent scheduler id */
+ bcmbal_tm_priority priority; /**< Priority */
+ bcmbal_tm_weight weight; /**< Weight */
+} bcmbal_tm_sched_parent;
+
+/** Shaping Parameters
+ */
+typedef struct bcmbal_tm_shaping
+{
+ bcmbal_tm_shaping_id presence_mask; /**< Presence Mask. */
+ uint32_t sbr; /**< Sustained Bit Rate (kbps) */
+ uint32_t pbr; /**< Peak Bit Rate (kbps) */
+ uint32_t burst; /**< Max Burst Bytes at Peak Bit Rate */
+} bcmbal_tm_shaping;
+
+/** ITU-PON Extended SLA Parameters
+ */
+typedef struct bcmbal_tm_tcont_sla
+{
+ bcmbal_tm_tcont_sla_id presence_mask; /**< Presence Mask. */
+ bcmbal_extra_bw_eligibility_type extra_bw_elig; /**< Extra BW eligibility type */
+ uint8_t nrt_cbr; /**< NRT CBR */
+ uint8_t rt_cbr; /**< RT_CBR */
+ uint8_t rt_profile; /**< RT Profile */
+ uint8_t nrt_profile; /**< NRT Profile */
+} bcmbal_tm_tcont_sla;
+
+/** Variable-length list of U8.
+ */
+typedef struct bcmbal_u8_list_u32
+{
+ uint32_t len; /**< List length. */
+ uint8_t *val; /**< List contents. */
+} bcmbal_u8_list_u32;
+
+/** Structure definition for the "key" group of the "access_terminal" object.
+ */
+typedef struct bcmbal_access_terminal_key
+{
+ bcmbal_access_id access_term_id; /**< Reserved (set to 0) */
+} bcmbal_access_terminal_key;
+
+/** Structure definition for the "cfg" group of the "access_terminal" object.
+ */
+typedef struct bcmbal_access_terminal_cfg_data
+{
+ bcmbal_state admin_state; /**< Administrative state */
+ bcmbal_status oper_status; /**< Operational status */
+ bcmbal_iwf_mode iwf_mode; /**< The interworking mode */
+} bcmbal_access_terminal_cfg_data;
+
+/** Transport message definition for "cfg" group of "access_terminal" object.
+ */
+typedef struct bcmbal_access_terminal_cfg
+{
+ bcmbal_cfg hdr; /**< Transport header. */
+ bcmbal_access_terminal_key key; /**< Object key. */
+ bcmbal_access_terminal_cfg_data data; /**< All properties that must be set by the user. */
+} bcmbal_access_terminal_cfg;
+
+/** Structure definition for the "ind" group of the "access_terminal" object.
+ */
+typedef struct bcmbal_access_terminal_ind_data
+{
+ bcmbal_state admin_state; /**< Current administrative state */
+ bcmbal_status oper_status; /**< Current operational status */
+ bcmbal_iwf_mode iwf_mode; /**< The interworking mode */
+} bcmbal_access_terminal_ind_data;
+
+/** Transport message definition for "ind" group of "access_terminal" object.
+ */
+typedef struct bcmbal_access_terminal_ind
+{
+ bcmbal_auto hdr; /**< Transport header. */
+ bcmbal_access_terminal_key key; /**< Object key. */
+ bcmbal_access_terminal_ind_data data; /**< All properties that must be set by the user. */
+} bcmbal_access_terminal_ind;
+
+/** Structure definition for the "key" group of the "flow" object.
+ */
+typedef struct bcmbal_flow_key
+{
+ bcmbal_flow_id flow_id; /**< The ID of the flow object instance being referenced */
+ bcmbal_flow_type flow_type; /**< The type of the flow, Upstream, Downstream, Broadcast or Multicast */
+} bcmbal_flow_key;
+
+/** Structure definition for the "cfg" group of the "flow" object.
+ */
+typedef struct bcmbal_flow_cfg_data
+{
+ bcmbal_state admin_state; /**< Administrative state */
+ bcmbal_status oper_status; /**< Operational status */
+ bcmbal_intf_id access_int_id; /**< The ID of the subscriber side interface; i.e. PON */
+ bcmbal_intf_id network_int_id; /**< The ID of the network side interface; i.e. NNI */
+ bcmbal_sub_id sub_term_id; /**< The ID of the subsccriber terminal device */
+ uint8_t sub_term_uni_idx; /**< The index of the subsccriber terminal uni port the flow is related to */
+ bcmbal_service_port_id svc_port_id; /**< The ID of the service port (for GPON/XGPON - GEM ID) */
+ bcmbal_aggregation_port_id agg_port_id; /**< The ID of the aggregate port (for GPON/XGPON - ALLOC ID) */
+ bcmos_bool resolve_mac; /**< A flag indicating if the MAC address table should be used in DS GEM resolution */
+ bcmbal_classifier classifier; /**< The classifier for this flow */
+ bcmbal_action action; /**< The action associated with the flow */
+ bcmbal_sla sla; /**< SLA parameters for this flow */
+ bcmbal_cookie cookie; /**< Application cookie */
+ uint16_t priority; /**< Priority for this flow in case of multiple match. */
+ bcmbal_group_id group_id; /**< RW - The multicast group associated with this flow, valid for type MULTICAST only */
+ bcmbal_tm_queue_ref queue; /**< Egress queue */
+} bcmbal_flow_cfg_data;
+
+/** Transport message definition for "cfg" group of "flow" object.
+ */
+typedef struct bcmbal_flow_cfg
+{
+ bcmbal_cfg hdr; /**< Transport header. */
+ bcmbal_flow_key key; /**< Object key. */
+ bcmbal_flow_cfg_data data; /**< All properties that must be set by the user. */
+} bcmbal_flow_cfg;
+
+/** Structure definition for the "stat" group of the "flow" object.
+ */
+typedef struct bcmbal_flow_stat_data
+{
+ uint64_t rx_packets; /**< Received packets. */
+ uint64_t rx_bytes; /**< Received bytes. */
+ uint64_t tx_packets; /**< Transmitted packets. */
+ uint64_t tx_bytes; /**< Transmitted bytes. */
+} bcmbal_flow_stat_data;
+
+/** Transport message definition for "stat" group of "flow" object.
+ */
+typedef struct bcmbal_flow_stat
+{
+ bcmbal_stat hdr; /**< Transport header. */
+ bcmbal_flow_key key; /**< Object key. */
+ bcmbal_flow_stat_data data; /**< All properties that must be set by the user. */
+} bcmbal_flow_stat;
+
+/** Structure definition for the "ind" group of the "flow" object.
+ */
+typedef struct bcmbal_flow_ind_data
+{
+ bcmbal_state admin_state; /**< Administrative state */
+ bcmbal_status oper_status; /**< Operational Status */
+ uint16_t access_int_id; /**< The ID of the subscriber side interface; i.e. PON */
+ uint16_t network_int_id; /**< The ID of the network side interface; i.e. NNI */
+ uint32_t sub_term_id; /**< The ID of the subsccriber terminal device */
+ uint16_t svc_port_id; /**< The ID of the service port (for GPON/XGPON - GEM ID) */
+ uint16_t agg_port_id; /**< The ID of the aggregate port (for GPON/XGPON - ALLOC ID) */
+ bcmos_bool resolve_mac; /**< A flag indicating if the MAC address table should be used in DS GEM resolution */
+ uint16_t base_tc_id; /**< The base index of the TC object(s) to be used for this flow */
+ bcmbal_classifier classifier; /**< The classifier for this flow */
+ bcmbal_action action; /**< The action associated with the flow */
+ bcmbal_sla sla; /**< SLA parameters for this flow */
+ uint32_t cookie; /**< Application cookie */
+ uint16_t priority; /**< Priority for this flow in case of multiple match. */
+} bcmbal_flow_ind_data;
+
+/** Transport message definition for "ind" group of "flow" object.
+ */
+typedef struct bcmbal_flow_ind
+{
+ bcmbal_auto hdr; /**< Transport header. */
+ bcmbal_flow_key key; /**< Object key. */
+ bcmbal_flow_ind_data data; /**< All properties that must be set by the user. */
+} bcmbal_flow_ind;
+
+/** Structure definition for the "key" group of the "group" object.
+ */
+typedef struct bcmbal_group_key
+{
+ bcmbal_group_id group_id; /**< The ID of the group object instance being referenced */
+} bcmbal_group_key;
+
+/** Structure definition for the "cfg" group of the "group" object.
+ */
+typedef struct bcmbal_group_cfg_data
+{
+ bcmbal_group_member_cmd members_cmd; /**< Membership operation commands. */
+ bcmbal_group_member_info_list_u16 members; /**< The list of members associated with this group */
+ bcmbal_cookie cookie; /**< Application cookie */
+ bcmbal_flow_id_list_u32 flows; /**< List of flows associated with this group */
+ bcmbal_group_owner owner; /**< Owner of the group. */
+} bcmbal_group_cfg_data;
+
+/** Transport message definition for "cfg" group of "group" object.
+ */
+typedef struct bcmbal_group_cfg
+{
+ bcmbal_cfg hdr; /**< Transport header. */
+ bcmbal_group_key key; /**< Object key. */
+ bcmbal_group_cfg_data data; /**< All properties that must be set by the user. */
+} bcmbal_group_cfg;
+
+/** Structure definition for the "key" group of the "interface" object.
+ */
+typedef struct bcmbal_interface_key
+{
+ uint32_t intf_id; /**< intf_id. */
+ bcmbal_intf_type intf_type; /**< intf_type. */
+} bcmbal_interface_key;
+
+/** Structure definition for the "cfg" group of the "interface" object.
+ */
+typedef struct bcmbal_interface_cfg_data
+{
+ bcmbal_state admin_state; /**< Administrative state */
+ bcmbal_status oper_status; /**< Operational status */
+ bcmbal_aggregation_port_id min_data_agg_port_id; /**< The minimum agg_port_id that is allowed in the system */
+ bcmbal_service_port_id min_data_svc_port_id; /**< The minimum svc_port_id that is allowed in the system */
+ bcmbal_trx_type transceiver_type; /**< The transceiver type used on an interface */
+ bcmbal_ds_miss_mode ds_miss_mode; /**< Defines the action to take for unknown downstream packets */
+ uint16_t mtu; /**< The MTU for an interface */
+ bcmbal_control flow_control; /**< Flow control enable or disable */
+ bcmbal_tm_sched_id ds_tm; /**< Downstream scheduler and shaper */
+ bcmbal_tm_sched_id us_tm; /**< Upstream scheduler and shaper */
+ bcmbal_sub_id_list_u16 sub_term_id_list; /**< A list of subscriber terminal ids configured on this interface */
+} bcmbal_interface_cfg_data;
+
+/** Transport message definition for "cfg" group of "interface" object.
+ */
+typedef struct bcmbal_interface_cfg
+{
+ bcmbal_cfg hdr; /**< Transport header. */
+ bcmbal_interface_key key; /**< Object key. */
+ bcmbal_interface_cfg_data data; /**< All properties that must be set by the user. */
+} bcmbal_interface_cfg;
+
+/** Structure definition for the "stat" group of the "interface" object.
+ */
+typedef struct bcmbal_interface_stat_data
+{
+ uint64_t rx_packets; /**< Recieved packets. */
+ uint64_t rx_bytes; /**< Received bytes. */
+ uint64_t tx_packets; /**< Transmitted packets. */
+ uint64_t tx_bytes; /**< Transmitted bytes. */
+} bcmbal_interface_stat_data;
+
+/** Transport message definition for "stat" group of "interface" object.
+ */
+typedef struct bcmbal_interface_stat
+{
+ bcmbal_stat hdr; /**< Transport header. */
+ bcmbal_interface_key key; /**< Object key. */
+ bcmbal_interface_stat_data data; /**< All properties that must be set by the user. */
+} bcmbal_interface_stat;
+
+/** Structure definition for the "ind" group of the "interface" object.
+ */
+typedef struct bcmbal_interface_ind_data
+{
+ bcmbal_state admin_state; /**< Current administrative state */
+ bcmbal_status oper_status; /**< Current operational state */
+ uint16_t min_data_agg_port_id; /**< The minimum agg_port_id that is allowed in the system */
+ uint16_t min_data_svc_port_id; /**< The minimum svc_port_id that is allowed in the system */
+ bcmbal_trx_type transceiver_type; /**< The transceiver type used on an interface */
+ bcmbal_ds_miss_mode ds_miss_mode; /**< Defines the action to take for DS unknown packets */
+ uint16_t mtu; /**< The MTU for an interface */
+ bcmbal_control flow_control; /**< Flow control enable or disable */
+ bcmbal_tm_sched_id ds_tm; /**< Downstream scheduler and shaper */
+ bcmbal_tm_sched_id us_tm; /**< Upstream scheduler and shaper */
+} bcmbal_interface_ind_data;
+
+/** Transport message definition for "ind" group of "interface" object.
+ */
+typedef struct bcmbal_interface_ind
+{
+ bcmbal_auto hdr; /**< Transport header. */
+ bcmbal_interface_key key; /**< Object key. */
+ bcmbal_interface_ind_data data; /**< All properties that must be set by the user. */
+} bcmbal_interface_ind;
+
+/** Structure definition for the "key" group of the "packet" object.
+ */
+typedef struct bcmbal_packet_key
+{
+ uint32_t reserved; /**< Reserved key field. */
+ bcmbal_dest packet_send_dest; /**< Packet destination. */
+} bcmbal_packet_key;
+
+/** Structure definition for the "cfg" group of the "packet" object.
+ */
+typedef struct bcmbal_packet_cfg_data
+{
+ bcmbal_flow_id flow_id; /**< N/A for sending a packet */
+ bcmbal_flow_type flow_type; /**< Flow Type. */
+ bcmbal_intf_id intf_id; /**< Interface ID. */
+ bcmbal_intf_type intf_type; /**< Interface Type. */
+ bcmbal_service_port_id svc_port; /**< N/A for sending a packet */
+ bcmbal_cookie flow_cookie; /**< N/A for sending a packet */
+ bcmbal_u8_list_u32 pkt; /**< Packet Data. */
+} bcmbal_packet_cfg_data;
+
+/** Transport message definition for "cfg" group of "packet" object.
+ */
+typedef struct bcmbal_packet_cfg
+{
+ bcmbal_cfg hdr; /**< Transport header. */
+ bcmbal_packet_key key; /**< Object key. */
+ bcmbal_packet_cfg_data data; /**< All properties that must be set by the user. */
+} bcmbal_packet_cfg;
+
+/** Structure definition for the "ind" group of the "packet" object.
+ */
+typedef struct bcmbal_packet_ind_data
+{
+ bcmbal_flow_id flow_id; /**< N/A for sending a packet */
+ bcmbal_flow_type flow_type; /**< Flow Type. */
+ bcmbal_intf_id intf_id; /**< Interface ID. */
+ bcmbal_intf_type intf_type; /**< Interface Type. */
+ bcmbal_service_port_id svc_port; /**< N/A for sending a packet */
+ bcmbal_cookie flow_cookie; /**< N/A for sending a packet */
+ bcmbal_u8_list_u32 pkt; /**< Packet Data. */
+} bcmbal_packet_ind_data;
+
+/** Transport message definition for "ind" group of "packet" object.
+ */
+typedef struct bcmbal_packet_ind
+{
+ bcmbal_auto hdr; /**< Transport header. */
+ bcmbal_packet_key key; /**< Object key. */
+ bcmbal_packet_ind_data data; /**< All properties that must be set by the user. */
+} bcmbal_packet_ind;
+
+/** Structure definition for the "key" group of the "subscriber_terminal"
+ * object.
+ */
+typedef struct bcmbal_subscriber_terminal_key
+{
+ bcmbal_sub_id sub_term_id; /**< sub_term_id. */
+ bcmbal_intf_id intf_id; /**< intf_id. */
+} bcmbal_subscriber_terminal_key;
+
+/** Structure definition for the "cfg" group of the "subscriber_terminal"
+ * object.
+ */
+typedef struct bcmbal_subscriber_terminal_cfg_data
+{
+ bcmbal_state admin_state; /**< Administrative state */
+ bcmbal_status oper_status; /**< Operational status */
+ bcmbal_serial_number serial_number; /**< The serial number of an ITU PON (GPON/XG-PON1/XGS-PON/NG-PON2) subscriber terminal */
+ bcmbal_password password; /**< The password of a GPON subscriber terminal */
+ bcmbal_registration_id registration_id; /**< ONU registration ID of an ITU PON (XG-PON1/XGS-PON/NG-PON2) subscriber terminal */
+ bcmbal_service_port_id svc_port_id; /**< The management service port ID (for PON, the ONU ID) */
+ bcmos_mac_address mac_address; /**< The Ethernet MAC address of an EPON subscriber terminal */
+ bcmbal_tm_sched_id ds_tm; /**< Downstream scheduler and shaper */
+ bcmbal_tm_sched_id us_tm; /**< Upstream scheduler and shaper */
+ bcmbal_service_port_id_list_u8 svc_port_id_list; /**< A list of bearer traffic svc_port_ids associated with this subscriber terminal */
+ bcmbal_aggregation_port_id_list_u8 agg_port_id_list; /**< A list of aggr_port_ids associated with this subscriber terminal */
+} bcmbal_subscriber_terminal_cfg_data;
+
+/** Transport message definition for "cfg" group of "subscriber_terminal"
+ * object.
+ */
+typedef struct bcmbal_subscriber_terminal_cfg
+{
+ bcmbal_cfg hdr; /**< Transport header. */
+ bcmbal_subscriber_terminal_key key; /**< Object key. */
+ bcmbal_subscriber_terminal_cfg_data data; /**< All properties that must be set by the user. */
+} bcmbal_subscriber_terminal_cfg;
+
+/** Structure definition for the "stat" group of the "subscriber_terminal"
+ * object.
+ */
+typedef struct bcmbal_subscriber_terminal_stat_data
+{
+ uint64_t rx_packets; /**< Received packets on specified object */
+ uint64_t rx_bytes; /**< Received bytes on specified object */
+ uint64_t tx_packets; /**< Transmitted packets on specified object */
+ uint64_t tx_bytes; /**< Transmittted bytes on specified object */
+} bcmbal_subscriber_terminal_stat_data;
+
+/** Transport message definition for "stat" group of "subscriber_terminal"
+ * object.
+ */
+typedef struct bcmbal_subscriber_terminal_stat
+{
+ bcmbal_stat hdr; /**< Transport header. */
+ bcmbal_subscriber_terminal_key key; /**< Object key. */
+ bcmbal_subscriber_terminal_stat_data data; /**< All properties that must be set by the user. */
+} bcmbal_subscriber_terminal_stat;
+
+/** Structure definition for the "ind" group of the "subscriber_terminal"
+ * object.
+ */
+typedef struct bcmbal_subscriber_terminal_ind_data
+{
+ bcmbal_state admin_state; /**< Current administrative state */
+ bcmbal_status oper_status; /**< Current operational status */
+ bcmbal_serial_number serial_number; /**< The serial number of an ITU PON (GPON/XG-PON1/XGS-PON/NG-PON2) subscriber terminal */
+ bcmbal_password password; /**< The password of a GPON subscriber terminal */
+ bcmbal_registration_id registration_id; /**< ONU registration ID of an ITU PON (XG-PON1/XGS-PON/NG-PON2) subscriber terminal */
+ uint16_t svc_port_id; /**< The service port ID (for PON, the ONU ID) */
+ bcmos_mac_address mac_address; /**< The Ethernet MAC address of an epon subscriber terminal */
+ bcmbal_tm_sched_id ds_tm; /**< Downstream scheduler and shaper */
+ bcmbal_tm_sched_id us_tm; /**< Upstream scheduler and shaper */
+} bcmbal_subscriber_terminal_ind_data;
+
+/** Transport message definition for "ind" group of "subscriber_terminal"
+ * object.
+ */
+typedef struct bcmbal_subscriber_terminal_ind
+{
+ bcmbal_auto hdr; /**< Transport header. */
+ bcmbal_subscriber_terminal_key key; /**< Object key. */
+ bcmbal_subscriber_terminal_ind_data data; /**< All properties that must be set by the user. */
+} bcmbal_subscriber_terminal_ind;
+
+/** Structure definition for the "key" group of the "tm_queue" object.
+ */
+typedef struct bcmbal_tm_queue_key
+{
+ bcmbal_tm_sched_id sched_id; /**< Scheduler that owns the queue */
+ bcmbal_tm_sched_dir sched_dir; /**< sched dir. */
+ bcmbal_tm_queue_id id; /**< Queue id */
+} bcmbal_tm_queue_key;
+
+/** Structure definition for the "cfg" group of the "tm_queue" object.
+ */
+typedef struct bcmbal_tm_queue_cfg_data
+{
+ bcmbal_tm_priority priority; /**< Scheduling priority */
+ bcmbal_tm_weight weight; /**< Scheduling weight */
+ bcmbal_tm_shaping rate; /**< Rate shaping parameters */
+ bcmbal_tm_bac bac; /**< Buffer admission control */
+ bcmbal_tm_creation_mode creation_mode; /**< Creation mode */
+ uint8_t ref_count; /**< reference count (flows) */
+} bcmbal_tm_queue_cfg_data;
+
+/** Transport message definition for "cfg" group of "tm_queue" object.
+ */
+typedef struct bcmbal_tm_queue_cfg
+{
+ bcmbal_cfg hdr; /**< Transport header. */
+ bcmbal_tm_queue_key key; /**< Object key. */
+ bcmbal_tm_queue_cfg_data data; /**< All properties that must be set by the user. */
+} bcmbal_tm_queue_cfg;
+
+/** Structure definition for the "stat" group of the "tm_queue" object.
+ */
+typedef struct bcmbal_tm_queue_stat_data
+{
+ uint64_t packets_ok; /**< Packets transmitted succewssfully */
+ uint64_t bytes_ok; /**< Bytes transmitted successfully */
+ uint64_t packets_discarded; /**< Packets discarded */
+ uint64_t bytes_discarded; /**< Bytes discarded */
+} bcmbal_tm_queue_stat_data;
+
+/** Transport message definition for "stat" group of "tm_queue" object.
+ */
+typedef struct bcmbal_tm_queue_stat
+{
+ bcmbal_stat hdr; /**< Transport header. */
+ bcmbal_tm_queue_key key; /**< Object key. */
+ bcmbal_tm_queue_stat_data data; /**< All properties that must be set by the user. */
+} bcmbal_tm_queue_stat;
+
+/** Structure definition for the "ind" group of the "tm_queue" object.
+ *
+ * Tm Queue Indication
+ */
+typedef struct bcmbal_tm_queue_ind_data
+{
+ uint32_t ret; /**< ret */
+} bcmbal_tm_queue_ind_data;
+
+/** Transport message definition for "ind" group of "tm_queue" object.
+ */
+typedef struct bcmbal_tm_queue_ind
+{
+ bcmbal_auto hdr; /**< Transport header. */
+ bcmbal_tm_queue_key key; /**< Object key. */
+ bcmbal_tm_queue_ind_data data; /**< All properties that must be set by the user. */
+} bcmbal_tm_queue_ind;
+
+/** Structure definition for the "key" group of the "tm_sched" object.
+ */
+typedef struct bcmbal_tm_sched_key
+{
+ bcmbal_tm_sched_dir dir; /**< Traffic direction */
+ bcmbal_tm_sched_id id; /**< ID */
+} bcmbal_tm_sched_key;
+
+/** Structure definition for the "cfg" group of the "tm_sched" object.
+ */
+typedef struct bcmbal_tm_sched_cfg_data
+{
+ bcmbal_tm_sched_owner owner; /**< owner. */
+ bcmbal_tm_sched_type sched_type; /**< Scheduler type */
+ bcmbal_tm_sched_parent sched_parent; /**< Scheduling parameters for parent scheduler */
+ bcmbal_tm_sched_child_type sched_child_type; /**< Scheduling level for children tm */
+ bcmbal_tm_shaping rate; /**< Rate shaping parameters */
+ bcmbal_tm_tcont_sla tcont_sla; /**< Additional SLA parameters for agg_port owner */
+ bcmbal_tm_creation_mode creation_mode; /**< Creation mode */
+ bcmbal_tm_queue_id_list_u8 queues; /**< Subsidiary queues */
+ bcmbal_tm_sched_id_list_u8 sub_scheds; /**< Subsidiary schedulers */
+ uint8_t num_priorities; /**< Max number of strict priority scheduling elements */
+} bcmbal_tm_sched_cfg_data;
+
+/** Transport message definition for "cfg" group of "tm_sched" object.
+ */
+typedef struct bcmbal_tm_sched_cfg
+{
+ bcmbal_cfg hdr; /**< Transport header. */
+ bcmbal_tm_sched_key key; /**< Object key. */
+ bcmbal_tm_sched_cfg_data data; /**< All properties that must be set by the user. */
+} bcmbal_tm_sched_cfg;
+
+/** Structure definition for the "ind" group of the "tm_sched" object.
+ *
+ * Tm Sched Indication
+ */
+typedef struct bcmbal_tm_sched_ind_data
+{
+ uint32_t ret; /**< ret */
+} bcmbal_tm_sched_ind_data;
+
+/** Transport message definition for "ind" group of "tm_sched" object.
+ */
+typedef struct bcmbal_tm_sched_ind
+{
+ bcmbal_auto hdr; /**< Transport header. */
+ bcmbal_tm_sched_key key; /**< Object key. */
+ bcmbal_tm_sched_ind_data data; /**< All properties that must be set by the user. */
+} bcmbal_tm_sched_ind;
+
+/** @} */
+#endif /* BAL_MODEL_TYPES */
diff --git a/bal_release/src/common/include/bal_msg.h b/bal_release/src/common/include/bal_msg.h
new file mode 100644
index 0000000..4ea85c5
--- /dev/null
+++ b/bal_release/src/common/include/bal_msg.h
@@ -0,0 +1,349 @@
+/******************************************************************************
+ *
+ * <:copyright-BRCM:2016:DUAL/GPL:standard
+ *
+ * Copyright (c) 2016 Broadcom
+ * All Rights Reserved
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed
+ * to you under the terms of the GNU General Public License version 2
+ * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+ * with the following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give
+ * you permission to link this software with independent modules, and
+ * to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent
+ * module, the terms and conditions of the license of that module.
+ * An independent module is a module which is not derived from this
+ * software. The special exception does not apply to any modifications
+ * of the software.
+ *
+ * Not withstanding the above, under no circumstances may you combine
+ * this software in any way with any other Broadcom software provided
+ * under a license other than the GPL, without Broadcom's express prior
+ * written consent.
+ *
+ * :>
+ *
+ *****************************************************************************/
+
+/* Define the top level Doxygen groups. */
+
+/**
+ * @defgroup core BAL Core Engine
+ *
+ * @defgroup apps BAL Utils
+ *
+ * @defgroup lib BAL Libraries
+ *
+ */
+
+/**
+ * @file bal_msg.h
+ *
+ * @brief Include files and miscellaneous macros for the BAL messaging
+ *
+ */
+
+#ifndef BALMSG_H
+#define BALMSG_H
+
+#include <bal_objs.h>
+#include <bal_msg_type.h>
+
+
+/*******************************************************************
+ **
+ ** BAL message header helpers
+ **
+ *******************************************************************
+ */
+
+/*
+ * Underlying msg_send timeout units in uS (micro seconds)
+ */
+#define BCMBAL_MSG_TIMEOUT_1_SEC (1000000)
+
+/*
+ * Get a pointer to the message payload given the bcmos_msg pointer
+ */
+static inline void *bcmbal_payload_ptr_get(bal_comm_msg_hdr *_m)
+{
+ /* payload starts from BAL communication header */
+ return (void *)_m;
+}
+
+/*
+ * Get a pointer to the BAL header given the message payload pointer
+ */
+static inline bal_comm_msg_hdr *bcmbal_bal_hdr_get(void *_msg_payload_ptr)
+{
+ /* payload starts from BAL communication header */
+ return (bal_comm_msg_hdr *)_msg_payload_ptr;
+}
+
+/*
+ * Get a pointer to the BAL header given the bcmos header pointer
+ */
+static inline bal_comm_msg_hdr *bcmbal_bal_hdr_get_by_bcmos_hdr(bcmos_msg *m)
+{
+ return container_of(m, bal_comm_msg_hdr, m);
+}
+
+/*
+ * Get a pointer to the BCMOS header given the message payload pointer
+ */
+static inline bcmos_msg *bcmbal_bcmos_hdr_get(void *_msg_payload_ptr)
+{
+ return &(bcmbal_bal_hdr_get(_msg_payload_ptr)->m);
+}
+
+/*
+ * Set the BAL header parameters given the message payload pointer
+ */
+static inline void bcmbal_msg_hdr_set(void *_msg_payload_ptr,
+ bcmos_msg_id _type_major,
+ bcmbal_msg_type _type_minor,
+ bal_subsystem _sender_subsys,
+ bcmbal_obj_id _msg_id_obj,
+ uint16_t _msg_id_oper,
+ uint32_t _ex_id)
+{
+ bcmos_msg *os_msg = bcmbal_bcmos_hdr_get(_msg_payload_ptr);
+ bal_comm_msg_hdr *bal_hdr = bcmbal_bal_hdr_get(_msg_payload_ptr);
+
+ /*
+ * set up the bcmos_msg header fields
+ */
+ os_msg->data = (void *)((char *)(bcmbal_bcmos_hdr_get(_msg_payload_ptr)) + sizeof(bcmos_msg));
+ os_msg->start = os_msg->data;
+ os_msg->type = _type_major;
+ os_msg->instance = 0;
+ os_msg->sender = BCMOS_MODULE_ID_NONE; /* doesn't matter */
+
+ /*
+ * set up the bal msg header fields
+ */
+ bal_hdr->version_major = BAL_HDR_VERSION_MAJOR;
+ bal_hdr->version_minor = BAL_HDR_VERSION_MINOR;
+ bal_hdr->msg_type = _type_minor;
+ bal_hdr->msg_id = ((bal_hdr->msg_id & 0x0000FFFF) | ((_msg_id_oper & 0x0000FFFF) << 16));
+ bal_hdr->msg_id = ((bal_hdr->msg_id & 0xFFFF0000) | (_msg_id_obj & 0x0000FFFF));
+ bal_hdr->ex_id = _ex_id;
+ bal_hdr->sender = _sender_subsys;
+ bal_hdr->timestamp = bcmos_timestamp();
+}
+
+/*
+ * Get the sender field in the BAL header given the message pointer
+ */
+static inline bal_subsystem bcmbal_sender_get(void *_msg_payload_ptr)
+{
+ return bcmbal_bal_hdr_get(_msg_payload_ptr)->sender;
+}
+
+/*
+ * Set the sender field in the BAL header given the message pointer
+ */
+static inline void bcmbal_sender_set(void *_msg_payload_ptr, bal_subsystem _sender_subsys)
+{
+ bcmbal_bal_hdr_get(_msg_payload_ptr)->sender = _sender_subsys;
+}
+
+/*
+ * Get the top level type field in the BAL header given the message pointer
+ */
+static inline bcmos_msg_id bcmbal_type_major_get(void *_msg_payload_ptr)
+{
+ return bcmbal_bcmos_hdr_get(_msg_payload_ptr)->type;
+}
+
+/*
+ * Set the top level type field in the BAL header given the message pointer
+ */
+static inline void bcmbal_type_major_set(void *_msg_payload_ptr, bcmos_msg_id _type_major)
+{
+ bcmbal_bcmos_hdr_get(_msg_payload_ptr)->type = _type_major;
+}
+
+/*
+ * Get the inner type field in the BAL header given the message pointer
+ */
+static inline bcmbal_msg_type bcmbal_type_minor_get(void *_msg_payload_ptr)
+{
+ return bcmbal_bal_hdr_get(_msg_payload_ptr)->msg_type;
+}
+
+/*
+ * Set the inner type field in the BAL header given the message pointer
+ */
+static inline void bcmbal_type_minor_set(void *_msg_payload_ptr, bcmbal_msg_type _type_minor)
+{
+ bcmbal_bal_hdr_get(_msg_payload_ptr)->msg_type = _type_minor;
+}
+
+
+/*
+ * Get the msg_id_oper field in the BAL header given the message pointer
+ */
+static inline uint16_t bcmbal_msg_id_oper_get(void *_msg_payload_ptr)
+{
+ return ((bcmbal_bal_hdr_get(_msg_payload_ptr)->msg_id & 0xFFFF0000) >> 16);
+}
+
+/*
+ * Set the msg_id_oper field in the BAL header given the message pointer
+ */
+static inline void bcmbal_msg_id_oper_set(void *_msg_payload_ptr, uint16_t _msg_id_oper)
+{
+ bcmbal_bal_hdr_get(_msg_payload_ptr)->msg_id =
+ ((bcmbal_bal_hdr_get(_msg_payload_ptr)->msg_id & 0x0000FFFF) | ((_msg_id_oper & 0x0000FFFF) << 16));
+}
+
+/*
+ * Get the msg_id_obj field in the BAL header given the message pointer
+ */
+static inline bcmbal_obj_id bcmbal_msg_id_obj_get(void *_msg_payload_ptr)
+{
+ return (bcmbal_bal_hdr_get(_msg_payload_ptr)->msg_id & 0x0000FFFF );
+}
+
+/*
+ * Set the msg_id_obj field in the BAL header given the message pointer
+ */
+static inline void bcmbal_msg_id_obj_set(void *_msg_payload_ptr, bcmbal_obj_id _msg_id_obj)
+{
+ bcmbal_bal_hdr_get(_msg_payload_ptr)->msg_id =
+ ((bcmbal_bal_hdr_get(_msg_payload_ptr)->msg_id & 0xFFFF0000) | (_msg_id_obj & 0x0000FFFF));
+}
+
+/*
+ * Get the ex_id field in the BAL header given the message pointer
+ */
+static inline uint32_t bcmbal_ex_id_get(void *_msg_payload_ptr)
+{
+ return bcmbal_bal_hdr_get(_msg_payload_ptr)->ex_id;
+}
+
+/*
+ * Set the ex_id field in the BAL header given the message pointer
+ */
+static inline void bcmbal_ex_id_set(void *_msg_payload_ptr, uint32_t _ex_id)
+{
+ bcmbal_bal_hdr_get(_msg_payload_ptr)->ex_id = _ex_id;
+}
+
+/*
+ * Get the major version field in the BAL header given the message pointer
+ */
+static inline uint16_t bcmbal_major_version_get(void *_msg_payload_ptr)
+{
+ return bcmbal_bal_hdr_get(_msg_payload_ptr)->version_major;
+}
+
+/*
+ * Set the major version field in the BAL header given the message pointer
+ */
+static inline void bcmbal_major_version_set(void *_msg_payload_ptr, uint16_t _version_major)
+{
+ bcmbal_bal_hdr_get(_msg_payload_ptr)->version_major = _version_major;
+}
+
+/*
+ * Get the minor version field in the BAL header given the message pointer
+ */
+static inline uint16_t bcmbal_minor_version_get(void *_msg_payload_ptr)
+{
+ return bcmbal_bal_hdr_get(_msg_payload_ptr)->version_minor;
+}
+
+/*
+ * Set the minor version field in the BAL header given the message pointer
+ */
+static inline void bcmbal_minor_version_set(void *_msg_payload_ptr, uint16_t _version_major)
+{
+ bcmbal_bal_hdr_get(_msg_payload_ptr)->version_major = _version_major;
+}
+
+/*
+ * Get the scratchpad field in the BAL header given the message pointer
+ */
+static inline void *bcmbal_scratchpad_get(void *_msg_payload_ptr)
+{
+ return bcmbal_bal_hdr_get(_msg_payload_ptr)->scratchpad;
+}
+
+/*
+ * Set the scratchpad field in the BAL header given the message pointer
+ */
+static inline void bcmbal_scratchpad_set(void *_msg_payload_ptr, void *_scratchpad)
+{
+ bcmbal_bal_hdr_get(_msg_payload_ptr)->scratchpad = _scratchpad;
+}
+
+/*
+ * Allocate a BAL message given the payload pointer
+ */
+static inline void *bcmbal_msg_calloc(uint32_t _msg_payload_size)
+{
+ /* Payload includes comm header */
+ bal_comm_msg_hdr *m = bcmos_calloc(_msg_payload_size);
+ if (NULL == m)
+ return NULL;
+ return bcmbal_payload_ptr_get(m);
+}
+
+/*
+ * Free a BAL message given the payload pointer
+ */
+static inline void bcmbal_msg_free(void *msg)
+{
+ return bcmos_msg_free(bcmbal_bcmos_hdr_get(msg));
+}
+
+/*
+ * External functions implemented in bal_msg.c
+ */
+
+/*
+ * Clone BAL message
+ * Returns payload_ptr of the clone
+ */
+void *bcmbal_msg_clone(void *bal_obj);
+
+/*
+ * Send a BAL message given the payload pointer
+ */
+bcmos_errno bcmbal_msg_send(bcmos_msg_queue *queue, void *msg_payload, bcmos_msg_send_flags flags);
+
+/*
+ * Call callback in the context of the target module and pass it the BAL message pointer
+ */
+bcmos_errno bcmbal_msg_call(void *msg_payload, bcmos_module_id module, F_bcmos_msg_handler cb, bcmos_msg_send_flags flags);
+
+/*
+ * Receive a BAL message given the payload pointer
+ *
+ * NOTE: The timeout argument is in units of uS (micro seconds). Use the #defined timeout values above.
+ *
+ */
+bcmos_errno bcmbal_msg_recv(bcmos_msg_queue *queue, uint32_t timeout, void **msg_payload);
+
+/** Get packed bal_comm_msg_hdr length */
+int32_t bcmbal_bal_msg_hdr_get_packed_length(void);
+
+/** Pack a BAL message header to a byte stream */
+bcmos_errno bcmbal_bal_msg_hdr_pack(const bal_comm_msg_hdr *msg, bcmbal_buf *buf);
+
+/** Unpack a BAL message header from a byte stream */
+bcmos_errno bcmbal_bal_msg_hdr_unpack(bal_comm_msg_hdr *msg, bcmbal_buf *buf);
+
+/** Peek exchange_id in the received message without unpacking */
+bcmos_errno bcmbal_bal_msg_peek_ex_id(bcmos_msg *msg, uint32_t *ex_id);
+
+#endif /* #ifndef BALMSG_H */
+
+
+
diff --git a/bal_release/src/common/include/bal_msg_type.h b/bal_release/src/common/include/bal_msg_type.h
new file mode 100644
index 0000000..38e98c6
--- /dev/null
+++ b/bal_release/src/common/include/bal_msg_type.h
@@ -0,0 +1,57 @@
+/******************************************************************************
+ *
+ * <:copyright-BRCM:2016:DUAL/GPL:standard
+ *
+ * Copyright (c) 2016 Broadcom
+ * All Rights Reserved
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed
+ * to you under the terms of the GNU General Public License version 2
+ * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+ * with the following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give
+ * you permission to link this software with independent modules, and
+ * to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent
+ * module, the terms and conditions of the license of that module.
+ * An independent module is a module which is not derived from this
+ * software. The special exception does not apply to any modifications
+ * of the software.
+ *
+ * Not withstanding the above, under no circumstances may you combine
+ * this software in any way with any other Broadcom software provided
+ * under a license other than the GPL, without Broadcom's express prior
+ * written consent.
+ *
+ * :>
+ *
+ *****************************************************************************/
+
+#ifndef _BAL_MSG_TYPE_H_
+#define _BAL_MSG_TYPE_H_
+
+/*
+ * * The BAL message subtype
+ * */
+typedef enum
+{
+ BAL_MSG_TYPE_REQ,
+ BAL_MSG_TYPE_RSP,
+ BAL_MSG_TYPE_ACK,
+ BAL_MSG_TYPE_IND, /**< An INDication message generated as a part of a protocol exchange */
+ BAL_MSG_TYPE_AUTO_IND, /**< An asynchronous autonomous INDication message */
+} bcmbal_msg_type;
+
+static __attribute__ ((unused)) char *bcmbal_msg_t_str[] =
+{
+ "BAL_MSG_REQ",
+ "BAL_MSG_RSP",
+ "BAL_MSG_ACK",
+ "BAL_MSG_IND", /**< An INDication message generated as a part of a protocol exchange */
+ "BAL_MSG_AUTO_IND" /**< An asynchronous autonomous INDication message */
+};
+
+
+#endif
diff --git a/bal_release/src/common/include/bal_obj.h b/bal_release/src/common/include/bal_obj.h
new file mode 100644
index 0000000..24e8ec2
--- /dev/null
+++ b/bal_release/src/common/include/bal_obj.h
@@ -0,0 +1,205 @@
+#ifndef BAL_OBJ
+#define BAL_OBJ
+
+#include <bcmos_system.h>
+#include <bcmos_errno.h>
+#include "bal_model_ids.h"
+#include "bal_buf.h"
+#include "bal_msg_type.h"
+
+/*
+ * The current BAL header version
+ */
+#define BAL_HDR_VERSION_MAJOR (1)
+#define BAL_HDR_VERSION_MINOR (1)
+
+/*
+ * The BAL common message header
+ */
+typedef struct bal_comm_msg_hdr
+{
+ bcmos_msg m; /**< bcmos message header */
+ uint16_t version_major; /**< Header Major version number */
+ uint16_t version_minor; /**< Header Minor version number */
+ bcmbal_msg_type msg_type; /**< Request / Response / Ack / Indication */
+ uint32_t msg_id; /**< Message ID – the ID of the message (subID under the message type) */
+ uint32_t ex_id; /**< Exchange ID for message tracking between endpoints */
+ bal_subsystem sender; /**< Sender subsystem - used for additional validation */
+ uint32_t timestamp; /**< Timestamp when the message was sent */
+ bcmos_sem sem; /**< Semaphore used for inter-thread communication */
+ void* scratchpad; /**< Scratchpad used for inter-thread communication */
+ uint8_t payload[]; /**< Payload follows the header */
+} bal_comm_msg_hdr;
+
+/** Version of Object definitions */
+#define BCMBAL_OBJ_VERSION 2 /**< The current version number */
+typedef uint32_t bcmbal_object_ver; /**< The attribute type in the object info structure */
+
+/** Bitmask of object attributes that are specified in an object (1 = specified, 0 = not specified) */
+typedef uint64_t bcmbal_presence_mask;
+
+/** Presence mask indicating all fields present */
+#define BCMBAL_PRESENCE_MASK_ALL ((bcmbal_presence_mask)0xFFFFFFFFFFFFFFFF)
+
+/** Helper type to determine what the data format of a message should look like */
+typedef enum bcmbal_mgt_group
+{
+ BCMBAL_MGT_GROUP_KEY, /**< Key that uniquely identifies object instance */
+ BCMBAL_MGT_GROUP_CFG, /**< Configuration (get/set/clear) */
+ BCMBAL_MGT_GROUP_STAT, /**< Statistics */
+ BCMBAL_MGT_GROUP_AUTO, /**< Autonomous indications */
+ BCMBAL_MGT_GROUP_AUTO_CFG, /**< Autonomous indication configuration */
+ BCMBAL_MGT_GROUP__NUM_OF
+} bcmbal_mgt_group;
+
+/** Object message type. Can be a combination of flags. */
+typedef enum bcmbal_obj_msg_type
+{
+ BCMBAL_OBJ_MSG_TYPE_GET = 0x01, /**< Get configuration parameters */
+ BCMBAL_OBJ_MSG_TYPE_SET = 0x02, /**< Set configuration parameters */
+ BCMBAL_OBJ_MSG_TYPE_CLEAR = 0x04, /**< Clear configuration parameters */
+} bcmbal_obj_msg_type;
+
+/** Object message direction - request or response. */
+typedef enum bcmbal_obj_msg_dir
+{
+ BCMBAL_OBJ_MSG_DIR_REQUEST,
+ BCMBAL_OBJ_MSG_DIR_RESPONSE
+} bcmbal_obj_msg_dir;
+
+#define BCMBAL_OBJ_INIT_VAL 0xdeadbeef /**< The value of the obj_init_val after macro initialization */
+
+/** Information common to all BAL objects */
+typedef struct bcmbal_obj
+{
+ bal_comm_msg_hdr comm_hdr; /**< Communication header */
+ bcmbal_object_ver version; /**< Version of the Object definition/structure */
+ bcmbal_obj_id obj_type; /**< An enumerated ID associated with the object being specified */
+ bcmbal_mgt_group group; /**< Management group */
+ uint16_t subgroup; /**< Subgroup for indications */
+ bcmbal_obj_msg_type type; /**< Type (e.g. get / set / clear) */
+ bcmbal_obj_msg_dir dir; /**< Direction - request / response */
+ bcmos_errno status; /**< BAL status code (BCM_ERR_OK–success, error code otherwise) */
+ bcmbal_presence_mask presence_mask; /**< Indicates which attribute parameters are present */
+
+ /* The following fields are internal. They are not sent on the line */
+ bcmos_bool is_inprogress; /**< RO - When set to TRUE: Object is changing state internally */
+ void *list_buf; /**< Memory buffer in which to store variable-sized lists when unpacking */
+ uint32_t list_buf_size; /**< Number of bytes in the variable-sized list buffer */
+ uint32_t obj_init_val; /**< An field that is set on INIT macro call, and checked by the API */
+} bcmbal_obj;
+
+/** Information structure for use with BAL configuration API (get/set/clear) */
+typedef struct bcmbal_cfg
+{
+ bcmbal_obj hdr;
+} bcmbal_cfg;
+
+/** Information structure for BAL statistics API */
+typedef struct bcmbal_stat
+{
+ bcmbal_obj hdr;
+} bcmbal_stat;
+
+/** Information structure for BAL indications */
+typedef struct bcmbal_auto
+{
+ bcmbal_obj hdr;
+} bcmbal_auto;
+
+/** Information structure for BAL indication configuration API */
+typedef struct bcmbal_auto_cfg
+{
+ bcmbal_obj hdr;
+} bcmbal_auto_cfg;
+
+/** Whether we pack the entire structure of a message */
+static inline bcmos_bool bcmbal_obj_msg_should_pack_data(const bcmbal_obj *msg)
+{
+ switch (msg->group)
+ {
+ case BCMBAL_MGT_GROUP_CFG:
+ case BCMBAL_MGT_GROUP_STAT:
+ case BCMBAL_MGT_GROUP_AUTO_CFG:
+ if ((msg->type & BCMBAL_OBJ_MSG_TYPE_GET))
+ {
+ return (msg->dir == BCMBAL_OBJ_MSG_DIR_RESPONSE);
+ }
+ else if ((msg->type & BCMBAL_OBJ_MSG_TYPE_SET))
+ {
+ return (msg->dir == BCMBAL_OBJ_MSG_DIR_REQUEST);
+ }
+ else
+ {
+ return BCMOS_FALSE;
+ }
+
+ default:
+ return BCMOS_TRUE;
+ }
+}
+
+/** Get the packed length of the header portion of an object message */
+static inline int32_t bcmbal_obj_msg_hdr_get_packed_length(void)
+{
+ return 24;
+}
+
+/** Pack a message header to a byte stream */
+static inline bcmos_errno bcmbal_obj_msg_hdr_pack(const bcmbal_obj *msg, bcmbal_buf *buf)
+{
+ bcmos_bool ret;
+
+ ret = bcmbal_buf_write_u32(buf, (uint32_t)msg->version);
+ ret = ret && bcmbal_buf_write_u8(buf, (uint32_t)msg->obj_type);
+ ret = ret && bcmbal_buf_write_u8(buf, (uint8_t)msg->group);
+ ret = ret && bcmbal_buf_write_u16(buf, msg->subgroup);
+ ret = ret && bcmbal_buf_write_u8(buf, (uint8_t)msg->type);
+ ret = ret && bcmbal_buf_write_u8(buf, (uint8_t)msg->dir);
+ ret = ret && bcmbal_buf_write_s16(buf, (int16_t)msg->status);
+ ret = ret && bcmbal_buf_write_u32(buf, (int32_t)msg->is_inprogress);
+ ret = ret && bcmbal_buf_write_u64(buf, (uint64_t)msg->presence_mask);
+
+ return ret ? BCM_ERR_OK : BCM_ERR_OVERFLOW;
+}
+
+/** Unpack a message header from a byte stream */
+static inline bcmos_errno bcmbal_obj_msg_hdr_unpack(bcmbal_obj *msg, bcmbal_buf *buf)
+{
+ uint32_t version;
+ uint8_t obj_type;
+ uint8_t group;
+ uint16_t subgroup;
+ uint8_t type;
+ uint8_t dir;
+ int16_t status;
+ uint32_t is_inprogress;
+ uint64_t presence_mask;
+ bcmos_bool ret;
+
+ ret = bcmbal_buf_read_u32(buf, &version);
+ ret = ret && bcmbal_buf_read_u8(buf, &obj_type);
+ ret = ret && bcmbal_buf_read_u8(buf, &group);
+ ret = ret && bcmbal_buf_read_u16(buf, &subgroup);
+ ret = ret && bcmbal_buf_read_u8(buf, &type);
+ ret = ret && bcmbal_buf_read_u8(buf, &dir);
+ ret = ret && bcmbal_buf_read_s16(buf, &status);
+ ret = ret && bcmbal_buf_read_u32(buf, &is_inprogress);
+ ret = ret && bcmbal_buf_read_u64(buf, &presence_mask);
+ if (ret)
+ {
+ msg->version = (bcmbal_object_ver)version;
+ msg->obj_type = (bcmbal_obj_id)obj_type;
+ msg->group = (bcmbal_mgt_group)group;
+ msg->subgroup = subgroup;
+ msg->type = (bcmbal_obj_msg_type)type;
+ msg->dir = (bcmbal_obj_msg_dir)dir;
+ msg->status = (bcmos_errno)status;
+ msg->is_inprogress = (bcmos_bool)is_inprogress;
+ msg->presence_mask = (bcmbal_presence_mask)presence_mask;
+ }
+
+ return ret ? BCM_ERR_OK : BCM_ERR_OVERFLOW;
+}
+
+#endif /* BAL_OBJ */
diff --git a/bal_release/src/common/include/bal_objs.h b/bal_release/src/common/include/bal_objs.h
new file mode 100644
index 0000000..6a13cce
--- /dev/null
+++ b/bal_release/src/common/include/bal_objs.h
@@ -0,0 +1,985 @@
+/******************************************************************************
+ *
+ * <:copyright-BRCM:2016:DUAL/GPL:standard
+ *
+ * Copyright (c) 2016 Broadcom
+ * All Rights Reserved
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed
+ * to you under the terms of the GNU General Public License version 2
+ * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+ * with the following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give
+ * you permission to link this software with independent modules, and
+ * to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent
+ * module, the terms and conditions of the license of that module.
+ * An independent module is a module which is not derived from this
+ * software. The special exception does not apply to any modifications
+ * of the software.
+ *
+ * Not withstanding the above, under no circumstances may you combine
+ * this software in any way with any other Broadcom software provided
+ * under a license other than the GPL, without Broadcom's express prior
+ * written consent.
+ *
+ * :>
+ *
+ *****************************************************************************/
+
+/**
+ * @file bal_objs.h
+ * @brief The file provides an enumeration of all BAL objects
+ *
+ */
+#ifndef BALOBJS_H
+#define BALOBJS_H
+
+#include <bcmolt_host_api.h>
+#include "bal_common.h"
+#include "bal_model_ids.h"
+#include "bal_model_types.h"
+
+/** \ingroup api
+ * @{
+ */
+
+static char *bal_obj_str[] =
+{
+ [bcmbal_obj_id_access_terminal] = "access_terminal object",
+ [bcmbal_obj_id_interface] = "interface object",
+ [bcmbal_obj_id_subscriber_terminal] = "subscriber_terminal object",
+ [bcmbal_obj_id_flow] = "flow object",
+ [bcmbal_obj_id_packet] = "packet object",
+ [bcmbal_obj_id_group] = "group object",
+ [bcmbal_obj_id_tm_sched] = "scheduler object",
+ [bcmbal_obj_id_tm_queue] = "queue object",
+};
+
+/* Ensure that the name array size matches the associated enum */
+BAL_STATIC_ASSERT (BCMBAL_OBJ_ID__NUM_OF == (sizeof (bal_obj_str) / sizeof (char *)), bcmbal_obj_id);
+
+static inline char *bcmbal_objtype_str(bcmbal_obj_id obj)
+{
+ return (BCMBAL_OBJ_ID__NUM_OF >= obj) ? bal_obj_str[obj] : "unknown";
+}
+
+#define BCMBAL_FLOW_PRIORITY_MAX 65535
+#define BCMBAL_FLOW_PRIORITY_MIN 0
+#define BAL_FLOW_DEFAULT_PRIORITY 10
+
+/*
+ * ------------------------------------------------------------------
+ *
+ * Internal BCMBAL macros used to manipulate the BAL object elements
+ *
+ * ------------------------------------------------------------------
+ */
+
+/* Initialize request. Internal macro
+ * \ingroup api
+ * \param[in] _h Message header
+ * \param[in] _obj Object name (i.e. flow)
+ * \param[in] _grp message type
+ * \param[in] _subgrp message subgroup
+ */
+#define _BCMBAL_REQ_INIT(_h, _obj, _grp, _subgrp) \
+ (_h)->obj_init_val = BCMBAL_OBJ_INIT_VAL; \
+ (_h)->version = BCMBAL_OBJ_VERSION; \
+ (_h)->status = BCM_ERR_OK; \
+ (_h)->presence_mask = 0; \
+ (_h)->obj_type = bcmbal_obj_id_ ## _obj; \
+ (_h)->group = _grp; \
+ (_h)->subgroup = _subgrp;
+
+/** Initialize set structure
+ * \ingroup api
+ * \param[in] _s Set structure
+ * \param[in] _obj Object name (i.e. flow)
+ * \param[in] _key Object key
+ */
+#define BCMBAL_CFG_INIT(_s, _obj, _key) \
+ do { \
+ bcmbal_ ## _obj ## _cfg *_x_ = _s; \
+ memset(_x_, 0, sizeof(*_x_)); \
+ _BCMBAL_REQ_INIT(&((_x_)->hdr.hdr), _obj, BCMBAL_MGT_GROUP_CFG, 0); \
+ (_x_)->key = _key; \
+ } while (0)
+
+/** Initialize statistics structure
+ * \ingroup api
+ * \param[in] _s Statistics structure
+ * \param[in] _obj Object name (i.e. flow)
+ * \param[in] _key Object key
+ */
+#define BCMBAL_STAT_INIT(_s, _obj, _key) \
+ do { \
+ bcmbal_ ## _obj ## _stat *_x_ = _s; \
+ memset(_x_, 0, sizeof(*_x_)); \
+ _BCMBAL_REQ_INIT(&((_x_)->hdr.hdr), _obj, BCMBAL_MGT_GROUP_STAT, 0); \
+ (_x_)->key = _key; \
+ } while (0)
+
+/** Set the memory buffer to use for variable-sized lists within a cfg get
+ * \ingroup api
+ * \param[in] _s Configuration structure
+ * \param[in] _obj Object type
+ * \param[in] _buf Pointer to a location in memory in which to store the lists
+ * \param[in] _len Length of the buffer pointed to by _buf
+ */
+#define BCMBAL_CFG_LIST_BUF_SET(_s, _obj, _buf, _len) \
+ do { \
+ bcmbal_ ## _obj ## _cfg *_x_ = _s; \
+ _x_->hdr.hdr.list_buf = _buf; \
+ _x_->hdr.hdr.list_buf_size = _len; \
+ } while (0)
+
+/* Set the object progress state
+ * \ingroup api
+ * \param[in] _s Object structure
+ * \param[in] _p New object in-progress state: BCMOS_TRUE, or BCMOS_FALSE
+ */
+#define BCMBAL_OBJ_IN_PROGRESS_SET(_s, _p) ((_s)->hdr.hdr.is_inprogress = _p )
+
+/* Return the object progress state
+ * \ingroup api
+ * \param[in] _s Object structure
+ */
+#define BCMBAL_OBJ_IN_PROGRESS_GET(_s) ((_s)->hdr.hdr.is_inprogress)
+
+/* Internal macro: Get a bitmask given a property ID enum */
+#define BCMBAL_PROP_MASK_GET(_obj, _grp, _p) \
+ (bcmbal_ ## _obj ## _grp ## _id_ ## _p == bcmbal_ ## _obj ## _grp ## _id_all_properties ? \
+ ((1ULL << (uint64_t)bcmbal_ ## _obj ## _grp ## _id_ ## _p) - 1) : \
+ (1ULL << (uint64_t)bcmbal_ ## _obj ## _grp ## _id_ ## _p))
+
+
+/* Macro: Indicate that configuration property is present - USE WITH CAUTION */
+#define BCMBAL_PROP_SET_PRESENT(_m, _obj, _grp, _p) \
+ do { \
+ (_m)->hdr.hdr.presence_mask |= BCMBAL_PROP_MASK_GET(_obj, _grp, _p); \
+ } while (0)
+
+/* Internal macro: Indicate that configuration property is not present */
+#define BCMBAL_PROP_CLEAR_PRESENT(_m, _obj, _grp, _p) \
+ do { \
+ (_m)->hdr.hdr.presence_mask &= ~(BCMBAL_PROP_MASK_GET(_obj, _grp, _p));\
+ } while (0)
+
+/* Internal macro: check if property is present */
+#define _BCMBAL_PROP_IS_PRESENT(_m, _obj, _grp, _p) \
+ (((_m)->hdr.hdr.presence_mask & BCMBAL_PROP_MASK_GET(_obj, _grp, _p)) ? \
+ BCMOS_TRUE : BCMOS_FALSE)
+
+/** Set configuration property in message structure
+ * \ingroup api
+ * \param[in] _m Configuration structure
+ * \param[in] _obj Object type
+ * \param[in] _p Property name
+ * \param[in] _v Property value
+ */
+#define BCMBAL_CFG_PROP_SET(_m, _obj, _p, _v) \
+ do { \
+ BCMBAL_PROP_SET_PRESENT(_m, _obj, _cfg, _p);\
+ (_m)->data._p = (_v);\
+ } while (0)
+
+/** Indicate that configuration property should be read
+ * \ingroup api
+ * \param[in] _m Configuration structure
+ * \param[in] _obj Object type
+ * \param[in] _p Property name
+ */
+#define BCMBAL_CFG_PROP_GET(_m, _obj, _p) BCMBAL_PROP_SET_PRESENT(_m, _obj, _cfg, _p)
+
+/** clear object property in message structure
+ * \ingroup api
+ * \param[in] _m Object structure pointer
+ * \param[in] _obj Object name (i.e. flow)
+ * \param[in] _p Attribute name (i.e. admin_state)
+ */
+#define BCMBAL_CFG_PROP_CLEAR(_m, _obj, _p) \
+ do { \
+ BCMBAL_PROP_CLEAR_PRESENT(_m, _obj, _cfg, _p); \
+ memset(&((_m)->data._p), 0, sizeof((_m)->data._p)); \
+ } while (0)
+
+/** Check if configuration property is set in message structure
+ * \ingroup api
+ * \param[in] _m Configuration structure
+ * \param[in] _obj Object type
+ * \param[in] _p Property name
+ */
+#define BCMBAL_CFG_PROP_IS_SET(_m, _obj, _p) _BCMBAL_PROP_IS_PRESENT(_m, _obj, _cfg, _p)
+
+/** Indicate that statistic property should be read
+ * \ingroup api
+ * \param[in] _m Configuration structure
+ * \param[in] _obj Object type
+ * \param[in] _p Property name
+ */
+#define BCMBAL_STAT_PROP_GET(_m, _obj, _p) BCMBAL_PROP_SET_PRESENT(_m, _obj, _stat, _p)
+
+/** Check if statistic property is set in message structure
+ * \ingroup api
+ * \param[in] _m Statistic structure
+ * \param[in] _obj Object type
+ * \param[in] _p Property name
+ */
+#define BCMBAL_STAT_PROP_IS_SET(_m, _obj, _p) _BCMBAL_PROP_IS_PRESENT(_m, _obj, _stat, _p)
+
+
+/***********************************************************************************
+ **
+ ** Macros for setting attribute values where an attribute supports a presence_mask
+ **
+ ***********************************************************************************
+ **/
+
+/* Internal macro: Get a bitmask given a attribute element property ID enum */
+#define BCMBAL_ATTRIBUTE_PROP_MASK_GET(_attr, _p) bcmbal_ ## _attr ## _id_ ## _p
+
+/* Internal macro: Indicate that configuration property is present */
+#define _BCMBAL_ATTRIBUTE_PROP_SET_PRESENT(p_attr, _attr,_p) \
+ do { \
+ (p_attr)->presence_mask |= BCMBAL_ATTRIBUTE_PROP_MASK_GET(_attr, _p); \
+ } while (0)
+
+/* Internal macro: Indicate that configuration property is not present */
+#define _BCMBAL_ATTRIBUTE_PROP_CLEAR_PRESENT(p_attr, _attr,_p) \
+ do { \
+ (p_attr)->presence_mask &= ~(BCMBAL_ATTRIBUTE_PROP_MASK_GET(_attr, _p)); \
+ } while (0)
+
+/** Set attribute element property in message structure
+ * \param[in] _p_attr Attribute structure pointer
+ * \param[in] _attr Attribute name
+ * \param[in] _p Element name (i.e. o_tpid)
+ * \param[in] _v Element value
+ */
+#define BCMBAL_ATTRIBUTE_PROP_SET(_p_attr, _attr, _p, _v) \
+ do { \
+ _BCMBAL_ATTRIBUTE_PROP_SET_PRESENT(_p_attr, _attr, _p); \
+ (_p_attr)->_p = (_v); \
+ } while (0)
+
+/** Clear attribute element property in message structure
+ * \param[in] _p_attr Attribute structure pointer
+ * \param[in] _attr Attribute name
+ * \param[in] _p Element name (i.e. o_tpid)
+ */
+#define BCMBAL_ATTRIBUTE_PROP_CLEAR(_p_attr, _attr, _p) \
+ do { \
+ _BCMBAL_ATTRIBUTE_PROP_CLEAR_PRESENT(_p_attr, _attr, _p); \
+ memset(&((_p_attr)->_p), 0, sizeof((_p_attr)->_p)); \
+ } while (0)
+
+
+/* Internal macro: check if an attribute element is present */
+#define _BCMBAL_ATTRIBUTE_PROP_IS_PRESENT(_p_attr, _attr, _p) \
+ (((_p_attr)->presence_mask & BCMBAL_ATTRIBUTE_PROP_MASK_GET(_attr, _p)) ? \
+ BCMOS_TRUE : BCMOS_FALSE)
+
+/** Check if attribute element property is set in message structure
+ * \param[in] _p_attr Attribute structure pointer
+ * \param[in] _attr Attribute name
+ * \param[in] _p Element name (i.e. o_tpid)
+ */
+#define BCMBAL_ATTRIBUTE_PROP_IS_SET(_p_attr, _attr, _p) _BCMBAL_ATTRIBUTE_PROP_IS_PRESENT(_p_attr, _attr, _p)
+
+
+/*
+ * ------------------------------------------------------------------
+ *
+ * Internal BCMBAL macros used to manipulate cmds_bitmask of action parameters
+ *
+ * ------------------------------------------------------------------
+ */
+
+/** Check if action cmd id is set in action structure
+ * \param[in] _m Object structure pointer
+ * \param[in] _b cmd Id bitmask
+ */
+#define BCMBAL_ACTION_CMD_ID_IS_SET(_m, _b) \
+ (((_m)->cmds_bitmask & (_b)) ? \
+ BCMOS_TRUE : BCMOS_FALSE)
+
+/** Set action cmd id in action structure
+ * \param[in] _m Object structure pointer
+ * \param[in] _b cmd Id bitmask
+ */
+#define BCMBAL_ACTION_CMD_ID_SET(_m, _b) \
+ do { \
+ (_m)->cmds_bitmask |= (_b);\
+ } while (0)
+
+
+/** Clear action cmd id in action structure
+ * \param[in] _m Object structure pointer
+ * \param[in] _b cmd Id bitmask
+ */
+#define BCMBAL_ACTION_CMD_ID_CLEAR(_m, _b) \
+ do { \
+ (_m)->cmds_bitmask &= ~(_b);\
+ } while (0)
+
+
+
+static inline void bcmbal_flow_object_overlay_w_src_priority(bcmbal_flow_cfg *dstobj, bcmbal_flow_cfg *srcobj)
+{
+ BUG_ON(NULL == dstobj);
+ BUG_ON(NULL == srcobj);
+
+ bcmbal_presence_mask dest_presence_mask;
+
+ /* First, copy the common object and keys in their entirety, except for preserving the presence_mask */
+ dest_presence_mask = dstobj->hdr.hdr.presence_mask;
+ dstobj->hdr = srcobj->hdr;
+ dstobj->key = srcobj->key;
+ dstobj->hdr.hdr.presence_mask = dest_presence_mask;
+
+ /* Now copy only the fields that have been specified in the source object */
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, admin_state))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, admin_state, srcobj->data.admin_state);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, access_int_id))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, access_int_id, srcobj->data.access_int_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, network_int_id))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, network_int_id, srcobj->data.network_int_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, sub_term_id))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, sub_term_id, srcobj->data.sub_term_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, svc_port_id))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, svc_port_id, srcobj->data.svc_port_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, agg_port_id))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, agg_port_id, srcobj->data.agg_port_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, resolve_mac))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, resolve_mac, srcobj->data.resolve_mac);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, queue))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, queue, srcobj->data.queue);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, action))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, action, srcobj->data.action);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, classifier))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, classifier, srcobj->data.classifier);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, sla))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, sla, srcobj->data.sla);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, group_id))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, group_id, srcobj->data.group_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, cookie))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, flow, cookie, srcobj->data.cookie);
+ }
+}
+
+static inline void bcmbal_flow_object_overlay_w_dst_priority(bcmbal_flow_cfg *dstobj, bcmbal_flow_cfg *srcobj)
+{
+ BUG_ON(NULL == dstobj);
+ BUG_ON(NULL == srcobj);
+
+ bcmbal_presence_mask dest_presence_mask;
+
+ /* First, copy the common object and keys in their entirety,
+ * except for preserving the presence_mask */
+ dest_presence_mask = dstobj->hdr.hdr.presence_mask;
+ dstobj->hdr = srcobj->hdr;
+ dstobj->key = srcobj->key;
+ dstobj->hdr.hdr.presence_mask = dest_presence_mask;
+
+ /* Now copy only the fields that have been specified in the source and are not already set in the dst object */
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, admin_state))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, admin_state))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, admin_state, srcobj->data.admin_state);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, access_int_id))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, access_int_id))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, access_int_id, srcobj->data.access_int_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, network_int_id))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, network_int_id))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, network_int_id, srcobj->data.network_int_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, sub_term_id))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, sub_term_id))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, sub_term_id, srcobj->data.sub_term_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, svc_port_id))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, svc_port_id))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, svc_port_id, srcobj->data.svc_port_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, agg_port_id))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, agg_port_id))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, agg_port_id, srcobj->data.agg_port_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, resolve_mac))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, resolve_mac))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, resolve_mac, srcobj->data.resolve_mac);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, queue))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, queue))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, queue, srcobj->data.queue);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, action))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, action))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, action, srcobj->data.action);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, classifier))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, classifier))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, classifier, srcobj->data.classifier);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, sla))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, sla))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, sla, srcobj->data.sla);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, group_id))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, group_id))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, group_id, srcobj->data.group_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, flow, cookie))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, flow, cookie))
+ BCMBAL_CFG_PROP_SET(dstobj, flow, cookie, srcobj->data.cookie);
+ }
+}
+
+static inline void bcmbal_sub_term_object_overlay_w_src_priority(bcmbal_subscriber_terminal_cfg *dstobj,
+ bcmbal_subscriber_terminal_cfg *srcobj)
+{
+ BUG_ON(NULL == dstobj);
+ BUG_ON(NULL == srcobj);
+
+ bcmbal_presence_mask dest_presence_mask;
+
+ /* First, copy the common object and keys in their entirety, except for preserving the presence_mask */
+ dest_presence_mask = dstobj->hdr.hdr.presence_mask;
+ dstobj->hdr = srcobj->hdr;
+ dstobj->key = srcobj->key;
+ dstobj->hdr.hdr.presence_mask = dest_presence_mask;
+
+ /* Now copy only the fields that have been specified in the source object */
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, admin_state))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, admin_state, srcobj->data.admin_state);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, serial_number))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, serial_number, srcobj->data.serial_number);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, password))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, password, srcobj->data.password);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, registration_id))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, registration_id, srcobj->data.registration_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, svc_port_id))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, svc_port_id, srcobj->data.svc_port_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, ds_tm))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, ds_tm, srcobj->data.ds_tm);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, us_tm))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, us_tm, srcobj->data.us_tm);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, mac_address))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, mac_address, srcobj->data.mac_address);
+ }
+}
+
+static inline void bcmbal_sub_term_object_overlay_w_dst_priority(bcmbal_subscriber_terminal_cfg *dstobj,
+ bcmbal_subscriber_terminal_cfg *srcobj)
+{
+ BUG_ON(NULL == dstobj);
+ BUG_ON(NULL == srcobj);
+
+ bcmbal_presence_mask dest_presence_mask;
+
+ /* First, copy the common object and keys in their entirety, except for preserving the presence_mask */
+ dest_presence_mask = dstobj->hdr.hdr.presence_mask;
+ dstobj->hdr = srcobj->hdr;
+ dstobj->key = srcobj->key;
+ dstobj->hdr.hdr.presence_mask = dest_presence_mask;
+
+ /* Now copy only the fields that have been specified in the source object */
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, admin_state))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, subscriber_terminal, admin_state))
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, admin_state, srcobj->data.admin_state);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, serial_number))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, subscriber_terminal, serial_number))
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, serial_number, srcobj->data.serial_number);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, password))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, subscriber_terminal, password))
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, password, srcobj->data.password);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, registration_id))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, subscriber_terminal, registration_id))
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, registration_id, srcobj->data.registration_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, svc_port_id))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, subscriber_terminal, svc_port_id))
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, svc_port_id, srcobj->data.svc_port_id);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, ds_tm))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, subscriber_terminal, ds_tm))
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, ds_tm, srcobj->data.ds_tm);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, us_tm))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, subscriber_terminal, us_tm))
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, us_tm, srcobj->data.us_tm);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, subscriber_terminal, mac_address))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, subscriber_terminal, mac_address))
+ BCMBAL_CFG_PROP_SET(dstobj, subscriber_terminal, mac_address, srcobj->data.mac_address);
+ }
+}
+
+static inline void bcmbal_tm_sched_object_overlay_w_src_priority(bcmbal_tm_sched_cfg *dstobj, bcmbal_tm_sched_cfg *srcobj)
+{
+ BUG_ON(NULL == dstobj);
+ BUG_ON(NULL == srcobj);
+
+ bcmbal_presence_mask dest_presence_mask;
+
+ /* First, copy the common object and keys in their entirety, except for preserving the presence_mask */
+ dest_presence_mask = dstobj->hdr.hdr.presence_mask;
+ dstobj->hdr = srcobj->hdr;
+ dstobj->key = srcobj->key;
+ dstobj->hdr.hdr.presence_mask = dest_presence_mask;
+
+ /* Now copy only the fields that have been specified in the source object */
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, owner))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, owner, srcobj->data.owner);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, sched_type))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, sched_type, srcobj->data.sched_type);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, sched_parent))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, sched_parent, srcobj->data.sched_parent);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, sched_child_type))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, sched_child_type, srcobj->data.sched_child_type);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, rate))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, rate, srcobj->data.rate);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, tcont_sla))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, tcont_sla, srcobj->data.tcont_sla);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, creation_mode))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, creation_mode, srcobj->data.creation_mode);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, num_priorities))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, num_priorities, srcobj->data.num_priorities);
+ }
+
+}
+
+
+
+static inline void bcmbal_tm_sched_object_overlay_w_dst_priority(bcmbal_tm_sched_cfg *dstobj, bcmbal_tm_sched_cfg *srcobj)
+{
+ BUG_ON(NULL == dstobj);
+ BUG_ON(NULL == srcobj);
+
+ bcmbal_presence_mask dest_presence_mask;
+
+ /* First, copy the common object and keys in their entirety,
+ * except for preserving the presence_mask */
+ dest_presence_mask = dstobj->hdr.hdr.presence_mask;
+ dstobj->hdr = srcobj->hdr;
+ dstobj->key = srcobj->key;
+ dstobj->hdr.hdr.presence_mask = dest_presence_mask;
+
+ /* Now copy only the fields that have been specified in the source and are not already set in the dst object */
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, owner))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, tm_sched, owner))
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, owner, srcobj->data.owner);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, sched_type))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, tm_sched, sched_type))
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, sched_type, srcobj->data.sched_type);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, sched_parent))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, tm_sched, sched_parent))
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, sched_parent, srcobj->data.sched_parent);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, sched_child_type))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, tm_sched, sched_child_type))
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, sched_child_type, srcobj->data.sched_child_type);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, rate))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, tm_sched, rate))
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, rate, srcobj->data.rate);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, tcont_sla))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, tm_sched, tcont_sla))
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, tcont_sla, srcobj->data.tcont_sla);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_sched, creation_mode))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, tm_sched, creation_mode))
+ BCMBAL_CFG_PROP_SET(dstobj, tm_sched, creation_mode, srcobj->data.creation_mode);
+ }
+
+}
+
+
+static inline void bcmbal_tm_queue_object_overlay(bcmbal_tm_queue_cfg *dstobj, bcmbal_tm_queue_cfg *srcobj)
+{
+ BUG_ON(NULL == dstobj);
+ BUG_ON(NULL == srcobj);
+
+ bcmbal_presence_mask dest_presence_mask;
+
+ /* First, copy the common object and keys in their entirety, except for preserving the presence_mask */
+ dest_presence_mask = dstobj->hdr.hdr.presence_mask;
+ dstobj->hdr = srcobj->hdr;
+ dstobj->key = srcobj->key;
+ dstobj->hdr.hdr.presence_mask = dest_presence_mask;
+
+ /* Now copy only the fields that have been specified in the source object */
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_queue, priority))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_queue, priority, srcobj->data.priority);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_queue, weight))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_queue, weight, srcobj->data.weight);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_queue, rate))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_queue, rate, srcobj->data.rate);
+ }
+
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, tm_queue, bac))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, tm_queue, bac, srcobj->data.bac);
+ }
+}
+
+static inline bcmos_errno bal_obj_key_str_get(bcmbal_obj *obj, char *p_obj_key_str)
+{
+ BUG_ON(NULL == p_obj_key_str);
+
+ bcmos_errno ret = BCM_ERR_OK;
+
+ switch (obj->obj_type)
+ {
+
+ case (BCMBAL_OBJ_ID_ACCESS_TERMINAL):
+ {
+ sprintf(p_obj_key_str, "unit:%d",
+ ((bcmbal_access_terminal_cfg *)obj)->key.access_term_id);
+ break;
+ }
+
+ case (BCMBAL_OBJ_ID_INTERFACE):
+ {
+ sprintf(p_obj_key_str, "intf_id:%d, type:%s",
+ ((bcmbal_interface_cfg *)obj)->key.intf_id,
+ ((bcmbal_interface_cfg *)obj)->key.intf_type == BCMBAL_INTF_TYPE_NNI ? "NNI" :
+ ((bcmbal_interface_cfg *)obj)->key.intf_type == BCMBAL_INTF_TYPE_PON ? "PON" :
+ "???"
+ );
+ break;
+ }
+
+ case (BCMBAL_OBJ_ID_SUBSCRIBER_TERMINAL):
+ {
+ sprintf(p_obj_key_str, "sub_term_id:%d, intf_id:%d",
+ ((bcmbal_subscriber_terminal_cfg *)obj)->key.sub_term_id,
+ ((bcmbal_subscriber_terminal_cfg *)obj)->key.intf_id);
+ break;
+ }
+
+ case (BCMBAL_OBJ_ID_FLOW):
+ {
+ sprintf(p_obj_key_str, "flow_id:%d, type:%s",
+ ((bcmbal_flow_cfg *)obj)->key.flow_id,
+ ((bcmbal_flow_cfg *)obj)->key.flow_type == BCMBAL_FLOW_TYPE_UPSTREAM ? "upstream" :
+ ((bcmbal_flow_cfg *)obj)->key.flow_type == BCMBAL_FLOW_TYPE_DOWNSTREAM ? "downstream" :
+ ((bcmbal_flow_cfg *)obj)->key.flow_type == BCMBAL_FLOW_TYPE_BROADCAST ? "broadcast" :
+ ((bcmbal_flow_cfg *)obj)->key.flow_type == BCMBAL_FLOW_TYPE_MULTICAST ? "multicast" :
+ "???"
+ );
+ break;
+ }
+
+ case (BCMBAL_OBJ_ID_GROUP):
+ {
+ sprintf(p_obj_key_str, "group_id:%d",
+ ((bcmbal_group_cfg *)obj)->key.group_id);
+ break;
+ }
+
+ case (BCMBAL_OBJ_ID_TM_SCHED):
+ {
+ sprintf(p_obj_key_str, "dir:%s, id:%d",
+ ((bcmbal_tm_sched_cfg *)obj)->key.dir == BCMBAL_TM_SCHED_DIR_US ? "upstream" :
+ ((bcmbal_tm_sched_cfg *)obj)->key.dir == BCMBAL_TM_SCHED_DIR_DS ? "downstream" :
+ "???",
+ ((bcmbal_tm_sched_cfg *)obj)->key.id
+ );
+ break;
+ }
+
+ case (BCMBAL_OBJ_ID_TM_QUEUE):
+ {
+ sprintf(p_obj_key_str, "sched_id:%d, sched_dir:%s, id:%d",
+ ((bcmbal_tm_queue_cfg *)obj)->key.sched_id,
+ ((bcmbal_tm_queue_cfg *)obj)->key.sched_dir == BCMBAL_TM_SCHED_DIR_US ? "upstream" :
+ ((bcmbal_tm_queue_cfg *)obj)->key.sched_dir == BCMBAL_TM_SCHED_DIR_DS ? "downstream" :
+ "???",
+ ((bcmbal_tm_queue_cfg *)obj)->key.id
+ );
+ break;
+ }
+
+ case (BCMBAL_OBJ_ID_PACKET):
+ {
+ sprintf(p_obj_key_str, " ");
+ break;
+ }
+
+ default:
+ sprintf(p_obj_key_str, " ");
+ ret = BCM_ERR_PARM;
+ break;
+ }
+
+ return ret;
+}
+
+static inline void bcmbal_interface_object_overlay_w_dst_priority(bcmbal_interface_cfg *dstobj, bcmbal_interface_cfg *srcobj)
+{
+ BUG_ON(NULL == dstobj);
+ BUG_ON(NULL == srcobj);
+
+ bcmbal_presence_mask dest_presence_mask;
+
+ /* First, copy the common object and keys in their entirety,
+ * except for preserving the presence_mask */
+ dest_presence_mask = dstobj->hdr.hdr.presence_mask;
+ dstobj->hdr = srcobj->hdr;
+ dstobj->key = srcobj->key;
+ dstobj->hdr.hdr.presence_mask = dest_presence_mask;
+
+ /* Now copy only the fields that have been specified in the source and are not already set in the dst object */
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, admin_state))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, interface, admin_state))
+ BCMBAL_CFG_PROP_SET(dstobj, interface, admin_state, srcobj->data.admin_state);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, min_data_agg_port_id))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, interface, min_data_agg_port_id))
+ BCMBAL_CFG_PROP_SET(dstobj, interface, min_data_agg_port_id, srcobj->data.min_data_agg_port_id);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, min_data_svc_port_id))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, interface, min_data_svc_port_id))
+ BCMBAL_CFG_PROP_SET(dstobj, interface, min_data_svc_port_id, srcobj->data.min_data_svc_port_id);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, transceiver_type))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, interface, transceiver_type))
+ BCMBAL_CFG_PROP_SET(dstobj, interface, transceiver_type, srcobj->data.transceiver_type);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, ds_miss_mode))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, interface, ds_miss_mode))
+ BCMBAL_CFG_PROP_SET(dstobj, interface, ds_miss_mode, srcobj->data.ds_miss_mode);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, mtu))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, interface, mtu))
+ BCMBAL_CFG_PROP_SET(dstobj, interface, mtu, srcobj->data.mtu);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, flow_control))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, interface, flow_control))
+ BCMBAL_CFG_PROP_SET(dstobj, interface, flow_control, srcobj->data.flow_control);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, ds_tm))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, interface, ds_tm))
+ BCMBAL_CFG_PROP_SET(dstobj, interface, ds_tm, srcobj->data.ds_tm);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, us_tm))
+ {
+ if(!BCMBAL_CFG_PROP_IS_SET(dstobj, interface, us_tm))
+ BCMBAL_CFG_PROP_SET(dstobj, interface, us_tm, srcobj->data.us_tm);
+ }
+}
+
+
+static inline void bcmbal_interface_object_overlay_w_src_priority(bcmbal_interface_cfg *dstobj,
+ bcmbal_interface_cfg *srcobj)
+{
+ BUG_ON(NULL == dstobj);
+ BUG_ON(NULL == srcobj);
+
+ bcmbal_presence_mask dest_presence_mask;
+
+ /* First, copy the common object and keys in their entirety, except for preserving the presence_mask */
+ dest_presence_mask = dstobj->hdr.hdr.presence_mask;
+ dstobj->hdr = srcobj->hdr;
+ dstobj->key = srcobj->key;
+ dstobj->hdr.hdr.presence_mask = dest_presence_mask;
+
+ /* Now copy only the fields that have been specified in the source object */
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, admin_state))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, interface, admin_state, srcobj->data.admin_state);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, min_data_agg_port_id))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, interface, min_data_agg_port_id, srcobj->data.min_data_agg_port_id);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, min_data_svc_port_id))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, interface, min_data_svc_port_id, srcobj->data.min_data_svc_port_id);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, transceiver_type))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, interface, transceiver_type, srcobj->data.transceiver_type);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, ds_miss_mode))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, interface, ds_miss_mode, srcobj->data.ds_miss_mode);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, mtu))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, interface, mtu, srcobj->data.mtu);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, flow_control))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, interface, flow_control, srcobj->data.flow_control);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, ds_tm))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, interface, ds_tm, srcobj->data.ds_tm);
+ }
+ if(BCMBAL_CFG_PROP_IS_SET(srcobj, interface, us_tm))
+ {
+ BCMBAL_CFG_PROP_SET(dstobj, interface, us_tm, srcobj->data.us_tm);
+ }
+
+}
+/*@}*/
+
+
+#endif /* BALOBJS_H */
diff --git a/bal_release/src/common/include/bal_osmsg.h b/bal_release/src/common/include/bal_osmsg.h
new file mode 100644
index 0000000..e5caf85
--- /dev/null
+++ b/bal_release/src/common/include/bal_osmsg.h
@@ -0,0 +1,104 @@
+/******************************************************************************
+ *
+ * <:copyright-BRCM:2016:DUAL/GPL:standard
+ *
+ * Copyright (c) 2016 Broadcom
+ * All Rights Reserved
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed
+ * to you under the terms of the GNU General Public License version 2
+ * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+ * with the following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give
+ * you permission to link this software with independent modules, and
+ * to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent
+ * module, the terms and conditions of the license of that module.
+ * An independent module is a module which is not derived from this
+ * software. The special exception does not apply to any modifications
+ * of the software.
+ *
+ * Not withstanding the above, under no circumstances may you combine
+ * this software in any way with any other Broadcom software provided
+ * under a license other than the GPL, without Broadcom's express prior
+ * written consent.
+ *
+ * :>
+ *
+ *****************************************************************************/
+
+/**
+ * @file bal_osmsg.h
+ * @brief BAL Message data structure definitions
+ *
+ */
+#ifndef BAL_OSMSG_H_
+#define BAL_OSMSG_H_
+/*
+ * Message structures.
+ * Going to be generated from object model and moved elsewhere
+ */
+
+/* BAL subsystem */
+typedef enum
+{
+ BAL_SUBSYSTEM_CORE,
+ BAL_SUBSYSTEM_MAC_UTIL,
+ BAL_SUBSYSTEM_SWITCH_UTIL,
+ BAL_SUBSYSTEM_PUBLIC_API,
+
+ BAL_SUBSYSTEM__NUM_OF
+} bal_subsystem;
+
+
+__attribute__ ((unused)) static const char *subsystem_str[] =
+{
+ "BAL Core",
+ "BAL Mac Util",
+ "BAL Switch Util",
+ "BAL Public API"
+};
+
+/** BAL OS message
+ * \ingroup system_msg
+ */
+typedef enum
+{
+ BCMOS_MSG_ID__BEGIN,
+
+ /* Messages used internally by OS abstraction. Do not touch */
+ BCMOS_MSG_ID_INTERNAL_TIMER, /**< Internal "timer message" type */
+ BCMOS_MSG_ID_INTERNAL_EVENT, /**< Internal "event message" type */
+ BCMOS_MSG_ID_INTERNAL_IPC,
+
+ /* Application messages */
+ BCMOS_MSG_ID_IPC_PING, /*** Inter-process communication ping */
+
+ /* Core/Switch util messages */
+ BCMBAL_SWITCH_UTIL_MSG,
+
+ /* Core/Mac util messages */
+ BCMBAL_MAC_UTIL_MSG,
+
+ /* Core<->Public API messages */
+ BCMBAL_MGMT_MSG,
+
+ /* Core->Public API indication messages (both auto and "normal") */
+ BCMBAL_MGMT_API_IND_MSG,
+
+ BCMOS_MSG_ID_EON_PROXY_RX,
+ BCMOS_MSG_ID_EON_DESTROY_STATE,
+
+ BCMOS_MSG_ID_EPON_OAM_PROXY_RX,
+ BCMOS_MSG_ID_EPON_OAM_TIMEOUT,
+
+ BCMOS_MSG_ID_OMCI_TRANSPORT_SEND,
+
+ BCMOS_MSG_ID__END,
+ BCMOS_MSG_ID__FORCE16 = 0x7fff
+} bcmos_msg_id;
+
+
+#endif /* BAL_OSMSG_H_ */
diff --git a/bal_release/src/common/include/bal_utils_msg.h b/bal_release/src/common/include/bal_utils_msg.h
new file mode 100644
index 0000000..d6721fc
--- /dev/null
+++ b/bal_release/src/common/include/bal_utils_msg.h
@@ -0,0 +1,180 @@
+/******************************************************************************
+ *
+ * <:copyright-BRCM:2016:DUAL/GPL:standard
+ *
+ * Copyright (c) 2016 Broadcom
+ * All Rights Reserved
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed
+ * to you under the terms of the GNU General Public License version 2
+ * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+ * with the following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give
+ * you permission to link this software with independent modules, and
+ * to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent
+ * module, the terms and conditions of the license of that module.
+ * An independent module is a module which is not derived from this
+ * software. The special exception does not apply to any modifications
+ * of the software.
+ *
+ * Not withstanding the above, under no circumstances may you combine
+ * this software in any way with any other Broadcom software provided
+ * under a license other than the GPL, without Broadcom's express prior
+ * written consent.
+ *
+ * :>
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+The message format will look like the following
+
+ -----------------------------------------------------------------------------------
+ | BAL Header | | Payload Data |
+ ----------------------------------|------------------------------------------------
+ | *bcmos_header | | App Header | |
+ -----------------------------------------------------------------------------------
+ | | | version | |
+ | type | msg_type | obj_key | bal_util_ind_flow_t |
+ | | msg_id | status | |
+ -----------------------------------------------------------------------------------
+
+ *The bcmos Header is actually the first field of BAL Header structure (bal_comm_msg_hdr_t)
+
+ type can be:
+ BCMBAL_SWITCH_UTIL_MSG
+ BCMBAL_MAC_UTIL_MSG
+
+ msg_type can be:
+ BAL_MSG_IND,
+ BAL_MSG_AUTO_IND
+
+ msg_id is module specific, but contains two 16 bits fields (OBJECT_ID, OPERATION_ID)
+ see bal_objs.h for OBJECT_ID details
+ The OPERATION_ID should be unique within the OBJECT - see example below
+ bal_msg.h
+
+ status is for indication message to show general results. The value is bcmos_errno.
+
+*********************************************************************************/
+
+/**
+ * @file bal_utils_msg.h
+ *
+ * @brief Common header for messages sent between Utils and Core
+ *
+ * @ingroup apps
+ */
+
+#ifndef _BAL_UTIL_MSG_H_
+#define _BAL_UTIL_MSG_H_
+
+/*@{*/
+
+#include <bal_msg.h>
+#include <stdint.h>
+
+#define BAL_UTIL_MSG_VERSION 1
+
+/* access terminal request list,
+ */
+typedef enum
+{
+ BAL_UTIL_OPER_ACC_TERM_CONNECT,
+ BAL_UTIL_OPER_ACC_TERM_DISCONNECT
+} bal_util_oper_acc_term;
+
+/* subscriber terminal request list,
+ */
+typedef enum
+{
+ BAL_UTIL_OPER_SUB_TERM_ADD,
+ BAL_UTIL_OPER_SUB_TERM_REMOVE,
+ BAL_UTIL_OPER_SUB_TERM_CLEAR,
+ BAL_UTIL_OPER_SUB_TERM_DISCOVERY
+} bal_util_oper_sub_term;
+
+/* interface request list,
+ */
+typedef enum
+{
+ BAL_UTIL_OPER_IF_UP,
+ BAL_UTIL_OPER_IF_DOWN
+} bal_util_oper_if;
+
+/* flow request list,
+ */
+typedef enum
+{
+ BAL_UTIL_OPER_FLOW_ADD,
+ BAL_UTIL_OPER_FLOW_REMOVE,
+ BAL_UTIL_OPER_FLOW_CLEAR
+} bal_util_oper_flow;
+
+typedef enum
+{
+ BAL_UTIL_FLOW_IND_SEND_NONE,
+ BAL_UTIL_FLOW_IND_SEND_SUCCESS,
+ BAL_UTIL_FLOW_IND_SEND_FAIL
+} bal_util_flow_ind;
+
+/* group request list,
+ */
+typedef enum
+{
+ BAL_UTIL_OPER_GROUP_CREATE,
+ BAL_UTIL_OPER_GROUP_ADD,
+ BAL_UTIL_OPER_GROUP_REMOVE,
+ BAL_UTIL_OPER_GROUP_SET,
+ BAL_UTIL_OPER_GROUP_DESTROY
+} bal_util_oper_group;
+
+typedef enum
+{
+ BAL_UTIL_OPER_AGG_PORT_ADD,
+ BAL_UTIL_OPER_AGG_PORT_REMOVE,
+ BAL_UTIL_OPER_AGG_PORT_CLEAR
+} bal_util_oper_agg_port;
+
+/* Macro to retrieve the name string of the GROUP oper */
+#define BCMBAL_UTIL_GROUP_OPER_STR_GET(__op_type__) \
+ ( BAL_UTIL_OPER_GROUP_CREATE == __op_type__ ) ? "create" : \
+ ( BAL_UTIL_OPER_GROUP_ADD == __op_type__ ) ? "add" : \
+ ( BAL_UTIL_OPER_GROUP_REMOVE == __op_type__ ) ? "remove" : \
+ ( BAL_UTIL_OPER_GROUP_SET == __op_type__ ) ? "set" : \
+ ( BAL_UTIL_OPER_GROUP_DESTROY == __op_type__ ) ? "destroy" : \
+ "unknown"
+
+/* bal_app_msg_obj_key_t allow applications to id which instance of object
+ * this message should be processed
+ */
+typedef union bal_util_msg_obj_key
+{
+ bcmbal_access_terminal_key acc_term_key;
+ bcmbal_interface_key if_key;
+ bcmbal_subscriber_terminal_key sub_term_key;
+ bcmbal_flow_key flow_key;
+ bcmbal_group_key group_key;
+ bcmbal_tm_sched_key tm_sched_key;
+} bal_util_msg_obj_key;
+
+#define BCMBAL_INVALID_TUNNEL_ID 0xffffffff
+
+ /* indication message header */
+ typedef struct bal_util_msg_ind
+ {
+ bal_comm_msg_hdr comm_hdr; /* Communication header */
+ uint32_t version; /* version of the app message format */
+ bal_util_msg_obj_key obj_key;
+ int32_t status; /* bcmos_errno */
+ /* Optional custom BAL MAC/SWITCH UTIL indication data follows */
+ char data[0];
+ } bal_util_msg_ind;
+
+ /* auto indication message header */
+ typedef bal_util_msg_ind bal_util_msg_auto_ind;
+
+#endif /* _BAL_UTIL_MSG_H */
diff --git a/bal_release/src/common/include/bal_version.h b/bal_release/src/common/include/bal_version.h
new file mode 100644
index 0000000..533ff6b
--- /dev/null
+++ b/bal_release/src/common/include/bal_version.h
@@ -0,0 +1,44 @@
+/*************************************************************
+ * DO NOT EDIT! THIS FILE WAS AUTO GENERATED. DO NOT EDIT! *
+ *************************************************************/
+/******************************************************************************
+ *
+ * <:copyright-BRCM:2017:DUAL/GPL:standard
+ *
+ * Copyright (c) 2017 Broadcom
+ * All Rights Reserved
+ *
+ * Unless you and Broadcom execute a separate written software license
+ * agreement governing use of this software, this software is licensed
+ * to you under the terms of the GNU General Public License version 2
+ * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
+ * with the following added to such license:
+ *
+ * As a special exception, the copyright holders of this software give
+ * you permission to link this software with independent modules, and
+ * to copy and distribute the resulting executable under terms of your
+ * choice, provided that you also meet, for each linked independent
+ * module, the terms and conditions of the license of that module.
+ * An independent module is a module which is not derived from this
+ * software. The special exception does not apply to any modifications
+ * of the software.
+ *
+ * Not withstanding the above, under no circumstances may you combine
+ * this software in any way with any other Broadcom software provided
+ * under a license other than the GPL, without Broadcom's express prior
+ * written consent.
+ *
+ * :>
+ *
+ *****************************************************************************/
+
+#if !defined(BAL_VERSION_H)
+#define BAL_VERSION_H
+
+#define BAL_VERSION "R02.02.01.139177"
+#define BAL_VERSION_STR_LEN (17)
+
+#define BAL_BUILD_DATE "Thu Mar 30 18:15:35 IDT 2017"
+#define BAL_BUILD_INFO ""
+
+#endif /* BAL_VERSION_H */