RE: [PATCH libmnl v2 2/2] libmnl: add support for signed types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
> Sent: Monday, August 08, 2022 7:09 AM
> To: Keller, Jacob E <jacob.e.keller@xxxxxxxxx>
> Cc: Netfilter Devel <netfilter-devel@xxxxxxxxxxxxxxx>; Duncan Roe
> <duncan_roe@xxxxxxxxxxxxxxx>
> 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@xxxxxxxxx>
> > ---
> >  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.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux