APIs for tc action mirred

Thomas Graf tgraf at suug.ch
Tue Jul 23 12:29:52 EDT 2013


On 07/20/13 at 01:10pm, Shriram Rajagopalan wrote:
> Hi,
>  I am trying to evaluate the possibility of programmatically doing the
> following using libnl. Can someone please tell me if the following can
> be done solely using libnl API in a c code or do I need to invoke an
> external script ?
> 
> tc filter add dev vnet0 parent ffff: proto ip pref 10 \
>            u32 match u32  0 0 action mirred egress redirect dev ifb0
> 
> Can anyone please point me to the right set of API (if any) to do this
> inside C code ?

The classifier API is documented here. There is no high level API for
all of it yet so you will have to construct the Netlink message
yourself or add the missing pieces to libnl.

http://www.infradead.org/~tgr/libnl/doc/api/group__cls.html



More information about the libnl mailing list