OpenNSL API Guide and Reference Manual
|
Go to the source code of this file.
Data Structures | |
struct | opennsl_vlan_data_s |
Initialize a VLAN data information structure. More... | |
struct | opennsl_vlan_port_s |
Layer 2 Logical port type. More... | |
Macros | |
#define | OPENNSL_VLAN_LEARN_DISABLE 0x00000001 |
#define | OPENNSL_VLAN_PORT_INNER_VLAN_PRESERVE 0x00000004 |
Preserve the inner VLAN tag (by default it is stripped). | |
#define | OPENNSL_VLAN_PORT_OUTER_VLAN_PRESERVE 0x00000100 |
Preserve the outer VLAN tag (by default it is stripped). | |
#define | OPENNSL_VLAN_PORT_REPLACE 0x00000001 |
Replace existing entry. | |
#define | OPENNSL_VLAN_PORT_WITH_ID 0x00000002 |
Add using the specified ID. | |
#define | OPENNSL_VLAN_PROTO_PKT_DROP_ENABLE 0x00000004 |
#define | OPENNSL_VLAN_PROTO_PKT_FLOOD_ENABLE 0x00000008 |
#define | OPENNSL_VLAN_PROTO_PKT_FORWARD_ENABLE 0x00000002 |
#define | OPENNSL_VLAN_PROTO_PKT_TOCPU_ENABLE 0x00000001 |
Typedefs | |
typedef enum opennsl_vlan_control_port_e | opennsl_vlan_control_port_t |
opennsl_vlan_control_port_t | |
typedef enum opennsl_vlan_control_e | opennsl_vlan_control_t |
opennsl_vlan_control_t | |
typedef struct opennsl_vlan_data_s | opennsl_vlan_data_t |
Initialize a VLAN data information structure. | |
typedef enum opennsl_vlan_forward_e | opennsl_vlan_forward_t |
Per VLAN forwarding behavior. | |
typedef enum opennsl_vlan_mcast_flood_e | opennsl_vlan_mcast_flood_t |
VLAN multicast flood modes. | |
typedef enum opennsl_vlan_port_match_e | opennsl_vlan_port_match_t |
Logical layer 2 port match criteria. | |
typedef struct opennsl_vlan_port_s | opennsl_vlan_port_t |
Layer 2 Logical port type. | |
typedef enum opennsl_vlan_stat_e | opennsl_vlan_stat_t |
Types of statistics that are maintained per VLAN. | |
typedef enum opennsl_vlan_urpf_mode_e | opennsl_vlan_urpf_mode_t |
Per VLAN URPF Mode setting. | |
typedef enum opennsl_vlan_vp_mc_ctrl_e | opennsl_vlan_vp_mc_ctrl_t |
Per VLAN VP Mode control. | |
Functions | |
void | opennsl_vlan_action_set_t_init (opennsl_vlan_action_set_t *action) LIB_DLL_EXPORTED |
Initialize a VLAN tag action set structure. | |
int | opennsl_vlan_control_port_set (int unit, int port, opennsl_vlan_control_port_t type, int arg) LIB_DLL_EXPORTED |
Set/get miscellaneous port-specific VLAN options. | |
int | opennsl_vlan_control_set (int unit, opennsl_vlan_control_t type, int arg) LIB_DLL_EXPORTED |
Set/get miscellaneous VLAN-specific chip options. | |
int | opennsl_vlan_create (int unit, opennsl_vlan_t vid) LIB_DLL_EXPORTED |
Allocate and configure a VLAN on the OPENNSL device. | |
int | opennsl_vlan_default_get (int unit, opennsl_vlan_t *vid_ptr) LIB_DLL_EXPORTED |
Get the default VLAN ID. | |
int | opennsl_vlan_default_set (int unit, opennsl_vlan_t vid) LIB_DLL_EXPORTED |
Set the default VLAN ID. | |
int | opennsl_vlan_destroy (int unit, opennsl_vlan_t vid) LIB_DLL_EXPORTED |
Deallocate VLAN from the OPENNSL device. | |
int | opennsl_vlan_destroy_all (int unit) LIB_DLL_EXPORTED |
Destroy all VLANs except the default VLAN. | |
int | opennsl_vlan_gport_add (int unit, opennsl_vlan_t vlan, opennsl_gport_t port, int flags) LIB_DLL_EXPORTED |
Add a virtual or physical port to the specified VLAN. | |
int | opennsl_vlan_gport_delete (int unit, opennsl_vlan_t vlan, opennsl_gport_t port) LIB_DLL_EXPORTED |
Remove a virtual or physical port from the specified VLAN. | |
int | opennsl_vlan_gport_delete_all (int unit, opennsl_vlan_t vlan) LIB_DLL_EXPORTED |
Removes all virtual and physical port from the specified VLAN. | |
int | opennsl_vlan_gport_get (int unit, opennsl_vlan_t vlan, opennsl_gport_t port, int *flags) LIB_DLL_EXPORTED |
Get a virtual or physical port from the specified VLAN. | |
int | opennsl_vlan_list (int unit, opennsl_vlan_data_t **listp, int *countp) LIB_DLL_EXPORTED |
Returns an array of defined VLANs and their port bitmaps. | |
int | opennsl_vlan_list_destroy (int unit, opennsl_vlan_data_t *list, int count) LIB_DLL_EXPORTED |
Destroy a list returned by opennsl_vlan_list. | |
int | opennsl_vlan_port_add (int unit, opennsl_vlan_t vid, opennsl_pbmp_t pbmp, opennsl_pbmp_t ubmp) LIB_DLL_EXPORTED |
Add ports to the specified VLAN. | |
int | opennsl_vlan_port_create (int unit, opennsl_vlan_port_t *vlan_port) LIB_DLL_EXPORTED |
Create a layer 2 logical port. | |
int | opennsl_vlan_port_destroy (int unit, opennsl_gport_t gport) LIB_DLL_EXPORTED |
Destroy a layer 2 logical port. | |
int | opennsl_vlan_port_find (int unit, opennsl_vlan_port_t *vlan_port) LIB_DLL_EXPORTED |
Get/find a layer 2 logical port given the GPORT ID or match criteria. | |
int | opennsl_vlan_port_get (int unit, opennsl_vlan_t vid, opennsl_pbmp_t *pbmp, opennsl_pbmp_t *ubmp) LIB_DLL_EXPORTED |
Retrieves a list of the member ports of an existing VLAN. | |
int | opennsl_vlan_port_remove (int unit, opennsl_vlan_t vid, opennsl_pbmp_t pbmp) LIB_DLL_EXPORTED |
Remove ports from a specified VLAN. | |
void | opennsl_vlan_port_t_init (opennsl_vlan_port_t *vlan_port) LIB_DLL_EXPORTED |
Initialize the VLAN port structure. | |
int | opennsl_vlan_stat_get (int unit, opennsl_vlan_t vlan, opennsl_cos_t cos, opennsl_vlan_stat_t stat, uint64 *val) LIB_DLL_EXPORTED |
Extract per-VLAN statistics from the chip. | |
int | opennsl_vlan_stat_set (int unit, opennsl_vlan_t vlan, opennsl_cos_t cos, opennsl_vlan_stat_t stat, uint64 val) LIB_DLL_EXPORTED |
Set the specified statistic to the indicated value for the specified VLAN. | |
int | opennsl_vlan_translate_egress_action_add (int unit, int port_class, opennsl_vlan_t outer_vlan, opennsl_vlan_t inner_vlan, opennsl_vlan_action_set_t *action) LIB_DLL_EXPORTED |
Add an entry to the egress VLAN Translation table and assign VLAN actions. | |
int | opennsl_vlan_translate_egress_action_get (int unit, int port_class, opennsl_vlan_t outer_vlan, opennsl_vlan_t inner_vlan, opennsl_vlan_action_set_t *action) LIB_DLL_EXPORTED |
Get the assigned VLAN actions for egress VLAN translation on the given port class and VLAN tags. | |