Multiple consumers like ipfw, netflow or new route lookup algorithms need to get the prefix data out of struct rtentry.
Instead of providing direct access to the rtentry, create IPv4/IPv6 accessors to abstract struct rtentry internals and avoid including internal routing headers for external consumers.
While here, move struct route_nhop_data to the public header, so external customers can actually use lookup functions returning rt&nhop data.