OpenNSL API Guide and Reference Manual
Files | Macros | Typedefs | Enumerations | Functions
Multicast Traffic Management

Files

file  multicast.h
 
file  multicastX.h
 

Macros

#define OPENNSL_MULTICAST_EGRESS_GROUP   0x00000008
 
#define OPENNSL_MULTICAST_INGRESS_GROUP   0x00000004
 
#define OPENNSL_MULTICAST_TYPE_L2   0x00010000
 
#define OPENNSL_MULTICAST_TYPE_L3   0x00020000
 
#define OPENNSL_MULTICAST_TYPE_MASK   0xffff0000
 
#define OPENNSL_MULTICAST_TYPE_PORTS_GROUP   0x40000000
 
#define OPENNSL_MULTICAST_TYPE_VLAN   0x00400000
 
#define OPENNSL_MULTICAST_TYPE_VXLAN   0x08000000
 
#define OPENNSL_MULTICAST_WITH_ID   0x00000001
 

Typedefs

typedef enum
opennsl_multicast_control_e 
opennsl_multicast_control_t
 Multicast group controls.
 
typedef int(* opennsl_multicast_group_traverse_cb_t )(int unit, opennsl_multicast_t group, uint32 flags, void *user_data)
 

Enumerations

enum  opennsl_multicast_control_e {
  opennslMulticastControlMtu = 0,
  opennslMulticastVpTrunkResolve = 1,
  opennslMulticastRemapGroup = 2,
  opennslMulticastControlCount = 3
}
 Multicast group controls. More...
 

Functions

int opennsl_multicast_control_get (int unit, opennsl_multicast_t group, opennsl_multicast_control_t type, int *arg) LIB_DLL_EXPORTED
 Set/get miscellaneous per multicast group controls.
 
int opennsl_multicast_control_set (int unit, opennsl_multicast_t group, opennsl_multicast_control_t type, int arg) LIB_DLL_EXPORTED
 Set/get miscellaneous per multicast group controls.
 
int opennsl_multicast_create (int unit, uint32 flags, opennsl_multicast_t *group) LIB_DLL_EXPORTED
 Create a multicast group for packet replication.
 
int opennsl_multicast_destroy (int unit, opennsl_multicast_t group) LIB_DLL_EXPORTED
 Destroy a multicast group.
 
int opennsl_multicast_egress_add (int unit, opennsl_multicast_t group, opennsl_gport_t port, opennsl_if_t encap_id) LIB_DLL_EXPORTED
 Add an encapsulated interface to a multicast group's replication list on a specific port.
 
int opennsl_multicast_egress_delete (int unit, opennsl_multicast_t group, opennsl_gport_t port, opennsl_if_t encap_id) LIB_DLL_EXPORTED
 Delete a port from a multicast group's replication list.
 
int opennsl_multicast_egress_delete_all (int unit, opennsl_multicast_t group) LIB_DLL_EXPORTED
 Delete all replications for the specified multicast index.
 
int opennsl_multicast_egress_get (int unit, opennsl_multicast_t group, int port_max, opennsl_gport_t *port_array, opennsl_if_t *encap_id_array, int *port_count) LIB_DLL_EXPORTED
 Get the set of encapsulated interfaces on specific ports which comprises a multicast group's replication list.
 
int opennsl_multicast_egress_object_encap_get (int unit, opennsl_multicast_t group, opennsl_if_t intf, opennsl_if_t *encap_id) LIB_DLL_EXPORTED
 Get the multicast encapsulation ID for egress_object type replication.
 
int opennsl_multicast_egress_set (int unit, opennsl_multicast_t group, int port_count, opennsl_gport_t *port_array, opennsl_if_t *encap_id_array) LIB_DLL_EXPORTED
 Assign a set of encapsulated interfaces on specific ports as a multicast group's replication list.
 
int opennsl_multicast_group_free_range_get (int unit, uint32 type_flag, opennsl_multicast_t *group_min, opennsl_multicast_t *group_max) LIB_DLL_EXPORTED
 Retrieve the minimum and maximum unallocated multicast groups for a given multicast type.
 
int opennsl_multicast_group_get (int unit, opennsl_multicast_t group, uint32 *flags) LIB_DLL_EXPORTED
 Retrieve the flags associated with a multicast group.
 
int opennsl_multicast_group_is_free (int unit, opennsl_multicast_t group) LIB_DLL_EXPORTED
 Request if the given multicast group is available on the device.
 
int opennsl_multicast_group_traverse (int unit, opennsl_multicast_group_traverse_cb_t trav_fn, uint32 flags, void *user_data) LIB_DLL_EXPORTED
 Iterate over the defined multicast groups of the type specified in 'flags'.
 
int opennsl_multicast_ingress_add (int unit, opennsl_multicast_t group, opennsl_gport_t port, opennsl_if_t encap_id) LIB_DLL_EXPORTED
 Add a port to a Ingress Multicast group's replication list.
 
int opennsl_multicast_ingress_delete (int unit, opennsl_multicast_t group, opennsl_gport_t port, opennsl_if_t encap_id) LIB_DLL_EXPORTED
 Delete a port from Ingress Multicast group's replication list.
 
int opennsl_multicast_ingress_delete_all (int unit, opennsl_multicast_t group) LIB_DLL_EXPORTED
 opennsl_multicast_egress_delete_all.
 
int opennsl_multicast_ingress_get (int unit, opennsl_multicast_t group, int port_max, opennsl_gport_t *port_array, opennsl_if_t *encap_id_array, int *port_count) LIB_DLL_EXPORTED
 opennsl_multicast_ingress_get.
 
int opennsl_multicast_ingress_set (int unit, opennsl_multicast_t group, int port_count, opennsl_gport_t *port_array, opennsl_if_t *encap_id_array) LIB_DLL_EXPORTED
 Add a set of ports to a Ingress multicast group's replication list.
 
int opennsl_multicast_init (int unit) LIB_DLL_EXPORTED
 Initialize the multicast module.
 
int opennsl_multicast_l2_encap_get (int unit, opennsl_multicast_t group, opennsl_gport_t port, opennsl_vlan_t vlan, opennsl_if_t *encap_id) LIB_DLL_EXPORTED
 Get the multicast encapsulation ID for L2 replication.
 
int opennsl_multicast_l3_encap_get (int unit, opennsl_multicast_t group, opennsl_gport_t port, opennsl_if_t intf, opennsl_if_t *encap_id) LIB_DLL_EXPORTED
 Get the multicast encapsulation ID for L3 replication.
 
int opennsl_multicast_vlan_encap_get (int unit, opennsl_multicast_t group, opennsl_gport_t port, opennsl_gport_t vlan_port_id, opennsl_if_t *encap_id) LIB_DLL_EXPORTED
 Get the multicast encapsulation ID for layer 2 logical port replication.
 
int opennsl_multicast_vxlan_encap_get (int unit, opennsl_multicast_t group, opennsl_gport_t port, opennsl_gport_t vxlan_port_id, opennsl_if_t *encap_id) LIB_DLL_EXPORTED
 Get the multicast encapsulation ID for VXLAN replication.
 

Detailed Description

Macro Definition Documentation

#define OPENNSL_MULTICAST_EGRESS_GROUP   0x00000008
#define OPENNSL_MULTICAST_INGRESS_GROUP   0x00000004
#define OPENNSL_MULTICAST_TYPE_L2   0x00010000

Definition at line 30 of file multicast.h.

Referenced by example_multicast_create(), and example_vxlan_open_vpn().

#define OPENNSL_MULTICAST_TYPE_L3   0x00020000

Definition at line 31 of file multicast.h.

#define OPENNSL_MULTICAST_TYPE_MASK   0xffff0000

Definition at line 35 of file multicast.h.

#define OPENNSL_MULTICAST_TYPE_PORTS_GROUP   0x40000000

Definition at line 34 of file multicast.h.

#define OPENNSL_MULTICAST_TYPE_VLAN   0x00400000

Definition at line 32 of file multicast.h.

#define OPENNSL_MULTICAST_TYPE_VXLAN   0x08000000

Definition at line 33 of file multicast.h.

#define OPENNSL_MULTICAST_WITH_ID   0x00000001

Typedef Documentation

Multicast group controls.

typedef int(* opennsl_multicast_group_traverse_cb_t)(int unit, opennsl_multicast_t group, uint32 flags, void *user_data)

Definition at line 512 of file multicast.h.

Enumeration Type Documentation

Multicast group controls.

Enumerator:
opennslMulticastControlMtu 

Maximum transmission unit.

opennslMulticastVpTrunkResolve 

Enable virtual port trunk group resolution.

opennslMulticastRemapGroup 

Remap multicast groups.

opennslMulticastControlCount 

Must be last.

Definition at line 546 of file multicast.h.

Function Documentation

int opennsl_multicast_control_get ( int  unit,
opennsl_multicast_t  group,
opennsl_multicast_control_t  type,
int *  arg 
)

Set/get miscellaneous per multicast group controls.

Description
Sets/gets miscellaneous per multicast group parameters.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
type[IN] Multicast control parameter (see =multicast_controls)
arg[OUT] (for _set) A parameter whose meaning is dependent on 'type'
Return values
OPENNSL_E_UNAVAILFeature not supported.
OPENNSL_E_XXX
int opennsl_multicast_control_set ( int  unit,
opennsl_multicast_t  group,
opennsl_multicast_control_t  type,
int  arg 
)

Set/get miscellaneous per multicast group controls.

Description
Sets/gets miscellaneous per multicast group parameters.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
type[IN] Multicast control parameter (see =multicast_controls)
arg[IN] (for _set) A parameter whose meaning is dependent on 'type'
Return values
OPENNSL_E_UNAVAILFeature not supported.
OPENNSL_E_XXX
int opennsl_multicast_create ( int  unit,
uint32  flags,
opennsl_multicast_t group 
)

Create a multicast group for packet replication.

Description
Create a multicast group for packet replication. The types of multicast groups supported are L2, L3, VPLS, SUBPORT, MiM, WLAN, and VLAN. Packet replication types supported are INGRESS and EGRESS. to create multicast group for a specific packet replication type use the suitable flag. By default, the API would create Ingress and Egress multicast groups. The group identifier is returned in this API (except when OPENNSL_MULTICAST_WITH_ID is used). Note that when using OPENNSL_MULTICAST_WITH_ID, the provided group ID should match the ID returned by opennsl_multicast_create from another unit in the stack. For example,.
Parameters
unit[IN] Unit number.
flags[IN] OPENNSL_MULTICAST_*
group[IN,OUT] Multicast group ID
Return values
OPENNSL_E_XXX

Referenced by example_multicast_create(), example_multicast_group_open(), and multicast__open_mc_group().

int opennsl_multicast_destroy ( int  unit,
opennsl_multicast_t  group 
)

Destroy a multicast group.

Description
Destroy a multicast group.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
Return values
OPENNSL_E_XXX

Referenced by example_egress_transmit_application(), and multicast__open_mc_group().

int opennsl_multicast_egress_add ( int  unit,
opennsl_multicast_t  group,
opennsl_gport_t  port,
opennsl_if_t  encap_id 
)

Add an encapsulated interface to a multicast group's replication list on a specific port.

Description
Add a port to a multicast group's replication list. The port is the physical port where replicated packets will be sent. The encap_id is an opaque encapsulation ID returned from the opennsl_multicast_*_encap_get APIs. The subscriber_queue is an opaque subscriber queue ID. The subscriber form is only available on certain devices in specific modes; if the non-subscriber form is used in these modes, it will assume zero as queue group.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port[IN] GPORT ID
encap_id[IN] Encapsulation ID
Return values
OPENNSL_E_XXX

Referenced by example_add_multicast_entry(), and multicast__add_multicast_entry().

int opennsl_multicast_egress_delete ( int  unit,
opennsl_multicast_t  group,
opennsl_gport_t  port,
opennsl_if_t  encap_id 
)

Delete a port from a multicast group's replication list.

Description
Delete a port from a multicast group's replication list. The port is the physical port where replicated packets will be sent. The encap_id is an opaque encapsulation ID returned from the opennsl_multicast_*_encap_get APIs. The subscriber_queue is an opaque subscriber queue ID. The subscriber form is only available on certain devices in specific modes; if the non-subscriber form is used in these modes, it will assume zero as queue group.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port[IN] GPORT ID
encap_id[IN] Encapsulation ID
Return values
OPENNSL_E_XXX
int opennsl_multicast_egress_delete_all ( int  unit,
opennsl_multicast_t  group 
)

Delete all replications for the specified multicast index.

Description
Delete all replications for the specified multicast index.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
Return values
OPENNSL_E_XXX
int opennsl_multicast_egress_get ( int  unit,
opennsl_multicast_t  group,
int  port_max,
opennsl_gport_t port_array,
opennsl_if_t encap_id_array,
int *  port_count 
)

Get the set of encapsulated interfaces on specific ports which comprises a multicast group's replication list.

Description
Get the set of encapsulated interfaces on specific ports which comprises a multicast group's replication list. The port_array contains physical ports where replicated packets will be sent. The encap_id_array contains the opaque encapsulation IDs returned from the opennsl_multicast_*_encap_get APIs. The subscriber_queue is an array of opaque subscriber queue IDs. The subscriber form is only available on certain devices in specific modes; if the non-subscriber form is used in these modes, it will not return the subscriber queue group IDs. If port_max = 0, port_array and encap_id_array must be NULL, and the function will return in port_count the number of ports in the given multicast group.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port_max[IN] Number of items allocated in the array
port_array[OUT] Array of physical ports
encap_id_array[OUT] Array of encapsulation IDs
port_count[OUT] Actual number of ports returned in the array
Return values
OPENNSL_E_XXX
int opennsl_multicast_egress_object_encap_get ( int  unit,
opennsl_multicast_t  group,
opennsl_if_t  intf,
opennsl_if_t encap_id 
)

Get the multicast encapsulation ID for egress_object type replication.

Description
Get the multicast encapsulation ID for Egress Object type replication. The encapsulation ID is an opaque object passed in to opennsl_multicast_egress_* APIs when adding/removing ports to a multicast group.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
intf[IN] Egress Object ID
encap_id[OUT] Encapsulation ID
Return values
OPENNSL_E_XXX
int opennsl_multicast_egress_set ( int  unit,
opennsl_multicast_t  group,
int  port_count,
opennsl_gport_t port_array,
opennsl_if_t encap_id_array 
)

Assign a set of encapsulated interfaces on specific ports as a multicast group's replication list.

Description
Assign a set of encapsulated interfaces on specific ports as a multicast group's replication list. The multicast group's existing replication list, if any, will be deleted. If port_count is 0, then all replication lists in the multicast group will be cleared. The port_array contains physical ports where replicated packets will be sent. The encap_id_array contains the opaque encapsulation IDs returned from the opennsl_multicast_*_encap_get APIs. The subscriber_queue is an array of opaque subscriber queue IDs. The subscriber form is only available on certain devices in specific modes; if the non-subscriber form is used in these modes, it will assume zeros as all queue groups. For incremental modification of a multicast group's replication list, opennsl_multicast_egress_add or opennsl_multicast_egress_delete should be used.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port_count[IN] Number of ports in the array
port_array[IN] Array of physical ports
encap_id_array[IN] Array of encapsulation IDs
Return values
OPENNSL_E_XXX
int opennsl_multicast_group_free_range_get ( int  unit,
uint32  type_flag,
opennsl_multicast_t group_min,
opennsl_multicast_t group_max 
)

Retrieve the minimum and maximum unallocated multicast groups for a given multicast type.

Description
The minimum and maximum unused multicast groups of the requested type are returned. The full range may have allocated groups within it. Before using any given group id, =opennsl_multicast_group_is_free must be used to verify that the particular value is available.
Parameters
unit[IN] Unit number.
type_flag[IN] One of OPENNSL_MULTICAST_TYPE_*.
group_min[OUT] Minimum available multicast group of specified type.
group_max[OUT] Maximum available multicast group of specified type.
Return values
OPENNSL_E_NONEMulticast group range of requested type returned
OPENNSL_E_NOT_FOUNDNo available multicast groups of this type
OPENNSL_E_PARAMMulticast group type is not valid on this device
OPENNSL_E_UNAVAILFeature unavailable
int opennsl_multicast_group_get ( int  unit,
opennsl_multicast_t  group,
uint32 flags 
)

Retrieve the flags associated with a multicast group.

Description
Given a multicast group previously reserved by =opennsl_multicast_create , this function will return the flags necessary to create the same group on a different unit. That is, the returned flags values will be the value of OPENNSL_MULTICAST_TYPE_* with which the group was created combined with the OPENNSL_MULTICAST_WITH_ID flag. The returned flags will include OPENNSL_MULTICAST_WITH_ID even if the group was not originally created via this flag. This API can also be used to check if the given multicast group was created. The flags OPENNSL_MULTICAST_EGRESS_GROUP, OPENNSL_MULTICAST_INGRESS_GROUP are returned respectively if the group was created for egress, ingress multicast.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
flags[OUT] OPENNSL_MULTICAST_*
Return values
OPENNSL_E_xxx
int opennsl_multicast_group_is_free ( int  unit,
opennsl_multicast_t  group 
)

Request if the given multicast group is available on the device.

Description
Determine if a specified opennsl_multicast_t value for a multicast group is currently unused on the device. This allows an application to specify a multicast group id via the OPENNSL_*_WITH_ID flag while omitting the initial call without the flag. May be used in multi-device systems with different multicast group capabilities to manage the multicast group ids.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID.
Return values
OPENNSL_E_NONEMulticast group is valid and available on the device
OPENNSL_E_EXISTSMulticast group is valid but already in use on this device
OPENNSL_E_PARAMMulticast group is not valid on this device
OPENNSL_E_UNAVAILFeature unavailable
int opennsl_multicast_group_traverse ( int  unit,
opennsl_multicast_group_traverse_cb_t  trav_fn,
uint32  flags,
void *  user_data 
)

Iterate over the defined multicast groups of the type specified in 'flags'.

If all types are desired, use MULTICAST_TYPE_MASK.

Description
Iterates over created multicast groups and executes user callback function for each valid entry. The flags parameter specifies the multicast types which should be included. For all types, use OPENNSL_MULTICAST_TYPE_MASK. The callback function is defined as following:.
Parameters
unit[IN] Unit number.
trav_fn[IN] Callback function.
flags[IN] OPENNSL_MULTICAST_*
user_data[IN] User data to be passed to callback function.
Return values
OPENNSL_E_xxx
int opennsl_multicast_ingress_add ( int  unit,
opennsl_multicast_t  group,
opennsl_gport_t  port,
opennsl_if_t  encap_id 
)

Add a port to a Ingress Multicast group's replication list.

Description
Add a port to a multicast group's replication list in device Ingress. The port is the physical port where replicated packets will be sent. The encap_id is an opaque encapsulation ID returned from the opennsl_multicast_*_encap_get APIs.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port[IN] Physical GPORT ID
encap_id[IN] Encapsulation ID
Return values
OPENNSL_E_XXX

Referenced by example_add_multicast_entry(), example_multicast_vxlan_port_add(), main(), and multicast__add_multicast_entry().

int opennsl_multicast_ingress_delete ( int  unit,
opennsl_multicast_t  group,
opennsl_gport_t  port,
opennsl_if_t  encap_id 
)

Delete a port from Ingress Multicast group's replication list.

Description
Delete a port from multicast group's replication list in device Ingress. The port is the physical port where replicated packets will be sent. The encap_id is an opaque encapsulation ID returned from the opennsl_multicast_*_encap_get APIs.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port[IN] Physical GPORT ID
encap_id[IN] Encapsulation ID
Return values
OPENNSL_E_XXX

Referenced by main(), and remove_inLif_from_vswitch().

int opennsl_multicast_ingress_delete_all ( int  unit,
opennsl_multicast_t  group 
)

opennsl_multicast_egress_delete_all.

Description
Remove all ports from Multicast replication list from device Ingress.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
Return values
OPENNSL_E_xxx
int opennsl_multicast_ingress_get ( int  unit,
opennsl_multicast_t  group,
int  port_max,
opennsl_gport_t port_array,
opennsl_if_t encap_id_array,
int *  port_count 
)

opennsl_multicast_ingress_get.

Description
Get the ports in a multicast group's replication list from device Ingress. The port_array contains physical ports where replicated packets will be sent. The encap_id_array contains the opaque encapsulation IDs returned from the opennsl_multicast_*_encap_get APIs. If port_max = 0, port_array and encap_id_array must be NULL, and the function will return in port_count the number of ports in the given multicast group.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port_max[IN] Number of items allocated in the array
port_array[OUT] Array of physical ports
encap_id_array[OUT] Array of encapsulation IDs
port_count[OUT] Actual number of ports returned in the array
Return values
OPENNSL_E_XXX
int opennsl_multicast_ingress_set ( int  unit,
opennsl_multicast_t  group,
int  port_count,
opennsl_gport_t port_array,
opennsl_if_t encap_id_array 
)

Add a set of ports to a Ingress multicast group's replication list.

Description
Add a set of ports to a multicast group's replication list in device Ingress. The port_array contains physical ports where replicated packets will be sent. The encap_id_array contains the opaque encapsulation IDs returned from the opennsl_multicast_*_encap_get APIs.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port_count[IN] Number of ports in the array
port_array[IN] Array of physical ports
encap_id_array[IN] Array of encapsulation IDs
Return values
OPENNSL_E_XXX
int opennsl_multicast_init ( int  unit)

Initialize the multicast module.

Description
Initialize device tables and driver structures for multicast management functions.
Parameters
unit[IN] Unit number.
Return values
OPENNSL_E_XXX
int opennsl_multicast_l2_encap_get ( int  unit,
opennsl_multicast_t  group,
opennsl_gport_t  port,
opennsl_vlan_t  vlan,
opennsl_if_t encap_id 
)

Get the multicast encapsulation ID for L2 replication.

Description
Get the multicast encapsulation ID for L2 replication. The encapsulation ID is an opaque object passed in to opennsl_multicast_egress_* APIs when adding/removing ports to a multicast group.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port[IN] Physical GPORT ID
vlan[IN] VLAN ID
encap_id[OUT] Encapsulation ID
Return values
OPENNSL_E_XXX

Referenced by main().

int opennsl_multicast_l3_encap_get ( int  unit,
opennsl_multicast_t  group,
opennsl_gport_t  port,
opennsl_if_t  intf,
opennsl_if_t encap_id 
)

Get the multicast encapsulation ID for L3 replication.

Description
Get the multicast encapsulation ID for L3 replication. The encapsulation ID is an opaque object passed in to opennsl_multicast_egress_* APIs to when adding/removing ports to a multicast group. To select a port for L2 replication as part of an L3 replication group, use OPENNSL_IF_INVALID for the intf parameter. On network switch, this API can also be used to get the multicast encapsulation ID for a L3 interface residing on a virtual port. In this case, the parameter port contains the GPORT ID representing the virtual port. This method will be deprecated in the future, in favor of =opennsl_l3_egress_create . This method and the method employing =opennsl_l3_egress_create should not be used at the same time.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port[IN] Physical GPORT ID
intf[IN] L3 interface
encap_id[OUT] Encapsulation ID
Return values
OPENNSL_E_XXX
int opennsl_multicast_vlan_encap_get ( int  unit,
opennsl_multicast_t  group,
opennsl_gport_t  port,
opennsl_gport_t  vlan_port_id,
opennsl_if_t encap_id 
)

Get the multicast encapsulation ID for layer 2 logical port replication.

Description
Get the multicast encapsulation ID for layer 2 logical port replication. The encapsulation ID is an opaque object passed in to opennsl_multicast_egress_* APIs when adding/removing ports to a multicast group. For ROBO Arch. in SDK, the vlan_port_id parameter for this API is used to carry VLAN information for VLAN replication. Bit0 to bit11 are used to represent VLAN index and the bit12 is used to indicate this VLAN is untagged.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port[IN] Physical GPORT ID
vlan_port_id[IN] Layer 2 logical port ID
encap_id[OUT] Encapsulation ID
Return values
OPENNSL_E_XXX

Referenced by example_vlan_port_add(), and remove_inLif_from_vswitch().

int opennsl_multicast_vxlan_encap_get ( int  unit,
opennsl_multicast_t  group,
opennsl_gport_t  port,
opennsl_gport_t  vxlan_port_id,
opennsl_if_t encap_id 
)

Get the multicast encapsulation ID for VXLAN replication.

Description
Get the multicast encapsulation ID for VXLAN replication. The encapsulation ID is an opaque object passed in to opennsl_multicast_egress_* APIs when adding/removing ports to a multicast group.
Parameters
unit[IN] Unit number.
group[IN] Multicast group ID
port[IN] Physical GPORT ID
vxlan_port_id[IN] VXLAN GPORT ID
encap_id[OUT] Encapsulation ID
Return values
OPENNSL_E_XXX

Referenced by example_multicast_vxlan_port_add().