[PATCH] Add a function for getting a struct tree for an ent.