[Swan-dev] prefix for C identifiers: "v2_" is better than "IKEv2_" or "ikev2_"

Andrew Cagney andrew.cagney at gmail.com
Sun Aug 19 17:32:36 UTC 2018


BTW, this doesn't break new ground.  It just adds more colour to our
already rainbow coloured bike shed.  For instance v2_notification,
ISAKMP_v2_SA_INIT (how messed up is that one), and of course
ikev[12]_*.[hc] containing ikev[12]_*() code.

Lots of colour is good.
On Sun, 19 Aug 2018 at 12:34, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
>
> I've introduced a new function, with a prefixed name.  I chose to break
> new ground by naming it "v2_build_id_payload".  I think that this is
> better than "ikev2_build_id_payload".
>
> - adding IKE is redundant.  We know that we're dealing with IKE.  There is
>   no IPv2, for example.
>
> - names should be easily distinguished.  Making the similar parts longer
>   makes this cognitively harder
>
> - the standard for punch cards is no longer subject to revision so we're
>   stuck with 80 columns.  Let's not waste them
>
> I've said this before.  Now I've acted.
>
> Of course others may disagree.  If so, we can decide to rename it.
>
> At some mythical time, when nothing is in flight, I'd love to rename all
> our identifiers to conform with this new convention.
>
> It would perhaps be good to rename v1-only functions to have such a "v1"
> prefix.  But perhaps we'll ditch v1 support instead.
> _______________________________________________
> Swan-dev mailing list
> Swan-dev at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan-dev


More information about the Swan-dev mailing list