diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/expression.h | 1 | ||||
-rw-r--r-- | include/exthdr.h | 2 | ||||
-rw-r--r-- | include/tcpopt.h | 26 |
3 files changed, 29 insertions, 0 deletions
diff --git a/include/expression.h b/include/expression.h index ec90265b..83ecf111 100644 --- a/include/expression.h +++ b/include/expression.h @@ -281,6 +281,7 @@ struct expr { const struct exthdr_desc *desc; const struct proto_hdr_template *tmpl; unsigned int offset; + enum nft_exthdr_op op; } exthdr; struct { /* EXPR_META */ diff --git a/include/exthdr.h b/include/exthdr.h index 93a53f30..cdcc2b95 100644 --- a/include/exthdr.h +++ b/include/exthdr.h @@ -2,6 +2,7 @@ #define NFTABLES_EXTHDR_H #include <proto.h> +#include <tcpopt.h> /** * struct exthdr_desc - extension header description @@ -78,6 +79,7 @@ enum mh_hdr_fields { MHHDR_CHECKSUM, }; +extern const struct expr_ops exthdr_expr_ops; extern const struct exthdr_desc exthdr_hbh; extern const struct exthdr_desc exthdr_rt; extern const struct exthdr_desc exthdr_rt0; diff --git a/include/tcpopt.h b/include/tcpopt.h new file mode 100644 index 00000000..5b990083 --- /dev/null +++ b/include/tcpopt.h @@ -0,0 +1,26 @@ +#ifndef NFTABLES_TCPOPT_H +#define NFTABLES_TCPOPT_H + +#include <proto.h> +#include <exthdr.h> + +extern struct expr *tcpopt_expr_alloc(const struct location *loc, + const char *option_str, + const unsigned int option_num, + const char *optioni_field); + +extern void tcpopt_init_raw(struct expr *expr, uint8_t type, + unsigned int offset, unsigned int len); + +extern bool tcpopt_find_template(struct expr *expr, const struct expr *mask, + unsigned int *shift); + +extern const struct exthdr_desc tcpopt_eol; +extern const struct exthdr_desc tcpopt_nop; +extern const struct exthdr_desc tcpopt_maxseg; +extern const struct exthdr_desc tcpopt_window; +extern const struct exthdr_desc tcpopt_sack_permitted; +extern const struct exthdr_desc tcpopt_sack; +extern const struct exthdr_desc tcpopt_timestamp; + +#endif /* NFTABLES_TCPOPT_H */ |