From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Carlos Falgueras García" <carlosfg@riseup.net>
Cc: Netfilter Development Mailing list <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH 1/3 v2] libnftnl: Implement new buffer of TLV objects.
Date: Tue, 8 Mar 2016 11:10:20 +0100 [thread overview]
Message-ID: <20160308101020.GA3390@salvia> (raw)
In-Reply-To: <56DEA21E.4000603@riseup.net>
On Tue, Mar 08, 2016 at 10:57:50AM +0100, Carlos Falgueras García wrote:
> On 02/03/16 19:32, Pablo Neira Ayuso wrote:
> >On Mon, Feb 29, 2016 at 05:25:38PM +0100, Carlos Falgueras García wrote:
> >>diff --git a/include/attr.h b/include/attr.h
> >>new file mode 100644
> >>index 0000000..2a29fa0
> >>--- /dev/null
> >>+++ b/include/attr.h
> >>@@ -0,0 +1,40 @@
> >>+#ifndef _LIBNFTNL_ATTR_INTERNAL_H_
> >>+#define _LIBNFTNL_ATTR_INTERNAL_H_
> >>+
> >>+#include <stdint.h>
> >>+#include <stddef.h>
> >>+
> >>+/*
> >>+ * TLV structures:
> >>+ * nftnl_attr
> >>+ * <-------- HEADER --------> <------ PAYLOAD ------>
> >>+ * +------------+-------------+- - - - - - - - - - - -+
> >>+ * | type | len | value |
> >>+ * | (1 byte) | (1 byte) | |
> >>+ * +--------------------------+- - - - - - - - - - - -+
> >>+ * <-- sizeof(nftnl_attr) --> <-- nftnl_attr->len -->
> >>+ */
> >>+struct __attribute__((__packed__)) nftnl_attr {
> >>+ uint8_t type;
> >>+ uint8_t len;
> >>+ unsigned char value[];
> >>+};
> >
> >struct nftnl_attr {
> > ...
> >} __attribute__((__packed__));
> >
>
> I forgot these, sorry. I'll send a new versión now.
Thanks Carlos.
> >>diff --git a/src/libnftnl.map b/src/libnftnl.map
> >>index 2e193b7..65bd37e 100644
> >>--- a/src/libnftnl.map
> >>+++ b/src/libnftnl.map
> >>@@ -336,6 +336,22 @@ global:
> >> nftnl_set_snprintf;
> >> nftnl_set_fprintf;
> >>
> >>+ nftnl_attrbuf_alloc;
> >>+ nftnl_attrbuf_free;
> >>+ nftnl_attrbuf_get_len;
> >>+ nftnl_attrbuf_get_size;
> >>+ nftnl_attrbuf_get_data;
> >>+ nftnl_attrbuf_copy_data;
> >>+ nftnl_attrbuf_get_start;
> >>+ nftnl_attrbuf_get_end;
> >>+ nftnl_attr_get_type;
> >>+ nftnl_attr_get_len;
> >>+ nftnl_attr_get_value;
> >>+ nftnl_attr_put;
> >>+ nftnl_attr_put_check;
> >>+ nftnl_attr_next;
> >>+ nftnl_attr_parse;
> >
> >Are you sure we need to export all these? Please only export those
> >functions that we really need at this stage for nft.
>
> The only function that is not being used now is "nftnl_udata_size". But I
> left it because "size" is an attribute of the object and I think it is right
> to allow the access to it. I must remove it anyway?
OK, keep it.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2016-03-08 10:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 16:25 [PATCH 1/3 v2] libnftnl: Implement new buffer of TLV objects Carlos Falgueras García
2016-02-29 16:25 ` [PATCH 2/3 v2] libnftnl: rule: Change the "userdata" attribute to use new TLV buffer Carlos Falgueras García
2016-03-02 18:41 ` Pablo Neira Ayuso
2016-03-08 9:58 ` Carlos Falgueras García
2016-03-08 10:12 ` Pablo Neira Ayuso
2016-02-29 16:25 ` [PATCH 3/3 v2] nftables: rule: Change the field "rule->comment" for an nftnl_attrbuf Carlos Falgueras García
2016-03-02 18:37 ` Pablo Neira Ayuso
2016-03-08 9:58 ` Carlos Falgueras García
2016-03-08 10:13 ` Pablo Neira Ayuso
2016-03-02 18:32 ` [PATCH 1/3 v2] libnftnl: Implement new buffer of TLV objects Pablo Neira Ayuso
2016-03-08 9:57 ` Carlos Falgueras García
2016-03-08 10:10 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160308101020.GA3390@salvia \
--to=pablo@netfilter.org \
--cc=carlosfg@riseup.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.