-
Notifications
You must be signed in to change notification settings - Fork 1
/
rtl_oam.hpp
161 lines (150 loc) · 3.8 KB
/
rtl_oam.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#ifndef _rtl_oam_hpp_
#define _rtl_oam_hpp_
#include <Arduino.h>
extern "C"
{
#include "oam.h"
#include "rtk_types.h"
}
class rtl_oam
{
public:
/* Function Name:
* rtl_oam_init
* Description:
* Initialize oam module.
* Input:
* None
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* Note:
* Must initialize oam module before calling any oam APIs.
*/
rtk_api_ret_t rtl_oam_init()
{
return rtk_oam_init();
}
/* Function Name:
* rtl_oam_state_set
* Description:
* This API set OAM state.
* Input:
* enabled -OAMstate
* Output:
* None.
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* RT_ERR_INPUT - Error parameter
* Note:
* This API set OAM state.
*/
rtk_api_ret_t rtl_oam_state_set(rtk_enable_t enabled)
{
return rtk_oam_state_set(enabled);
}
/* Function Name:
* rtl_oam_state_get
* Description:
* This API get OAM state.
* Input:
* None.
* Output:
* pEnabled - H/W IGMP state
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* RT_ERR_INPUT - Error parameter
* Note:
* This API set current OAM state.
*/
rtk_api_ret_t rtl_oam_state_get(rtk_enable_t *pEnabled)
{
return rtk_oam_state_get(pEnabled);
}
/* Module Name : OAM */
/* Function Name:
* rtl_oam_parserAction_set
* Description:
* Set OAM parser action
* Input:
* port - port id
* action - parser action
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_PORT_ID - invalid port id
* Note:
* None
*/
rtk_api_ret_t rtl_oam_parserAction_set(rtk_port_t port, rtk_oam_parser_act_t action)
{
return rtk_oam_parserAction_set(port, action);
}
/* Function Name:
* rtl_oam_parserAction_get
* Description:
* Get OAM parser action
* Input:
* port - port id
* Output:
* pAction - parser action
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_PORT_ID - invalid port id
* Note:
* None
*/
rtk_api_ret_t rtl_oam_parserAction_get(rtk_port_t port, rtk_oam_parser_act_t *pAction)
{
return rtk_oam_parserAction_get(port, pAction);
}
/* Function Name:
* rtl_oam_multiplexerAction_set
* Description:
* Set OAM multiplexer action
* Input:
* port - port id
* action - parser action
* Output:
* None
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_PORT_ID - invalid port id
* Note:
* None
*/
rtk_api_ret_t rtl_oam_multiplexerAction_set(rtk_port_t port, rtk_oam_multiplexer_act_t action)
{
return rtk_oam_multiplexerAction_set(port, action);
}
/* Function Name:
* rtl_oam_multiplexerAction_get
* Description:
* Get OAM multiplexer action
* Input:
* port - port id
* Output:
* pAction - parser action
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
* RT_ERR_PORT_ID - invalid port id
* Note:
* None
*/
rtk_api_ret_t rtl_oam_multiplexerAction_get(rtk_port_t port, rtk_oam_multiplexer_act_t *pAction)
{
return rtk_oam_multiplexerAction_get(port, pAction);
}
};
#endif