-netdev_get_next_hop(const struct in_addr *host, struct in_addr *next_hop,
- char **netdev_name)
-{
- static const char fn[] = "/proc/net/route";
- FILE *stream;
- char line[256];
- int ln;
-
- *netdev_name = NULL;
- stream = fopen(fn, "r");
- if (stream == NULL) {
- VLOG_WARN_RL(&rl, "%s: open failed: %s", fn, strerror(errno));
- return errno;
- }
-
- ln = 0;
- while (fgets(line, sizeof line, stream)) {
- if (++ln >= 2) {
- char iface[17];
- uint32_t dest, gateway, mask;
- int refcnt, metric, mtu;
- unsigned int flags, use, window, irtt;
-
- if (sscanf(line,
- "%16s %"SCNx32" %"SCNx32" %04X %d %u %d %"SCNx32
- " %d %u %u\n",
- iface, &dest, &gateway, &flags, &refcnt,
- &use, &metric, &mask, &mtu, &window, &irtt) != 11) {
-
- VLOG_WARN_RL(&rl, "%s: could not parse line %d: %s",
- fn, ln, line);
- continue;
- }
- if (!(flags & RTF_UP)) {
- /* Skip routes that aren't up. */
- continue;
- }
+netdev_get_queue(const struct netdev *netdev,
+ unsigned int queue_id, struct shash *details)
+{
+ const struct netdev_class *class = netdev_get_dev(netdev)->netdev_class;
+ int retval;