Artificial intelligent assistant

API for IPROUTE2 in any programming language Is there any API that can be used to manipulate Linux routing table? I want to write a program that listens to sockets and then modifies routing table accordingly, just a simple code, but need an API.

You can use `Netlink`. From the wiki,

> Netlink was designed for and is used to transfer miscellaneous networking information between the Linux kernel space and user space processes. Networking utilities such as iproute2 use Netlink to communicate with the Linux kernel from user space. Netlink consists of a standard socket-based interface for user space processes and an internal kernel API for kernel modules. It is designed to be a more flexible successor to ioctl. Originally, Netlink used the AF_NETLINK socket family.

My personal preference would be bash scripts for such tasks since I can specify the `iptables` rules/routing in my script itself. If you are using programming language like C, you can probably invoke `system` and then use the return value in your program to do something.

There is one API named **haxwithaxe** available from here

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 0478f5035f3282c66ad276f3a12c009c