/src/capstonenext/arch/BPF/BPFModule.c
| Line | Count | Source (jump to first uncovered line) | 
| 1 |  | /* Capstone Disassembly Engine */ | 
| 2 |  | /* BPF Backend by david942j <david942j@gmail.com>, 2019 */ | 
| 3 |  |  | 
| 4 |  | #ifdef CAPSTONE_HAS_BPF | 
| 5 |  |  | 
| 6 |  | #include "BPFDisassembler.h" | 
| 7 |  | #include "BPFInstPrinter.h" | 
| 8 |  | #include "BPFMapping.h" | 
| 9 |  | #include "BPFModule.h" | 
| 10 |  |  | 
| 11 |  | cs_err BPF_global_init(cs_struct *ud) | 
| 12 | 785 | { | 
| 13 | 785 |   ud->printer = BPF_printInst; | 
| 14 | 785 |   ud->reg_name = BPF_reg_name; | 
| 15 | 785 |   ud->insn_id = BPF_get_insn_id; | 
| 16 | 785 |   ud->insn_name = BPF_insn_name; | 
| 17 | 785 |   ud->group_name = BPF_group_name; | 
| 18 | 785 | #ifndef CAPSTONE_DIET | 
| 19 | 785 |   ud->reg_access = BPF_reg_access; | 
| 20 | 785 | #endif | 
| 21 | 785 |   ud->disasm = BPF_getInstruction; | 
| 22 |  |  | 
| 23 | 785 |   return CS_ERR_OK; | 
| 24 | 785 | } | 
| 25 |  |  | 
| 26 |  | cs_err BPF_option(cs_struct *handle, cs_opt_type type, size_t value) | 
| 27 | 402 | { | 
| 28 | 402 |   if (type == CS_OPT_MODE) | 
| 29 | 0 |     handle->mode = (cs_mode)value; | 
| 30 |  |  | 
| 31 | 402 |   return CS_ERR_OK; | 
| 32 | 402 | } | 
| 33 |  |  | 
| 34 |  | #endif |