[Swan-dev] rename .st_msgid -> .st_v1_msgid or .v1st_msgid

Andrew Cagney andrew.cagney at gmail.com
Thu Oct 18 15:00:26 UTC 2018

In IKEv2, at any point, two Message IDs are being juggled:

- the ID of SA's last message request
- the ID of SA's last message response

hence, a single .st_msgid which can be traced back to IKEv1 isn't
sufficient.   Instead IKEv2 should be using the fields:

        /* message ID sequence for things we send (as initiator) */
        msgid_t st_msgid_lastack;               /* last one peer
acknowledged  - host order */
        msgid_t st_msgid_nextuse;               /* next one to use -
host order */
        /* message ID sequence for things we receive (as responder) */
        msgid_t st_msgid_lastrecv;             /* last one peer sent -
Host order v2 only */
        msgid_t st_msgid_lastreplied;         /* to decide retransmit


Given this, I'm planning on renaming .st_msgid (and likely the above).
Since we've settled on v[12]* as the name prefix convention several
new names come to mind:

- st_v1_msgid
- v1st_msgid
- v1_st_msgid

any preference?  The st_msgid_* fields listed above will also get a
rename, but one that also adds responder/initiator.


(PS: I've also a strong preference for sticking v2 somewhere in any
v2-only thing as that way I know it isn't generic and may have to
handle ikev1)

More information about the Swan-dev mailing list