diff options
author | Patrick McHardy <kaber@trash.net> | 2009-03-18 04:55:00 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-03-18 04:55:00 +0100 |
commit | fac10ea799fe9b6158d74f66d6ad46536d38a545 (patch) | |
tree | 8c093bcbb2144aab54c70103e6ed438456ae0d48 /include/ct.h |
Initial commitv0.01-alpha1
Diffstat (limited to 'include/ct.h')
-rw-r--r-- | include/ct.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/ct.h b/include/ct.h new file mode 100644 index 00000000..946bc297 --- /dev/null +++ b/include/ct.h @@ -0,0 +1,29 @@ +#ifndef _CT_H +#define _CT_H + +/** + * struct ct_template + * + * @token: parser token for the expression + * @dtype: data type of the expression + * @len: length of the expression + * @byteorder: byteorder + */ +struct ct_template { + const char *token; + const struct datatype *dtype; + enum byteorder byteorder; + unsigned int len; +}; + +#define CT_TEMPLATE(__token, __dtype, __byteorder, __len) { \ + .token = (__token), \ + .dtype = (__dtype), \ + .byteorder = (__byteorder), \ + .len = (__len), \ +} + +extern struct expr *ct_expr_alloc(const struct location *loc, + enum nft_ct_keys key); + +#endif /* _CT_H */ |