[Swan-dev] WIP: supporting xfrm SA expire

Andrew Cagney andrew.cagney at gmail.com
Wed Dec 1 22:24:18 EET 2021


On Wed, 1 Dec 2021 at 14:49, Antony Antony <antony at phenome.org> wrote:

> On Sat, Nov 27, 2021 at 07:23:00PM -0500, Andrew Cagney wrote:
> >
> >
> >         One thing decide as group is how to represent big number (2^64)
> bytes
> >         and
> >         packets, especially the default 2^64  will appear in "ipsec
> status:
> >         output.
> >          18446744073709551615 look ugly:)
> >
> >
> >     There's readable_humber() but that would need work.
> >     Conversely is there something to convert things like 100gb back to
> bytes.
>
> I added parser support, in my branch, for 100G to a number.
>
> I think the parser only u32. So
> I don't think parser support 18446744073709551615.
>

Yea.

>
> > and of course long after the code was written, the suffixes were
> standardised
> > by IEC et.al. ('99) and we're now meant to use GiB et.al. https://
> > en.wikipedia.org/wiki/Binary_prefix :-)
>
> So far I have KMGTE. I will change change print KiB, GiB,... that is
> easy.
> And may be add support for parsing 100GiB.
>

Nice!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libreswan.org/pipermail/swan-dev/attachments/20211201/7db58bc3/attachment.htm>


More information about the Swan-dev mailing list