>>>>> On Mon, 7 Oct 2002 17:06:25 -0700, 
>>>>> "Sam Leffler" <[EMAIL PROTECTED]> said:

>> > If you allocate tag id's using your 32-bit time scheme then the fixed
> values
>> > above would never be hit since they are all for impossible times and so
>> > there'd be no conflict.
>> 
>> Just make them all IDs in a single "Legacy" API
>> 

> Good idea; I see the way out.  Try this:

> struct m_tag {
>         SLIST_ENTRY(m_tag)      m_tag_link;     /* List of packet tags */
>         u_int16_t               m_tag_id;       /* Tag ID */
>         u_int16_t               m_tag_len;      /* Length of data */
>         u_int32_t               m_tag_cookie;  /* Module/ABI */
> };

> Then define the "Legacy ABI" to be zero (or whatever you want).  Then all
> the m_tag_* routines that I specified work only for the Legacy ABI.
> (Whether this is done with shims or whatever doesn't matter.)  This gives me
> the compatiblity I want with openbsd and gives you the functionality you
> need for netgraph.  For new work we can specify users should avoid the
> Legacy ABI.

> Cost is basically 4 bytes per tag and an extra compare when walking the
> tags.  Happy?

Sorry for interrupting, but please let me make it sure.  Do you intend
to hide the additional member from other modules than the m_tag
internal?  I'm afraid a story that (e.g.)  some code fragments in the
network layer directly refers to m_tag_cookie, which will break source
level compatibility with other BSDs (when the code fragments are
shared with others).  As suz said before, we (KAME) are very much
afraid of this kind of story.

                                        JINMEI, Tatuya
                                        Communication Platform Lab.
                                        Corporate R&D Center, Toshiba Corp.
                                        [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to