/* * This file is separate from sdb.h, because I want that one to remain * unchanged (as far as possible) from the official sdb distribution * * This file and associated functionality are a playground for me to * understand stuff which will later be implemented in more generic places. */#include <linux/sdb.h>/* This is the union of all currently defined types */unionsdb_record{structsdb_interconnectic;structsdb_devicedev;structsdb_bridgebridge;structsdb_integrationintegr;structsdb_emptyempty;};structfmc_device;/* Every sdb table is turned into this structure */structsdb_array{intlen;intlevel;unsignedlongbaseaddr;structfmc_device*fmc;/* the device that hosts it */structsdb_array*parent;/* NULL at root */unionsdb_record*record;/* copies of the struct */structsdb_array**subtree;/* only valid for bridge items */};externintfmc_scan_sdb_tree(structfmc_device*fmc,unsignedlongaddress);externvoidfmc_show_sdb_tree(conststructfmc_device*fmc);externsignedlongfmc_find_sdb_device(structsdb_array*tree,uint64_tvendor,uint32_tdevice,unsignedlong*sz);externintfmc_free_sdb_tree(structfmc_device*fmc);