in_netbsd_amd64.go 139 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950
  1. // Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_netbsd_amd64.go -pkgname in', DO NOT EDIT.
  2. package in
  3. import (
  4. "math"
  5. "reflect"
  6. "sync/atomic"
  7. "unsafe"
  8. )
  9. var _ = math.Pi
  10. var _ reflect.Kind
  11. var _ atomic.Value
  12. var _ unsafe.Pointer
  13. const (
  14. AF_APPLETALK = 16 // socket.h:218:1:
  15. AF_ARP = 28 // socket.h:237:1:
  16. AF_BLUETOOTH = 31 // socket.h:243:1:
  17. AF_CAN = 35 // socket.h:247:1:
  18. AF_CCITT = 10 // socket.h:212:1:
  19. AF_CHAOS = 5 // socket.h:206:1:
  20. AF_CNT = 21 // socket.h:225:1:
  21. AF_COIP = 20 // socket.h:224:1:
  22. AF_DATAKIT = 9 // socket.h:211:1:
  23. AF_DECnet = 12 // socket.h:214:1:
  24. AF_DLI = 13 // socket.h:215:1:
  25. AF_E164 = 26 // socket.h:235:1:
  26. AF_ECMA = 8 // socket.h:210:1:
  27. AF_ETHER = 36 // socket.h:248:1:
  28. AF_HYLINK = 15 // socket.h:217:1:
  29. AF_IEEE80211 = 32 // socket.h:244:1:
  30. AF_IMPLINK = 3 // socket.h:204:1:
  31. AF_INET = 2 // socket.h:203:1:
  32. AF_INET6 = 24 // socket.h:230:1:
  33. AF_IPX = 23 // socket.h:229:1:
  34. AF_ISDN = 26 // socket.h:234:1:
  35. AF_ISO = 7 // socket.h:208:1:
  36. AF_LAT = 14 // socket.h:216:1:
  37. AF_LINK = 18 // socket.h:220:1:
  38. AF_LOCAL = 1 // socket.h:201:1:
  39. AF_MAX = 37 // socket.h:249:1:
  40. AF_MPLS = 33 // socket.h:245:1:
  41. AF_NATM = 27 // socket.h:236:1:
  42. AF_NS = 6 // socket.h:207:1:
  43. AF_OROUTE = 17 // socket.h:219:1:
  44. AF_OSI = 7 // socket.h:209:1:
  45. AF_PUP = 4 // socket.h:205:1:
  46. AF_ROUTE = 34 // socket.h:246:1:
  47. AF_SNA = 11 // socket.h:213:1:
  48. AF_UNIX = 1 // socket.h:202:1:
  49. AF_UNSPEC = 0 // socket.h:200:1:
  50. BIG_ENDIAN = 4321 // endian.h:101:1:
  51. BYTE_ORDER = 1234 // endian.h:103:1:
  52. CTL_IPPROTO_IPSEC = 258 // in.h:118:1:
  53. FD_SETSIZE = 256 // fd_set.h:59:1:
  54. ICMP6_FILTER = 18 // in6.h:393:1:
  55. INET6_ADDRSTRLEN = 46 // in6.h:138:1:
  56. INET6_IS_ADDR_LINKLOCAL = 1 // in6.h:678:1:
  57. INET6_IS_ADDR_MC_LINKLOCAL = 2 // in6.h:679:1:
  58. INET6_IS_ADDR_SITELOCAL = 4 // in6.h:680:1:
  59. INET_ADDRSTRLEN = 16 // in.h:249:1:
  60. INT16_MAX = 32767 // common_int_limits.h:53:1:
  61. INT16_MIN = -32768 // common_int_limits.h:47:1:
  62. INT32_MAX = 2147483647 // common_int_limits.h:54:1:
  63. INT32_MIN = -2147483648 // common_int_limits.h:48:1:
  64. INT64_MAX = 9223372036854775807 // common_int_limits.h:55:1:
  65. INT64_MIN = -9223372036854775808 // common_int_limits.h:49:1:
  66. INT8_MAX = 127 // common_int_limits.h:52:1:
  67. INT8_MIN = -128 // common_int_limits.h:46:1:
  68. INTMAX_MAX = 9223372036854775807 // common_int_limits.h:111:1:
  69. INTMAX_MIN = -9223372036854775808 // common_int_limits.h:110:1:
  70. INTPTR_MAX = 9223372036854775807 // common_int_limits.h:105:1:
  71. INTPTR_MIN = -9223372036854775808 // common_int_limits.h:104:1:
  72. INT_FAST16_MAX = 2147483647 // common_int_limits.h:93:1:
  73. INT_FAST16_MIN = -2147483648 // common_int_limits.h:87:1:
  74. INT_FAST32_MAX = 2147483647 // common_int_limits.h:94:1:
  75. INT_FAST32_MIN = -2147483648 // common_int_limits.h:88:1:
  76. INT_FAST64_MAX = 9223372036854775807 // common_int_limits.h:95:1:
  77. INT_FAST64_MIN = -9223372036854775808 // common_int_limits.h:89:1:
  78. INT_FAST8_MAX = 2147483647 // common_int_limits.h:92:1:
  79. INT_FAST8_MIN = -2147483648 // common_int_limits.h:86:1:
  80. INT_LEAST16_MAX = 32767 // common_int_limits.h:73:1:
  81. INT_LEAST16_MIN = -32768 // common_int_limits.h:67:1:
  82. INT_LEAST32_MAX = 2147483647 // common_int_limits.h:74:1:
  83. INT_LEAST32_MIN = -2147483648 // common_int_limits.h:68:1:
  84. INT_LEAST64_MAX = 9223372036854775807 // common_int_limits.h:75:1:
  85. INT_LEAST64_MIN = -9223372036854775808 // common_int_limits.h:69:1:
  86. INT_LEAST8_MAX = 127 // common_int_limits.h:72:1:
  87. INT_LEAST8_MIN = -128 // common_int_limits.h:66:1:
  88. IN_CLASSA_MAX = 128 // in.h:182:1:
  89. IN_CLASSA_NSHIFT = 24 // in.h:180:1:
  90. IN_CLASSB_MAX = 65536 // in.h:189:1:
  91. IN_CLASSB_NSHIFT = 16 // in.h:187:1:
  92. IN_CLASSC_NSHIFT = 8 // in.h:194:1:
  93. IN_CLASSD_NSHIFT = 28 // in.h:201:1:
  94. IN_LOOPBACKNET = 127 // in.h:236:1:
  95. IPCTL_ALLOWSRCRT = 7 // in.h:348:1:
  96. IPCTL_ANONPORTMAX = 11 // in.h:352:1:
  97. IPCTL_ANONPORTMIN = 10 // in.h:351:1:
  98. IPCTL_CHECKINTERFACE = 20 // in.h:361:1:
  99. IPCTL_DAD_COUNT = 25 // in.h:366:1:
  100. IPCTL_DEFTTL = 3 // in.h:344:1:
  101. IPCTL_DIRECTEDBCAST = 6 // in.h:347:1:
  102. IPCTL_FORWARDING = 1 // in.h:342:1:
  103. IPCTL_FORWSRCRT = 5 // in.h:346:1:
  104. IPCTL_GIF_TTL = 15 // in.h:356:1:
  105. IPCTL_GRE_TTL = 19 // in.h:360:1:
  106. IPCTL_HOSTZEROBROADCAST = 14 // in.h:355:1:
  107. IPCTL_IFQ = 21 // in.h:362:1:
  108. IPCTL_LOOPBACKCKSUM = 23 // in.h:364:1:
  109. IPCTL_LOWPORTMAX = 17 // in.h:358:1:
  110. IPCTL_LOWPORTMIN = 16 // in.h:357:1:
  111. IPCTL_MAXFLOWS = 13 // in.h:354:1:
  112. IPCTL_MAXFRAGPACKETS = 18 // in.h:359:1:
  113. IPCTL_MTUDISC = 9 // in.h:350:1:
  114. IPCTL_MTUDISCTIMEOUT = 12 // in.h:353:1:
  115. IPCTL_RANDOMID = 22 // in.h:363:1:
  116. IPCTL_SENDREDIRECTS = 2 // in.h:343:1:
  117. IPCTL_STATS = 24 // in.h:365:1:
  118. IPCTL_SUBNETSARELOCAL = 8 // in.h:349:1:
  119. IPPORT_ANONMAX = 65535 // in.h:151:1:
  120. IPPORT_ANONMIN = 49152 // in.h:150:1:
  121. IPPORT_RESERVED = 1024 // in.h:149:1:
  122. IPPORT_RESERVEDMAX = 1023 // in.h:153:1:
  123. IPPORT_RESERVEDMIN = 600 // in.h:152:1:
  124. IPPROTO_AH = 51 // in.h:95:1:
  125. IPPROTO_CARP = 112 // in.h:107:1:
  126. IPPROTO_DCCP = 33 // in.h:88:1:
  127. IPPROTO_DONE = 257 // in.h:115:1:
  128. IPPROTO_DSTOPTS = 60 // in.h:100:1:
  129. IPPROTO_EGP = 8 // in.h:83:1:
  130. IPPROTO_ENCAP = 98 // in.h:103:1:
  131. IPPROTO_EON = 80 // in.h:101:1:
  132. IPPROTO_ESP = 50 // in.h:94:1:
  133. IPPROTO_ETHERIP = 97 // in.h:102:1:
  134. IPPROTO_FRAGMENT = 44 // in.h:91:1:
  135. IPPROTO_GGP = 3 // in.h:79:1:
  136. IPPROTO_GRE = 47 // in.h:93:1:
  137. IPPROTO_HOPOPTS = 0 // in.h:76:1:
  138. IPPROTO_ICMP = 1 // in.h:77:1:
  139. IPPROTO_ICMPV6 = 58 // in.h:98:1:
  140. IPPROTO_IDP = 22 // in.h:86:1:
  141. IPPROTO_IGMP = 2 // in.h:78:1:
  142. IPPROTO_IP = 0 // in.h:75:1:
  143. IPPROTO_IPCOMP = 108 // in.h:105:1:
  144. IPPROTO_IPIP = 4 // in.h:81:1:
  145. IPPROTO_IPV4 = 4 // in.h:80:1:
  146. IPPROTO_IPV6 = 41 // in.h:89:1:
  147. IPPROTO_IPV6_ICMP = 58 // in.h:97:1:
  148. IPPROTO_L2TP = 115 // in.h:108:1:
  149. IPPROTO_MAX = 256 // in.h:112:1:
  150. IPPROTO_MOBILE = 55 // in.h:96:1:
  151. IPPROTO_NONE = 59 // in.h:99:1:
  152. IPPROTO_PFSYNC = 240 // in.h:110:1:
  153. IPPROTO_PIM = 103 // in.h:104:1:
  154. IPPROTO_PUP = 12 // in.h:84:1:
  155. IPPROTO_RAW = 255 // in.h:111:1:
  156. IPPROTO_ROUTING = 43 // in.h:90:1:
  157. IPPROTO_RSVP = 46 // in.h:92:1:
  158. IPPROTO_SCTP = 132 // in.h:109:1:
  159. IPPROTO_TCP = 6 // in.h:82:1:
  160. IPPROTO_TP = 29 // in.h:87:1:
  161. IPPROTO_UDP = 17 // in.h:85:1:
  162. IPPROTO_VRRP = 112 // in.h:106:1:
  163. IPV6CTL_ACCEPT_RTADV = 12 // in6.h:509:1:
  164. IPV6CTL_ADDRCTLPOLICY = 38 // in6.h:530:1:
  165. IPV6CTL_ANONPORTMAX = 29 // in6.h:524:1:
  166. IPV6CTL_ANONPORTMIN = 28 // in6.h:523:1:
  167. IPV6CTL_AUTO_FLOWLABEL = 17 // in6.h:514:1:
  168. IPV6CTL_AUTO_LINKLOCAL = 35 // in6.h:528:1:
  169. IPV6CTL_DAD_COUNT = 16 // in6.h:513:1:
  170. IPV6CTL_DEFHLIM = 3 // in6.h:500:1:
  171. IPV6CTL_DEFMCASTHLIM = 18 // in6.h:515:1:
  172. IPV6CTL_FORWARDING = 1 // in6.h:498:1:
  173. IPV6CTL_FORWSRCRT = 5 // in6.h:502:1:
  174. IPV6CTL_GIF_HLIM = 19 // in6.h:516:1:
  175. IPV6CTL_HDRNESTLIMIT = 15 // in6.h:512:1:
  176. IPV6CTL_IFQ = 42 // in6.h:534:1:
  177. IPV6CTL_KAME_VERSION = 20 // in6.h:517:1:
  178. IPV6CTL_KEEPFAITH = 13 // in6.h:510:1:
  179. IPV6CTL_LOG_INTERVAL = 14 // in6.h:511:1:
  180. IPV6CTL_LOWPORTMAX = 31 // in6.h:526:1:
  181. IPV6CTL_LOWPORTMIN = 30 // in6.h:525:1:
  182. IPV6CTL_MAXFRAGPACKETS = 9 // in6.h:506:1:
  183. IPV6CTL_MAXFRAGS = 41 // in6.h:533:1:
  184. IPV6CTL_MRTPROTO = 8 // in6.h:505:1:
  185. IPV6CTL_MRTSTATS = 7 // in6.h:504:1:
  186. IPV6CTL_RR_PRUNE = 22 // in6.h:519:1:
  187. IPV6CTL_RTADV_MAXROUTES = 43 // in6.h:535:1:
  188. IPV6CTL_RTADV_NUMROUTES = 44 // in6.h:537:1:
  189. IPV6CTL_SENDREDIRECTS = 2 // in6.h:499:1:
  190. IPV6CTL_SOURCECHECK = 10 // in6.h:507:1:
  191. IPV6CTL_SOURCECHECK_LOGINT = 11 // in6.h:508:1:
  192. IPV6CTL_STATS = 6 // in6.h:503:1:
  193. IPV6CTL_USE_DEFAULTZONE = 39 // in6.h:531:1:
  194. IPV6CTL_USE_DEPRECATED = 21 // in6.h:518:1:
  195. IPV6CTL_V6ONLY = 24 // in6.h:521:1:
  196. IPV6PORT_ANONMAX = 65535 // in6.h:115:1:
  197. IPV6PORT_ANONMIN = 49152 // in6.h:114:1:
  198. IPV6PORT_RESERVED = 1024 // in6.h:113:1:
  199. IPV6PORT_RESERVEDMAX = 1023 // in6.h:117:1:
  200. IPV6PORT_RESERVEDMIN = 600 // in6.h:116:1:
  201. IPV6_CHECKSUM = 26 // in6.h:405:1:
  202. IPV6_DEFAULT_MULTICAST_HOPS = 1 // in6.h:453:1:
  203. IPV6_DEFAULT_MULTICAST_LOOP = 1 // in6.h:454:1:
  204. IPV6_DONTFRAG = 62 // in6.h:441:1:
  205. IPV6_DSTOPTS = 50 // in6.h:432:1:
  206. IPV6_FAITH = 29 // in6.h:409:1:
  207. IPV6_HOPLIMIT = 47 // in6.h:429:1:
  208. IPV6_HOPOPTS = 49 // in6.h:431:1:
  209. IPV6_IPSEC_POLICY = 28 // in6.h:408:1:
  210. IPV6_JOIN_GROUP = 12 // in6.h:388:1:
  211. IPV6_LEAVE_GROUP = 13 // in6.h:389:1:
  212. IPV6_MULTICAST_HOPS = 10 // in6.h:385:1:
  213. IPV6_MULTICAST_IF = 9 // in6.h:384:1:
  214. IPV6_MULTICAST_LOOP = 11 // in6.h:386:1:
  215. IPV6_NEXTHOP = 48 // in6.h:430:1:
  216. IPV6_PATHMTU = 44 // in6.h:424:1:
  217. IPV6_PKTINFO = 46 // in6.h:428:1:
  218. IPV6_PORTALGO = 17 // in6.h:392:1:
  219. IPV6_PORTRANGE = 14 // in6.h:390:1:
  220. IPV6_PORTRANGE_DEFAULT = 0 // in6.h:484:1:
  221. IPV6_PORTRANGE_HIGH = 1 // in6.h:485:1:
  222. IPV6_PORTRANGE_LOW = 2 // in6.h:486:1:
  223. IPV6_PREFER_TEMPADDR = 63 // in6.h:442:1:
  224. IPV6_RECVDSTOPTS = 40 // in6.h:418:1:
  225. IPV6_RECVHOPLIMIT = 37 // in6.h:415:1:
  226. IPV6_RECVHOPOPTS = 39 // in6.h:417:1:
  227. IPV6_RECVPATHMTU = 43 // in6.h:423:1:
  228. IPV6_RECVPKTINFO = 36 // in6.h:414:1:
  229. IPV6_RECVRTHDR = 38 // in6.h:416:1:
  230. IPV6_RECVTCLASS = 57 // in6.h:435:1:
  231. IPV6_RTHDR = 51 // in6.h:433:1:
  232. IPV6_RTHDRDSTOPTS = 35 // in6.h:412:1:
  233. IPV6_RTHDR_LOOSE = 0 // in6.h:446:1:
  234. IPV6_RTHDR_STRICT = 1 // in6.h:447:1:
  235. IPV6_RTHDR_TYPE_0 = 0 // in6.h:448:1:
  236. IPV6_SOCKOPT_RESERVED1 = 3 // in6.h:382:1:
  237. IPV6_TCLASS = 61 // in6.h:440:1:
  238. IPV6_UNICAST_HOPS = 4 // in6.h:383:1:
  239. IPV6_USE_MIN_MTU = 42 // in6.h:422:1:
  240. IPV6_V6ONLY = 27 // in6.h:406:1:
  241. IP_ADD_MEMBERSHIP = 12 // in.h:283:1:
  242. IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:312:1:
  243. IP_DEFAULT_MULTICAST_TTL = 1 // in.h:311:1:
  244. IP_DROP_MEMBERSHIP = 13 // in.h:284:1:
  245. IP_ERRORMTU = 21 // in.h:288:1:
  246. IP_HDRINCL = 2 // in.h:272:1:
  247. IP_IPSEC_POLICY = 22 // in.h:289:1:
  248. IP_MAX_MEMBERSHIPS = 20 // in.h:313:1:
  249. IP_MINTTL = 24 // in.h:291:1:
  250. IP_MULTICAST_IF = 9 // in.h:279:1:
  251. IP_MULTICAST_LOOP = 11 // in.h:281:1:
  252. IP_MULTICAST_TTL = 10 // in.h:280:1:
  253. IP_OPTIONS = 1 // in.h:271:1:
  254. IP_PKTINFO = 25 // in.h:292:1:
  255. IP_PORTALGO = 18 // in.h:285:1:
  256. IP_PORTRANGE = 19 // in.h:286:1:
  257. IP_PORTRANGE_DEFAULT = 0 // in.h:327:1:
  258. IP_PORTRANGE_HIGH = 1 // in.h:328:1:
  259. IP_PORTRANGE_LOW = 2 // in.h:329:1:
  260. IP_RECVDSTADDR = 7 // in.h:277:1:
  261. IP_RECVIF = 20 // in.h:287:1:
  262. IP_RECVOPTS = 5 // in.h:275:1:
  263. IP_RECVPKTINFO = 26 // in.h:293:1:
  264. IP_RECVRETOPTS = 6 // in.h:276:1:
  265. IP_RECVTTL = 23 // in.h:290:1:
  266. IP_RETOPTS = 8 // in.h:278:1:
  267. IP_SENDSRCADDR = 7 // in.h:295:1:
  268. IP_TOS = 3 // in.h:273:1:
  269. IP_TTL = 4 // in.h:274:1:
  270. LITTLE_ENDIAN = 1234 // endian.h:100:1:
  271. MSG_BCAST = 0x0100 // socket.h:497:1:
  272. MSG_CMSG_CLOEXEC = 0x0800 // socket.h:501:1:
  273. MSG_CONTROLMBUF = 0x2000000 // socket.h:515:1:
  274. MSG_CTRUNC = 0x0020 // socket.h:494:1:
  275. MSG_DONTROUTE = 0x0004 // socket.h:491:1:
  276. MSG_DONTWAIT = 0x0080 // socket.h:496:1:
  277. MSG_EOR = 0x0008 // socket.h:492:1:
  278. MSG_IOVUSRSPACE = 0x4000000 // socket.h:516:1:
  279. MSG_LENUSRSPACE = 0x8000000 // socket.h:517:1:
  280. MSG_MCAST = 0x0200 // socket.h:498:1:
  281. MSG_NAMEMBUF = 0x1000000 // socket.h:514:1:
  282. MSG_NBIO = 0x1000 // socket.h:502:1:
  283. MSG_NOSIGNAL = 0x0400 // socket.h:499:1:
  284. MSG_NOTIFICATION = 0x4000 // socket.h:504:1:
  285. MSG_OOB = 0x0001 // socket.h:489:1:
  286. MSG_PEEK = 0x0002 // socket.h:490:1:
  287. MSG_TRUNC = 0x0010 // socket.h:493:1:
  288. MSG_USERFLAGS = 0x0ffffff // socket.h:513:1:
  289. MSG_WAITALL = 0x0040 // socket.h:495:1:
  290. MSG_WAITFORONE = 0x2000 // socket.h:503:1:
  291. NBBY = 8 // types.h:316:1:
  292. NET_RT_DUMP = 1 // socket.h:457:1:
  293. NET_RT_FLAGS = 2 // socket.h:458:1:
  294. NET_RT_IFLIST = 6 // socket.h:462:1:
  295. NET_RT_OIFLIST = 5 // socket.h:461:1:
  296. NET_RT_OOIFLIST = 4 // socket.h:460:1:
  297. NET_RT_OOOIFLIST = 3 // socket.h:459:1:
  298. NFDBITS = 32 // fd_set.h:93:1:
  299. NODEVMAJOR = -1 // types.h:258:1:
  300. PCB_ALL = 0 // socket.h:444:1:
  301. PCB_SLOP = 20 // socket.h:443:1:
  302. PDP_ENDIAN = 3412 // endian.h:102:1:
  303. PF_APPLETALK = 16 // socket.h:334:1:
  304. PF_ARP = 28 // socket.h:351:1:
  305. PF_BLUETOOTH = 31 // socket.h:355:1:
  306. PF_CAN = 35 // socket.h:358:1:
  307. PF_CCITT = 10 // socket.h:328:1:
  308. PF_CHAOS = 5 // socket.h:322:1:
  309. PF_CNT = 21 // socket.h:341:1:
  310. PF_COIP = 20 // socket.h:340:1:
  311. PF_DATAKIT = 9 // socket.h:327:1:
  312. PF_DECnet = 12 // socket.h:330:1:
  313. PF_DLI = 13 // socket.h:331:1:
  314. PF_E164 = 26 // socket.h:349:1:
  315. PF_ECMA = 8 // socket.h:326:1:
  316. PF_ETHER = 36 // socket.h:359:1:
  317. PF_HYLINK = 15 // socket.h:333:1:
  318. PF_IMPLINK = 3 // socket.h:320:1:
  319. PF_INET = 2 // socket.h:319:1:
  320. PF_INET6 = 24 // socket.h:342:1:
  321. PF_IPX = 23 // socket.h:343:1:
  322. PF_ISDN = 26 // socket.h:348:1:
  323. PF_ISO = 7 // socket.h:324:1:
  324. PF_KEY = 29 // socket.h:353:1:
  325. PF_LAT = 14 // socket.h:332:1:
  326. PF_LINK = 18 // socket.h:336:1:
  327. PF_LOCAL = 1 // socket.h:317:1:
  328. PF_MAX = 37 // socket.h:361:1:
  329. PF_MPLS = 33 // socket.h:356:1:
  330. PF_NATM = 27 // socket.h:350:1:
  331. PF_NS = 6 // socket.h:323:1:
  332. PF_OROUTE = 17 // socket.h:335:1:
  333. PF_OSI = 7 // socket.h:325:1:
  334. PF_PIP = 25 // socket.h:346:1:
  335. PF_PUP = 4 // socket.h:321:1:
  336. PF_ROUTE = 34 // socket.h:357:1:
  337. PF_RTIP = 22 // socket.h:345:1:
  338. PF_SNA = 11 // socket.h:329:1:
  339. PF_UNIX = 1 // socket.h:318:1:
  340. PF_UNSPEC = 0 // socket.h:316:1:
  341. PF_XTP = 19 // socket.h:338:1:
  342. PTRDIFF_MAX = 9223372036854775807 // common_int_limits.h:121:1:
  343. PTRDIFF_MIN = -9223372036854775808 // common_int_limits.h:120:1:
  344. SCM_CREDS = 0x10 // socket.h:581:1:
  345. SCM_RIGHTS = 0x01 // socket.h:576:1:
  346. SCM_TIMESTAMP = 0x08 // socket.h:580:1:
  347. SHUT_RD = 0 // socket.h:587:1:
  348. SHUT_RDWR = 2 // socket.h:589:1:
  349. SHUT_WR = 1 // socket.h:588:1:
  350. SIG_ATOMIC_MAX = 2147483647 // common_int_limits.h:125:1:
  351. SIG_ATOMIC_MIN = -2147483648 // common_int_limits.h:124:1:
  352. SIN6_LEN = 0 // in6.h:144:1:
  353. SIZE_MAX = 18446744073709551615 // common_int_limits.h:128:1:
  354. SOCK_CLOEXEC = 0x10000000 // socket.h:113:1:
  355. SOCK_CONN_DGRAM = 6 // socket.h:110:1:
  356. SOCK_DCCP = 6 // socket.h:111:1:
  357. SOCK_DGRAM = 2 // socket.h:106:1:
  358. SOCK_FLAGS_MASK = 0xf0000000 // socket.h:116:1:
  359. SOCK_NONBLOCK = 0x20000000 // socket.h:114:1:
  360. SOCK_NOSIGPIPE = 0x40000000 // socket.h:115:1:
  361. SOCK_RAW = 3 // socket.h:107:1:
  362. SOCK_RDM = 4 // socket.h:108:1:
  363. SOCK_SEQPACKET = 5 // socket.h:109:1:
  364. SOCK_STREAM = 1 // socket.h:105:1:
  365. SOL_SOCKET = 0xffff // socket.h:195:1:
  366. SOMAXCONN = 128 // socket.h:470:1:
  367. SO_ACCEPTCONN = 0x0002 // socket.h:122:1:
  368. SO_ACCEPTFILTER = 0x1000 // socket.h:133:1:
  369. SO_BROADCAST = 0x0020 // socket.h:126:1:
  370. SO_DEBUG = 0x0001 // socket.h:121:1:
  371. SO_DEFOPTS = 27645 // socket.h:138:1:
  372. SO_DONTROUTE = 0x0010 // socket.h:125:1:
  373. SO_ERROR = 0x1007 // socket.h:169:1:
  374. SO_KEEPALIVE = 0x0008 // socket.h:124:1:
  375. SO_LINGER = 0x0080 // socket.h:128:1:
  376. SO_NOHEADER = 0x100a // socket.h:173:1:
  377. SO_NOSIGPIPE = 0x0800 // socket.h:132:1:
  378. SO_OOBINLINE = 0x0100 // socket.h:129:1:
  379. SO_OVERFLOWED = 0x1009 // socket.h:171:1:
  380. SO_RCVBUF = 0x1002 // socket.h:164:1:
  381. SO_RCVLOWAT = 0x1004 // socket.h:166:1:
  382. SO_RCVTIMEO = 0x100c // socket.h:178:1:
  383. SO_RERROR = 0x4000 // socket.h:135:1:
  384. SO_REUSEADDR = 0x0004 // socket.h:123:1:
  385. SO_REUSEPORT = 0x0200 // socket.h:130:1:
  386. SO_SNDBUF = 0x1001 // socket.h:163:1:
  387. SO_SNDLOWAT = 0x1003 // socket.h:165:1:
  388. SO_SNDTIMEO = 0x100b // socket.h:177:1:
  389. SO_TIMESTAMP = 0x2000 // socket.h:134:1:
  390. SO_TYPE = 0x1008 // socket.h:170:1:
  391. SO_USELOOPBACK = 0x0040 // socket.h:127:1:
  392. UINT16_MAX = 65535 // common_int_limits.h:59:1:
  393. UINT32_MAX = 4294967295 // common_int_limits.h:60:1:
  394. UINT64_MAX = 18446744073709551615 // common_int_limits.h:61:1:
  395. UINT8_MAX = 255 // common_int_limits.h:58:1:
  396. UINTMAX_MAX = 18446744073709551615 // common_int_limits.h:112:1:
  397. UINTPTR_MAX = 18446744073709551615 // common_int_limits.h:106:1:
  398. UINT_FAST16_MAX = 4294967295 // common_int_limits.h:99:1:
  399. UINT_FAST32_MAX = 4294967295 // common_int_limits.h:100:1:
  400. UINT_FAST64_MAX = 18446744073709551615 // common_int_limits.h:101:1:
  401. UINT_FAST8_MAX = 4294967295 // common_int_limits.h:98:1:
  402. UINT_LEAST16_MAX = 65535 // common_int_limits.h:79:1:
  403. UINT_LEAST32_MAX = 4294967295 // common_int_limits.h:80:1:
  404. UINT_LEAST64_MAX = 18446744073709551615 // common_int_limits.h:81:1:
  405. UINT_LEAST8_MAX = 255 // common_int_limits.h:78:1:
  406. UIO_MAXIOV = 1024 // uio.h:97:1:
  407. WCHAR_MAX = 0x7fffffff // wchar_limits.h:41:1:
  408. WCHAR_MIN = -2147483648 // wchar_limits.h:40:1:
  409. WINT_MAX = 0x7fffffff // wchar_limits.h:45:1:
  410. WINT_MIN = -2147483648 // wchar_limits.h:44:1:
  411. X_AMD64_BYTE_SWAP_H_ = 0 // byte_swap.h:37:1:
  412. X_AMD64_INT_CONST_H_ = 0 // int_const.h:33:1:
  413. X_AMD64_INT_LIMITS_H_ = 0 // int_limits.h:33:1:
  414. X_AMD64_INT_MWGWTYPES_H_ = 0 // int_mwgwtypes.h:33:1:
  415. X_AMD64_INT_TYPES_H_ = 0 // int_types.h:35:1:
  416. X_AMD64_WCHAR_LIMITS_H_ = 0 // wchar_limits.h:33:1:
  417. X_BIG_ENDIAN = 4321 // endian.h:44:1:
  418. X_BSD_INT16_T_ = 0 // types.h:65:1:
  419. X_BSD_INT32_T_ = 0 // types.h:75:1:
  420. X_BSD_INT64_T_ = 0 // types.h:85:1:
  421. X_BSD_INT8_T_ = 0 // types.h:55:1:
  422. X_BSD_INTPTR_T_ = 0 // stdint.h:80:1:
  423. X_BSD_UINT16_T_ = 0 // types.h:70:1:
  424. X_BSD_UINT32_T_ = 0 // in.h:52:1:
  425. X_BSD_UINT64_T_ = 0 // types.h:90:1:
  426. X_BSD_UINT8_T_ = 0 // in.h:47:1:
  427. X_BSD_UINTPTR_T_ = 0 // stdint.h:85:1:
  428. X_BYTE_ORDER = 1234 // endian_machdep.h:3:1:
  429. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  430. X_LIB_PTHREAD_TYPES_H = 0 // pthread_types.h:33:1:
  431. X_LITTLE_ENDIAN = 1234 // endian.h:43:1:
  432. X_LP64 = 1 // <predefined>:268:1:
  433. X_NETBSD_SOURCE = 1 // featuretest.h:70:1:
  434. X_NETINET6_IN6_H_ = 0 // in6.h:65:1:
  435. X_NETINET_IN_H_ = 0 // in.h:40:1:
  436. X_PDP_ENDIAN = 3412 // endian.h:45:1:
  437. X_PT_BARRIERATTR_DEAD = 0xDEAD0808 // pthread_types.h:278:1:
  438. X_PT_BARRIERATTR_MAGIC = 0x88880808 // pthread_types.h:277:1:
  439. X_PT_BARRIER_DEAD = 0xDEAD0008 // pthread_types.h:270:1:
  440. X_PT_BARRIER_MAGIC = 0x88880008 // pthread_types.h:269:1:
  441. X_PT_CONDATTR_DEAD = 0xDEAD0006 // pthread_types.h:197:1:
  442. X_PT_CONDATTR_MAGIC = 0x66660006 // pthread_types.h:196:1:
  443. X_PT_COND_DEAD = 0xDEAD0005 // pthread_types.h:182:1:
  444. X_PT_COND_MAGIC = 0x55550005 // pthread_types.h:181:1:
  445. X_PT_MUTEXATTR_DEAD = 0xDEAD0004 // pthread_types.h:167:1:
  446. X_PT_MUTEXATTR_MAGIC = 0x44440004 // pthread_types.h:166:1:
  447. X_PT_MUTEX_DEAD = 0xDEAD0003 // pthread_types.h:139:1:
  448. X_PT_MUTEX_MAGIC = 0x33330003 // pthread_types.h:138:1:
  449. X_PT_RWLOCKATTR_DEAD = 0xDEAD0909 // pthread_types.h:253:1:
  450. X_PT_RWLOCKATTR_MAGIC = 0x99990909 // pthread_types.h:252:1:
  451. X_PT_RWLOCK_DEAD = 0xDEAD0009 // pthread_types.h:236:1:
  452. X_PT_RWLOCK_MAGIC = 0x99990009 // pthread_types.h:235:1:
  453. X_PT_SPINLOCK_DEAD = 0xDEAD0007 // pthread_types.h:213:1:
  454. X_PT_SPINLOCK_MAGIC = 0x77770007 // pthread_types.h:212:1:
  455. X_PT_SPINLOCK_PSHARED = 0x00000001 // pthread_types.h:214:1:
  456. X_QUAD_HIGHWORD = 1 // endian.h:84:1:
  457. X_QUAD_LOWWORD = 0 // endian.h:85:1:
  458. X_SS_MAXSIZE = 128 // socket.h:294:1:
  459. X_SYS_ANSI_H_ = 0 // ansi.h:33:1:
  460. X_SYS_BSWAP_H_ = 0 // bswap.h:6:1:
  461. X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1:
  462. X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1:
  463. X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1:
  464. X_SYS_COMMON_INT_LIMITS_H_ = 0 // common_int_limits.h:33:1:
  465. X_SYS_COMMON_INT_MWGWTYPES_H_ = 0 // common_int_mwgwtypes.h:33:1:
  466. X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1:
  467. X_SYS_ENDIAN_H_ = 0 // endian.h:35:1:
  468. X_SYS_FD_SET_H_ = 0 // fd_set.h:35:1:
  469. X_SYS_SIGTYPES_H_ = 0 // sigtypes.h:40:1:
  470. X_SYS_SOCKET_H_ = 0 // socket.h:64:1:
  471. X_SYS_STDINT_H_ = 0 // stdint.h:33:1:
  472. X_SYS_TYPES_H_ = 0 // types.h:40:1:
  473. X_SYS_UIO_H_ = 0 // uio.h:35:1:
  474. X_X86_64_BSWAP_H_ = 0 // bswap.h:6:1:
  475. X_X86_64_CDEFS_H_ = 0 // cdefs.h:4:1:
  476. X_X86_64_TYPES_H_ = 0 // types.h:35:1:
  477. Pseudo_AF_HDRCMPLT = 30 // socket.h:240:1:
  478. Pseudo_AF_KEY = 29 // socket.h:239:1:
  479. Pseudo_AF_PIP = 25 // socket.h:232:1:
  480. Pseudo_AF_RTIP = 22 // socket.h:227:1:
  481. Pseudo_AF_XTP = 19 // socket.h:222:1:
  482. )
  483. // file offset
  484. const ( /* uio.h:69:1: */
  485. UIO_READ = 0
  486. UIO_WRITE = 1
  487. )
  488. // Segment flag values.
  489. const ( /* uio.h:72:1: */
  490. UIO_USERSPACE = 0 // from user data space
  491. UIO_SYSSPACE = 1
  492. )
  493. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  494. type Size_t = uint64 /* <builtin>:9:23 */
  495. type Wchar_t = int32 /* <builtin>:15:24 */
  496. type X__int128_t = struct {
  497. Flo int64
  498. Fhi int64
  499. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  500. type X__uint128_t = struct {
  501. Flo uint64
  502. Fhi uint64
  503. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  504. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  505. type X__float128 = float64 /* <builtin>:47:21 */
  506. // $NetBSD: in.h,v 1.108 2018/11/09 11:46:28 maya Exp $
  507. // Copyright (c) 1982, 1986, 1990, 1993
  508. // The Regents of the University of California. All rights reserved.
  509. //
  510. // Redistribution and use in source and binary forms, with or without
  511. // modification, are permitted provided that the following conditions
  512. // are met:
  513. // 1. Redistributions of source code must retain the above copyright
  514. // notice, this list of conditions and the following disclaimer.
  515. // 2. Redistributions in binary form must reproduce the above copyright
  516. // notice, this list of conditions and the following disclaimer in the
  517. // documentation and/or other materials provided with the distribution.
  518. // 3. Neither the name of the University nor the names of its contributors
  519. // may be used to endorse or promote products derived from this software
  520. // without specific prior written permission.
  521. //
  522. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  523. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  524. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  525. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  526. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  527. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  528. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  529. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  530. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  531. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  532. // SUCH DAMAGE.
  533. //
  534. // @(#)in.h 8.3 (Berkeley) 1/3/94
  535. // Constants and structures defined by the internet system,
  536. // Per RFC 790, September 1981, and numerous additions.
  537. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  538. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  539. // Public domain.
  540. //
  541. // NOTE: Do not protect this header against multiple inclusion. Doing
  542. // so can have subtle side-effects due to header file inclusion order
  543. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  544. // protect each CPP macro that we want to supply.
  545. // Feature-test macros are defined by several standards, and allow an
  546. // application to specify what symbols they want the system headers to
  547. // expose, and hence what standard they want them to conform to.
  548. // There are two classes of feature-test macros. The first class
  549. // specify complete standards, and if one of these is defined, header
  550. // files will try to conform to the relevant standard. They are:
  551. //
  552. // ANSI macros:
  553. // _ANSI_SOURCE ANSI C89
  554. //
  555. // POSIX macros:
  556. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  557. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  558. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  559. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  560. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  561. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  562. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  563. //
  564. // X/Open macros:
  565. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  566. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  567. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  568. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  569. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  570. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  571. //
  572. // NetBSD macros:
  573. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  574. //
  575. // If more than one of these "major" feature-test macros is defined,
  576. // then the set of facilities provided (and namespace used) is the
  577. // union of that specified by the relevant standards, and in case of
  578. // conflict, the earlier standard in the above list has precedence (so
  579. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  580. // of rename() that's used is the POSIX one). If none of the "major"
  581. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  582. //
  583. // There are also "minor" feature-test macros, which enable extra
  584. // functionality in addition to some base standard. They should be
  585. // defined along with one of the "major" macros. The "minor" macros
  586. // are:
  587. //
  588. // _REENTRANT
  589. // _ISOC99_SOURCE
  590. // _ISOC11_SOURCE
  591. // _LARGEFILE_SOURCE Large File Support
  592. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  593. // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
  594. // -
  595. // Copyright (c) 1990 The Regents of the University of California.
  596. // All rights reserved.
  597. //
  598. // Redistribution and use in source and binary forms, with or without
  599. // modification, are permitted provided that the following conditions
  600. // are met:
  601. // 1. Redistributions of source code must retain the above copyright
  602. // notice, this list of conditions and the following disclaimer.
  603. // 2. Redistributions in binary form must reproduce the above copyright
  604. // notice, this list of conditions and the following disclaimer in the
  605. // documentation and/or other materials provided with the distribution.
  606. // 3. Neither the name of the University nor the names of its contributors
  607. // may be used to endorse or promote products derived from this software
  608. // without specific prior written permission.
  609. //
  610. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  611. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  612. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  613. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  614. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  615. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  616. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  617. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  618. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  619. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  620. // SUCH DAMAGE.
  621. //
  622. // from: @(#)types.h 7.5 (Berkeley) 3/9/91
  623. // $NetBSD: common_int_types.h,v 1.1 2014/07/25 21:43:13 joerg Exp $
  624. // -
  625. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  626. // All rights reserved.
  627. //
  628. // This code is derived from software contributed to The NetBSD Foundation
  629. // by Joerg Sonnenberger.
  630. //
  631. // Redistribution and use in source and binary forms, with or without
  632. // modification, are permitted provided that the following conditions
  633. // are met:
  634. // 1. Redistributions of source code must retain the above copyright
  635. // notice, this list of conditions and the following disclaimer.
  636. // 2. Redistributions in binary form must reproduce the above copyright
  637. // notice, this list of conditions and the following disclaimer in the
  638. // documentation and/or other materials provided with the distribution.
  639. //
  640. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  641. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  642. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  643. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  644. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  645. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  646. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  647. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  648. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  649. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  650. // POSSIBILITY OF SUCH DAMAGE.
  651. // 7.18.1 Integer types
  652. // 7.18.1.1 Exact-width integer types
  653. type X__int8_t = int8 /* common_int_types.h:45:27 */
  654. type X__uint8_t = uint8 /* common_int_types.h:46:27 */
  655. type X__int16_t = int16 /* common_int_types.h:47:27 */
  656. type X__uint16_t = uint16 /* common_int_types.h:48:27 */
  657. type X__int32_t = int32 /* common_int_types.h:49:27 */
  658. type X__uint32_t = uint32 /* common_int_types.h:50:27 */
  659. type X__int64_t = int64 /* common_int_types.h:51:27 */
  660. type X__uint64_t = uint64 /* common_int_types.h:52:27 */
  661. // 7.18.1.4 Integer types capable of holding object pointers
  662. type X__intptr_t = int64 /* common_int_types.h:58:27 */
  663. type X__uintptr_t = uint64 /* common_int_types.h:59:26 */
  664. type Uint8_t = X__uint8_t /* in.h:46:19 */
  665. type Uint32_t = X__uint32_t /* in.h:51:20 */
  666. // return true if value 'a' fits in type 't'
  667. // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
  668. // -
  669. // Copyright (c) 1990 The Regents of the University of California.
  670. // All rights reserved.
  671. //
  672. // Redistribution and use in source and binary forms, with or without
  673. // modification, are permitted provided that the following conditions
  674. // are met:
  675. // 1. Redistributions of source code must retain the above copyright
  676. // notice, this list of conditions and the following disclaimer.
  677. // 2. Redistributions in binary form must reproduce the above copyright
  678. // notice, this list of conditions and the following disclaimer in the
  679. // documentation and/or other materials provided with the distribution.
  680. // 3. Neither the name of the University nor the names of its contributors
  681. // may be used to endorse or promote products derived from this software
  682. // without specific prior written permission.
  683. //
  684. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  685. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  686. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  687. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  688. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  689. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  690. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  691. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  692. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  693. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  694. // SUCH DAMAGE.
  695. //
  696. // from: @(#)types.h 7.5 (Berkeley) 3/9/91
  697. // Types which are fundamental to the implementation and may appear in
  698. // more than one standard header are defined here. Standard headers
  699. // then use:
  700. // #ifdef _BSD_SIZE_T_
  701. // typedef _BSD_SIZE_T_ size_t;
  702. // #undef _BSD_SIZE_T_
  703. // #endif
  704. type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address
  705. type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id
  706. type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address
  707. type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number
  708. type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions
  709. type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset
  710. type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id
  711. type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family
  712. type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length
  713. type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id
  714. type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs)
  715. type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */
  716. type X__wctrans_t = uintptr /* ansi.h:51:32 */
  717. type X__wctype_t = uintptr /* ansi.h:54:31 */
  718. // mbstate_t is an opaque object to keep conversion state, during multibyte
  719. // stream conversions. The content must not be referenced by user programs.
  720. type X__mbstate_t = struct {
  721. F__mbstateL X__int64_t
  722. F__ccgo_pad1 [120]byte
  723. } /* ansi.h:63:3 */
  724. type X__va_list = X__builtin_va_list /* ansi.h:72:27 */
  725. type In_addr_t = X__in_addr_t /* in.h:58:21 */
  726. type In_port_t = X__in_port_t /* in.h:63:21 */
  727. type Sa_family_t = X__sa_family_t /* in.h:68:23 */
  728. // Protocols
  729. // last return value of *_input(), meaning "all job for this pkt is done".
  730. // sysctl placeholder for (FAST_)IPSEC
  731. // Local port number conventions:
  732. //
  733. // Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root),
  734. // unless a kernel is compiled with IPNOPRIVPORTS defined.
  735. //
  736. // When a user does a bind(2) or connect(2) with a port number of zero,
  737. // a non-conflicting local port address is chosen.
  738. //
  739. // The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although
  740. // that is settable by sysctl(3); net.inet.ip.anonportmin and
  741. // net.inet.ip.anonportmax respectively.
  742. //
  743. // A user may set the IPPROTO_IP option IP_PORTRANGE to change this
  744. // default assignment range.
  745. //
  746. // The value IP_PORTRANGE_DEFAULT causes the default behavior.
  747. //
  748. // The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT,
  749. // and exists only for FreeBSD compatibility purposes.
  750. //
  751. // The value IP_PORTRANGE_LOW changes the range to the "low" are
  752. // that is (by convention) restricted to privileged processes.
  753. // This convention is based on "vouchsafe" principles only.
  754. // It is only secure if you trust the remote host to restrict these ports.
  755. // The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX.
  756. // Internet address (a structure for historical reasons)
  757. type In_addr = struct{ Fs_addr X__in_addr_t } /* in.h:158:1 */
  758. // Definitions of bits in internet address integers.
  759. // On subnets, the decomposition of addresses to host and net parts
  760. // is done according to subnet mask, not the masks here.
  761. //
  762. // By byte-swapping the constants, we avoid ever having to byte-swap IP
  763. // addresses inside the kernel. Unfortunately, user-level programs rely
  764. // on these macros not doing byte-swapping.
  765. // These ones aren't really net and host fields, but routing needn't know.
  766. // Socket address, internet style.
  767. type Sockaddr_in = struct {
  768. Fsin_len Uint8_t
  769. Fsin_family X__sa_family_t
  770. Fsin_port X__in_port_t
  771. Fsin_addr struct{ Fs_addr X__in_addr_t }
  772. Fsin_zero [8]X__int8_t
  773. } /* in.h:241:1 */
  774. // Structure used to describe IP options.
  775. // Used to store options internally, to pass them to a process,
  776. // or to restore options retrieved earlier.
  777. // The ip_dst is used for the first-hop gateway when using a source route
  778. // (this gets put into the header proper).
  779. type Ip_opts = struct {
  780. Fip_dst struct{ Fs_addr X__in_addr_t }
  781. Fip_opts [40]X__int8_t
  782. } /* in.h:258:1 */
  783. // Options for use with [gs]etsockopt at the IP level.
  784. // First word of comment is data type; bool is stored in int.
  785. // The add and drop membership option numbers need to match with the v6 ones
  786. // Information sent in the control message of a datagram socket for
  787. // IP_PKTINFO and IP_RECVPKTINFO.
  788. type In_pktinfo = struct {
  789. Fipi_addr struct{ Fs_addr X__in_addr_t }
  790. Fipi_ifindex uint32
  791. } /* in.h:301:1 */
  792. // Defaults and limits for options
  793. // Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
  794. type Ip_mreq = struct {
  795. Fimr_multiaddr struct{ Fs_addr X__in_addr_t }
  796. Fimr_interface struct{ Fs_addr X__in_addr_t }
  797. } /* in.h:318:1 */
  798. // Argument for IP_PORTRANGE:
  799. // - which range to search when port is unspecified at bind() or connect()
  800. // Definitions for inet sysctl operations.
  801. //
  802. // Third level is protocol number.
  803. // Fourth level is desired variable within that protocol.
  804. // Names for IP sysctl objects
  805. // IPCTL_DEFMTU=4, never implemented
  806. // INET6 stuff
  807. // $NetBSD: in6.h,v 1.95.2.1 2019/09/06 19:43:00 martin Exp $
  808. // $KAME: in6.h,v 1.83 2001/03/29 02:55:07 jinmei Exp $
  809. // Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
  810. // All rights reserved.
  811. //
  812. // Redistribution and use in source and binary forms, with or without
  813. // modification, are permitted provided that the following conditions
  814. // are met:
  815. // 1. Redistributions of source code must retain the above copyright
  816. // notice, this list of conditions and the following disclaimer.
  817. // 2. Redistributions in binary form must reproduce the above copyright
  818. // notice, this list of conditions and the following disclaimer in the
  819. // documentation and/or other materials provided with the distribution.
  820. // 3. Neither the name of the project nor the names of its contributors
  821. // may be used to endorse or promote products derived from this software
  822. // without specific prior written permission.
  823. //
  824. // THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  825. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  826. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  827. // ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
  828. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  829. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  830. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  831. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  832. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  833. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  834. // SUCH DAMAGE.
  835. // Copyright (c) 1982, 1986, 1990, 1993
  836. // The Regents of the University of California. All rights reserved.
  837. //
  838. // Redistribution and use in source and binary forms, with or without
  839. // modification, are permitted provided that the following conditions
  840. // are met:
  841. // 1. Redistributions of source code must retain the above copyright
  842. // notice, this list of conditions and the following disclaimer.
  843. // 2. Redistributions in binary form must reproduce the above copyright
  844. // notice, this list of conditions and the following disclaimer in the
  845. // documentation and/or other materials provided with the distribution.
  846. // 3. Neither the name of the University nor the names of its contributors
  847. // may be used to endorse or promote products derived from this software
  848. // without specific prior written permission.
  849. //
  850. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  851. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  852. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  853. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  854. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  855. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  856. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  857. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  858. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  859. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  860. // SUCH DAMAGE.
  861. //
  862. // @(#)in.h 8.3 (Berkeley) 1/3/94
  863. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  864. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  865. // Public domain.
  866. //
  867. // NOTE: Do not protect this header against multiple inclusion. Doing
  868. // so can have subtle side-effects due to header file inclusion order
  869. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  870. // protect each CPP macro that we want to supply.
  871. // Feature-test macros are defined by several standards, and allow an
  872. // application to specify what symbols they want the system headers to
  873. // expose, and hence what standard they want them to conform to.
  874. // There are two classes of feature-test macros. The first class
  875. // specify complete standards, and if one of these is defined, header
  876. // files will try to conform to the relevant standard. They are:
  877. //
  878. // ANSI macros:
  879. // _ANSI_SOURCE ANSI C89
  880. //
  881. // POSIX macros:
  882. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  883. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  884. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  885. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  886. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  887. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  888. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  889. //
  890. // X/Open macros:
  891. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  892. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  893. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  894. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  895. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  896. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  897. //
  898. // NetBSD macros:
  899. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  900. //
  901. // If more than one of these "major" feature-test macros is defined,
  902. // then the set of facilities provided (and namespace used) is the
  903. // union of that specified by the relevant standards, and in case of
  904. // conflict, the earlier standard in the above list has precedence (so
  905. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  906. // of rename() that's used is the POSIX one). If none of the "major"
  907. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  908. //
  909. // There are also "minor" feature-test macros, which enable extra
  910. // functionality in addition to some base standard. They should be
  911. // defined along with one of the "major" macros. The "minor" macros
  912. // are:
  913. //
  914. // _REENTRANT
  915. // _ISOC99_SOURCE
  916. // _ISOC11_SOURCE
  917. // _LARGEFILE_SOURCE Large File Support
  918. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  919. // $NetBSD: socket.h,v 1.129 2018/11/04 16:30:29 christos Exp $
  920. // Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
  921. // All rights reserved.
  922. //
  923. // Redistribution and use in source and binary forms, with or without
  924. // modification, are permitted provided that the following conditions
  925. // are met:
  926. // 1. Redistributions of source code must retain the above copyright
  927. // notice, this list of conditions and the following disclaimer.
  928. // 2. Redistributions in binary form must reproduce the above copyright
  929. // notice, this list of conditions and the following disclaimer in the
  930. // documentation and/or other materials provided with the distribution.
  931. // 3. Neither the name of the project nor the names of its contributors
  932. // may be used to endorse or promote products derived from this software
  933. // without specific prior written permission.
  934. //
  935. // THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  936. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  937. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  938. // ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
  939. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  940. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  941. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  942. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  943. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  944. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  945. // SUCH DAMAGE.
  946. // Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
  947. // The Regents of the University of California. All rights reserved.
  948. //
  949. // Redistribution and use in source and binary forms, with or without
  950. // modification, are permitted provided that the following conditions
  951. // are met:
  952. // 1. Redistributions of source code must retain the above copyright
  953. // notice, this list of conditions and the following disclaimer.
  954. // 2. Redistributions in binary form must reproduce the above copyright
  955. // notice, this list of conditions and the following disclaimer in the
  956. // documentation and/or other materials provided with the distribution.
  957. // 3. Neither the name of the University nor the names of its contributors
  958. // may be used to endorse or promote products derived from this software
  959. // without specific prior written permission.
  960. //
  961. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  962. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  963. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  964. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  965. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  966. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  967. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  968. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  969. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  970. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  971. // SUCH DAMAGE.
  972. //
  973. // @(#)socket.h 8.6 (Berkeley) 5/3/95
  974. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  975. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  976. // Public domain.
  977. //
  978. // NOTE: Do not protect this header against multiple inclusion. Doing
  979. // so can have subtle side-effects due to header file inclusion order
  980. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  981. // protect each CPP macro that we want to supply.
  982. // Feature-test macros are defined by several standards, and allow an
  983. // application to specify what symbols they want the system headers to
  984. // expose, and hence what standard they want them to conform to.
  985. // There are two classes of feature-test macros. The first class
  986. // specify complete standards, and if one of these is defined, header
  987. // files will try to conform to the relevant standard. They are:
  988. //
  989. // ANSI macros:
  990. // _ANSI_SOURCE ANSI C89
  991. //
  992. // POSIX macros:
  993. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  994. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  995. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  996. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  997. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  998. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  999. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  1000. //
  1001. // X/Open macros:
  1002. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  1003. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  1004. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  1005. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  1006. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  1007. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  1008. //
  1009. // NetBSD macros:
  1010. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  1011. //
  1012. // If more than one of these "major" feature-test macros is defined,
  1013. // then the set of facilities provided (and namespace used) is the
  1014. // union of that specified by the relevant standards, and in case of
  1015. // conflict, the earlier standard in the above list has precedence (so
  1016. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  1017. // of rename() that's used is the POSIX one). If none of the "major"
  1018. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  1019. //
  1020. // There are also "minor" feature-test macros, which enable extra
  1021. // functionality in addition to some base standard. They should be
  1022. // defined along with one of the "major" macros. The "minor" macros
  1023. // are:
  1024. //
  1025. // _REENTRANT
  1026. // _ISOC99_SOURCE
  1027. // _ISOC11_SOURCE
  1028. // _LARGEFILE_SOURCE Large File Support
  1029. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  1030. // Definitions related to sockets: types, address families, options.
  1031. // Data types.
  1032. // $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $
  1033. // -
  1034. // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
  1035. // All rights reserved.
  1036. //
  1037. // This code is derived from software contributed to The NetBSD Foundation
  1038. // by Jun-ichiro itojun Hagino and by Klaus Klein.
  1039. //
  1040. // Redistribution and use in source and binary forms, with or without
  1041. // modification, are permitted provided that the following conditions
  1042. // are met:
  1043. // 1. Redistributions of source code must retain the above copyright
  1044. // notice, this list of conditions and the following disclaimer.
  1045. // 2. Redistributions in binary form must reproduce the above copyright
  1046. // notice, this list of conditions and the following disclaimer in the
  1047. // documentation and/or other materials provided with the distribution.
  1048. //
  1049. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  1050. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  1051. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  1052. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  1053. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  1054. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  1055. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  1056. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  1057. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  1058. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  1059. // POSSIBILITY OF SUCH DAMAGE.
  1060. type Socklen_t = X__socklen_t /* socket.h:83:21 */
  1061. type Ssize_t = int64 /* socket.h:95:23 */
  1062. // $NetBSD: uio.h,v 1.36 2011/07/27 13:20:07 uebayasi Exp $
  1063. // Copyright (c) 1982, 1986, 1993, 1994
  1064. // The Regents of the University of California. All rights reserved.
  1065. //
  1066. // Redistribution and use in source and binary forms, with or without
  1067. // modification, are permitted provided that the following conditions
  1068. // are met:
  1069. // 1. Redistributions of source code must retain the above copyright
  1070. // notice, this list of conditions and the following disclaimer.
  1071. // 2. Redistributions in binary form must reproduce the above copyright
  1072. // notice, this list of conditions and the following disclaimer in the
  1073. // documentation and/or other materials provided with the distribution.
  1074. // 3. Neither the name of the University nor the names of its contributors
  1075. // may be used to endorse or promote products derived from this software
  1076. // without specific prior written permission.
  1077. //
  1078. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1079. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1080. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1081. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1082. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1083. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1084. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1085. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1086. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1087. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1088. // SUCH DAMAGE.
  1089. //
  1090. // @(#)uio.h 8.5 (Berkeley) 2/22/94
  1091. // $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $
  1092. // $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $
  1093. // -
  1094. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  1095. // All rights reserved.
  1096. //
  1097. // This code is derived from software contributed to The NetBSD Foundation
  1098. // by Matt Thomas of 3am Software Foundry.
  1099. //
  1100. // Redistribution and use in source and binary forms, with or without
  1101. // modification, are permitted provided that the following conditions
  1102. // are met:
  1103. // 1. Redistributions of source code must retain the above copyright
  1104. // notice, this list of conditions and the following disclaimer.
  1105. // 2. Redistributions in binary form must reproduce the above copyright
  1106. // notice, this list of conditions and the following disclaimer in the
  1107. // documentation and/or other materials provided with the distribution.
  1108. //
  1109. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  1110. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  1111. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  1112. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  1113. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  1114. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  1115. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  1116. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  1117. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  1118. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  1119. // POSSIBILITY OF SUCH DAMAGE.
  1120. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  1121. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  1122. // Public domain.
  1123. //
  1124. // NOTE: Do not protect this header against multiple inclusion. Doing
  1125. // so can have subtle side-effects due to header file inclusion order
  1126. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  1127. // protect each CPP macro that we want to supply.
  1128. // Feature-test macros are defined by several standards, and allow an
  1129. // application to specify what symbols they want the system headers to
  1130. // expose, and hence what standard they want them to conform to.
  1131. // There are two classes of feature-test macros. The first class
  1132. // specify complete standards, and if one of these is defined, header
  1133. // files will try to conform to the relevant standard. They are:
  1134. //
  1135. // ANSI macros:
  1136. // _ANSI_SOURCE ANSI C89
  1137. //
  1138. // POSIX macros:
  1139. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  1140. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  1141. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  1142. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  1143. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  1144. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  1145. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  1146. //
  1147. // X/Open macros:
  1148. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  1149. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  1150. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  1151. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  1152. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  1153. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  1154. //
  1155. // NetBSD macros:
  1156. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  1157. //
  1158. // If more than one of these "major" feature-test macros is defined,
  1159. // then the set of facilities provided (and namespace used) is the
  1160. // union of that specified by the relevant standards, and in case of
  1161. // conflict, the earlier standard in the above list has precedence (so
  1162. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  1163. // of rename() that's used is the POSIX one). If none of the "major"
  1164. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  1165. //
  1166. // There are also "minor" feature-test macros, which enable extra
  1167. // functionality in addition to some base standard. They should be
  1168. // defined along with one of the "major" macros. The "minor" macros
  1169. // are:
  1170. //
  1171. // _REENTRANT
  1172. // _ISOC99_SOURCE
  1173. // _ISOC11_SOURCE
  1174. // _LARGEFILE_SOURCE Large File Support
  1175. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  1176. type Iovec = struct {
  1177. Fiov_base uintptr
  1178. Fiov_len Size_t
  1179. } /* uio.h:56:1 */
  1180. // $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $
  1181. // -
  1182. // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
  1183. // All rights reserved.
  1184. //
  1185. // This code is derived from software contributed to The NetBSD Foundation
  1186. // by Jun-ichiro itojun Hagino and by Klaus Klein.
  1187. //
  1188. // Redistribution and use in source and binary forms, with or without
  1189. // modification, are permitted provided that the following conditions
  1190. // are met:
  1191. // 1. Redistributions of source code must retain the above copyright
  1192. // notice, this list of conditions and the following disclaimer.
  1193. // 2. Redistributions in binary form must reproduce the above copyright
  1194. // notice, this list of conditions and the following disclaimer in the
  1195. // documentation and/or other materials provided with the distribution.
  1196. //
  1197. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  1198. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  1199. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  1200. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  1201. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  1202. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  1203. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  1204. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  1205. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  1206. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  1207. // POSSIBILITY OF SUCH DAMAGE.
  1208. type Off_t = X__off_t /* uio.h:65:18 */
  1209. // $NetBSD: sigtypes.h,v 1.11 2017/01/12 18:29:14 christos Exp $
  1210. // Copyright (c) 1982, 1986, 1989, 1991, 1993
  1211. // The Regents of the University of California. All rights reserved.
  1212. // (c) UNIX System Laboratories, Inc.
  1213. // All or some portions of this file are derived from material licensed
  1214. // to the University of California by American Telephone and Telegraph
  1215. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  1216. // the permission of UNIX System Laboratories, Inc.
  1217. //
  1218. // Redistribution and use in source and binary forms, with or without
  1219. // modification, are permitted provided that the following conditions
  1220. // are met:
  1221. // 1. Redistributions of source code must retain the above copyright
  1222. // notice, this list of conditions and the following disclaimer.
  1223. // 2. Redistributions in binary form must reproduce the above copyright
  1224. // notice, this list of conditions and the following disclaimer in the
  1225. // documentation and/or other materials provided with the distribution.
  1226. // 3. Neither the name of the University nor the names of its contributors
  1227. // may be used to endorse or promote products derived from this software
  1228. // without specific prior written permission.
  1229. //
  1230. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1231. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1232. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1233. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1234. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1235. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1236. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1237. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1238. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1239. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1240. // SUCH DAMAGE.
  1241. //
  1242. // @(#)signal.h 8.4 (Berkeley) 5/4/95
  1243. // This header file defines various signal-related types. We also keep
  1244. // the macros to manipulate sigset_t here, to encapsulate knowledge of
  1245. // its internals.
  1246. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  1247. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  1248. // Public domain.
  1249. //
  1250. // NOTE: Do not protect this header against multiple inclusion. Doing
  1251. // so can have subtle side-effects due to header file inclusion order
  1252. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  1253. // protect each CPP macro that we want to supply.
  1254. // Feature-test macros are defined by several standards, and allow an
  1255. // application to specify what symbols they want the system headers to
  1256. // expose, and hence what standard they want them to conform to.
  1257. // There are two classes of feature-test macros. The first class
  1258. // specify complete standards, and if one of these is defined, header
  1259. // files will try to conform to the relevant standard. They are:
  1260. //
  1261. // ANSI macros:
  1262. // _ANSI_SOURCE ANSI C89
  1263. //
  1264. // POSIX macros:
  1265. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  1266. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  1267. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  1268. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  1269. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  1270. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  1271. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  1272. //
  1273. // X/Open macros:
  1274. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  1275. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  1276. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  1277. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  1278. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  1279. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  1280. //
  1281. // NetBSD macros:
  1282. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  1283. //
  1284. // If more than one of these "major" feature-test macros is defined,
  1285. // then the set of facilities provided (and namespace used) is the
  1286. // union of that specified by the relevant standards, and in case of
  1287. // conflict, the earlier standard in the above list has precedence (so
  1288. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  1289. // of rename() that's used is the POSIX one). If none of the "major"
  1290. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  1291. //
  1292. // There are also "minor" feature-test macros, which enable extra
  1293. // functionality in addition to some base standard. They should be
  1294. // defined along with one of the "major" macros. The "minor" macros
  1295. // are:
  1296. //
  1297. // _REENTRANT
  1298. // _ISOC99_SOURCE
  1299. // _ISOC11_SOURCE
  1300. // _LARGEFILE_SOURCE Large File Support
  1301. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  1302. // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
  1303. // -
  1304. // Copyright (c) 1990 The Regents of the University of California.
  1305. // All rights reserved.
  1306. //
  1307. // Redistribution and use in source and binary forms, with or without
  1308. // modification, are permitted provided that the following conditions
  1309. // are met:
  1310. // 1. Redistributions of source code must retain the above copyright
  1311. // notice, this list of conditions and the following disclaimer.
  1312. // 2. Redistributions in binary form must reproduce the above copyright
  1313. // notice, this list of conditions and the following disclaimer in the
  1314. // documentation and/or other materials provided with the distribution.
  1315. // 3. Neither the name of the University nor the names of its contributors
  1316. // may be used to endorse or promote products derived from this software
  1317. // without specific prior written permission.
  1318. //
  1319. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1320. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1321. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1322. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1323. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1324. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1325. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1326. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1327. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1328. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1329. // SUCH DAMAGE.
  1330. //
  1331. // from: @(#)types.h 7.5 (Berkeley) 3/9/91
  1332. // $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $
  1333. // $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $
  1334. // -
  1335. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  1336. // All rights reserved.
  1337. //
  1338. // This code is derived from software contributed to The NetBSD Foundation
  1339. // by Matt Thomas of 3am Software Foundry.
  1340. //
  1341. // Redistribution and use in source and binary forms, with or without
  1342. // modification, are permitted provided that the following conditions
  1343. // are met:
  1344. // 1. Redistributions of source code must retain the above copyright
  1345. // notice, this list of conditions and the following disclaimer.
  1346. // 2. Redistributions in binary form must reproduce the above copyright
  1347. // notice, this list of conditions and the following disclaimer in the
  1348. // documentation and/or other materials provided with the distribution.
  1349. //
  1350. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  1351. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  1352. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  1353. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  1354. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  1355. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  1356. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  1357. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  1358. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  1359. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  1360. // POSSIBILITY OF SUCH DAMAGE.
  1361. type Sigset_t = struct{ F__bits [4]X__uint32_t } /* sigtypes.h:62:3 */
  1362. // Macro for manipulating signal masks.
  1363. type Sigaltstack = struct {
  1364. Fss_sp uintptr
  1365. Fss_size Size_t
  1366. Fss_flags int32
  1367. F__ccgo_pad1 [4]byte
  1368. } /* sigtypes.h:108:9 */
  1369. // Macro for manipulating signal masks.
  1370. type Stack_t = Sigaltstack /* sigtypes.h:116:3 */
  1371. // Socket types.
  1372. // Option flags per-socket.
  1373. // SO_OTIMESTAMP 0x0400
  1374. // Allowed default option flags
  1375. // Additional options, not kept in so_options.
  1376. // SO_OSNDTIMEO 0x1005
  1377. // SO_ORCVTIMEO 0x1006
  1378. // Structure used for manipulating linger option.
  1379. type Linger = struct {
  1380. Fl_onoff int32
  1381. Fl_linger int32
  1382. } /* socket.h:182:1 */
  1383. type Accept_filter_arg = struct {
  1384. Faf_name [16]int8
  1385. Faf_arg [240]int8
  1386. } /* socket.h:187:1 */
  1387. // Level number for (get/set)sockopt() to apply to socket itself.
  1388. // Address families.
  1389. // Structure used by kernel to store most
  1390. // addresses.
  1391. type Sockaddr = struct {
  1392. Fsa_len X__uint8_t
  1393. Fsa_family X__sa_family_t
  1394. Fsa_data [14]int8
  1395. } /* socket.h:255:1 */
  1396. // RFC 2553: protocol-independent placeholder for socket addresses
  1397. type Sockaddr_storage = struct {
  1398. Fss_len X__uint8_t
  1399. Fss_family X__sa_family_t
  1400. F__ss_pad1 [6]int8
  1401. F__ss_align X__int64_t
  1402. F__ss_pad2 [112]int8
  1403. } /* socket.h:301:1 */
  1404. // Protocol families, same as address families for now.
  1405. type Pid_t = X__pid_t /* socket.h:366:18 */ // process id
  1406. type Gid_t = X__gid_t /* socket.h:371:18 */ // group id
  1407. type Uid_t = X__uid_t /* socket.h:376:18 */ // user id
  1408. // Socket credentials.
  1409. type Sockcred = struct {
  1410. Fsc_pid X__pid_t
  1411. Fsc_uid X__uid_t
  1412. Fsc_euid X__uid_t
  1413. Fsc_gid X__gid_t
  1414. Fsc_egid X__gid_t
  1415. Fsc_ngroups int32
  1416. Fsc_groups [1]X__gid_t
  1417. } /* socket.h:383:1 */
  1418. // Compute size of a sockcred structure with groups.
  1419. // Definition for CTL_NET PCB fetching sysctls
  1420. type Kinfo_pcb = struct {
  1421. Fki_pcbaddr X__uint64_t
  1422. Fki_ppcbaddr X__uint64_t
  1423. Fki_sockaddr X__uint64_t
  1424. Fki_family X__uint32_t
  1425. Fki_type X__uint32_t
  1426. Fki_protocol X__uint32_t
  1427. Fki_pflags X__uint32_t
  1428. Fki_sostate X__uint32_t
  1429. Fki_prstate X__uint32_t
  1430. Fki_tstate X__int32_t
  1431. Fki_tflags X__uint32_t
  1432. Fki_rcvq X__uint64_t
  1433. Fki_sndq X__uint64_t
  1434. Fki_s struct {
  1435. F_kis_src struct {
  1436. Fsa_len X__uint8_t
  1437. Fsa_family X__sa_family_t
  1438. Fsa_data [14]int8
  1439. }
  1440. F__ccgo_pad1 [248]byte
  1441. }
  1442. Fki_d struct {
  1443. F_kid_dst struct {
  1444. Fsa_len X__uint8_t
  1445. Fsa_family X__sa_family_t
  1446. Fsa_data [14]int8
  1447. }
  1448. F__ccgo_pad1 [248]byte
  1449. }
  1450. Fki_inode X__uint64_t
  1451. Fki_vnode X__uint64_t
  1452. Fki_conn X__uint64_t
  1453. Fki_refs X__uint64_t
  1454. Fki_nextref X__uint64_t
  1455. } /* socket.h:404:1 */
  1456. // PF_ROUTE - Routing table
  1457. //
  1458. // Three additional levels are defined:
  1459. // Fourth: address family, 0 is wildcard
  1460. // Fifth: type of info, defined below
  1461. // Sixth: flag(s) to mask with for NET_RT_FLAGS
  1462. // Maximum queue length specifiable by listen(2).
  1463. // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  1464. // * Copyright (c) 1991, 1993
  1465. // The Regents of the University of California. All rights reserved.
  1466. //
  1467. // This code is derived from software contributed to Berkeley by
  1468. // Berkeley Software Design, Inc.
  1469. //
  1470. // Redistribution and use in source and binary forms, with or without
  1471. // modification, are permitted provided that the following conditions
  1472. // are met:
  1473. // 1. Redistributions of source code must retain the above copyright
  1474. // notice, this list of conditions and the following disclaimer.
  1475. // 2. Redistributions in binary form must reproduce the above copyright
  1476. // notice, this list of conditions and the following disclaimer in the
  1477. // documentation and/or other materials provided with the distribution.
  1478. // 3. Neither the name of the University nor the names of its contributors
  1479. // may be used to endorse or promote products derived from this software
  1480. // without specific prior written permission.
  1481. //
  1482. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1483. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1484. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1485. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1486. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1487. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1488. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1489. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1490. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1491. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1492. // SUCH DAMAGE.
  1493. //
  1494. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  1495. // Message header for recvmsg and sendmsg calls.
  1496. // Used value-result for recvmsg, value only for sendmsg.
  1497. type Msghdr = struct {
  1498. Fmsg_name uintptr
  1499. Fmsg_namelen X__socklen_t
  1500. F__ccgo_pad1 [4]byte
  1501. Fmsg_iov uintptr
  1502. Fmsg_iovlen int32
  1503. F__ccgo_pad2 [4]byte
  1504. Fmsg_control uintptr
  1505. Fmsg_controllen X__socklen_t
  1506. Fmsg_flags int32
  1507. } /* socket.h:479:1 */
  1508. type Mmsghdr = struct {
  1509. Fmsg_hdr struct {
  1510. Fmsg_name uintptr
  1511. Fmsg_namelen X__socklen_t
  1512. F__ccgo_pad1 [4]byte
  1513. Fmsg_iov uintptr
  1514. Fmsg_iovlen int32
  1515. F__ccgo_pad2 [4]byte
  1516. Fmsg_control uintptr
  1517. Fmsg_controllen X__socklen_t
  1518. Fmsg_flags int32
  1519. }
  1520. Fmsg_len uint32
  1521. F__ccgo_pad1 [4]byte
  1522. } /* socket.h:506:1 */
  1523. // Extra flags used internally only
  1524. // Header for ancillary data objects in msg_control buffer.
  1525. // Used for additional information with/about a datagram
  1526. // not expressible by flags. The format is a sequence
  1527. // of message elements headed by cmsghdr structures.
  1528. type Cmsghdr = struct {
  1529. Fcmsg_len X__socklen_t
  1530. Fcmsg_level int32
  1531. Fcmsg_type int32
  1532. } /* socket.h:525:1 */
  1533. // $NetBSD: endian.h,v 1.30 2016/02/27 21:37:35 christos Exp $
  1534. // Copyright (c) 1987, 1991, 1993
  1535. // The Regents of the University of California. All rights reserved.
  1536. //
  1537. // Redistribution and use in source and binary forms, with or without
  1538. // modification, are permitted provided that the following conditions
  1539. // are met:
  1540. // 1. Redistributions of source code must retain the above copyright
  1541. // notice, this list of conditions and the following disclaimer.
  1542. // 2. Redistributions in binary form must reproduce the above copyright
  1543. // notice, this list of conditions and the following disclaimer in the
  1544. // documentation and/or other materials provided with the distribution.
  1545. // 3. Neither the name of the University nor the names of its contributors
  1546. // may be used to endorse or promote products derived from this software
  1547. // without specific prior written permission.
  1548. //
  1549. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1550. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1551. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1552. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1553. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1554. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1555. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1556. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1557. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1558. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1559. // SUCH DAMAGE.
  1560. //
  1561. // @(#)endian.h 8.1 (Berkeley) 6/11/93
  1562. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  1563. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  1564. // Public domain.
  1565. //
  1566. // NOTE: Do not protect this header against multiple inclusion. Doing
  1567. // so can have subtle side-effects due to header file inclusion order
  1568. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  1569. // protect each CPP macro that we want to supply.
  1570. // Feature-test macros are defined by several standards, and allow an
  1571. // application to specify what symbols they want the system headers to
  1572. // expose, and hence what standard they want them to conform to.
  1573. // There are two classes of feature-test macros. The first class
  1574. // specify complete standards, and if one of these is defined, header
  1575. // files will try to conform to the relevant standard. They are:
  1576. //
  1577. // ANSI macros:
  1578. // _ANSI_SOURCE ANSI C89
  1579. //
  1580. // POSIX macros:
  1581. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  1582. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  1583. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  1584. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  1585. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  1586. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  1587. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  1588. //
  1589. // X/Open macros:
  1590. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  1591. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  1592. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  1593. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  1594. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  1595. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  1596. //
  1597. // NetBSD macros:
  1598. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  1599. //
  1600. // If more than one of these "major" feature-test macros is defined,
  1601. // then the set of facilities provided (and namespace used) is the
  1602. // union of that specified by the relevant standards, and in case of
  1603. // conflict, the earlier standard in the above list has precedence (so
  1604. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  1605. // of rename() that's used is the POSIX one). If none of the "major"
  1606. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  1607. //
  1608. // There are also "minor" feature-test macros, which enable extra
  1609. // functionality in addition to some base standard. They should be
  1610. // defined along with one of the "major" macros. The "minor" macros
  1611. // are:
  1612. //
  1613. // _REENTRANT
  1614. // _ISOC99_SOURCE
  1615. // _ISOC11_SOURCE
  1616. // _LARGEFILE_SOURCE Large File Support
  1617. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  1618. // Definitions for byte order, according to byte significance from low
  1619. // address to high.
  1620. // C-family endian-ness definitions
  1621. // $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $
  1622. // -
  1623. // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
  1624. // All rights reserved.
  1625. //
  1626. // This code is derived from software contributed to The NetBSD Foundation
  1627. // by Jun-ichiro itojun Hagino and by Klaus Klein.
  1628. //
  1629. // Redistribution and use in source and binary forms, with or without
  1630. // modification, are permitted provided that the following conditions
  1631. // are met:
  1632. // 1. Redistributions of source code must retain the above copyright
  1633. // notice, this list of conditions and the following disclaimer.
  1634. // 2. Redistributions in binary form must reproduce the above copyright
  1635. // notice, this list of conditions and the following disclaimer in the
  1636. // documentation and/or other materials provided with the distribution.
  1637. //
  1638. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  1639. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  1640. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  1641. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  1642. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  1643. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  1644. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  1645. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  1646. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  1647. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  1648. // POSSIBILITY OF SUCH DAMAGE.
  1649. // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  1650. // * Copyright (c) 1991, 1993
  1651. // The Regents of the University of California. All rights reserved.
  1652. //
  1653. // This code is derived from software contributed to Berkeley by
  1654. // Berkeley Software Design, Inc.
  1655. //
  1656. // Redistribution and use in source and binary forms, with or without
  1657. // modification, are permitted provided that the following conditions
  1658. // are met:
  1659. // 1. Redistributions of source code must retain the above copyright
  1660. // notice, this list of conditions and the following disclaimer.
  1661. // 2. Redistributions in binary form must reproduce the above copyright
  1662. // notice, this list of conditions and the following disclaimer in the
  1663. // documentation and/or other materials provided with the distribution.
  1664. // 3. Neither the name of the University nor the names of its contributors
  1665. // may be used to endorse or promote products derived from this software
  1666. // without specific prior written permission.
  1667. //
  1668. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1669. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1670. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1671. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1672. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1673. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1674. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1675. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1676. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1677. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1678. // SUCH DAMAGE.
  1679. //
  1680. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  1681. // $NetBSD: types.h,v 1.102 2018/11/06 16:26:44 maya Exp $
  1682. // -
  1683. // Copyright (c) 1982, 1986, 1991, 1993, 1994
  1684. // The Regents of the University of California. All rights reserved.
  1685. // (c) UNIX System Laboratories, Inc.
  1686. // All or some portions of this file are derived from material licensed
  1687. // to the University of California by American Telephone and Telegraph
  1688. // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  1689. // the permission of UNIX System Laboratories, Inc.
  1690. //
  1691. // Redistribution and use in source and binary forms, with or without
  1692. // modification, are permitted provided that the following conditions
  1693. // are met:
  1694. // 1. Redistributions of source code must retain the above copyright
  1695. // notice, this list of conditions and the following disclaimer.
  1696. // 2. Redistributions in binary form must reproduce the above copyright
  1697. // notice, this list of conditions and the following disclaimer in the
  1698. // documentation and/or other materials provided with the distribution.
  1699. // 3. Neither the name of the University nor the names of its contributors
  1700. // may be used to endorse or promote products derived from this software
  1701. // without specific prior written permission.
  1702. //
  1703. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1704. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1705. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1706. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1707. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1708. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1709. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1710. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1711. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1712. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1713. // SUCH DAMAGE.
  1714. //
  1715. // @(#)types.h 8.4 (Berkeley) 1/21/94
  1716. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  1717. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  1718. // Public domain.
  1719. //
  1720. // NOTE: Do not protect this header against multiple inclusion. Doing
  1721. // so can have subtle side-effects due to header file inclusion order
  1722. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  1723. // protect each CPP macro that we want to supply.
  1724. // Feature-test macros are defined by several standards, and allow an
  1725. // application to specify what symbols they want the system headers to
  1726. // expose, and hence what standard they want them to conform to.
  1727. // There are two classes of feature-test macros. The first class
  1728. // specify complete standards, and if one of these is defined, header
  1729. // files will try to conform to the relevant standard. They are:
  1730. //
  1731. // ANSI macros:
  1732. // _ANSI_SOURCE ANSI C89
  1733. //
  1734. // POSIX macros:
  1735. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  1736. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  1737. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  1738. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  1739. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  1740. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  1741. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  1742. //
  1743. // X/Open macros:
  1744. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  1745. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  1746. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  1747. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  1748. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  1749. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  1750. //
  1751. // NetBSD macros:
  1752. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  1753. //
  1754. // If more than one of these "major" feature-test macros is defined,
  1755. // then the set of facilities provided (and namespace used) is the
  1756. // union of that specified by the relevant standards, and in case of
  1757. // conflict, the earlier standard in the above list has precedence (so
  1758. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  1759. // of rename() that's used is the POSIX one). If none of the "major"
  1760. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  1761. //
  1762. // There are also "minor" feature-test macros, which enable extra
  1763. // functionality in addition to some base standard. They should be
  1764. // defined along with one of the "major" macros. The "minor" macros
  1765. // are:
  1766. //
  1767. // _REENTRANT
  1768. // _ISOC99_SOURCE
  1769. // _ISOC11_SOURCE
  1770. // _LARGEFILE_SOURCE Large File Support
  1771. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  1772. // Machine type dependent parameters.
  1773. // $NetBSD: types.h,v 1.60 2019/04/06 03:06:24 thorpej Exp $
  1774. // -
  1775. // Copyright (c) 1990 The Regents of the University of California.
  1776. // All rights reserved.
  1777. //
  1778. // Redistribution and use in source and binary forms, with or without
  1779. // modification, are permitted provided that the following conditions
  1780. // are met:
  1781. // 1. Redistributions of source code must retain the above copyright
  1782. // notice, this list of conditions and the following disclaimer.
  1783. // 2. Redistributions in binary form must reproduce the above copyright
  1784. // notice, this list of conditions and the following disclaimer in the
  1785. // documentation and/or other materials provided with the distribution.
  1786. // 3. Neither the name of the University nor the names of its contributors
  1787. // may be used to endorse or promote products derived from this software
  1788. // without specific prior written permission.
  1789. //
  1790. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1791. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1792. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1793. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1794. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1795. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1796. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1797. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1798. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1799. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1800. // SUCH DAMAGE.
  1801. //
  1802. // @(#)types.h 7.5 (Berkeley) 3/9/91
  1803. // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  1804. // * Copyright (c) 1991, 1993
  1805. // The Regents of the University of California. All rights reserved.
  1806. //
  1807. // This code is derived from software contributed to Berkeley by
  1808. // Berkeley Software Design, Inc.
  1809. //
  1810. // Redistribution and use in source and binary forms, with or without
  1811. // modification, are permitted provided that the following conditions
  1812. // are met:
  1813. // 1. Redistributions of source code must retain the above copyright
  1814. // notice, this list of conditions and the following disclaimer.
  1815. // 2. Redistributions in binary form must reproduce the above copyright
  1816. // notice, this list of conditions and the following disclaimer in the
  1817. // documentation and/or other materials provided with the distribution.
  1818. // 3. Neither the name of the University nor the names of its contributors
  1819. // may be used to endorse or promote products derived from this software
  1820. // without specific prior written permission.
  1821. //
  1822. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1823. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1824. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1825. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1826. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1827. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1828. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1829. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1830. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1831. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1832. // SUCH DAMAGE.
  1833. //
  1834. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  1835. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  1836. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  1837. // Public domain.
  1838. //
  1839. // NOTE: Do not protect this header against multiple inclusion. Doing
  1840. // so can have subtle side-effects due to header file inclusion order
  1841. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  1842. // protect each CPP macro that we want to supply.
  1843. // Feature-test macros are defined by several standards, and allow an
  1844. // application to specify what symbols they want the system headers to
  1845. // expose, and hence what standard they want them to conform to.
  1846. // There are two classes of feature-test macros. The first class
  1847. // specify complete standards, and if one of these is defined, header
  1848. // files will try to conform to the relevant standard. They are:
  1849. //
  1850. // ANSI macros:
  1851. // _ANSI_SOURCE ANSI C89
  1852. //
  1853. // POSIX macros:
  1854. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  1855. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  1856. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  1857. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  1858. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  1859. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  1860. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  1861. //
  1862. // X/Open macros:
  1863. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  1864. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  1865. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  1866. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  1867. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  1868. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  1869. //
  1870. // NetBSD macros:
  1871. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  1872. //
  1873. // If more than one of these "major" feature-test macros is defined,
  1874. // then the set of facilities provided (and namespace used) is the
  1875. // union of that specified by the relevant standards, and in case of
  1876. // conflict, the earlier standard in the above list has precedence (so
  1877. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  1878. // of rename() that's used is the POSIX one). If none of the "major"
  1879. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  1880. //
  1881. // There are also "minor" feature-test macros, which enable extra
  1882. // functionality in addition to some base standard. They should be
  1883. // defined along with one of the "major" macros. The "minor" macros
  1884. // are:
  1885. //
  1886. // _REENTRANT
  1887. // _ISOC99_SOURCE
  1888. // _ISOC11_SOURCE
  1889. // _LARGEFILE_SOURCE Large File Support
  1890. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  1891. // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
  1892. // -
  1893. // Copyright (c) 1990 The Regents of the University of California.
  1894. // All rights reserved.
  1895. //
  1896. // Redistribution and use in source and binary forms, with or without
  1897. // modification, are permitted provided that the following conditions
  1898. // are met:
  1899. // 1. Redistributions of source code must retain the above copyright
  1900. // notice, this list of conditions and the following disclaimer.
  1901. // 2. Redistributions in binary form must reproduce the above copyright
  1902. // notice, this list of conditions and the following disclaimer in the
  1903. // documentation and/or other materials provided with the distribution.
  1904. // 3. Neither the name of the University nor the names of its contributors
  1905. // may be used to endorse or promote products derived from this software
  1906. // without specific prior written permission.
  1907. //
  1908. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1909. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1910. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1911. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1912. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1913. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1914. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1915. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1916. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1917. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1918. // SUCH DAMAGE.
  1919. //
  1920. // from: @(#)types.h 7.5 (Berkeley) 3/9/91
  1921. type X__register_t = int64 /* types.h:68:19 */
  1922. type X__cpu_simple_lock_nv_t = uint8 /* types.h:69:24 */
  1923. // __cpu_simple_lock_t used to be a full word.
  1924. // The amd64 does not have strict alignment requirements.
  1925. // $NetBSD: ansi.h,v 1.11 2019/05/07 03:49:26 kamil Exp $
  1926. // $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $
  1927. // -
  1928. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  1929. // All rights reserved.
  1930. //
  1931. // This code is derived from software contributed to The NetBSD Foundation
  1932. // by Matt Thomas of 3am Software Foundry.
  1933. //
  1934. // Redistribution and use in source and binary forms, with or without
  1935. // modification, are permitted provided that the following conditions
  1936. // are met:
  1937. // 1. Redistributions of source code must retain the above copyright
  1938. // notice, this list of conditions and the following disclaimer.
  1939. // 2. Redistributions in binary form must reproduce the above copyright
  1940. // notice, this list of conditions and the following disclaimer in the
  1941. // documentation and/or other materials provided with the distribution.
  1942. //
  1943. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  1944. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  1945. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  1946. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  1947. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  1948. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  1949. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  1950. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  1951. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  1952. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  1953. // POSSIBILITY OF SUCH DAMAGE.
  1954. // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
  1955. // -
  1956. // Copyright (c) 1990 The Regents of the University of California.
  1957. // All rights reserved.
  1958. //
  1959. // Redistribution and use in source and binary forms, with or without
  1960. // modification, are permitted provided that the following conditions
  1961. // are met:
  1962. // 1. Redistributions of source code must retain the above copyright
  1963. // notice, this list of conditions and the following disclaimer.
  1964. // 2. Redistributions in binary form must reproduce the above copyright
  1965. // notice, this list of conditions and the following disclaimer in the
  1966. // documentation and/or other materials provided with the distribution.
  1967. // 3. Neither the name of the University nor the names of its contributors
  1968. // may be used to endorse or promote products derived from this software
  1969. // without specific prior written permission.
  1970. //
  1971. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1972. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1973. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1974. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1975. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1976. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1977. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1978. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1979. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1980. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1981. // SUCH DAMAGE.
  1982. //
  1983. // from: @(#)types.h 7.5 (Berkeley) 3/9/91
  1984. // $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $
  1985. // -
  1986. // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
  1987. // All rights reserved.
  1988. //
  1989. // This code is derived from software contributed to The NetBSD Foundation
  1990. // by Jun-ichiro itojun Hagino and by Klaus Klein.
  1991. //
  1992. // Redistribution and use in source and binary forms, with or without
  1993. // modification, are permitted provided that the following conditions
  1994. // are met:
  1995. // 1. Redistributions of source code must retain the above copyright
  1996. // notice, this list of conditions and the following disclaimer.
  1997. // 2. Redistributions in binary form must reproduce the above copyright
  1998. // notice, this list of conditions and the following disclaimer in the
  1999. // documentation and/or other materials provided with the distribution.
  2000. //
  2001. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  2002. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  2003. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  2004. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  2005. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  2006. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  2007. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  2008. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  2009. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  2010. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  2011. // POSSIBILITY OF SUCH DAMAGE.
  2012. type Int8_t = X__int8_t /* types.h:54:18 */
  2013. type Int16_t = X__int16_t /* types.h:64:19 */
  2014. type Uint16_t = X__uint16_t /* types.h:69:20 */
  2015. type Int32_t = X__int32_t /* types.h:74:19 */
  2016. type Int64_t = X__int64_t /* types.h:84:19 */
  2017. type Uint64_t = X__uint64_t /* types.h:89:20 */
  2018. type U_int8_t = Uint8_t /* types.h:93:18 */
  2019. type U_int16_t = Uint16_t /* types.h:94:18 */
  2020. type U_int32_t = Uint32_t /* types.h:95:18 */
  2021. type U_int64_t = Uint64_t /* types.h:96:18 */
  2022. // $NetBSD: endian.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $
  2023. // $NetBSD: endian.h,v 1.30 2016/02/27 21:37:35 christos Exp $
  2024. // Copyright (c) 1987, 1991, 1993
  2025. // The Regents of the University of California. All rights reserved.
  2026. //
  2027. // Redistribution and use in source and binary forms, with or without
  2028. // modification, are permitted provided that the following conditions
  2029. // are met:
  2030. // 1. Redistributions of source code must retain the above copyright
  2031. // notice, this list of conditions and the following disclaimer.
  2032. // 2. Redistributions in binary form must reproduce the above copyright
  2033. // notice, this list of conditions and the following disclaimer in the
  2034. // documentation and/or other materials provided with the distribution.
  2035. // 3. Neither the name of the University nor the names of its contributors
  2036. // may be used to endorse or promote products derived from this software
  2037. // without specific prior written permission.
  2038. //
  2039. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2040. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2041. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2042. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2043. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2044. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2045. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2046. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2047. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2048. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2049. // SUCH DAMAGE.
  2050. //
  2051. // @(#)endian.h 8.1 (Berkeley) 6/11/93
  2052. type U_char = uint8 /* types.h:101:23 */
  2053. type U_short = uint16 /* types.h:102:24 */
  2054. type U_int = uint32 /* types.h:103:22 */
  2055. type U_long = uint64 /* types.h:104:23 */
  2056. type Unchar = uint8 /* types.h:106:23 */ // Sys V compatibility
  2057. type Ushort = uint16 /* types.h:107:24 */ // Sys V compatibility
  2058. type Uint = uint32 /* types.h:108:22 */ // Sys V compatibility
  2059. type Ulong = uint64 /* types.h:109:23 */ // Sys V compatibility
  2060. type U_quad_t = Uint64_t /* types.h:112:18 */ // quads
  2061. type Quad_t = Int64_t /* types.h:113:18 */
  2062. type Qaddr_t = uintptr /* types.h:114:16 */
  2063. // The types longlong_t and u_longlong_t exist for use with the
  2064. // Sun-derived XDR routines involving these types, and their usage
  2065. // in other contexts is discouraged. Further note that these types
  2066. // may not be equivalent to "long long" and "unsigned long long",
  2067. // they are only guaranteed to be signed and unsigned 64-bit types
  2068. // respectively. Portable programs that need 64-bit types should use
  2069. // the C99 types int64_t and uint64_t instead.
  2070. type Longlong_t = Int64_t /* types.h:126:18 */ // for XDR
  2071. type U_longlong_t = Uint64_t /* types.h:127:18 */ // for XDR
  2072. type Blkcnt_t = Int64_t /* types.h:129:18 */ // fs block count
  2073. type Blksize_t = Int32_t /* types.h:130:18 */ // fs optimal block size
  2074. type Fsblkcnt_t = X__fsblkcnt_t /* types.h:133:22 */ // fs block count (statvfs)
  2075. type Fsfilcnt_t = X__fsfilcnt_t /* types.h:138:22 */ // fs file count
  2076. // We don't and shouldn't use caddr_t in the kernel anymore
  2077. type Caddr_t = X__caddr_t /* types.h:145:19 */ // core address
  2078. type Daddr_t = Int64_t /* types.h:154:18 */ // disk address
  2079. type Dev_t = Uint64_t /* types.h:157:18 */ // device number
  2080. type Fixpt_t = Uint32_t /* types.h:158:18 */ // fixed point number
  2081. type Id_t = Uint32_t /* types.h:165:18 */ // group id, process id or user id
  2082. type Ino_t = Uint64_t /* types.h:166:18 */ // inode number
  2083. type Key_t = int64 /* types.h:167:15 */ // IPC key (for Sys V IPC)
  2084. type Mode_t = X__mode_t /* types.h:170:18 */ // permissions
  2085. type Nlink_t = Uint32_t /* types.h:174:18 */ // link count
  2086. type Lwpid_t = Int32_t /* types.h:185:18 */ // LWP id
  2087. type Rlim_t = Uint64_t /* types.h:186:18 */ // resource limit
  2088. type Segsz_t = Int32_t /* types.h:187:18 */ // segment size
  2089. type Swblk_t = Int32_t /* types.h:188:18 */ // swap offset
  2090. type Mqd_t = int32 /* types.h:195:14 */
  2091. type Cpuid_t = uint64 /* types.h:197:23 */
  2092. type Psetid_t = int32 /* types.h:199:14 */
  2093. type X__cpu_simple_lock_t = X__cpu_simple_lock_nv_t /* types.h:201:41 */
  2094. // Major, minor numbers, dev_t's.
  2095. type X__devmajor_t = Int32_t /* types.h:255:17 */
  2096. type X__devminor_t = Int32_t /* types.h:255:31 */
  2097. type Clock_t = uint32 /* types.h:268:24 */
  2098. type Time_t = X__int64_t /* types.h:289:23 */
  2099. type Clockid_t = int32 /* types.h:294:26 */
  2100. type Timer_t = int32 /* types.h:299:24 */
  2101. type Suseconds_t = int32 /* types.h:304:27 */
  2102. type Useconds_t = uint32 /* types.h:309:26 */
  2103. // $NetBSD: fd_set.h,v 1.7 2018/06/24 12:05:40 kamil Exp $
  2104. // -
  2105. // Copyright (c) 1992, 1993
  2106. // The Regents of the University of California. All rights reserved.
  2107. //
  2108. // Redistribution and use in source and binary forms, with or without
  2109. // modification, are permitted provided that the following conditions
  2110. // are met:
  2111. // 1. Redistributions of source code must retain the above copyright
  2112. // notice, this list of conditions and the following disclaimer.
  2113. // 2. Redistributions in binary form must reproduce the above copyright
  2114. // notice, this list of conditions and the following disclaimer in the
  2115. // documentation and/or other materials provided with the distribution.
  2116. // 3. Neither the name of the University nor the names of its contributors
  2117. // may be used to endorse or promote products derived from this software
  2118. // without specific prior written permission.
  2119. //
  2120. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2121. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2122. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2123. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2124. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2125. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2126. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2127. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2128. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2129. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2130. // SUCH DAMAGE.
  2131. //
  2132. // from: @(#)types.h 8.4 (Berkeley) 1/21/94
  2133. // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  2134. // * Copyright (c) 1991, 1993
  2135. // The Regents of the University of California. All rights reserved.
  2136. //
  2137. // This code is derived from software contributed to Berkeley by
  2138. // Berkeley Software Design, Inc.
  2139. //
  2140. // Redistribution and use in source and binary forms, with or without
  2141. // modification, are permitted provided that the following conditions
  2142. // are met:
  2143. // 1. Redistributions of source code must retain the above copyright
  2144. // notice, this list of conditions and the following disclaimer.
  2145. // 2. Redistributions in binary form must reproduce the above copyright
  2146. // notice, this list of conditions and the following disclaimer in the
  2147. // documentation and/or other materials provided with the distribution.
  2148. // 3. Neither the name of the University nor the names of its contributors
  2149. // may be used to endorse or promote products derived from this software
  2150. // without specific prior written permission.
  2151. //
  2152. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2153. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2154. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2155. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2156. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2157. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2158. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2159. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2160. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2161. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2162. // SUCH DAMAGE.
  2163. //
  2164. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  2165. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  2166. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  2167. // Public domain.
  2168. //
  2169. // NOTE: Do not protect this header against multiple inclusion. Doing
  2170. // so can have subtle side-effects due to header file inclusion order
  2171. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  2172. // protect each CPP macro that we want to supply.
  2173. // Feature-test macros are defined by several standards, and allow an
  2174. // application to specify what symbols they want the system headers to
  2175. // expose, and hence what standard they want them to conform to.
  2176. // There are two classes of feature-test macros. The first class
  2177. // specify complete standards, and if one of these is defined, header
  2178. // files will try to conform to the relevant standard. They are:
  2179. //
  2180. // ANSI macros:
  2181. // _ANSI_SOURCE ANSI C89
  2182. //
  2183. // POSIX macros:
  2184. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  2185. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  2186. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  2187. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  2188. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  2189. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  2190. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  2191. //
  2192. // X/Open macros:
  2193. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  2194. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  2195. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  2196. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  2197. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  2198. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  2199. //
  2200. // NetBSD macros:
  2201. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  2202. //
  2203. // If more than one of these "major" feature-test macros is defined,
  2204. // then the set of facilities provided (and namespace used) is the
  2205. // union of that specified by the relevant standards, and in case of
  2206. // conflict, the earlier standard in the above list has precedence (so
  2207. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  2208. // of rename() that's used is the POSIX one). If none of the "major"
  2209. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  2210. //
  2211. // There are also "minor" feature-test macros, which enable extra
  2212. // functionality in addition to some base standard. They should be
  2213. // defined along with one of the "major" macros. The "minor" macros
  2214. // are:
  2215. //
  2216. // _REENTRANT
  2217. // _ISOC99_SOURCE
  2218. // _ISOC11_SOURCE
  2219. // _LARGEFILE_SOURCE Large File Support
  2220. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  2221. // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
  2222. // -
  2223. // Copyright (c) 1990 The Regents of the University of California.
  2224. // All rights reserved.
  2225. //
  2226. // Redistribution and use in source and binary forms, with or without
  2227. // modification, are permitted provided that the following conditions
  2228. // are met:
  2229. // 1. Redistributions of source code must retain the above copyright
  2230. // notice, this list of conditions and the following disclaimer.
  2231. // 2. Redistributions in binary form must reproduce the above copyright
  2232. // notice, this list of conditions and the following disclaimer in the
  2233. // documentation and/or other materials provided with the distribution.
  2234. // 3. Neither the name of the University nor the names of its contributors
  2235. // may be used to endorse or promote products derived from this software
  2236. // without specific prior written permission.
  2237. //
  2238. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2239. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2240. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2241. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2242. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2243. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2244. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2245. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2246. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2247. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2248. // SUCH DAMAGE.
  2249. //
  2250. // from: @(#)types.h 7.5 (Berkeley) 3/9/91
  2251. // Implementation dependent defines, hidden from user space.
  2252. // POSIX does not specify them.
  2253. type X__fd_mask = X__uint32_t /* fd_set.h:46:20 */
  2254. // 32 = 2 ^ 5
  2255. // Select uses bit fields of file descriptors. These macros manipulate
  2256. // such bit fields. Note: FD_SETSIZE may be defined by the user.
  2257. type Fd_set1 = struct{ Ffds_bits [8]X__fd_mask } /* fd_set.h:66:9 */
  2258. // 32 = 2 ^ 5
  2259. // Select uses bit fields of file descriptors. These macros manipulate
  2260. // such bit fields. Note: FD_SETSIZE may be defined by the user.
  2261. type Fd_set = Fd_set1 /* fd_set.h:68:3 */
  2262. // Expose our internals if we are not required to hide them.
  2263. type Kauth_cred_t = uintptr /* types.h:318:27 */
  2264. type Pri_t = int32 /* types.h:320:13 */
  2265. // $NetBSD: pthread_types.h,v 1.23 2017/09/09 23:21:45 kamil Exp $
  2266. // -
  2267. // Copyright (c) 2001, 2008 The NetBSD Foundation, Inc.
  2268. // All rights reserved.
  2269. //
  2270. // This code is derived from software contributed to The NetBSD Foundation
  2271. // by Nathan J. Williams.
  2272. //
  2273. // Redistribution and use in source and binary forms, with or without
  2274. // modification, are permitted provided that the following conditions
  2275. // are met:
  2276. // 1. Redistributions of source code must retain the above copyright
  2277. // notice, this list of conditions and the following disclaimer.
  2278. // 2. Redistributions in binary form must reproduce the above copyright
  2279. // notice, this list of conditions and the following disclaimer in the
  2280. // documentation and/or other materials provided with the distribution.
  2281. //
  2282. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  2283. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  2284. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  2285. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  2286. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  2287. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  2288. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  2289. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  2290. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  2291. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  2292. // POSSIBILITY OF SUCH DAMAGE.
  2293. // We use the "pthread_spin_t" name internally; "pthread_spinlock_t" is the
  2294. // POSIX spinlock object.
  2295. //
  2296. // C++ expects to be using PTHREAD_FOO_INITIALIZER as a member initializer.
  2297. // This does not work for volatile types. Since C++ does not touch the guts
  2298. // of those types, we do not include volatile in the C++ definitions.
  2299. type Pthread_spin_t = X__cpu_simple_lock_t /* pthread_types.h:43:29 */
  2300. type X__pthread_spin_t = Pthread_spin_t /* pthread_types.h:48:24 */
  2301. // Copied from PTQ_HEAD in pthread_queue.h
  2302. type Pthread_queue_struct_t = struct {
  2303. Fptqh_first uintptr
  2304. Fptqh_last uintptr
  2305. } /* pthread_types.h:61:1 */
  2306. type Pthread_queue_t = Pthread_queue_struct_t /* pthread_types.h:62:39 */
  2307. type X__pthread_attr_st = struct {
  2308. Fpta_magic uint32
  2309. Fpta_flags int32
  2310. Fpta_private uintptr
  2311. } /* pthread_types.h:65:1 */
  2312. type X__pthread_mutex_st = struct {
  2313. Fptm_magic uint32
  2314. Fptm_errorcheck X__pthread_spin_t
  2315. Fptm_pad1 [3]Uint8_t
  2316. F__8 struct{ Fptm_ceiling uint8 }
  2317. Fptm_pad2 [3]Uint8_t
  2318. F__ccgo_pad1 [4]byte
  2319. Fptm_owner Pthread_t
  2320. Fptm_waiters uintptr
  2321. Fptm_recursed uint32
  2322. F__ccgo_pad2 [4]byte
  2323. Fptm_spare2 uintptr
  2324. } /* pthread_types.h:66:1 */
  2325. type X__pthread_mutexattr_st = struct {
  2326. Fptma_magic uint32
  2327. F__ccgo_pad1 [4]byte
  2328. Fptma_private uintptr
  2329. } /* pthread_types.h:67:1 */
  2330. type X__pthread_cond_st = struct {
  2331. Fptc_magic uint32
  2332. Fptc_lock X__pthread_spin_t
  2333. F__ccgo_pad1 [3]byte
  2334. Fptc_waiters Pthread_queue_t
  2335. Fptc_mutex uintptr
  2336. Fptc_private uintptr
  2337. } /* pthread_types.h:68:1 */
  2338. type X__pthread_condattr_st = struct {
  2339. Fptca_magic uint32
  2340. F__ccgo_pad1 [4]byte
  2341. Fptca_private uintptr
  2342. } /* pthread_types.h:69:1 */
  2343. type X__pthread_rwlock_st = struct {
  2344. Fptr_magic uint32
  2345. Fptr_interlock X__pthread_spin_t
  2346. F__ccgo_pad1 [3]byte
  2347. Fptr_rblocked Pthread_queue_t
  2348. Fptr_wblocked Pthread_queue_t
  2349. Fptr_nreaders uint32
  2350. F__ccgo_pad2 [4]byte
  2351. Fptr_owner Pthread_t
  2352. Fptr_private uintptr
  2353. } /* pthread_types.h:71:1 */
  2354. type X__pthread_rwlockattr_st = struct {
  2355. Fptra_magic uint32
  2356. F__ccgo_pad1 [4]byte
  2357. Fptra_private uintptr
  2358. } /* pthread_types.h:72:1 */
  2359. type X__pthread_barrier_st = struct {
  2360. Fptb_magic uint32
  2361. Fptb_lock Pthread_spin_t
  2362. F__ccgo_pad1 [3]byte
  2363. Fptb_waiters Pthread_queue_t
  2364. Fptb_initcount uint32
  2365. Fptb_curcount uint32
  2366. Fptb_generation uint32
  2367. F__ccgo_pad2 [4]byte
  2368. Fptb_private uintptr
  2369. } /* pthread_types.h:73:1 */
  2370. type X__pthread_barrierattr_st = struct {
  2371. Fptba_magic uint32
  2372. F__ccgo_pad1 [4]byte
  2373. Fptba_private uintptr
  2374. } /* pthread_types.h:74:1 */
  2375. type Pthread_t = uintptr /* pthread_types.h:76:29 */
  2376. type Pthread_attr_t = X__pthread_attr_st /* pthread_types.h:77:34 */
  2377. type Pthread_mutex_t = X__pthread_mutex_st /* pthread_types.h:78:35 */
  2378. type Pthread_mutexattr_t = X__pthread_mutexattr_st /* pthread_types.h:79:39 */
  2379. type Pthread_cond_t = X__pthread_cond_st /* pthread_types.h:80:34 */
  2380. type Pthread_condattr_t = X__pthread_condattr_st /* pthread_types.h:81:38 */
  2381. type X__pthread_once_st = struct {
  2382. Fpto_mutex Pthread_mutex_t
  2383. Fpto_done int32
  2384. F__ccgo_pad1 [4]byte
  2385. } /* pthread_types.h:82:9 */
  2386. type Pthread_once_t = X__pthread_once_st /* pthread_types.h:82:34 */
  2387. type X__pthread_spinlock_st = struct {
  2388. Fpts_magic uint32
  2389. Fpts_spin X__pthread_spin_t
  2390. F__ccgo_pad1 [3]byte
  2391. Fpts_flags int32
  2392. } /* pthread_types.h:83:9 */
  2393. type Pthread_spinlock_t = X__pthread_spinlock_st /* pthread_types.h:83:38 */
  2394. type Pthread_rwlock_t = X__pthread_rwlock_st /* pthread_types.h:84:36 */
  2395. type Pthread_rwlockattr_t = X__pthread_rwlockattr_st /* pthread_types.h:85:40 */
  2396. type Pthread_barrier_t = X__pthread_barrier_st /* pthread_types.h:86:37 */
  2397. type Pthread_barrierattr_t = X__pthread_barrierattr_st /* pthread_types.h:87:41 */
  2398. type Pthread_key_t = int32 /* pthread_types.h:88:13 */
  2399. // $NetBSD: bswap.h,v 1.19 2015/03/12 15:28:16 christos Exp $
  2400. // Written by Manuel Bouyer. Public domain
  2401. // $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya Exp $
  2402. // -
  2403. // Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
  2404. // All rights reserved.
  2405. //
  2406. // This code is derived from software contributed to The NetBSD Foundation
  2407. // by Klaus Klein.
  2408. //
  2409. // Redistribution and use in source and binary forms, with or without
  2410. // modification, are permitted provided that the following conditions
  2411. // are met:
  2412. // 1. Redistributions of source code must retain the above copyright
  2413. // notice, this list of conditions and the following disclaimer.
  2414. // 2. Redistributions in binary form must reproduce the above copyright
  2415. // notice, this list of conditions and the following disclaimer in the
  2416. // documentation and/or other materials provided with the distribution.
  2417. //
  2418. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  2419. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  2420. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  2421. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  2422. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  2423. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  2424. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  2425. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  2426. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  2427. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  2428. // POSSIBILITY OF SUCH DAMAGE.
  2429. // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  2430. // * Copyright (c) 1991, 1993
  2431. // The Regents of the University of California. All rights reserved.
  2432. //
  2433. // This code is derived from software contributed to Berkeley by
  2434. // Berkeley Software Design, Inc.
  2435. //
  2436. // Redistribution and use in source and binary forms, with or without
  2437. // modification, are permitted provided that the following conditions
  2438. // are met:
  2439. // 1. Redistributions of source code must retain the above copyright
  2440. // notice, this list of conditions and the following disclaimer.
  2441. // 2. Redistributions in binary form must reproduce the above copyright
  2442. // notice, this list of conditions and the following disclaimer in the
  2443. // documentation and/or other materials provided with the distribution.
  2444. // 3. Neither the name of the University nor the names of its contributors
  2445. // may be used to endorse or promote products derived from this software
  2446. // without specific prior written permission.
  2447. //
  2448. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2449. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2450. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2451. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2452. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2453. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2454. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2455. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2456. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2457. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2458. // SUCH DAMAGE.
  2459. //
  2460. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  2461. // $NetBSD: int_types.h,v 1.7 2014/07/25 21:43:13 joerg Exp $
  2462. // -
  2463. // Copyright (c) 1990 The Regents of the University of California.
  2464. // All rights reserved.
  2465. //
  2466. // Redistribution and use in source and binary forms, with or without
  2467. // modification, are permitted provided that the following conditions
  2468. // are met:
  2469. // 1. Redistributions of source code must retain the above copyright
  2470. // notice, this list of conditions and the following disclaimer.
  2471. // 2. Redistributions in binary form must reproduce the above copyright
  2472. // notice, this list of conditions and the following disclaimer in the
  2473. // documentation and/or other materials provided with the distribution.
  2474. // 3. Neither the name of the University nor the names of its contributors
  2475. // may be used to endorse or promote products derived from this software
  2476. // without specific prior written permission.
  2477. //
  2478. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2479. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2480. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2481. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2482. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2483. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2484. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2485. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2486. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2487. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2488. // SUCH DAMAGE.
  2489. //
  2490. // from: @(#)types.h 7.5 (Berkeley) 3/9/91
  2491. type Intptr_t = X__intptr_t /* stdint.h:79:20 */
  2492. type Uintptr_t = X__uintptr_t /* stdint.h:84:21 */
  2493. // $NetBSD: int_mwgwtypes.h,v 1.8 2014/07/25 21:43:13 joerg Exp $
  2494. // -
  2495. // Copyright (c) 2001 The NetBSD Foundation, Inc.
  2496. // All rights reserved.
  2497. //
  2498. // This code is derived from software contributed to The NetBSD Foundation
  2499. // by Klaus Klein.
  2500. //
  2501. // Redistribution and use in source and binary forms, with or without
  2502. // modification, are permitted provided that the following conditions
  2503. // are met:
  2504. // 1. Redistributions of source code must retain the above copyright
  2505. // notice, this list of conditions and the following disclaimer.
  2506. // 2. Redistributions in binary form must reproduce the above copyright
  2507. // notice, this list of conditions and the following disclaimer in the
  2508. // documentation and/or other materials provided with the distribution.
  2509. //
  2510. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  2511. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  2512. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  2513. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  2514. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  2515. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  2516. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  2517. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  2518. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  2519. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  2520. // POSSIBILITY OF SUCH DAMAGE.
  2521. // $NetBSD: common_int_mwgwtypes.h,v 1.1 2014/07/25 21:43:13 joerg Exp $
  2522. // -
  2523. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  2524. // All rights reserved.
  2525. //
  2526. // This code is derived from software contributed to The NetBSD Foundation
  2527. // by Joerg Sonnenberger.
  2528. //
  2529. // Redistribution and use in source and binary forms, with or without
  2530. // modification, are permitted provided that the following conditions
  2531. // are met:
  2532. // 1. Redistributions of source code must retain the above copyright
  2533. // notice, this list of conditions and the following disclaimer.
  2534. // 2. Redistributions in binary form must reproduce the above copyright
  2535. // notice, this list of conditions and the following disclaimer in the
  2536. // documentation and/or other materials provided with the distribution.
  2537. //
  2538. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  2539. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  2540. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  2541. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  2542. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  2543. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  2544. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  2545. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  2546. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  2547. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  2548. // POSSIBILITY OF SUCH DAMAGE.
  2549. // 7.18.1 Integer types
  2550. // 7.18.1.2 Minimum-width integer types
  2551. type Int_least8_t = int8 /* common_int_mwgwtypes.h:45:32 */
  2552. type Uint_least8_t = uint8 /* common_int_mwgwtypes.h:46:32 */
  2553. type Int_least16_t = int16 /* common_int_mwgwtypes.h:47:32 */
  2554. type Uint_least16_t = uint16 /* common_int_mwgwtypes.h:48:32 */
  2555. type Int_least32_t = int32 /* common_int_mwgwtypes.h:49:32 */
  2556. type Uint_least32_t = uint32 /* common_int_mwgwtypes.h:50:32 */
  2557. type Int_least64_t = int64 /* common_int_mwgwtypes.h:51:32 */
  2558. type Uint_least64_t = uint64 /* common_int_mwgwtypes.h:52:32 */
  2559. // 7.18.1.3 Fastest minimum-width integer types
  2560. type Int_fast8_t = int32 /* common_int_mwgwtypes.h:55:32 */
  2561. type Uint_fast8_t = uint32 /* common_int_mwgwtypes.h:56:32 */
  2562. type Int_fast16_t = int32 /* common_int_mwgwtypes.h:57:32 */
  2563. type Uint_fast16_t = uint32 /* common_int_mwgwtypes.h:58:32 */
  2564. type Int_fast32_t = int32 /* common_int_mwgwtypes.h:59:32 */
  2565. type Uint_fast32_t = uint32 /* common_int_mwgwtypes.h:60:32 */
  2566. type Int_fast64_t = int64 /* common_int_mwgwtypes.h:61:32 */
  2567. type Uint_fast64_t = uint64 /* common_int_mwgwtypes.h:62:32 */
  2568. // 7.18.1.5 Greatest-width integer types
  2569. type Intmax_t = int64 /* common_int_mwgwtypes.h:66:33 */
  2570. type Uintmax_t = uint64 /* common_int_mwgwtypes.h:67:32 */
  2571. // Identification of the network protocol stack
  2572. // for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE
  2573. // has the table of implementation/integration differences.
  2574. // Local port number conventions:
  2575. //
  2576. // Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root),
  2577. // unless a kernel is compiled with IPNOPRIVPORTS defined.
  2578. //
  2579. // When a user does a bind(2) or connect(2) with a port number of zero,
  2580. // a non-conflicting local port address is chosen.
  2581. //
  2582. // The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although
  2583. // that is settable by sysctl(3); net.inet.ip.anonportmin and
  2584. // net.inet.ip.anonportmax respectively.
  2585. //
  2586. // A user may set the IPPROTO_IP option IP_PORTRANGE to change this
  2587. // default assignment range.
  2588. //
  2589. // The value IP_PORTRANGE_DEFAULT causes the default behavior.
  2590. //
  2591. // The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT,
  2592. // and exists only for FreeBSD compatibility purposes.
  2593. //
  2594. // The value IP_PORTRANGE_LOW changes the range to the "low" are
  2595. // that is (by convention) restricted to privileged processes.
  2596. // This convention is based on "vouchsafe" principles only.
  2597. // It is only secure if you trust the remote host to restrict these ports.
  2598. // The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX.
  2599. // IPv6 address
  2600. type In6_addr = struct {
  2601. F__u6_addr struct {
  2602. F__ccgo_pad1 [0]uint32
  2603. F__u6_addr8 [16]X__uint8_t
  2604. }
  2605. } /* in6.h:123:1 */
  2606. // Socket address for IPv6
  2607. type Sockaddr_in6 = struct {
  2608. Fsin6_len Uint8_t
  2609. Fsin6_family X__sa_family_t
  2610. Fsin6_port X__in_port_t
  2611. Fsin6_flowinfo Uint32_t
  2612. Fsin6_addr struct {
  2613. F__u6_addr struct {
  2614. F__ccgo_pad1 [0]uint32
  2615. F__u6_addr8 [16]X__uint8_t
  2616. }
  2617. }
  2618. Fsin6_scope_id Uint32_t
  2619. } /* in6.h:146:1 */
  2620. // Unspecified
  2621. // Loopback
  2622. // IPv4 compatible
  2623. // Mapped
  2624. // KAME Scope Values
  2625. // Unicast Scope
  2626. // Note that we must check topmost 10 bits only, not 16 bits (see RFC2373).
  2627. // Multicast
  2628. // Multicast Scope
  2629. // Options for use with [gs]etsockopt at the IPV6 level.
  2630. // First word of comment is data type; bool is stored in int.
  2631. // no hdrincl
  2632. // The join and leave membership option numbers need to match with the v4 ones
  2633. // RFC2292 options
  2634. // new socket options introduced in RFC3542
  2635. // more new socket options introduced in RFC3542
  2636. // to define items, should talk with KAME guys first, for *BSD compatibility
  2637. // Defaults and limits for options
  2638. // Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP.
  2639. type Ipv6_mreq = struct {
  2640. Fipv6mr_multiaddr struct {
  2641. F__u6_addr struct {
  2642. F__ccgo_pad1 [0]uint32
  2643. F__u6_addr8 [16]X__uint8_t
  2644. }
  2645. }
  2646. Fipv6mr_interface uint32
  2647. } /* in6.h:459:1 */
  2648. // IPV6_PKTINFO: Packet information(RFC2292 sec 5)
  2649. type In6_pktinfo = struct {
  2650. Fipi6_addr struct {
  2651. F__u6_addr struct {
  2652. F__ccgo_pad1 [0]uint32
  2653. F__u6_addr8 [16]X__uint8_t
  2654. }
  2655. }
  2656. Fipi6_ifindex uint32
  2657. } /* in6.h:467:1 */
  2658. // Control structure for IPV6_RECVPATHMTU socket option.
  2659. type Ip6_mtuinfo = struct {
  2660. Fip6m_addr struct {
  2661. Fsin6_len Uint8_t
  2662. Fsin6_family X__sa_family_t
  2663. Fsin6_port X__in_port_t
  2664. Fsin6_flowinfo Uint32_t
  2665. Fsin6_addr struct {
  2666. F__u6_addr struct {
  2667. F__ccgo_pad1 [0]uint32
  2668. F__u6_addr8 [16]X__uint8_t
  2669. }
  2670. }
  2671. Fsin6_scope_id Uint32_t
  2672. }
  2673. Fip6m_mtu Uint32_t
  2674. } /* in6.h:475:1 */
  2675. var _ int8 /* gen.c:2:13: */