For my Linux networking application, I am referring to http://www.scaramanga.co.uk/code-fu/lincap.c to understand how to use the PACKET_MMAP method of receiving Ethernet packets via a ring buffer.
lincap.c uses the memory barrier macro mb() defined in asm/system.h. However, the code in that header file is embraced by #ifdef KERNEL. I guess that means it is a kernel header file. How can I use mb() from a user space application (which I believe lincap.c is)?
BR
David