| /* |
| <:copyright-BRCM:2016:DUAL/GPL:standard |
| |
| Broadcom Proprietary and Confidential.(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 _BCMOLT_EON_H_ |
| #define _BCMOLT_EON_H_ |
| |
| #include <bcmos_system.h> |
| #include <bcmolt_api.h> |
| #include <bcmolt_model_types.h> |
| #include <bcmcli.h> |
| |
| /* uniquely identifies specific EPON links under management by this application */ |
| typedef struct |
| { |
| bcmolt_devid device_id; |
| bcmolt_epon_link_key link; |
| } eon_link_key; |
| |
| typedef enum |
| { |
| EON_OAM_SET_ID_DPOE, |
| EON_OAM_SET_ID_BRCM, |
| EON_OAM_SET_ID_CTC, |
| |
| EON_OAM_SET_ID_COUNT |
| } eon_oam_set_id; |
| |
| /* signature of optional callback function used to report outcomes of OAM negotiations */ |
| typedef void (*bcmolt_eon_result_cb)(void *context, const eon_link_key *link_key, bcmos_errno result); |
| |
| typedef struct |
| { |
| bcmolt_epon_link_key link_key; |
| eon_oam_set_id oam_set; |
| bcmolt_eon_result_cb cb; |
| void *context; |
| bcmos_bool is_heartbeat_autostart; |
| } eon_task_start_data; |
| |
| typedef struct |
| { |
| bcmolt_epon_link_key link_key; |
| } eon_task_stop_data; |
| |
| typedef struct |
| { |
| bcmolt_proxy_rx *rx; |
| } eon_task_proxy_rx_data; |
| |
| typedef union |
| { |
| eon_task_start_data start; |
| eon_task_stop_data stop; |
| eon_task_proxy_rx_data proxy_rx; |
| } eon_task_msg_data; |
| |
| typedef struct |
| { |
| bcmos_msg os_msg; |
| eon_task_msg_data data; |
| } eon_task_msg; |
| |
| // initialize the EPON OAM negotiation application (should be called as part of user application startup) |
| extern void bcmolt_user_appl_eon_init(void); |
| |
| // process a proxy rx |
| bcmos_errno bcmolt_user_appl_eon_process_rx(bcmolt_devid device_id, bcmolt_proxy_rx *proxy_rx); |
| |
| // initialize EON CLI |
| void bcmolt_user_appl_eon_cli_init(bcmcli_entry *top_dir); |
| |
| #endif |