Add tcindex classifier
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): 12088783661504-git-send-email-
PATCH 1/1 Add tcindex classifier
From: Rui Tiago Cação Matos <[email protected]>
--- include/netlink-types.h | 10 ++ include/netlink/route/cls/tcindex.h | 33 ++++ lib/route/cls/tcindex.c | 305 +++++++++++++++++++++++++++++++++++ 3 files changed, 348 insertions(+), 0 deletions(-) create mode 100644 include/netlink/route/cls/tcindex.h create mode 100644 lib/route/cls/tcindex.c
include/netlink-types.h +10 -0
@@ -518,6 +518,16 @@ struct rtnl_fwint cf_mask; }; +struct rtnl_tcindex +{ +uint32_t ci_hash; +uint16_t ci_filter_mask; +uint32_t ci_shift; +uint32_t ci_fall_through; +uint32_t ci_classid; +int ci_mask; +}; +struct rtnl_dsmark_qdisc {uint16_t qdm_indices;
include/netlink/route/cls/tcindex.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* netlink/route/cls/tcindex.h tcindex classifier +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation version 2.1 +* of the License. +* +* Copyright (c) 2003-2006 Thomas Graf <[email protected]> +* Copyright (c) 2008 Rui Matos <[email protected]> +*/ + +#ifndef NETLINK_TCINDEX_H_ +#define NETLINK_TCINDEX_H_ + +#include <netlink/netlink.h> +#include <netlink/cache.h> + +#ifdef __cplusplus +extern "C" { +#endif + +extern int rtnl_tcindex_set_hash (struct rtnl_cls *,uint32_t ); +extern int rtnl_tcindex_set_mask (struct rtnl_cls *,uint16_t ); +extern int rtnl_tcindex_set_shift (struct rtnl_cls *,uint32_t ); +extern int rtnl_tcindex_set_fall_through (struct rtnl_cls *,uint32_t ); +extern int rtnl_tcindex_set_classid (struct rtnl_cls *,uint32_t ); + +#ifdef __cplusplus +} +#endif + +#endif
lib/route/cls/tcindex.c new file +305 -0
305 lines not on this page · raw message
Signature · 1 line
1.5.4.1