in_illumos_amd64.go 162 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038
  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_illumos_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. CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
  15. CLOCK_HIGHRES = 4 // time_impl.h:126:1:
  16. CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
  17. CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
  18. CLOCK_PROF = 2 // time_impl.h:127:1:
  19. CLOCK_REALTIME = 3 // time_impl.h:123:1:
  20. CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
  21. CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
  22. DST_AUST = 2 // time.h:115:1:
  23. DST_AUSTALT = 10 // time.h:123:1:
  24. DST_CAN = 6 // time.h:119:1:
  25. DST_EET = 5 // time.h:118:1:
  26. DST_GB = 7 // time.h:120:1:
  27. DST_MET = 4 // time.h:117:1:
  28. DST_NONE = 0 // time.h:113:1:
  29. DST_RUM = 8 // time.h:121:1:
  30. DST_TUR = 9 // time.h:122:1:
  31. DST_USA = 1 // time.h:114:1:
  32. DST_WET = 3 // time.h:116:1:
  33. FD_SETSIZE = 65536 // select.h:88:1:
  34. IMPLINK_HIGHEXPER = 158 // in.h:284:1:
  35. IMPLINK_IP = 155 // in.h:282:1:
  36. IMPLINK_LOWEXPER = 156 // in.h:283:1:
  37. INADDR_6TO4RRANYCAST = 0xc0586301 // in.h:392:1:
  38. INADDR_ALLHOSTS_GROUP = 0xe0000001 // in.h:372:1:
  39. INADDR_ALLRPTS_GROUP = 0xe0000016 // in.h:374:1:
  40. INADDR_ALLRTRS_GROUP = 0xe0000002 // in.h:373:1:
  41. INADDR_ANY = 0x00000000 // in.h:366:1:
  42. INADDR_BROADCAST = 0xffffffff // in.h:368:1:
  43. INADDR_LOOPBACK = 0x7F000001 // in.h:367:1:
  44. INADDR_MAX_LOCAL_GROUP = 0xe00000ff // in.h:375:1:
  45. INADDR_NONE = 0xffffffff // in.h:369:1:
  46. INADDR_UNSPEC_GROUP = 0xe0000000 // in.h:371:1:
  47. INET6_ADDRSTRLEN = 46 // in.h:1212:1:
  48. INET_ADDRSTRLEN = 16 // in.h:1210:1:
  49. IN_AUTOCONF_MASK = 0xffff0000 // in.h:379:1:
  50. IN_AUTOCONF_NET = 0xa9fe0000 // in.h:378:1:
  51. IN_CLASSA_HOST = 0x00ffffff // in.h:332:1:
  52. IN_CLASSA_MAX = 128 // in.h:333:1:
  53. IN_CLASSA_NET = 0xff000000 // in.h:330:1:
  54. IN_CLASSA_NSHIFT = 24 // in.h:331:1:
  55. IN_CLASSB_HOST = 0x0000ffff // in.h:338:1:
  56. IN_CLASSB_MAX = 65536 // in.h:339:1:
  57. IN_CLASSB_NET = 0xffff0000 // in.h:336:1:
  58. IN_CLASSB_NSHIFT = 16 // in.h:337:1:
  59. IN_CLASSC_HOST = 0x000000ff // in.h:344:1:
  60. IN_CLASSC_NET = 0xffffff00 // in.h:342:1:
  61. IN_CLASSC_NSHIFT = 8 // in.h:343:1:
  62. IN_CLASSD_HOST = 0x0fffffff // in.h:349:1:
  63. IN_CLASSD_NET = 0xf0000000 // in.h:347:1:
  64. IN_CLASSD_NSHIFT = 28 // in.h:348:1:
  65. IN_CLASSE_NET = 0xffffffff // in.h:352:1:
  66. IN_LOOPBACKNET = 127 // in.h:395:1:
  67. IN_PRIVATE12_MASK = 0xfff00000 // in.h:383:1:
  68. IN_PRIVATE12_NET = 0xac100000 // in.h:382:1:
  69. IN_PRIVATE16_MASK = 0xffff0000 // in.h:385:1:
  70. IN_PRIVATE16_NET = 0xc0a80000 // in.h:384:1:
  71. IN_PRIVATE8_MASK = 0xff000000 // in.h:381:1:
  72. IN_PRIVATE8_NET = 0x0a000000 // in.h:380:1:
  73. IPPORT_BIFFUDP = 512 // in.h:250:1:
  74. IPPORT_BOOTPC = 68 // in.h:214:1:
  75. IPPORT_BOOTPS = 67 // in.h:213:1:
  76. IPPORT_CHARGEN = 19 // in.h:199:1:
  77. IPPORT_CMDSERVER = 514 // in.h:243:1:
  78. IPPORT_DAYTIME = 13 // in.h:197:1:
  79. IPPORT_DHCPV6C = 546 // in.h:260:1:
  80. IPPORT_DHCPV6S = 547 // in.h:261:1:
  81. IPPORT_DISCARD = 9 // in.h:195:1:
  82. IPPORT_DOMAIN = 53 // in.h:206:1:
  83. IPPORT_ECHO = 7 // in.h:194:1:
  84. IPPORT_EFSSERVER = 520 // in.h:245:1:
  85. IPPORT_EXECSERVER = 512 // in.h:241:1:
  86. IPPORT_FINGER = 79 // in.h:217:1:
  87. IPPORT_FTP = 21 // in.h:200:1:
  88. IPPORT_HTTP = 80 // in.h:218:1:
  89. IPPORT_HTTP_ALT = 8080 // in.h:219:1:
  90. IPPORT_IKE = 500 // in.h:235:1:
  91. IPPORT_IKE_NATT = 4500 // in.h:236:1:
  92. IPPORT_LDAP = 389 // in.h:226:1:
  93. IPPORT_LOGINSERVER = 513 // in.h:242:1:
  94. IPPORT_MDNS = 5353 // in.h:207:1:
  95. IPPORT_MIP = 434 // in.h:228:1:
  96. IPPORT_MTP = 57 // in.h:208:1:
  97. IPPORT_NAMESERVER = 42 // in.h:204:1:
  98. IPPORT_NETBIOS_DGM = 138 // in.h:224:1:
  99. IPPORT_NETBIOS_NS = 137 // in.h:223:1:
  100. IPPORT_NETBIOS_SSN = 139 // in.h:225:1:
  101. IPPORT_NETSTAT = 15 // in.h:198:1:
  102. IPPORT_NTP = 123 // in.h:222:1:
  103. IPPORT_PRINTER = 515 // in.h:244:1:
  104. IPPORT_RESERVED = 1024 // in.h:271:1:
  105. IPPORT_RIPNG = 521 // in.h:255:1:
  106. IPPORT_RJE = 77 // in.h:216:1:
  107. IPPORT_ROUTESERVER = 520 // in.h:254:1:
  108. IPPORT_SLP = 427 // in.h:227:1:
  109. IPPORT_SMB = 445 // in.h:229:1:
  110. IPPORT_SMTP = 25 // in.h:202:1:
  111. IPPORT_SOCKS = 1080 // in.h:263:1:
  112. IPPORT_SUPDUP = 95 // in.h:221:1:
  113. IPPORT_SYSLOG = 514 // in.h:252:1:
  114. IPPORT_SYSTAT = 11 // in.h:196:1:
  115. IPPORT_TALK = 517 // in.h:253:1:
  116. IPPORT_TELNET = 23 // in.h:201:1:
  117. IPPORT_TFTP = 69 // in.h:215:1:
  118. IPPORT_TIMESERVER = 37 // in.h:203:1:
  119. IPPORT_TTYLINK = 87 // in.h:220:1:
  120. IPPORT_USERRESERVED = 5000 // in.h:272:1:
  121. IPPORT_VXLAN = 4789 // in.h:230:1:
  122. IPPORT_WHOIS = 43 // in.h:205:1:
  123. IPPORT_WHOSERVER = 513 // in.h:251:1:
  124. IPPROTO_AH = 51 // in.h:169:1:
  125. IPPROTO_DSTOPTS = 60 // in.h:172:1:
  126. IPPROTO_EGP = 8 // in.h:160:1:
  127. IPPROTO_ENCAP = 4 // in.h:158:1:
  128. IPPROTO_EON = 80 // in.h:175:1:
  129. IPPROTO_ESP = 50 // in.h:168:1:
  130. IPPROTO_FRAGMENT = 44 // in.h:166:1:
  131. IPPROTO_GGP = 3 // in.h:157:1:
  132. IPPROTO_HELLO = 63 // in.h:173:1:
  133. IPPROTO_HOPOPTS = 0 // in.h:154:1:
  134. IPPROTO_ICMP = 1 // in.h:155:1:
  135. IPPROTO_ICMPV6 = 58 // in.h:170:1:
  136. IPPROTO_IDP = 22 // in.h:163:1:
  137. IPPROTO_IGMP = 2 // in.h:156:1:
  138. IPPROTO_IP = 0 // in.h:153:1:
  139. IPPROTO_IPV6 = 41 // in.h:164:1:
  140. IPPROTO_MAX = 256 // in.h:182:1:
  141. IPPROTO_ND = 77 // in.h:174:1:
  142. IPPROTO_NONE = 59 // in.h:171:1:
  143. IPPROTO_OSPF = 89 // in.h:176:1:
  144. IPPROTO_PIM = 103 // in.h:177:1:
  145. IPPROTO_PUP = 12 // in.h:161:1:
  146. IPPROTO_RAW = 255 // in.h:181:1:
  147. IPPROTO_ROUTING = 43 // in.h:165:1:
  148. IPPROTO_RSVP = 46 // in.h:167:1:
  149. IPPROTO_SCTP = 132 // in.h:178:1:
  150. IPPROTO_TCP = 6 // in.h:159:1:
  151. IPPROTO_UDP = 17 // in.h:162:1:
  152. IPSEC_PREF_NEVER = 0x01 // in.h:941:1:
  153. IPSEC_PREF_REQUIRED = 0x02 // in.h:942:1:
  154. IPSEC_PREF_UNIQUE = 0x04 // in.h:943:1:
  155. IPV6_ADD_MEMBERSHIP = 0x9 // in.h:1224:1:
  156. IPV6_BOUND_IF = 0x41 // in.h:1307:1:
  157. IPV6_CHECKSUM = 0x18 // in.h:1257:1:
  158. IPV6_DONTFRAG = 0x21 // in.h:1260:1:
  159. IPV6_DROP_MEMBERSHIP = 0xa // in.h:1226:1:
  160. IPV6_DSTOPTS = 0xf // in.h:1234:1:
  161. IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00 // in.h:447:1:
  162. IPV6_FLOWINFO_TCLASS = 0x0000f00f // in.h:448:1:
  163. IPV6_HOPLIMIT = 0xc // in.h:1231:1:
  164. IPV6_HOPOPTS = 0xe // in.h:1233:1:
  165. IPV6_JOIN_GROUP = 0x9 // in.h:1202:1:
  166. IPV6_LEAVE_GROUP = 0xa // in.h:1204:1:
  167. IPV6_MULTICAST_HOPS = 0x7 // in.h:1196:1:
  168. IPV6_MULTICAST_IF = 0x6 // in.h:1193:1:
  169. IPV6_MULTICAST_LOOP = 0x8 // in.h:1199:1:
  170. IPV6_NEXTHOP = 0xd // in.h:1232:1:
  171. IPV6_PAD1_OPT = 0 // in.h:1314:1:
  172. IPV6_PATHMTU = 0x25 // in.h:1264:1:
  173. IPV6_PKTINFO = 0xb // in.h:1229:1:
  174. IPV6_PREFER_SRC_CGA = 0x00000020 // in.h:1289:1:
  175. IPV6_PREFER_SRC_CGADEFAULT = 16 // in.h:1296:1:
  176. IPV6_PREFER_SRC_CGAMASK = 48 // in.h:1295:1:
  177. IPV6_PREFER_SRC_COA = 0x00000002 // in.h:1285:1:
  178. IPV6_PREFER_SRC_DEFAULT = 21 // in.h:1301:1:
  179. IPV6_PREFER_SRC_HOME = 0x00000001 // in.h:1284:1:
  180. IPV6_PREFER_SRC_MASK = 63 // in.h:1298:1:
  181. IPV6_PREFER_SRC_MIPDEFAULT = 1 // in.h:1292:1:
  182. IPV6_PREFER_SRC_MIPMASK = 3 // in.h:1291:1:
  183. IPV6_PREFER_SRC_NONCGA = 0x00000010 // in.h:1288:1:
  184. IPV6_PREFER_SRC_PUBLIC = 0x00000004 // in.h:1286:1:
  185. IPV6_PREFER_SRC_TMP = 0x00000008 // in.h:1287:1:
  186. IPV6_PREFER_SRC_TMPDEFAULT = 4 // in.h:1294:1:
  187. IPV6_PREFER_SRC_TMPMASK = 12 // in.h:1293:1:
  188. IPV6_RECVDSTOPTS = 0x28 // in.h:1271:1:
  189. IPV6_RECVHOPLIMIT = 0x13 // in.h:1240:1:
  190. IPV6_RECVHOPOPTS = 0x14 // in.h:1241:1:
  191. IPV6_RECVPATHMTU = 0x24 // in.h:1263:1:
  192. IPV6_RECVPKTINFO = 0x12 // in.h:1239:1:
  193. IPV6_RECVRTHDR = 0x16 // in.h:1249:1:
  194. IPV6_RECVRTHDRDSTOPTS = 0x17 // in.h:1255:1:
  195. IPV6_RECVTCLASS = 0x19 // in.h:1258:1:
  196. IPV6_RTHDR = 0x10 // in.h:1236:1:
  197. IPV6_RTHDRDSTOPTS = 0x11 // in.h:1237:1:
  198. IPV6_RTHDR_TYPE_0 = 0 // in.h:1152:1:
  199. IPV6_SEC_OPT = 0x22 // in.h:1261:1:
  200. IPV6_SRC_PREFERENCES = 0x23 // in.h:1262:1:
  201. IPV6_TCLASS = 0x26 // in.h:1265:1:
  202. IPV6_UNICAST_HOPS = 0x5 // in.h:1190:1:
  203. IPV6_UNSPEC_SRC = 0x42 // in.h:1308:1:
  204. IPV6_USE_MIN_MTU = 0x20 // in.h:1259:1:
  205. IPV6_V6ONLY = 0x27 // in.h:1266:1:
  206. IP_ADD_MEMBERSHIP = 0x13 // in.h:921:1:
  207. IP_ADD_SOURCE_MEMBERSHIP = 0x17 // in.h:925:1:
  208. IP_BLOCK_SOURCE = 0x15 // in.h:923:1:
  209. IP_BOUND_IF = 0x41 // in.h:976:1:
  210. IP_BROADCAST = 0x106 // in.h:994:1:
  211. IP_BROADCAST_TTL = 0x43 // in.h:978:1:
  212. IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:1009:1:
  213. IP_DEFAULT_MULTICAST_TTL = 1 // in.h:1008:1:
  214. IP_DHCPINIT_IF = 0x45 // in.h:980:1:
  215. IP_DONTFRAG = 0x1b // in.h:934:1:
  216. IP_DONTROUTE = 0x105 // in.h:990:1:
  217. IP_DROP_MEMBERSHIP = 0x14 // in.h:922:1:
  218. IP_DROP_SOURCE_MEMBERSHIP = 0x18 // in.h:926:1:
  219. IP_HDRINCL = 2 // in.h:899:1:
  220. IP_MULTICAST_IF = 0x10 // in.h:918:1:
  221. IP_MULTICAST_LOOP = 0x12 // in.h:920:1:
  222. IP_MULTICAST_TTL = 0x11 // in.h:919:1:
  223. IP_NEXTHOP = 0x19 // in.h:927:1:
  224. IP_OPTIONS = 1 // in.h:896:1:
  225. IP_PKTINFO = 0x1a // in.h:932:1:
  226. IP_RECVDSTADDR = 0x7 // in.h:911:1:
  227. IP_RECVIF = 0x9 // in.h:913:1:
  228. IP_RECVOPTS = 0x5 // in.h:909:1:
  229. IP_RECVPKTINFO = 0x1a // in.h:933:1:
  230. IP_RECVRETOPTS = 0x6 // in.h:910:1:
  231. IP_RECVSLLA = 0xa // in.h:914:1:
  232. IP_RECVTOS = 0xc // in.h:916:1:
  233. IP_RECVTTL = 0xb // in.h:915:1:
  234. IP_RETOPTS = 0x8 // in.h:912:1:
  235. IP_REUSEADDR = 0x104 // in.h:986:1:
  236. IP_SEC_OPT = 0x22 // in.h:940:1:
  237. IP_TOS = 3 // in.h:902:1:
  238. IP_TTL = 4 // in.h:906:1:
  239. IP_UNBLOCK_SOURCE = 0x16 // in.h:924:1:
  240. IP_UNSPEC_SRC = 0x42 // in.h:977:1:
  241. ITIMER_PROF = 2 // time.h:201:1:
  242. ITIMER_REAL = 0 // time.h:199:1:
  243. ITIMER_REALPROF = 3 // time.h:204:1:
  244. ITIMER_VIRTUAL = 1 // time.h:200:1:
  245. LINUX_SLL_BROADCAST = 1 // socket_impl.h:122:1:
  246. LINUX_SLL_HOST = 0 // socket_impl.h:121:1:
  247. LINUX_SLL_MULTICAST = 2 // socket_impl.h:123:1:
  248. LINUX_SLL_OTHERHOST = 3 // socket_impl.h:124:1:
  249. LINUX_SLL_OUTGOING = 4 // socket_impl.h:125:1:
  250. MCAST_BLOCK_SOURCE = 0x2b // in.h:1278:1:
  251. MCAST_EXCLUDE = 2 // in.h:1122:1:
  252. MCAST_INCLUDE = 1 // in.h:1121:1:
  253. MCAST_JOIN_GROUP = 0x29 // in.h:1276:1:
  254. MCAST_JOIN_SOURCE_GROUP = 0x2d // in.h:1280:1:
  255. MCAST_LEAVE_GROUP = 0x2a // in.h:1277:1:
  256. MCAST_LEAVE_SOURCE_GROUP = 0x2e // in.h:1281:1:
  257. MCAST_UNBLOCK_SOURCE = 0x2c // in.h:1279:1:
  258. MICROSEC = 1000000 // time.h:246:1:
  259. MILLISEC = 1000 // time.h:245:1:
  260. NANOSEC = 1000000000 // time.h:247:1:
  261. NBBY = 8 // select.h:103:1:
  262. PROTO_SDP = 257 // in.h:185:1:
  263. P_MYID = -1 // types.h:632:1:
  264. REG_LABEL_BP = 2 // machtypes.h:44:1:
  265. REG_LABEL_MAX = 8 // machtypes.h:51:1:
  266. REG_LABEL_PC = 0 // machtypes.h:42:1:
  267. REG_LABEL_R12 = 4 // machtypes.h:47:1:
  268. REG_LABEL_R13 = 5 // machtypes.h:48:1:
  269. REG_LABEL_R14 = 6 // machtypes.h:49:1:
  270. REG_LABEL_R15 = 7 // machtypes.h:50:1:
  271. REG_LABEL_RBX = 3 // machtypes.h:46:1:
  272. REG_LABEL_SP = 1 // machtypes.h:43:1:
  273. SEC = 1 // time.h:244:1:
  274. TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
  275. TIMER_RELTIME = 0x0 // time_impl.h:133:1:
  276. TIME_UTC = 0x1 // time.h:306:1:
  277. X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
  278. X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
  279. X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
  280. X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
  281. X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
  282. X_CLOCKID_T = 0 // types.h:568:1:
  283. X_CLOCK_T = 0 // types.h:563:1:
  284. X_COND_MAGIC = 0x4356 // types.h:426:1:
  285. X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
  286. X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
  287. X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
  288. X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
  289. X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
  290. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  291. X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
  292. X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
  293. X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
  294. X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
  295. X_IEEE_754 = 0 // isa_defs.h:246:1:
  296. X_INT64_TYPE = 0 // int_types.h:82:1:
  297. X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
  298. X_IN_ADDR_T = 0 // byteorder.h:78:1:
  299. X_IN_PORT_T = 0 // byteorder.h:73:1:
  300. X_IPADDR_T = 0 // in.h:98:1:
  301. X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
  302. X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
  303. X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
  304. X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
  305. X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
  306. X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
  307. X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
  308. X_LOCALE_T = 0 // time.h:291:1:
  309. X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
  310. X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
  311. X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
  312. X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
  313. X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
  314. X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
  315. X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
  316. X_LP64 = 1 // <predefined>:286:1:
  317. X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
  318. X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
  319. X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
  320. X_NBBY = 8 // select.h:100:1:
  321. X_NETINET_IN_H = 0 // in.h:33:1:
  322. X_NET_IF_DL_H = 0 // if_dl.h:39:1:
  323. X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
  324. X_OFF_T = 0 // types.h:142:1:
  325. X_OLD_IPV6_RECVDSTOPTS = 0x15 // in.h:1247:1:
  326. X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
  327. X_PSM_MODULES = 0 // isa_defs.h:284:1:
  328. X_PTRDIFF_T = 0 // types.h:112:1:
  329. X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
  330. X_RTC_CONFIG = 0 // isa_defs.h:285:1:
  331. X_RWL_MAGIC = 0x5257 // types.h:427:1:
  332. X_SA_FAMILY_T = 0 // socket_impl.h:42:1:
  333. X_SEMA_MAGIC = 0x534d // types.h:425:1:
  334. X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
  335. X_SIGEVENT = 0 // time.h:132:1:
  336. X_SIGSET_T = 0 // select.h:73:1:
  337. X_SIGVAL = 0 // time.h:124:1:
  338. X_SIZE_T = 0 // types.h:540:1:
  339. X_SOCKLEN_T = 0 // in.h:48:1:
  340. X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
  341. X_SSIZE_T = 0 // types.h:549:1:
  342. X_SS_MAXSIZE = 256 // socket_impl.h:70:1:
  343. X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
  344. X_STDC_C11 = 0 // feature_tests.h:165:1:
  345. X_STDC_C99 = 0 // feature_tests.h:169:1:
  346. X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
  347. X_SUSECONDS_T = 0 // types.h:343:1:
  348. X_SYS_BYTEORDER_H = 0 // byteorder.h:41:1:
  349. X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
  350. X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
  351. X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
  352. X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
  353. X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
  354. X_SYS_NULL_H = 0 // null.h:17:1:
  355. X_SYS_SELECT_H = 0 // select.h:45:1:
  356. X_SYS_SOCKET_IMPL_H = 0 // socket_impl.h:35:1:
  357. X_SYS_TIME_H = 0 // time.h:27:1:
  358. X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
  359. X_SYS_TYPES_H = 0 // types.h:35:1:
  360. X_SYS_UN_H = 0 // un.h:39:1:
  361. X_TIMER_T = 0 // types.h:573:1:
  362. X_TIME_H = 0 // time.h:37:1:
  363. X_TIME_T = 0 // types.h:558:1:
  364. X_UID_T = 0 // types.h:400:1:
  365. X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
  366. Sun = 1 // <predefined>:172:1:
  367. Unix = 1 // <predefined>:175:1:
  368. )
  369. // used for block sizes
  370. // The boolean_t type has had a varied amount of exposure over the years in
  371. // terms of how its enumeration constants have been exposed. In particular, it
  372. // originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
  373. // B_TRUE and B_FALSE with an underscore. This check never included the
  374. // question of if we were in a strict ANSI C environment or whether extensions
  375. // were defined.
  376. //
  377. // Compilers such as clang started defaulting to always including an
  378. // XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
  379. // This would lead most software that had used the non-underscore versions to
  380. // need it. As such, we have adjusted the non-strict XOPEN environment to retain
  381. // its old behavior so as to minimize namespace pollution; however, we instead
  382. // include both variants of the definitions in the generally visible version
  383. // allowing software written in either world to hopefully end up in a good
  384. // place.
  385. //
  386. // This isn't perfect, but should hopefully minimize the pain for folks actually
  387. // trying to build software.
  388. const ( /* types.h:215:1: */
  389. B_FALSE = 0
  390. B_TRUE = 1
  391. X_B_FALSE = 0
  392. X_B_TRUE = 1
  393. )
  394. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  395. type Size_t = uint64 /* <builtin>:9:23 */
  396. type Wchar_t = int32 /* <builtin>:15:24 */
  397. type X__int128_t = struct {
  398. Flo int64
  399. Fhi int64
  400. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  401. type X__uint128_t = struct {
  402. Flo uint64
  403. Fhi uint64
  404. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  405. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  406. type X__float128 = float64 /* <builtin>:47:21 */
  407. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  408. // Use is subject to license terms.
  409. //
  410. // Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  411. // Copyright 2015, Joyent, Inc.
  412. // Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  413. // Copyright (c) 1982, 1986 Regents of the University of California.
  414. // All rights reserved.
  415. //
  416. // Redistribution and use in source and binary forms are permitted
  417. // provided that this notice is preserved and that due credit is given
  418. // to the University of California at Berkeley. The name of the University
  419. // may not be used to endorse or promote products derived from this
  420. // software without specific prior written permission. This software
  421. // is provided ``as is'' without express or implied warranty.
  422. // Constants and structures defined by the internet system,
  423. // according to following documents
  424. //
  425. // Internet ASSIGNED NUMBERS (RFC1700) and its successors:
  426. // http://www.iana.org/assignments/protocol-numbers
  427. // http://www.iana.org/assignments/port-numbers
  428. // Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
  429. //
  430. // DO NOT EDIT THIS FILE.
  431. //
  432. // It has been auto-edited by fixincludes from:
  433. //
  434. // "/usr/include/sys/feature_tests.h"
  435. //
  436. // This had to be done to correct non-standard usages in the
  437. // original, manufacturer supplied header file.
  438. // CDDL HEADER START
  439. //
  440. // The contents of this file are subject to the terms of the
  441. // Common Development and Distribution License (the "License").
  442. // You may not use this file except in compliance with the License.
  443. //
  444. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  445. // or http://www.opensolaris.org/os/licensing.
  446. // See the License for the specific language governing permissions
  447. // and limitations under the License.
  448. //
  449. // When distributing Covered Code, include this CDDL HEADER in each
  450. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  451. // If applicable, add the following below this CDDL HEADER, with the
  452. // fields enclosed by brackets "[]" replaced with your own identifying
  453. // information: Portions Copyright [yyyy] [name of copyright owner]
  454. //
  455. // CDDL HEADER END
  456. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  457. // Copyright 2016 Joyent, Inc.
  458. // Copyright 2022 Oxide Computer Company
  459. //
  460. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  461. // Use is subject to license terms.
  462. // CDDL HEADER START
  463. //
  464. // The contents of this file are subject to the terms of the
  465. // Common Development and Distribution License, Version 1.0 only
  466. // (the "License"). You may not use this file except in compliance
  467. // with the License.
  468. //
  469. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  470. // or http://www.opensolaris.org/os/licensing.
  471. // See the License for the specific language governing permissions
  472. // and limitations under the License.
  473. //
  474. // When distributing Covered Code, include this CDDL HEADER in each
  475. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  476. // If applicable, add the following below this CDDL HEADER, with the
  477. // fields enclosed by brackets "[]" replaced with your own identifying
  478. // information: Portions Copyright [yyyy] [name of copyright owner]
  479. //
  480. // CDDL HEADER END
  481. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  482. // Use is subject to license terms.
  483. // Copyright 2015 EveryCity Ltd. All rights reserved.
  484. // Copyright 2019 Joyent, Inc.
  485. // This file contains definitions designed to enable different compilers
  486. // to be used harmoniously on Solaris systems.
  487. // Allow for version tests for compiler bugs and features.
  488. // analogous to lint's PRINTFLIKEn
  489. // Handle the kernel printf routines that can take '%b' too
  490. // This one's pretty obvious -- the function never returns
  491. // The function is 'extern inline' and expects GNU C89 behaviour, not C99
  492. // behaviour.
  493. //
  494. // Should only be used on 'extern inline' definitions for GCC.
  495. // The function has control flow such that it may return multiple times (in
  496. // the manner of setjmp or vfork)
  497. // This is an appropriate label for functions that do not
  498. // modify their arguments, e.g. strlen()
  499. // This is a stronger form of __pure__. Can be used for functions
  500. // that do not modify their arguments and don't depend on global
  501. // memory.
  502. // This attribute, attached to a variable, means that the variable is meant to
  503. // be possibly unused. GCC will not produce a warning for this variable.
  504. // Shorthand versions for readability
  505. // In release build, disable warnings about variables
  506. // which are used only for debugging.
  507. // CDDL HEADER START
  508. //
  509. // The contents of this file are subject to the terms of the
  510. // Common Development and Distribution License (the "License").
  511. // You may not use this file except in compliance with the License.
  512. //
  513. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  514. // or http://www.opensolaris.org/os/licensing.
  515. // See the License for the specific language governing permissions
  516. // and limitations under the License.
  517. //
  518. //
  519. // When distributing Covered Code, include this CDDL HEADER in each
  520. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  521. // If applicable, add the following below this CDDL HEADER, with the
  522. // fields enclosed by brackets "[]" replaced with your own identifying
  523. // information: Portions Copyright [yyyy] [name of copyright owner]
  524. //
  525. // CDDL HEADER END
  526. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  527. // Use is subject to license terms.
  528. // Copyright 2016 Joyent, Inc.
  529. // This header file serves to group a set of well known defines and to
  530. // set these for each instruction set architecture. These defines may
  531. // be divided into two groups; characteristics of the processor and
  532. // implementation choices for Solaris on a processor.
  533. //
  534. // Processor Characteristics:
  535. //
  536. // _LITTLE_ENDIAN / _BIG_ENDIAN:
  537. // The natural byte order of the processor. A pointer to an int points
  538. // to the least/most significant byte of that int.
  539. //
  540. // _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
  541. // The processor specific direction of stack growth. A push onto the
  542. // stack increases/decreases the stack pointer, so it stores data at
  543. // successively higher/lower addresses. (Stackless machines ignored
  544. // without regrets).
  545. //
  546. // _LONG_LONG_HTOL / _LONG_LONG_LTOH:
  547. // A pointer to a long long points to the most/least significant long
  548. // within that long long.
  549. //
  550. // _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
  551. // The C compiler assigns bit fields from the high/low to the low/high end
  552. // of an int (most to least significant vs. least to most significant).
  553. //
  554. // _IEEE_754:
  555. // The processor (or supported implementations of the processor)
  556. // supports the ieee-754 floating point standard. No other floating
  557. // point standards are supported (or significant). Any other supported
  558. // floating point formats are expected to be cased on the ISA processor
  559. // symbol.
  560. //
  561. // _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
  562. // The C Compiler implements objects of type `char' as `unsigned' or
  563. // `signed' respectively. This is really an implementation choice of
  564. // the compiler writer, but it is specified in the ABI and tends to
  565. // be uniform across compilers for an instruction set architecture.
  566. // Hence, it has the properties of a processor characteristic.
  567. //
  568. // _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
  569. // _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
  570. // _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
  571. // The ABI defines alignment requirements of each of the primitive
  572. // object types. Some, if not all, may be hardware requirements as
  573. // well. The values are expressed in "byte-alignment" units.
  574. //
  575. // _MAX_ALIGNMENT:
  576. // The most stringent alignment requirement as specified by the ABI.
  577. // Equal to the maximum of all the above _XXX_ALIGNMENT values.
  578. //
  579. // _MAX_ALIGNMENT_TYPE:
  580. // The name of the C type that has the value descried in _MAX_ALIGNMENT.
  581. //
  582. // _ALIGNMENT_REQUIRED:
  583. // True or false (1 or 0) whether or not the hardware requires the ABI
  584. // alignment.
  585. //
  586. // _LONG_LONG_ALIGNMENT_32
  587. // The 32-bit ABI supported by a 64-bit kernel may have different
  588. // alignment requirements for primitive object types. The value of this
  589. // identifier is expressed in "byte-alignment" units.
  590. //
  591. // _HAVE_CPUID_INSN
  592. // This indicates that the architecture supports the 'cpuid'
  593. // instruction as defined by Intel. (Intel allows other vendors
  594. // to extend the instruction for their own purposes.)
  595. //
  596. //
  597. // Implementation Choices:
  598. //
  599. // _ILP32 / _LP64:
  600. // This specifies the compiler data type implementation as specified in
  601. // the relevant ABI. The choice between these is strongly influenced
  602. // by the underlying hardware, but is not absolutely tied to it.
  603. // Currently only two data type models are supported:
  604. //
  605. // _ILP32:
  606. // Int/Long/Pointer are 32 bits. This is the historical UNIX
  607. // and Solaris implementation. Due to its historical standing,
  608. // this is the default case.
  609. //
  610. // _LP64:
  611. // Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
  612. // implementation for 64-bit ABIs such as SPARC V9.
  613. //
  614. // _I32LPx:
  615. // A compilation environment where 'int' is 32-bit, and
  616. // longs and pointers are simply the same size.
  617. //
  618. // In all cases, Char is 8 bits and Short is 16 bits.
  619. //
  620. // _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
  621. // This specifies the form of the disk VTOC (or label):
  622. //
  623. // _SUNOS_VTOC_8:
  624. // This is a VTOC form which is upwardly compatible with the
  625. // SunOS 4.x disk label and allows 8 partitions per disk.
  626. //
  627. // _SUNOS_VTOC_16:
  628. // In this format the incore vtoc image matches the ondisk
  629. // version. It allows 16 slices per disk, and is not
  630. // compatible with the SunOS 4.x disk label.
  631. //
  632. // Note that these are not the only two VTOC forms possible and
  633. // additional forms may be added. One possible form would be the
  634. // SVr4 VTOC form. The symbol for that is reserved now, although
  635. // it is not implemented.
  636. //
  637. // _SVR4_VTOC_16:
  638. // This VTOC form is compatible with the System V Release 4
  639. // VTOC (as implemented on the SVr4 Intel and 3b ports) with
  640. // 16 partitions per disk.
  641. //
  642. //
  643. // _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
  644. // This describes the type of addresses used by system DMA:
  645. //
  646. // _DMA_USES_PHYSADDR:
  647. // This type of DMA, used in the x86 implementation,
  648. // requires physical addresses for DMA buffers. The 24-bit
  649. // addresses used by some legacy boards is the source of the
  650. // "low-memory" (<16MB) requirement for some devices using DMA.
  651. //
  652. // _DMA_USES_VIRTADDR:
  653. // This method of DMA allows the use of virtual addresses for
  654. // DMA transfers.
  655. //
  656. // _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
  657. // This indicates the presence/absence of an fdisk table.
  658. //
  659. // _FIRMWARE_NEEDS_FDISK
  660. // The fdisk table is required by system firmware. If present,
  661. // it allows a disk to be subdivided into multiple fdisk
  662. // partitions, each of which is equivalent to a separate,
  663. // virtual disk. This enables the co-existence of multiple
  664. // operating systems on a shared hard disk.
  665. //
  666. // _NO_FDISK_PRESENT
  667. // If the fdisk table is absent, it is assumed that the entire
  668. // media is allocated for a single operating system.
  669. //
  670. // _HAVE_TEM_FIRMWARE
  671. // Defined if this architecture has the (fallback) option of
  672. // using prom_* calls for doing I/O if a suitable kernel driver
  673. // is not available to do it.
  674. //
  675. // _DONT_USE_1275_GENERIC_NAMES
  676. // Controls whether or not device tree node names should
  677. // comply with the IEEE 1275 "Generic Names" Recommended
  678. // Practice. With _DONT_USE_GENERIC_NAMES, device-specific
  679. // names identifying the particular device will be used.
  680. //
  681. // __i386_COMPAT
  682. // This indicates whether the i386 ABI is supported as a *non-native*
  683. // mode for the platform. When this symbol is defined:
  684. // - 32-bit xstat-style system calls are enabled
  685. // - 32-bit xmknod-style system calls are enabled
  686. // - 32-bit system calls use i386 sizes -and- alignments
  687. //
  688. // Note that this is NOT defined for the i386 native environment!
  689. //
  690. // __x86
  691. // This is ONLY a synonym for defined(__i386) || defined(__amd64)
  692. // which is useful only insofar as these two architectures share
  693. // common attributes. Analogous to __sparc.
  694. //
  695. // _PSM_MODULES
  696. // This indicates whether or not the implementation uses PSM
  697. // modules for processor support, reading /etc/mach from inside
  698. // the kernel to extract a list.
  699. //
  700. // _RTC_CONFIG
  701. // This indicates whether or not the implementation uses /etc/rtc_config
  702. // to configure the real-time clock in the kernel.
  703. //
  704. // _UNIX_KRTLD
  705. // This indicates that the implementation uses a dynamically
  706. // linked unix + krtld to form the core kernel image at boot
  707. // time, or (in the absence of this symbol) a prelinked kernel image.
  708. //
  709. // _OBP
  710. // This indicates the firmware interface is OBP.
  711. //
  712. // _SOFT_HOSTID
  713. // This indicates that the implementation obtains the hostid
  714. // from the file /etc/hostid, rather than from hardware.
  715. // The following set of definitions characterize Solaris on AMD's
  716. // 64-bit systems.
  717. // Define the appropriate "processor characteristics"
  718. // Different alignment constraints for the i386 ABI in compatibility mode
  719. // Define the appropriate "implementation choices".
  720. // The feature test macro __i386 is generic for all processors implementing
  721. // the Intel 386 instruction set or a superset of it. Specifically, this
  722. // includes all members of the 386, 486, and Pentium family of processors.
  723. // Values of _POSIX_C_SOURCE
  724. //
  725. // undefined not a POSIX compilation
  726. // 1 POSIX.1-1990 compilation
  727. // 2 POSIX.2-1992 compilation
  728. // 199309L POSIX.1b-1993 compilation (Real Time)
  729. // 199506L POSIX.1c-1995 compilation (POSIX Threads)
  730. // 200112L POSIX.1-2001 compilation (Austin Group Revision)
  731. // 200809L POSIX.1-2008 compilation
  732. // The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
  733. // and _STDC_C99 are Sun implementation specific macros created in order to
  734. // compress common standards specified feature test macros for easier reading.
  735. // These macros should not be used by the application developer as
  736. // unexpected results may occur. Instead, the user should reference
  737. // standards(7) for correct usage of the standards feature test macros.
  738. //
  739. // __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
  740. // X/Open or POSIX or in the negative, when neither
  741. // X/Open or POSIX defines a symbol.
  742. //
  743. // _STRICT_STDC __STDC__ is specified by the C Standards and defined
  744. // by the compiler. For Sun compilers the value of
  745. // __STDC__ is either 1, 0, or not defined based on the
  746. // compilation mode (see cc(1)). When the value of
  747. // __STDC__ is 1 and in the absence of any other feature
  748. // test macros, the namespace available to the application
  749. // is limited to only those symbols defined by the C
  750. // Standard. _STRICT_STDC provides a more readable means
  751. // of identifying symbols defined by the standard, or in
  752. // the negative, symbols that are extensions to the C
  753. // Standard. See additional comments for GNU C differences.
  754. //
  755. // _STDC_C99 __STDC_VERSION__ is specified by the C standards and
  756. // defined by the compiler and indicates the version of
  757. // the C standard. A value of 199901L indicates a
  758. // compiler that complies with ISO/IEC 9899:1999, other-
  759. // wise known as the C99 standard.
  760. //
  761. // _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
  762. // is 201112L indicating a compiler that compiles with
  763. // ISO/IEC 9899:2011, otherwise known as the C11 standard.
  764. //
  765. // _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
  766. // by the standards, and the user has not explicitly
  767. // relaxed the strictness via __EXTENSIONS__.
  768. // ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
  769. // 99899:2011 specify the following predefined macro name:
  770. //
  771. // __STDC__ The integer constant 1, intended to indicate a conforming
  772. // implementation.
  773. //
  774. // Furthermore, a strictly conforming program shall use only those features
  775. // of the language and library specified in these standards. A conforming
  776. // implementation shall accept any strictly conforming program.
  777. //
  778. // Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
  779. // strictly conforming environments and __STDC__ to 0 for environments that
  780. // use ANSI C semantics but allow extensions to the C standard. For non-ANSI
  781. // C semantics, Sun's C compiler does not define __STDC__.
  782. //
  783. // The GNU C project interpretation is that __STDC__ should always be defined
  784. // to 1 for compilation modes that accept ANSI C syntax regardless of whether
  785. // or not extensions to the C standard are used. Violations of conforming
  786. // behavior are conditionally flagged as warnings via the use of the
  787. // -pedantic option. In addition to defining __STDC__ to 1, the GNU C
  788. // compiler also defines __STRICT_ANSI__ as a means of specifying strictly
  789. // conforming environments using the -ansi or -std=<standard> options.
  790. //
  791. // In the absence of any other compiler options, Sun and GNU set the value
  792. // of __STDC__ as follows when using the following options:
  793. //
  794. // Value of __STDC__ __STRICT_ANSI__
  795. //
  796. // cc -Xa (default) 0 undefined
  797. // cc -Xt (transitional) 0 undefined
  798. // cc -Xc (strictly conforming) 1 undefined
  799. // cc -Xs (K&R C) undefined undefined
  800. //
  801. // gcc (default) 1 undefined
  802. // gcc -ansi, -std={c89, c99,...) 1 defined
  803. // gcc -traditional (K&R) undefined undefined
  804. //
  805. // The default compilation modes for Sun C compilers versus GNU C compilers
  806. // results in a differing value for __STDC__ which results in a more
  807. // restricted namespace when using Sun compilers. To allow both GNU and Sun
  808. // interpretations to peacefully co-exist, we use the following Sun
  809. // implementation _STRICT_STDC_ macro:
  810. // Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
  811. // Use strict symbol visibility.
  812. // This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
  813. // governed by POSIX, but have not been governed by ISO C. One can go two ways
  814. // on what should happen if an application actively includes (not transitively)
  815. // a header that isn't part of the ISO C spec, we opt to say that if someone has
  816. // gone out of there way then they're doing it for a reason and that is an act
  817. // of non-compliance and therefore it's not up to us to hide away every symbol.
  818. //
  819. // In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
  820. // cases where in the past we have only used a POSIX related check and we don't
  821. // wish to make something stricter. Often applications are relying on the
  822. // ability to, or more realistically unwittingly, have _STRICT_STDC declared and
  823. // still use these interfaces.
  824. // Large file interfaces:
  825. //
  826. // _LARGEFILE_SOURCE
  827. // 1 large file-related additions to POSIX
  828. // interfaces requested (fseeko, etc.)
  829. // _LARGEFILE64_SOURCE
  830. // 1 transitional large-file-related interfaces
  831. // requested (seek64, stat64, etc.)
  832. //
  833. // The corresponding announcement macros are respectively:
  834. // _LFS_LARGEFILE
  835. // _LFS64_LARGEFILE
  836. // (These are set in <unistd.h>.)
  837. //
  838. // Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
  839. // well.
  840. //
  841. // The large file interfaces are made visible regardless of the initial values
  842. // of the feature test macros under certain circumstances:
  843. // - If no explicit standards-conforming environment is requested (neither
  844. // of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
  845. // __STDC__ does not imply standards conformance).
  846. // - Extended system interfaces are explicitly requested (__EXTENSIONS__
  847. // is defined).
  848. // - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
  849. // defined). (Note that this dependency is an artifact of the current
  850. // kernel implementation and may change in future releases.)
  851. // Large file compilation environment control:
  852. //
  853. // The setting of _FILE_OFFSET_BITS controls the size of various file-related
  854. // types and governs the mapping between file-related source function symbol
  855. // names and the corresponding binary entry points.
  856. //
  857. // In the 32-bit environment, the default value is 32; if not set, set it to
  858. // the default here, to simplify tests in other headers.
  859. //
  860. // In the 64-bit compilation environment, the only value allowed is 64.
  861. // Use of _XOPEN_SOURCE
  862. //
  863. // The following X/Open specifications are supported:
  864. //
  865. // X/Open Portability Guide, Issue 3 (XPG3)
  866. // X/Open CAE Specification, Issue 4 (XPG4)
  867. // X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
  868. // X/Open CAE Specification, Issue 5 (XPG5)
  869. // Open Group Technical Standard, Issue 6 (XPG6), also referred to as
  870. // IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
  871. // Open Group Technical Standard, Issue 7 (XPG7), also referred to as
  872. // IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
  873. //
  874. // XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
  875. // XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
  876. // Version 2 (SUSv2)
  877. // XPG6 is the result of a merge of the X/Open and POSIX specifications
  878. // and as such is also referred to as IEEE Std. 1003.1-2001 in
  879. // addition to UNIX 03 and SUSv3.
  880. // XPG7 is also referred to as UNIX 08 and SUSv4.
  881. //
  882. // When writing a conforming X/Open application, as per the specification
  883. // requirements, the appropriate feature test macros must be defined at
  884. // compile time. These are as follows. For more info, see standards(7).
  885. //
  886. // Feature Test Macro Specification
  887. // ------------------------------------------------ -------------
  888. // _XOPEN_SOURCE XPG3
  889. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  890. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  891. // _XOPEN_SOURCE = 500 XPG5
  892. // _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
  893. // _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
  894. //
  895. // In order to simplify the guards within the headers, the following
  896. // implementation private test macros have been created. Applications
  897. // must NOT use these private test macros as unexpected results will
  898. // occur.
  899. //
  900. // Note that in general, the use of these private macros is cumulative.
  901. // For example, the use of _XPG3 with no other restrictions on the X/Open
  902. // namespace will make the symbols visible for XPG3 through XPG6
  903. // compilation environments. The use of _XPG4_2 with no other X/Open
  904. // namespace restrictions indicates that the symbols were introduced in
  905. // XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
  906. // environments, but not for XPG3 or XPG4 compilation environments.
  907. //
  908. // _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
  909. // _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
  910. // _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
  911. // _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
  912. // _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
  913. // _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
  914. // X/Open Portability Guide, Issue 3
  915. // _XOPEN_VERSION is defined by the X/Open specifications and is not
  916. // normally defined by the application, except in the case of an XPG4
  917. // application. On the implementation side, _XOPEN_VERSION defined with
  918. // the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
  919. // with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
  920. // _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
  921. // application and with a value of 600 indicates an XPG6 (UNIX 03)
  922. // application and with a value of 700 indicates an XPG7 (UNIX 08).
  923. // The appropriate version is determined by the use of the
  924. // feature test macros described earlier. The value of _XOPEN_VERSION
  925. // defaults to 3 otherwise indicating support for XPG3 applications.
  926. // ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
  927. // conforming environments. ISO 9899:1999 says it does.
  928. //
  929. // The presence of _LONGLONG_TYPE says "long long exists" which is therefore
  930. // defined in all but strictly conforming environments that disallow it.
  931. // The following macro defines a value for the ISO C99 restrict
  932. // keyword so that _RESTRICT_KYWD resolves to "restrict" if
  933. // an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
  934. // if any other compiler is used. This allows for the use of single
  935. // prototype declarations regardless of compiler version.
  936. // The following macro defines a value for the ISO C11 _Noreturn
  937. // keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
  938. // an ISO C11 compiler is used and "" (null string) if any other
  939. // compiler is used. This allows for the use of single prototype
  940. // declarations regardless of compiler version.
  941. // ISO/IEC 9899:2011 Annex K
  942. // The following macro indicates header support for the ANSI C++
  943. // standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
  944. // The following macro indicates header support for the C99 standard,
  945. // ISO/IEC 9899:1999, Programming Languages - C.
  946. // The following macro indicates header support for the C11 standard,
  947. // ISO/IEC 9899:2011, Programming Languages - C.
  948. // The following macro indicates header support for the C11 standard,
  949. // ISO/IEC 9899:2011 Annex K, Programming Languages - C.
  950. // The following macro indicates header support for DTrace. The value is an
  951. // integer that corresponds to the major version number for DTrace.
  952. // CDDL HEADER START
  953. //
  954. // The contents of this file are subject to the terms of the
  955. // Common Development and Distribution License (the "License").
  956. // You may not use this file except in compliance with the License.
  957. //
  958. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  959. // or http://www.opensolaris.org/os/licensing.
  960. // See the License for the specific language governing permissions
  961. // and limitations under the License.
  962. //
  963. // When distributing Covered Code, include this CDDL HEADER in each
  964. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  965. // If applicable, add the following below this CDDL HEADER, with the
  966. // fields enclosed by brackets "[]" replaced with your own identifying
  967. // information: Portions Copyright [yyyy] [name of copyright owner]
  968. //
  969. // CDDL HEADER END
  970. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  971. // All Rights Reserved
  972. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  973. // Use is subject to license terms.
  974. //
  975. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  976. // Copyright 2016 Joyent, Inc.
  977. // Copyright 2021 Oxide Computer Company
  978. // DO NOT EDIT THIS FILE.
  979. //
  980. // It has been auto-edited by fixincludes from:
  981. //
  982. // "/usr/include/sys/feature_tests.h"
  983. //
  984. // This had to be done to correct non-standard usages in the
  985. // original, manufacturer supplied header file.
  986. // CDDL HEADER START
  987. //
  988. // The contents of this file are subject to the terms of the
  989. // Common Development and Distribution License (the "License").
  990. // You may not use this file except in compliance with the License.
  991. //
  992. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  993. // or http://www.opensolaris.org/os/licensing.
  994. // See the License for the specific language governing permissions
  995. // and limitations under the License.
  996. //
  997. // When distributing Covered Code, include this CDDL HEADER in each
  998. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  999. // If applicable, add the following below this CDDL HEADER, with the
  1000. // fields enclosed by brackets "[]" replaced with your own identifying
  1001. // information: Portions Copyright [yyyy] [name of copyright owner]
  1002. //
  1003. // CDDL HEADER END
  1004. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1005. // Copyright 2016 Joyent, Inc.
  1006. // Copyright 2022 Oxide Computer Company
  1007. //
  1008. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1009. // Use is subject to license terms.
  1010. // CDDL HEADER START
  1011. //
  1012. // The contents of this file are subject to the terms of the
  1013. // Common Development and Distribution License (the "License").
  1014. // You may not use this file except in compliance with the License.
  1015. //
  1016. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1017. // or http://www.opensolaris.org/os/licensing.
  1018. // See the License for the specific language governing permissions
  1019. // and limitations under the License.
  1020. //
  1021. //
  1022. // When distributing Covered Code, include this CDDL HEADER in each
  1023. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1024. // If applicable, add the following below this CDDL HEADER, with the
  1025. // fields enclosed by brackets "[]" replaced with your own identifying
  1026. // information: Portions Copyright [yyyy] [name of copyright owner]
  1027. //
  1028. // CDDL HEADER END
  1029. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  1030. // Use is subject to license terms.
  1031. // Copyright 2016 Joyent, Inc.
  1032. // Machine dependent definitions moved to <sys/machtypes.h>.
  1033. // CDDL HEADER START
  1034. //
  1035. // The contents of this file are subject to the terms of the
  1036. // Common Development and Distribution License (the "License").
  1037. // You may not use this file except in compliance with the License.
  1038. //
  1039. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1040. // or http://www.opensolaris.org/os/licensing.
  1041. // See the License for the specific language governing permissions
  1042. // and limitations under the License.
  1043. //
  1044. // When distributing Covered Code, include this CDDL HEADER in each
  1045. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1046. // If applicable, add the following below this CDDL HEADER, with the
  1047. // fields enclosed by brackets "[]" replaced with your own identifying
  1048. // information: Portions Copyright [yyyy] [name of copyright owner]
  1049. //
  1050. // CDDL HEADER END
  1051. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  1052. // Use is subject to license terms.
  1053. // Machine dependent types:
  1054. //
  1055. // intel ia32 Version
  1056. type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
  1057. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  1058. // Use is subject to license terms.
  1059. //
  1060. // Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  1061. // Copyright 2015, Joyent, Inc.
  1062. // Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  1063. // Copyright (c) 1982, 1986 Regents of the University of California.
  1064. // All rights reserved.
  1065. //
  1066. // Redistribution and use in source and binary forms are permitted
  1067. // provided that this notice is preserved and that due credit is given
  1068. // to the University of California at Berkeley. The name of the University
  1069. // may not be used to endorse or promote products derived from this
  1070. // software without specific prior written permission. This software
  1071. // is provided ``as is'' without express or implied warranty.
  1072. // Constants and structures defined by the internet system,
  1073. // according to following documents
  1074. //
  1075. // Internet ASSIGNED NUMBERS (RFC1700) and its successors:
  1076. // http://www.iana.org/assignments/protocol-numbers
  1077. // http://www.iana.org/assignments/port-numbers
  1078. // Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
  1079. //
  1080. // DO NOT EDIT THIS FILE.
  1081. //
  1082. // It has been auto-edited by fixincludes from:
  1083. //
  1084. // "/usr/include/sys/feature_tests.h"
  1085. //
  1086. // This had to be done to correct non-standard usages in the
  1087. // original, manufacturer supplied header file.
  1088. // CDDL HEADER START
  1089. //
  1090. // The contents of this file are subject to the terms of the
  1091. // Common Development and Distribution License (the "License").
  1092. // You may not use this file except in compliance with the License.
  1093. //
  1094. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1095. // or http://www.opensolaris.org/os/licensing.
  1096. // See the License for the specific language governing permissions
  1097. // and limitations under the License.
  1098. //
  1099. // When distributing Covered Code, include this CDDL HEADER in each
  1100. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1101. // If applicable, add the following below this CDDL HEADER, with the
  1102. // fields enclosed by brackets "[]" replaced with your own identifying
  1103. // information: Portions Copyright [yyyy] [name of copyright owner]
  1104. //
  1105. // CDDL HEADER END
  1106. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1107. // Copyright 2016 Joyent, Inc.
  1108. // Copyright 2022 Oxide Computer Company
  1109. //
  1110. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1111. // Use is subject to license terms.
  1112. // CDDL HEADER START
  1113. //
  1114. // The contents of this file are subject to the terms of the
  1115. // Common Development and Distribution License, Version 1.0 only
  1116. // (the "License"). You may not use this file except in compliance
  1117. // with the License.
  1118. //
  1119. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1120. // or http://www.opensolaris.org/os/licensing.
  1121. // See the License for the specific language governing permissions
  1122. // and limitations under the License.
  1123. //
  1124. // When distributing Covered Code, include this CDDL HEADER in each
  1125. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1126. // If applicable, add the following below this CDDL HEADER, with the
  1127. // fields enclosed by brackets "[]" replaced with your own identifying
  1128. // information: Portions Copyright [yyyy] [name of copyright owner]
  1129. //
  1130. // CDDL HEADER END
  1131. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  1132. // Use is subject to license terms.
  1133. // Copyright 2015 EveryCity Ltd. All rights reserved.
  1134. // Copyright 2019 Joyent, Inc.
  1135. // This file contains definitions designed to enable different compilers
  1136. // to be used harmoniously on Solaris systems.
  1137. // Allow for version tests for compiler bugs and features.
  1138. // analogous to lint's PRINTFLIKEn
  1139. // Handle the kernel printf routines that can take '%b' too
  1140. // This one's pretty obvious -- the function never returns
  1141. // The function is 'extern inline' and expects GNU C89 behaviour, not C99
  1142. // behaviour.
  1143. //
  1144. // Should only be used on 'extern inline' definitions for GCC.
  1145. // The function has control flow such that it may return multiple times (in
  1146. // the manner of setjmp or vfork)
  1147. // This is an appropriate label for functions that do not
  1148. // modify their arguments, e.g. strlen()
  1149. // This is a stronger form of __pure__. Can be used for functions
  1150. // that do not modify their arguments and don't depend on global
  1151. // memory.
  1152. // This attribute, attached to a variable, means that the variable is meant to
  1153. // be possibly unused. GCC will not produce a warning for this variable.
  1154. // Shorthand versions for readability
  1155. // In release build, disable warnings about variables
  1156. // which are used only for debugging.
  1157. // CDDL HEADER START
  1158. //
  1159. // The contents of this file are subject to the terms of the
  1160. // Common Development and Distribution License (the "License").
  1161. // You may not use this file except in compliance with the License.
  1162. //
  1163. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1164. // or http://www.opensolaris.org/os/licensing.
  1165. // See the License for the specific language governing permissions
  1166. // and limitations under the License.
  1167. //
  1168. //
  1169. // When distributing Covered Code, include this CDDL HEADER in each
  1170. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1171. // If applicable, add the following below this CDDL HEADER, with the
  1172. // fields enclosed by brackets "[]" replaced with your own identifying
  1173. // information: Portions Copyright [yyyy] [name of copyright owner]
  1174. //
  1175. // CDDL HEADER END
  1176. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  1177. // Use is subject to license terms.
  1178. // Copyright 2016 Joyent, Inc.
  1179. // This header file serves to group a set of well known defines and to
  1180. // set these for each instruction set architecture. These defines may
  1181. // be divided into two groups; characteristics of the processor and
  1182. // implementation choices for Solaris on a processor.
  1183. //
  1184. // Processor Characteristics:
  1185. //
  1186. // _LITTLE_ENDIAN / _BIG_ENDIAN:
  1187. // The natural byte order of the processor. A pointer to an int points
  1188. // to the least/most significant byte of that int.
  1189. //
  1190. // _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
  1191. // The processor specific direction of stack growth. A push onto the
  1192. // stack increases/decreases the stack pointer, so it stores data at
  1193. // successively higher/lower addresses. (Stackless machines ignored
  1194. // without regrets).
  1195. //
  1196. // _LONG_LONG_HTOL / _LONG_LONG_LTOH:
  1197. // A pointer to a long long points to the most/least significant long
  1198. // within that long long.
  1199. //
  1200. // _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
  1201. // The C compiler assigns bit fields from the high/low to the low/high end
  1202. // of an int (most to least significant vs. least to most significant).
  1203. //
  1204. // _IEEE_754:
  1205. // The processor (or supported implementations of the processor)
  1206. // supports the ieee-754 floating point standard. No other floating
  1207. // point standards are supported (or significant). Any other supported
  1208. // floating point formats are expected to be cased on the ISA processor
  1209. // symbol.
  1210. //
  1211. // _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
  1212. // The C Compiler implements objects of type `char' as `unsigned' or
  1213. // `signed' respectively. This is really an implementation choice of
  1214. // the compiler writer, but it is specified in the ABI and tends to
  1215. // be uniform across compilers for an instruction set architecture.
  1216. // Hence, it has the properties of a processor characteristic.
  1217. //
  1218. // _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
  1219. // _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
  1220. // _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
  1221. // The ABI defines alignment requirements of each of the primitive
  1222. // object types. Some, if not all, may be hardware requirements as
  1223. // well. The values are expressed in "byte-alignment" units.
  1224. //
  1225. // _MAX_ALIGNMENT:
  1226. // The most stringent alignment requirement as specified by the ABI.
  1227. // Equal to the maximum of all the above _XXX_ALIGNMENT values.
  1228. //
  1229. // _MAX_ALIGNMENT_TYPE:
  1230. // The name of the C type that has the value descried in _MAX_ALIGNMENT.
  1231. //
  1232. // _ALIGNMENT_REQUIRED:
  1233. // True or false (1 or 0) whether or not the hardware requires the ABI
  1234. // alignment.
  1235. //
  1236. // _LONG_LONG_ALIGNMENT_32
  1237. // The 32-bit ABI supported by a 64-bit kernel may have different
  1238. // alignment requirements for primitive object types. The value of this
  1239. // identifier is expressed in "byte-alignment" units.
  1240. //
  1241. // _HAVE_CPUID_INSN
  1242. // This indicates that the architecture supports the 'cpuid'
  1243. // instruction as defined by Intel. (Intel allows other vendors
  1244. // to extend the instruction for their own purposes.)
  1245. //
  1246. //
  1247. // Implementation Choices:
  1248. //
  1249. // _ILP32 / _LP64:
  1250. // This specifies the compiler data type implementation as specified in
  1251. // the relevant ABI. The choice between these is strongly influenced
  1252. // by the underlying hardware, but is not absolutely tied to it.
  1253. // Currently only two data type models are supported:
  1254. //
  1255. // _ILP32:
  1256. // Int/Long/Pointer are 32 bits. This is the historical UNIX
  1257. // and Solaris implementation. Due to its historical standing,
  1258. // this is the default case.
  1259. //
  1260. // _LP64:
  1261. // Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
  1262. // implementation for 64-bit ABIs such as SPARC V9.
  1263. //
  1264. // _I32LPx:
  1265. // A compilation environment where 'int' is 32-bit, and
  1266. // longs and pointers are simply the same size.
  1267. //
  1268. // In all cases, Char is 8 bits and Short is 16 bits.
  1269. //
  1270. // _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
  1271. // This specifies the form of the disk VTOC (or label):
  1272. //
  1273. // _SUNOS_VTOC_8:
  1274. // This is a VTOC form which is upwardly compatible with the
  1275. // SunOS 4.x disk label and allows 8 partitions per disk.
  1276. //
  1277. // _SUNOS_VTOC_16:
  1278. // In this format the incore vtoc image matches the ondisk
  1279. // version. It allows 16 slices per disk, and is not
  1280. // compatible with the SunOS 4.x disk label.
  1281. //
  1282. // Note that these are not the only two VTOC forms possible and
  1283. // additional forms may be added. One possible form would be the
  1284. // SVr4 VTOC form. The symbol for that is reserved now, although
  1285. // it is not implemented.
  1286. //
  1287. // _SVR4_VTOC_16:
  1288. // This VTOC form is compatible with the System V Release 4
  1289. // VTOC (as implemented on the SVr4 Intel and 3b ports) with
  1290. // 16 partitions per disk.
  1291. //
  1292. //
  1293. // _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
  1294. // This describes the type of addresses used by system DMA:
  1295. //
  1296. // _DMA_USES_PHYSADDR:
  1297. // This type of DMA, used in the x86 implementation,
  1298. // requires physical addresses for DMA buffers. The 24-bit
  1299. // addresses used by some legacy boards is the source of the
  1300. // "low-memory" (<16MB) requirement for some devices using DMA.
  1301. //
  1302. // _DMA_USES_VIRTADDR:
  1303. // This method of DMA allows the use of virtual addresses for
  1304. // DMA transfers.
  1305. //
  1306. // _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
  1307. // This indicates the presence/absence of an fdisk table.
  1308. //
  1309. // _FIRMWARE_NEEDS_FDISK
  1310. // The fdisk table is required by system firmware. If present,
  1311. // it allows a disk to be subdivided into multiple fdisk
  1312. // partitions, each of which is equivalent to a separate,
  1313. // virtual disk. This enables the co-existence of multiple
  1314. // operating systems on a shared hard disk.
  1315. //
  1316. // _NO_FDISK_PRESENT
  1317. // If the fdisk table is absent, it is assumed that the entire
  1318. // media is allocated for a single operating system.
  1319. //
  1320. // _HAVE_TEM_FIRMWARE
  1321. // Defined if this architecture has the (fallback) option of
  1322. // using prom_* calls for doing I/O if a suitable kernel driver
  1323. // is not available to do it.
  1324. //
  1325. // _DONT_USE_1275_GENERIC_NAMES
  1326. // Controls whether or not device tree node names should
  1327. // comply with the IEEE 1275 "Generic Names" Recommended
  1328. // Practice. With _DONT_USE_GENERIC_NAMES, device-specific
  1329. // names identifying the particular device will be used.
  1330. //
  1331. // __i386_COMPAT
  1332. // This indicates whether the i386 ABI is supported as a *non-native*
  1333. // mode for the platform. When this symbol is defined:
  1334. // - 32-bit xstat-style system calls are enabled
  1335. // - 32-bit xmknod-style system calls are enabled
  1336. // - 32-bit system calls use i386 sizes -and- alignments
  1337. //
  1338. // Note that this is NOT defined for the i386 native environment!
  1339. //
  1340. // __x86
  1341. // This is ONLY a synonym for defined(__i386) || defined(__amd64)
  1342. // which is useful only insofar as these two architectures share
  1343. // common attributes. Analogous to __sparc.
  1344. //
  1345. // _PSM_MODULES
  1346. // This indicates whether or not the implementation uses PSM
  1347. // modules for processor support, reading /etc/mach from inside
  1348. // the kernel to extract a list.
  1349. //
  1350. // _RTC_CONFIG
  1351. // This indicates whether or not the implementation uses /etc/rtc_config
  1352. // to configure the real-time clock in the kernel.
  1353. //
  1354. // _UNIX_KRTLD
  1355. // This indicates that the implementation uses a dynamically
  1356. // linked unix + krtld to form the core kernel image at boot
  1357. // time, or (in the absence of this symbol) a prelinked kernel image.
  1358. //
  1359. // _OBP
  1360. // This indicates the firmware interface is OBP.
  1361. //
  1362. // _SOFT_HOSTID
  1363. // This indicates that the implementation obtains the hostid
  1364. // from the file /etc/hostid, rather than from hardware.
  1365. // The following set of definitions characterize Solaris on AMD's
  1366. // 64-bit systems.
  1367. // Define the appropriate "processor characteristics"
  1368. // Different alignment constraints for the i386 ABI in compatibility mode
  1369. // Define the appropriate "implementation choices".
  1370. // The feature test macro __i386 is generic for all processors implementing
  1371. // the Intel 386 instruction set or a superset of it. Specifically, this
  1372. // includes all members of the 386, 486, and Pentium family of processors.
  1373. // Values of _POSIX_C_SOURCE
  1374. //
  1375. // undefined not a POSIX compilation
  1376. // 1 POSIX.1-1990 compilation
  1377. // 2 POSIX.2-1992 compilation
  1378. // 199309L POSIX.1b-1993 compilation (Real Time)
  1379. // 199506L POSIX.1c-1995 compilation (POSIX Threads)
  1380. // 200112L POSIX.1-2001 compilation (Austin Group Revision)
  1381. // 200809L POSIX.1-2008 compilation
  1382. // The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
  1383. // and _STDC_C99 are Sun implementation specific macros created in order to
  1384. // compress common standards specified feature test macros for easier reading.
  1385. // These macros should not be used by the application developer as
  1386. // unexpected results may occur. Instead, the user should reference
  1387. // standards(7) for correct usage of the standards feature test macros.
  1388. //
  1389. // __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
  1390. // X/Open or POSIX or in the negative, when neither
  1391. // X/Open or POSIX defines a symbol.
  1392. //
  1393. // _STRICT_STDC __STDC__ is specified by the C Standards and defined
  1394. // by the compiler. For Sun compilers the value of
  1395. // __STDC__ is either 1, 0, or not defined based on the
  1396. // compilation mode (see cc(1)). When the value of
  1397. // __STDC__ is 1 and in the absence of any other feature
  1398. // test macros, the namespace available to the application
  1399. // is limited to only those symbols defined by the C
  1400. // Standard. _STRICT_STDC provides a more readable means
  1401. // of identifying symbols defined by the standard, or in
  1402. // the negative, symbols that are extensions to the C
  1403. // Standard. See additional comments for GNU C differences.
  1404. //
  1405. // _STDC_C99 __STDC_VERSION__ is specified by the C standards and
  1406. // defined by the compiler and indicates the version of
  1407. // the C standard. A value of 199901L indicates a
  1408. // compiler that complies with ISO/IEC 9899:1999, other-
  1409. // wise known as the C99 standard.
  1410. //
  1411. // _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
  1412. // is 201112L indicating a compiler that compiles with
  1413. // ISO/IEC 9899:2011, otherwise known as the C11 standard.
  1414. //
  1415. // _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
  1416. // by the standards, and the user has not explicitly
  1417. // relaxed the strictness via __EXTENSIONS__.
  1418. // ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
  1419. // 99899:2011 specify the following predefined macro name:
  1420. //
  1421. // __STDC__ The integer constant 1, intended to indicate a conforming
  1422. // implementation.
  1423. //
  1424. // Furthermore, a strictly conforming program shall use only those features
  1425. // of the language and library specified in these standards. A conforming
  1426. // implementation shall accept any strictly conforming program.
  1427. //
  1428. // Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
  1429. // strictly conforming environments and __STDC__ to 0 for environments that
  1430. // use ANSI C semantics but allow extensions to the C standard. For non-ANSI
  1431. // C semantics, Sun's C compiler does not define __STDC__.
  1432. //
  1433. // The GNU C project interpretation is that __STDC__ should always be defined
  1434. // to 1 for compilation modes that accept ANSI C syntax regardless of whether
  1435. // or not extensions to the C standard are used. Violations of conforming
  1436. // behavior are conditionally flagged as warnings via the use of the
  1437. // -pedantic option. In addition to defining __STDC__ to 1, the GNU C
  1438. // compiler also defines __STRICT_ANSI__ as a means of specifying strictly
  1439. // conforming environments using the -ansi or -std=<standard> options.
  1440. //
  1441. // In the absence of any other compiler options, Sun and GNU set the value
  1442. // of __STDC__ as follows when using the following options:
  1443. //
  1444. // Value of __STDC__ __STRICT_ANSI__
  1445. //
  1446. // cc -Xa (default) 0 undefined
  1447. // cc -Xt (transitional) 0 undefined
  1448. // cc -Xc (strictly conforming) 1 undefined
  1449. // cc -Xs (K&R C) undefined undefined
  1450. //
  1451. // gcc (default) 1 undefined
  1452. // gcc -ansi, -std={c89, c99,...) 1 defined
  1453. // gcc -traditional (K&R) undefined undefined
  1454. //
  1455. // The default compilation modes for Sun C compilers versus GNU C compilers
  1456. // results in a differing value for __STDC__ which results in a more
  1457. // restricted namespace when using Sun compilers. To allow both GNU and Sun
  1458. // interpretations to peacefully co-exist, we use the following Sun
  1459. // implementation _STRICT_STDC_ macro:
  1460. // Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
  1461. // Use strict symbol visibility.
  1462. // This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
  1463. // governed by POSIX, but have not been governed by ISO C. One can go two ways
  1464. // on what should happen if an application actively includes (not transitively)
  1465. // a header that isn't part of the ISO C spec, we opt to say that if someone has
  1466. // gone out of there way then they're doing it for a reason and that is an act
  1467. // of non-compliance and therefore it's not up to us to hide away every symbol.
  1468. //
  1469. // In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
  1470. // cases where in the past we have only used a POSIX related check and we don't
  1471. // wish to make something stricter. Often applications are relying on the
  1472. // ability to, or more realistically unwittingly, have _STRICT_STDC declared and
  1473. // still use these interfaces.
  1474. // Large file interfaces:
  1475. //
  1476. // _LARGEFILE_SOURCE
  1477. // 1 large file-related additions to POSIX
  1478. // interfaces requested (fseeko, etc.)
  1479. // _LARGEFILE64_SOURCE
  1480. // 1 transitional large-file-related interfaces
  1481. // requested (seek64, stat64, etc.)
  1482. //
  1483. // The corresponding announcement macros are respectively:
  1484. // _LFS_LARGEFILE
  1485. // _LFS64_LARGEFILE
  1486. // (These are set in <unistd.h>.)
  1487. //
  1488. // Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
  1489. // well.
  1490. //
  1491. // The large file interfaces are made visible regardless of the initial values
  1492. // of the feature test macros under certain circumstances:
  1493. // - If no explicit standards-conforming environment is requested (neither
  1494. // of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
  1495. // __STDC__ does not imply standards conformance).
  1496. // - Extended system interfaces are explicitly requested (__EXTENSIONS__
  1497. // is defined).
  1498. // - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
  1499. // defined). (Note that this dependency is an artifact of the current
  1500. // kernel implementation and may change in future releases.)
  1501. // Large file compilation environment control:
  1502. //
  1503. // The setting of _FILE_OFFSET_BITS controls the size of various file-related
  1504. // types and governs the mapping between file-related source function symbol
  1505. // names and the corresponding binary entry points.
  1506. //
  1507. // In the 32-bit environment, the default value is 32; if not set, set it to
  1508. // the default here, to simplify tests in other headers.
  1509. //
  1510. // In the 64-bit compilation environment, the only value allowed is 64.
  1511. // Use of _XOPEN_SOURCE
  1512. //
  1513. // The following X/Open specifications are supported:
  1514. //
  1515. // X/Open Portability Guide, Issue 3 (XPG3)
  1516. // X/Open CAE Specification, Issue 4 (XPG4)
  1517. // X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
  1518. // X/Open CAE Specification, Issue 5 (XPG5)
  1519. // Open Group Technical Standard, Issue 6 (XPG6), also referred to as
  1520. // IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
  1521. // Open Group Technical Standard, Issue 7 (XPG7), also referred to as
  1522. // IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
  1523. //
  1524. // XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
  1525. // XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
  1526. // Version 2 (SUSv2)
  1527. // XPG6 is the result of a merge of the X/Open and POSIX specifications
  1528. // and as such is also referred to as IEEE Std. 1003.1-2001 in
  1529. // addition to UNIX 03 and SUSv3.
  1530. // XPG7 is also referred to as UNIX 08 and SUSv4.
  1531. //
  1532. // When writing a conforming X/Open application, as per the specification
  1533. // requirements, the appropriate feature test macros must be defined at
  1534. // compile time. These are as follows. For more info, see standards(7).
  1535. //
  1536. // Feature Test Macro Specification
  1537. // ------------------------------------------------ -------------
  1538. // _XOPEN_SOURCE XPG3
  1539. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  1540. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  1541. // _XOPEN_SOURCE = 500 XPG5
  1542. // _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
  1543. // _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
  1544. //
  1545. // In order to simplify the guards within the headers, the following
  1546. // implementation private test macros have been created. Applications
  1547. // must NOT use these private test macros as unexpected results will
  1548. // occur.
  1549. //
  1550. // Note that in general, the use of these private macros is cumulative.
  1551. // For example, the use of _XPG3 with no other restrictions on the X/Open
  1552. // namespace will make the symbols visible for XPG3 through XPG6
  1553. // compilation environments. The use of _XPG4_2 with no other X/Open
  1554. // namespace restrictions indicates that the symbols were introduced in
  1555. // XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
  1556. // environments, but not for XPG3 or XPG4 compilation environments.
  1557. //
  1558. // _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
  1559. // _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
  1560. // _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
  1561. // _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
  1562. // _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
  1563. // _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
  1564. // X/Open Portability Guide, Issue 3
  1565. // _XOPEN_VERSION is defined by the X/Open specifications and is not
  1566. // normally defined by the application, except in the case of an XPG4
  1567. // application. On the implementation side, _XOPEN_VERSION defined with
  1568. // the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
  1569. // with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
  1570. // _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
  1571. // application and with a value of 600 indicates an XPG6 (UNIX 03)
  1572. // application and with a value of 700 indicates an XPG7 (UNIX 08).
  1573. // The appropriate version is determined by the use of the
  1574. // feature test macros described earlier. The value of _XOPEN_VERSION
  1575. // defaults to 3 otherwise indicating support for XPG3 applications.
  1576. // ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
  1577. // conforming environments. ISO 9899:1999 says it does.
  1578. //
  1579. // The presence of _LONGLONG_TYPE says "long long exists" which is therefore
  1580. // defined in all but strictly conforming environments that disallow it.
  1581. // The following macro defines a value for the ISO C99 restrict
  1582. // keyword so that _RESTRICT_KYWD resolves to "restrict" if
  1583. // an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
  1584. // if any other compiler is used. This allows for the use of single
  1585. // prototype declarations regardless of compiler version.
  1586. // The following macro defines a value for the ISO C11 _Noreturn
  1587. // keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
  1588. // an ISO C11 compiler is used and "" (null string) if any other
  1589. // compiler is used. This allows for the use of single prototype
  1590. // declarations regardless of compiler version.
  1591. // ISO/IEC 9899:2011 Annex K
  1592. // The following macro indicates header support for the ANSI C++
  1593. // standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
  1594. // The following macro indicates header support for the C99 standard,
  1595. // ISO/IEC 9899:1999, Programming Languages - C.
  1596. // The following macro indicates header support for the C11 standard,
  1597. // ISO/IEC 9899:2011, Programming Languages - C.
  1598. // The following macro indicates header support for the C11 standard,
  1599. // ISO/IEC 9899:2011 Annex K, Programming Languages - C.
  1600. // The following macro indicates header support for DTrace. The value is an
  1601. // integer that corresponds to the major version number for DTrace.
  1602. // CDDL HEADER START
  1603. //
  1604. // The contents of this file are subject to the terms of the
  1605. // Common Development and Distribution License (the "License").
  1606. // You may not use this file except in compliance with the License.
  1607. //
  1608. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1609. // or http://www.opensolaris.org/os/licensing.
  1610. // See the License for the specific language governing permissions
  1611. // and limitations under the License.
  1612. //
  1613. // When distributing Covered Code, include this CDDL HEADER in each
  1614. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1615. // If applicable, add the following below this CDDL HEADER, with the
  1616. // fields enclosed by brackets "[]" replaced with your own identifying
  1617. // information: Portions Copyright [yyyy] [name of copyright owner]
  1618. //
  1619. // CDDL HEADER END
  1620. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  1621. // All Rights Reserved
  1622. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  1623. // Use is subject to license terms.
  1624. //
  1625. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  1626. // Copyright 2016 Joyent, Inc.
  1627. // Copyright 2021 Oxide Computer Company
  1628. // DO NOT EDIT THIS FILE.
  1629. //
  1630. // It has been auto-edited by fixincludes from:
  1631. //
  1632. // "/usr/include/sys/feature_tests.h"
  1633. //
  1634. // This had to be done to correct non-standard usages in the
  1635. // original, manufacturer supplied header file.
  1636. // CDDL HEADER START
  1637. //
  1638. // The contents of this file are subject to the terms of the
  1639. // Common Development and Distribution License (the "License").
  1640. // You may not use this file except in compliance with the License.
  1641. //
  1642. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1643. // or http://www.opensolaris.org/os/licensing.
  1644. // See the License for the specific language governing permissions
  1645. // and limitations under the License.
  1646. //
  1647. // When distributing Covered Code, include this CDDL HEADER in each
  1648. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1649. // If applicable, add the following below this CDDL HEADER, with the
  1650. // fields enclosed by brackets "[]" replaced with your own identifying
  1651. // information: Portions Copyright [yyyy] [name of copyright owner]
  1652. //
  1653. // CDDL HEADER END
  1654. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1655. // Copyright 2016 Joyent, Inc.
  1656. // Copyright 2022 Oxide Computer Company
  1657. //
  1658. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1659. // Use is subject to license terms.
  1660. // CDDL HEADER START
  1661. //
  1662. // The contents of this file are subject to the terms of the
  1663. // Common Development and Distribution License (the "License").
  1664. // You may not use this file except in compliance with the License.
  1665. //
  1666. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1667. // or http://www.opensolaris.org/os/licensing.
  1668. // See the License for the specific language governing permissions
  1669. // and limitations under the License.
  1670. //
  1671. //
  1672. // When distributing Covered Code, include this CDDL HEADER in each
  1673. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1674. // If applicable, add the following below this CDDL HEADER, with the
  1675. // fields enclosed by brackets "[]" replaced with your own identifying
  1676. // information: Portions Copyright [yyyy] [name of copyright owner]
  1677. //
  1678. // CDDL HEADER END
  1679. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  1680. // Use is subject to license terms.
  1681. // Copyright 2016 Joyent, Inc.
  1682. // Machine dependent definitions moved to <sys/machtypes.h>.
  1683. // CDDL HEADER START
  1684. //
  1685. // The contents of this file are subject to the terms of the
  1686. // Common Development and Distribution License (the "License").
  1687. // You may not use this file except in compliance with the License.
  1688. //
  1689. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1690. // or http://www.opensolaris.org/os/licensing.
  1691. // See the License for the specific language governing permissions
  1692. // and limitations under the License.
  1693. //
  1694. // When distributing Covered Code, include this CDDL HEADER in each
  1695. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1696. // If applicable, add the following below this CDDL HEADER, with the
  1697. // fields enclosed by brackets "[]" replaced with your own identifying
  1698. // information: Portions Copyright [yyyy] [name of copyright owner]
  1699. //
  1700. // CDDL HEADER END
  1701. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  1702. // Use is subject to license terms.
  1703. // Machine dependent types:
  1704. //
  1705. // intel ia32 Version
  1706. type Label_t = X_label_t /* machtypes.h:59:54 */
  1707. type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
  1708. // Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
  1709. // committee's working draft for the revision of the current ISO C standard,
  1710. // ISO/IEC 9899:1990 Programming language - C. These are not currently
  1711. // required by any standard but constitute a useful, general purpose set
  1712. // of type definitions which is namespace clean with respect to all standards.
  1713. // CDDL HEADER START
  1714. //
  1715. // The contents of this file are subject to the terms of the
  1716. // Common Development and Distribution License, Version 1.0 only
  1717. // (the "License"). You may not use this file except in compliance
  1718. // with the License.
  1719. //
  1720. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1721. // or http://www.opensolaris.org/os/licensing.
  1722. // See the License for the specific language governing permissions
  1723. // and limitations under the License.
  1724. //
  1725. // When distributing Covered Code, include this CDDL HEADER in each
  1726. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1727. // If applicable, add the following below this CDDL HEADER, with the
  1728. // fields enclosed by brackets "[]" replaced with your own identifying
  1729. // information: Portions Copyright [yyyy] [name of copyright owner]
  1730. //
  1731. // CDDL HEADER END
  1732. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  1733. //
  1734. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  1735. // Use is subject to license terms.
  1736. // This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
  1737. // of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
  1738. // Programming language - C.
  1739. //
  1740. // Programs/Modules should not directly include this file. Access to the
  1741. // types defined in this file should be through the inclusion of one of the
  1742. // following files:
  1743. //
  1744. // <sys/types.h> Provides only the "_t" types defined in this
  1745. // file which is a subset of the contents of
  1746. // <inttypes.h>. (This can be appropriate for
  1747. // all programs/modules except those claiming
  1748. // ANSI-C conformance.)
  1749. //
  1750. // <sys/inttypes.h> Provides the Kernel and Driver appropriate
  1751. // components of <inttypes.h>.
  1752. //
  1753. // <inttypes.h> For use by applications.
  1754. //
  1755. // See these files for more details.
  1756. // DO NOT EDIT THIS FILE.
  1757. //
  1758. // It has been auto-edited by fixincludes from:
  1759. //
  1760. // "/usr/include/sys/feature_tests.h"
  1761. //
  1762. // This had to be done to correct non-standard usages in the
  1763. // original, manufacturer supplied header file.
  1764. // CDDL HEADER START
  1765. //
  1766. // The contents of this file are subject to the terms of the
  1767. // Common Development and Distribution License (the "License").
  1768. // You may not use this file except in compliance with the License.
  1769. //
  1770. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1771. // or http://www.opensolaris.org/os/licensing.
  1772. // See the License for the specific language governing permissions
  1773. // and limitations under the License.
  1774. //
  1775. // When distributing Covered Code, include this CDDL HEADER in each
  1776. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1777. // If applicable, add the following below this CDDL HEADER, with the
  1778. // fields enclosed by brackets "[]" replaced with your own identifying
  1779. // information: Portions Copyright [yyyy] [name of copyright owner]
  1780. //
  1781. // CDDL HEADER END
  1782. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1783. // Copyright 2016 Joyent, Inc.
  1784. // Copyright 2022 Oxide Computer Company
  1785. //
  1786. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1787. // Use is subject to license terms.
  1788. // Basic / Extended integer types
  1789. //
  1790. // The following defines the basic fixed-size integer types.
  1791. //
  1792. // Implementations are free to typedef them to Standard C integer types or
  1793. // extensions that they support. If an implementation does not support one
  1794. // of the particular integer data types below, then it should not define the
  1795. // typedefs and macros corresponding to that data type. Note that int8_t
  1796. // is not defined in -Xs mode on ISAs for which the ABI specifies "char"
  1797. // as an unsigned entity because there is no way to define an eight bit
  1798. // signed integral.
  1799. type Int8_t = int8 /* int_types.h:75:16 */
  1800. type Int16_t = int16 /* int_types.h:79:17 */
  1801. type Int32_t = int32 /* int_types.h:80:15 */
  1802. type Int64_t = int64 /* int_types.h:83:16 */
  1803. type Uint8_t = uint8 /* int_types.h:91:24 */
  1804. type Uint16_t = uint16 /* int_types.h:92:25 */
  1805. type Uint32_t = uint32 /* int_types.h:93:23 */
  1806. type Uint64_t = uint64 /* int_types.h:95:24 */
  1807. // intmax_t and uintmax_t are to be the longest (in number of bits) signed
  1808. // and unsigned integer types supported by the implementation.
  1809. type Intmax_t = int64 /* int_types.h:107:19 */
  1810. type Uintmax_t = uint64 /* int_types.h:108:19 */
  1811. // intptr_t and uintptr_t are signed and unsigned integer types large enough
  1812. // to hold any data pointer; that is, data pointers can be assigned into or
  1813. // from these integer types without losing precision.
  1814. type Intptr_t = int64 /* int_types.h:120:16 */
  1815. type Uintptr_t = uint64 /* int_types.h:121:24 */
  1816. // The following define the fastest integer types that can hold the
  1817. // specified number of bits.
  1818. type Int_fast8_t = int8 /* int_types.h:132:16 */
  1819. type Int_fast16_t = int32 /* int_types.h:136:15 */
  1820. type Int_fast32_t = int32 /* int_types.h:137:15 */
  1821. type Int_fast64_t = int64 /* int_types.h:139:16 */
  1822. type Uint_fast8_t = uint8 /* int_types.h:146:24 */
  1823. type Uint_fast16_t = uint32 /* int_types.h:147:23 */
  1824. type Uint_fast32_t = uint32 /* int_types.h:148:23 */
  1825. type Uint_fast64_t = uint64 /* int_types.h:150:24 */
  1826. // The following define the smallest integer types that can hold the
  1827. // specified number of bits.
  1828. type Int_least8_t = int8 /* int_types.h:162:16 */
  1829. type Int_least16_t = int16 /* int_types.h:166:17 */
  1830. type Int_least32_t = int32 /* int_types.h:167:15 */
  1831. type Int_least64_t = int64 /* int_types.h:169:16 */
  1832. // If these are changed, please update char16_t and char32_t in head/uchar.h.
  1833. type Uint_least8_t = uint8 /* int_types.h:179:24 */
  1834. type Uint_least16_t = uint16 /* int_types.h:180:25 */
  1835. type Uint_least32_t = uint32 /* int_types.h:181:23 */
  1836. type Uint_least64_t = uint64 /* int_types.h:183:24 */
  1837. // Strictly conforming ANSI C environments prior to the 1999
  1838. // revision of the C Standard (ISO/IEC 9899:1999) do not have
  1839. // the long long data type.
  1840. type Longlong_t = int64 /* types.h:72:20 */
  1841. type U_longlong_t = uint64 /* types.h:73:28 */
  1842. // These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
  1843. // to use them instead of int32_t and uint32_t because DEC had
  1844. // shipped 64-bit wide.
  1845. type T_scalar_t = int32 /* types.h:92:18 */
  1846. type T_uscalar_t = uint32 /* types.h:93:18 */
  1847. // POSIX Extensions
  1848. type Uchar_t = uint8 /* types.h:102:23 */
  1849. type Ushort_t = uint16 /* types.h:103:24 */
  1850. type Uint_t = uint32 /* types.h:104:22 */
  1851. type Ulong_t = uint64 /* types.h:105:23 */
  1852. type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
  1853. type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
  1854. type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
  1855. // VM-related types
  1856. type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
  1857. type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
  1858. type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
  1859. type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
  1860. type Sysid_t = int16 /* types.h:128:16 */
  1861. type Index_t = int16 /* types.h:129:16 */
  1862. type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
  1863. type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
  1864. // The size of off_t and related types depends on the setting of
  1865. // _FILE_OFFSET_BITS. (Note that other system headers define other types
  1866. // related to those defined here.)
  1867. //
  1868. // If _LARGEFILE64_SOURCE is defined, variants of these types that are
  1869. // explicitly 64 bits wide become available.
  1870. type Off_t = int64 /* types.h:145:15 */ // offsets within files
  1871. type Off64_t = int64 /* types.h:152:16 */ // offsets within files
  1872. type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
  1873. type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
  1874. type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
  1875. type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
  1876. type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
  1877. type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
  1878. type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
  1879. type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
  1880. type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
  1881. // The boolean_t type has had a varied amount of exposure over the years in
  1882. // terms of how its enumeration constants have been exposed. In particular, it
  1883. // originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
  1884. // B_TRUE and B_FALSE with an underscore. This check never included the
  1885. // question of if we were in a strict ANSI C environment or whether extensions
  1886. // were defined.
  1887. //
  1888. // Compilers such as clang started defaulting to always including an
  1889. // XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
  1890. // This would lead most software that had used the non-underscore versions to
  1891. // need it. As such, we have adjusted the non-strict XOPEN environment to retain
  1892. // its old behavior so as to minimize namespace pollution; however, we instead
  1893. // include both variants of the definitions in the generally visible version
  1894. // allowing software written in either world to hopefully end up in a good
  1895. // place.
  1896. //
  1897. // This isn't perfect, but should hopefully minimize the pain for folks actually
  1898. // trying to build software.
  1899. type Boolean_t = uint32 /* types.h:215:69 */
  1900. // The {u,}pad64_t types can be used in structures such that those structures
  1901. // may be accessed by code produced by compilation environments which don't
  1902. // support a 64 bit integral datatype. The intention is not to allow
  1903. // use of these fields in such environments, but to maintain the alignment
  1904. // and offsets of the structure.
  1905. //
  1906. // Similar comments for {u,}pad128_t.
  1907. //
  1908. // Note that these types do NOT generate any stronger alignment constraints
  1909. // than those available in the underlying ABI. See <sys/isa_defs.h>
  1910. type Pad64_t = int64 /* types.h:240:18 */
  1911. type Upad64_t = uint64 /* types.h:241:18 */
  1912. type Pad128_t = struct {
  1913. F_q float64
  1914. F__ccgo_pad1 [8]byte
  1915. } /* types.h:257:3 */
  1916. type Upad128_t = struct {
  1917. F_q float64
  1918. F__ccgo_pad1 [8]byte
  1919. } /* types.h:262:3 */
  1920. type Offset_t = int64 /* types.h:264:20 */
  1921. type U_offset_t = uint64 /* types.h:265:22 */
  1922. type Len_t = uint64 /* types.h:266:22 */
  1923. type Diskaddr_t = uint64 /* types.h:267:22 */
  1924. // Definitions remaining from previous partial support for 64-bit file
  1925. // offsets. This partial support for devices greater than 2gb requires
  1926. // compiler support for long long.
  1927. type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
  1928. type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
  1929. type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
  1930. // The following type is for various kinds of identifiers. The
  1931. // actual type must be the same for all since some system calls
  1932. // (such as sigsend) take arguments that may be any of these
  1933. // types. The enumeration type idtype_t defined in sys/procset.h
  1934. // is used to indicate what type of id is being specified --
  1935. // a process id, process group id, session id, scheduling class id,
  1936. // user id, group id, project id, task id or zone id.
  1937. type Id_t = int32 /* types.h:329:14 */
  1938. type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
  1939. // Type useconds_t is an unsigned integral type capable of storing
  1940. // values at least in the range of zero to 1,000,000.
  1941. type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
  1942. type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
  1943. // Typedefs for dev_t components.
  1944. type Major_t = uint32 /* types.h:351:16 */ // major part of device number
  1945. type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
  1946. // The data type of a thread priority.
  1947. type Pri_t = int16 /* types.h:361:15 */
  1948. // The data type for a CPU flags field. (Can be extended to larger unsigned
  1949. // types, if needed, limited by ability to update atomically.)
  1950. type Cpu_flag_t = uint16 /* types.h:367:18 */
  1951. // For compatibility reasons the following typedefs (prefixed o_)
  1952. // can't grow regardless of the EFT definition. Although,
  1953. // applications should not explicitly use these typedefs
  1954. // they may be included via a system header definition.
  1955. // WARNING: These typedefs may be removed in a future
  1956. // release.
  1957. //
  1958. // ex. the definitions in s5inode.h (now obsoleted)
  1959. // remained small to preserve compatibility
  1960. // in the S5 file system type.
  1961. type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
  1962. type O_dev_t = int16 /* types.h:381:15 */ // old device type
  1963. type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
  1964. type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
  1965. type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
  1966. type O_pid_t = int16 /* types.h:385:15 */ // old process id type
  1967. type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
  1968. // POSIX and XOPEN Declarations
  1969. type Key_t = int32 /* types.h:392:13 */ // IPC key type
  1970. type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
  1971. type Uid_t = uint32 /* types.h:401:22 */ // UID type
  1972. type Gid_t = uint32 /* types.h:404:15 */ // GID type
  1973. type Datalink_id_t = uint32 /* types.h:406:18 */
  1974. type Vrid_t = uint32 /* types.h:407:18 */
  1975. type Taskid_t = int32 /* types.h:409:17 */
  1976. type Projid_t = int32 /* types.h:410:17 */
  1977. type Poolid_t = int32 /* types.h:411:14 */
  1978. type Zoneid_t = int32 /* types.h:412:14 */
  1979. type Ctid_t = int32 /* types.h:413:14 */
  1980. // POSIX definitions are same as defined in thread.h and synch.h.
  1981. // Any changes made to here should be reflected in corresponding
  1982. // files as described in comments.
  1983. type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
  1984. type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
  1985. // "Magic numbers" tagging synchronization object types
  1986. type X_pthread_mutex = struct {
  1987. F__pthread_mutex_flags struct {
  1988. F__pthread_mutex_flag1 uint16
  1989. F__pthread_mutex_flag2 uint8
  1990. F__pthread_mutex_ceiling uint8
  1991. F__pthread_mutex_type uint16
  1992. F__pthread_mutex_magic uint16
  1993. }
  1994. F__pthread_mutex_lock struct {
  1995. F__ccgo_pad1 [0]uint64
  1996. F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
  1997. }
  1998. F__pthread_mutex_data uint64
  1999. } /* types.h:429:9 */
  2000. // = thread_key_t in thread.h
  2001. // "Magic numbers" tagging synchronization object types
  2002. type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
  2003. type X_pthread_cond = struct {
  2004. F__pthread_cond_flags struct {
  2005. F__pthread_cond_flag [4]uint8
  2006. F__pthread_cond_type uint16
  2007. F__pthread_cond_magic uint16
  2008. }
  2009. F__pthread_cond_data uint64
  2010. } /* types.h:450:9 */
  2011. type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
  2012. // UNIX 98 Extension
  2013. type X_pthread_rwlock = struct {
  2014. F__pthread_rwlock_readers int32
  2015. F__pthread_rwlock_type uint16
  2016. F__pthread_rwlock_magic uint16
  2017. F__pthread_rwlock_mutex Pthread_mutex_t
  2018. F__pthread_rwlock_readercv Pthread_cond_t
  2019. F__pthread_rwlock_writercv Pthread_cond_t
  2020. } /* types.h:462:9 */
  2021. // UNIX 98 Extension
  2022. type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
  2023. // SUSV3
  2024. type Pthread_barrier_t = struct {
  2025. F__pthread_barrier_count uint32
  2026. F__pthread_barrier_current uint32
  2027. F__pthread_barrier_cycle uint64
  2028. F__pthread_barrier_reserved uint64
  2029. F__pthread_barrier_lock Pthread_mutex_t
  2030. F__pthread_barrier_cond Pthread_cond_t
  2031. } /* types.h:481:3 */
  2032. type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
  2033. // attributes for threads, dynamically allocated by library
  2034. type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
  2035. // attributes for threads, dynamically allocated by library
  2036. type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
  2037. // attributes for mutex, dynamically allocated by library
  2038. type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
  2039. // attributes for mutex, dynamically allocated by library
  2040. type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
  2041. // attributes for cond, dynamically allocated by library
  2042. type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
  2043. // attributes for cond, dynamically allocated by library
  2044. type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
  2045. // pthread_once
  2046. type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
  2047. // pthread_once
  2048. type Pthread_once_t = X_once /* types.h:511:3 */
  2049. // UNIX 98 Extensions
  2050. // attributes for rwlock, dynamically allocated by library
  2051. type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
  2052. // UNIX 98 Extensions
  2053. // attributes for rwlock, dynamically allocated by library
  2054. type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
  2055. // SUSV3
  2056. // attributes for pthread_barrier_t, dynamically allocated by library
  2057. type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
  2058. type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
  2059. type Nlink_t = uint32 /* types.h:532:16 */ // file link type
  2060. type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
  2061. type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
  2062. type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
  2063. type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
  2064. type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
  2065. type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
  2066. // BEGIN CSTYLED
  2067. type Unchar = uint8 /* types.h:580:23 */
  2068. type Ushort = uint16 /* types.h:581:24 */
  2069. type Uint = uint32 /* types.h:582:22 */
  2070. type Ulong = uint64 /* types.h:583:23 */
  2071. // END CSTYLED
  2072. // The following is the value of type id_t to use to indicate the
  2073. // caller's current id. See procset.h for the type idtype_t
  2074. // which defines which kind of id is being specified.
  2075. // The following value of type pfn_t is used to indicate
  2076. // invalid page frame number.
  2077. // BEGIN CSTYLED
  2078. type U_char = uint8 /* types.h:650:23 */
  2079. type U_short = uint16 /* types.h:651:24 */
  2080. type U_int = uint32 /* types.h:652:22 */
  2081. type U_long = uint64 /* types.h:653:23 */
  2082. type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
  2083. type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
  2084. type Quad = Quad_t /* types.h:655:17 */ // used by UFS
  2085. // END CSTYLED
  2086. // Nested include for BSD/sockets source compatibility.
  2087. // (The select macros used to be defined here).
  2088. // CDDL HEADER START
  2089. //
  2090. // The contents of this file are subject to the terms of the
  2091. // Common Development and Distribution License (the "License").
  2092. // You may not use this file except in compliance with the License.
  2093. //
  2094. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2095. // or http://www.opensolaris.org/os/licensing.
  2096. // See the License for the specific language governing permissions
  2097. // and limitations under the License.
  2098. //
  2099. // When distributing Covered Code, include this CDDL HEADER in each
  2100. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2101. // If applicable, add the following below this CDDL HEADER, with the
  2102. // fields enclosed by brackets "[]" replaced with your own identifying
  2103. // information: Portions Copyright [yyyy] [name of copyright owner]
  2104. //
  2105. // CDDL HEADER END
  2106. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2107. //
  2108. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2109. //
  2110. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  2111. // Use is subject to license terms.
  2112. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2113. // All Rights Reserved
  2114. // University Copyright- Copyright (c) 1982, 1986, 1988
  2115. // The Regents of the University of California
  2116. // All Rights Reserved
  2117. //
  2118. // University Acknowledgment- Portions of this document are derived from
  2119. // software developed by the University of California, Berkeley, and its
  2120. // contributors.
  2121. // DO NOT EDIT THIS FILE.
  2122. //
  2123. // It has been auto-edited by fixincludes from:
  2124. //
  2125. // "/usr/include/sys/feature_tests.h"
  2126. //
  2127. // This had to be done to correct non-standard usages in the
  2128. // original, manufacturer supplied header file.
  2129. // CDDL HEADER START
  2130. //
  2131. // The contents of this file are subject to the terms of the
  2132. // Common Development and Distribution License (the "License").
  2133. // You may not use this file except in compliance with the License.
  2134. //
  2135. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2136. // or http://www.opensolaris.org/os/licensing.
  2137. // See the License for the specific language governing permissions
  2138. // and limitations under the License.
  2139. //
  2140. // When distributing Covered Code, include this CDDL HEADER in each
  2141. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2142. // If applicable, add the following below this CDDL HEADER, with the
  2143. // fields enclosed by brackets "[]" replaced with your own identifying
  2144. // information: Portions Copyright [yyyy] [name of copyright owner]
  2145. //
  2146. // CDDL HEADER END
  2147. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2148. // Copyright 2016 Joyent, Inc.
  2149. // Copyright 2022 Oxide Computer Company
  2150. //
  2151. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2152. // Use is subject to license terms.
  2153. // CDDL HEADER START
  2154. //
  2155. // The contents of this file are subject to the terms of the
  2156. // Common Development and Distribution License, Version 1.0 only
  2157. // (the "License"). You may not use this file except in compliance
  2158. // with the License.
  2159. //
  2160. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2161. // or http://www.opensolaris.org/os/licensing.
  2162. // See the License for the specific language governing permissions
  2163. // and limitations under the License.
  2164. //
  2165. // When distributing Covered Code, include this CDDL HEADER in each
  2166. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2167. // If applicable, add the following below this CDDL HEADER, with the
  2168. // fields enclosed by brackets "[]" replaced with your own identifying
  2169. // information: Portions Copyright [yyyy] [name of copyright owner]
  2170. //
  2171. // CDDL HEADER END
  2172. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  2173. // Use is subject to license terms.
  2174. // Implementation-private. This header should not be included
  2175. // directly by an application. The application should instead
  2176. // include <time.h> which includes this header conditionally
  2177. // depending on which feature test macros are defined. By default,
  2178. // this header is included by <time.h>. X/Open and POSIX
  2179. // standards requirements result in this header being included
  2180. // by <time.h> only under a restricted set of conditions.
  2181. // DO NOT EDIT THIS FILE.
  2182. //
  2183. // It has been auto-edited by fixincludes from:
  2184. //
  2185. // "/usr/include/sys/feature_tests.h"
  2186. //
  2187. // This had to be done to correct non-standard usages in the
  2188. // original, manufacturer supplied header file.
  2189. // CDDL HEADER START
  2190. //
  2191. // The contents of this file are subject to the terms of the
  2192. // Common Development and Distribution License (the "License").
  2193. // You may not use this file except in compliance with the License.
  2194. //
  2195. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2196. // or http://www.opensolaris.org/os/licensing.
  2197. // See the License for the specific language governing permissions
  2198. // and limitations under the License.
  2199. //
  2200. // When distributing Covered Code, include this CDDL HEADER in each
  2201. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2202. // If applicable, add the following below this CDDL HEADER, with the
  2203. // fields enclosed by brackets "[]" replaced with your own identifying
  2204. // information: Portions Copyright [yyyy] [name of copyright owner]
  2205. //
  2206. // CDDL HEADER END
  2207. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2208. // Copyright 2016 Joyent, Inc.
  2209. // Copyright 2022 Oxide Computer Company
  2210. //
  2211. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2212. // Use is subject to license terms.
  2213. // Time expressed in seconds and nanoseconds
  2214. type Timespec = struct {
  2215. Ftv_sec int64
  2216. Ftv_nsec int64
  2217. } /* time_impl.h:57:9 */
  2218. // used by UFS
  2219. // END CSTYLED
  2220. // Nested include for BSD/sockets source compatibility.
  2221. // (The select macros used to be defined here).
  2222. // CDDL HEADER START
  2223. //
  2224. // The contents of this file are subject to the terms of the
  2225. // Common Development and Distribution License (the "License").
  2226. // You may not use this file except in compliance with the License.
  2227. //
  2228. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2229. // or http://www.opensolaris.org/os/licensing.
  2230. // See the License for the specific language governing permissions
  2231. // and limitations under the License.
  2232. //
  2233. // When distributing Covered Code, include this CDDL HEADER in each
  2234. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2235. // If applicable, add the following below this CDDL HEADER, with the
  2236. // fields enclosed by brackets "[]" replaced with your own identifying
  2237. // information: Portions Copyright [yyyy] [name of copyright owner]
  2238. //
  2239. // CDDL HEADER END
  2240. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2241. //
  2242. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2243. //
  2244. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  2245. // Use is subject to license terms.
  2246. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2247. // All Rights Reserved
  2248. // University Copyright- Copyright (c) 1982, 1986, 1988
  2249. // The Regents of the University of California
  2250. // All Rights Reserved
  2251. //
  2252. // University Acknowledgment- Portions of this document are derived from
  2253. // software developed by the University of California, Berkeley, and its
  2254. // contributors.
  2255. // DO NOT EDIT THIS FILE.
  2256. //
  2257. // It has been auto-edited by fixincludes from:
  2258. //
  2259. // "/usr/include/sys/feature_tests.h"
  2260. //
  2261. // This had to be done to correct non-standard usages in the
  2262. // original, manufacturer supplied header file.
  2263. // CDDL HEADER START
  2264. //
  2265. // The contents of this file are subject to the terms of the
  2266. // Common Development and Distribution License (the "License").
  2267. // You may not use this file except in compliance with the License.
  2268. //
  2269. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2270. // or http://www.opensolaris.org/os/licensing.
  2271. // See the License for the specific language governing permissions
  2272. // and limitations under the License.
  2273. //
  2274. // When distributing Covered Code, include this CDDL HEADER in each
  2275. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2276. // If applicable, add the following below this CDDL HEADER, with the
  2277. // fields enclosed by brackets "[]" replaced with your own identifying
  2278. // information: Portions Copyright [yyyy] [name of copyright owner]
  2279. //
  2280. // CDDL HEADER END
  2281. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2282. // Copyright 2016 Joyent, Inc.
  2283. // Copyright 2022 Oxide Computer Company
  2284. //
  2285. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2286. // Use is subject to license terms.
  2287. // CDDL HEADER START
  2288. //
  2289. // The contents of this file are subject to the terms of the
  2290. // Common Development and Distribution License, Version 1.0 only
  2291. // (the "License"). You may not use this file except in compliance
  2292. // with the License.
  2293. //
  2294. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2295. // or http://www.opensolaris.org/os/licensing.
  2296. // See the License for the specific language governing permissions
  2297. // and limitations under the License.
  2298. //
  2299. // When distributing Covered Code, include this CDDL HEADER in each
  2300. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2301. // If applicable, add the following below this CDDL HEADER, with the
  2302. // fields enclosed by brackets "[]" replaced with your own identifying
  2303. // information: Portions Copyright [yyyy] [name of copyright owner]
  2304. //
  2305. // CDDL HEADER END
  2306. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  2307. // Use is subject to license terms.
  2308. // Implementation-private. This header should not be included
  2309. // directly by an application. The application should instead
  2310. // include <time.h> which includes this header conditionally
  2311. // depending on which feature test macros are defined. By default,
  2312. // this header is included by <time.h>. X/Open and POSIX
  2313. // standards requirements result in this header being included
  2314. // by <time.h> only under a restricted set of conditions.
  2315. // DO NOT EDIT THIS FILE.
  2316. //
  2317. // It has been auto-edited by fixincludes from:
  2318. //
  2319. // "/usr/include/sys/feature_tests.h"
  2320. //
  2321. // This had to be done to correct non-standard usages in the
  2322. // original, manufacturer supplied header file.
  2323. // CDDL HEADER START
  2324. //
  2325. // The contents of this file are subject to the terms of the
  2326. // Common Development and Distribution License (the "License").
  2327. // You may not use this file except in compliance with the License.
  2328. //
  2329. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2330. // or http://www.opensolaris.org/os/licensing.
  2331. // See the License for the specific language governing permissions
  2332. // and limitations under the License.
  2333. //
  2334. // When distributing Covered Code, include this CDDL HEADER in each
  2335. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2336. // If applicable, add the following below this CDDL HEADER, with the
  2337. // fields enclosed by brackets "[]" replaced with your own identifying
  2338. // information: Portions Copyright [yyyy] [name of copyright owner]
  2339. //
  2340. // CDDL HEADER END
  2341. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2342. // Copyright 2016 Joyent, Inc.
  2343. // Copyright 2022 Oxide Computer Company
  2344. //
  2345. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2346. // Use is subject to license terms.
  2347. // Time expressed in seconds and nanoseconds
  2348. type Timespec_t = Timespec /* time_impl.h:60:3 */
  2349. type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
  2350. // The following has been left in for backward compatibility. Portable
  2351. // applications should not use the structure name timestruc.
  2352. // Timer specification
  2353. type Itimerspec = struct {
  2354. Fit_interval struct {
  2355. Ftv_sec int64
  2356. Ftv_nsec int64
  2357. }
  2358. Fit_value struct {
  2359. Ftv_sec int64
  2360. Ftv_nsec int64
  2361. }
  2362. } /* time_impl.h:95:9 */
  2363. // definition per SVr4
  2364. // The following has been left in for backward compatibility. Portable
  2365. // applications should not use the structure name timestruc.
  2366. // Timer specification
  2367. type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
  2368. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2369. // All Rights Reserved
  2370. // Copyright (c) 1982, 1986, 1993 Regents of the University of California.
  2371. // All rights reserved. The Berkeley software License Agreement
  2372. // specifies the terms and conditions for redistribution.
  2373. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2374. //
  2375. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  2376. // Use is subject to license terms.
  2377. //
  2378. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2379. // Copyright 2016 Joyent, Inc.
  2380. // Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  2381. // Copyright (c) 2013, 2016 by Delphix. All rights reserved.
  2382. // DO NOT EDIT THIS FILE.
  2383. //
  2384. // It has been auto-edited by fixincludes from:
  2385. //
  2386. // "/usr/include/sys/feature_tests.h"
  2387. //
  2388. // This had to be done to correct non-standard usages in the
  2389. // original, manufacturer supplied header file.
  2390. // CDDL HEADER START
  2391. //
  2392. // The contents of this file are subject to the terms of the
  2393. // Common Development and Distribution License (the "License").
  2394. // You may not use this file except in compliance with the License.
  2395. //
  2396. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2397. // or http://www.opensolaris.org/os/licensing.
  2398. // See the License for the specific language governing permissions
  2399. // and limitations under the License.
  2400. //
  2401. // When distributing Covered Code, include this CDDL HEADER in each
  2402. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2403. // If applicable, add the following below this CDDL HEADER, with the
  2404. // fields enclosed by brackets "[]" replaced with your own identifying
  2405. // information: Portions Copyright [yyyy] [name of copyright owner]
  2406. //
  2407. // CDDL HEADER END
  2408. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2409. // Copyright 2016 Joyent, Inc.
  2410. // Copyright 2022 Oxide Computer Company
  2411. //
  2412. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2413. // Use is subject to license terms.
  2414. // Structure returned by gettimeofday(2) system call,
  2415. // and used in other calls.
  2416. type Timeval = struct {
  2417. Ftv_sec int64
  2418. Ftv_usec int64
  2419. } /* time.h:54:1 */
  2420. type Timezone = struct {
  2421. Ftz_minuteswest int32
  2422. Ftz_dsttime int32
  2423. } /* time.h:86:1 */
  2424. // Needed for longlong_t type. Placement of this due to <sys/types.h>
  2425. // including <sys/select.h> which relies on the presense of the itimerval
  2426. // structure.
  2427. // CDDL HEADER START
  2428. //
  2429. // The contents of this file are subject to the terms of the
  2430. // Common Development and Distribution License (the "License").
  2431. // You may not use this file except in compliance with the License.
  2432. //
  2433. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2434. // or http://www.opensolaris.org/os/licensing.
  2435. // See the License for the specific language governing permissions
  2436. // and limitations under the License.
  2437. //
  2438. // When distributing Covered Code, include this CDDL HEADER in each
  2439. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2440. // If applicable, add the following below this CDDL HEADER, with the
  2441. // fields enclosed by brackets "[]" replaced with your own identifying
  2442. // information: Portions Copyright [yyyy] [name of copyright owner]
  2443. //
  2444. // CDDL HEADER END
  2445. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2446. // All Rights Reserved
  2447. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  2448. // Use is subject to license terms.
  2449. //
  2450. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2451. // Copyright 2016 Joyent, Inc.
  2452. // Copyright 2021 Oxide Computer Company
  2453. // Operations on timevals.
  2454. // Names of the interval timers, and structure
  2455. // defining a timer setting.
  2456. // time and when system is running on
  2457. // behalf of the process.
  2458. // time profiling of multithreaded
  2459. // programs.
  2460. type Itimerval = struct {
  2461. Fit_interval struct {
  2462. Ftv_sec int64
  2463. Ftv_usec int64
  2464. }
  2465. Fit_value struct {
  2466. Ftv_sec int64
  2467. Ftv_usec int64
  2468. }
  2469. } /* time.h:209:1 */
  2470. // Definitions for commonly used resolutions.
  2471. // Time expressed as a 64-bit nanosecond counter.
  2472. type Hrtime_t = int64 /* time.h:265:20 */
  2473. // The inclusion of <time.h> is historical and was added for
  2474. // backward compatibility in delta 1.2 when a number of definitions
  2475. // were moved out of <sys/time.h>. More recently, the timespec and
  2476. // itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
  2477. // _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
  2478. // which is now included by <time.h>. This change was due to POSIX
  2479. // 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
  2480. // non-X/Open applications, including this header will still make
  2481. // visible these definitions.
  2482. // CDDL HEADER START
  2483. //
  2484. // The contents of this file are subject to the terms of the
  2485. // Common Development and Distribution License (the "License").
  2486. // You may not use this file except in compliance with the License.
  2487. //
  2488. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2489. // or http://www.opensolaris.org/os/licensing.
  2490. // See the License for the specific language governing permissions
  2491. // and limitations under the License.
  2492. //
  2493. // When distributing Covered Code, include this CDDL HEADER in each
  2494. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2495. // If applicable, add the following below this CDDL HEADER, with the
  2496. // fields enclosed by brackets "[]" replaced with your own identifying
  2497. // information: Portions Copyright [yyyy] [name of copyright owner]
  2498. //
  2499. // CDDL HEADER END
  2500. // Copyright (c) 1988 AT&T
  2501. // All Rights Reserved
  2502. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2503. //
  2504. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  2505. // Use is subject to license terms.
  2506. // Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
  2507. // Copyright 2016 Joyent, Inc.
  2508. // DO NOT EDIT THIS FILE.
  2509. //
  2510. // It has been auto-edited by fixincludes from:
  2511. //
  2512. // "/usr/include/sys/feature_tests.h"
  2513. //
  2514. // This had to be done to correct non-standard usages in the
  2515. // original, manufacturer supplied header file.
  2516. // CDDL HEADER START
  2517. //
  2518. // The contents of this file are subject to the terms of the
  2519. // Common Development and Distribution License (the "License").
  2520. // You may not use this file except in compliance with the License.
  2521. //
  2522. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2523. // or http://www.opensolaris.org/os/licensing.
  2524. // See the License for the specific language governing permissions
  2525. // and limitations under the License.
  2526. //
  2527. // When distributing Covered Code, include this CDDL HEADER in each
  2528. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2529. // If applicable, add the following below this CDDL HEADER, with the
  2530. // fields enclosed by brackets "[]" replaced with your own identifying
  2531. // information: Portions Copyright [yyyy] [name of copyright owner]
  2532. //
  2533. // CDDL HEADER END
  2534. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2535. // Copyright 2016 Joyent, Inc.
  2536. // Copyright 2022 Oxide Computer Company
  2537. //
  2538. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2539. // Use is subject to license terms.
  2540. // CDDL HEADER START
  2541. //
  2542. // The contents of this file are subject to the terms of the
  2543. // Common Development and Distribution License, Version 1.0 only
  2544. // (the "License"). You may not use this file except in compliance
  2545. // with the License.
  2546. //
  2547. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2548. // or http://www.opensolaris.org/os/licensing.
  2549. // See the License for the specific language governing permissions
  2550. // and limitations under the License.
  2551. //
  2552. // When distributing Covered Code, include this CDDL HEADER in each
  2553. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2554. // If applicable, add the following below this CDDL HEADER, with the
  2555. // fields enclosed by brackets "[]" replaced with your own identifying
  2556. // information: Portions Copyright [yyyy] [name of copyright owner]
  2557. //
  2558. // CDDL HEADER END
  2559. // Copyright (c) 1988 AT&T
  2560. // All Rights Reserved
  2561. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2562. // Copyright 2014 PALO, Richard.
  2563. //
  2564. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  2565. // Use is subject to license terms.
  2566. // An application should not include this header directly. Instead it
  2567. // should be included only through the inclusion of other Sun headers.
  2568. //
  2569. // The contents of this header is limited to identifiers specified in the
  2570. // C Standard. Any new identifiers specified in future amendments to the
  2571. // C Standard must be placed in this header. If these new identifiers
  2572. // are required to also be in the C++ Standard "std" namespace, then for
  2573. // anything other than macro definitions, corresponding "using" directives
  2574. // must also be added to <time.h.h>.
  2575. // DO NOT EDIT THIS FILE.
  2576. //
  2577. // It has been auto-edited by fixincludes from:
  2578. //
  2579. // "/usr/include/sys/feature_tests.h"
  2580. //
  2581. // This had to be done to correct non-standard usages in the
  2582. // original, manufacturer supplied header file.
  2583. // CDDL HEADER START
  2584. //
  2585. // The contents of this file are subject to the terms of the
  2586. // Common Development and Distribution License (the "License").
  2587. // You may not use this file except in compliance with the License.
  2588. //
  2589. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2590. // or http://www.opensolaris.org/os/licensing.
  2591. // See the License for the specific language governing permissions
  2592. // and limitations under the License.
  2593. //
  2594. // When distributing Covered Code, include this CDDL HEADER in each
  2595. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2596. // If applicable, add the following below this CDDL HEADER, with the
  2597. // fields enclosed by brackets "[]" replaced with your own identifying
  2598. // information: Portions Copyright [yyyy] [name of copyright owner]
  2599. //
  2600. // CDDL HEADER END
  2601. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2602. // Copyright 2016 Joyent, Inc.
  2603. // Copyright 2022 Oxide Computer Company
  2604. //
  2605. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2606. // Use is subject to license terms.
  2607. // This file and its contents are supplied under the terms of the
  2608. // Common Development and Distribution License ("CDDL"), version 1.0.
  2609. // You may only use this file in accordance with the terms of version
  2610. // 1.0 of the CDDL.
  2611. //
  2612. // A full copy of the text of the CDDL should have accompanied this
  2613. // source. A copy of the CDDL is also available via the Internet at
  2614. // http://www.illumos.org/license/CDDL.
  2615. // Copyright 2014-2016 PALO, Richard.
  2616. // DO NOT EDIT THIS FILE.
  2617. //
  2618. // It has been auto-edited by fixincludes from:
  2619. //
  2620. // "/usr/include/sys/feature_tests.h"
  2621. //
  2622. // This had to be done to correct non-standard usages in the
  2623. // original, manufacturer supplied header file.
  2624. // CDDL HEADER START
  2625. //
  2626. // The contents of this file are subject to the terms of the
  2627. // Common Development and Distribution License (the "License").
  2628. // You may not use this file except in compliance with the License.
  2629. //
  2630. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2631. // or http://www.opensolaris.org/os/licensing.
  2632. // See the License for the specific language governing permissions
  2633. // and limitations under the License.
  2634. //
  2635. // When distributing Covered Code, include this CDDL HEADER in each
  2636. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2637. // If applicable, add the following below this CDDL HEADER, with the
  2638. // fields enclosed by brackets "[]" replaced with your own identifying
  2639. // information: Portions Copyright [yyyy] [name of copyright owner]
  2640. //
  2641. // CDDL HEADER END
  2642. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2643. // Copyright 2016 Joyent, Inc.
  2644. // Copyright 2022 Oxide Computer Company
  2645. //
  2646. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2647. // Use is subject to license terms.
  2648. // POSIX.1-2008 requires that the NULL macro be cast to type void *.
  2649. type Tm = struct {
  2650. Ftm_sec int32
  2651. Ftm_min int32
  2652. Ftm_hour int32
  2653. Ftm_mday int32
  2654. Ftm_mon int32
  2655. Ftm_year int32
  2656. Ftm_wday int32
  2657. Ftm_yday int32
  2658. Ftm_isdst int32
  2659. } /* time_iso.h:80:1 */
  2660. // Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
  2661. // definition of the sigevent structure. Both require the inclusion
  2662. // of <signal.h> and <time.h> when using the timer_create() function.
  2663. // However, X/Open also specifies that the sigevent structure be defined
  2664. // in <time.h> as described in the header <signal.h>. This prevents
  2665. // compiler warnings for applications that only include <time.h> and not
  2666. // also <signal.h>. The sigval union and the sigevent structure is
  2667. // therefore defined both here and in <sys/siginfo.h> which gets included
  2668. // via inclusion of <signal.h>.
  2669. type Sigval = struct {
  2670. F__ccgo_pad1 [0]uint64
  2671. Fsival_int int32
  2672. F__ccgo_pad2 [4]byte
  2673. } /* time.h:125:1 */
  2674. type Sigevent = struct {
  2675. Fsigev_notify int32
  2676. Fsigev_signo int32
  2677. Fsigev_value struct {
  2678. F__ccgo_pad1 [0]uint64
  2679. Fsival_int int32
  2680. F__ccgo_pad2 [4]byte
  2681. }
  2682. Fsigev_notify_function uintptr
  2683. Fsigev_notify_attributes uintptr
  2684. F__sigev_pad2 int32
  2685. F__ccgo_pad1 [4]byte
  2686. } /* time.h:133:1 */
  2687. type Locale_t = uintptr /* time.h:292:24 */
  2688. // The inclusion of <sys/select.h> is needed for the FD_CLR,
  2689. // FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
  2690. // select() prototype defined in the XOpen specifications
  2691. // beginning with XSH4v2. Placement required after definition
  2692. // for itimerval.
  2693. // CDDL HEADER START
  2694. //
  2695. // The contents of this file are subject to the terms of the
  2696. // Common Development and Distribution License (the "License").
  2697. // You may not use this file except in compliance with the License.
  2698. //
  2699. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2700. // or http://www.opensolaris.org/os/licensing.
  2701. // See the License for the specific language governing permissions
  2702. // and limitations under the License.
  2703. //
  2704. // When distributing Covered Code, include this CDDL HEADER in each
  2705. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2706. // If applicable, add the following below this CDDL HEADER, with the
  2707. // fields enclosed by brackets "[]" replaced with your own identifying
  2708. // information: Portions Copyright [yyyy] [name of copyright owner]
  2709. //
  2710. // CDDL HEADER END
  2711. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2712. //
  2713. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2714. //
  2715. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  2716. // Use is subject to license terms.
  2717. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2718. // All Rights Reserved
  2719. // University Copyright- Copyright (c) 1982, 1986, 1988
  2720. // The Regents of the University of California
  2721. // All Rights Reserved
  2722. //
  2723. // University Acknowledgment- Portions of this document are derived from
  2724. // software developed by the University of California, Berkeley, and its
  2725. // contributors.
  2726. // The sigset_t type is defined in <sys/signal.h> and duplicated
  2727. // in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
  2728. // now allows the visibility of signal.h in this header, however
  2729. // an order of inclusion problem occurs as a result of inclusion
  2730. // of <sys/select.h> in <signal.h> under certain conditions.
  2731. // Rather than include <sys/signal.h> here, we've duplicated
  2732. // the sigset_t type instead. This type is required for the XPG6
  2733. // introduced pselect() function also declared in this header.
  2734. type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
  2735. // Select uses bit masks of file descriptors in longs.
  2736. // These macros manipulate such bit fields.
  2737. // FD_SETSIZE may be defined by the user, but the default here
  2738. // should be >= RLIM_FD_MAX.
  2739. type Fd_mask = int64 /* select.h:92:14 */
  2740. type Fds_mask = int64 /* select.h:94:14 */
  2741. // The value of _NBBY needs to be consistant with the value
  2742. // of NBBY in <sys/param.h>.
  2743. type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
  2744. // The value of _NBBY needs to be consistant with the value
  2745. // of NBBY in <sys/param.h>.
  2746. type Fd_set = Fd_set1 /* select.h:125:3 */
  2747. // _VOID was defined to be either void or char but this is not
  2748. // required because previous SunOS compilers have accepted the void
  2749. // type. However, because many system header and source files use the
  2750. // void keyword, the volatile keyword, and ANSI C function prototypes,
  2751. // non-ANSI compilers cannot compile the system anyway. The _VOID macro
  2752. // should therefore not be used and remains for source compatibility
  2753. // only.
  2754. // CSTYLED
  2755. // CDDL HEADER START
  2756. //
  2757. // The contents of this file are subject to the terms of the
  2758. // Common Development and Distribution License (the "License").
  2759. // You may not use this file except in compliance with the License.
  2760. //
  2761. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2762. // or http://www.opensolaris.org/os/licensing.
  2763. // See the License for the specific language governing permissions
  2764. // and limitations under the License.
  2765. //
  2766. // When distributing Covered Code, include this CDDL HEADER in each
  2767. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2768. // If applicable, add the following below this CDDL HEADER, with the
  2769. // fields enclosed by brackets "[]" replaced with your own identifying
  2770. // information: Portions Copyright [yyyy] [name of copyright owner]
  2771. //
  2772. // CDDL HEADER END
  2773. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  2774. // Use is subject to license terms.
  2775. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  2776. // All Rights Reserved
  2777. // Portions of this source code were derived from Berkeley 4.3 BSD
  2778. // under license from the Regents of the University of California.
  2779. type Sa_family_t = uint16 /* socket_impl.h:43:18 */
  2780. // Structure used by kernel to store most
  2781. // addresses.
  2782. type Sockaddr = struct {
  2783. Fsa_family uint16
  2784. Fsa_data [14]int8
  2785. } /* socket_impl.h:50:1 */
  2786. // CDDL HEADER START
  2787. //
  2788. // The contents of this file are subject to the terms of the
  2789. // Common Development and Distribution License (the "License").
  2790. // You may not use this file except in compliance with the License.
  2791. //
  2792. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2793. // or http://www.opensolaris.org/os/licensing.
  2794. // See the License for the specific language governing permissions
  2795. // and limitations under the License.
  2796. //
  2797. // When distributing Covered Code, include this CDDL HEADER in each
  2798. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2799. // If applicable, add the following below this CDDL HEADER, with the
  2800. // fields enclosed by brackets "[]" replaced with your own identifying
  2801. // information: Portions Copyright [yyyy] [name of copyright owner]
  2802. //
  2803. // CDDL HEADER END
  2804. // Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
  2805. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  2806. // All Rights Reserved
  2807. // University Copyright- Copyright (c) 1982, 1986, 1988
  2808. // The Regents of the University of California
  2809. // All Rights Reserved
  2810. //
  2811. // University Acknowledgment- Portions of this document are derived from
  2812. // software developed by the University of California, Berkeley, and its
  2813. // contributors.
  2814. // Definitions for UNIX IPC domain.
  2815. type Sockaddr_un = struct {
  2816. Fsun_family uint16
  2817. Fsun_path [108]int8
  2818. } /* un.h:53:1 */
  2819. // Copyright 1993-2003 Sun Microsystems, Inc. All rights reserved.
  2820. // Use is subject to license terms.
  2821. // Copyright (c) 1990, 1993
  2822. // The Regents of the University of California. All rights reserved.
  2823. //
  2824. // Redistribution and use in source and binary forms, with or without
  2825. // modification, are permitted provided that the following conditions
  2826. // are met:
  2827. // 1. Redistributions of source code must retain the above copyright
  2828. // notice, this list of conditions and the following disclaimer.
  2829. // 2. Redistributions in binary form must reproduce the above copyright
  2830. // notice, this list of conditions and the following disclaimer in the
  2831. // documentation and/or other materials provided with the distribution.
  2832. // 3. All advertising materials mentioning features or use of this software
  2833. // must display the following acknowledgement:
  2834. // This product includes software developed by the University of
  2835. // California, Berkeley and its contributors.
  2836. // 4. Neither the name of the University nor the names of its contributors
  2837. // may be used to endorse or promote products derived from this software
  2838. // without specific prior written permission.
  2839. //
  2840. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2841. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2842. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2843. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2844. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2845. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2846. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2847. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2848. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2849. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2850. // SUCH DAMAGE.
  2851. // from UCB 8.1 (Berkeley) 6/10/93
  2852. // A Link-Level Sockaddr may specify the interface in one of two
  2853. // ways: either by means of a system-provided index number (computed
  2854. // anew and possibly differently on every reboot), or by a human-readable
  2855. // string such as "il0" (for managerial convenience).
  2856. //
  2857. // Census taking actions, such as something akin to SIOCGCONF would return
  2858. // both the index and the human name.
  2859. //
  2860. // High volume transactions (such as giving a link-level ``from'' address
  2861. // in a recvfrom or recvmsg call) may be likely only to provide the indexed
  2862. // form, (which requires fewer copy operations and less space).
  2863. //
  2864. // The form and interpretation of the link-level address is purely a matter
  2865. // of convention between the device driver and its consumers; however, it is
  2866. // expected that all drivers for an interface of a given if_type will agree.
  2867. // Structure of a Link-Level sockaddr:
  2868. type Sockaddr_dl = struct {
  2869. Fsdl_family uint16
  2870. Fsdl_index uint16
  2871. Fsdl_type uint8
  2872. Fsdl_nlen uint8
  2873. Fsdl_alen uint8
  2874. Fsdl_slen uint8
  2875. Fsdl_data [244]int8
  2876. } /* if_dl.h:68:1 */
  2877. // sockaddr_storage:
  2878. // Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
  2879. // structures. Has sufficient size and alignment for those sockaddrs.
  2880. // Desired maximum size, alignment size and related types.
  2881. // To represent desired sockaddr max alignment for platform, a
  2882. // type is chosen which may depend on implementation platform architecture.
  2883. // Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
  2884. // We desire to force up to (but no more than) 64-bit (8 byte) alignment,
  2885. // on platforms where it is possible to do so. (e.g not possible on ia32).
  2886. // For all currently supported platforms by our implementation
  2887. // in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
  2888. // type "double" is suitable for that intent.
  2889. //
  2890. // Note: Type "double" is chosen over the more obvious integer type int64_t.
  2891. //
  2892. // int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
  2893. type Sockaddr_maxalign_t = float64 /* socket_impl.h:85:17 */
  2894. // Definitions used for sockaddr_storage structure paddings design.
  2895. type Sockaddr_storage = struct {
  2896. Fss_family uint16
  2897. F_ss_pad1 [6]int8
  2898. F_ss_align float64
  2899. F_ss_pad2 [240]int8
  2900. } /* socket_impl.h:96:1 */
  2901. // To be compatible with the Linux interfaces used, this structure is
  2902. // placed in socket_impl.h so that an include for <sys/socket.h> will
  2903. // pickup this structure. This structure is for use with PF_PACKET
  2904. // sockets.
  2905. type Sockaddr_ll = struct {
  2906. Fsll_family uint16
  2907. Fsll_protocol uint16
  2908. Fsll_ifindex int32
  2909. Fsll_hatype uint16
  2910. Fsll_pkttype uint8
  2911. Fsll_halen uint8
  2912. Fsll_addr [8]uint8
  2913. } /* socket_impl.h:111:1 */
  2914. // The socklen definitions are reproduced here from sys/socket.h so as to
  2915. // not introduce that namespace into existing users of netinet/in.h.
  2916. type Socklen_t = uint32 /* in.h:57:18 */
  2917. type Psocklen_t = uintptr /* in.h:63:15 */
  2918. // Symbols such as htonl() are required to be exposed through this file,
  2919. // per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
  2920. // CDDL HEADER START
  2921. //
  2922. // The contents of this file are subject to the terms of the
  2923. // Common Development and Distribution License (the "License").
  2924. // You may not use this file except in compliance with the License.
  2925. //
  2926. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2927. // or http://www.opensolaris.org/os/licensing.
  2928. // See the License for the specific language governing permissions
  2929. // and limitations under the License.
  2930. //
  2931. // When distributing Covered Code, include this CDDL HEADER in each
  2932. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2933. // If applicable, add the following below this CDDL HEADER, with the
  2934. // fields enclosed by brackets "[]" replaced with your own identifying
  2935. // information: Portions Copyright [yyyy] [name of copyright owner]
  2936. //
  2937. // CDDL HEADER END
  2938. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  2939. // Use is subject to license terms.
  2940. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  2941. // All Rights Reserved
  2942. // University Copyright- Copyright (c) 1982, 1986, 1988
  2943. // The Regents of the University of California
  2944. // All Rights Reserved
  2945. //
  2946. // University Acknowledgment- Portions of this document are derived from
  2947. // software developed by the University of California, Berkeley, and its
  2948. // contributors.
  2949. // CDDL HEADER START
  2950. //
  2951. // The contents of this file are subject to the terms of the
  2952. // Common Development and Distribution License (the "License").
  2953. // You may not use this file except in compliance with the License.
  2954. //
  2955. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2956. // or http://www.opensolaris.org/os/licensing.
  2957. // See the License for the specific language governing permissions
  2958. // and limitations under the License.
  2959. //
  2960. //
  2961. // When distributing Covered Code, include this CDDL HEADER in each
  2962. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2963. // If applicable, add the following below this CDDL HEADER, with the
  2964. // fields enclosed by brackets "[]" replaced with your own identifying
  2965. // information: Portions Copyright [yyyy] [name of copyright owner]
  2966. //
  2967. // CDDL HEADER END
  2968. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  2969. // Use is subject to license terms.
  2970. // Copyright 2016 Joyent, Inc.
  2971. // CDDL HEADER START
  2972. //
  2973. // The contents of this file are subject to the terms of the
  2974. // Common Development and Distribution License, Version 1.0 only
  2975. // (the "License"). You may not use this file except in compliance
  2976. // with the License.
  2977. //
  2978. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2979. // or http://www.opensolaris.org/os/licensing.
  2980. // See the License for the specific language governing permissions
  2981. // and limitations under the License.
  2982. //
  2983. // When distributing Covered Code, include this CDDL HEADER in each
  2984. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2985. // If applicable, add the following below this CDDL HEADER, with the
  2986. // fields enclosed by brackets "[]" replaced with your own identifying
  2987. // information: Portions Copyright [yyyy] [name of copyright owner]
  2988. //
  2989. // CDDL HEADER END
  2990. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2991. //
  2992. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  2993. // Use is subject to license terms.
  2994. // macros for conversion between host and (internet) network byte order
  2995. type In_port_t = uint16 /* byteorder.h:74:18 */
  2996. type In_addr_t = uint32 /* byteorder.h:79:18 */
  2997. // Macros to reverse byte order
  2998. // Macros to convert from a specific byte order to/from native byte order
  2999. // Macros to read unaligned values from a specific byte order to
  3000. // native byte order
  3001. // Macros to write unaligned values from native byte order to a specific byte
  3002. // order.
  3003. // Note: IPv4 address data structures usage conventions.
  3004. // The "in_addr_t" type below (required by Unix standards)
  3005. // is NOT a typedef of "struct in_addr" and violates the usual
  3006. // conventions where "struct <name>" and <name>_t are corresponding
  3007. // typedefs.
  3008. // To minimize confusion, kernel data structures/usage prefers use
  3009. // of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
  3010. // The user level APIs continue to follow the historic popular
  3011. // practice of using "struct in_addr".
  3012. type Ipaddr_t = uint32 /* in.h:99:18 */
  3013. type In6_addr = struct {
  3014. F_S6_un struct {
  3015. F__ccgo_pad1 [0]uint32
  3016. F_S6_u8 [16]uint8
  3017. }
  3018. } /* in.h:104:1 */
  3019. type In6_addr_t = In6_addr /* in.h:137:25 */
  3020. // Protocols
  3021. //
  3022. // Some of these constant names are copied for the DTrace IP provider in
  3023. // usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
  3024. // in sync.
  3025. // Transmission Protocol
  3026. // Port/socket numbers: network standard functions
  3027. //
  3028. // Entries should exist here for each port number compiled into an ON
  3029. // component, such as snoop.
  3030. // Port/socket numbers: host specific functions
  3031. // Internet Key Exchange (IKE) ports
  3032. // UNIX TCP sockets
  3033. // UNIX UDP sockets
  3034. // DHCPv6 UDP ports
  3035. // Ports < IPPORT_RESERVED are reserved for
  3036. // privileged processes (e.g. root).
  3037. // Ports > IPPORT_USERRESERVED are reserved
  3038. // for servers, not necessarily privileged.
  3039. // Link numbers
  3040. // IPv4 Internet address
  3041. // This definition contains obsolete fields for compatibility
  3042. // with SunOS 3.x and 4.2bsd. The presence of subnets renders
  3043. // divisions into fixed fields misleading at best. New code
  3044. // should use only the s_addr field.
  3045. type In_addr = struct {
  3046. FS_un struct {
  3047. F__ccgo_pad1 [0]uint32
  3048. FS_un_b struct {
  3049. Fs_b1 uint8
  3050. Fs_b2 uint8
  3051. Fs_b3 uint8
  3052. Fs_b4 uint8
  3053. }
  3054. }
  3055. } /* in.h:301:1 */
  3056. // Definitions of bits in internet address integers.
  3057. // On subnets, the decomposition of addresses to host and net parts
  3058. // is done according to subnet mask, not the masks here.
  3059. //
  3060. // Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
  3061. // IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
  3062. // obsolete". IN_MULTICAST macro should be used to test if a address
  3063. // is a multicast address.
  3064. // We have removed CLASS E checks from the kernel
  3065. // But we preserve these defines for userland in order
  3066. // to avoid compile breakage of some 3rd party piece of software
  3067. // Scoped IPv4 prefixes (in host byte-order)
  3068. // RFC 3927 IPv4 link local address (i in host byte-order)
  3069. // Well known 6to4 Relay Router Anycast address defined in RFC 3068
  3070. // Define a macro to stuff the loopback address into an Internet address
  3071. // IPv4 Socket address.
  3072. type Sockaddr_in = struct {
  3073. Fsin_family uint16
  3074. Fsin_port uint16
  3075. Fsin_addr struct {
  3076. FS_un struct {
  3077. F__ccgo_pad1 [0]uint32
  3078. FS_un_b struct {
  3079. Fs_b1 uint8
  3080. Fs_b2 uint8
  3081. Fs_b3 uint8
  3082. Fs_b4 uint8
  3083. }
  3084. }
  3085. }
  3086. Fsin_zero [8]int8
  3087. } /* in.h:409:1 */
  3088. // IPv6 socket address.
  3089. type Sockaddr_in6 = struct {
  3090. Fsin6_family uint16
  3091. Fsin6_port uint16
  3092. Fsin6_flowinfo uint32
  3093. Fsin6_addr struct {
  3094. F_S6_un struct {
  3095. F__ccgo_pad1 [0]uint32
  3096. F_S6_u8 [16]uint8
  3097. }
  3098. }
  3099. Fsin6_scope_id uint32
  3100. F__sin6_src_id uint32
  3101. } /* in.h:424:1 */
  3102. // Macros for accessing the traffic class and flow label fields from
  3103. // sin6_flowinfo.
  3104. // These are designed to be applied to a 32-bit value.
  3105. // masks
  3106. // Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
  3107. // use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
  3108. // only. They need to be different for User/Kernel versions because union
  3109. // component data structure is defined differently (it is identical at
  3110. // binary representation level).
  3111. //
  3112. // const struct in6_addr IN6ADDR_ANY_INIT;
  3113. // const struct in6_addr IN6ADDR_LOOPBACK_INIT;
  3114. // RFC 2553 specifies the following macros. Their type is defined
  3115. // as "int" in the RFC but they only have boolean significance
  3116. // (zero or non-zero). For the purposes of our comment notation,
  3117. // we assume a hypothetical type "bool" defined as follows to
  3118. // write the prototypes assumed for macros in our comments better.
  3119. //
  3120. // typedef int bool;
  3121. // IN6 macros used to test for special IPv6 addresses
  3122. // (Mostly from spec)
  3123. //
  3124. // bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
  3125. // bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *);
  3126. // bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *);
  3127. // bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *);
  3128. // bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *);
  3129. // bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *);
  3130. // bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
  3131. // bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
  3132. // bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
  3133. // bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
  3134. // bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
  3135. // bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
  3136. // bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
  3137. // bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
  3138. // bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553
  3139. // bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
  3140. // const struct in6_addr *); -- Not from RFC2553
  3141. // bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553
  3142. // IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
  3143. // Note: This macro is currently NOT defined in RFC2553 specification
  3144. // and not a standard macro that portable applications should use.
  3145. // Exclude loopback and unspecified address
  3146. // Note:
  3147. // IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
  3148. // specification and not a standard macro that portable applications
  3149. // should use.
  3150. // The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
  3151. // RFC, and shouldn't be used by portable applications. It is used to see
  3152. // if an address is a solicited-node multicast address, which is prefixed
  3153. // with ff02:0:0:0:0:1:ff00::/104.
  3154. // Macros to a) test for 6to4 IPv6 address, and b) to test if two
  3155. // 6to4 addresses have the same /48 prefix, and, hence, are from the
  3156. // same 6to4 site.
  3157. // IN6_IS_ADDR_LINKSCOPE
  3158. // Identifies an address as being either link-local, link-local multicast or
  3159. // node-local multicast. All types of addresses are considered to be unique
  3160. // within the scope of a given link.
  3161. // Useful utility macros for operations with IPv6 addresses
  3162. // Note: These macros are NOT defined in the RFC2553 or any other
  3163. // standard specification and are not standard macros that portable
  3164. // applications should use.
  3165. // IN6_V4MAPPED_TO_INADDR
  3166. // IN6_V4MAPPED_TO_IPADDR
  3167. // Assign a IPv4-Mapped IPv6 address to an IPv4 address.
  3168. // Note: These macros are NOT defined in RFC2553 or any other standard
  3169. // specification and are not macros that portable applications should
  3170. // use.
  3171. //
  3172. // void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
  3173. // void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
  3174. //
  3175. // IN6_INADDR_TO_V4MAPPED
  3176. // IN6_IPADDR_TO_V4MAPPED
  3177. // Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
  3178. // address.
  3179. // Note: These macros are NOT defined in RFC2553 or any other standard
  3180. // specification and are not macros that portable applications should
  3181. // use.
  3182. //
  3183. // void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
  3184. // void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
  3185. //
  3186. // IN6_6TO4_TO_V4ADDR
  3187. // Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
  3188. // address.
  3189. // Note: This macro is NOT defined in RFC2553 or any other standard
  3190. // specification and is not a macro that portable applications should
  3191. // use.
  3192. // Note: we don't use the IPADDR form of the macro because we need
  3193. // to do a bytewise copy; the V4ADDR in the 6to4 address is not
  3194. // 32-bit aligned.
  3195. //
  3196. // void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
  3197. //
  3198. // IN6_V4ADDR_TO_6TO4
  3199. // Given an IPv4 address and an IPv6 address for output, a 6to4 address
  3200. // will be created from the IPv4 Address.
  3201. // Note: This method for creating 6to4 addresses is not standardized
  3202. // outside of Solaris. The newly created 6to4 address will be of the form
  3203. // 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
  3204. // HOSTID will equal 1.
  3205. //
  3206. // void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
  3207. //
  3208. // IN6_ARE_ADDR_EQUAL (defined in RFC2292)
  3209. // Compares if IPv6 addresses are equal.
  3210. // Note: Compares in order of high likelyhood of a miss so we minimize
  3211. // compares. (Current heuristic order, compare in reverse order of
  3212. // uint32_t units)
  3213. //
  3214. // bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
  3215. // const struct in6_addr *);
  3216. // IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
  3217. // Compares if prefixed parts of IPv6 addresses are equal.
  3218. //
  3219. // uint32_t IN6_MASK_FROM_PREFIX(int, int);
  3220. // bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
  3221. // const struct in6_addr *,
  3222. // int);
  3223. // Options for use with [gs]etsockopt at the IP level.
  3224. //
  3225. // Note: Some of the IP_ namespace has conflict with and
  3226. // and is exposed through <xti.h>. (It also requires exposing
  3227. // options not implemented). The options with potential
  3228. // for conflicts use #ifndef guards.
  3229. // IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
  3230. // is used to differentiate b/w the two.
  3231. // Different preferences that can be requested from IPSEC protocols.
  3232. // This can be used with the setsockopt() call to set per socket security
  3233. // options. When the application uses per-socket API, we will reflect
  3234. // the request on both outbound and inbound packets.
  3235. type Ipsec_req = struct {
  3236. Fipsr_ah_req uint32
  3237. Fipsr_esp_req uint32
  3238. Fipsr_self_encap_req uint32
  3239. Fipsr_auth_alg uint8
  3240. Fipsr_esp_alg uint8
  3241. Fipsr_esp_auth_alg uint8
  3242. F__ccgo_pad1 [1]byte
  3243. } /* in.h:950:9 */
  3244. // Macros for accessing the traffic class and flow label fields from
  3245. // sin6_flowinfo.
  3246. // These are designed to be applied to a 32-bit value.
  3247. // masks
  3248. // Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
  3249. // use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
  3250. // only. They need to be different for User/Kernel versions because union
  3251. // component data structure is defined differently (it is identical at
  3252. // binary representation level).
  3253. //
  3254. // const struct in6_addr IN6ADDR_ANY_INIT;
  3255. // const struct in6_addr IN6ADDR_LOOPBACK_INIT;
  3256. // RFC 2553 specifies the following macros. Their type is defined
  3257. // as "int" in the RFC but they only have boolean significance
  3258. // (zero or non-zero). For the purposes of our comment notation,
  3259. // we assume a hypothetical type "bool" defined as follows to
  3260. // write the prototypes assumed for macros in our comments better.
  3261. //
  3262. // typedef int bool;
  3263. // IN6 macros used to test for special IPv6 addresses
  3264. // (Mostly from spec)
  3265. //
  3266. // bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
  3267. // bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *);
  3268. // bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *);
  3269. // bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *);
  3270. // bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *);
  3271. // bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *);
  3272. // bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
  3273. // bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
  3274. // bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
  3275. // bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
  3276. // bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
  3277. // bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
  3278. // bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
  3279. // bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
  3280. // bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553
  3281. // bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
  3282. // const struct in6_addr *); -- Not from RFC2553
  3283. // bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553
  3284. // IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
  3285. // Note: This macro is currently NOT defined in RFC2553 specification
  3286. // and not a standard macro that portable applications should use.
  3287. // Exclude loopback and unspecified address
  3288. // Note:
  3289. // IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
  3290. // specification and not a standard macro that portable applications
  3291. // should use.
  3292. // The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
  3293. // RFC, and shouldn't be used by portable applications. It is used to see
  3294. // if an address is a solicited-node multicast address, which is prefixed
  3295. // with ff02:0:0:0:0:1:ff00::/104.
  3296. // Macros to a) test for 6to4 IPv6 address, and b) to test if two
  3297. // 6to4 addresses have the same /48 prefix, and, hence, are from the
  3298. // same 6to4 site.
  3299. // IN6_IS_ADDR_LINKSCOPE
  3300. // Identifies an address as being either link-local, link-local multicast or
  3301. // node-local multicast. All types of addresses are considered to be unique
  3302. // within the scope of a given link.
  3303. // Useful utility macros for operations with IPv6 addresses
  3304. // Note: These macros are NOT defined in the RFC2553 or any other
  3305. // standard specification and are not standard macros that portable
  3306. // applications should use.
  3307. // IN6_V4MAPPED_TO_INADDR
  3308. // IN6_V4MAPPED_TO_IPADDR
  3309. // Assign a IPv4-Mapped IPv6 address to an IPv4 address.
  3310. // Note: These macros are NOT defined in RFC2553 or any other standard
  3311. // specification and are not macros that portable applications should
  3312. // use.
  3313. //
  3314. // void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
  3315. // void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
  3316. //
  3317. // IN6_INADDR_TO_V4MAPPED
  3318. // IN6_IPADDR_TO_V4MAPPED
  3319. // Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
  3320. // address.
  3321. // Note: These macros are NOT defined in RFC2553 or any other standard
  3322. // specification and are not macros that portable applications should
  3323. // use.
  3324. //
  3325. // void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
  3326. // void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
  3327. //
  3328. // IN6_6TO4_TO_V4ADDR
  3329. // Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
  3330. // address.
  3331. // Note: This macro is NOT defined in RFC2553 or any other standard
  3332. // specification and is not a macro that portable applications should
  3333. // use.
  3334. // Note: we don't use the IPADDR form of the macro because we need
  3335. // to do a bytewise copy; the V4ADDR in the 6to4 address is not
  3336. // 32-bit aligned.
  3337. //
  3338. // void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
  3339. //
  3340. // IN6_V4ADDR_TO_6TO4
  3341. // Given an IPv4 address and an IPv6 address for output, a 6to4 address
  3342. // will be created from the IPv4 Address.
  3343. // Note: This method for creating 6to4 addresses is not standardized
  3344. // outside of Solaris. The newly created 6to4 address will be of the form
  3345. // 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
  3346. // HOSTID will equal 1.
  3347. //
  3348. // void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
  3349. //
  3350. // IN6_ARE_ADDR_EQUAL (defined in RFC2292)
  3351. // Compares if IPv6 addresses are equal.
  3352. // Note: Compares in order of high likelyhood of a miss so we minimize
  3353. // compares. (Current heuristic order, compare in reverse order of
  3354. // uint32_t units)
  3355. //
  3356. // bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
  3357. // const struct in6_addr *);
  3358. // IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
  3359. // Compares if prefixed parts of IPv6 addresses are equal.
  3360. //
  3361. // uint32_t IN6_MASK_FROM_PREFIX(int, int);
  3362. // bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
  3363. // const struct in6_addr *,
  3364. // int);
  3365. // Options for use with [gs]etsockopt at the IP level.
  3366. //
  3367. // Note: Some of the IP_ namespace has conflict with and
  3368. // and is exposed through <xti.h>. (It also requires exposing
  3369. // options not implemented). The options with potential
  3370. // for conflicts use #ifndef guards.
  3371. // IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
  3372. // is used to differentiate b/w the two.
  3373. // Different preferences that can be requested from IPSEC protocols.
  3374. // This can be used with the setsockopt() call to set per socket security
  3375. // options. When the application uses per-socket API, we will reflect
  3376. // the request on both outbound and inbound packets.
  3377. type Ipsec_req_t = Ipsec_req /* in.h:957:3 */
  3378. // MCAST_* options are protocol-independent. The actual definitions
  3379. // are with the v6 options below; this comment is here to note the
  3380. // namespace usage.
  3381. //
  3382. // #define MCAST_JOIN_GROUP 0x29
  3383. // #define MCAST_LEAVE_GROUP 0x2a
  3384. // #define MCAST_BLOCK_SOURCE 0x2b
  3385. // #define MCAST_UNBLOCK_SOURCE 0x2c
  3386. // #define MCAST_JOIN_SOURCE_GROUP 0x2d
  3387. // #define MCAST_LEAVE_SOURCE_GROUP 0x2e
  3388. // SunOS private (potentially not portable) IP_ option names
  3389. // can be reused 0x44
  3390. // Option values and names (when !_XPG5) shared with <xti_inet.h>
  3391. // The following option values are reserved by <xti_inet.h>
  3392. //
  3393. // T_IP_OPTIONS 0x107 - IP per-packet options
  3394. // T_IP_TOS 0x108 - IP per packet type of service
  3395. // Default value constants for multicast attributes controlled by
  3396. // IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
  3397. // Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
  3398. type Ip_mreq = struct {
  3399. Fimr_multiaddr struct {
  3400. FS_un struct {
  3401. F__ccgo_pad1 [0]uint32
  3402. FS_un_b struct {
  3403. Fs_b1 uint8
  3404. Fs_b2 uint8
  3405. Fs_b3 uint8
  3406. Fs_b4 uint8
  3407. }
  3408. }
  3409. }
  3410. Fimr_interface struct {
  3411. FS_un struct {
  3412. F__ccgo_pad1 [0]uint32
  3413. FS_un_b struct {
  3414. Fs_b1 uint8
  3415. Fs_b2 uint8
  3416. Fs_b3 uint8
  3417. Fs_b4 uint8
  3418. }
  3419. }
  3420. }
  3421. } /* in.h:1015:1 */
  3422. // Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
  3423. // IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
  3424. type Ip_mreq_source = struct {
  3425. Fimr_multiaddr struct {
  3426. FS_un struct {
  3427. F__ccgo_pad1 [0]uint32
  3428. FS_un_b struct {
  3429. Fs_b1 uint8
  3430. Fs_b2 uint8
  3431. Fs_b3 uint8
  3432. Fs_b4 uint8
  3433. }
  3434. }
  3435. }
  3436. Fimr_sourceaddr struct {
  3437. FS_un struct {
  3438. F__ccgo_pad1 [0]uint32
  3439. FS_un_b struct {
  3440. Fs_b1 uint8
  3441. Fs_b2 uint8
  3442. Fs_b3 uint8
  3443. Fs_b4 uint8
  3444. }
  3445. }
  3446. }
  3447. Fimr_interface struct {
  3448. FS_un struct {
  3449. F__ccgo_pad1 [0]uint32
  3450. FS_un_b struct {
  3451. Fs_b1 uint8
  3452. Fs_b2 uint8
  3453. Fs_b3 uint8
  3454. Fs_b4 uint8
  3455. }
  3456. }
  3457. }
  3458. } /* in.h:1024:1 */
  3459. // Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
  3460. // IPv6 addresses.
  3461. type Ipv6_mreq = struct {
  3462. Fipv6mr_multiaddr struct {
  3463. F_S6_un struct {
  3464. F__ccgo_pad1 [0]uint32
  3465. F_S6_u8 [16]uint8
  3466. }
  3467. }
  3468. Fipv6mr_interface uint32
  3469. } /* in.h:1034:1 */
  3470. // Use #pragma pack() construct to force 32-bit alignment on amd64.
  3471. // This is needed to keep the structure size and offsets consistent
  3472. // between a 32-bit app and the 64-bit amd64 kernel in structures
  3473. // where 64-bit alignment would create gaps (in this case, structures
  3474. // which have a uint32_t followed by a struct sockaddr_storage).
  3475. // Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
  3476. type Group_req = struct {
  3477. Fgr_interface uint32
  3478. F__ccgo_pad1 [4]byte
  3479. Fgr_group struct {
  3480. Fss_family uint16
  3481. F_ss_pad1 [6]int8
  3482. F_ss_align float64
  3483. F_ss_pad2 [240]int8
  3484. }
  3485. } /* in.h:1053:1 */
  3486. // Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
  3487. // MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
  3488. type Group_source_req = struct {
  3489. Fgsr_interface uint32
  3490. F__ccgo_pad1 [4]byte
  3491. Fgsr_group struct {
  3492. Fss_family uint16
  3493. F_ss_pad1 [6]int8
  3494. F_ss_align float64
  3495. F_ss_pad2 [240]int8
  3496. }
  3497. Fgsr_source struct {
  3498. Fss_family uint16
  3499. F_ss_pad1 [6]int8
  3500. F_ss_align float64
  3501. F_ss_pad2 [240]int8
  3502. }
  3503. } /* in.h:1062:1 */
  3504. // Argument for SIOC[GS]MSFILTER ioctls
  3505. type Group_filter = struct {
  3506. Fgf_interface uint32
  3507. F__ccgo_pad1 [4]byte
  3508. Fgf_group struct {
  3509. Fss_family uint16
  3510. F_ss_pad1 [6]int8
  3511. F_ss_align float64
  3512. F_ss_pad2 [240]int8
  3513. }
  3514. Fgf_fmode uint32
  3515. Fgf_numsrc uint32
  3516. Fgf_slist [1]struct {
  3517. Fss_family uint16
  3518. F_ss_pad1 [6]int8
  3519. F_ss_align float64
  3520. F_ss_pad2 [240]int8
  3521. }
  3522. } /* in.h:1071:1 */
  3523. // Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
  3524. type Ip_msfilter = struct {
  3525. Fimsf_multiaddr struct {
  3526. FS_un struct {
  3527. F__ccgo_pad1 [0]uint32
  3528. FS_un_b struct {
  3529. Fs_b1 uint8
  3530. Fs_b2 uint8
  3531. Fs_b3 uint8
  3532. Fs_b4 uint8
  3533. }
  3534. }
  3535. }
  3536. Fimsf_interface struct {
  3537. FS_un struct {
  3538. F__ccgo_pad1 [0]uint32
  3539. FS_un_b struct {
  3540. Fs_b1 uint8
  3541. Fs_b2 uint8
  3542. Fs_b3 uint8
  3543. Fs_b4 uint8
  3544. }
  3545. }
  3546. }
  3547. Fimsf_fmode uint32
  3548. Fimsf_numsrc uint32
  3549. Fimsf_slist [1]struct {
  3550. FS_un struct {
  3551. F__ccgo_pad1 [0]uint32
  3552. FS_un_b struct {
  3553. Fs_b1 uint8
  3554. Fs_b2 uint8
  3555. Fs_b3 uint8
  3556. Fs_b4 uint8
  3557. }
  3558. }
  3559. }
  3560. } /* in.h:1090:1 */
  3561. // Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
  3562. // Argument struct for IP_PKTINFO option
  3563. type In_pktinfo = struct {
  3564. Fipi_ifindex uint32
  3565. Fipi_spec_dst struct {
  3566. FS_un struct {
  3567. F__ccgo_pad1 [0]uint32
  3568. FS_un_b struct {
  3569. Fs_b1 uint8
  3570. Fs_b2 uint8
  3571. Fs_b3 uint8
  3572. Fs_b4 uint8
  3573. }
  3574. }
  3575. }
  3576. Fipi_addr struct {
  3577. FS_un struct {
  3578. F__ccgo_pad1 [0]uint32
  3579. FS_un_b struct {
  3580. Fs_b1 uint8
  3581. Fs_b2 uint8
  3582. Fs_b3 uint8
  3583. Fs_b4 uint8
  3584. }
  3585. }
  3586. }
  3587. } /* in.h:1127:9 */
  3588. // Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
  3589. // Argument struct for IP_PKTINFO option
  3590. type In_pktinfo_t = In_pktinfo /* in.h:1131:3 */
  3591. // Argument struct for IPV6_PKTINFO option
  3592. type In6_pktinfo = struct {
  3593. Fipi6_addr struct {
  3594. F_S6_un struct {
  3595. F__ccgo_pad1 [0]uint32
  3596. F_S6_u8 [16]uint8
  3597. }
  3598. }
  3599. Fipi6_ifindex uint32
  3600. } /* in.h:1136:1 */
  3601. // Argument struct for IPV6_MTUINFO option
  3602. type Ip6_mtuinfo = struct {
  3603. Fip6m_addr struct {
  3604. Fsin6_family uint16
  3605. Fsin6_port uint16
  3606. Fsin6_flowinfo uint32
  3607. Fsin6_addr struct {
  3608. F_S6_un struct {
  3609. F__ccgo_pad1 [0]uint32
  3610. F_S6_u8 [16]uint8
  3611. }
  3612. }
  3613. Fsin6_scope_id uint32
  3614. F__sin6_src_id uint32
  3615. }
  3616. Fip6m_mtu uint32
  3617. } /* in.h:1144:1 */
  3618. // Argument structure for IP_ADD_PROXY_ADDR.
  3619. // Note that this is an unstable, experimental interface. It may change
  3620. // later. Don't use it unless you know what it is.
  3621. type In_prefix_t = struct {
  3622. Fin_prefix_addr In_addr
  3623. Fin_prefix_len uint32
  3624. } /* in.h:1183:3 */
  3625. var _ int8 /* gen.c:2:13: */