/* | |
<: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 ENCRYPT_OAM_H_ | |
#define ENCRYPT_OAM_H_ | |
#include "oam_defs.h" | |
#include "bcmolt_epon_hde.h" | |
/* Send a Encryption Request OAM to ONU. */ | |
bcmos_errno dpoe_encrypt_oam_set_request_send( | |
const hde_key *hde_link, | |
uint16_t period, | |
dpoe_encrypt_mode encrypt_mode, | |
bcmos_mac_address pon_mac); | |
/* Attempt to parse a DPoE set response and fill in the values of the two TLVs we initially sent down. | |
* This will return BCM_ERR_PARSE if it fails to fill in either of the TLVs. | |
*/ | |
bcmos_errno dpoe_encrypt_oam_parse_set_response( | |
const bcmolt_u8_list_u32 *frame, | |
uint8_t *encrypt_mode_response, | |
uint8_t *key_expiry_response); | |
/* Attempts to parse an OAM frame and fill in the values of new_key and key_choice from that frame. | |
* This will return BCM_ERR_PARSE if it fails to fill in either new_key or key_choice. | |
*/ | |
bcmos_errno dpoe_encrypt_oam_parse_new_key( | |
const bcmolt_u8_list_u32 *frame, | |
uint8_t *new_key, | |
bcmolt_epon_key_choice *key_choice); | |
#endif /* ENCRYPT_OAM_H_ */ |