libnl
3.2.3
|
Routing Utility Functions. More...
Routing Utility Functions.
// libnl is only aware of the de facto standard routing table names. // Additional name <-> identifier associations have to be read in via // a configuration file, f.e. /etc/iproute2/rt_tables err = rtnl_route_read_table_names("/etc/iproute2/rt_tables"); // Translating a table name to its idenfier int table = rtnl_route_str2table("main"); // ... and the other way around. char buf[32]; printf("Name: %s\n", rtnl_route_table2str(table, buf, sizeof(buf)));