132 lines
5.3 KiB
C
Executable File
132 lines
5.3 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'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_OS_H
|
|
#define _BLAPI_OS_H
|
|
|
|
|
|
/**
|
|
* \file blapi_os.h
|
|
* \brief This file contains the declarations of os/kernel related business logic APIs.
|
|
* \author Bryan.Sun
|
|
* \date 2019-09-06
|
|
* \version A001
|
|
* \copyright EcoNet Inc
|
|
*/
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
* I N C L U D E S
|
|
*************************************************************************
|
|
*/
|
|
|
|
|
|
|
|
/************************************************************************
|
|
* D E F I N E S & C O N S T A N T S
|
|
*************************************************************************
|
|
*/
|
|
|
|
|
|
/************************************************************************
|
|
* M A C R O S
|
|
*************************************************************************
|
|
*/
|
|
|
|
|
|
|
|
/************************************************************************
|
|
* D A T A T Y P E S
|
|
*************************************************************************
|
|
*/
|
|
|
|
|
|
|
|
/************************************************************************
|
|
* 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 set the SKB_VLAN_ID option on socket.
|
|
*
|
|
* This function sets the SKB_VLAN_ID option for the socket referred to by the file descriptor sockfd using vlan_val.
|
|
* IP_SKB_VLAN_ID or IPV6_SKB_VLAN_ID option will be set according to the value of family.
|
|
* \param[in] sockfd The file descriptor of the socket that is to be manipulated.
|
|
* \param[in] family The address domain of the socket,it can be AF_INET or AF_INET6.
|
|
* \param[in] vlan_val Pointer to the value that the SKB_VLAN_ID option will be set.
|
|
* \retval 0 Success.
|
|
* \retval 1 Fail.
|
|
* \note
|
|
* Write the things that need to pay attention to when using this function.
|
|
* \par Example
|
|
* \snippet main.c Set the SKB_VLAN_ID option on socket
|
|
*/
|
|
int blapi_os_set_sock_vlan_val(int sockfd,int family,unsigned short *vlan_val);
|
|
|
|
/**
|
|
* \brief This function gets the SKB_VLAN_ID option on socket.
|
|
*
|
|
* This function gets the SKB_VLAN_ID option for the socket referred to by the file descriptor sockfd.The value will be put in vlan_val.
|
|
* IP_SKB_VLAN_ID or IPV6_SKB_VLAN_ID option value will be get according to the value of family.
|
|
* \param[in] sockfd The file descriptor of the socket that is to be manipulated.
|
|
* \param[in] family The address domain of the socket,it can be AF_INET or AF_INET6.
|
|
* \param[in] vlan_val Pointer to the current SKB_VLAN_ID option value.
|
|
* \retval 0 Success.
|
|
* \retval 1 Fail.
|
|
* \note
|
|
* Write the things that need to pay attention to when using this function.
|
|
* \par Example
|
|
* \snippet main.c Get the SKB_VLAN_ID option on socket
|
|
*/
|
|
int blapi_os_get_sock_vlan_val(int sockfd,int family,unsigned short *vlan_val);
|
|
|
|
|
|
#endif /*_BLAPI_LIB_OS_H*/
|