attach.h (1231B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * Attach Application 8 * 9 * A callback suitable for use in the stack task database update 10 * callback is provided. It automatically attaches and detaches 11 * units through the BCM RPC attachments. A callback mechanism 12 * is provided to notify users (BCMX for example) that a unit has 13 * been added or removed. 14 */ 15 16 #ifndef _STKTASK_ATTACH_H 17 #define _STKTASK_ATTACH_H 18 19 #include <appl/cpudb/cpudb.h> 20 21 typedef void (*bcm_stack_attach_cb_f)(int unit, 22 int attach, 23 cpudb_entry_t *cpuent, 24 int cpuunit); 25 26 extern int bcm_stack_attach_init(void); 27 extern int bcm_stack_attach_register(bcm_stack_attach_cb_f callback); 28 extern int bcm_stack_attach_unregister(bcm_stack_attach_cb_f callback); 29 30 extern int bcm_stack_attach_update(cpudb_ref_t db_ref); 31 extern int bcm_stack_attach_running(void); 32 extern int bcm_stack_attach(cpudb_ref_t db_ref); 33 extern int bcm_stack_detach(cpudb_ref_t db_ref); 34 35 #endif /* _STKTASK_ATTACH_H */