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

  • From: "jackburton" <trac@xxxxxxxxxxxx>
  • Date: Tue, 23 Apr 2013 08:11:28 -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
 Resolution:                    |   Keywords:
 Blocked By:                    |   Blocking:
Has a Patch:  0                 |   Platform:  All
--------------------------------+----------------------------

Comment (by jackburton):

 Replying to [comment:1 phoudoin]:
 > What about this:
 >
 >
 > {{{
 > status_t BNetworkRoster::GetRouteAt(const char* interfaceName,
 >     int32 index, route_entry* route);
 > }}}
 >
 > Or, instead of `route_entry*`, introduce a `BNetworkRoute` object to
 wrap it.
 >
 > If interfaceName is NULL, this call could returns all current network
 routes.

 Yeah.

 > An alternative to `GetRouteAt()` semantic could be an opaque cookie-
 based `GetNextRoute()`, but IIRC we don't use it for method, only for C
 functions, as `get_next_*_info()` and the likes.

 We actually use this semantic in BNetworkDevice::GetNextNetwork(uint32&
 cookie, wireless_network& network);.

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

Other related posts: