includes.h 653 B

12345678910111213141516171819202122232425262728
  1. #ifdef __APPLE__
  2. #pragma GCC diagnostic ignored "-Wflexible-array-extensions"
  3. #include <dnet.h>
  4. #pragma GCC diagnostic warning "-Wflexible-array-extensions"
  5. #endif
  6. #ifndef __FAVOR_BSD
  7. #define __FAVOR_BSD 2
  8. #endif
  9. #ifndef __USE_BSD
  10. #define __USE_BSD
  11. #endif
  12. #include <sys/types.h>
  13. #include <netinet/in.h>
  14. #include <netinet/ip.h>
  15. #include <netinet/ip_icmp.h>
  16. #include <netinet/udp.h>
  17. #include <netinet/tcp.h>
  18. #include <net/ethernet.h>
  19. #include <netdb.h>
  20. #include <net/if.h>
  21. #include <ifaddrs.h> // NOTE: net/if.h MUST be included BEFORE ifaddrs.h
  22. #include <arpa/inet.h>
  23. #define MAC_ADDR_LEN ETHER_ADDR_LEN
  24. #define UNUSED __attribute__((unused))