/std/c/freebsd/socket.d

http://github.com/jcd/phobos · D · 44 lines · 31 code · 8 blank · 5 comment · 0 complexity · 92f5905adfbd01d65f4b149cd8010ce7 MD5 · raw file

  1. // Written in the D programming language.
  2. /*
  3. * This module is just for making std.socket work under FreeBSD, and these
  4. * definitions should actually be in druntime. (core.sys.posix.netdb or sth)
  5. */
  6. module std.c.freebsd.socket;
  7. public import core.sys.posix.netdb;
  8. import core.sys.posix.sys.socket;
  9. extern(C):
  10. enum // <sys/socket.h> __BSD_VISIBLE
  11. {
  12. AF_APPLETALK = 16,
  13. AF_IPX = 23,
  14. }
  15. enum // <sys/socket.h> __BSD_VISIBLE
  16. {
  17. SOCK_RDM = 4,
  18. }
  19. enum // <sys/socket.h> __BSD_VISIBLE
  20. {
  21. MSG_NOSIGNAL = 0x20000,
  22. }
  23. enum // <netinet/in.h> __BSD_VISIBLE
  24. {
  25. IPPROTO_IGMP = 2,
  26. IPPROTO_GGP = 3,
  27. IPPROTO_PUP = 12,
  28. IPPROTO_IDP = 22,
  29. IPPROTO_ND = 77,
  30. IPPROTO_MAX = 256,
  31. }
  32. enum // <netinet/in.h>
  33. {
  34. INADDR_LOOPBACK = 0x7f000001,
  35. INADDR_NONE = 0xffffffff,
  36. }