/uClinux-dist/user/python/Lib/plat-sunos5/SOCKET.py

https://bitbucket.org/__wp__/mb-linux-msli · Python · 145 lines · 141 code · 2 blank · 2 comment · 0 complexity · e4e3fe0d50f6821008db27d4ef27b01b MD5 · raw file

  1. # Generated by h2py from /usr/include/sys/socket.h
  2. # Included from sys/netconfig.h
  3. NETCONFIG = "/etc/netconfig"
  4. NETPATH = "NETPATH"
  5. NC_TPI_CLTS = 1
  6. NC_TPI_COTS = 2
  7. NC_TPI_COTS_ORD = 3
  8. NC_TPI_RAW = 4
  9. NC_NOFLAG = 00
  10. NC_VISIBLE = 01
  11. NC_BROADCAST = 02
  12. NC_NOPROTOFMLY = "-"
  13. NC_LOOPBACK = "loopback"
  14. NC_INET = "inet"
  15. NC_IMPLINK = "implink"
  16. NC_PUP = "pup"
  17. NC_CHAOS = "chaos"
  18. NC_NS = "ns"
  19. NC_NBS = "nbs"
  20. NC_ECMA = "ecma"
  21. NC_DATAKIT = "datakit"
  22. NC_CCITT = "ccitt"
  23. NC_SNA = "sna"
  24. NC_DECNET = "decnet"
  25. NC_DLI = "dli"
  26. NC_LAT = "lat"
  27. NC_HYLINK = "hylink"
  28. NC_APPLETALK = "appletalk"
  29. NC_NIT = "nit"
  30. NC_IEEE802 = "ieee802"
  31. NC_OSI = "osi"
  32. NC_X25 = "x25"
  33. NC_OSINET = "osinet"
  34. NC_GOSIP = "gosip"
  35. NC_NOPROTO = "-"
  36. NC_TCP = "tcp"
  37. NC_UDP = "udp"
  38. NC_ICMP = "icmp"
  39. NC_TPI_CLTS = 1
  40. NC_TPI_COTS = 2
  41. NC_TPI_COTS_ORD = 3
  42. NC_TPI_RAW = 4
  43. SOCK_STREAM = NC_TPI_COTS
  44. SOCK_DGRAM = NC_TPI_CLTS
  45. SOCK_RAW = NC_TPI_RAW
  46. SOCK_RDM = 5
  47. SOCK_SEQPACKET = 6
  48. SO_DEBUG = 0x0001
  49. SO_ACCEPTCONN = 0x0002
  50. SO_REUSEADDR = 0x0004
  51. SO_KEEPALIVE = 0x0008
  52. SO_DONTROUTE = 0x0010
  53. SO_BROADCAST = 0x0020
  54. SO_USELOOPBACK = 0x0040
  55. SO_LINGER = 0x0080
  56. SO_OOBINLINE = 0x0100
  57. SO_DONTLINGER = (~SO_LINGER)
  58. SO_SNDBUF = 0x1001
  59. SO_RCVBUF = 0x1002
  60. SO_SNDLOWAT = 0x1003
  61. SO_RCVLOWAT = 0x1004
  62. SO_SNDTIMEO = 0x1005
  63. SO_RCVTIMEO = 0x1006
  64. SO_ERROR = 0x1007
  65. SO_TYPE = 0x1008
  66. SO_PROTOTYPE = 0x1009
  67. SOL_SOCKET = 0xffff
  68. AF_UNSPEC = 0
  69. AF_UNIX = 1
  70. AF_INET = 2
  71. AF_IMPLINK = 3
  72. AF_PUP = 4
  73. AF_CHAOS = 5
  74. AF_NS = 6
  75. AF_NBS = 7
  76. AF_ECMA = 8
  77. AF_DATAKIT = 9
  78. AF_CCITT = 10
  79. AF_SNA = 11
  80. AF_DECnet = 12
  81. AF_DLI = 13
  82. AF_LAT = 14
  83. AF_HYLINK = 15
  84. AF_APPLETALK = 16
  85. AF_NIT = 17
  86. AF_802 = 18
  87. AF_OSI = 19
  88. AF_X25 = 20
  89. AF_OSINET = 21
  90. AF_GOSIP = 22
  91. AF_IPX = 23
  92. AF_MAX = 23
  93. PF_UNSPEC = AF_UNSPEC
  94. PF_UNIX = AF_UNIX
  95. PF_INET = AF_INET
  96. PF_IMPLINK = AF_IMPLINK
  97. PF_PUP = AF_PUP
  98. PF_CHAOS = AF_CHAOS
  99. PF_NS = AF_NS
  100. PF_NBS = AF_NBS
  101. PF_ECMA = AF_ECMA
  102. PF_DATAKIT = AF_DATAKIT
  103. PF_CCITT = AF_CCITT
  104. PF_SNA = AF_SNA
  105. PF_DECnet = AF_DECnet
  106. PF_DLI = AF_DLI
  107. PF_LAT = AF_LAT
  108. PF_HYLINK = AF_HYLINK
  109. PF_APPLETALK = AF_APPLETALK
  110. PF_NIT = AF_NIT
  111. PF_802 = AF_802
  112. PF_OSI = AF_OSI
  113. PF_X25 = AF_X25
  114. PF_OSINET = AF_OSINET
  115. PF_GOSIP = AF_GOSIP
  116. PF_IPX = AF_IPX
  117. PF_MAX = AF_MAX
  118. SOMAXCONN = 5
  119. MSG_OOB = 0x1
  120. MSG_PEEK = 0x2
  121. MSG_DONTROUTE = 0x4
  122. MSG_MAXIOVLEN = 16
  123. def OPTLEN(x): return ((((x) + sizeof (long) - 1) / sizeof (long)) * sizeof (long))
  124. SOCKETSYS = 88
  125. SOCKETSYS = 83
  126. SO_ACCEPT = 1
  127. SO_BIND = 2
  128. SO_CONNECT = 3
  129. SO_GETPEERNAME = 4
  130. SO_GETSOCKNAME = 5
  131. SO_GETSOCKOPT = 6
  132. SO_LISTEN = 7
  133. SO_RECV = 8
  134. SO_RECVFROM = 9
  135. SO_SEND = 10
  136. SO_SENDTO = 11
  137. SO_SETSOCKOPT = 12
  138. SO_SHUTDOWN = 13
  139. SO_SOCKET = 14
  140. SO_SOCKPOLL = 15
  141. SO_GETIPDOMAIN = 16
  142. SO_SETIPDOMAIN = 17
  143. SO_ADJTIME = 18