libnl api to add Src/Dst Port and fwmark as TC filter to a class

Sunil Vasanta sunil.vasanta at sawridgesystems.com
Wed Apr 20 07:23:48 PDT 2016


Hi All,

I'm able to add source IP, Destination IP and protocol as filter to 
Qdisc classing using libnl API's.

rtnl_u32_add_key_uint32(cls, n,  0xffffffff,12, 0);
        rtnl_u32_add_key_uint32(cls, n,  0xffffffff,16, 0);
        rtnl_u32_add_key_uint8(cls, 6,  0xff,9, 0);

But unable to find documentation or any pointer to add source PORT, 
Destination PORT and fwmark as filter to classify packet in to Qdisc.

*Can any share some pointer or details on how to add source port, 
destination port and fwmark as filter.
*
Many Thanks,
Sunny



More information about the libnl mailing list