I think reading /proc/net/route will be your best bet. Would you consider this a "file"?
The format of /proc/net/route is well-known, and in-memory, so there's no I/O penalty or fear of this changing (i.e. versus reading something from /etc/network/*)