All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: Guillaume Nault <g.nault@alphalink.fr>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH libmnl 1/2] socket: introduce mnl_socket_open2()
Date: Mon, 5 Oct 2015 20:11:47 +0200	[thread overview]
Message-ID: <20151005181147.GA23848@salvia> (raw)
In-Reply-To: <alpine.DEB.2.10.1510051925090.13013@blackhole.kfki.hu>

On Mon, Oct 05, 2015 at 07:27:46PM +0200, Jozsef Kadlecsik wrote:
> Hi,
> 
> On Fri, 2 Oct 2015, Guillaume Nault wrote:
> 
> > Define mnl_socket_open2() so that user can pass a set of SOCK_* flags
> > at socket creation time.
> > 
> > Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
> > ---
> >  include/libmnl/libmnl.h |  3 ++-
> >  src/libmnl.map          |  1 +
> >  src/socket.c            | 41 ++++++++++++++++++++++++++++++++---------
> >  3 files changed, 35 insertions(+), 10 deletions(-)
> > 
> > diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
> > index 3a589bc..5adb13c 100644
> > --- a/include/libmnl/libmnl.h
> > +++ b/include/libmnl/libmnl.h
> > @@ -21,7 +21,8 @@ extern "C" {
> >  
> >  struct mnl_socket;
> >  
> > -extern struct mnl_socket *mnl_socket_open(int type);
> > +extern struct mnl_socket *mnl_socket_open(int bus);
> > +extern struct mnl_socket *mnl_socket_open2(int bus, int flags);
> >  extern struct mnl_socket *mnl_socket_fdopen(int fd);
> >  extern int mnl_socket_bind(struct mnl_socket *nl, unsigned int groups, pid_t pid);
> >  extern int mnl_socket_close(struct mnl_socket *nl);
> > diff --git a/src/libmnl.map b/src/libmnl.map
> > index 3c147a7..e5920e5 100644
> > --- a/src/libmnl.map
> > +++ b/src/libmnl.map
> > @@ -74,5 +74,6 @@ LIBMNL_1.1 {
> >  } LIBMNL_1.0;
> >  
> >  LIBMNL_1.2 {
> > +  mnl_socket_open2;
> >    mnl_socket_fdopen;
> >  } LIBMNL_1.1;
> 
> I think this breaks library ABI: you should introduce a new revision 
> instead.

This would be part of the new interfaces for the next release:

diff --git a/src/libmnl.map b/src/libmnl.map
index dbc332e..e5920e5 100644
--- a/src/libmnl.map
+++ b/src/libmnl.map
@@ -72,3 +72,8 @@ local: *;
 LIBMNL_1.1 {
   mnl_attr_parse_payload;
 } LIBMNL_1.0;
+
+LIBMNL_1.2 {
+  mnl_socket_open2;
+  mnl_socket_fdopen;
+} LIBMNL_1.1;


  reply	other threads:[~2015-10-05 18:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 20:12 [PATCH libmnl 0/2] Introduce mnl_socket_open2() Guillaume Nault
2015-10-02 20:12 ` [PATCH libmnl 1/2] socket: introduce mnl_socket_open2() Guillaume Nault
2015-10-05 15:37   ` Pablo Neira Ayuso
2015-10-05 16:33     ` Guillaume Nault
2015-10-05 17:27   ` Jozsef Kadlecsik
2015-10-05 18:11     ` Pablo Neira Ayuso [this message]
2015-10-05 18:38       ` Jozsef Kadlecsik
2015-10-05 18:14     ` Guillaume Nault
2015-10-05 18:50       ` Jan Engelhardt
2015-10-12 14:48   ` Pablo Neira Ayuso
2015-10-02 20:12 ` [PATCH libmnl 2/2] examples: use mnl_socket_open2() Guillaume Nault

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=20151005181147.GA23848@salvia \
    --to=pablo@netfilter.org \
    --cc=g.nault@alphalink.fr \
    --cc=kadlec@blackhole.kfki.hu \
    --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.