#ifndef TOBI_P_H #define TOBI_P_H #include "dg.h" #include "ir.h" #include "nm.h" #include #include typedef struct tobi_input_meta { int is_table; char signature[5]; char source[128]; char oem_id[7]; char oem_table_id[9]; char creator_id[5]; size_t table_len; size_t aml_off; size_t aml_len; uint32_t oem_revision; uint32_t creator_revision; uint32_t header_hash; uint32_t aml_hash; uint8_t revision; uint8_t checksum_byte; uint8_t checksum_sum; int checksum_valid; } tobi_input_meta; typedef struct tobi_parse_result { tobi_ir *root; tobi_diag_list diag; tobi_ns ns; tobi_input_meta meta; tobi_input_meta *inputs; size_t input_len; } tobi_parse_result; typedef struct tobi_parse_input { const uint8_t *data; size_t len; const char *name; } tobi_parse_input; int tobi_parse(const uint8_t *data, size_t len, int strict, tobi_parse_result *out); int tobi_parse_multi(const tobi_parse_input *inputs, size_t count, int strict, tobi_parse_result *out); void tobi_parse_result_free(tobi_parse_result *res); #endif