openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

mirror.h (3853B)


      1 /*
      2  * 
      3  * 
      4  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      5  * 
      6  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      7  * 
      8  * DO NOT EDIT THIS FILE!
      9  * This file is auto-generated.
     10  * Edits to this file will be lost when it is regenerated.
     11  */
     12 
     13 #ifndef __BCMX_MIRROR_H__
     14 #define __BCMX_MIRROR_H__
     15 
     16 #include <bcm/types.h>
     17 #include <bcmx/bcmx.h>
     18 #include <bcmx/lplist.h>
     19 #include <bcm/mirror.h>
     20 
     21 typedef bcm_mirror_destination_t bcmx_mirror_destination_t;
     22 
     23 /* Initialize the mirror destination structure. */
     24 extern void bcmx_mirror_destination_t_init(
     25     bcmx_mirror_destination_t *mirror_dest);
     26 
     27 /* Initialize the mirroring module to its initial configuration. */
     28 extern int bcmx_mirror_init(void);
     29 
     30 /* Create a mirror (destination, encapsulation) pair. */
     31 extern int bcmx_mirror_destination_create(
     32     bcmx_mirror_destination_t *mirror_dest);
     33 
     34 /* Get  mirror (destination, encapsulation) pair. */
     35 extern int bcmx_mirror_destination_get(
     36     bcm_gport_t mirror_dest_id, 
     37     bcmx_mirror_destination_t *mirror_dest);
     38 
     39 /* Destroy a mirror (destination, encapsulation) pair. */
     40 extern int bcmx_mirror_destination_destroy(
     41     bcm_gport_t mirror_dest_id);
     42 
     43 /* Set the current mirroring mode for the device. */
     44 extern int bcmx_mirror_mode_set(
     45     int mode);
     46 
     47 /* Get the current mirroring mode for the device. */
     48 extern int bcmx_mirror_mode_get(
     49     int *mode);
     50 
     51 /* Set the mirror-to port for the device. */
     52 extern int bcmx_mirror_to_set(
     53     bcmx_lport_t port);
     54 
     55 /* Get the mirror-to port for the device. */
     56 extern int bcmx_mirror_to_get(
     57     bcmx_lport_t *port);
     58 
     59 /* Enable or Disable ingress mirroring for a port on the device. */
     60 extern int bcmx_mirror_ingress_set(
     61     bcmx_lport_t port, 
     62     int val);
     63 
     64 /* 
     65  * Get the ingress mirroring enabled/disabled status for a port on the
     66  * device.
     67  */
     68 extern int bcmx_mirror_ingress_get(
     69     bcmx_lport_t port, 
     70     int *val);
     71 
     72 /* Enable or Disable egress mirroring for a port on the device. */
     73 extern int bcmx_mirror_egress_set(
     74     bcmx_lport_t port, 
     75     int val);
     76 
     77 /* 
     78  * Get the egress mirroring enabled/disabled status for a port on the
     79  * device.
     80  */
     81 extern int bcmx_mirror_egress_get(
     82     bcmx_lport_t port, 
     83     int *val);
     84 
     85 /* Set mirror-to ports for a port. */
     86 extern int bcmx_mirror_fabric_list_set(
     87     bcmx_lport_t port, 
     88     bcmx_lplist_t lplist);
     89 
     90 /* Get mirror-to ports for a port. */
     91 extern int bcmx_mirror_fabric_list_get(
     92     bcmx_lport_t port, 
     93     bcmx_lplist_t *lplist);
     94 
     95 /* Set mirroring configuration for a port. */
     96 extern int bcmx_mirror_port_set(
     97     bcmx_lport_t port, 
     98     bcmx_lport_t dest_port, 
     99     uint32 flags);
    100 
    101 /* Get mirroring configuration for a port. */
    102 extern int bcmx_mirror_port_get(
    103     bcmx_lport_t port, 
    104     bcmx_lport_t *dest_port, 
    105     uint32 *flags);
    106 
    107 /* Set VLAN for egressing mirrored packets on a port (RSPAN). */
    108 extern int bcmx_mirror_vlan_set(
    109     bcmx_lport_t port, 
    110     uint16 tpid, 
    111     uint16 vlan);
    112 
    113 /* Get VLAN for egressing mirrored packets on a port (RSPAN). */
    114 extern int bcmx_mirror_vlan_get(
    115     bcmx_lport_t port, 
    116     uint16 *tpid, 
    117     uint16 *vlan);
    118 
    119 /* Add mirroring destination to a port */
    120 extern int bcmx_mirror_port_dest_add(
    121     bcmx_lport_t port, 
    122     uint32 flags, 
    123     bcm_gport_t mirror_dest_id);
    124 
    125 /* Delete mirroring destination from a port */
    126 extern int bcmx_mirror_port_dest_delete(
    127     bcmx_lport_t port, 
    128     uint32 flags, 
    129     bcm_gport_t mirror_dest_id);
    130 
    131 /* Delete all mirroring destinations from a port */
    132 extern int bcmx_mirror_port_dest_delete_all(
    133     bcmx_lport_t port, 
    134     uint32 flags);
    135 
    136 /* Get port mirroring destinations */
    137 extern int bcmx_mirror_port_dest_get(
    138     bcmx_lport_t port, 
    139     uint32 flags, 
    140     int mirror_dest_size, 
    141     bcm_gport_t *mirror_dest, 
    142     int *mirror_dest_count);
    143 
    144 #endif /* __BCMX_MIRROR_H__ */