Routing Utility Functions
- 1) Translating Routing Table Names
err = rtnl_route_read_table_names("/etc/iproute2/rt_tables");
int table = rtnl_route_str2table("main");
char buf[32];
printf("Name: %s\n",
rtnl_route_table2str(table, buf, sizeof(buf)));
◆ rtnl_route_read_table_names()
int rtnl_route_read_table_names |
( |
const char * | path | ) |
|
◆ rtnl_route_table2str()
char * rtnl_route_table2str |
( |
int | table, |
|
|
char * | buf, |
|
|
size_t | size ) |
◆ rtnl_route_str2table()
int rtnl_route_str2table |
( |
const char * | name | ) |
|
◆ rtnl_route_read_protocol_names()
int rtnl_route_read_protocol_names |
( |
const char * | path | ) |
|
◆ rtnl_route_proto2str()
char * rtnl_route_proto2str |
( |
int | proto, |
|
|
char * | buf, |
|
|
size_t | size ) |
◆ rtnl_route_str2proto()
int rtnl_route_str2proto |
( |
const char * | name | ) |
|
◆ rtnl_route_metric2str()
char * rtnl_route_metric2str |
( |
int | metric, |
|
|
char * | buf, |
|
|
size_t | size ) |
◆ rtnl_route_str2metric()
int rtnl_route_str2metric |
( |
const char * | name | ) |
|