LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Iproute2 (https://www.linuxquestions.org/questions/linux-networking-3/iproute2-4175482878/)

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

Iproute2
 
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

Thnaks
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 11:11 PM.