Analyzing mbuf contents

I'm trying to analyze mbuf(9) contents with the following piece of code and it works correctly.

Code:
u_char buff1[4];
m_copydata(m, 0, 4, buff1);
printf("mbuf data: %04x\n", ((buff1[0] << 24) | (buff1[1] << 16) | (buff1[2] << 8) | buff1[3]));
But in this method I can not separate each field of mbuf(9) structure. How can I access the contents of each mbuf(9) structure field separately?
 
Back
Top