libnl-route to implement ip route get

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to implement `ip route get x.x.x.x` functionality in C.
I understand this command asks the kernel to resolve the route/gateway
for a concrete address and report it to userspace. Please correct me if
I'm wrong.

I'm trying to do this in C using the libnl-route API, but don't see any
combination of functions to achieve it.
I have managed to get the default route by filtering a zero address from
the cache. But I'm stumped at submitting a concrete address to look up...
Could anyone point me in the right direction?

Thanks,

Martin.
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux