OpenNSL API Guide and Reference Manual
|
Go to the source code of this file.
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... | |
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. | |
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 | |
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_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_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). | |