libnl  3.2.3
/build/buildd/libnl3-3.2.3/include/netlink/route/classifier.h
00001 /*
00002  * netlink/route/classifier.h       Classifiers
00003  *
00004  *      This library is free software; you can redistribute it and/or
00005  *      modify it under the terms of the GNU Lesser General Public
00006  *      License as published by the Free Software Foundation version 2.1
00007  *      of the License.
00008  *
00009  * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
00010  */
00011 
00012 #ifndef NETLINK_CLASSIFIER_H_
00013 #define NETLINK_CLASSIFIER_H_
00014 
00015 #include <netlink/netlink.h>
00016 #include <netlink/cache.h>
00017 #include <netlink/route/tc.h>
00018 #include <netlink/utils.h>
00019 
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00024 extern struct rtnl_cls *rtnl_cls_alloc(void);
00025 extern void             rtnl_cls_put(struct rtnl_cls *);
00026 
00027 extern int              rtnl_cls_alloc_cache(struct nl_sock *, int, uint32_t,
00028                                              struct nl_cache **);
00029 
00030 extern int              rtnl_cls_build_add_request(struct rtnl_cls *, int,
00031                                                    struct nl_msg **);
00032 extern int              rtnl_cls_add(struct nl_sock *, struct rtnl_cls *, int);
00033 
00034 extern int              rtnl_cls_build_change_request(struct rtnl_cls *, int,
00035                                                       struct nl_msg **);
00036 extern int              rtnl_cls_build_delete_request(struct rtnl_cls *, int,
00037                                                       struct nl_msg **);
00038 extern int              rtnl_cls_delete(struct nl_sock *, struct rtnl_cls *,
00039                                         int);
00040 
00041 extern void             rtnl_cls_set_prio(struct rtnl_cls *, uint16_t);
00042 extern uint16_t         rtnl_cls_get_prio(struct rtnl_cls *);
00043 
00044 extern void             rtnl_cls_set_protocol(struct rtnl_cls *, uint16_t);
00045 extern uint16_t         rtnl_cls_get_protocol(struct rtnl_cls *);
00046 
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050 
00051 #endif