Files
Tplink-xx230v/sdk/en7529/install_bsp/inc/blapi_system.h

934 lines
27 KiB
C
Executable File

/***************************************************************
Copyright Statement:
This software/firmware and related documentation (EcoNet Software)
are protected under relevant copyright laws. The information contained herein
is confidential and proprietary to EcoNet (HK) Limited (EcoNet) and/or
its licensors. Without the prior written permission of EcoNet and/or its licensors,
any reproduction, modification, use or disclosure of EcoNet Software, and
information contained herein, in whole or in part, shall be strictly prohibited.
EcoNet (HK) Limited EcoNet. ALL RIGHTS RESERVED.
BY OPENING OR USING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY
ACKNOWLEDGES AND AGREES THAT THE SOFTWARE/FIRMWARE AND ITS
DOCUMENTATIONS (ECONET SOFTWARE) RECEIVED FROM ECONET
AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON AN AS IS
BASIS ONLY. ECONET EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
OR NON-INFRINGEMENT. NOR DOES ECONET PROVIDE ANY WARRANTY
WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTIES WHICH
MAY BE USED BY, INCORPORATED IN, OR SUPPLIED WITH THE ECONET SOFTWARE.
RECEIVER AGREES TO LOOK ONLY TO SUCH THIRD PARTIES FOR ANY AND ALL
WARRANTY CLAIMS RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
THAT IT IS RECEIVER¡¯S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD
PARTY ALL PROPER LICENSES CONTAINED IN ECONET SOFTWARE.
ECONET SHALL NOT BE RESPONSIBLE FOR ANY ECONET SOFTWARE RELEASES
MADE TO RECEIVER¡¯S SPECIFICATION OR CONFORMING TO A PARTICULAR
STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND
ECONET'S ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE ECONET
SOFTWARE RELEASED HEREUNDER SHALL BE, AT ECONET'S SOLE OPTION, TO
REVISE OR REPLACE THE ECONET SOFTWARE AT ISSUE OR REFUND ANY SOFTWARE
LICENSE FEES OR SERVICE CHARGES PAID BY RECEIVER TO ECONET FOR SUCH
ECONET SOFTWARE.
***************************************************************/
#ifndef _BLAPI_SYSTEM_H
#define _BLAPI_SYSTEM_H
/**
* \file blapi_system.h
* \brief This file is blapi system header file of business logic APIs that will be exported for others to use.
* \author Zhen.Xu
* \date 2020-01-06
* \version A001
* \copyright EcoNet Inc
*/
/************************************************************************
* I N C L U D E S
*************************************************************************
*/
#include "ecnt_event_global/ecnt_event_system.h"
/************************************************************************
* D E F I N E S & C O N S T A N T S
*************************************************************************
*/
#define PRODUCTNAMELEN 32
#define VENDORNAMELEN 32
#define ONUTYPEMASK 0xf
#define ONUMODEMASK 0xf0
#define QDMA_MASK_LAN_PAYLOAD 0x03
#define QDMA_MASK_LAN_DSCP 0x08
#define QDMA_MASK_WAN_PAYLOAD 0x30
#define QDMA_MASK_WAN_DSCP 0x80
#define ETHERLEN 6
#define SNMPSYSOBJLEN 22
#define COUNTRYCODELEN 1
/************************************************************************
* M A C R O S
*************************************************************************
*/
/************************************************************************
* D A T A T Y P E S
*************************************************************************
*/
typedef struct _url_info_cfg
{
unsigned char index;
unsigned char type; /*host or path*/
char host[32];
char path[32];
unsigned int blockedtimes;
char MacAddr[260];
}url_info_cfg;
typedef struct _urlfilter_obj_cfg_data_s
{
int index;
int mode; /* 0:black, 1:white. */
int match_all;
int port;
char domain[256];
}urlfilter_obj_cfg_data;
typedef struct _urlfilter_ioctl_cfg_data_s
{
int cmd_type;
int urlfilter_obj_cnt;
int clearbtflag;
urlfilter_obj_cfg_data *obj;
char mac_addr[20];
}urlfilter_ioctl_cfg_data;
/************************************************************************
* D A T A D E C L A R A T I O N S
*************************************************************************
*/
/************************************************************************
* F U N C T I O N D E C L A R A T I O N S
I N L I N E F U N C T I O N D E F I N I T I O N S
*************************************************************************
*/
/**
* \brief This function get the offest of mac address.
*
* This function get the offest of mac address. submit by Zhen.Xu 2019.12.04
* \param[out] addr The offest of mac address.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* Get the offest of mac address.
* \par Example
* \snippet blapi_system.c Get the offest of mac address
*/
int blapi_system_get_EtherAddr_offset(int *addr);
/**
* \brief This function get the offest of mac address.
*
* This function get the offest of mac address. submit by Zhen.Xu 2019.12.04
* \param[out] addr The offest of mac address.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* Get the offest of mac address.
* \par Example
* \snippet blapi_system.c Get the offest of mac address
*/
int blapi_system_get_EtherAddr_offset_L(long *addr);
/**
* \brief This function get the offest of onu type.
*
* This function get the offest of onu type. submit by Zhen.Xu 2019.12.04
* \param[out] addr The offest of onu type.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* Get the offest of onu type.
* \par Example
* \snippet blapi_system.c Get the offest of onu type
*/
int blapi_system_get_OnuType_offset_L(long *addr);
/**
* \brief This function get the size of tcboot.
*
* This function get the size of tcboot. submit by Zhen.Xu 2019.12.04
* \param[out] size The size of tcboot.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* Get the size of tcboot.
* \par Example
* \snippet blapi_system.c Get the size of tcboot
*/
int blapi_system_get_tcboot_size(int *size);
/**
* \brief This function get the offest of mac address range.
*
* This function get the offest of mac address range. submit by Lei.Zhang. 2019.12.25
* \param[out]addr:The offest of mac address range.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* Get the offest of mac address range.
* \par Example
* \snippet blapi_system.c the offest of mac address range.
*/
int blapi_system_get_EtherAddr_range_offset_L(long *addr);
/**
* \brief This function get the offest of product and vendor name.
*
* This function get the offest of product and vendor name.. submit by Lei.Zhang. 2019.12.25
* \param[out]productAddr:The offest of product name.
* \param[out]vendorAddr:The offest of vendor name.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* Get the offest of product and vendor name.
* \par Example
* \snippet blapi_system.c the offest of product and vendor name.
*/
int blapi_system_get_product_vendor_name_offset_L(long *productAddr, long* vendorAddr);
/**
* \brief This function get the offest of mac addr ,snmp objID and country Code.
*
* This function get the offest of mac addr ,snmp objID and country Code. submit by Lei.Zhang. 2019.12.25
* \param[out]etherAddr:The offest of mac addr.
* \param[out]snmpAddr:The offest of snmp objID.
* \param[out]countryCodeAddr:The offest of country Code.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* Get the offest of mac addr ,snmp objID and country Code.
* \par Example
* \snippet blapi_system.c get the offest of mac addr ,snmp objID and country Code.
*/
int blapi_system_get_ether_snmp_countryCode_offset_L(long *etherAddr, long* snmpAddr, long* countryCodeAddr);
/**
* \brief This function get the offest of SN.
*
* This function get the offest of SN. submit by Lei.Zhang. 2019.12.25
* \param[out]addr:The offest of SN.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* Get the offest of SN.
* \par Example
* \snippet blapi_system.c get the offest SN.
*/
int blapi_system_get_sn_offset_L(long *addr);
/**
* \brief This function will write bob to flash.
*
* This function write bob to flash. submit by Lei.Zhang. 2019.12.25.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* write bob to flash.
* \par Example
* \snippet blapi_system.c write bob to flash.
*/
int blapi_system_write_bob_to_flash(void);
/**
* \brief This function check wifidevice for write alarm information.
*
* This function check wifidevice for write alarm information. submit by Zhen.Xu 2019.12.18
* \param[out] action the action of add/del alarm information.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* check wifidevice for write alarm information.
* \par Example
* \snippet blapi_system.c check wifidevice for write alarm information.
*/
int blapi_system_check_WifiDevice(int *action);
/**
* \brief This function get the status of uplink.
*
* This function get the status of uplink.. submit by Zhen.Xu 2019.12.18
* \param[in] Mode the mode of pon type.
* \param[in] LinkSta the link status of pon.
* \param[out] tempValue the status of uplink.
* \param[in] len the size of parameter tempValue.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* get the status of uplink.
* \par Example
* \snippet blapi_system.c get the status of uplink.
*/
int blapi_system_get_UpLinkValue(char *Mode, char *LinkSta, char *tempValue, int len);
/**
* \brief This function get cpu affinity
*
* This function get cpu affinity. submit by JinChao.Yao2019.12.20
* \param[out] the value of the affinity
* \retval 0 Success.
* \note
* get the cpu affinity
* \par Example
* \snippet blapi_system.c get cpu affinity
*/
int blapi_system_get_cpu_default_affinity(unsigned long *val);
/**
* \brief This function get max receive file size
*
* This function get This function get max receive file size. submit by JinChao.Yao2019.12.23
* \param[out] the value of the the max size
* \retval 0 Success.
* \note
* get the max receive file size
* \par Example
* \snippet blapi_system.c get max receive file size
*/
int blapi_system_get_max_receive_file_size(unsigned long *val);
/**
* \brief This function is used to set lan led.
*
* This function is used to set lan led.. submit by JinChao.Yao 2019.12.26
* \param[in] the lanPort
* \param[in] the led_st
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function is used to set lan led.
* \par Example
* \snippet blapi_system.c This function is used to set lan led.
*/
int blapi_system_set_lan_led(int lanPort, int led_st);
/**
* \brief This function set secure upgrade ioctl .
*
* This function get secure upgrade ioctl .
* \param[in] length: the length of command.
* \param[in] offset: the offset of command
* \param[in] file_path: the path of command
* \param[in] firmware_type: the type of firmware.
* \retval secure header offset.
* \note
* This function get secure upgrade ioctl .
* \par Example
* \snippet blapi_system.c This function get secure upgrade ioctl .
*/
int blapi_system_secure_trx(int length, int offset, char *file_path, unsigned char firmware_type);
/**
* \brief This function set secure upgrade ioctl .
*
* This function set secure upgrade ioctl . submit by Zhen.Xu 20200107
* \param[in] length: the length of command.
* \param[in] offset: the offset of command
* \param[in] file_path: the path of command
* \param[in] firmware_type: the type of firmware.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function set secure upgrade ioctl .
* \par Example
* \snippet blapi_system.c This function set secure upgrade ioctl .
*/
int blapi_system_secure_upgrade(int length, int offset, char *file_path, unsigned char firmware_type);
/**
* \brief This function get the command of clean the hw_nat.
*
* This function get the command of clean the hw_nat. submit by Yifan.Chen 2020.1.19
* \param[out] buf: the command of clean the hw_nat.
* \param[in] size: the size of buf.
* \retval 0 Success.
* \note
* This function get the command of clean the hw_nat.
* \par Example
* \snippet blapi_system.c get the command of clean the hw_nat.
*/
int blapi_system_get_clearHWNAT_str(char *buf, int size);
/**
* \brief This function do bob carlibration.
*
* This function do bob carlibration. submit by Yifan.Chen 2020.1.17
* \retval 0 Success.
* \note
* This function do bob carlibration.
* \par Example
* \snippet blapi_system.c do bob carlibration.
*/
int blapi_system_doSysBobCarlibration();
/**
* \brief This function set boot flag.
*
* This function set boot flag. submit by Yifan.Chen 2020.1.17
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function set boot flag.
* \par Example
* \snippet blapi_system.c set boot flag.
*/
int blapi_system_set_boot_flag_swap(void);
/**
* \brief This function get current boot flag.
*
* This function get current boot flag. submit by Yifan.Chen 2020.1.17
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function set get current boot flag.
* \par Example
* \snippet blapi_system.c get current boot flag.
*/
int blapi_system_get_current_boot_flag(char *boot_flag);
/**
* \brief This function set boot flag according to tclinux.bin or tclinux_slave.bin.
*
* This function set boot flag according to tclinux.bin or tclinux_slave.bin.submit by Shengqian.Wang 2020.05.26
* \param[in] mtd: tclinux.bin or tclinux_slave.bin.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function set boot flag according to tclinux.bin or tclinux_slave.bin.
* \par Example
* \snippet blapi_system.c set boot flag according to tclinux.bin or tclinux_slave.bin.
*/
int blapi_system_set_boot_flag(char *mtd);
/**
* \brief This function check CRC algorithm.
*
* This function calculate the CRC-32 checck code. submit by Yifan.Chen 2020.1.17
* \param[in] imagefd: the first address of the block to be calculated.
* \param[in] len: number of 32 words of data block to be calculated
* \note
* This function calculate the CRC-32 checck code.
* \par Example
* \snippet blapi_system.c calculate the CRC-32 checck code.
*/
int blapi_system_calculate_crc32(int imagefd, long len, unsigned long crc);
/**
* \brief This function check image CRC.
*
* This function check image CRC. submit by Yifan.Chen 2020.1.17
* \param[in] img: the flag of boot.
* \param[out] checksum: the crc checksum.
* \note
* This function check image CRC.
* \par Example
* \snippet blapi_system.c check image CRC.
*/
int blapi_system_checkimageCrc(int img, int *checksum);
/**
* \brief This function get mtdsize.
*
* This function get mtdsize. submit by Zhen.Xu 2020.03.03
* \param[in] mtd: the name of image.
* \param[out] mtd_size: the sizeof of mtd.
* \param[out] mtd_erasesize: the size of mtd erase.
* \note
* This function get mtdsize.
* \par Example
* \snippet blapi_system.c get mtdsize.
*/
int blapi_system_get_mtdsize(char *mtd, int *mtd_size, int *mtd_erasesize);
/**
* \brief This function do RomReset.
*
* This function do RomReset.. submit by ShengQian.Wang 2020.05.19
* \param[in] :rebootFlag: 1:need reboot; 0:no need reboot.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function do RomReset.
* \par Example
* \snippet blapi_system.c do RomReset.
*/
int blapi_system_doRomReset(int rebootFlag);
/**
* \brief This function do sys mac.
*
* This function do do sys mac.. submit by ShengQian.Wang 2020.05.19
* \param[in] :mac_addr: new mac addr.
* \param[in] :mac_range: mac range.
* \param[in] :rebootFlag: 1:need reboot; 0:no need reboot.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function do RomReset.
* \par Example
* \snippet blapi_system.c do do sys mac.
*/
int blapi_system_doSysMac(unsigned char *mac_addr, unsigned char mac_range, int rebootFlag);
/**
* \brief This function do Sys Atspv show.
*
* This function do Sys Atspv show. submit by ShengQian.Wang 2020.05.19
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function do Sys Atspv.
* \par Example
* \snippet blapi_system.c do Sys Atspv.
*/
int blapi_system_do_Sys_Atspv_show();
/**
* \brief This function do Sys Atspv.
*
* This function do Sys Atspv. submit by ShengQian.Wang 2020.05.19
* \param[in] ProductName: the name of ProductName.
* \param[in] VendorName: the sizeof of VendorName.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function do Sys Atspv.
* \par Example
* \snippet blapi_system.c do Sys Atspv.
*/
int blapi_system_do_Sys_Atspv_write(char *ProductName, char *VendorName);
/**
* \brief This function do Sys Onu type.
*
* This function do Sys Onu type. submit by ShengQian.Wang 2020.05.19
* \param[in] type: onu type.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function do Sys Onu type.
* \par Example
* \snippet blapi_system.c do Sys Onu type.
*/
int blapi_system_doSysOnuType(unsigned char type);
/**
* \brief This function do Sys Onumode xxx.
*
* This function do Sys Onumode xxx. submit by ShengQian.Wang 2020.05.19
* \param[in] ponMode: onu mode.
* \param[in] wanRamMode: wan Ram mode.
* \param[in] wanPayloadMode: wanPayloadMode.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function do Sys Onumode xxx.
* \par Example
* \snippet blapi_system.c do Sys Onumode xxx.
*/
int blapi_system_doSysPONMode(unsigned char ponMode, unsigned char wanRamMode, unsigned char wanPayloadMode);
/**
* \brief This function do Sys SysQdma Init.
*
* This function do Sys SysQdma Init. submit by ShengQian.Wang 2020.05.19
* \param[in] qdmaValue: qdma value.
* \param[in] qdmaMask: qdma mask.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function do Sys SysQdma Init.
* \par Example
* \snippet blapi_system.c do Sys SysQdma Init.
*/
int blapi_system_doSysQdmaInit(unsigned char qdmaValue, unsigned char qdmaMask);
/**
* \brief This function do setbootloader.
*
* This function do setbootloader. submit by ShengQian.Wang 2020.05.19
* \param[in] mac_addr: mac address.
* \param[in] mode_name: model name .
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function do setbootloader.
* \par Example
* \snippet blapi_system.c do setbootloader.
*/
int blapi_system_setbootloader(unsigned char *mac_addr, unsigned char *mode_name);
/**
* \brief This function do Sys Atsn.
*
* This function do Sys Atsn. submit by ShengQian.Wang 2020.05.19
* \param[in] buf: new SN.
* \param[in] size: SN size.
* \param[in] addr: SN addr in boot.bin.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function do Sys Atsn.
* \par Example
* \snippet blapi_system.c do Sys Atsn.
*/
int blapi_system_doSysAtsn(char *buf, int size, long addr) ;
/**
* \brief This function get ether address.
*
* This function get ether address. submit by ShengQian.Wang 2020.05.19
* \param[out] macaddr: mac address.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function get ether address.
* \par Example
* \snippet blapi_system.c get ether address.
*/
int blapi_system_get_EtherAddr(unsigned char *macaddr);
/**
* \brief This function show Vendor name.
*
* This function show Vendor name. submit by ShengQian.Wang 2020.05.19
* \param[in] fp: boot file.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function show Vendor name.
* \par Example
* \snippet blapi_system.c show Vendor name.
*/
int blapi_system_show_Vendor_Name(FILE *fp);
/**
* \brief This function show Product name.
*
* This function show Product name. submit by ShengQian.Wang 2020.05.19
* \param[in] fp: boot file.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function show Product name.
* \par Example
* \snippet blapi_system.c show Product name.
*/
int blapi_system_show_Product_Name(FILE *fp);
/**
* \brief This function show mac address.
*
* This function show mac address. submit by ShengQian.Wang 2020.05.19
* \param[in] fp: boot file.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function show mac address.
* \par Example
* \snippet blapi_system.c show mac address.
*/
int blapi_system_show_Mac_Addr(FILE *fp);
/**
* \brief This function show snmpObjID.
*
* This function show snmpObjID. submit by ShengQian.Wang 2020.05.19
* \param[in] fp: boot file.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function show snmpObjID.
* \par Example
* \snippet blapi_system.c show snmpObjID.
*/
int blapi_system_show_snmpObjID(FILE *fp);
/**
* \brief This function show country Code.
*
* This function show country Code. submit by ShengQian.Wang 2020.05.19
* \param[in] fp: boot file.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function show country Code.
* \par Example
* \snippet blapi_system.c show country Code.
*/
int blapi_system_show_country_Code(FILE *fp);
/**
* \brief This function gets bosa temp.
*
* This function gets bosa temp. submit by ShengQian.Wang 2020.05.19
* \param[in] temp: temperature.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function gets bosa temp.
* \par Example
* \snippet blapi_system.c GetBosaTemp.
*/
int blapi_system_GetBosaTemp(int *temp);
#if defined(TCSUPPORT_CT_STBMAC_REPORT)
/**
* \brief This function check stb change.
*
* This function check stb change. submit by Peng.Ni 2020.06.23
* \param[in] void.
* \retval 0 STB not change.
* \retval 1 STB change.
* \note
* This function check stb change.
* \par Example
* \snippet blapi_system.c check_stb_change.
*/
int blapi_system_check_stb_change(void);
#endif
#if defined(TCSUPPORT_CT_PON)
int blapi_system_get_bob(char *bob, int len);
int blapi_system_set_bob(char *bob, int len);
#endif
/**
* \brief This function gets correct CPU mask when using taskset in EN7523.
*
* This function gets correct CPU mask when using taskset in EN7523. submit by Gareth.Kuo 2020.07.31
* \param[in] mask: the cpu mask of taskset.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function gets gets correct CPU mask when using taskset in EN7523.
* \par Example
* \snippet blapi_system.c CpuRemapTaskset.
*/
int blapi_system_cpu_remap_taskset(unsigned long *mask);
/**
* \brief This function is used to free vpn ip hashmap.
*
* TThis function is used to free vpn ip hashmap. submit by Jun.Wu 2020.08.20
* \param[in] idx: vpn index.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function is used to free vpn ip hashmap.
* \par Example
* \snippet blapi_system.c free ip hashmap.
*/
int blapi_system_vpn_free_ip_hashmap(int idx);
/**
* \brief This function set urlfilter enable value.
*
* This function set urlfilter enable status. submit by Lei.Zhang 2020.08.20
* \param[in] datealen: urlfilter data lenth
* \param[in] data: urlfilter enable value
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function set urlfilter enable status.
* \par Example
*/
int blapi_system_url_filter_set_enable(void *data, int datealen);
/**
* \brief This function set urlfilter mode.
*
* This function set urlfilter mode. submit by Lei.Zhang 2020.08.20
* \param[in] datealen: urlfilter data lenth
* \param[in] data: urlfilter mode value
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function set urlfilter mode.
* \par Example
*/
int blapi_system_url_filter_set_mode(void *data, int datealen);
/**
* \brief This function set urlfilter url host.
*
* This function set urlfilter url host. submit by Lei.Zhang 2020.08.20
* \param[in] cfg_urlInfo: urlfilter url host data.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function set urlfilter url host.
* \par Example
*/
int blapi_system_url_filter_set_url_host(url_info_cfg* cfg_urlInfo);
/**
* \brief This function set urlfilter url path.
*
* This function set urlfilter url host. submit by Lei.Zhang 2020.08.20
* \param[in] cfg_urlInfo: urlfilter url path data.
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function set urlfilter url path.
* \par Example
*/
int blapi_system_url_filter_set_url_path(url_info_cfg* cfg_urlInfo);
/**
* \brief This function gets urlfilter info.
*
* This function gets urlfilter info. submit by Lei.Zhang 2020.08.20
* \param[in] datealen: urlfilter data lenth
* \param[out] data: urlfilter data
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function gets urlfilter info.
* \par Example
*/
int blapi_system_url_filter_get_blocktimes(void *data, int datealen);
/**
* \brief This function clear all urlfilter rule.
*
* This function clear all urlfilter rule. submit by Lei.Zhang 2020.08.20
* \param[in] void
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function clear all urlfilter rule.
* \par Example
*/
int blapi_system_url_filter_clear_all_rule(void);
/**
* \brief This function clear urlfilter global setting.
*
* This function clear urlfilter global setting. submit by Lei.Zhang 2020.08.20
* \param[in] cfg_data: urlfilter data
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function clear all urlfilter rule.
* \par Example
*/
int blapi_system_url_filter_clear_global_setting(urlfilter_ioctl_cfg_data* cfg_data);
/**
* \brief This function clear urlfilter all basic mac rule.
*
* This function clear urlfilter all basic mac rule. submit by Lei.Zhang 2020.08.20
* \param[in] cfg_data: urlfilter data
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function clear urlfilter all basic mac rule.
* \par Example
*/
int blapi_system_url_filter_clear_all_basicmac_rule(urlfilter_ioctl_cfg_data* cfg_data);
/**
* \brief This function add urlfilter url rule
*
* This function add urlfilter url rule. submit by Lei.Zhang 2020.08.20
* \param[in] cfg_data: urlfilter data
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function add urlfilter url rule.
* \par Example
*/
int blapi_system_url_filter_add_url_rule(urlfilter_ioctl_cfg_data* cfg_data);
/**
* \brief This function get serdes selection.
*
* This function get serdes selection.
* \param[in] sel: serdes selection.
* \retval 0 pon when sel = 0,
* usb3 when sel = 1,
* pcie0 when sel = 2,
* pcie1 when sel = 3, .
* \retval 1 HSGMII.
* \retval -1 Fail.
* \note
* This function get serdes selection.
* \par Example
*/
int blapi_system_get_serdes_sel(ECNT_EVENT_SYSTEM_SERDES_SEL_t sel);
/**
* \brief This function set serdes selection.
*
* This function set serdes selection.
* \param[in] sel: serdes selection.
* \param[in] rebootFlag: 1:need reboot; 0:no need reboot.
* \param[in]isHSGMII: 1: select to HSGMII; 0:non-HSGMII(pon, usb3, pcie0 or pcie1)
* \retval 0 Success.
* \retval -1 Fail.
* \note
* This function set serdes selection.
* \par Example
*/
int blapi_system_set_serdes_sel(ECNT_EVENT_SYSTEM_SERDES_SEL_t sel, int rebootFlag, int isHSGMII);
#endif /*_BLAPI_SYSTEM_H*/