• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Generated by h2py from /usr/include/netinet/in.h
2
3# Included from sys/feature_tests.h
4
5# Included from sys/isa_defs.h
6_CHAR_ALIGNMENT = 1
7_SHORT_ALIGNMENT = 2
8_INT_ALIGNMENT = 4
9_LONG_ALIGNMENT = 8
10_LONG_LONG_ALIGNMENT = 8
11_DOUBLE_ALIGNMENT = 8
12_LONG_DOUBLE_ALIGNMENT = 16
13_POINTER_ALIGNMENT = 8
14_MAX_ALIGNMENT = 16
15_ALIGNMENT_REQUIRED = 1
16_CHAR_ALIGNMENT = 1
17_SHORT_ALIGNMENT = 2
18_INT_ALIGNMENT = 4
19_LONG_ALIGNMENT = 4
20_LONG_LONG_ALIGNMENT = 4
21_DOUBLE_ALIGNMENT = 4
22_LONG_DOUBLE_ALIGNMENT = 4
23_POINTER_ALIGNMENT = 4
24_MAX_ALIGNMENT = 4
25_ALIGNMENT_REQUIRED = 0
26_CHAR_ALIGNMENT = 1
27_SHORT_ALIGNMENT = 2
28_INT_ALIGNMENT = 4
29_LONG_LONG_ALIGNMENT = 8
30_DOUBLE_ALIGNMENT = 8
31_ALIGNMENT_REQUIRED = 1
32_LONG_ALIGNMENT = 4
33_LONG_DOUBLE_ALIGNMENT = 8
34_POINTER_ALIGNMENT = 4
35_MAX_ALIGNMENT = 8
36_LONG_ALIGNMENT = 8
37_LONG_DOUBLE_ALIGNMENT = 16
38_POINTER_ALIGNMENT = 8
39_MAX_ALIGNMENT = 16
40_POSIX_C_SOURCE = 1
41_LARGEFILE64_SOURCE = 1
42_LARGEFILE_SOURCE = 1
43_FILE_OFFSET_BITS = 64
44_FILE_OFFSET_BITS = 32
45_POSIX_C_SOURCE = 199506L
46_POSIX_PTHREAD_SEMANTICS = 1
47_XOPEN_VERSION = 500
48_XOPEN_VERSION = 4
49_XOPEN_VERSION = 3
50from TYPES import *
51
52# Included from sys/stream.h
53
54# Included from sys/vnode.h
55from TYPES import *
56
57# Included from sys/t_lock.h
58
59# Included from sys/machlock.h
60from TYPES import *
61LOCK_HELD_VALUE = 0xff
62def SPIN_LOCK(pl): return ((pl) > ipltospl(LOCK_LEVEL))
63
64def LOCK_SAMPLE_INTERVAL(i): return (((i) & 0xff) == 0)
65
66CLOCK_LEVEL = 10
67LOCK_LEVEL = 10
68DISP_LEVEL = (LOCK_LEVEL + 1)
69PTR24_LSB = 5
70PTR24_MSB = (PTR24_LSB + 24)
71PTR24_ALIGN = 32
72PTR24_BASE = 0xe0000000
73
74# Included from sys/param.h
75from TYPES import *
76_POSIX_VDISABLE = 0
77MAX_INPUT = 512
78MAX_CANON = 256
79UID_NOBODY = 60001
80GID_NOBODY = UID_NOBODY
81UID_NOACCESS = 60002
82MAX_TASKID = 999999
83MAX_MAXPID = 999999
84DEFAULT_MAXPID = 999999
85DEFAULT_JUMPPID = 100000
86DEFAULT_MAXPID = 30000
87DEFAULT_JUMPPID = 0
88MAXUID = 2147483647
89MAXPROJID = MAXUID
90MAXLINK = 32767
91NMOUNT = 40
92CANBSIZ = 256
93NOFILE = 20
94NGROUPS_UMIN = 0
95NGROUPS_UMAX = 32
96NGROUPS_MAX_DEFAULT = 16
97NZERO = 20
98NULL = 0L
99NULL = 0
100CMASK = 022
101CDLIMIT = (1L<<11)
102NBPS = 0x20000
103NBPSCTR = 512
104UBSIZE = 512
105SCTRSHFT = 9
106SYSNAME = 9
107PREMOTE = 39
108MAXPATHLEN = 1024
109MAXSYMLINKS = 20
110MAXNAMELEN = 256
111NADDR = 13
112PIPE_BUF = 5120
113PIPE_MAX = 5120
114NBBY = 8
115MAXBSIZE = 8192
116DEV_BSIZE = 512
117DEV_BSHIFT = 9
118MAXFRAG = 8
119MAXOFF32_T = 0x7fffffff
120MAXOFF_T = 0x7fffffffffffffffl
121MAXOFFSET_T = 0x7fffffffffffffffl
122MAXOFF_T = 0x7fffffffl
123MAXOFFSET_T = 0x7fffffff
124def btodb(bytes): return   \
125
126def dbtob(db): return   \
127
128def lbtodb(bytes): return   \
129
130def ldbtob(db): return   \
131
132NCARGS32 = 0x100000
133NCARGS64 = 0x200000
134NCARGS = NCARGS64
135NCARGS = NCARGS32
136FSHIFT = 8
137FSCALE = (1<<FSHIFT)
138def DELAY(n): return drv_usecwait(n)
139
140def mmu_ptob(x): return ((x) << MMU_PAGESHIFT)
141
142def mmu_btop(x): return (((x)) >> MMU_PAGESHIFT)
143
144def mmu_btopr(x): return ((((x) + MMU_PAGEOFFSET) >> MMU_PAGESHIFT))
145
146def mmu_ptod(x): return ((x) << (MMU_PAGESHIFT - DEV_BSHIFT))
147
148def ptod(x): return ((x) << (PAGESHIFT - DEV_BSHIFT))
149
150def ptob(x): return ((x) << PAGESHIFT)
151
152def btop(x): return (((x) >> PAGESHIFT))
153
154def btopr(x): return ((((x) + PAGEOFFSET) >> PAGESHIFT))
155
156def dtop(DD): return (((DD) + NDPP - 1) >> (PAGESHIFT - DEV_BSHIFT))
157
158def dtopt(DD): return ((DD) >> (PAGESHIFT - DEV_BSHIFT))
159
160_AIO_LISTIO_MAX = (4096)
161_AIO_MAX = (-1)
162_MQ_OPEN_MAX = (32)
163_MQ_PRIO_MAX = (32)
164_SEM_NSEMS_MAX = INT_MAX
165_SEM_VALUE_MAX = INT_MAX
166
167# Included from sys/unistd.h
168_CS_PATH = 65
169_CS_LFS_CFLAGS = 68
170_CS_LFS_LDFLAGS = 69
171_CS_LFS_LIBS = 70
172_CS_LFS_LINTFLAGS = 71
173_CS_LFS64_CFLAGS = 72
174_CS_LFS64_LDFLAGS = 73
175_CS_LFS64_LIBS = 74
176_CS_LFS64_LINTFLAGS = 75
177_CS_XBS5_ILP32_OFF32_CFLAGS = 700
178_CS_XBS5_ILP32_OFF32_LDFLAGS = 701
179_CS_XBS5_ILP32_OFF32_LIBS = 702
180_CS_XBS5_ILP32_OFF32_LINTFLAGS = 703
181_CS_XBS5_ILP32_OFFBIG_CFLAGS = 705
182_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 706
183_CS_XBS5_ILP32_OFFBIG_LIBS = 707
184_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 708
185_CS_XBS5_LP64_OFF64_CFLAGS = 709
186_CS_XBS5_LP64_OFF64_LDFLAGS = 710
187_CS_XBS5_LP64_OFF64_LIBS = 711
188_CS_XBS5_LP64_OFF64_LINTFLAGS = 712
189_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 713
190_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 714
191_CS_XBS5_LPBIG_OFFBIG_LIBS = 715
192_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 716
193_SC_ARG_MAX = 1
194_SC_CHILD_MAX = 2
195_SC_CLK_TCK = 3
196_SC_NGROUPS_MAX = 4
197_SC_OPEN_MAX = 5
198_SC_JOB_CONTROL = 6
199_SC_SAVED_IDS = 7
200_SC_VERSION = 8
201_SC_PASS_MAX = 9
202_SC_LOGNAME_MAX = 10
203_SC_PAGESIZE = 11
204_SC_XOPEN_VERSION = 12
205_SC_NPROCESSORS_CONF = 14
206_SC_NPROCESSORS_ONLN = 15
207_SC_STREAM_MAX = 16
208_SC_TZNAME_MAX = 17
209_SC_AIO_LISTIO_MAX = 18
210_SC_AIO_MAX = 19
211_SC_AIO_PRIO_DELTA_MAX = 20
212_SC_ASYNCHRONOUS_IO = 21
213_SC_DELAYTIMER_MAX = 22
214_SC_FSYNC = 23
215_SC_MAPPED_FILES = 24
216_SC_MEMLOCK = 25
217_SC_MEMLOCK_RANGE = 26
218_SC_MEMORY_PROTECTION = 27
219_SC_MESSAGE_PASSING = 28
220_SC_MQ_OPEN_MAX = 29
221_SC_MQ_PRIO_MAX = 30
222_SC_PRIORITIZED_IO = 31
223_SC_PRIORITY_SCHEDULING = 32
224_SC_REALTIME_SIGNALS = 33
225_SC_RTSIG_MAX = 34
226_SC_SEMAPHORES = 35
227_SC_SEM_NSEMS_MAX = 36
228_SC_SEM_VALUE_MAX = 37
229_SC_SHARED_MEMORY_OBJECTS = 38
230_SC_SIGQUEUE_MAX = 39
231_SC_SIGRT_MIN = 40
232_SC_SIGRT_MAX = 41
233_SC_SYNCHRONIZED_IO = 42
234_SC_TIMERS = 43
235_SC_TIMER_MAX = 44
236_SC_2_C_BIND = 45
237_SC_2_C_DEV = 46
238_SC_2_C_VERSION = 47
239_SC_2_FORT_DEV = 48
240_SC_2_FORT_RUN = 49
241_SC_2_LOCALEDEF = 50
242_SC_2_SW_DEV = 51
243_SC_2_UPE = 52
244_SC_2_VERSION = 53
245_SC_BC_BASE_MAX = 54
246_SC_BC_DIM_MAX = 55
247_SC_BC_SCALE_MAX = 56
248_SC_BC_STRING_MAX = 57
249_SC_COLL_WEIGHTS_MAX = 58
250_SC_EXPR_NEST_MAX = 59
251_SC_LINE_MAX = 60
252_SC_RE_DUP_MAX = 61
253_SC_XOPEN_CRYPT = 62
254_SC_XOPEN_ENH_I18N = 63
255_SC_XOPEN_SHM = 64
256_SC_2_CHAR_TERM = 66
257_SC_XOPEN_XCU_VERSION = 67
258_SC_ATEXIT_MAX = 76
259_SC_IOV_MAX = 77
260_SC_XOPEN_UNIX = 78
261_SC_PAGE_SIZE = _SC_PAGESIZE
262_SC_T_IOV_MAX = 79
263_SC_PHYS_PAGES = 500
264_SC_AVPHYS_PAGES = 501
265_SC_COHER_BLKSZ = 503
266_SC_SPLIT_CACHE = 504
267_SC_ICACHE_SZ = 505
268_SC_DCACHE_SZ = 506
269_SC_ICACHE_LINESZ = 507
270_SC_DCACHE_LINESZ = 508
271_SC_ICACHE_BLKSZ = 509
272_SC_DCACHE_BLKSZ = 510
273_SC_DCACHE_TBLKSZ = 511
274_SC_ICACHE_ASSOC = 512
275_SC_DCACHE_ASSOC = 513
276_SC_MAXPID = 514
277_SC_STACK_PROT = 515
278_SC_THREAD_DESTRUCTOR_ITERATIONS = 568
279_SC_GETGR_R_SIZE_MAX = 569
280_SC_GETPW_R_SIZE_MAX = 570
281_SC_LOGIN_NAME_MAX = 571
282_SC_THREAD_KEYS_MAX = 572
283_SC_THREAD_STACK_MIN = 573
284_SC_THREAD_THREADS_MAX = 574
285_SC_TTY_NAME_MAX = 575
286_SC_THREADS = 576
287_SC_THREAD_ATTR_STACKADDR = 577
288_SC_THREAD_ATTR_STACKSIZE = 578
289_SC_THREAD_PRIORITY_SCHEDULING = 579
290_SC_THREAD_PRIO_INHERIT = 580
291_SC_THREAD_PRIO_PROTECT = 581
292_SC_THREAD_PROCESS_SHARED = 582
293_SC_THREAD_SAFE_FUNCTIONS = 583
294_SC_XOPEN_LEGACY = 717
295_SC_XOPEN_REALTIME = 718
296_SC_XOPEN_REALTIME_THREADS = 719
297_SC_XBS5_ILP32_OFF32 = 720
298_SC_XBS5_ILP32_OFFBIG = 721
299_SC_XBS5_LP64_OFF64 = 722
300_SC_XBS5_LPBIG_OFFBIG = 723
301_PC_LINK_MAX = 1
302_PC_MAX_CANON = 2
303_PC_MAX_INPUT = 3
304_PC_NAME_MAX = 4
305_PC_PATH_MAX = 5
306_PC_PIPE_BUF = 6
307_PC_NO_TRUNC = 7
308_PC_VDISABLE = 8
309_PC_CHOWN_RESTRICTED = 9
310_PC_ASYNC_IO = 10
311_PC_PRIO_IO = 11
312_PC_SYNC_IO = 12
313_PC_FILESIZEBITS = 67
314_PC_LAST = 67
315_POSIX_VERSION = 199506L
316_POSIX2_VERSION = 199209L
317_POSIX2_C_VERSION = 199209L
318_XOPEN_XCU_VERSION = 4
319_XOPEN_REALTIME = 1
320_XOPEN_ENH_I18N = 1
321_XOPEN_SHM = 1
322_POSIX2_C_BIND = 1
323_POSIX2_CHAR_TERM = 1
324_POSIX2_LOCALEDEF = 1
325_POSIX2_C_DEV = 1
326_POSIX2_SW_DEV = 1
327_POSIX2_UPE = 1
328
329# Included from sys/mutex.h
330from TYPES import *
331def MUTEX_HELD(x): return (mutex_owned(x))
332
333
334# Included from sys/rwlock.h
335from TYPES import *
336def RW_READ_HELD(x): return (rw_read_held((x)))
337
338def RW_WRITE_HELD(x): return (rw_write_held((x)))
339
340def RW_LOCK_HELD(x): return (rw_lock_held((x)))
341
342def RW_ISWRITER(x): return (rw_iswriter(x))
343
344
345# Included from sys/semaphore.h
346
347# Included from sys/thread.h
348from TYPES import *
349
350# Included from sys/klwp.h
351from TYPES import *
352
353# Included from sys/condvar.h
354from TYPES import *
355
356# Included from sys/time.h
357
358# Included from sys/types32.h
359
360# Included from sys/int_types.h
361TIME32_MAX = INT32_MAX
362TIME32_MIN = INT32_MIN
363def TIMEVAL_OVERFLOW(tv): return \
364
365from TYPES import *
366DST_NONE = 0
367DST_USA = 1
368DST_AUST = 2
369DST_WET = 3
370DST_MET = 4
371DST_EET = 5
372DST_CAN = 6
373DST_GB = 7
374DST_RUM = 8
375DST_TUR = 9
376DST_AUSTALT = 10
377ITIMER_REAL = 0
378ITIMER_VIRTUAL = 1
379ITIMER_PROF = 2
380ITIMER_REALPROF = 3
381def ITIMERVAL_OVERFLOW(itv): return \
382
383SEC = 1
384MILLISEC = 1000
385MICROSEC = 1000000
386NANOSEC = 1000000000
387
388# Included from sys/time_impl.h
389def TIMESPEC_OVERFLOW(ts): return \
390
391def ITIMERSPEC_OVERFLOW(it): return \
392
393__CLOCK_REALTIME0 = 0
394CLOCK_VIRTUAL = 1
395CLOCK_PROF = 2
396__CLOCK_REALTIME3 = 3
397CLOCK_HIGHRES = 4
398CLOCK_MAX = 5
399CLOCK_REALTIME = __CLOCK_REALTIME3
400CLOCK_REALTIME = __CLOCK_REALTIME0
401TIMER_RELTIME = 0x0
402TIMER_ABSTIME = 0x1
403def TICK_TO_SEC(tick): return ((tick) / hz)
404
405def SEC_TO_TICK(sec): return ((sec) * hz)
406
407def TICK_TO_MSEC(tick): return \
408
409def MSEC_TO_TICK(msec): return \
410
411def MSEC_TO_TICK_ROUNDUP(msec): return \
412
413def TICK_TO_USEC(tick): return ((tick) * usec_per_tick)
414
415def USEC_TO_TICK(usec): return ((usec) / usec_per_tick)
416
417def USEC_TO_TICK_ROUNDUP(usec): return \
418
419def TICK_TO_NSEC(tick): return ((tick) * nsec_per_tick)
420
421def NSEC_TO_TICK(nsec): return ((nsec) / nsec_per_tick)
422
423def NSEC_TO_TICK_ROUNDUP(nsec): return \
424
425def TIMEVAL_TO_TICK(tvp): return \
426
427def TIMESTRUC_TO_TICK(tsp): return \
428
429
430# Included from time.h
431from TYPES import *
432
433# Included from iso/time_iso.h
434NULL = 0L
435NULL = 0
436CLOCKS_PER_SEC = 1000000
437
438# Included from sys/select.h
439FD_SETSIZE = 65536
440FD_SETSIZE = 1024
441_NBBY = 8
442NBBY = _NBBY
443def FD_ZERO(p): return bzero((p), sizeof (*(p)))
444
445
446# Included from sys/signal.h
447
448# Included from sys/iso/signal_iso.h
449SIGHUP = 1
450SIGINT = 2
451SIGQUIT = 3
452SIGILL = 4
453SIGTRAP = 5
454SIGIOT = 6
455SIGABRT = 6
456SIGEMT = 7
457SIGFPE = 8
458SIGKILL = 9
459SIGBUS = 10
460SIGSEGV = 11
461SIGSYS = 12
462SIGPIPE = 13
463SIGALRM = 14
464SIGTERM = 15
465SIGUSR1 = 16
466SIGUSR2 = 17
467SIGCLD = 18
468SIGCHLD = 18
469SIGPWR = 19
470SIGWINCH = 20
471SIGURG = 21
472SIGPOLL = 22
473SIGIO = SIGPOLL
474SIGSTOP = 23
475SIGTSTP = 24
476SIGCONT = 25
477SIGTTIN = 26
478SIGTTOU = 27
479SIGVTALRM = 28
480SIGPROF = 29
481SIGXCPU = 30
482SIGXFSZ = 31
483SIGWAITING = 32
484SIGLWP = 33
485SIGFREEZE = 34
486SIGTHAW = 35
487SIGCANCEL = 36
488SIGLOST = 37
489_SIGRTMIN = 38
490_SIGRTMAX = 45
491SIG_BLOCK = 1
492SIG_UNBLOCK = 2
493SIG_SETMASK = 3
494SIGNO_MASK = 0xFF
495SIGDEFER = 0x100
496SIGHOLD = 0x200
497SIGRELSE = 0x400
498SIGIGNORE = 0x800
499SIGPAUSE = 0x1000
500
501# Included from sys/siginfo.h
502from TYPES import *
503SIGEV_NONE = 1
504SIGEV_SIGNAL = 2
505SIGEV_THREAD = 3
506SI_NOINFO = 32767
507SI_USER = 0
508SI_LWP = (-1)
509SI_QUEUE = (-2)
510SI_TIMER = (-3)
511SI_ASYNCIO = (-4)
512SI_MESGQ = (-5)
513
514# Included from sys/machsig.h
515ILL_ILLOPC = 1
516ILL_ILLOPN = 2
517ILL_ILLADR = 3
518ILL_ILLTRP = 4
519ILL_PRVOPC = 5
520ILL_PRVREG = 6
521ILL_COPROC = 7
522ILL_BADSTK = 8
523NSIGILL = 8
524EMT_TAGOVF = 1
525EMT_CPCOVF = 2
526NSIGEMT = 2
527FPE_INTDIV = 1
528FPE_INTOVF = 2
529FPE_FLTDIV = 3
530FPE_FLTOVF = 4
531FPE_FLTUND = 5
532FPE_FLTRES = 6
533FPE_FLTINV = 7
534FPE_FLTSUB = 8
535NSIGFPE = 8
536SEGV_MAPERR = 1
537SEGV_ACCERR = 2
538NSIGSEGV = 2
539BUS_ADRALN = 1
540BUS_ADRERR = 2
541BUS_OBJERR = 3
542NSIGBUS = 3
543TRAP_BRKPT = 1
544TRAP_TRACE = 2
545TRAP_RWATCH = 3
546TRAP_WWATCH = 4
547TRAP_XWATCH = 5
548NSIGTRAP = 5
549CLD_EXITED = 1
550CLD_KILLED = 2
551CLD_DUMPED = 3
552CLD_TRAPPED = 4
553CLD_STOPPED = 5
554CLD_CONTINUED = 6
555NSIGCLD = 6
556POLL_IN = 1
557POLL_OUT = 2
558POLL_MSG = 3
559POLL_ERR = 4
560POLL_PRI = 5
561POLL_HUP = 6
562NSIGPOLL = 6
563PROF_SIG = 1
564NSIGPROF = 1
565SI_MAXSZ = 256
566SI_MAXSZ = 128
567
568# Included from sys/time_std_impl.h
569from TYPES import *
570SI32_MAXSZ = 128
571def SI_CANQUEUE(c): return ((c) <= SI_QUEUE)
572
573SA_NOCLDSTOP = 0x00020000
574SA_ONSTACK = 0x00000001
575SA_RESETHAND = 0x00000002
576SA_RESTART = 0x00000004
577SA_SIGINFO = 0x00000008
578SA_NODEFER = 0x00000010
579SA_NOCLDWAIT = 0x00010000
580SA_WAITSIG = 0x00010000
581NSIG = 46
582MAXSIG = 45
583S_SIGNAL = 1
584S_SIGSET = 2
585S_SIGACTION = 3
586S_NONE = 4
587MINSIGSTKSZ = 2048
588SIGSTKSZ = 8192
589SS_ONSTACK = 0x00000001
590SS_DISABLE = 0x00000002
591SN_PROC = 1
592SN_CANCEL = 2
593SN_SEND = 3
594
595# Included from sys/ucontext.h
596from TYPES import *
597
598# Included from sys/regset.h
599REG_CCR = (0)
600REG_PSR = (0)
601REG_PSR = (0)
602REG_PC = (1)
603REG_nPC = (2)
604REG_Y = (3)
605REG_G1 = (4)
606REG_G2 = (5)
607REG_G3 = (6)
608REG_G4 = (7)
609REG_G5 = (8)
610REG_G6 = (9)
611REG_G7 = (10)
612REG_O0 = (11)
613REG_O1 = (12)
614REG_O2 = (13)
615REG_O3 = (14)
616REG_O4 = (15)
617REG_O5 = (16)
618REG_O6 = (17)
619REG_O7 = (18)
620REG_ASI = (19)
621REG_FPRS = (20)
622REG_PS = REG_PSR
623REG_SP = REG_O6
624REG_R0 = REG_O0
625REG_R1 = REG_O1
626_NGREG = 21
627_NGREG = 19
628NGREG = _NGREG
629_NGREG32 = 19
630_NGREG64 = 21
631SPARC_MAXREGWINDOW = 31
632MAXFPQ = 16
633XRS_ID = 0x78727300
634
635# Included from v7/sys/privregs.h
636
637# Included from v7/sys/psr.h
638PSR_CWP = 0x0000001F
639PSR_ET = 0x00000020
640PSR_PS = 0x00000040
641PSR_S = 0x00000080
642PSR_PIL = 0x00000F00
643PSR_EF = 0x00001000
644PSR_EC = 0x00002000
645PSR_RSV = 0x000FC000
646PSR_ICC = 0x00F00000
647PSR_C = 0x00100000
648PSR_V = 0x00200000
649PSR_Z = 0x00400000
650PSR_N = 0x00800000
651PSR_VER = 0x0F000000
652PSR_IMPL = 0xF0000000
653PSL_ALLCC = PSR_ICC
654PSL_USER = (PSR_S)
655PSL_USERMASK = (PSR_ICC)
656PSL_UBITS = (PSR_ICC|PSR_EF)
657def USERMODE(ps): return (((ps) & PSR_PS) == 0)
658
659
660# Included from sys/fsr.h
661FSR_CEXC = 0x0000001f
662FSR_AEXC = 0x000003e0
663FSR_FCC = 0x00000c00
664FSR_PR = 0x00001000
665FSR_QNE = 0x00002000
666FSR_FTT = 0x0001c000
667FSR_VER = 0x000e0000
668FSR_TEM = 0x0f800000
669FSR_RP = 0x30000000
670FSR_RD = 0xc0000000
671FSR_VER_SHIFT = 17
672FSR_FCC1 = 0x00000003
673FSR_FCC2 = 0x0000000C
674FSR_FCC3 = 0x00000030
675FSR_CEXC_NX = 0x00000001
676FSR_CEXC_DZ = 0x00000002
677FSR_CEXC_UF = 0x00000004
678FSR_CEXC_OF = 0x00000008
679FSR_CEXC_NV = 0x00000010
680FSR_AEXC_NX = (0x1 << 5)
681FSR_AEXC_DZ = (0x2 << 5)
682FSR_AEXC_UF = (0x4 << 5)
683FSR_AEXC_OF = (0x8 << 5)
684FSR_AEXC_NV = (0x10 << 5)
685FTT_NONE = 0
686FTT_IEEE = 1
687FTT_UNFIN = 2
688FTT_UNIMP = 3
689FTT_SEQ = 4
690FTT_ALIGN = 5
691FTT_DFAULT = 6
692FSR_FTT_SHIFT = 14
693FSR_FTT_IEEE = (FTT_IEEE   << FSR_FTT_SHIFT)
694FSR_FTT_UNFIN = (FTT_UNFIN  << FSR_FTT_SHIFT)
695FSR_FTT_UNIMP = (FTT_UNIMP  << FSR_FTT_SHIFT)
696FSR_FTT_SEQ = (FTT_SEQ    << FSR_FTT_SHIFT)
697FSR_FTT_ALIGN = (FTT_ALIGN  << FSR_FTT_SHIFT)
698FSR_FTT_DFAULT = (FTT_DFAULT << FSR_FTT_SHIFT)
699FSR_TEM_NX = (0x1 << 23)
700FSR_TEM_DZ = (0x2 << 23)
701FSR_TEM_UF = (0x4 << 23)
702FSR_TEM_OF = (0x8 << 23)
703FSR_TEM_NV = (0x10 << 23)
704RP_DBLEXT = 0
705RP_SINGLE = 1
706RP_DOUBLE = 2
707RP_RESERVED = 3
708RD_NEAR = 0
709RD_ZER0 = 1
710RD_POSINF = 2
711RD_NEGINF = 3
712FPRS_DL = 0x1
713FPRS_DU = 0x2
714FPRS_FEF = 0x4
715PIL_MAX = 0xf
716def SAVE_GLOBALS(RP): return \
717
718def RESTORE_GLOBALS(RP): return \
719
720def SAVE_OUTS(RP): return \
721
722def RESTORE_OUTS(RP): return \
723
724def SAVE_WINDOW(SBP): return \
725
726def RESTORE_WINDOW(SBP): return \
727
728def STORE_FPREGS(FP): return \
729
730def LOAD_FPREGS(FP): return \
731
732_SPARC_MAXREGWINDOW = 31
733_XRS_ID = 0x78727300
734GETCONTEXT = 0
735SETCONTEXT = 1
736UC_SIGMASK = 001
737UC_STACK = 002
738UC_CPU = 004
739UC_MAU = 010
740UC_FPU = UC_MAU
741UC_INTR = 020
742UC_ASR = 040
743UC_MCONTEXT = (UC_CPU|UC_FPU|UC_ASR)
744UC_ALL = (UC_SIGMASK|UC_STACK|UC_MCONTEXT)
745_SIGQUEUE_MAX = 32
746_SIGNOTIFY_MAX = 32
747
748# Included from sys/pcb.h
749INSTR_VALID = 0x02
750NORMAL_STEP = 0x04
751WATCH_STEP = 0x08
752CPC_OVERFLOW = 0x10
753ASYNC_HWERR = 0x20
754STEP_NONE = 0
755STEP_REQUESTED = 1
756STEP_ACTIVE = 2
757STEP_WASACTIVE = 3
758
759# Included from sys/msacct.h
760LMS_USER = 0
761LMS_SYSTEM = 1
762LMS_TRAP = 2
763LMS_TFAULT = 3
764LMS_DFAULT = 4
765LMS_KFAULT = 5
766LMS_USER_LOCK = 6
767LMS_SLEEP = 7
768LMS_WAIT_CPU = 8
769LMS_STOPPED = 9
770NMSTATES = 10
771
772# Included from sys/lwp.h
773
774# Included from sys/synch.h
775from TYPES import *
776USYNC_THREAD = 0x00
777USYNC_PROCESS = 0x01
778LOCK_NORMAL = 0x00
779LOCK_ERRORCHECK = 0x02
780LOCK_RECURSIVE = 0x04
781USYNC_PROCESS_ROBUST = 0x08
782LOCK_PRIO_NONE = 0x00
783LOCK_PRIO_INHERIT = 0x10
784LOCK_PRIO_PROTECT = 0x20
785LOCK_STALL_NP = 0x00
786LOCK_ROBUST_NP = 0x40
787LOCK_OWNERDEAD = 0x1
788LOCK_NOTRECOVERABLE = 0x2
789LOCK_INITED = 0x4
790LOCK_UNMAPPED = 0x8
791LWP_DETACHED = 0x00000040
792LWP_SUSPENDED = 0x00000080
793__LWP_ASLWP = 0x00000100
794MAXSYSARGS = 8
795NORMALRETURN = 0
796JUSTRETURN = 1
797LWP_USER = 0x01
798LWP_SYS = 0x02
799TS_FREE = 0x00
800TS_SLEEP = 0x01
801TS_RUN = 0x02
802TS_ONPROC = 0x04
803TS_ZOMB = 0x08
804TS_STOPPED = 0x10
805T_INTR_THREAD = 0x0001
806T_WAKEABLE = 0x0002
807T_TOMASK = 0x0004
808T_TALLOCSTK = 0x0008
809T_WOULDBLOCK = 0x0020
810T_DONTBLOCK = 0x0040
811T_DONTPEND = 0x0080
812T_SYS_PROF = 0x0100
813T_WAITCVSEM = 0x0200
814T_WATCHPT = 0x0400
815T_PANIC = 0x0800
816TP_HOLDLWP = 0x0002
817TP_TWAIT = 0x0004
818TP_LWPEXIT = 0x0008
819TP_PRSTOP = 0x0010
820TP_CHKPT = 0x0020
821TP_EXITLWP = 0x0040
822TP_PRVSTOP = 0x0080
823TP_MSACCT = 0x0100
824TP_STOPPING = 0x0200
825TP_WATCHPT = 0x0400
826TP_PAUSE = 0x0800
827TP_CHANGEBIND = 0x1000
828TS_LOAD = 0x0001
829TS_DONT_SWAP = 0x0002
830TS_SWAPENQ = 0x0004
831TS_ON_SWAPQ = 0x0008
832TS_CSTART = 0x0100
833TS_UNPAUSE = 0x0200
834TS_XSTART = 0x0400
835TS_PSTART = 0x0800
836TS_RESUME = 0x1000
837TS_CREATE = 0x2000
838TS_ALLSTART = \
839        (TS_CSTART|TS_UNPAUSE|TS_XSTART|TS_PSTART|TS_RESUME|TS_CREATE)
840def CPR_VSTOPPED(t): return \
841
842def THREAD_TRANSITION(tp): return thread_transition(tp);
843
844def THREAD_STOP(tp): return \
845
846def THREAD_ZOMB(tp): return THREAD_SET_STATE(tp, TS_ZOMB, NULL)
847
848def SEMA_HELD(x): return (sema_held((x)))
849
850NO_LOCKS_HELD = 1
851NO_COMPETING_THREADS = 1
852
853# Included from sys/cred.h
854
855# Included from sys/uio.h
856from TYPES import *
857
858# Included from sys/resource.h
859from TYPES import *
860PRIO_PROCESS = 0
861PRIO_PGRP = 1
862PRIO_USER = 2
863RLIMIT_CPU = 0
864RLIMIT_FSIZE = 1
865RLIMIT_DATA = 2
866RLIMIT_STACK = 3
867RLIMIT_CORE = 4
868RLIMIT_NOFILE = 5
869RLIMIT_VMEM = 6
870RLIMIT_AS = RLIMIT_VMEM
871RLIM_NLIMITS = 7
872RLIM_INFINITY = (-3l)
873RLIM_SAVED_MAX = (-2l)
874RLIM_SAVED_CUR = (-1l)
875RLIM_INFINITY = 0x7fffffff
876RLIM_SAVED_MAX = 0x7ffffffe
877RLIM_SAVED_CUR = 0x7ffffffd
878RLIM32_INFINITY = 0x7fffffff
879RLIM32_SAVED_MAX = 0x7ffffffe
880RLIM32_SAVED_CUR = 0x7ffffffd
881
882# Included from sys/model.h
883
884# Included from sys/debug.h
885def ASSERT64(x): return ASSERT(x)
886
887def ASSERT32(x): return ASSERT(x)
888
889DATAMODEL_MASK = 0x0FF00000
890DATAMODEL_ILP32 = 0x00100000
891DATAMODEL_LP64 = 0x00200000
892DATAMODEL_NONE = 0
893DATAMODEL_NATIVE = DATAMODEL_LP64
894DATAMODEL_NATIVE = DATAMODEL_ILP32
895def STRUCT_SIZE(handle): return \
896
897def STRUCT_BUF(handle): return ((handle).ptr.m64)
898
899def SIZEOF_PTR(umodel): return \
900
901def STRUCT_SIZE(handle): return (sizeof (*(handle).ptr))
902
903def STRUCT_BUF(handle): return ((handle).ptr)
904
905def SIZEOF_PTR(umodel): return sizeof (caddr_t)
906
907def lwp_getdatamodel(t): return DATAMODEL_ILP32
908
909RUSAGE_SELF = 0
910RUSAGE_CHILDREN = -1
911
912# Included from vm/seg_enum.h
913
914# Included from sys/buf.h
915
916# Included from sys/kstat.h
917from TYPES import *
918KSTAT_STRLEN = 31
919def KSTAT_ENTER(k): return \
920
921def KSTAT_EXIT(k): return \
922
923KSTAT_TYPE_RAW = 0
924KSTAT_TYPE_NAMED = 1
925KSTAT_TYPE_INTR = 2
926KSTAT_TYPE_IO = 3
927KSTAT_TYPE_TIMER = 4
928KSTAT_NUM_TYPES = 5
929KSTAT_FLAG_VIRTUAL = 0x01
930KSTAT_FLAG_VAR_SIZE = 0x02
931KSTAT_FLAG_WRITABLE = 0x04
932KSTAT_FLAG_PERSISTENT = 0x08
933KSTAT_FLAG_DORMANT = 0x10
934KSTAT_FLAG_INVALID = 0x20
935KSTAT_READ = 0
936KSTAT_WRITE = 1
937KSTAT_DATA_CHAR = 0
938KSTAT_DATA_INT32 = 1
939KSTAT_DATA_UINT32 = 2
940KSTAT_DATA_INT64 = 3
941KSTAT_DATA_UINT64 = 4
942KSTAT_DATA_LONG = KSTAT_DATA_INT32
943KSTAT_DATA_ULONG = KSTAT_DATA_UINT32
944KSTAT_DATA_LONG = KSTAT_DATA_INT64
945KSTAT_DATA_ULONG = KSTAT_DATA_UINT64
946KSTAT_DATA_LONG = 7
947KSTAT_DATA_ULONG = 8
948KSTAT_DATA_LONGLONG = KSTAT_DATA_INT64
949KSTAT_DATA_ULONGLONG = KSTAT_DATA_UINT64
950KSTAT_DATA_FLOAT = 5
951KSTAT_DATA_DOUBLE = 6
952KSTAT_INTR_HARD = 0
953KSTAT_INTR_SOFT = 1
954KSTAT_INTR_WATCHDOG = 2
955KSTAT_INTR_SPURIOUS = 3
956KSTAT_INTR_MULTSVC = 4
957KSTAT_NUM_INTRS = 5
958B_BUSY = 0x0001
959B_DONE = 0x0002
960B_ERROR = 0x0004
961B_PAGEIO = 0x0010
962B_PHYS = 0x0020
963B_READ = 0x0040
964B_WRITE = 0x0100
965B_KERNBUF = 0x0008
966B_WANTED = 0x0080
967B_AGE = 0x000200
968B_ASYNC = 0x000400
969B_DELWRI = 0x000800
970B_STALE = 0x001000
971B_DONTNEED = 0x002000
972B_REMAPPED = 0x004000
973B_FREE = 0x008000
974B_INVAL = 0x010000
975B_FORCE = 0x020000
976B_HEAD = 0x040000
977B_NOCACHE = 0x080000
978B_TRUNC = 0x100000
979B_SHADOW = 0x200000
980B_RETRYWRI = 0x400000
981def notavail(bp): return \
982
983def BWRITE(bp): return \
984
985def BWRITE2(bp): return \
986
987VROOT = 0x01
988VNOCACHE = 0x02
989VNOMAP = 0x04
990VDUP = 0x08
991VNOSWAP = 0x10
992VNOMOUNT = 0x20
993VISSWAP = 0x40
994VSWAPLIKE = 0x80
995VVFSLOCK = 0x100
996VVFSWAIT = 0x200
997VVMLOCK = 0x400
998VDIROPEN = 0x800
999VVMEXEC = 0x1000
1000VPXFS = 0x2000
1001AT_TYPE = 0x0001
1002AT_MODE = 0x0002
1003AT_UID = 0x0004
1004AT_GID = 0x0008
1005AT_FSID = 0x0010
1006AT_NODEID = 0x0020
1007AT_NLINK = 0x0040
1008AT_SIZE = 0x0080
1009AT_ATIME = 0x0100
1010AT_MTIME = 0x0200
1011AT_CTIME = 0x0400
1012AT_RDEV = 0x0800
1013AT_BLKSIZE = 0x1000
1014AT_NBLOCKS = 0x2000
1015AT_VCODE = 0x4000
1016AT_ALL = (AT_TYPE|AT_MODE|AT_UID|AT_GID|AT_FSID|AT_NODEID|\
1017                        AT_NLINK|AT_SIZE|AT_ATIME|AT_MTIME|AT_CTIME|\
1018                        AT_RDEV|AT_BLKSIZE|AT_NBLOCKS|AT_VCODE)
1019AT_STAT = (AT_MODE|AT_UID|AT_GID|AT_FSID|AT_NODEID|AT_NLINK|\
1020                        AT_SIZE|AT_ATIME|AT_MTIME|AT_CTIME|AT_RDEV)
1021AT_TIMES = (AT_ATIME|AT_MTIME|AT_CTIME)
1022AT_NOSET = (AT_NLINK|AT_RDEV|AT_FSID|AT_NODEID|AT_TYPE|\
1023                        AT_BLKSIZE|AT_NBLOCKS|AT_VCODE)
1024VSUID = 04000
1025VSGID = 02000
1026VSVTX = 01000
1027VREAD = 00400
1028VWRITE = 00200
1029VEXEC = 00100
1030MODEMASK = 07777
1031PERMMASK = 00777
1032def MANDMODE(mode): return (((mode) & (VSGID|(VEXEC>>3))) == VSGID)
1033
1034VSA_ACL = 0x0001
1035VSA_ACLCNT = 0x0002
1036VSA_DFACL = 0x0004
1037VSA_DFACLCNT = 0x0008
1038LOOKUP_DIR = 0x01
1039DUMP_ALLOC = 0
1040DUMP_FREE = 1
1041DUMP_SCAN = 2
1042ATTR_UTIME = 0x01
1043ATTR_EXEC = 0x02
1044ATTR_COMM = 0x04
1045ATTR_HINT = 0x08
1046ATTR_REAL = 0x10
1047
1048# Included from sys/poll.h
1049POLLIN = 0x0001
1050POLLPRI = 0x0002
1051POLLOUT = 0x0004
1052POLLRDNORM = 0x0040
1053POLLWRNORM = POLLOUT
1054POLLRDBAND = 0x0080
1055POLLWRBAND = 0x0100
1056POLLNORM = POLLRDNORM
1057POLLERR = 0x0008
1058POLLHUP = 0x0010
1059POLLNVAL = 0x0020
1060POLLREMOVE = 0x0800
1061POLLRDDATA = 0x0200
1062POLLNOERR = 0x0400
1063POLLCLOSED = 0x8000
1064
1065# Included from sys/strmdep.h
1066def str_aligned(X): return (((ulong_t)(X) & (sizeof (long) - 1)) == 0)
1067
1068
1069# Included from sys/strft.h
1070tdelta_t_sz = 12
1071FTEV_MASK = 0x1FFF
1072FTEV_ISWR = 0x8000
1073FTEV_CS = 0x4000
1074FTEV_PS = 0x2000
1075FTEV_QMASK = 0x1F00
1076FTEV_ALLOCMASK = 0x1FF8
1077FTEV_ALLOCB = 0x0000
1078FTEV_ESBALLOC = 0x0001
1079FTEV_DESBALLOC = 0x0002
1080FTEV_ESBALLOCA = 0x0003
1081FTEV_DESBALLOCA = 0x0004
1082FTEV_ALLOCBIG = 0x0005
1083FTEV_ALLOCBW = 0x0006
1084FTEV_FREEB = 0x0008
1085FTEV_DUPB = 0x0009
1086FTEV_COPYB = 0x000A
1087FTEV_CALLER = 0x000F
1088FTEV_PUT = 0x0100
1089FTEV_FSYNCQ = 0x0103
1090FTEV_DSYNCQ = 0x0104
1091FTEV_PUTQ = 0x0105
1092FTEV_GETQ = 0x0106
1093FTEV_RMVQ = 0x0107
1094FTEV_INSQ = 0x0108
1095FTEV_PUTBQ = 0x0109
1096FTEV_FLUSHQ = 0x010A
1097FTEV_REPLYQ = 0x010B
1098FTEV_PUTNEXT = 0x010D
1099FTEV_RWNEXT = 0x010E
1100FTEV_QWINNER = 0x010F
1101FTEV_GEWRITE = 0x0101
1102def FTFLW_HASH(h): return (((unsigned)(h))%ftflw_hash_sz)
1103
1104FTBLK_EVNTS = 0x9
1105QENAB = 0x00000001
1106QWANTR = 0x00000002
1107QWANTW = 0x00000004
1108QFULL = 0x00000008
1109QREADR = 0x00000010
1110QUSE = 0x00000020
1111QNOENB = 0x00000040
1112QBACK = 0x00000100
1113QHLIST = 0x00000200
1114QPAIR = 0x00000800
1115QPERQ = 0x00001000
1116QPERMOD = 0x00002000
1117QMTSAFE = 0x00004000
1118QMTOUTPERIM = 0x00008000
1119QMT_TYPEMASK = (QPAIR|QPERQ|QPERMOD|QMTSAFE|QMTOUTPERIM)
1120QINSERVICE = 0x00010000
1121QWCLOSE = 0x00020000
1122QEND = 0x00040000
1123QWANTWSYNC = 0x00080000
1124QSYNCSTR = 0x00100000
1125QISDRV = 0x00200000
1126QHOT = 0x00400000
1127QNEXTHOT = 0x00800000
1128_QINSERTING = 0x04000000
1129_QREMOVING = 0x08000000
1130Q_SQQUEUED = 0x01
1131Q_SQDRAINING = 0x02
1132QB_FULL = 0x01
1133QB_WANTW = 0x02
1134QB_BACK = 0x04
1135NBAND = 256
1136STRUIOT_NONE = -1
1137STRUIOT_DONTCARE = 0
1138STRUIOT_STANDARD = 1
1139STRUIOT_IP = 2
1140DBLK_REFMIN = 0x01
1141STRUIO_SPEC = 0x01
1142STRUIO_DONE = 0x02
1143STRUIO_IP = 0x04
1144STRUIO_ZC = 0x08
1145STRUIO_ICK = 0x10
1146MSGMARK = 0x01
1147MSGNOLOOP = 0x02
1148MSGDELIM = 0x04
1149MSGNOGET = 0x08
1150MSGMARKNEXT = 0x10
1151MSGNOTMARKNEXT = 0x20
1152M_DATA = 0x00
1153M_PROTO = 0x01
1154M_BREAK = 0x08
1155M_PASSFP = 0x09
1156M_EVENT = 0x0a
1157M_SIG = 0x0b
1158M_DELAY = 0x0c
1159M_CTL = 0x0d
1160M_IOCTL = 0x0e
1161M_SETOPTS = 0x10
1162M_RSE = 0x11
1163M_IOCACK = 0x81
1164M_IOCNAK = 0x82
1165M_PCPROTO = 0x83
1166M_PCSIG = 0x84
1167M_READ = 0x85
1168M_FLUSH = 0x86
1169M_STOP = 0x87
1170M_START = 0x88
1171M_HANGUP = 0x89
1172M_ERROR = 0x8a
1173M_COPYIN = 0x8b
1174M_COPYOUT = 0x8c
1175M_IOCDATA = 0x8d
1176M_PCRSE = 0x8e
1177M_STOPI = 0x8f
1178M_STARTI = 0x90
1179M_PCEVENT = 0x91
1180M_UNHANGUP = 0x92
1181QNORM = 0x00
1182QPCTL = 0x80
1183IOC_MODELS = DATAMODEL_MASK
1184IOC_ILP32 = DATAMODEL_ILP32
1185IOC_LP64 = DATAMODEL_LP64
1186IOC_NATIVE = DATAMODEL_NATIVE
1187IOC_NONE = DATAMODEL_NONE
1188STRCANON = 0x01
1189RECOPY = 0x02
1190SO_ALL = 0x003f
1191SO_READOPT = 0x0001
1192SO_WROFF = 0x0002
1193SO_MINPSZ = 0x0004
1194SO_MAXPSZ = 0x0008
1195SO_HIWAT = 0x0010
1196SO_LOWAT = 0x0020
1197SO_MREADON = 0x0040
1198SO_MREADOFF = 0x0080
1199SO_NDELON = 0x0100
1200SO_NDELOFF = 0x0200
1201SO_ISTTY = 0x0400
1202SO_ISNTTY = 0x0800
1203SO_TOSTOP = 0x1000
1204SO_TONSTOP = 0x2000
1205SO_BAND = 0x4000
1206SO_DELIM = 0x8000
1207SO_NODELIM = 0x010000
1208SO_STRHOLD = 0x020000
1209SO_ERROPT = 0x040000
1210SO_COPYOPT = 0x080000
1211SO_MAXBLK = 0x100000
1212DEF_IOV_MAX = 16
1213INFOD_FIRSTBYTES = 0x02
1214INFOD_BYTES = 0x04
1215INFOD_COUNT = 0x08
1216INFOD_COPYOUT = 0x10
1217MODOPEN = 0x1
1218CLONEOPEN = 0x2
1219CONSOPEN = 0x4
1220OPENFAIL = -1
1221BPRI_LO = 1
1222BPRI_MED = 2
1223BPRI_HI = 3
1224BPRI_FT = 4
1225INFPSZ = -1
1226FLUSHALL = 1
1227FLUSHDATA = 0
1228STRHIGH = 5120
1229STRLOW = 1024
1230MAXIOCBSZ = 1024
1231PERIM_INNER = 1
1232PERIM_OUTER = 2
1233def datamsg(type): return \
1234
1235def straln(a): return (caddr_t)((intptr_t)(a) & ~(sizeof (int)-1))
1236
1237
1238# Included from sys/byteorder.h
1239def ntohl(x): return (x)
1240
1241def ntohs(x): return (x)
1242
1243def htonl(x): return (x)
1244
1245def htons(x): return (x)
1246
1247IPPROTO_IP = 0
1248IPPROTO_HOPOPTS = 0
1249IPPROTO_ICMP = 1
1250IPPROTO_IGMP = 2
1251IPPROTO_GGP = 3
1252IPPROTO_ENCAP = 4
1253IPPROTO_TCP = 6
1254IPPROTO_EGP = 8
1255IPPROTO_PUP = 12
1256IPPROTO_UDP = 17
1257IPPROTO_IDP = 22
1258IPPROTO_IPV6 = 41
1259IPPROTO_ROUTING = 43
1260IPPROTO_FRAGMENT = 44
1261IPPROTO_RSVP = 46
1262IPPROTO_ESP = 50
1263IPPROTO_AH = 51
1264IPPROTO_ICMPV6 = 58
1265IPPROTO_NONE = 59
1266IPPROTO_DSTOPTS = 60
1267IPPROTO_HELLO = 63
1268IPPROTO_ND = 77
1269IPPROTO_EON = 80
1270IPPROTO_PIM = 103
1271IPPROTO_RAW = 255
1272IPPROTO_MAX = 256
1273IPPORT_ECHO = 7
1274IPPORT_DISCARD = 9
1275IPPORT_SYSTAT = 11
1276IPPORT_DAYTIME = 13
1277IPPORT_NETSTAT = 15
1278IPPORT_FTP = 21
1279IPPORT_TELNET = 23
1280IPPORT_SMTP = 25
1281IPPORT_TIMESERVER = 37
1282IPPORT_NAMESERVER = 42
1283IPPORT_WHOIS = 43
1284IPPORT_MTP = 57
1285IPPORT_BOOTPS = 67
1286IPPORT_BOOTPC = 68
1287IPPORT_TFTP = 69
1288IPPORT_RJE = 77
1289IPPORT_FINGER = 79
1290IPPORT_TTYLINK = 87
1291IPPORT_SUPDUP = 95
1292IPPORT_EXECSERVER = 512
1293IPPORT_LOGINSERVER = 513
1294IPPORT_CMDSERVER = 514
1295IPPORT_EFSSERVER = 520
1296IPPORT_BIFFUDP = 512
1297IPPORT_WHOSERVER = 513
1298IPPORT_ROUTESERVER = 520
1299IPPORT_RESERVED = 1024
1300IPPORT_USERRESERVED = 5000
1301IMPLINK_IP = 155
1302IMPLINK_LOWEXPER = 156
1303IMPLINK_HIGHEXPER = 158
1304IN_CLASSA_NSHIFT = 24
1305IN_CLASSA_MAX = 128
1306IN_CLASSB_NSHIFT = 16
1307IN_CLASSB_MAX = 65536
1308IN_CLASSC_NSHIFT = 8
1309IN_CLASSD_NSHIFT = 28
1310def IN_MULTICAST(i): return IN_CLASSD(i)
1311
1312IN_LOOPBACKNET = 127
1313def IN_SET_LOOPBACK_ADDR(a): return \
1314
1315def IN6_IS_ADDR_UNSPECIFIED(addr): return \
1316
1317def IN6_IS_ADDR_LOOPBACK(addr): return \
1318
1319def IN6_IS_ADDR_LOOPBACK(addr): return \
1320
1321def IN6_IS_ADDR_MULTICAST(addr): return \
1322
1323def IN6_IS_ADDR_MULTICAST(addr): return \
1324
1325def IN6_IS_ADDR_LINKLOCAL(addr): return \
1326
1327def IN6_IS_ADDR_LINKLOCAL(addr): return \
1328
1329def IN6_IS_ADDR_SITELOCAL(addr): return \
1330
1331def IN6_IS_ADDR_SITELOCAL(addr): return \
1332
1333def IN6_IS_ADDR_V4MAPPED(addr): return \
1334
1335def IN6_IS_ADDR_V4MAPPED(addr): return \
1336
1337def IN6_IS_ADDR_V4MAPPED_ANY(addr): return \
1338
1339def IN6_IS_ADDR_V4MAPPED_ANY(addr): return \
1340
1341def IN6_IS_ADDR_V4COMPAT(addr): return \
1342
1343def IN6_IS_ADDR_V4COMPAT(addr): return \
1344
1345def IN6_IS_ADDR_MC_RESERVED(addr): return \
1346
1347def IN6_IS_ADDR_MC_RESERVED(addr): return \
1348
1349def IN6_IS_ADDR_MC_NODELOCAL(addr): return \
1350
1351def IN6_IS_ADDR_MC_NODELOCAL(addr): return \
1352
1353def IN6_IS_ADDR_MC_LINKLOCAL(addr): return \
1354
1355def IN6_IS_ADDR_MC_LINKLOCAL(addr): return \
1356
1357def IN6_IS_ADDR_MC_SITELOCAL(addr): return \
1358
1359def IN6_IS_ADDR_MC_SITELOCAL(addr): return \
1360
1361def IN6_IS_ADDR_MC_ORGLOCAL(addr): return \
1362
1363def IN6_IS_ADDR_MC_ORGLOCAL(addr): return \
1364
1365def IN6_IS_ADDR_MC_GLOBAL(addr): return \
1366
1367def IN6_IS_ADDR_MC_GLOBAL(addr): return \
1368
1369IP_OPTIONS = 1
1370IP_HDRINCL = 2
1371IP_TOS = 3
1372IP_TTL = 4
1373IP_RECVOPTS = 5
1374IP_RECVRETOPTS = 6
1375IP_RECVDSTADDR = 7
1376IP_RETOPTS = 8
1377IP_MULTICAST_IF = 0x10
1378IP_MULTICAST_TTL = 0x11
1379IP_MULTICAST_LOOP = 0x12
1380IP_ADD_MEMBERSHIP = 0x13
1381IP_DROP_MEMBERSHIP = 0x14
1382IP_SEC_OPT = 0x22
1383IPSEC_PREF_NEVER = 0x01
1384IPSEC_PREF_REQUIRED = 0x02
1385IPSEC_PREF_UNIQUE = 0x04
1386IP_ADD_PROXY_ADDR = 0x40
1387IP_BOUND_IF = 0x41
1388IP_UNSPEC_SRC = 0x42
1389IP_REUSEADDR = 0x104
1390IP_DONTROUTE = 0x105
1391IP_BROADCAST = 0x106
1392IP_DEFAULT_MULTICAST_TTL = 1
1393IP_DEFAULT_MULTICAST_LOOP = 1
1394IPV6_RTHDR_TYPE_0 = 0
1395IPV6_UNICAST_HOPS = 0x5
1396IPV6_MULTICAST_IF = 0x6
1397IPV6_MULTICAST_HOPS = 0x7
1398IPV6_MULTICAST_LOOP = 0x8
1399IPV6_JOIN_GROUP = 0x9
1400IPV6_LEAVE_GROUP = 0xa
1401IPV6_ADD_MEMBERSHIP = 0x9
1402IPV6_DROP_MEMBERSHIP = 0xa
1403IPV6_PKTINFO = 0xb
1404IPV6_HOPLIMIT = 0xc
1405IPV6_NEXTHOP = 0xd
1406IPV6_HOPOPTS = 0xe
1407IPV6_DSTOPTS = 0xf
1408IPV6_RTHDR = 0x10
1409IPV6_RTHDRDSTOPTS = 0x11
1410IPV6_RECVPKTINFO = 0x12
1411IPV6_RECVHOPLIMIT = 0x13
1412IPV6_RECVHOPOPTS = 0x14
1413IPV6_RECVDSTOPTS = 0x15
1414IPV6_RECVRTHDR = 0x16
1415IPV6_RECVRTHDRDSTOPTS = 0x17
1416IPV6_CHECKSUM = 0x18
1417IPV6_BOUND_IF = 0x41
1418IPV6_UNSPEC_SRC = 0x42
1419INET_ADDRSTRLEN = 16
1420INET6_ADDRSTRLEN = 46
1421IPV6_PAD1_OPT = 0
1422