From: Waldemar Kozaczuk <[email protected]> Committer: WALDEMAR KOZACZUK <[email protected]> Branch: master
mbuf: add mtodo() macro Signed-off-by: Waldemar Kozaczuk <[email protected]> --- diff --git a/bsd/sys/sys/mbuf.h b/bsd/sys/sys/mbuf.h --- a/bsd/sys/sys/mbuf.h +++ b/bsd/sys/sys/mbuf.h @@ -64,8 +64,10 @@ __BEGIN_DECLS * 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_hdr.mh_data)) +#define mtodo(m, o) ((void *)(((m)->m_hdr.mh_data) + (o))) /* * Argument structure passed to UMA routines during mbuf and packet -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/000000000000f0a2ab060eaf14c0%40google.com.
