mirror of
https://github.com/plappermaul/realtek-doc.git
synced 2025-12-10 07:44:41 +01:00
196 lines
5.1 KiB
C
Executable file
196 lines
5.1 KiB
C
Executable file
/*
|
|
* Copyright (C) 2012 Realtek Semiconductor Corp.
|
|
* All Rights Reserved.
|
|
*
|
|
* This program is the proprietary software of Realtek Semiconductor
|
|
* Corporation and/or its licensors, and only be used, duplicated,
|
|
* modified or distributed under the authorized license from Realtek.
|
|
*
|
|
* ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER
|
|
* THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
|
*
|
|
* $Revision: 39101 $
|
|
* $Date: 2013-05-03 17:35:27 +0800 (星期五, 03 五月 2013) $
|
|
*
|
|
* Purpose : Definition of TRAP API
|
|
*
|
|
* Feature : The file includes the following modules and sub-modules
|
|
* (1) Configuration for traping packet to CPU
|
|
* (2) RMA
|
|
* (3) User defined RMA
|
|
* (4) System-wise management frame
|
|
* (5) System-wise user defined management frame
|
|
* (6) Per port user defined management frame
|
|
* (7) Packet with special flag or option
|
|
* (8) CFM and OAM packet
|
|
*
|
|
*/
|
|
|
|
#ifndef __DAL_CA8277B_TRAP_H__
|
|
#define __DAL_CA8277B_TRAP_H__
|
|
|
|
|
|
/*
|
|
* Include Files
|
|
*/
|
|
#include <common/rt_error.h>
|
|
#include <common/rt_type.h>
|
|
#include <rtk/epon.h>
|
|
|
|
|
|
/*
|
|
* Symbol Definition
|
|
*/
|
|
|
|
|
|
/*
|
|
* Data Declaration
|
|
*/
|
|
/* Function Name:
|
|
* dal_ca8277b_trap_init
|
|
* Description:
|
|
* Initial the trap module of the specified device..
|
|
* Input:
|
|
* unit - unit id
|
|
* Output:
|
|
* None.
|
|
* Return:
|
|
* RT_ERR_OK
|
|
* RT_ERR_FAILED
|
|
* Note:
|
|
* None
|
|
*/
|
|
extern int32
|
|
dal_ca8277b_trap_init(void);
|
|
|
|
/* Function Name:
|
|
* dal_ca8277b_trap_portIgmpMldCtrlPktAction_get
|
|
* Description:
|
|
* Get the configuration about MLD control packets Action
|
|
* Input:
|
|
* port - The ingress port ID.
|
|
* igmpMldType - IGMP/MLD protocol type;
|
|
* Output:
|
|
* pAction - Action of IGMP/MLD control packet
|
|
* Return:
|
|
* RT_ERR_OK
|
|
* RT_ERR_FAILED
|
|
* RT_ERR_PORT_ID
|
|
* RT_ERR_INPUT
|
|
* RT_ERR_NULL_POINTER - NULL pointer
|
|
* Note:
|
|
* None.
|
|
*/
|
|
extern int32
|
|
dal_ca8277b_trap_portIgmpMldCtrlPktAction_get(rtk_port_t port, rtk_trap_igmpMld_type_t igmpMldType, rtk_action_t *pAction);
|
|
|
|
/* Function Name:
|
|
* dal_ca8277b_trap_portIgmpMldCtrlPktAction_set
|
|
* Description:
|
|
* Set the configuration about MLD control packets Action
|
|
* Input:
|
|
* port - The ingress port ID.
|
|
* igmpMldType - IGMP/MLD protocol type;
|
|
* action - Action of IGMP/MLD control packet
|
|
* Output:
|
|
* None.
|
|
* Return:
|
|
* RT_ERR_OK
|
|
* RT_ERR_FAILED
|
|
* RT_ERR_PORT_ID
|
|
* RT_ERR_INPUT
|
|
* Note:
|
|
* None.
|
|
*/
|
|
extern int32
|
|
dal_ca8277b_trap_portIgmpMldCtrlPktAction_set(rtk_port_t port, rtk_trap_igmpMld_type_t igmpMldType, rtk_action_t action);
|
|
|
|
/* Function Name:
|
|
* dal_ca8277b_trap_oamPduAction_get
|
|
* Description:
|
|
* Get forwarding action of trapped oam PDU on specified port.
|
|
* Input:
|
|
* None.
|
|
* Output:
|
|
* pAction - pointer to forwarding action of trapped oam PDU
|
|
* Return:
|
|
* RT_ERR_OK
|
|
* RT_ERR_FAILED
|
|
* RT_ERR_NOT_INIT - The module is not initial
|
|
* RT_ERR_PORT_ID - invalid port id
|
|
* RT_ERR_NULL_POINTER - input parameter may be null pointer
|
|
* Note:
|
|
* Forwarding action is as following
|
|
* - ACTION_FORWARD
|
|
* - ACTION_TRAP2CPU
|
|
*/
|
|
extern int32
|
|
dal_ca8277b_trap_oamPduAction_get(rtk_action_t *pAction);
|
|
|
|
/* Function Name:
|
|
* dal_ca8277b_trap_oamPduAction_set
|
|
* Description:
|
|
* Set forwarding action of trapped oam PDU on specified port.
|
|
* Input:
|
|
* action - forwarding action of trapped oam PDU
|
|
* Output:
|
|
* None
|
|
* Return:
|
|
* RT_ERR_OK
|
|
* RT_ERR_FAILED
|
|
* RT_ERR_NOT_INIT - The module is not initial
|
|
* RT_ERR_PORT_ID - invalid port id
|
|
* RT_ERR_FWD_ACTION - invalid forwarding action
|
|
* Note:
|
|
* Forwarding action is as following
|
|
* - ACTION_FORWARD
|
|
* - ACTION_TRAP2CPU
|
|
*/
|
|
extern int32
|
|
dal_ca8277b_trap_oamPduAction_set(rtk_action_t action);
|
|
|
|
/* Function Name:
|
|
* dal_ca8277b_trap_omciAction_get
|
|
* Description:
|
|
* Get forwarding action of trapped omci PDU on specified port.
|
|
* Input:
|
|
* None.
|
|
* Output:
|
|
* pAction - pointer to forwarding action of trapped omci PDU
|
|
* Return:
|
|
* RT_ERR_OK
|
|
* RT_ERR_FAILED
|
|
* RT_ERR_NOT_INIT - The module is not initial
|
|
* RT_ERR_PORT_ID - invalid port id
|
|
* RT_ERR_NULL_POINTER - input parameter may be null pointer
|
|
* Note:
|
|
* Forwarding action is as following
|
|
* - ACTION_FORWARD
|
|
* - ACTION_TRAP2CPU
|
|
*/
|
|
extern int32
|
|
dal_ca8277b_trap_omciAction_get(rtk_action_t *pAction);
|
|
|
|
/* Function Name:
|
|
* dal_ca8277b_trap_omciAction_set
|
|
* Description:
|
|
* Set forwarding action of trapped omci PDU on specified port.
|
|
* Input:
|
|
* action - forwarding action of trapped omci PDU
|
|
* Output:
|
|
* None
|
|
* Return:
|
|
* RT_ERR_OK
|
|
* RT_ERR_FAILED
|
|
* RT_ERR_NOT_INIT - The module is not initial
|
|
* RT_ERR_PORT_ID - invalid port id
|
|
* RT_ERR_FWD_ACTION - invalid forwarding action
|
|
* Note:
|
|
* Forwarding action is as following
|
|
* - ACTION_FORWARD
|
|
* - ACTION_TRAP2CPU
|
|
*/
|
|
extern int32
|
|
dal_ca8277b_trap_omciAction_set(rtk_action_t action);
|
|
|
|
#endif /* __DAL_CA8277B_TRAP_H__ */
|