-   Linux - Networking (
-   -   Iproute2 (

a.cohen 10-31-2013 02:49 AM

I didnít find any reference for this basic question
Iím porting a router application to linux Ė and I will use iproute2 to configure the kernel with router-interfaces/addressee/nbrs etc.
Iíve installed iproute2 pkg. and I want to reuse it as much as possible
What are the APIs of the iproute2 that my application can use? for example for 'ip route' commands , is the API is 'do_iproute' ? (and generally do_ipxxx)
Thanks, Avi

wildwizard 11-02-2013 06:48 PM

iproute2 does not present an API, it is an end user application designed for scripting.

You can exec it and check return values or you can look at the source code for the real API functions that it calls which are presented via the kernel.

a.cohen 11-04-2013 08:35 AM

in my application i dont use the shell ip commands - but commands that comes from a remote Mgmt system
i have to translate to iproute2 commands via (argc, argv) and call an appropriate function in iproute2 pkg.
i think that i will call the 'main' function with some modifications.

All times are GMT -5. The time now is 02:44 PM.