|
OpenNSL API Guide and Reference Manual
|
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. | |
| #define OPENNSL_MULTICAST_EGRESS_GROUP 0x00000008 |
Definition at line 37 of file multicast.h.
Referenced by example_multicast_create(), example_multicast_group_open(), and multicast__open_mc_group().
| #define OPENNSL_MULTICAST_INGRESS_GROUP 0x00000004 |
Definition at line 36 of file multicast.h.
Referenced by example_multicast_create(), example_multicast_group_open(), and multicast__open_mc_group().
| #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 |
Definition at line 29 of file multicast.h.
Referenced by example_multicast_create(), example_multicast_group_open(), and multicast__open_mc_group().
| 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) |
Definition at line 512 of file multicast.h.
Multicast group controls.
Definition at line 546 of file multicast.h.
| 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.
| 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' |
| OPENNSL_E_UNAVAIL | Feature 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.
| 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' |
| OPENNSL_E_UNAVAIL | Feature not supported. |
| OPENNSL_E_XXX |
| int opennsl_multicast_create | ( | int | unit, |
| uint32 | flags, | ||
| opennsl_multicast_t * | group | ||
| ) |
Create a multicast group for packet replication.
| unit | [IN] Unit number. |
| flags | [IN] OPENNSL_MULTICAST_* |
| group | [IN,OUT] Multicast group ID |
| 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.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| 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.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| port | [IN] GPORT ID |
| encap_id | [IN] Encapsulation ID |
| 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.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| port | [IN] GPORT ID |
| encap_id | [IN] Encapsulation ID |
| OPENNSL_E_XXX |
| int opennsl_multicast_egress_delete_all | ( | int | unit, |
| opennsl_multicast_t | group | ||
| ) |
Delete all replications for the specified multicast index.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| 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.
| 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 |
| 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.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| intf | [IN] Egress Object ID |
| encap_id | [OUT] Encapsulation ID |
| 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.
| 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 |
| 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.
| 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. |
| OPENNSL_E_NONE | Multicast group range of requested type returned |
| OPENNSL_E_NOT_FOUND | No available multicast groups of this type |
| OPENNSL_E_PARAM | Multicast group type is not valid on this device |
| OPENNSL_E_UNAVAIL | Feature unavailable |
| int opennsl_multicast_group_get | ( | int | unit, |
| opennsl_multicast_t | group, | ||
| uint32 * | flags | ||
| ) |
Retrieve the flags associated with a multicast group.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| flags | [OUT] OPENNSL_MULTICAST_* |
| 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.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID. |
| OPENNSL_E_NONE | Multicast group is valid and available on the device |
| OPENNSL_E_EXISTS | Multicast group is valid but already in use on this device |
| OPENNSL_E_PARAM | Multicast group is not valid on this device |
| OPENNSL_E_UNAVAIL | Feature 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.
| unit | [IN] Unit number. |
| trav_fn | [IN] Callback function. |
| flags | [IN] OPENNSL_MULTICAST_* |
| user_data | [IN] User data to be passed to callback function. |
| 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.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| port | [IN] Physical GPORT ID |
| encap_id | [IN] Encapsulation ID |
| 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.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| port | [IN] Physical GPORT ID |
| encap_id | [IN] Encapsulation ID |
| 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.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| 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.
| 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 |
| 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.
| 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 |
| OPENNSL_E_XXX |
| int opennsl_multicast_init | ( | int | unit | ) |
Initialize the multicast module.
| unit | [IN] Unit number. |
| 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.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| port | [IN] Physical GPORT ID |
| vlan | [IN] VLAN ID |
| encap_id | [OUT] Encapsulation ID |
| 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.
| unit | [IN] Unit number. |
| group | [IN] Multicast group ID |
| port | [IN] Physical GPORT ID |
| intf | [IN] L3 interface |
| encap_id | [OUT] Encapsulation ID |
| 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.
| 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 |
| 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.
| 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 |
| OPENNSL_E_XXX |
Referenced by example_multicast_vxlan_port_add().