2013/4/7 Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> > On 04/07/2013 02:52 PM, Stefano Ceccherini wrote: > >> Replying to myself: there seems no way to get the default gateway of a >> given BNetworkInterface (but one can add or remove routes at will). Do >> anyone mind if I add a DefaultRoute() method to the class ? >> > > There actually can be any number of default routes. > What's obviously missing in BNetworkInterface is a way to enumerate the > existing routes, though, which you can then use to find the default > route(s). > > Okay, do you have already any idea about the API ? Should it reflect the semantics of the Address api ? In that case, we would have an int32 CountRoutes() (maybe with an int family parameter) and a GetRouteAt(int32 index, route_entry&). And maybe specifics methods for the default routes.