On Mon, 7 Oct 2002, Sam Leffler wrote:

> > On Mon, 7 Oct 2002, Sam Leffler wrote:
> > >
> > > 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?
> 

definitly.
Each API authout gets to polute his own namespace as much as he
wants.. :-)



>     Sam
> 
> 
> 


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

Reply via email to