IN.py 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  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. _DEFAULT_SOURCE = 1
  6. _ISOC95_SOURCE = 1
  7. _ISOC99_SOURCE = 1
  8. _ISOC11_SOURCE = 1
  9. _POSIX_SOURCE = 1
  10. _XOPEN_SOURCE = 700
  11. _XOPEN_SOURCE_EXTENDED = 1
  12. _LARGEFILE64_SOURCE = 1
  13. _DEFAULT_SOURCE = 1
  14. _ATFILE_SOURCE = 1
  15. _DEFAULT_SOURCE = 1
  16. __USE_ISOC11 = 1
  17. __USE_ISOC99 = 1
  18. __USE_ISOC95 = 1
  19. __USE_ISOCXX11 = 1
  20. __USE_POSIX_IMPLICITLY = 1
  21. _POSIX_SOURCE = 1
  22. _POSIX_SOURCE = 1
  23. _POSIX_C_SOURCE = 2
  24. __USE_POSIX_IMPLICITLY = 1
  25. __USE_POSIX = 1
  26. __USE_POSIX2 = 1
  27. __USE_POSIX199309 = 1
  28. __USE_POSIX199506 = 1
  29. __USE_XOPEN2K = 1
  30. __USE_ISOC95 = 1
  31. __USE_ISOC99 = 1
  32. __USE_XOPEN2K8 = 1
  33. _ATFILE_SOURCE = 1
  34. __USE_XOPEN = 1
  35. __USE_XOPEN_EXTENDED = 1
  36. __USE_UNIX98 = 1
  37. _LARGEFILE_SOURCE = 1
  38. __USE_XOPEN2K8 = 1
  39. __USE_XOPEN2K8XSI = 1
  40. __USE_XOPEN2K = 1
  41. __USE_XOPEN2KXSI = 1
  42. __USE_ISOC95 = 1
  43. __USE_ISOC99 = 1
  44. __USE_XOPEN_EXTENDED = 1
  45. __USE_LARGEFILE = 1
  46. __USE_LARGEFILE64 = 1
  47. __USE_FILE_OFFSET64 = 1
  48. __USE_MISC = 1
  49. __USE_ATFILE = 1
  50. __USE_GNU = 1
  51. __USE_REENTRANT = 1
  52. __USE_FORTIFY_LEVEL = 2
  53. __USE_FORTIFY_LEVEL = 1
  54. __USE_FORTIFY_LEVEL = 0
  55. # Included from stdc-predef.h
  56. _STDC_PREDEF_H = 1
  57. __STDC_IEC_559__ = 1
  58. __STDC_IEC_559__ = 1
  59. __STDC_IEC_559_COMPLEX__ = 1
  60. __STDC_IEC_559_COMPLEX__ = 1
  61. __STDC_NO_THREADS__ = 1
  62. __GNU_LIBRARY__ = 6
  63. __GLIBC__ = 2
  64. __GLIBC_MINOR__ = 23
  65. # Included from sys/cdefs.h
  66. _SYS_CDEFS_H = 1
  67. def __NTH(fct): return fct
  68. def __NTH(fct): return fct
  69. def __P(args): return args
  70. def __PMT(args): return args
  71. def __STRING(x): return #x
  72. def __bos(ptr): return __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
  73. def __bos0(ptr): return __builtin_object_size (ptr, 0)
  74. def __warnattr(msg): return __attribute__((__warning__ (msg)))
  75. __flexarr = []
  76. __flexarr = [0]
  77. __flexarr = []
  78. __flexarr = [1]
  79. def __ASMNAME(cname): return __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
  80. def __attribute__(xyz): return
  81. def __attribute_alloc_size__(params): return \
  82. def __attribute_alloc_size__(params): return
  83. def __attribute_format_arg__(x): return __attribute__ ((__format_arg__ (x)))
  84. def __attribute_format_arg__(x): return
  85. def __glibc_unlikely(cond): return __builtin_expect ((cond), 0)
  86. def __glibc_likely(cond): return __builtin_expect ((cond), 1)
  87. def __glibc_unlikely(cond): return (cond)
  88. def __glibc_likely(cond): return (cond)
  89. # Included from bits/wordsize.h
  90. __WORDSIZE = 32
  91. __LDBL_COMPAT = 1
  92. def __LDBL_REDIR_DECL(name): return \
  93. __USE_LARGEFILE = 1
  94. __USE_LARGEFILE64 = 1
  95. __USE_EXTERN_INLINES = 1
  96. # Included from gnu/stubs.h
  97. # Included from gnu/stubs-hard.h
  98. # Included from stdint.h
  99. _STDINT_H = 1
  100. # Included from bits/wchar.h
  101. _BITS_WCHAR_H = 1
  102. def __INT64_C(c): return c ## L
  103. def __UINT64_C(c): return c ## UL
  104. def __INT64_C(c): return c ## LL
  105. def __UINT64_C(c): return c ## ULL
  106. INT8_MIN = (-128)
  107. INT16_MIN = (-32767-1)
  108. INT32_MIN = (-2147483647-1)
  109. INT64_MIN = (-__INT64_C(9223372036854775807)-1)
  110. INT8_MAX = (127)
  111. INT16_MAX = (32767)
  112. INT32_MAX = (2147483647)
  113. INT64_MAX = (__INT64_C(9223372036854775807))
  114. UINT8_MAX = (255)
  115. UINT16_MAX = (65535)
  116. UINT64_MAX = (__UINT64_C(18446744073709551615))
  117. INT_LEAST8_MIN = (-128)
  118. INT_LEAST16_MIN = (-32767-1)
  119. INT_LEAST32_MIN = (-2147483647-1)
  120. INT_LEAST64_MIN = (-__INT64_C(9223372036854775807)-1)
  121. INT_LEAST8_MAX = (127)
  122. INT_LEAST16_MAX = (32767)
  123. INT_LEAST32_MAX = (2147483647)
  124. INT_LEAST64_MAX = (__INT64_C(9223372036854775807))
  125. UINT_LEAST8_MAX = (255)
  126. UINT_LEAST16_MAX = (65535)
  127. UINT_LEAST64_MAX = (__UINT64_C(18446744073709551615))
  128. INT_FAST8_MIN = (-128)
  129. INT_FAST16_MIN = (-2147483647-1)
  130. INT_FAST32_MIN = (-2147483647-1)
  131. INT_FAST64_MIN = (-__INT64_C(9223372036854775807)-1)
  132. INT_FAST8_MAX = (127)
  133. INT_FAST16_MAX = (2147483647)
  134. INT_FAST32_MAX = (2147483647)
  135. INT_FAST64_MAX = (__INT64_C(9223372036854775807))
  136. UINT_FAST8_MAX = (255)
  137. UINT_FAST64_MAX = (__UINT64_C(18446744073709551615))
  138. INTPTR_MIN = (-2147483647-1)
  139. INTPTR_MAX = (2147483647)
  140. INTMAX_MIN = (-__INT64_C(9223372036854775807)-1)
  141. INTMAX_MAX = (__INT64_C(9223372036854775807))
  142. UINTMAX_MAX = (__UINT64_C(18446744073709551615))
  143. PTRDIFF_MIN = (-2147483647-1)
  144. PTRDIFF_MAX = (2147483647)
  145. SIG_ATOMIC_MIN = (-2147483647-1)
  146. SIG_ATOMIC_MAX = (2147483647)
  147. def INT8_C(c): return c
  148. def INT16_C(c): return c
  149. def INT32_C(c): return c
  150. def INT64_C(c): return c ## L
  151. def INT64_C(c): return c ## LL
  152. def UINT8_C(c): return c
  153. def UINT16_C(c): return c
  154. def UINT32_C(c): return c ## U
  155. def UINT64_C(c): return c ## UL
  156. def UINT64_C(c): return c ## ULL
  157. def INTMAX_C(c): return c ## L
  158. def UINTMAX_C(c): return c ## UL
  159. def INTMAX_C(c): return c ## LL
  160. def UINTMAX_C(c): return c ## ULL
  161. # Included from sys/socket.h
  162. _SYS_SOCKET_H = 1
  163. # Included from sys/uio.h
  164. _SYS_UIO_H = 1
  165. # Included from sys/types.h
  166. _SYS_TYPES_H = 1
  167. # Included from bits/types.h
  168. _BITS_TYPES_H = 1
  169. __S32_TYPE = int
  170. __SWORD_TYPE = int
  171. __SLONG32_TYPE = int
  172. # Included from bits/typesizes.h
  173. _BITS_TYPESIZES_H = 1
  174. __PID_T_TYPE = __S32_TYPE
  175. __FSWORD_T_TYPE = __SWORD_TYPE
  176. __DADDR_T_TYPE = __S32_TYPE
  177. __KEY_T_TYPE = __S32_TYPE
  178. __CLOCKID_T_TYPE = __S32_TYPE
  179. __SSIZE_T_TYPE = __SWORD_TYPE
  180. __OFF_T_MATCHES_OFF64_T = 1
  181. __INO_T_MATCHES_INO64_T = 1
  182. __FD_SETSIZE = 1024
  183. # Included from time.h
  184. _TIME_H = 1
  185. # Included from bits/time.h
  186. _STRUCT_TIMEVAL = 1
  187. _BITS_TIME_H = 1
  188. CLOCK_REALTIME = 0
  189. CLOCK_MONOTONIC = 1
  190. CLOCK_PROCESS_CPUTIME_ID = 2
  191. CLOCK_THREAD_CPUTIME_ID = 3
  192. CLOCK_MONOTONIC_RAW = 4
  193. CLOCK_REALTIME_COARSE = 5
  194. CLOCK_MONOTONIC_COARSE = 6
  195. CLOCK_BOOTTIME = 7
  196. CLOCK_REALTIME_ALARM = 8
  197. CLOCK_BOOTTIME_ALARM = 9
  198. CLOCK_TAI = 11
  199. TIMER_ABSTIME = 1
  200. # Included from bits/timex.h
  201. _BITS_TIMEX_H = 1
  202. ADJ_OFFSET = 0x0001
  203. ADJ_FREQUENCY = 0x0002
  204. ADJ_MAXERROR = 0x0004
  205. ADJ_ESTERROR = 0x0008
  206. ADJ_STATUS = 0x0010
  207. ADJ_TIMECONST = 0x0020
  208. ADJ_TAI = 0x0080
  209. ADJ_SETOFFSET = 0x0100
  210. ADJ_MICRO = 0x1000
  211. ADJ_NANO = 0x2000
  212. ADJ_TICK = 0x4000
  213. ADJ_OFFSET_SINGLESHOT = 0x8001
  214. ADJ_OFFSET_SS_READ = 0xa001
  215. MOD_OFFSET = ADJ_OFFSET
  216. MOD_FREQUENCY = ADJ_FREQUENCY
  217. MOD_MAXERROR = ADJ_MAXERROR
  218. MOD_ESTERROR = ADJ_ESTERROR
  219. MOD_STATUS = ADJ_STATUS
  220. MOD_TIMECONST = ADJ_TIMECONST
  221. MOD_CLKB = ADJ_TICK
  222. MOD_CLKA = ADJ_OFFSET_SINGLESHOT
  223. MOD_TAI = ADJ_TAI
  224. MOD_MICRO = ADJ_MICRO
  225. MOD_NANO = ADJ_NANO
  226. STA_PLL = 0x0001
  227. STA_PPSFREQ = 0x0002
  228. STA_PPSTIME = 0x0004
  229. STA_FLL = 0x0008
  230. STA_INS = 0x0010
  231. STA_DEL = 0x0020
  232. STA_UNSYNC = 0x0040
  233. STA_FREQHOLD = 0x0080
  234. STA_PPSSIGNAL = 0x0100
  235. STA_PPSJITTER = 0x0200
  236. STA_PPSWANDER = 0x0400
  237. STA_PPSERROR = 0x0800
  238. STA_CLOCKERR = 0x1000
  239. STA_NANO = 0x2000
  240. STA_MODE = 0x4000
  241. STA_CLK = 0x8000
  242. STA_RONLY = (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
  243. STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
  244. __clock_t_defined = 1
  245. __time_t_defined = 1
  246. __clockid_t_defined = 1
  247. __timer_t_defined = 1
  248. __timespec_defined = 1
  249. TIME_UTC = 1
  250. # Included from xlocale.h
  251. _XLOCALE_H = 1
  252. def __isleap(year): return \
  253. __BIT_TYPES_DEFINED__ = 1
  254. # Included from endian.h
  255. _ENDIAN_H = 1
  256. __LITTLE_ENDIAN = 1234
  257. __BIG_ENDIAN = 4321
  258. __PDP_ENDIAN = 3412
  259. # Included from bits/endian.h
  260. __BYTE_ORDER = __BIG_ENDIAN
  261. __BYTE_ORDER = __LITTLE_ENDIAN
  262. __FLOAT_WORD_ORDER = __BYTE_ORDER
  263. LITTLE_ENDIAN = __LITTLE_ENDIAN
  264. BIG_ENDIAN = __BIG_ENDIAN
  265. PDP_ENDIAN = __PDP_ENDIAN
  266. BYTE_ORDER = __BYTE_ORDER
  267. # Included from bits/byteswap.h
  268. _BITS_BYTESWAP_H = 1
  269. def __bswap_constant_16(x): return \
  270. # Included from bits/byteswap-16.h
  271. def __bswap_16(x): return \
  272. def __bswap_constant_32(x): return \
  273. def __bswap_32(x): return \
  274. def __bswap_constant_64(x): return \
  275. def __bswap_64(x): return \
  276. def __bswap_constant_64(x): return \
  277. def htobe16(x): return __bswap_16 (x)
  278. def htole16(x): return (x)
  279. def be16toh(x): return __bswap_16 (x)
  280. def le16toh(x): return (x)
  281. def htobe32(x): return __bswap_32 (x)
  282. def htole32(x): return (x)
  283. def be32toh(x): return __bswap_32 (x)
  284. def le32toh(x): return (x)
  285. def htobe64(x): return __bswap_64 (x)
  286. def htole64(x): return (x)
  287. def be64toh(x): return __bswap_64 (x)
  288. def le64toh(x): return (x)
  289. def htobe16(x): return (x)
  290. def htole16(x): return __bswap_16 (x)
  291. def be16toh(x): return (x)
  292. def le16toh(x): return __bswap_16 (x)
  293. def htobe32(x): return (x)
  294. def htole32(x): return __bswap_32 (x)
  295. def be32toh(x): return (x)
  296. def le32toh(x): return __bswap_32 (x)
  297. def htobe64(x): return (x)
  298. def htole64(x): return __bswap_64 (x)
  299. def be64toh(x): return (x)
  300. def le64toh(x): return __bswap_64 (x)
  301. # Included from sys/select.h
  302. _SYS_SELECT_H = 1
  303. # Included from bits/select.h
  304. def __FD_ZERO(s): return \
  305. # Included from bits/sigset.h
  306. _SIGSET_H_types = 1
  307. _SIGSET_H_fns = 1
  308. def __sigmask(sig): return \
  309. def __sigemptyset(set): return \
  310. def __sigfillset(set): return \
  311. def __sigisemptyset(set): return \
  312. def __FD_ELT(d): return ((d) / __NFDBITS)
  313. FD_SETSIZE = __FD_SETSIZE
  314. def FD_ZERO(fdsetp): return __FD_ZERO (fdsetp)
  315. # Included from bits/select2.h
  316. def __FD_ELT(d): return \
  317. # Included from sys/sysmacros.h
  318. _SYS_SYSMACROS_H = 1
  319. def major(dev): return gnu_dev_major (dev)
  320. def minor(dev): return gnu_dev_minor (dev)
  321. # Included from bits/pthreadtypes.h
  322. _BITS_PTHREADTYPES_H = 1
  323. __SIZEOF_PTHREAD_ATTR_T = 36
  324. __SIZEOF_PTHREAD_MUTEX_T = 24
  325. __SIZEOF_PTHREAD_MUTEXATTR_T = 4
  326. __SIZEOF_PTHREAD_COND_T = 48
  327. __SIZEOF_PTHREAD_COND_COMPAT_T = 12
  328. __SIZEOF_PTHREAD_CONDATTR_T = 4
  329. __SIZEOF_PTHREAD_RWLOCK_T = 32
  330. __SIZEOF_PTHREAD_RWLOCKATTR_T = 8
  331. __SIZEOF_PTHREAD_BARRIER_T = 20
  332. __SIZEOF_PTHREAD_BARRIERATTR_T = 4
  333. __have_pthread_attr_t = 1
  334. __PTHREAD_SPINS = 0
  335. __PTHREAD_RWLOCK_ELISION_EXTRA = 0
  336. # Included from bits/uio.h
  337. _BITS_UIO_H = 1
  338. UIO_MAXIOV = 1024
  339. _BITS_UIO_H_FOR_SYS_UIO_H = 1
  340. # Included from bits/socket.h
  341. # Included from bits/socket_type.h
  342. PF_UNSPEC = 0
  343. PF_LOCAL = 1
  344. PF_UNIX = PF_LOCAL
  345. PF_FILE = PF_LOCAL
  346. PF_INET = 2
  347. PF_AX25 = 3
  348. PF_IPX = 4
  349. PF_APPLETALK = 5
  350. PF_NETROM = 6
  351. PF_BRIDGE = 7
  352. PF_ATMPVC = 8
  353. PF_X25 = 9
  354. PF_INET6 = 10
  355. PF_ROSE = 11
  356. PF_DECnet = 12
  357. PF_NETBEUI = 13
  358. PF_SECURITY = 14
  359. PF_KEY = 15
  360. PF_NETLINK = 16
  361. PF_ROUTE = PF_NETLINK
  362. PF_PACKET = 17
  363. PF_ASH = 18
  364. PF_ECONET = 19
  365. PF_ATMSVC = 20
  366. PF_RDS = 21
  367. PF_SNA = 22
  368. PF_IRDA = 23
  369. PF_PPPOX = 24
  370. PF_WANPIPE = 25
  371. PF_LLC = 26
  372. PF_IB = 27
  373. PF_MPLS = 28
  374. PF_CAN = 29
  375. PF_TIPC = 30
  376. PF_BLUETOOTH = 31
  377. PF_IUCV = 32
  378. PF_RXRPC = 33
  379. PF_ISDN = 34
  380. PF_PHONET = 35
  381. PF_IEEE802154 = 36
  382. PF_CAIF = 37
  383. PF_ALG = 38
  384. PF_NFC = 39
  385. PF_VSOCK = 40
  386. PF_MAX = 41
  387. AF_UNSPEC = PF_UNSPEC
  388. AF_LOCAL = PF_LOCAL
  389. AF_UNIX = PF_UNIX
  390. AF_FILE = PF_FILE
  391. AF_INET = PF_INET
  392. AF_AX25 = PF_AX25
  393. AF_IPX = PF_IPX
  394. AF_APPLETALK = PF_APPLETALK
  395. AF_NETROM = PF_NETROM
  396. AF_BRIDGE = PF_BRIDGE
  397. AF_ATMPVC = PF_ATMPVC
  398. AF_X25 = PF_X25
  399. AF_INET6 = PF_INET6
  400. AF_ROSE = PF_ROSE
  401. AF_DECnet = PF_DECnet
  402. AF_NETBEUI = PF_NETBEUI
  403. AF_SECURITY = PF_SECURITY
  404. AF_KEY = PF_KEY
  405. AF_NETLINK = PF_NETLINK
  406. AF_ROUTE = PF_ROUTE
  407. AF_PACKET = PF_PACKET
  408. AF_ASH = PF_ASH
  409. AF_ECONET = PF_ECONET
  410. AF_ATMSVC = PF_ATMSVC
  411. AF_RDS = PF_RDS
  412. AF_SNA = PF_SNA
  413. AF_IRDA = PF_IRDA
  414. AF_PPPOX = PF_PPPOX
  415. AF_WANPIPE = PF_WANPIPE
  416. AF_LLC = PF_LLC
  417. AF_IB = PF_IB
  418. AF_MPLS = PF_MPLS
  419. AF_CAN = PF_CAN
  420. AF_TIPC = PF_TIPC
  421. AF_BLUETOOTH = PF_BLUETOOTH
  422. AF_IUCV = PF_IUCV
  423. AF_RXRPC = PF_RXRPC
  424. AF_ISDN = PF_ISDN
  425. AF_PHONET = PF_PHONET
  426. AF_IEEE802154 = PF_IEEE802154
  427. AF_CAIF = PF_CAIF
  428. AF_ALG = PF_ALG
  429. AF_NFC = PF_NFC
  430. AF_VSOCK = PF_VSOCK
  431. AF_MAX = PF_MAX
  432. SOL_RAW = 255
  433. SOL_DECNET = 261
  434. SOL_X25 = 262
  435. SOL_PACKET = 263
  436. SOL_ATM = 264
  437. SOL_AAL = 265
  438. SOL_IRDA = 266
  439. SOMAXCONN = 128
  440. # Included from bits/sockaddr.h
  441. _BITS_SOCKADDR_H = 1
  442. def __SOCKADDR_COMMON(sa_prefix): return \
  443. _SS_SIZE = 128
  444. def CMSG_FIRSTHDR(mhdr): return \
  445. # Included from asm/socket.h
  446. # Included from asm-generic/socket.h
  447. # Included from asm/sockios.h
  448. # Included from asm-generic/sockios.h
  449. FIOSETOWN = 0x8901
  450. SIOCSPGRP = 0x8902
  451. FIOGETOWN = 0x8903
  452. SIOCGPGRP = 0x8904
  453. SIOCATMARK = 0x8905
  454. SIOCGSTAMP = 0x8906
  455. SIOCGSTAMPNS = 0x8907
  456. SOL_SOCKET = 1
  457. SO_DEBUG = 1
  458. SO_REUSEADDR = 2
  459. SO_TYPE = 3
  460. SO_ERROR = 4
  461. SO_DONTROUTE = 5
  462. SO_BROADCAST = 6
  463. SO_SNDBUF = 7
  464. SO_RCVBUF = 8
  465. SO_SNDBUFFORCE = 32
  466. SO_RCVBUFFORCE = 33
  467. SO_KEEPALIVE = 9
  468. SO_OOBINLINE = 10
  469. SO_NO_CHECK = 11
  470. SO_PRIORITY = 12
  471. SO_LINGER = 13
  472. SO_BSDCOMPAT = 14
  473. SO_REUSEPORT = 15
  474. SO_PASSCRED = 16
  475. SO_PEERCRED = 17
  476. SO_RCVLOWAT = 18
  477. SO_SNDLOWAT = 19
  478. SO_RCVTIMEO = 20
  479. SO_SNDTIMEO = 21
  480. SO_SECURITY_AUTHENTICATION = 22
  481. SO_SECURITY_ENCRYPTION_TRANSPORT = 23
  482. SO_SECURITY_ENCRYPTION_NETWORK = 24
  483. SO_BINDTODEVICE = 25
  484. SO_ATTACH_FILTER = 26
  485. SO_DETACH_FILTER = 27
  486. SO_GET_FILTER = SO_ATTACH_FILTER
  487. SO_PEERNAME = 28
  488. SO_TIMESTAMP = 29
  489. SCM_TIMESTAMP = SO_TIMESTAMP
  490. SO_ACCEPTCONN = 30
  491. SO_PEERSEC = 31
  492. SO_PASSSEC = 34
  493. SO_TIMESTAMPNS = 35
  494. SCM_TIMESTAMPNS = SO_TIMESTAMPNS
  495. SO_MARK = 36
  496. SO_TIMESTAMPING = 37
  497. SCM_TIMESTAMPING = SO_TIMESTAMPING
  498. SO_PROTOCOL = 38
  499. SO_DOMAIN = 39
  500. SO_RXQ_OVFL = 40
  501. SO_WIFI_STATUS = 41
  502. SCM_WIFI_STATUS = SO_WIFI_STATUS
  503. SO_PEEK_OFF = 42
  504. SO_NOFCS = 43
  505. SO_LOCK_FILTER = 44
  506. SO_SELECT_ERR_QUEUE = 45
  507. SO_BUSY_POLL = 46
  508. SO_MAX_PACING_RATE = 47
  509. SO_BPF_EXTENSIONS = 48
  510. SO_INCOMING_CPU = 49
  511. SO_ATTACH_BPF = 50
  512. SO_DETACH_BPF = SO_DETACH_FILTER
  513. SO_ATTACH_REUSEPORT_CBPF = 51
  514. SO_ATTACH_REUSEPORT_EBPF = 52
  515. SO_CNX_ADVICE = 53
  516. # Included from bits/socket2.h
  517. # Included from bits/in.h
  518. IP_OPTIONS = 4
  519. IP_HDRINCL = 3
  520. IP_TOS = 1
  521. IP_TTL = 2
  522. IP_RECVOPTS = 6
  523. IP_RETOPTS = 7
  524. IP_MULTICAST_IF = 32
  525. IP_MULTICAST_TTL = 33
  526. IP_MULTICAST_LOOP = 34
  527. IP_ADD_MEMBERSHIP = 35
  528. IP_DROP_MEMBERSHIP = 36
  529. IP_UNBLOCK_SOURCE = 37
  530. IP_BLOCK_SOURCE = 38
  531. IP_ADD_SOURCE_MEMBERSHIP = 39
  532. IP_DROP_SOURCE_MEMBERSHIP = 40
  533. IP_MSFILTER = 41
  534. MCAST_JOIN_GROUP = 42
  535. MCAST_BLOCK_SOURCE = 43
  536. MCAST_UNBLOCK_SOURCE = 44
  537. MCAST_LEAVE_GROUP = 45
  538. MCAST_JOIN_SOURCE_GROUP = 46
  539. MCAST_LEAVE_SOURCE_GROUP = 47
  540. MCAST_MSFILTER = 48
  541. IP_MULTICAST_ALL = 49
  542. IP_UNICAST_IF = 50
  543. MCAST_EXCLUDE = 0
  544. MCAST_INCLUDE = 1
  545. IP_ROUTER_ALERT = 5
  546. IP_PKTINFO = 8
  547. IP_PKTOPTIONS = 9
  548. IP_PMTUDISC = 10
  549. IP_MTU_DISCOVER = 10
  550. IP_RECVERR = 11
  551. IP_RECVTTL = 12
  552. IP_RECVTOS = 13
  553. IP_MTU = 14
  554. IP_FREEBIND = 15
  555. IP_IPSEC_POLICY = 16
  556. IP_XFRM_POLICY = 17
  557. IP_PASSSEC = 18
  558. IP_TRANSPARENT = 19
  559. IP_MULTICAST_ALL = 49
  560. IP_ORIGDSTADDR = 20
  561. IP_RECVORIGDSTADDR = IP_ORIGDSTADDR
  562. IP_MINTTL = 21
  563. IP_NODEFRAG = 22
  564. IP_CHECKSUM = 23
  565. IP_BIND_ADDRESS_NO_PORT = 24
  566. IP_PMTUDISC_DONT = 0
  567. IP_PMTUDISC_WANT = 1
  568. IP_PMTUDISC_DO = 2
  569. IP_PMTUDISC_PROBE = 3
  570. IP_PMTUDISC_INTERFACE = 4
  571. IP_PMTUDISC_OMIT = 5
  572. IP_MULTICAST_IF = 32
  573. IP_MULTICAST_TTL = 33
  574. IP_MULTICAST_LOOP = 34
  575. IP_ADD_MEMBERSHIP = 35
  576. IP_DROP_MEMBERSHIP = 36
  577. IP_UNBLOCK_SOURCE = 37
  578. IP_BLOCK_SOURCE = 38
  579. IP_ADD_SOURCE_MEMBERSHIP = 39
  580. IP_DROP_SOURCE_MEMBERSHIP = 40
  581. IP_MSFILTER = 41
  582. IP_MULTICAST_ALL = 49
  583. IP_UNICAST_IF = 50
  584. SOL_IP = 0
  585. IP_DEFAULT_MULTICAST_TTL = 1
  586. IP_DEFAULT_MULTICAST_LOOP = 1
  587. IP_MAX_MEMBERSHIPS = 20
  588. IPV6_ADDRFORM = 1
  589. IPV6_2292PKTINFO = 2
  590. IPV6_2292HOPOPTS = 3
  591. IPV6_2292DSTOPTS = 4
  592. IPV6_2292RTHDR = 5
  593. IPV6_2292PKTOPTIONS = 6
  594. IPV6_CHECKSUM = 7
  595. IPV6_2292HOPLIMIT = 8
  596. IPV6_NEXTHOP = 9
  597. IPV6_AUTHHDR = 10
  598. IPV6_UNICAST_HOPS = 16
  599. IPV6_MULTICAST_IF = 17
  600. IPV6_MULTICAST_HOPS = 18
  601. IPV6_MULTICAST_LOOP = 19
  602. IPV6_JOIN_GROUP = 20
  603. IPV6_LEAVE_GROUP = 21
  604. IPV6_ROUTER_ALERT = 22
  605. IPV6_MTU_DISCOVER = 23
  606. IPV6_MTU = 24
  607. IPV6_RECVERR = 25
  608. IPV6_V6ONLY = 26
  609. IPV6_JOIN_ANYCAST = 27
  610. IPV6_LEAVE_ANYCAST = 28
  611. IPV6_IPSEC_POLICY = 34
  612. IPV6_XFRM_POLICY = 35
  613. IPV6_RECVPKTINFO = 49
  614. IPV6_PKTINFO = 50
  615. IPV6_RECVHOPLIMIT = 51
  616. IPV6_HOPLIMIT = 52
  617. IPV6_RECVHOPOPTS = 53
  618. IPV6_HOPOPTS = 54
  619. IPV6_RTHDRDSTOPTS = 55
  620. IPV6_RECVRTHDR = 56
  621. IPV6_RTHDR = 57
  622. IPV6_RECVDSTOPTS = 58
  623. IPV6_DSTOPTS = 59
  624. IPV6_RECVPATHMTU = 60
  625. IPV6_PATHMTU = 61
  626. IPV6_DONTFRAG = 62
  627. IPV6_RECVTCLASS = 66
  628. IPV6_TCLASS = 67
  629. IPV6_ADD_MEMBERSHIP = IPV6_JOIN_GROUP
  630. IPV6_DROP_MEMBERSHIP = IPV6_LEAVE_GROUP
  631. IPV6_RXHOPOPTS = IPV6_HOPOPTS
  632. IPV6_RXDSTOPTS = IPV6_DSTOPTS
  633. IPV6_PMTUDISC_DONT = 0
  634. IPV6_PMTUDISC_WANT = 1
  635. IPV6_PMTUDISC_DO = 2
  636. IPV6_PMTUDISC_PROBE = 3
  637. IPV6_PMTUDISC_INTERFACE = 4
  638. IPV6_PMTUDISC_OMIT = 5
  639. SOL_IPV6 = 41
  640. SOL_ICMPV6 = 58
  641. IPV6_RTHDR_LOOSE = 0
  642. IPV6_RTHDR_STRICT = 1
  643. IPV6_RTHDR_TYPE_0 = 0
  644. def IN_CLASSA(a): return ((((in_addr_t)(a)) & 0x80000000) == 0)
  645. IN_CLASSA_NET = 0xff000000
  646. IN_CLASSA_NSHIFT = 24
  647. IN_CLASSA_HOST = (0xffffffff & ~IN_CLASSA_NET)
  648. IN_CLASSA_MAX = 128
  649. def IN_CLASSB(a): return ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000)
  650. IN_CLASSB_NET = 0xffff0000
  651. IN_CLASSB_NSHIFT = 16
  652. IN_CLASSB_HOST = (0xffffffff & ~IN_CLASSB_NET)
  653. IN_CLASSB_MAX = 65536
  654. def IN_CLASSC(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000)
  655. IN_CLASSC_NET = 0xffffff00
  656. IN_CLASSC_NSHIFT = 8
  657. IN_CLASSC_HOST = (0xffffffff & ~IN_CLASSC_NET)
  658. def IN_CLASSD(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000)
  659. def IN_MULTICAST(a): return IN_CLASSD(a)
  660. def IN_EXPERIMENTAL(a): return ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000)
  661. def IN_BADCLASS(a): return ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000)
  662. IN_LOOPBACKNET = 127
  663. INET_ADDRSTRLEN = 16
  664. INET6_ADDRSTRLEN = 46
  665. def ntohl(x): return (x)
  666. def ntohs(x): return (x)
  667. def htonl(x): return (x)
  668. def htons(x): return (x)
  669. def ntohl(x): return __bswap_32 (x)
  670. def ntohs(x): return __bswap_16 (x)
  671. def htonl(x): return __bswap_32 (x)
  672. def htons(x): return __bswap_16 (x)
  673. def IN6_IS_ADDR_UNSPECIFIED(a): return \
  674. def IN6_IS_ADDR_LOOPBACK(a): return \
  675. def IN6_IS_ADDR_LINKLOCAL(a): return \
  676. def IN6_IS_ADDR_SITELOCAL(a): return \
  677. def IN6_IS_ADDR_V4MAPPED(a): return \
  678. def IN6_IS_ADDR_V4COMPAT(a): return \
  679. def IN6_IS_ADDR_UNSPECIFIED(a): return \
  680. def IN6_IS_ADDR_LOOPBACK(a): return \
  681. def IN6_IS_ADDR_LINKLOCAL(a): return \
  682. def IN6_IS_ADDR_SITELOCAL(a): return \
  683. def IN6_IS_ADDR_V4MAPPED(a): return \
  684. def IN6_IS_ADDR_V4COMPAT(a): return \
  685. def IN6_IS_ADDR_MC_NODELOCAL(a): return \
  686. def IN6_IS_ADDR_MC_LINKLOCAL(a): return \
  687. def IN6_IS_ADDR_MC_SITELOCAL(a): return \
  688. def IN6_IS_ADDR_MC_ORGLOCAL(a): return \
  689. def IN6_IS_ADDR_MC_GLOBAL(a): return \