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,452 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
- 740,318
- 145
- 1,296
- 1,325
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
- 202,568
- 34
- 375
- 539