From: "Keller, Jacob E" <jacob.e.keller@intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>,
Duncan Roe <duncan_roe@optusnet.com.au>
Subject: RE: [PATCH libmnl v2 2/2] libmnl: add support for signed types
Date: Mon, 8 Aug 2022 16:38:18 +0000 [thread overview]
Message-ID: <PH0PR11MB5095596DD7710EDE54F7C221D6639@PH0PR11MB5095.namprd11.prod.outlook.com> (raw)
In-Reply-To: <YvEZEcLT5t1SBVcc@salvia>
> -----Original Message-----
> From: Pablo Neira Ayuso <pablo@netfilter.org>
> Sent: Monday, August 08, 2022 7:09 AM
> To: Keller, Jacob E <jacob.e.keller@intel.com>
> Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>; Duncan Roe
> <duncan_roe@optusnet.com.au>
> Subject: Re: [PATCH libmnl v2 2/2] libmnl: add support for signed types
>
> Hi,
>
> On Fri, Aug 05, 2022 at 02:00:40PM -0700, Jacob Keller wrote:
> > libmnl has get and put functions for unsigned integer types. It lacks
> > support for the signed variations. On some level this is technically
> > sufficient. A user could use the unsigned variations and then cast to a
> > signed value at use. However, this makes resulting code in the application
> > more difficult to follow. Introduce signed variations of the integer get
> > and put functions.
> >
> > Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> > ---
> > include/libmnl/libmnl.h | 16 ++++
> > src/attr.c | 194 +++++++++++++++++++++++++++++++++++++++-
> > 2 files changed, 209 insertions(+), 1 deletion(-)
> >
> [...]
> > @@ -127,6 +139,10 @@ enum mnl_attr_data_type {
> > MNL_TYPE_U16,
> > MNL_TYPE_U32,
> > MNL_TYPE_U64,
> > + MNL_TYPE_S8,
> > + MNL_TYPE_S16,
> > + MNL_TYPE_S32,
> > + MNL_TYPE_S64,
>
> This breaks ABI, you have to add new types at the end of the
> enumeration.
>
Oh. Right.. Will fix it.
Thanks,
Jake
> > MNL_TYPE_STRING,
> > MNL_TYPE_FLAG,
> > MNL_TYPE_MSECS,
>
> Thanks.
next prev parent reply other threads:[~2022-08-08 16:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 21:00 [PATCH libmnl v2 1/2] libmnl: update attribute function comments to use \return Jacob Keller
2022-08-05 21:00 ` [PATCH libmnl v2 2/2] libmnl: add support for signed types Jacob Keller
2022-08-08 14:09 ` Pablo Neira Ayuso
2022-08-08 16:38 ` Keller, Jacob E [this message]
2022-08-08 17:46 ` Keller, Jacob E
2022-08-08 17:48 ` Pablo Neira Ayuso
2022-08-06 0:25 ` [PATCH libmnl v2 1/2] libmnl: update attribute function comments to use \return Duncan Roe
2022-08-08 14:12 ` Pablo Neira Ayuso
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=PH0PR11MB5095596DD7710EDE54F7C221D6639@PH0PR11MB5095.namprd11.prod.outlook.com \
--to=jacob.e.keller@intel.com \
--cc=duncan_roe@optusnet.com.au \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).