I'm compiling some C source that includes ether.h, but this file isn't available in my install of Mac OS X. This seems to be a common file included with the Linux OS. Any ideas on how to get this on my local Mac OS?
Asked
Active
Viewed 4,880 times
3 Answers
3
This seems to be a common file included with the Linux OS.
Incorrect. <netinet/ether.h>
comes with glibc. OS X's (Darwin's) libc should have its own equivalent, perhaps <netinet/if_ether.h>
.

Ignacio Vazquez-Abrams
- 776,304
- 153
- 1,341
- 1,358
1
On OS X Yosemite, #include <net/ethernet.h>
works for me. You should probably wrap the include using platform detection as per this thread.

elasticninja
- 11
- 1
1
It seems to be available here: http://www.opensource.apple.com/source/tcpdump/tcpdump-9/tcpdump/ether.h

Paul R
- 208,748
- 37
- 389
- 560