PageRenderTime 53ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/uClinux-dist/user/python/Lib/plat-linux2/IN.py

https://bitbucket.org/__wp__/mb-linux-msli
Python | 430 lines | 365 code | 42 blank | 23 comment | 0 complexity | 146541e0d40dea8db34fbb5fb3976790 MD5 | raw file
Possible License(s): AGPL-3.0, GPL-2.0, LGPL-2.0, MPL-2.0, ISC, BSD-3-Clause, LGPL-2.1, MPL-2.0-no-copyleft-exception, 0BSD, CC-BY-SA-3.0, GPL-3.0, LGPL-3.0, AGPL-1.0, Unlicense
  1. # Generated by h2py from /usr/include/netinet/in.h
  2. _NETINET_IN_H = 1
  3. # Included from features.h
  4. _FEATURES_H = 1
  5. _GNU_SOURCE = 1
  6. __USE_ANSI = 1
  7. __FAVOR_BSD = 1
  8. _BSD_SOURCE = 1
  9. _SVID_SOURCE = 1
  10. _POSIX_SOURCE = 1
  11. _POSIX_C_SOURCE = 2
  12. __USE_POSIX = 1
  13. __USE_POSIX2 = 1
  14. __USE_MISC = 1
  15. __USE_BSD = 1
  16. __USE_SVID = 1
  17. __USE_GNU = 1
  18. __GNU_LIBRARY__ = 1
  19. # Included from sys/cdefs.h
  20. _SYS_CDEFS_H = 1
  21. def __P(args): return args
  22. def __P(args): return args
  23. def __P(args): return ()
  24. def __STRING(x): return #x
  25. def __STRING(x): return "x"
  26. # Included from sys/socket.h
  27. # Included from linux/socket.h
  28. # Included from asm/socket.h
  29. # Included from asm/sockios.h
  30. FIOSETOWN = 0x8901
  31. SIOCSPGRP = 0x8902
  32. FIOGETOWN = 0x8903
  33. SIOCGPGRP = 0x8904
  34. SIOCATMARK = 0x8905
  35. SIOCGSTAMP = 0x8906
  36. SOL_SOCKET = 1
  37. SO_DEBUG = 1
  38. SO_REUSEADDR = 2
  39. SO_TYPE = 3
  40. SO_ERROR = 4
  41. SO_DONTROUTE = 5
  42. SO_BROADCAST = 6
  43. SO_SNDBUF = 7
  44. SO_RCVBUF = 8
  45. SO_KEEPALIVE = 9
  46. SO_OOBINLINE = 10
  47. SO_NO_CHECK = 11
  48. SO_PRIORITY = 12
  49. SO_LINGER = 13
  50. SO_BSDCOMPAT = 14
  51. # Included from linux/sockios.h
  52. SIOCADDRT = 0x890B
  53. SIOCDELRT = 0x890C
  54. SIOCGIFNAME = 0x8910
  55. SIOCSIFLINK = 0x8911
  56. SIOCGIFCONF = 0x8912
  57. SIOCGIFFLAGS = 0x8913
  58. SIOCSIFFLAGS = 0x8914
  59. SIOCGIFADDR = 0x8915
  60. SIOCSIFADDR = 0x8916
  61. SIOCGIFDSTADDR = 0x8917
  62. SIOCSIFDSTADDR = 0x8918
  63. SIOCGIFBRDADDR = 0x8919
  64. SIOCSIFBRDADDR = 0x891a
  65. SIOCGIFNETMASK = 0x891b
  66. SIOCSIFNETMASK = 0x891c
  67. SIOCGIFMETRIC = 0x891d
  68. SIOCSIFMETRIC = 0x891e
  69. SIOCGIFMEM = 0x891f
  70. SIOCSIFMEM = 0x8920
  71. SIOCGIFMTU = 0x8921
  72. SIOCSIFMTU = 0x8922
  73. SIOCSIFHWADDR = 0x8924
  74. SIOCGIFENCAP = 0x8925
  75. SIOCSIFENCAP = 0x8926
  76. SIOCGIFHWADDR = 0x8927
  77. SIOCGIFSLAVE = 0x8929
  78. SIOCSIFSLAVE = 0x8930
  79. SIOCADDMULTI = 0x8931
  80. SIOCDELMULTI = 0x8932
  81. SIOCGIFBR = 0x8940
  82. SIOCSIFBR = 0x8941
  83. OLD_SIOCDARP = 0x8950
  84. OLD_SIOCGARP = 0x8951
  85. OLD_SIOCSARP = 0x8952
  86. SIOCDARP = 0x8953
  87. SIOCGARP = 0x8954
  88. SIOCSARP = 0x8955
  89. SIOCDRARP = 0x8960
  90. SIOCGRARP = 0x8961
  91. SIOCSRARP = 0x8962
  92. SIOCGIFMAP = 0x8970
  93. SIOCSIFMAP = 0x8971
  94. SIOCADDDLCI = 0x8980
  95. SIOCDELDLCI = 0x8981
  96. SIOCDEVPRIVATE = 0x89F0
  97. SIOCPROTOPRIVATE = 0x89E0
  98. # Included from linux/uio.h
  99. UIO_MAXIOV = 16
  100. SCM_RIGHTS = 1
  101. SOCK_STREAM = 1
  102. SOCK_DGRAM = 2
  103. SOCK_RAW = 3
  104. SOCK_RDM = 4
  105. SOCK_SEQPACKET = 5
  106. SOCK_PACKET = 10
  107. AF_UNSPEC = 0
  108. AF_UNIX = 1
  109. AF_INET = 2
  110. AF_AX25 = 3
  111. AF_IPX = 4
  112. AF_APPLETALK = 5
  113. AF_NETROM = 6
  114. AF_BRIDGE = 7
  115. AF_AAL5 = 8
  116. AF_X25 = 9
  117. AF_INET6 = 10
  118. AF_MAX = 12
  119. PF_UNSPEC = AF_UNSPEC
  120. PF_UNIX = AF_UNIX
  121. PF_INET = AF_INET
  122. PF_AX25 = AF_AX25
  123. PF_IPX = AF_IPX
  124. PF_APPLETALK = AF_APPLETALK
  125. PF_NETROM = AF_NETROM
  126. PF_BRIDGE = AF_BRIDGE
  127. PF_AAL5 = AF_AAL5
  128. PF_X25 = AF_X25
  129. PF_INET6 = AF_INET6
  130. PF_MAX = AF_MAX
  131. SOMAXCONN = 128
  132. MSG_OOB = 1
  133. MSG_PEEK = 2
  134. MSG_DONTROUTE = 4
  135. MSG_PROXY = 16
  136. SOL_IP = 0
  137. SOL_IPX = 256
  138. SOL_AX25 = 257
  139. SOL_ATALK = 258
  140. SOL_NETROM = 259
  141. SOL_TCP = 6
  142. SOL_UDP = 17
  143. IP_TOS = 1
  144. IPTOS_LOWDELAY = 0x10
  145. IPTOS_THROUGHPUT = 0x08
  146. IPTOS_RELIABILITY = 0x04
  147. IPTOS_MINCOST = 0x02
  148. IP_TTL = 2
  149. IP_HDRINCL = 3
  150. IP_OPTIONS = 4
  151. IP_MULTICAST_IF = 32
  152. IP_MULTICAST_TTL = 33
  153. IP_MULTICAST_LOOP = 34
  154. IP_ADD_MEMBERSHIP = 35
  155. IP_DROP_MEMBERSHIP = 36
  156. IP_DEFAULT_MULTICAST_TTL = 1
  157. IP_DEFAULT_MULTICAST_LOOP = 1
  158. IP_MAX_MEMBERSHIPS = 20
  159. IPX_TYPE = 1
  160. TCP_NODELAY = 1
  161. TCP_MAXSEG = 2
  162. SOPRI_INTERACTIVE = 0
  163. SOPRI_NORMAL = 1
  164. SOPRI_BACKGROUND = 2
  165. # Included from sys/types.h
  166. # Included from linux/types.h
  167. # Included from linux/posix_types.h
  168. __FD_SETSIZE = 1024
  169. def __FDELT(d): return ((d) / __NFDBITS)
  170. # Included from asm/posix_types.h
  171. def __FD_ZERO(fdsetp): return \
  172. # Included from asm/types.h
  173. # Included from sys/bitypes.h
  174. # Included from pthread/mit/posix.h
  175. # Included from pthread/mit/types.h
  176. # Included from pthread/mit/xtypes.h
  177. # Included from pthread/mit/sys/types.h
  178. IMPLINK_IP = 155
  179. IMPLINK_LOWEXPER = 156
  180. IMPLINK_HIGHEXPER = 158
  181. # Included from linux/in.h
  182. __SOCK_SIZE__ = 16
  183. IN_CLASSA_NET = 0xff000000
  184. IN_CLASSA_NSHIFT = 24
  185. IN_CLASSA_HOST = (0xffffffff & ~IN_CLASSA_NET)
  186. IN_CLASSA_MAX = 128
  187. IN_CLASSB_NET = 0xffff0000
  188. IN_CLASSB_NSHIFT = 16
  189. IN_CLASSB_HOST = (0xffffffff & ~IN_CLASSB_NET)
  190. IN_CLASSB_MAX = 65536
  191. IN_CLASSC_NET = 0xffffff00
  192. IN_CLASSC_NSHIFT = 8
  193. IN_CLASSC_HOST = (0xffffffff & ~IN_CLASSC_NET)
  194. def IN_MULTICAST(a): return IN_CLASSD(a)
  195. IN_MULTICAST_NET = 0xF0000000
  196. IN_LOOPBACKNET = 127
  197. INADDR_LOOPBACK = 0x7f000001
  198. INADDR_UNSPEC_GROUP = 0xe0000000
  199. INADDR_ALLHOSTS_GROUP = 0xe0000001
  200. INADDR_MAX_LOCAL_GROUP = 0xe00000ff
  201. # Included from asm/byteorder.h
  202. __LITTLE_ENDIAN = 1234
  203. # Included from linux/config.h
  204. # Included from linux/autoconf.h
  205. CONFIG_MODULES = 1
  206. CONFIG_MODVERSIONS = 1
  207. CONFIG_KERNELD = 1
  208. CONFIG_MATH_EMULATION = 1
  209. CONFIG_NET = 1
  210. CONFIG_PCI = 1
  211. CONFIG_SYSVIPC = 1
  212. CONFIG_BINFMT_AOUT = 1
  213. CONFIG_BINFMT_ELF = 1
  214. CONFIG_KERNEL_ELF = 1
  215. CONFIG_M386 = 1
  216. CONFIG_BLK_DEV_FD = 1
  217. CONFIG_BLK_DEV_IDE = 1
  218. CONFIG_BLK_DEV_IDECD = 1
  219. CONFIG_BLK_DEV_IDETAPE = 1
  220. CONFIG_BLK_DEV_IDE_PCMCIA = 1
  221. CONFIG_BLK_DEV_CMD640 = 1
  222. CONFIG_BLK_DEV_CMD640_ENHANCED = 1
  223. CONFIG_BLK_DEV_RZ1000 = 1
  224. CONFIG_BLK_DEV_LOOP_MODULE = 1
  225. CONFIG_BLK_DEV_MD = 1
  226. CONFIG_MD_LINEAR_MODULE = 1
  227. CONFIG_MD_STRIPED_MODULE = 1
  228. CONFIG_BLK_DEV_RAM = 1
  229. CONFIG_BLK_DEV_INITRD = 1
  230. CONFIG_FIREWALL = 1
  231. CONFIG_NET_ALIAS = 1
  232. CONFIG_INET = 1
  233. CONFIG_IP_FORWARD = 1
  234. CONFIG_IP_FIREWALL = 1
  235. CONFIG_IP_ACCT = 1
  236. CONFIG_NET_IPIP_MODULE = 1
  237. CONFIG_IP_ALIAS_MODULE = 1
  238. CONFIG_INET_RARP_MODULE = 1
  239. CONFIG_IP_NOSR = 1
  240. CONFIG_SKB_LARGE = 1
  241. CONFIG_IPX_MODULE = 1
  242. CONFIG_ATALK_MODULE = 1
  243. CONFIG_SCSI = 1
  244. CONFIG_BLK_DEV_SD = 1
  245. CONFIG_CHR_DEV_ST_MODULE = 1
  246. CONFIG_BLK_DEV_SR = 1
  247. CONFIG_CHR_DEV_SG_MODULE = 1
  248. CONFIG_SCSI_CONSTANTS = 1
  249. CONFIG_SCSI_7000FASST_MODULE = 1
  250. CONFIG_SCSI_AHA152X_MODULE = 1
  251. CONFIG_SCSI_AHA1542_MODULE = 1
  252. CONFIG_SCSI_AHA1740_MODULE = 1
  253. CONFIG_SCSI_AIC7XXX_MODULE = 1
  254. CONFIG_SCSI_ADVANSYS_MODULE = 1
  255. CONFIG_SCSI_IN2000_MODULE = 1
  256. CONFIG_SCSI_AM53C974 = 1
  257. CONFIG_SCSI_BUSLOGIC_MODULE = 1
  258. CONFIG_SCSI_DTC3280_MODULE = 1
  259. CONFIG_SCSI_EATA_DMA_MODULE = 1
  260. CONFIG_SCSI_EATA_PIO_MODULE = 1
  261. CONFIG_SCSI_EATA_MODULE = 1
  262. CONFIG_SCSI_FUTURE_DOMAIN_MODULE = 1
  263. CONFIG_SCSI_GENERIC_NCR5380_MODULE = 1
  264. CONFIG_SCSI_G_NCR5380_PORT = 1
  265. CONFIG_SCSI_NCR53C406A_MODULE = 1
  266. CONFIG_SCSI_NCR53C7xx_MODULE = 1
  267. CONFIG_SCSI_NCR53C8XX_MODULE = 1
  268. CONFIG_SCSI_PPA_MODULE = 1
  269. CONFIG_SCSI_PAS16_MODULE = 1
  270. CONFIG_SCSI_QLOGIC_FAS_MODULE = 1
  271. CONFIG_SCSI_QLOGIC_ISP_MODULE = 1
  272. CONFIG_SCSI_SEAGATE_MODULE = 1
  273. CONFIG_SCSI_T128_MODULE = 1
  274. CONFIG_SCSI_U14_34F_MODULE = 1
  275. CONFIG_SCSI_ULTRASTOR_MODULE = 1
  276. CONFIG_NETDEVICES = 1
  277. CONFIG_DUMMY_MODULE = 1
  278. CONFIG_EQUALIZER_MODULE = 1
  279. CONFIG_PLIP_MODULE = 1
  280. CONFIG_PPP_MODULE = 1
  281. CONFIG_SLIP_MODULE = 1
  282. CONFIG_SLIP_COMPRESSED = 1
  283. CONFIG_SLIP_SMART = 1
  284. CONFIG_NET_ETHERNET = 1
  285. CONFIG_NET_VENDOR_3COM = 1
  286. CONFIG_EL1_MODULE = 1
  287. CONFIG_EL2_MODULE = 1
  288. CONFIG_EL3_MODULE = 1
  289. CONFIG_VORTEX_MODULE = 1
  290. CONFIG_LANCE = 1
  291. CONFIG_LANCE32 = 1
  292. CONFIG_NET_VENDOR_SMC = 1
  293. CONFIG_WD80x3_MODULE = 1
  294. CONFIG_ULTRA_MODULE = 1
  295. CONFIG_SMC9194_MODULE = 1
  296. CONFIG_NET_ISA = 1
  297. CONFIG_E2100_MODULE = 1
  298. CONFIG_DEPCA_MODULE = 1
  299. CONFIG_EWRK3_MODULE = 1
  300. CONFIG_EEXPRESS_MODULE = 1
  301. CONFIG_HPLAN_PLUS_MODULE = 1
  302. CONFIG_HPLAN_MODULE = 1
  303. CONFIG_HP100_MODULE = 1
  304. CONFIG_NE2000_MODULE = 1
  305. CONFIG_NET_EISA = 1
  306. CONFIG_APRICOT_MODULE = 1
  307. CONFIG_DE4X5_MODULE = 1
  308. CONFIG_DEC_ELCP_MODULE = 1
  309. CONFIG_DGRS_MODULE = 1
  310. CONFIG_NET_POCKET = 1
  311. CONFIG_DE600_MODULE = 1
  312. CONFIG_DE620_MODULE = 1
  313. CONFIG_TR = 1
  314. CONFIG_IBMTR_MODULE = 1
  315. CONFIG_ARCNET_MODULE = 1
  316. CONFIG_ARCNET_ETH = 1
  317. CONFIG_ARCNET_1051 = 1
  318. CONFIG_ISDN_MODULE = 1
  319. CONFIG_ISDN_PPP = 1
  320. CONFIG_ISDN_PPP_VJ = 1
  321. CONFIG_ISDN_DRV_ICN_MODULE = 1
  322. CONFIG_ISDN_DRV_PCBIT_MODULE = 1
  323. CONFIG_ISDN_DRV_TELES_MODULE = 1
  324. CONFIG_CD_NO_IDESCSI = 1
  325. CONFIG_AZTCD_MODULE = 1
  326. CONFIG_GSCD_MODULE = 1
  327. CONFIG_SBPCD_MODULE = 1
  328. CONFIG_MCD_MODULE = 1
  329. CONFIG_MCDX_MODULE = 1
  330. CONFIG_OPTCD_MODULE = 1
  331. CONFIG_CM206_MODULE = 1
  332. CONFIG_SJCD_MODULE = 1
  333. CONFIG_CDI_INIT = 1
  334. CONFIG_ISP16_CDI_MODULE = 1
  335. CONFIG_CDU31A_MODULE = 1
  336. CONFIG_CDU535_MODULE = 1
  337. CONFIG_QUOTA = 1
  338. CONFIG_LOCK_MANDATORY = 1
  339. CONFIG_MINIX_FS = 1
  340. CONFIG_EXT_FS_MODULE = 1
  341. CONFIG_EXT2_FS = 1
  342. CONFIG_XIA_FS_MODULE = 1
  343. CONFIG_FAT_FS = 1
  344. CONFIG_MSDOS_FS = 1
  345. CONFIG_VFAT_FS_MODULE = 1
  346. CONFIG_UMSDOS_FS_MODULE = 1
  347. CONFIG_PROC_FS = 1
  348. CONFIG_NFS_FS = 1
  349. CONFIG_SMB_FS_MODULE = 1
  350. CONFIG_NCP_FS_MODULE = 1
  351. CONFIG_ISO9660_FS = 1
  352. CONFIG_HPFS_FS_MODULE = 1
  353. CONFIG_SYSV_FS_MODULE = 1
  354. CONFIG_UFS_FS_MODULE = 1
  355. CONFIG_SERIAL = 1
  356. CONFIG_CYCLADES_MODULE = 1
  357. CONFIG_RISCOM8_MODULE = 1
  358. CONFIG_PRINTER_MODULE = 1
  359. CONFIG_MOUSE = 1
  360. CONFIG_ATIXL_BUSMOUSE = 1
  361. CONFIG_BUSMOUSE = 1
  362. CONFIG_MS_BUSMOUSE = 1
  363. CONFIG_PSMOUSE = 1
  364. CONFIG_82C710_MOUSE = 1
  365. CONFIG_FTAPE_MODULE = 1
  366. UTS_SYSNAME = "Linux"
  367. UTS_MACHINE = "unknown"
  368. UTS_NODENAME = "(none)"
  369. UTS_DOMAINNAME = "(none)"
  370. DEF_INITSEG = 0x9000
  371. DEF_SYSSEG = 0x1000
  372. DEF_SETUPSEG = 0x9020
  373. DEF_SYSSIZE = 0x7F00
  374. NORMAL_VGA = 0xffff
  375. EXTENDED_VGA = 0xfffe
  376. ASK_VGA = 0xfffd
  377. def __constant_ntohl(x): return \
  378. def __constant_ntohs(x): return \
  379. def __htonl(x): return __ntohl(x)
  380. def __htons(x): return __ntohs(x)
  381. def __constant_htonl(x): return __constant_ntohl(x)
  382. def __constant_htons(x): return __constant_ntohs(x)
  383. def ntohl(x): return \
  384. def ntohs(x): return \
  385. def htonl(x): return \
  386. def htons(x): return \
  387. def LOOPBACK(x): return (((x) & htonl(0xff000000)) == htonl(0x7f000000))
  388. def MULTICAST(x): return (((x) & htonl(0xf0000000)) == htonl(0xe0000000))