OpenNSL API Guide and Reference Manual
|
Data Structures | |
struct | opennsl_mirror_destination_s |
Mirror destination Structure. More... | |
struct | opennsl_mirror_options_s |
represents the options for the mirroring of packets More... | |
struct | opennsl_mirror_pkt_erspan_encap_s |
Contains information required for ERSPAN encapsulation header. More... | |
struct | opennsl_mirror_port_info_s |
Mirror port Structure. More... | |
Files | |
file | mirror.h |
file | mirrorX.h |
Macros | |
#define | OPENNSL_MIRROR_DEST_DEST_MULTICAST (1 << 9) |
destination is ingress multicast | |
#define | OPENNSL_MIRROR_DEST_DROP_FWD_IF_SNIFF_DROPPED (1 << 22) |
Drop the original packet if the sniff packet is dropped. | |
#define | OPENNSL_MIRROR_DEST_DROP_SNIFF_IF_FWD_DROPPED (1 << 21) |
Drop the sniff packet if the original packet is dropped. | |
#define | OPENNSL_MIRROR_DEST_EGRESS_ADD_ORIG_SYSTEM_HEADER (1 << 18) |
The start of the original packet system header will be included in the outbound mirrored packets. | |
#define | OPENNSL_MIRROR_DEST_EGRESS_TRAP_WITH_SYSTEM_HEADER (1 << 28) |
For packets recycled by egress applications and not forwarded, retain the incoming packet's system headers as received from the fabric, and in case of an Egress MC packet, stamp the FTMH.OutLIF field with the CUD. | |
#define | OPENNSL_MIRROR_DEST_FIELD (1 << 19) |
Specify that mirror destination owner is FP. | |
#define | OPENNSL_MIRROR_DEST_FLAGS2_TUNNEL_VXLAN (1 << 0) |
Mirror Tunnel is VXLAN. | |
#define | OPENNSL_MIRROR_DEST_ID_SHARE (1 << 24) |
Share mirror destination id among multi ports. | |
#define | OPENNSL_MIRROR_DEST_INT_PRI_SET (1 << 13) |
Mirrored packet should set with internal priority. | |
#define | OPENNSL_MIRROR_DEST_IS_SNOOP (1 << 16) |
Specify that the destination type is a snoop destination. | |
#define | OPENNSL_MIRROR_DEST_IS_STAT_SAMPLE (1 << 17) |
Specify that the destination type is a STATISTIC SAMPLING destination. | |
#define | OPENNSL_MIRROR_DEST_IS_TRAP (1 << 17) |
Specify that the destination is a trap destination. | |
#define | OPENNSL_MIRROR_DEST_MTP_ADD (1 << 25) |
Add an MTP into a shared-id mirror destination. | |
#define | OPENNSL_MIRROR_DEST_MTP_DELETE (1 << 26) |
Delete an MTP from a shared-id mirror destination. | |
#define | OPENNSL_MIRROR_DEST_MTP_REPLACE (1 << 27) |
REPLACE an MTP of a shared-id mirror destination. | |
#define | OPENNSL_MIRROR_DEST_NO_COUNT -2 |
Value to disable counting of the snooped/mirrored copy. | |
#define | OPENNSL_MIRROR_DEST_OUT_MIRROR_DISABLE (1 << 30) |
Assert out mirror disable. | |
#define | OPENNSL_MIRROR_DEST_PAYLOAD_UNTAGGED (1 << 4) |
Strip vlan tag from mirrored packet. | |
#define | OPENNSL_MIRROR_DEST_PORT (1 << 20) |
Specify that mirror destination owner is PORT. | |
#define | OPENNSL_MIRROR_DEST_REPLACE (1 << 0) |
Replace mirror destination. | |
#define | OPENNSL_MIRROR_DEST_TUNNEL_ETAG (1 << 14) |
Mirrored packet should be ETAG tunneled. | |
#define | OPENNSL_MIRROR_DEST_TUNNEL_IP_GRE (1 << 3) |
Mirrored packet should be L3 GRE tunneled. | |
#define | OPENNSL_MIRROR_DEST_TUNNEL_L2 (1 << 2) |
Mirrored packet should be L2 tunneled. | |
#define | OPENNSL_MIRROR_DEST_TUNNEL_NIV (1 << 6) |
Mirrored packet should be NIV tunneled. | |
#define | OPENNSL_MIRROR_DEST_TUNNEL_PSAMP (1 << 29) |
Update mirror destination with PSAMP encapsulation. | |
#define | OPENNSL_MIRROR_DEST_TUNNEL_RSPAN (1 << 12) |
Mirrored packet should be RSPAN (VLAN) tunneled. | |
#define | OPENNSL_MIRROR_DEST_TUNNEL_SFLOW (1 << 15) |
Mirrored packet should be with sFlow encapsulation. | |
#define | OPENNSL_MIRROR_DEST_TUNNEL_TRILL (1 << 5) |
Mirrored packet should be TRILL tunneled. | |
#define | OPENNSL_MIRROR_DEST_TUNNEL_WITH_ENCAP_ID (1 << 10) |
Mirror destination encap_id is valid. | |
#define | OPENNSL_MIRROR_DEST_TUNNEL_WITH_SEQ (1 << 31) |
Include Sequence number in header. | |
#define | OPENNSL_MIRROR_DEST_UPDATE_COUNTER (1 << 8) |
update counter using stat_id | |
#define | OPENNSL_MIRROR_DEST_UPDATE_COUNTER_1 (1 << 21) |
update counter No.1 | |
#define | OPENNSL_MIRROR_DEST_UPDATE_COUNTER_2 (1 << 22) |
update counter No.2 | |
#define | OPENNSL_MIRROR_DEST_UPDATE_EXT_COUNTERS (1 << 31) |
Set statistic interfaces for mirrored packets. | |
#define | OPENNSL_MIRROR_DEST_UPDATE_POLICER (1 << 7) |
update policer using policer_id | |
#define | OPENNSL_MIRROR_DEST_WITH_ID (1 << 1) |
Mirror destination id is valid. | |
#define | OPENNSL_MIRROR_DISABLE 0 |
Disable mirroring. | |
#define | OPENNSL_MIRROR_EXT_STAT_ID_COUNT 2 |
Number of statistic interfaces for mirrored packets. | |
#define | OPENNSL_MIRROR_L2 1 |
Enable mirroring. | |
#define | OPENNSL_MIRROR_L2_L3 2 |
Deprecated. | |
#define | OPENNSL_MIRROR_NIV_LOOP 1 |
Mirrored packet is a loop in NIV path. | |
#define | OPENNSL_MIRROR_PORT_DEST_TRUNK 0x00000010 |
Parameter dest_port is a trunk. | |
#define | OPENNSL_MIRROR_PORT_EGRESS 0x00000004 |
Egress mirroring. | |
#define | OPENNSL_MIRROR_PORT_EGRESS_ACL 0x00000020 |
Enable Egress Mirroring for ACLs. | |
#define | OPENNSL_MIRROR_PORT_EGRESS_TRUE 0x00000008 |
True egress mirroring. | |
#define | OPENNSL_MIRROR_PORT_ENABLE 0x00000001 |
Enable mirroring. | |
#define | OPENNSL_MIRROR_PORT_INGRESS 0x00000002 |
Ingress mirroring. | |
#define | OPENNSL_MIRROR_PORT_SFLOW 0x00000040 |
sFlow mirroring | |
Typedefs | |
typedef struct opennsl_mirror_destination_s | opennsl_mirror_destination_t |
Mirror destination Structure. | |
typedef int(* | opennsl_mirror_destination_traverse_cb )(int unit, opennsl_mirror_destination_t *mirror_dest, void *user_data) |
typedef struct opennsl_mirror_options_s | opennsl_mirror_options_t |
represents the options for the mirroring of packets | |
typedef struct opennsl_mirror_pkt_erspan_encap_s | opennsl_mirror_pkt_erspan_encap_t |
Contains information required for ERSPAN encapsulation header. | |
typedef struct opennsl_mirror_port_info_s | opennsl_mirror_port_info_t |
Mirror port Structure. | |
Functions | |
int | opennsl_mirror_destination_create (int unit, opennsl_mirror_destination_t *mirror_dest) LIB_DLL_EXPORTED |
Add mirror destination descriptor. | |
int | opennsl_mirror_destination_destroy (int unit, opennsl_gport_t mirror_dest_id) LIB_DLL_EXPORTED |
Remove mirror destination descriptor. | |
int | opennsl_mirror_destination_get (int unit, opennsl_gport_t mirror_dest_id, opennsl_mirror_destination_t *mirror_dest) LIB_DLL_EXPORTED |
Read content of mirror destination descriptor. | |
void | opennsl_mirror_destination_t_init (opennsl_mirror_destination_t *mirror_dest) LIB_DLL_EXPORTED |
Initialize a mirror destination structure. | |
int | opennsl_mirror_destination_traverse (int unit, opennsl_mirror_destination_traverse_cb cb, void *user_data) LIB_DLL_EXPORTED |
Traverse over all installed mirror destination descriptors. | |
int | opennsl_mirror_egress_get (int unit, opennsl_port_t port, int *val) LIB_DLL_EXPORTED |
Get the egress mirroring enabled/disabled status for a port on the device. | |
int | opennsl_mirror_egress_set (int unit, opennsl_port_t port, int val) LIB_DLL_EXPORTED |
Enable or Disable egress mirroring for a port on the device. | |
int | opennsl_mirror_ingress_get (int unit, opennsl_port_t port, int *val) LIB_DLL_EXPORTED |
Get the ingress mirroring enabled/disabled status for a port on the device. | |
int | opennsl_mirror_ingress_set (int unit, opennsl_port_t port, int val) LIB_DLL_EXPORTED |
Enable or Disable ingress mirroring for a port on the device. | |
int | opennsl_mirror_init (int unit) LIB_DLL_EXPORTED |
Initialize the mirroring module to its initial configuration. | |
int | opennsl_mirror_mode_get (int unit, int *mode) LIB_DLL_EXPORTED |
Get the current mirroring mode for the device. | |
int | opennsl_mirror_mode_set (int unit, int mode) LIB_DLL_EXPORTED |
Set the current mirroring mode for the device. | |
int | opennsl_mirror_port_dest_add (int unit, opennsl_port_t port, uint32 flags, opennsl_gport_t mirror_dest_id) LIB_DLL_EXPORTED |
Add mirroring destination to a port. | |
int | opennsl_mirror_port_dest_delete (int unit, opennsl_port_t port, uint32 flags, opennsl_gport_t mirror_dest_id) LIB_DLL_EXPORTED |
Delete mirroring destination from a port. | |
int | opennsl_mirror_port_dest_delete_all (int unit, opennsl_port_t port, uint32 flags) LIB_DLL_EXPORTED |
Delete all mirroring destinations from a port. | |
int | opennsl_mirror_port_dest_get (int unit, opennsl_port_t port, uint32 flags, int mirror_dest_size, opennsl_gport_t *mirror_dest, int *mirror_dest_count) LIB_DLL_EXPORTED |
Get port mirroring destinations. | |
int | opennsl_mirror_port_get (int unit, opennsl_port_t port, opennsl_module_t *dest_mod, opennsl_port_t *dest_port, uint32 *flags) LIB_DLL_EXPORTED |
Get mirroring configuration for a port. | |
int | opennsl_mirror_port_info_get (int unit, opennsl_port_t port, uint32 flags, opennsl_mirror_port_info_t *info) LIB_DLL_EXPORTED |
Get mirroring information per port. | |
int | opennsl_mirror_port_info_set (int unit, opennsl_port_t port, uint32 flags, opennsl_mirror_port_info_t *info) LIB_DLL_EXPORTED |
Set mirroring information per port. | |
void | opennsl_mirror_port_info_t_init (opennsl_mirror_port_info_t *info) LIB_DLL_EXPORTED |
Initialize a mirror port information structure. | |
int | opennsl_mirror_port_set (int unit, opennsl_port_t port, opennsl_module_t dest_mod, opennsl_port_t dest_port, uint32 flags) LIB_DLL_EXPORTED |
Set mirroring configuration for a port. | |
int | opennsl_mirror_port_vlan_dest_add (int unit, opennsl_port_t port, opennsl_vlan_t vlan, uint32 flags, opennsl_gport_t destid) LIB_DLL_EXPORTED |
Add mirroring destination to a port-vlan. | |
int | opennsl_mirror_port_vlan_dest_delete (int unit, opennsl_port_t port, opennsl_vlan_t vlan, uint32 flags, opennsl_gport_t destid) LIB_DLL_EXPORTED |
Delete mirroring destination from a port-vlan. | |
int | opennsl_mirror_port_vlan_dest_delete_all (int unit, opennsl_port_t port, opennsl_vlan_t vlan, uint32 flags) LIB_DLL_EXPORTED |
Delete all mirroring destinations from a port-vlan. | |
int | opennsl_mirror_port_vlan_dest_get (int unit, opennsl_port_t port, opennsl_vlan_t vlan, uint32 flags, uint32 mirror_dest_size, opennsl_gport_t *destid, uint32 *destcount) LIB_DLL_EXPORTED |
Get port-vlan mirroring destinations. | |
int | opennsl_mirror_port_vlan_get (int unit, opennsl_port_t port, opennsl_vlan_t vlan, opennsl_gport_t *dest_port, uint32 *flags) LIB_DLL_EXPORTED |
Get mirroring configuration for a port-vlan. | |
int | opennsl_mirror_port_vlan_set (int unit, opennsl_port_t port, opennsl_vlan_t vlan, opennsl_gport_t destport, uint32 flags) LIB_DLL_EXPORTED |
Set mirroring configuration for a port-vlan. | |
int | opennsl_mirror_to_get (int unit, opennsl_port_t *port) LIB_DLL_EXPORTED |
Get the mirror-to port for the device. | |
int | opennsl_mirror_to_pbmp_get (int unit, opennsl_port_t port, opennsl_pbmp_t *pbmp) LIB_DLL_EXPORTED |
Get the mirror-to port bitmap for the device. | |
int | opennsl_mirror_to_pbmp_set (int unit, opennsl_port_t port, opennsl_pbmp_t pbmp) LIB_DLL_EXPORTED |
Set the mirror-to port bitmap for the device. | |
int | opennsl_mirror_to_set (int unit, opennsl_port_t port) LIB_DLL_EXPORTED |
Set the mirror-to port for the device. | |
int | opennsl_mirror_vlan_get (int unit, opennsl_port_t port, uint16 *tpid, uint16 *vlan) LIB_DLL_EXPORTED |
Get VLAN for egressing mirrored packets on a port (RSPAN). | |
int | opennsl_mirror_vlan_set (int unit, opennsl_port_t port, uint16 tpid, uint16 vlan) LIB_DLL_EXPORTED |
Set VLAN for egressing mirrored packets on a port (RSPAN). | |
#define OPENNSL_MIRROR_DEST_DEST_MULTICAST (1 << 9) |
#define OPENNSL_MIRROR_DEST_DROP_FWD_IF_SNIFF_DROPPED (1 << 22) |
#define OPENNSL_MIRROR_DEST_DROP_SNIFF_IF_FWD_DROPPED (1 << 21) |
#define OPENNSL_MIRROR_DEST_EGRESS_ADD_ORIG_SYSTEM_HEADER (1 << 18) |
#define OPENNSL_MIRROR_DEST_EGRESS_TRAP_WITH_SYSTEM_HEADER (1 << 28) |
#define OPENNSL_MIRROR_DEST_FIELD (1 << 19) |
#define OPENNSL_MIRROR_DEST_FLAGS2_TUNNEL_VXLAN (1 << 0) |
#define OPENNSL_MIRROR_DEST_ID_SHARE (1 << 24) |
#define OPENNSL_MIRROR_DEST_INT_PRI_SET (1 << 13) |
#define OPENNSL_MIRROR_DEST_IS_SNOOP (1 << 16) |
#define OPENNSL_MIRROR_DEST_IS_STAT_SAMPLE (1 << 17) |
#define OPENNSL_MIRROR_DEST_IS_TRAP (1 << 17) |
#define OPENNSL_MIRROR_DEST_MTP_ADD (1 << 25) |
#define OPENNSL_MIRROR_DEST_MTP_DELETE (1 << 26) |
#define OPENNSL_MIRROR_DEST_MTP_REPLACE (1 << 27) |
#define OPENNSL_MIRROR_DEST_NO_COUNT -2 |
#define OPENNSL_MIRROR_DEST_OUT_MIRROR_DISABLE (1 << 30) |
#define OPENNSL_MIRROR_DEST_PAYLOAD_UNTAGGED (1 << 4) |
#define OPENNSL_MIRROR_DEST_PORT (1 << 20) |
#define OPENNSL_MIRROR_DEST_REPLACE (1 << 0) |
#define OPENNSL_MIRROR_DEST_TUNNEL_ETAG (1 << 14) |
#define OPENNSL_MIRROR_DEST_TUNNEL_IP_GRE (1 << 3) |
#define OPENNSL_MIRROR_DEST_TUNNEL_L2 (1 << 2) |
#define OPENNSL_MIRROR_DEST_TUNNEL_NIV (1 << 6) |
#define OPENNSL_MIRROR_DEST_TUNNEL_PSAMP (1 << 29) |
#define OPENNSL_MIRROR_DEST_TUNNEL_RSPAN (1 << 12) |
#define OPENNSL_MIRROR_DEST_TUNNEL_SFLOW (1 << 15) |
#define OPENNSL_MIRROR_DEST_TUNNEL_TRILL (1 << 5) |
#define OPENNSL_MIRROR_DEST_TUNNEL_WITH_ENCAP_ID (1 << 10) |
#define OPENNSL_MIRROR_DEST_TUNNEL_WITH_SEQ (1 << 31) |
#define OPENNSL_MIRROR_DEST_UPDATE_COUNTER (1 << 8) |
#define OPENNSL_MIRROR_DEST_UPDATE_COUNTER_1 (1 << 21) |
#define OPENNSL_MIRROR_DEST_UPDATE_COUNTER_2 (1 << 22) |
#define OPENNSL_MIRROR_DEST_UPDATE_EXT_COUNTERS (1 << 31) |
#define OPENNSL_MIRROR_DEST_UPDATE_POLICER (1 << 7) |
#define OPENNSL_MIRROR_DEST_WITH_ID (1 << 1) |
#define OPENNSL_MIRROR_EXT_STAT_ID_COUNT 2 |
#define OPENNSL_MIRROR_NIV_LOOP 1 |
#define OPENNSL_MIRROR_PORT_DEST_TRUNK 0x00000010 |
#define OPENNSL_MIRROR_PORT_EGRESS 0x00000004 |
#define OPENNSL_MIRROR_PORT_EGRESS_ACL 0x00000020 |
#define OPENNSL_MIRROR_PORT_EGRESS_TRUE 0x00000008 |
#define OPENNSL_MIRROR_PORT_ENABLE 0x00000001 |
#define OPENNSL_MIRROR_PORT_INGRESS 0x00000002 |
#define OPENNSL_MIRROR_PORT_SFLOW 0x00000040 |
typedef struct opennsl_mirror_destination_s opennsl_mirror_destination_t |
Mirror destination Structure.
Contains information required for manipulating mirror destinations.
typedef int(* opennsl_mirror_destination_traverse_cb)(int unit, opennsl_mirror_destination_t *mirror_dest, void *user_data) |
typedef struct opennsl_mirror_options_s opennsl_mirror_options_t |
represents the options for the mirroring of packets
Contains information required for ERSPAN encapsulation header.
typedef struct opennsl_mirror_port_info_s opennsl_mirror_port_info_t |
Mirror port Structure.
Contains information required for mirror port settings.
int opennsl_mirror_destination_create | ( | int | unit, |
opennsl_mirror_destination_t * | mirror_dest | ||
) |
Add mirror destination descriptor.
unit | [IN] Unit number. |
mirror_dest | [IN,OUT] Mirrored destination and encapsulation |
OPENNSL_E_XXX |
int opennsl_mirror_destination_destroy | ( | int | unit, |
opennsl_gport_t | mirror_dest_id | ||
) |
Remove mirror destination descriptor.
unit | [IN] Unit number. |
mirror_dest_id | [IN] Mirrored destination ID to be removed. |
OPENNSL_E_XXX |
int opennsl_mirror_destination_get | ( | int | unit, |
opennsl_gport_t | mirror_dest_id, | ||
opennsl_mirror_destination_t * | mirror_dest | ||
) |
Read content of mirror destination descriptor.
unit | [IN] Unit number. |
mirror_dest_id | [IN] Mirrored destination ID to be removed. |
mirror_dest | [IN,OUT] Mirrored destination ID to be removed. |
OPENNSL_E_XXX |
void opennsl_mirror_destination_t_init | ( | opennsl_mirror_destination_t * | mirror_dest | ) |
Initialize a mirror destination structure.
mirror_dest | [IN,OUT] Pointer to the struct to be initialized |
None. |
int opennsl_mirror_destination_traverse | ( | int | unit, |
opennsl_mirror_destination_traverse_cb | cb, | ||
void * | user_data | ||
) |
Traverse over all installed mirror destination descriptors.
unit | [IN] Unit number. |
cb | [IN] Traverse callback. |
user_data | [IN] User provided cookie. |
OPENNSL_E_XXX | Traverse over all installed mirror destination descriptors. For each valid destination user callback is called with user_data provided in function call. |
int opennsl_mirror_egress_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | val | ||
) |
Get the egress mirroring enabled/disabled status for a port on the device.
unit | [IN] Unit number. |
port | [IN] Device or logical port number for which to retrieve egress mirroring status. |
val | [OUT] Boolean value for on/off |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID. |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_INIT | Module is not initialized. |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_egress_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | val | ||
) |
Enable or Disable egress mirroring for a port on the device.
unit | [IN] Unit number. |
port | [IN] Device or logical port number to enable egress mirroring on. |
val | [IN] Boolean value for on/off |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID. |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_INIT | Module is not initialized. |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_ingress_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | val | ||
) |
Get the ingress mirroring enabled/disabled status for a port on the device.
unit | [IN] Unit number. |
port | [IN] Device or logical port number for which to retrieve ingress mirroring status. |
val | [OUT] Boolean value for on/off |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID. |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_INIT | Module is not initialized. |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_ingress_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | val | ||
) |
Enable or Disable ingress mirroring for a port on the device.
unit | [IN] Unit number. |
port | [IN] Device or logical port number to get ingress mirroring enable status on. |
val | [IN] Boolean value for on/off |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID. |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_INIT | Module is not initialized. |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_init | ( | int | unit | ) |
Initialize the mirroring module to its initial configuration.
unit | [IN] Unit number. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID. |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_mode_get | ( | int | unit, |
int * | mode | ||
) |
Get the current mirroring mode for the device.
unit | [IN] Unit number. |
mode | [OUT] OPENNSL Mirroring mode |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID. |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_mode_set | ( | int | unit, |
int | mode | ||
) |
Set the current mirroring mode for the device.
unit | [IN] Unit number. |
mode | [IN] OPENNSL Mirroring mode |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | On non switch family switch devices |
OPENNSL_E_UNIT | Invalid OPENNSL device ID |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_port_dest_add | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 | flags, | ||
opennsl_gport_t | mirror_dest_id | ||
) |
Add mirroring destination to a port.
unit | [IN] Unit number. |
port | [IN] Mirrored port |
flags | [IN] OPENNSL_MIRROR_PORT_* |
mirror_dest_id | [IN] |
OPENNSL_E_XXX |
int opennsl_mirror_port_dest_delete | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 | flags, | ||
opennsl_gport_t | mirror_dest_id | ||
) |
Delete mirroring destination from a port.
unit | [IN] Unit number. |
port | [IN] Mirrored port |
flags | [IN] OPENNSL_MIRROR_PORT_* |
mirror_dest_id | [IN] |
OPENNSL_E_XXX |
int opennsl_mirror_port_dest_delete_all | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 | flags | ||
) |
Delete all mirroring destinations from a port.
unit | [IN] Unit number. |
port | [IN] Mirrored port |
flags | [IN] OPENNSL_MIRROR_PORT_* |
OPENNSL_E_XXX |
int opennsl_mirror_port_dest_get | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 | flags, | ||
int | mirror_dest_size, | ||
opennsl_gport_t * | mirror_dest, | ||
int * | mirror_dest_count | ||
) |
Get port mirroring destinations.
unit | [IN] Unit number. |
port | [IN] Mirrored port |
flags | [IN] OPENNSL_MIRROR_PORT_* |
mirror_dest_size | [IN] Size of allocated entries in mirror_dest array. |
mirror_dest | [OUT] Size of allocated entries in mirror_dest array. |
mirror_dest_count | [OUT] Actual number of mirror destinations. This will be a value less than or equal to the value passed in as mirror_dest_size unless mirror_dest_size is 0. If mirror_dest_size is 0 then mirror_dest is ignored and mirror_dest_count is filled in with the number of entries that would have been filled into mirror_dest if mirror_dest_size was arbitrarily large. |
OPENNSL_E_XXX |
int opennsl_mirror_port_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_module_t * | dest_mod, | ||
opennsl_port_t * | dest_port, | ||
uint32 * | flags | ||
) |
Get mirroring configuration for a port.
unit | [IN] Unit number. |
port | [IN] Port number to get configuration for |
dest_mod | [OUT] Module ID of mirror-to port |
dest_port | [OUT] Mirror-to port |
flags | [OUT] OPENNSL_MIRROR_PORT_* flags |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_port_info_get | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 | flags, | ||
opennsl_mirror_port_info_t * | info | ||
) |
Get mirroring information per port.
unit | [IN] Unit number. |
port | [IN] Port number to configure |
flags | [IN] OPENNSL_MIRROR_PORT_* flags |
info | [OUT] Mirror port information. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_port_info_set | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 | flags, | ||
opennsl_mirror_port_info_t * | info | ||
) |
Set mirroring information per port.
unit | [IN] Unit number. |
port | [IN] Port number to configure |
flags | [IN] OPENNSL_MIRROR_PORT_* flags |
info | [IN] Mirror port information. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_XXX | Other errors |
void opennsl_mirror_port_info_t_init | ( | opennsl_mirror_port_info_t * | info | ) |
Initialize a mirror port information structure.
info | [IN,OUT] Pointer to the struct to be initialized |
None. |
int opennsl_mirror_port_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_module_t | dest_mod, | ||
opennsl_port_t | dest_port, | ||
uint32 | flags | ||
) |
Set mirroring configuration for a port.
unit | [IN] Unit number. |
port | [IN] Port number to configure |
dest_mod | [IN] Module ID of mirror-to port (-1 for local port) |
dest_port | [IN] Mirror-to port |
flags | [IN] OPENNSL_MIRROR_PORT_* flags |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_port_vlan_dest_add | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_vlan_t | vlan, | ||
uint32 | flags, | ||
opennsl_gport_t | destid | ||
) |
Add mirroring destination to a port-vlan.
unit | [IN] Unit number. |
port | [IN] Mirrored port |
vlan | [IN] Mirrored vlan |
flags | [IN] OPENNSL_MIRROR_PORT_* |
destid | [IN] Destination GPORT Must be OPENNSL_GPORT_MIRROR. |
OPENNSL_E_XXX |
int opennsl_mirror_port_vlan_dest_delete | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_vlan_t | vlan, | ||
uint32 | flags, | ||
opennsl_gport_t | destid | ||
) |
Delete mirroring destination from a port-vlan.
unit | [IN] Unit number. |
port | [IN] Mirrored port |
vlan | [IN] Mirrored vlan |
flags | [IN] OPENNSL_MIRROR_PORT_* |
destid | [IN] Destination GPORT Must be OPENNSL_GPORT_MIRROR. |
OPENNSL_E_XXX |
int opennsl_mirror_port_vlan_dest_delete_all | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_vlan_t | vlan, | ||
uint32 | flags | ||
) |
Delete all mirroring destinations from a port-vlan.
unit | [IN] Unit number. |
port | [IN] Mirrored port |
vlan | [IN] Mirrored vlan |
flags | [IN] OPENNSL_MIRROR_PORT_* |
OPENNSL_E_XXX |
int opennsl_mirror_port_vlan_dest_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_vlan_t | vlan, | ||
uint32 | flags, | ||
uint32 | mirror_dest_size, | ||
opennsl_gport_t * | destid, | ||
uint32 * | destcount | ||
) |
Get port-vlan mirroring destinations.
unit | [IN] Unit number. |
port | [IN] Mirrored port |
vlan | [IN] Mirrored vlan |
flags | [IN] OPENNSL_MIRROR_PORT_* |
mirror_dest_size | [IN] Size of allocated entries in mirror_dest array. |
destid | [OUT] Array for mirror destinations information |
destcount | [OUT] Actual number of mirror destinations. This will be a value less than or equal to the value passed in as mirror_dest_size unless mirror_dest_size is 0. If mirror_dest_size is 0 then mirror_dest is ignored and mirror_dest_count is filled in with the number of entries that would have been filled into mirror_dest if mirror_dest_size was arbitrarily large. |
OPENNSL_E_XXX |
int opennsl_mirror_port_vlan_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_vlan_t | vlan, | ||
opennsl_gport_t * | dest_port, | ||
uint32 * | flags | ||
) |
Get mirroring configuration for a port-vlan.
unit | [IN] Unit number. |
port | [IN] Port number to get configuration for |
vlan | [IN] Vlan number to get configuration for |
dest_port | [OUT] |
flags | [OUT] OPENNSL_MIRROR_PORT_* flags |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_port_vlan_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_vlan_t | vlan, | ||
opennsl_gport_t | destport, | ||
uint32 | flags | ||
) |
Set mirroring configuration for a port-vlan.
unit | [IN] Unit number. |
port | [IN] Port number to configure |
vlan | [IN] Vlan number to configure |
destport | [IN] Mirror-to port |
flags | [IN] OPENNSL_MIRROR_PORT_* flags |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_to_get | ( | int | unit, |
opennsl_port_t * | port | ||
) |
Get the mirror-to port for the device.
unit | [IN] Unit number. |
port | [OUT] Device or logical port number to mirror all ingress/egress selections to. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID. |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_to_pbmp_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_pbmp_t * | pbmp | ||
) |
Get the mirror-to port bitmap for the device.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
pbmp | [OUT] The port bitmap of mirror-to ports for this port |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_to_pbmp_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_pbmp_t | pbmp | ||
) |
Set the mirror-to port bitmap for the device.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
pbmp | [IN] The port bitmap of mirror-to ports for this port |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID. |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_to_set | ( | int | unit, |
opennsl_port_t | port | ||
) |
Set the mirror-to port for the device.
unit | [IN] Unit number. |
port | [IN] Device or logical port number to mirror all ingress/egress selections to. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID. |
OPENNSL_E_CONFIG | Operation not supported for directed mirroring configurations. |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_vlan_get | ( | int | unit, |
opennsl_port_t | port, | ||
uint16 * | tpid, | ||
uint16 * | vlan | ||
) |
Get VLAN for egressing mirrored packets on a port (RSPAN).
unit | [IN] Unit number. |
port | [IN] Port number to configure |
tpid | [OUT] Tag protocol ID |
vlan | [OUT] VLAN number |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_XXX | Other errors |
int opennsl_mirror_vlan_set | ( | int | unit, |
opennsl_port_t | port, | ||
uint16 | tpid, | ||
uint16 | vlan | ||
) |
Set VLAN for egressing mirrored packets on a port (RSPAN).
unit | [IN] Unit number. |
port | [IN] Port number to configure |
tpid | [IN] Tag protocol ID (0 to disable) |
vlan | [IN] VLAN number (0 to disable) |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNIT | Invalid OPENNSL device ID |
OPENNSL_E_PORT | Invalid port |
OPENNSL_E_XXX | Other errors |