Remove definition of dtom(), which converted a data pointer into a

pointer to the containing mbuf.  This eliminates a strong assumption
about the layout of network buffer memory, giving us greater
flexibility to revise mbuf semantics in the future.
This commit is contained in:
Robert Watson 2009-06-20 18:27:19 +00:00
parent 5255c009dd
commit 395262b517

View File

@ -60,12 +60,12 @@
#ifdef _KERNEL
/*-
* Macros for type conversion:
* Macro for type conversion: convert mbuf pointer to data pointer of correct
* type:
*
* mtod(m, t) -- Convert mbuf pointer to data pointer of correct type.
* dtom(x) -- Convert data pointer within mbuf to mbuf pointer (XXX).
*/
#define mtod(m, t) ((t)((m)->m_data))
#define dtom(x) ((struct mbuf *)((intptr_t)(x) & ~(MSIZE-1)))
/*
* Argument structure passed to UMA routines during mbuf and packet