summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-01-04 17:16:39 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2012-01-04 17:16:39 +0100
commit8e63e483240687ee4c4325073d84926e39416bc9 (patch)
tree54848f691373638fc54c84c5f87938e18977f6b1 /include
parent849342adcb7099d23b39192a4369908bb0259eee (diff)
expect: add nfexp_cmp
This patch adds nfexp_cmp that allows you to compare two expectation objects. This includes the extension of test_api for this new function. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/internal/prototypes.h2
-rw-r--r--include/libnetfilter_conntrack/libnetfilter_conntrack.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/include/internal/prototypes.h b/include/internal/prototypes.h
index 5f1418f..7ca8d35 100644
--- a/include/internal/prototypes.h
+++ b/include/internal/prototypes.h
@@ -21,6 +21,7 @@ int __callback(struct nlmsghdr *nlh, struct nfattr *nfa[], void *data);
int __setobjopt(struct nf_conntrack *ct, unsigned int option);
int __getobjopt(const struct nf_conntrack *ct, unsigned int option);
int __compare(const struct nf_conntrack *ct1, const struct nf_conntrack *ct2, unsigned int flags);
+int __cmp_orig(const struct nf_conntrack *ct1, const struct nf_conntrack *ct2, unsigned int flags);
void __copy_fast(struct nf_conntrack *ct1, const struct nf_conntrack *ct);
int __setup_netlink_socket_filter(int fd, struct nfct_filter *filter);
@@ -32,6 +33,7 @@ int __build_expect(struct nfnl_subsys_handle *ssh, struct nfnlhdr *req, size_t s
int __parse_expect_message_type(const struct nlmsghdr *nlh);
void __parse_expect(const struct nlmsghdr *nlh, struct nfattr *cda[], struct nf_expect *exp);
int __expect_callback(struct nlmsghdr *nlh, struct nfattr *nfa[], void *data);
+int __cmp_expect(const struct nf_expect *exp1, const struct nf_expect *exp2, unsigned int flags);
int __snprintf_expect(char *buf, unsigned int len, const struct nf_expect *exp, unsigned int type, unsigned int msg_output, unsigned int flags);
int __snprintf_expect_default(char *buf, unsigned int len, const struct nf_expect *exp, unsigned int msg_type, unsigned int flags);
diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack.h b/include/libnetfilter_conntrack/libnetfilter_conntrack.h
index 89d07ad..2e1c22c 100644
--- a/include/libnetfilter_conntrack/libnetfilter_conntrack.h
+++ b/include/libnetfilter_conntrack/libnetfilter_conntrack.h
@@ -599,6 +599,10 @@ extern int nfexp_snprintf(char *buf,
const unsigned int out_type,
const unsigned int out_flags);
+/* compare */
+extern int nfexp_cmp(const struct nf_expect *exp1,
+ const struct nf_expect *exp2,
+ unsigned int flags);
extern int nfexp_send(struct nfct_handle *h,
const enum nf_conntrack_query qt,