From 04cbb9c53929173ff0ae261c0bb22b5928ffc23b Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 7 Jun 2013 19:53:46 +0200 Subject: expect: add new cthelper_* functions for SIP helper This patch adds new functions to support the SIP helper in user-space. Signed-off-by: Pablo Neira Ayuso --- include/helper.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/helper.h') diff --git a/include/helper.h b/include/helper.h index e208cf3..ba3f773 100644 --- a/include/helper.h +++ b/include/helper.h @@ -45,10 +45,22 @@ struct ctd_helper_instance { extern int cthelper_expect_init(struct nf_expect *exp, struct nf_conntrack *master, uint32_t class, union nfct_attr_grp_addr *saddr, union nfct_attr_grp_addr *daddr, uint8_t l4proto, uint16_t *sport, uint16_t *dport, uint32_t flags); extern int cthelper_add_expect(struct nf_expect *exp); extern int cthelper_del_expect(struct nf_expect *exp); +int cthelper_upd_expect(struct nf_expect *ct); + +struct nf_expect *cthelper_find_expect(union nfct_attr_grp_addr *saddr, + union nfct_attr_grp_addr *daddr, + uint16_t sport, uint16_t dport, + uint8_t l3num, uint8_t l4num, + uint16_t zone); + extern int cthelper_upd_ct(struct nf_conntrack *ct); +int cthelper_iterate_exp(struct nf_conntrack *ct, int (*cb)(struct nf_expect *exp, void *data), void *data); extern void cthelper_get_addr_src(struct nf_conntrack *ct, int dir, union nfct_attr_grp_addr *addr); extern void cthelper_get_addr_dst(struct nf_conntrack *ct, int dir, union nfct_attr_grp_addr *addr); +int cthelper_cmp_addr_src(struct nf_conntrack *ct, int dir, union nfct_attr_grp_addr *addr); +int cthelper_cmp_addr_dst(struct nf_conntrack *ct, int dir, union nfct_attr_grp_addr *addr); +int cthelper_cmp_exp_addr_dst(struct nf_expect *exp, union nfct_attr_grp_addr *addr); extern int in4_pton(const char *src, int srclen, uint8_t *dst, int delim, const char **end); extern int in6_pton(const char *src, int srclen, uint8_t *dst, int delim, const char **end); -- cgit v1.2.3