diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-01-17 00:11:46 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-02-17 18:52:17 +0100 |
commit | be4fb61b6e85a218879adda4e41abec8909d5653 (patch) | |
tree | bf07611616e4d74dc9d65017322c5095a3add054 /src/conntrack/api.c | |
parent | 9f53603a10aa738d6f5a41a061bc3e1182c42d0c (diff) |
conntrack: deprecate nfct_sizeof() and nfct_maxsize() functions
These functions are evil since they allow the use of memcpy() instead
of nfct_copy(). This is a problem because it violates the design
principle that the library follows, that is to provide opaque objects
in which the client code does not care on the binary layout.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/conntrack/api.c')
-rw-r--r-- | src/conntrack/api.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conntrack/api.c b/src/conntrack/api.c index a35c670..c0d3deb 100644 --- a/src/conntrack/api.c +++ b/src/conntrack/api.c @@ -98,6 +98,8 @@ void nfct_destroy(struct nf_conntrack *ct) /** * nf_sizeof - return the size in bytes of a certain conntrack object * \param ct pointer to the conntrack object + * + * This function is DEPRECATED, don't use it in your code. */ size_t nfct_sizeof(const struct nf_conntrack *ct) { @@ -118,6 +120,8 @@ size_t nfct_sizeof(const struct nf_conntrack *ct) * Note: As for now this function returns the same size that nfct_sizeof(ct) * does although _this could change in the future_. Therefore, do not assume * that nfct_sizeof(ct) == nfct_maxsize(). + * + * This function is DEPRECATED, don't use it in your code. */ size_t nfct_maxsize(void) { |