Displaying 1 result from an estimated 1 matches for "rtnl_cls_set_ifindex".
2007 Sep 23
0
Add U32 Filter with libnl
...er with tc tool i get this extra info not and this filter
functions normal:
filter parent 1: protocol ip pref 100 u32 fh 800::802 order 2050 key ht 800
bkt 0 flowid 1:20
match 00160000/ffff0000 at 20
To create a filter with libnl I do the following things:
rtnl_cls * pFilter = rtnl_cls_alloc();
rtnl_cls_set_ifindex(pFilter, m_networkDeviceIdx); /* eth0 */
rtnl_cls_set_kind(pFilter, "u32"); rtnl_cls_set_prio(pFilter, 100);
rtnl_cls_set_protocol(pFilter, ETH_P_IP);
// setting parent class id
rtnl_tc_str2handle("1:", &handle);
rtnl_cls_set_parent(pFilter, handle);
// source port...