search for: rtnl_tc_str2handle

Displaying 1 result from an estimated 1 matches for "rtnl_tc_str2handle".

2007 Sep 23
0
Add U32 Filter with libnl
...lter 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 filter rtnl_u32_add_key_uint16(pFilter, 22, 0xffff, U32_SPORT, 0); // setting flowid sprintf(pBuffer, "1:%i", parentId); /* flowid 1:20 */ rtnl_tc_str2handle(pBuffer, &handle); rtnl_u32_set_cl...