stg.h (2533B)
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_STG_H__ 14 #define __BCMX_STG_H__ 15 16 #include <bcm/types.h> 17 #include <bcmx/bcmx.h> 18 #include <bcmx/lplist.h> 19 #include <bcm/stg.h> 20 21 /* 22 * Initialize the Spanning Tree Group (STG) module to its initial 23 * configuration. 24 */ 25 extern int bcmx_stg_init(void); 26 27 /* Designate the default STG ID for the chip. */ 28 extern int bcmx_stg_default_set( 29 bcm_stg_t stg); 30 31 /* Return the current default STG ID for the chip. */ 32 extern int bcmx_stg_default_get( 33 bcm_stg_t *stg_ptr); 34 35 /* Add a VLAN to a specified STG. */ 36 extern int bcmx_stg_vlan_add( 37 bcm_stg_t stg, 38 bcm_vlan_t vid); 39 40 /* Remove a VLAN from a Spanning Tree Group. */ 41 extern int bcmx_stg_vlan_remove( 42 bcm_stg_t stg, 43 bcm_vlan_t vid); 44 45 /* Remove all VLANs from a Spanning Tree Group. */ 46 extern int bcmx_stg_vlan_remove_all( 47 bcm_stg_t stg); 48 49 /* Generates a list of VLANs in a specified STG. */ 50 extern int bcmx_stg_vlan_list( 51 bcm_stg_t stg, 52 bcm_vlan_t **list, 53 int *count); 54 55 /* Destroy a list returned by bcmx_stg_vlan_list. */ 56 extern int bcmx_stg_vlan_list_destroy( 57 bcm_vlan_t *list, 58 int count); 59 60 /* Create a new STG, using a new STG ID. */ 61 extern int bcmx_stg_create( 62 bcm_stg_t *stg_ptr); 63 64 /* Create a new STG, using a specific STG ID. */ 65 extern int bcmx_stg_create_id( 66 bcm_stg_t stg); 67 68 /* Destroys the specified STG. */ 69 extern int bcmx_stg_destroy( 70 bcm_stg_t stg); 71 72 /* Generates a list of IDs for currently defined STGs. */ 73 extern int bcmx_stg_list( 74 bcm_stg_t **list, 75 int *count); 76 77 /* 78 * Destroys a previously returned list of STG IDs; the STGs themselves 79 * are not affected. 80 */ 81 extern int bcmx_stg_list_destroy( 82 bcm_stg_t *list, 83 int count); 84 85 /* Set the Spanning Tree Protocol state of a port in the specified STG. */ 86 extern int bcmx_stg_stp_set( 87 bcm_stg_t stg, 88 bcmx_lport_t port, 89 int stp_state); 90 91 /* 92 * Return the Spanning Tree Protocol state of a port in the specified 93 * STG. 94 */ 95 extern int bcmx_stg_stp_get( 96 bcm_stg_t stg, 97 bcmx_lport_t port, 98 int *stp_state); 99 100 /* 101 * Return the maximum number of STGs that the underlying hardware can 102 * support. 103 */ 104 extern int bcmx_stg_count_get( 105 int *max_stg); 106 107 #endif /* __BCMX_STG_H__ */