get a route from within c code

Linux Advanced Routing and Traffic Control

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

 



I woluld like to know if there is a way to know the route to a destination
without asking it via console (ip route get) but from within c code.
One possible way is to make system("ip route gat xxx.xxx.xxx.xxx"), redirect
to a file and then read the file.
Is there a simpler and more efficient way?

Thanks,

Luca Andreani
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux