bcmgene_editor.h (1791B)
1 /*! \file bcmgene_editor.h 2 * 3 * Broadcom Generic Extensible NPL Encapsulation (GENE) editor header file. 4 * This file contains GENE editor definitions internal to the BCM library. 5 */ 6 /* 7 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 8 * 9 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 10 */ 11 12 #ifndef BCMINT_LTSW_GENE_EDITOR_H 13 #define BCMINT_LTSW_GENE_EDITOR_H 14 15 #include <bcm_int/ltsw/chip/bcmgene_db.h> 16 #include <bcmlt/bcmlt.h> 17 18 19 /*! 20 * \brief The struct of GENE handle. 21 */ 22 typedef struct bcmgene_field_data_s { 23 24 /*! The struct of GENE field. */ 25 bcmgene_field_desc_t *fld; 26 27 /*! The index of field array. */ 28 int index; 29 30 /*! The value of field array. */ 31 uint64_t *value; 32 33 /*! The count of field array. */ 34 int count; 35 36 /*! The depth of field array. */ 37 int depth; 38 39 } bcmgene_field_data_t; 40 41 /*! 42 * \brief The struct of GENE handle. 43 */ 44 typedef struct bcmgene_handle_s { 45 46 /*! The unit number. */ 47 int unit; 48 49 /*! The GENE targeting table. */ 50 bcmgene_table_desc_t *tbl; 51 52 #define BCMGENE_F_HANDLE_RESERVED (1 << 0) 53 #define BCMGENE_F_HANDLE_GRACEFUL (1 << 1) 54 #define BCMGENE_F_HANDLE_CALLBACK (1 << 2) 55 56 /*! The GENE flags. */ 57 uint32_t flags; 58 59 /*! The GENE handler. */ 60 bcmlt_entry_handle_t handle; 61 62 /*! The GENE batch handler. */ 63 bcmlt_transaction_hdl_t batch_handle; 64 65 /*! The GENE handler priority. < BCMLT_PRIORITY_xxx */ 66 bcmlt_priority_level_t priority; 67 68 /*! The GENE handler opcode. < BCMLT_OPCODE_xxx */ 69 bcmlt_opcode_t opcode; 70 71 /*! The GENE handler callback function */ 72 int (*cb)(struct bcmgene_handle_s *hndl, void *user_data); 73 74 } bcmgene_handle_t; 75 76 #endif /* BCMINT_LTSW_GENE_EDITOR_H */