2 * Copyright (C) 2013 Realtek Semiconductor Corp.
5 * Unless you and Realtek execute a separate written software license
6 * agreement governing use of this software, this software is licensed
7 * to you under the terms of the GNU General Public License version 2,
8 * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
10 * Purpose : RTL8367/RTL8367C switch high-level API
12 * Feature : The file includes Trap module high-layer VLAN defination
16 #ifndef __RTK_API_VLAN_H__
17 #define __RTK_API_VLAN_H__
21 * Data Type Declaration
23 #define RTK_MAX_NUM_OF_PROTO_TYPE 0xFFFF
24 #define RTK_MAX_NUM_OF_MSTI 0xF
25 #define RTK_FID_MAX 0xF
27 typedef struct rtk_vlan_cfg_s
39 typedef struct rtk_vlan_mbrcfg_s
50 typedef rtk_uint32 rtk_stp_msti_id_t
; /* MSTI ID */
52 typedef enum rtk_stp_state_e
54 STP_STATE_DISABLED
= 0,
61 typedef rtk_uint32 rtk_vlan_proto_type_t
; /* protocol and port based VLAN protocol type */
64 typedef enum rtk_vlan_acceptFrameType_e
66 ACCEPT_FRAME_TYPE_ALL
= 0, /* untagged, priority-tagged and tagged */
67 ACCEPT_FRAME_TYPE_TAG_ONLY
, /* tagged */
68 ACCEPT_FRAME_TYPE_UNTAG_ONLY
, /* untagged and priority-tagged */
70 } rtk_vlan_acceptFrameType_t
;
73 /* frame type of protocol vlan - reference 802.1v standard */
74 typedef enum rtk_vlan_protoVlan_frameType_e
76 FRAME_TYPE_ETHERNET
= 0,
80 } rtk_vlan_protoVlan_frameType_t
;
82 /* Protocol-and-port-based Vlan structure */
83 typedef struct rtk_vlan_protoAndPortInfo_s
85 rtk_uint32 proto_type
;
86 rtk_vlan_protoVlan_frameType_t frame_type
;
89 }rtk_vlan_protoAndPortInfo_t
;
91 /* tagged mode of VLAN - reference realtek private specification */
92 typedef enum rtk_vlan_tagMode_e
94 VLAN_TAG_MODE_ORIGINAL
= 0,
95 VLAN_TAG_MODE_KEEP_FORMAT
,
97 VLAN_TAG_MODE_REAL_KEEP_FORMAT
,
101 typedef enum rtk_vlan_resVidAction_e
103 RESVID_ACTION_UNTAG
= 0,
107 rtk_vlan_resVidAction_t
;
119 * RT_ERR_FAILED - Failed
120 * RT_ERR_SMI - SMI access error
122 * VLAN is disabled by default. User has to call this API to enable VLAN before
123 * using it. And It will set a default VLAN(vid 1) including all ports and set
124 * all ports PVID to the default VLAN.
126 extern rtk_api_ret_t
rtk_vlan_init(void);
133 * vid - VLAN ID to configure.
134 * pVlanCfg - VLAN Configuration
139 * RT_ERR_FAILED - Failed
140 * RT_ERR_SMI - SMI access error
141 * RT_ERR_INPUT - Invalid input parameters.
142 * RT_ERR_L2_FID - Invalid FID.
143 * RT_ERR_VLAN_PORT_MBR_EXIST - Invalid member port mask.
144 * RT_ERR_VLAN_VID - Invalid VID parameter.
148 extern rtk_api_ret_t
rtk_vlan_set(rtk_vlan_t vid
, rtk_vlan_cfg_t
*pVlanCfg
);
155 * vid - VLAN ID to configure.
157 * pVlanCfg - VLAN Configuration
160 * RT_ERR_FAILED - Failed
161 * RT_ERR_SMI - SMI access error
162 * RT_ERR_INPUT - Invalid input parameters.
163 * RT_ERR_VLAN_VID - Invalid VID parameter.
167 extern rtk_api_ret_t
rtk_vlan_get(rtk_vlan_t vid
, rtk_vlan_cfg_t
*pVlanCfg
);
170 * rtk_vlan_egrFilterEnable_set
172 * Set VLAN egress filter.
174 * egrFilter - Egress filtering
179 * RT_ERR_FAILED - Failed
180 * RT_ERR_SMI - SMI access error
181 * RT_ERR_ENABLE - Invalid input parameters.
185 extern rtk_api_ret_t
rtk_vlan_egrFilterEnable_set(rtk_enable_t egrFilter
);
188 * rtk_vlan_egrFilterEnable_get
190 * Get VLAN egress filter.
192 * pEgrFilter - Egress filtering
197 * RT_ERR_FAILED - Failed
198 * RT_ERR_SMI - SMI access error
199 * RT_ERR_NULL_POINTER - NULL Pointer.
203 extern rtk_api_ret_t
rtk_vlan_egrFilterEnable_get(rtk_enable_t
*pEgrFilter
);
206 * rtk_vlan_mbrCfg_set
208 * Set a VLAN Member Configuration entry by index.
210 * idx - Index of VLAN Member Configuration.
211 * pMbrcfg - VLAN member Configuration.
216 * RT_ERR_FAILED - Failed
217 * RT_ERR_SMI - SMI access error
218 * RT_ERR_INPUT - Invalid input parameters.
219 * RT_ERR_VLAN_VID - Invalid VID parameter.
221 * Set a VLAN Member Configuration entry by index.
223 extern rtk_api_ret_t
rtk_vlan_mbrCfg_set(rtk_uint32 idx
, rtk_vlan_mbrcfg_t
*pMbrcfg
);
226 * rtk_vlan_mbrCfg_get
228 * Get a VLAN Member Configuration entry by index.
230 * idx - Index of VLAN Member Configuration.
232 * pMbrcfg - VLAN member Configuration.
235 * RT_ERR_FAILED - Failed
236 * RT_ERR_SMI - SMI access error
237 * RT_ERR_INPUT - Invalid input parameters.
238 * RT_ERR_VLAN_VID - Invalid VID parameter.
240 * Get a VLAN Member Configuration entry by index.
242 extern rtk_api_ret_t
rtk_vlan_mbrCfg_get(rtk_uint32 idx
, rtk_vlan_mbrcfg_t
*pMbrcfg
);
245 * rtk_vlan_portPvid_set
247 * Set port to specified VLAN ID(PVID).
250 * pvid - Specified VLAN ID.
251 * priority - 802.1p priority for the PVID.
256 * RT_ERR_FAILED - Failed
257 * RT_ERR_SMI - SMI access error
258 * RT_ERR_PORT_ID - Invalid port number.
259 * RT_ERR_VLAN_PRIORITY - Invalid priority.
260 * RT_ERR_VLAN_ENTRY_NOT_FOUND - VLAN entry not found.
261 * RT_ERR_VLAN_VID - Invalid VID parameter.
263 * The API is used for Port-based VLAN. The untagged frame received from the
264 * port will be classified to the specified VLAN and assigned to the specified priority.
266 extern rtk_api_ret_t
rtk_vlan_portPvid_set(rtk_port_t port
, rtk_vlan_t pvid
, rtk_pri_t priority
);
269 * rtk_vlan_portPvid_get
271 * Get VLAN ID(PVID) on specified port.
275 * pPvid - Specified VLAN ID.
276 * pPriority - 802.1p priority for the PVID.
279 * RT_ERR_FAILED - Failed
280 * RT_ERR_SMI - SMI access error
281 * RT_ERR_INPUT - Invalid input parameters.
282 * RT_ERR_PORT_ID - Invalid port number.
284 * The API can get the PVID and 802.1p priority for the PVID of Port-based VLAN.
286 extern rtk_api_ret_t
rtk_vlan_portPvid_get(rtk_port_t port
, rtk_vlan_t
*pPvid
, rtk_pri_t
*pPriority
);
289 * rtk_vlan_portIgrFilterEnable_set
291 * Set VLAN ingress for each port.
294 * igr_filter - VLAN ingress function enable status.
299 * RT_ERR_FAILED - Failed
300 * RT_ERR_SMI - SMI access error
301 * RT_ERR_PORT_ID - Invalid port number
302 * RT_ERR_ENABLE - Invalid enable input
304 * The status of vlan ingress filter is as following:
307 * While VLAN function is enabled, ASIC will decide VLAN ID for each received frame and get belonged member
308 * ports from VLAN table. If received port is not belonged to VLAN member ports, ASIC will drop received frame if VLAN ingress function is enabled.
310 extern rtk_api_ret_t
rtk_vlan_portIgrFilterEnable_set(rtk_port_t port
, rtk_enable_t igr_filter
);
313 * rtk_vlan_portIgrFilterEnable_get
315 * Get VLAN Ingress Filter
319 * pIgr_filter - VLAN ingress function enable status.
322 * RT_ERR_FAILED - Failed
323 * RT_ERR_SMI - SMI access error
324 * RT_ERR_INPUT - Invalid input parameters.
325 * RT_ERR_PORT_ID - Invalid port number.
327 * The API can Get the VLAN ingress filter status.
328 * The status of vlan ingress filter is as following:
332 extern rtk_api_ret_t
rtk_vlan_portIgrFilterEnable_get(rtk_port_t port
, rtk_enable_t
*pIgr_filter
);
335 * rtk_vlan_portAcceptFrameType_set
337 * Set VLAN accept_frame_type
340 * accept_frame_type - accept frame type
345 * RT_ERR_FAILED - Failed
346 * RT_ERR_SMI - SMI access error
347 * RT_ERR_PORT_ID - Invalid port number.
348 * RT_ERR_VLAN_ACCEPT_FRAME_TYPE - Invalid frame type.
350 * The API is used for checking 802.1Q tagged frames.
351 * The accept frame type as following:
352 * - ACCEPT_FRAME_TYPE_ALL
353 * - ACCEPT_FRAME_TYPE_TAG_ONLY
354 * - ACCEPT_FRAME_TYPE_UNTAG_ONLY
356 extern rtk_api_ret_t
rtk_vlan_portAcceptFrameType_set(rtk_port_t port
, rtk_vlan_acceptFrameType_t accept_frame_type
);
359 * rtk_vlan_portAcceptFrameType_get
361 * Get VLAN accept_frame_type
365 * pAccept_frame_type - accept frame type
368 * RT_ERR_FAILED - Failed
369 * RT_ERR_SMI - SMI access error
370 * RT_ERR_INPUT - Invalid input parameters.
371 * RT_ERR_PORT_ID - Invalid port number.
373 * The API can Get the VLAN ingress filter.
374 * The accept frame type as following:
375 * - ACCEPT_FRAME_TYPE_ALL
376 * - ACCEPT_FRAME_TYPE_TAG_ONLY
377 * - ACCEPT_FRAME_TYPE_UNTAG_ONLY
379 extern rtk_api_ret_t
rtk_vlan_portAcceptFrameType_get(rtk_port_t port
, rtk_vlan_acceptFrameType_t
*pAccept_frame_type
);
382 * rtk_vlan_tagMode_set
384 * Set CVLAN egress tag mode
387 * tag_mode - The egress tag mode.
392 * RT_ERR_FAILED - Failed
393 * RT_ERR_SMI - SMI access error
394 * RT_ERR_PORT_ID - Invalid port number.
395 * RT_ERR_INPUT - Invalid input parameter.
396 * RT_ERR_ENABLE - Invalid enable input.
398 * The API can set Egress tag mode. There are 4 mode for egress tag:
399 * - VLAN_TAG_MODE_ORIGINAL,
400 * - VLAN_TAG_MODE_KEEP_FORMAT,
401 * - VLAN_TAG_MODE_PRI.
402 * - VLAN_TAG_MODE_REAL_KEEP_FORMAT,
404 extern rtk_api_ret_t
rtk_vlan_tagMode_set(rtk_port_t port
, rtk_vlan_tagMode_t tag_mode
);
407 * rtk_vlan_tagMode_get
409 * Get CVLAN egress tag mode
413 * pTag_mode - The egress tag mode.
416 * RT_ERR_FAILED - Failed
417 * RT_ERR_SMI - SMI access error
418 * RT_ERR_INPUT - Invalid input parameters.
419 * RT_ERR_PORT_ID - Invalid port number.
421 * The API can get Egress tag mode. There are 4 mode for egress tag:
422 * - VLAN_TAG_MODE_ORIGINAL,
423 * - VLAN_TAG_MODE_KEEP_FORMAT,
424 * - VLAN_TAG_MODE_PRI.
425 * - VLAN_TAG_MODE_REAL_KEEP_FORMAT,
427 extern rtk_api_ret_t
rtk_vlan_tagMode_get(rtk_port_t port
, rtk_vlan_tagMode_t
*pTag_mode
);
430 * rtk_vlan_transparent_set
432 * Set VLAN transparent mode
434 * egr_port - Egress Port id.
435 * pIgr_pmask - Ingress Port Mask.
440 * RT_ERR_FAILED - Failed
441 * RT_ERR_SMI - SMI access error
442 * RT_ERR_INPUT - Invalid input parameters.
443 * RT_ERR_PORT_ID - Invalid port number.
447 extern rtk_api_ret_t
rtk_vlan_transparent_set(rtk_port_t egr_port
, rtk_portmask_t
*pIgr_pmask
);
450 * rtk_vlan_transparent_get
452 * Get VLAN transparent mode
454 * egr_port - Egress Port id.
456 * pIgr_pmask - Ingress Port Mask
459 * RT_ERR_FAILED - Failed
460 * RT_ERR_SMI - SMI access error
461 * RT_ERR_INPUT - Invalid input parameters.
462 * RT_ERR_PORT_ID - Invalid port number.
466 extern rtk_api_ret_t
rtk_vlan_transparent_get(rtk_port_t egr_port
, rtk_portmask_t
*pIgr_pmask
);
471 * Set VLAN egress keep mode
473 * egr_port - Egress Port id.
474 * pIgr_pmask - Ingress Port Mask.
479 * RT_ERR_FAILED - Failed
480 * RT_ERR_SMI - SMI access error
481 * RT_ERR_INPUT - Invalid input parameters.
482 * RT_ERR_PORT_ID - Invalid port number.
486 extern rtk_api_ret_t
rtk_vlan_keep_set(rtk_port_t egr_port
, rtk_portmask_t
*pIgr_pmask
);
491 * Get VLAN egress keep mode
493 * egr_port - Egress Port id.
495 * pIgr_pmask - Ingress Port Mask
498 * RT_ERR_FAILED - Failed
499 * RT_ERR_SMI - SMI access error
500 * RT_ERR_INPUT - Invalid input parameters.
501 * RT_ERR_PORT_ID - Invalid port number.
505 extern rtk_api_ret_t
rtk_vlan_keep_get(rtk_port_t egr_port
, rtk_portmask_t
*pIgr_pmask
);
510 * Set spanning tree group instance of the vlan to the specified device
512 * vid - Specified VLAN ID.
513 * stg - spanning tree group instance.
518 * RT_ERR_FAILED - Failed
519 * RT_ERR_SMI - SMI access error
520 * RT_ERR_MSTI - Invalid msti parameter
521 * RT_ERR_INPUT - Invalid input parameter.
522 * RT_ERR_VLAN_VID - Invalid VID parameter.
524 * The API can set spanning tree group instance of the vlan to the specified device.
526 extern rtk_api_ret_t
rtk_vlan_stg_set(rtk_vlan_t vid
, rtk_stp_msti_id_t stg
);
531 * Get spanning tree group instance of the vlan to the specified device
533 * vid - Specified VLAN ID.
535 * pStg - spanning tree group instance.
538 * RT_ERR_FAILED - Failed
539 * RT_ERR_SMI - SMI access error
540 * RT_ERR_INPUT - Invalid input parameters.
541 * RT_ERR_VLAN_VID - Invalid VID parameter.
543 * The API can get spanning tree group instance of the vlan to the specified device.
545 extern rtk_api_ret_t
rtk_vlan_stg_get(rtk_vlan_t vid
, rtk_stp_msti_id_t
*pStg
);
548 * rtk_vlan_protoAndPortBasedVlan_add
550 * Add the protocol-and-port-based vlan to the specified port of device.
553 * pInfo - Protocol and port based VLAN configuration information.
558 * RT_ERR_FAILED - Failed
559 * RT_ERR_SMI - SMI access error
560 * RT_ERR_PORT_ID - Invalid port number.
561 * RT_ERR_VLAN_VID - Invalid VID parameter.
562 * RT_ERR_VLAN_PRIORITY - Invalid priority.
563 * RT_ERR_TBL_FULL - Table is full.
564 * RT_ERR_OUT_OF_RANGE - input out of range.
566 * The incoming packet which match the protocol-and-port-based vlan will use the configure vid for ingress pipeline
567 * The frame type is shown in the following:
568 * - FRAME_TYPE_ETHERNET
569 * - FRAME_TYPE_RFC1042
570 * - FRAME_TYPE_LLCOTHER
572 extern rtk_api_ret_t
rtk_vlan_protoAndPortBasedVlan_add(rtk_port_t port
, rtk_vlan_protoAndPortInfo_t
*pInfo
);
575 * rtk_vlan_protoAndPortBasedVlan_get
577 * Get the protocol-and-port-based vlan to the specified port of device.
580 * proto_type - protocol-and-port-based vlan protocol type.
581 * frame_type - protocol-and-port-based vlan frame type.
583 * pInfo - Protocol and port based VLAN configuration information.
586 * RT_ERR_FAILED - Failed
587 * RT_ERR_SMI - SMI access error
588 * RT_ERR_PORT_ID - Invalid port number.
589 * RT_ERR_OUT_OF_RANGE - input out of range.
590 * RT_ERR_TBL_FULL - Table is full.
592 * The incoming packet which match the protocol-and-port-based vlan will use the configure vid for ingress pipeline
593 * The frame type is shown in the following:
594 * - FRAME_TYPE_ETHERNET
595 * - FRAME_TYPE_RFC1042
596 * - FRAME_TYPE_LLCOTHER
598 extern rtk_api_ret_t
rtk_vlan_protoAndPortBasedVlan_get(rtk_port_t port
, rtk_vlan_proto_type_t proto_type
, rtk_vlan_protoVlan_frameType_t frame_type
, rtk_vlan_protoAndPortInfo_t
*pInfo
);
601 * rtk_vlan_protoAndPortBasedVlan_del
603 * Delete the protocol-and-port-based vlan from the specified port of device.
606 * proto_type - protocol-and-port-based vlan protocol type.
607 * frame_type - protocol-and-port-based vlan frame type.
612 * RT_ERR_FAILED - Failed
613 * RT_ERR_SMI - SMI access error
614 * RT_ERR_PORT_ID - Invalid port number.
615 * RT_ERR_OUT_OF_RANGE - input out of range.
616 * RT_ERR_TBL_FULL - Table is full.
618 * The incoming packet which match the protocol-and-port-based vlan will use the configure vid for ingress pipeline
619 * The frame type is shown in the following:
620 * - FRAME_TYPE_ETHERNET
621 * - FRAME_TYPE_RFC1042
622 * - FRAME_TYPE_LLCOTHER
624 extern rtk_api_ret_t
rtk_vlan_protoAndPortBasedVlan_del(rtk_port_t port
, rtk_vlan_proto_type_t proto_type
, rtk_vlan_protoVlan_frameType_t frame_type
);
627 * rtk_vlan_protoAndPortBasedVlan_delAll
629 * Delete all protocol-and-port-based vlans from the specified port of device.
636 * RT_ERR_FAILED - Failed
637 * RT_ERR_SMI - SMI access error
638 * RT_ERR_PORT_ID - Invalid port number.
639 * RT_ERR_OUT_OF_RANGE - input out of range.
641 * The incoming packet which match the protocol-and-port-based vlan will use the configure vid for ingress pipeline
642 * Delete all flow table protocol-and-port-based vlan entries.
644 extern rtk_api_ret_t
rtk_vlan_protoAndPortBasedVlan_delAll(rtk_port_t port
);
647 * rtk_vlan_portFid_set
649 * Set port-based filtering database
652 * enable - ebable port-based FID
653 * fid - Specified filtering database.
658 * RT_ERR_FAILED - Failed
659 * RT_ERR_SMI - SMI access error
660 * RT_ERR_L2_FID - Invalid fid.
661 * RT_ERR_INPUT - Invalid input parameter.
662 * RT_ERR_PORT_ID - Invalid port ID.
664 * The API can set port-based filtering database. If the function is enabled, all input
665 * packets will be assigned to the port-based fid regardless vlan tag.
667 extern rtk_api_ret_t
rtk_vlan_portFid_set(rtk_port_t port
, rtk_enable_t enable
, rtk_fid_t fid
);
670 * rtk_vlan_portFid_get
672 * Get port-based filtering database
676 * pEnable - ebable port-based FID
677 * pFid - Specified filtering database.
680 * RT_ERR_FAILED - Failed
681 * RT_ERR_SMI - SMI access error
682 * RT_ERR_INPUT - Invalid input parameters.
683 * RT_ERR_PORT_ID - Invalid port ID.
685 * The API can get port-based filtering database status. If the function is enabled, all input
686 * packets will be assigned to the port-based fid regardless vlan tag.
688 extern rtk_api_ret_t
rtk_vlan_portFid_get(rtk_port_t port
, rtk_enable_t
*pEnable
, rtk_fid_t
*pFid
);
691 * rtk_vlan_UntagDscpPriorityEnable_set
693 * Set Untag DSCP priority assign
695 * enable - state of Untag DSCP priority assign
700 * RT_ERR_FAILED - Failed
701 * RT_ERR_SMI - SMI access error
702 * RT_ERR_ENABLE - Invalid input parameters.
706 extern rtk_api_ret_t
rtk_vlan_UntagDscpPriorityEnable_set(rtk_enable_t enable
);
709 * rtk_vlan_UntagDscpPriorityEnable_get
711 * Get Untag DSCP priority assign
715 * pEnable - state of Untag DSCP priority assign
718 * RT_ERR_FAILED - Failed
719 * RT_ERR_SMI - SMI access error
720 * RT_ERR_NULL_POINTER - Null pointer
724 extern rtk_api_ret_t
rtk_vlan_UntagDscpPriorityEnable_get(rtk_enable_t
*pEnable
);
729 * rtk_stp_mstpState_set
731 * Configure spanning tree state per each port.
734 * msti - Multiple spanning tree instance.
735 * stp_state - Spanning tree state for msti
740 * RT_ERR_FAILED - Failed
741 * RT_ERR_SMI - SMI access error
742 * RT_ERR_PORT_ID - Invalid port number.
743 * RT_ERR_MSTI - Invalid msti parameter.
744 * RT_ERR_MSTP_STATE - Invalid STP state.
746 * System supports per-port multiple spanning tree state for each msti.
747 * There are four states supported by ASIC.
748 * - STP_STATE_DISABLED
749 * - STP_STATE_BLOCKING
750 * - STP_STATE_LEARNING
751 * - STP_STATE_FORWARDING
753 extern rtk_api_ret_t
rtk_stp_mstpState_set(rtk_stp_msti_id_t msti
, rtk_port_t port
, rtk_stp_state_t stp_state
);
756 * rtk_stp_mstpState_get
758 * Get spanning tree state per each port.
761 * msti - Multiple spanning tree instance.
763 * pStp_state - Spanning tree state for msti
766 * RT_ERR_FAILED - Failed
767 * RT_ERR_SMI - SMI access error
768 * RT_ERR_PORT_ID - Invalid port number.
769 * RT_ERR_MSTI - Invalid msti parameter.
771 * System supports per-port multiple spanning tree state for each msti.
772 * There are four states supported by ASIC.
773 * - STP_STATE_DISABLED
774 * - STP_STATE_BLOCKING
775 * - STP_STATE_LEARNING
776 * - STP_STATE_FORWARDING
778 extern rtk_api_ret_t
rtk_stp_mstpState_get(rtk_stp_msti_id_t msti
, rtk_port_t port
, rtk_stp_state_t
*pStp_state
);
781 * rtk_vlan_checkAndCreateMbr
783 * Check and create Member configuration and return index
787 * pIndex - Member configuration index
790 * RT_ERR_FAILED - Failed
791 * RT_ERR_SMI - SMI access error
792 * RT_ERR_VLAN_VID - Invalid VLAN ID.
793 * RT_ERR_VLAN_ENTRY_NOT_FOUND - VLAN not found
794 * RT_ERR_TBL_FULL - Member Configuration table full
798 extern rtk_api_ret_t
rtk_vlan_checkAndCreateMbr(rtk_vlan_t vid
, rtk_uint32
*pIndex
);
801 * rtk_vlan_reservedVidAction_set
803 * Set Action of VLAN ID = 0 & 4095 tagged packet
805 * action_vid0 - Action for VID 0.
806 * action_vid4095 - Action for VID 4095.
811 * RT_ERR_FAILED - Failed
812 * RT_ERR_SMI - SMI access error
813 * RT_ERR_INPUT - Error Input
817 extern rtk_api_ret_t
rtk_vlan_reservedVidAction_set(rtk_vlan_resVidAction_t action_vid0
, rtk_vlan_resVidAction_t action_vid4095
);
820 * rtk_vlan_reservedVidAction_get
822 * Get Action of VLAN ID = 0 & 4095 tagged packet
824 * pAction_vid0 - Action for VID 0.
825 * pAction_vid4095 - Action for VID 4095.
830 * RT_ERR_FAILED - Failed
831 * RT_ERR_SMI - SMI access error
832 * RT_ERR_NULL_POINTER - NULL Pointer
836 extern rtk_api_ret_t
rtk_vlan_reservedVidAction_get(rtk_vlan_resVidAction_t
*pAction_vid0
, rtk_vlan_resVidAction_t
*pAction_vid4095
);
839 * rtk_vlan_realKeepRemarkEnable_set
841 * Set Real keep 1p remarking feature
843 * enabled - State of 1p remarking at real keep packet
848 * RT_ERR_FAILED - Failed
849 * RT_ERR_SMI - SMI access error
850 * RT_ERR_INPUT - Error Input
854 extern rtk_api_ret_t
rtk_vlan_realKeepRemarkEnable_set(rtk_enable_t enabled
);
857 * rtk_vlan_realKeepRemarkEnable_get
859 * Get Real keep 1p remarking feature
863 * pEnabled - State of 1p remarking at real keep packet
866 * RT_ERR_FAILED - Failed
867 * RT_ERR_SMI - SMI access error
868 * RT_ERR_INPUT - Error Input
872 extern rtk_api_ret_t
rtk_vlan_realKeepRemarkEnable_get(rtk_enable_t
*pEnabled
);
881 * pEnabled - State of 1p remarking at real keep packet
884 * RT_ERR_FAILED - Failed
885 * RT_ERR_SMI - SMI access error
886 * RT_ERR_INPUT - Error Input
890 rtk_api_ret_t
rtk_vlan_reset(void);
892 #endif /* __RTK_API_VLAN_H__ */