[haiku-bugs] [Haiku] #9701: libnetapi: missing api for getting routing table / gateways

  • From: "jackburton" <trac@xxxxxxxxxxxx>
  • Date: Mon, 22 Apr 2013 18:49:50 -0000

#9701: libnetapi: missing api for getting routing table / gateways
------------------------------+------------------------------
 Reporter:  jackburton        |        Owner:  axeld
     Type:  enhancement       |       Status:  new
 Priority:  normal            |    Milestone:
Component:  Kits/Network Kit  |      Version:  R1/Development
 Keywords:                    |   Blocked By:
 Blocking:                    |  Has a Patch:  0
 Platform:  All               |
------------------------------+------------------------------
 Libnetapi currently lacks methods to get the system routing table.
 Could be implemented in various places:

 In the mailing list I proposed
 {{{
 int32 BNetworkInterface::CountRoutes()
 }}}
 and
 {{{
 status_t BNetworkInterface::GetRouteAt(int32 index, route_entry* entry)
 }}}
 but since the routing table isn't interface-specific, although a single
 route can of course be interface-specific, I think it could be implemented
 in BNetworkRoster as a single method
 {{{
 status_t BNetworkRoster::GetRoutingTable(const char* interfaceName,
 BObjectList<route_entry>*)
 }}}

 which would return a list of route_entry objects (or a more friendly class
 (BRoute?)), with the option of filtering by interface name, or even
 family.

 Unfortunately I suspect we don't push the use of BObjectList in public
 api, so we'll need to use a BList here....

 Other ideas ?

--
Ticket URL: <http://dev.haiku-os.org/ticket/9701>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: