text.h

00001 /*
00002  * netlink/route/cls/ematch/text.h      Text Search
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) 2010 Thomas Graf <tgraf@suug.ch>
00010  */
00011 
00012 #ifndef NETLINK_CLS_EMATCH_TEXT_H_
00013 #define NETLINK_CLS_EMATCH_TEXT_H_
00014 
00015 #include <netlink/netlink.h>
00016 #include <netlink/route/cls/ematch.h>
00017 #include <linux/tc_ematch/tc_em_text.h>
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00023 extern void     rtnl_ematch_text_set_from(struct rtnl_ematch *,
00024                                           uint8_t, uint16_t);
00025 extern uint16_t rtnl_ematch_text_get_from_offset(struct rtnl_ematch *);
00026 extern uint8_t  rtnl_ematch_text_get_from_layer(struct rtnl_ematch *);
00027 extern void     rtnl_ematch_text_set_to(struct rtnl_ematch *,
00028                                         uint8_t, uint16_t);
00029 extern uint16_t rtnl_ematch_text_get_to_offset(struct rtnl_ematch *);
00030 extern uint8_t  rtnl_ematch_text_get_to_layer(struct rtnl_ematch *);
00031 extern void     rtnl_ematch_text_set_pattern(struct rtnl_ematch *,
00032                                              char *, size_t);
00033 extern char *   rtnl_ematch_text_get_pattern(struct rtnl_ematch *);
00034 extern size_t   rtnl_ematch_text_get_len(struct rtnl_ematch *);
00035 extern void     rtnl_ematch_text_set_algo(struct rtnl_ematch *, const char *);
00036 extern char *   rtnl_ematch_text_get_algo(struct rtnl_ematch *);
00037 
00038 #ifdef __cplusplus
00039 }
00040 #endif
00041 
00042 #endif