OpenNSL API Guide and Reference Manual
Data Structures | Macros | Typedefs | Functions
mirror.h File Reference
#include <opennsl/types.h>
#include <opennsl/pkt.h>
#include <opennsl/mirrorX.h>

Go to the source code of this file.

Data Structures

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...
 

Macros

#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_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_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_set (int unit, opennsl_port_t port) LIB_DLL_EXPORTED
 Set the mirror-to port for the device.