Add mtodo(m, o) macro taking an additional offset into the mbuf data section.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Andre Oppermann 2013-08-24 19:58:36 +00:00
parent 1b4381afbb
commit 7c14da7202

View File

@ -67,8 +67,10 @@
* type:
*
* mtod(m, t) -- Convert mbuf pointer to data pointer of correct type.
* mtodo(m, o) -- Same as above but with offset 'o' into data.
*/
#define mtod(m, t) ((t)((m)->m_data))
#define mtodo(m, o) ((void *)(((m)->m_data) + (o)))
/*
* Argument structure passed to UMA routines during mbuf and packet