Files
kunlun/plc/cvg/nwm/inc/cvg_nwm_spg_internal.h
2024-09-28 14:24:04 +08:00

113 lines
4.4 KiB
C
Executable File

/****************************************************************************
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
be copied by any method or incorporated into another program without
the express written consent of Aerospace C.Power. This Information or any portion
thereof remains the property of Aerospace C.Power. The Information contained herein
is believed to be accurate and Aerospace C.Power assumes no responsibility or
liability for its use in any way and conveys no license or title under
any patent or copyright and makes no representation or warranty that this
Information is free from patent or copyright infringement.
****************************************************************************/
#ifndef CVG_NWM_SPG_INTERNAL_H
#define CVG_NWM_SPG_INTERNAL_H
#include "iot_config.h"
#ifdef __cplusplus
extern "C" {
#endif
#if SUPPORT_SOUTHERN_POWER_GRID
/*
* @brief cvg_nwm_sof_single_hop_rx_check_spg() - sanity check for sof
* single-hop frame
* @param: nwm -- nwm vdev pointer
* @param: fc -- ointer to frame control of the frame
* @param: data -- point to pointer to mac header. it
* will point to pointer to msdu
* payload for return.
* @param:len -- pointer to len of the data buffer.
* it will point to length of the
* msdu payload for return.
*
* @return 0 - for success case
* @return otherwise - error code
*/
uint8_t cvg_nwm_sof_single_hop_rx_check_spg(cvg_nwm_vdev_t *nwm,
spg_frame_control_t *fc, uint8_t **data, uint32_t *len);
/*
* @brief cvg_nwm_sof_rx_check_spg() - sanity check for sof frame
* @param: nwm -- nwm vdev pointer
* @param: fc -- ointer to frame control of the frame
* @param: data -- point to pointer to mac header. it
* will point to pointer to msdu
* payload for return.
* @param:len -- pointer to len of the data buffer.
* it will point to length of the
* msdu payload for return.
*
* @return 0 - for success case
* @return otherwise - error code
*/
uint8_t cvg_nwm_sof_rx_check_spg(cvg_nwm_vdev_t *nwm, spg_frame_control_t *fc,
uint8_t **data, uint32_t *len);
/**
* @brief cvg_nwm_cert_test_sof_rx_check_spg() - sanity check for cert test sof
* frame.
* @param nwm: - nwm vdev pointer
* @param fc: - pointer to frame control of the frame
* @param data: - point to pointer to mac header.
* it will point to pointer to msdu payload for return.
* @param len: - pointer to len of the data buffer.
* it will point to length of the msdu payload for return.
* @retval: ERR_OK - for success case
* @retval: otherwise - error code
*/
uint8_t cvg_nwm_cert_test_sof_rx_check_spg(cvg_nwm_vdev_t *nwm,
spg_frame_control_t *fc, uint8_t **data, uint32_t *len);
/**
* @brief cvg_nwm_msdu_rx_check_spg() - sanity check for spg msdu frame.
* @param: nwm -- nwm vdev pointer
* @param: data -- point to pointer to msdu header. it will point to pointer to
* msdu payload for return.
* @param: len -- pointer to len of the data buffer. it will point to length
* of the msdu payload for return.
* @param: is_short -- 1 - msdu short header, 0 - msdu long header.
* @return 0 - for fail case
* @return otherwise - msdu type.
*/
uint16_t cvg_nwm_msdu_rx_check_spg(cvg_nwm_vdev_t *nwm, uint8_t **data,
uint32_t *len, uint16_t is_short);
/**
* @brief cvg_nwm_cert_test_cmd_rx_check_spg() - sanity check for spg cert
* test command frame.
* @param nwm: - nwm vdev pointer
* @param: data - point to pointer spg cert test header.
* it will point to pointer to cert test cmd for return.
* @param: len - pointer to len of the data buffer.
* it will point to length of the data for return.
* @return 0 - for fail case
* @return otherwise - cert test command type, see SPG_CERT_TEST_PORT_XXX
*/
uint8_t cvg_nwm_cert_test_cmd_rx_check_spg(cvg_nwm_vdev_t *nwm,
uint8_t **data, uint32_t *len);
#endif /* SUPPORT_SOUTHERN_POWER_GRID */
#ifdef __cplusplus
}
#endif
#endif /* CVG_NWM_SPG_INTERNAL_H */