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). > > You're right, and I actually used the wrong term. What I need is the default gateway, and there can be only one of that. I'd add a status_t GetDefaultGateway(BNetworkInterfaceAddress&) to the class to obtain that. > > Is it correct that BNetworkInterfaceAddress::**Broadcast() and >> ::Destination() both return the broadcast address ? >> > > It's the destination address for P2P networks - since you can have either > or but not both, the same storage location is used. > > Ah, okay. Thanks!