X-Git-Url: http://git.onelab.eu/?p=libnl.git;a=blobdiff_plain;f=include%2Fnetlink%2Froute%2Fclassifier.h;fp=include%2Fnetlink%2Froute%2Fclassifier.h;h=c213725991e0aedb2b954730be55dbd77c4a50a4;hp=0000000000000000000000000000000000000000;hb=4cee2ecb3b8afa0637e6f5fe4c57985a4bc740ff;hpb=2df2fbe518d5a221ce6e3ee88a3fb23fb1b94b27 diff --git a/include/netlink/route/classifier.h b/include/netlink/route/classifier.h new file mode 100644 index 0000000..c213725 --- /dev/null +++ b/include/netlink/route/classifier.h @@ -0,0 +1,47 @@ +/* + * netlink/route/classifier.h Classifiers + * + * 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 + */ + +#ifndef NETLINK_CLASSIFIER_H_ +#define NETLINK_CLASSIFIER_H_ + +#include +#include +#include +#include + +extern struct rtnl_cls *rtnl_cls_alloc(void); +extern void rtnl_cls_put(struct rtnl_cls *); +extern void rtnl_cls_free(struct rtnl_cls *); + +extern struct nl_cache *rtnl_cls_alloc_cache(struct nl_handle *, int, uint32_t); + +/* classifier addition */ +extern int rtnl_cls_add(struct nl_handle *, struct rtnl_cls *, + int); +extern struct nl_msg * rtnl_cls_build_add_request(struct rtnl_cls *, int); + +extern struct nl_msg *rtnl_cls_build_change_request(struct rtnl_cls *, int); +extern struct nl_msg *rtnl_cls_build_delete_request(struct rtnl_cls *, int); +extern int rtnl_cls_delete(struct nl_handle *, struct rtnl_cls *, int); + +/* attribute modification */ +extern void rtnl_cls_set_ifindex(struct rtnl_cls *, int); +extern void rtnl_cls_set_handle(struct rtnl_cls *, uint32_t); +extern void rtnl_cls_set_parent(struct rtnl_cls *, uint32_t); +extern void rtnl_cls_set_kind(struct rtnl_cls *, const char *); + +extern void rtnl_cls_set_prio(struct rtnl_cls *, int); +extern int rtnl_cls_get_prio(struct rtnl_cls *); + +extern void rtnl_cls_set_protocol(struct rtnl_cls *, int); +extern int rtnl_cls_get_protocol(struct rtnl_cls *); + +#endif