netdb_illumos_amd64.go 248 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631
  1. // Code generated by 'ccgo netdb/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 netdb/netdb_illumos_amd64.go -pkgname netdb', DO NOT EDIT.
  2. package netdb
  3. import (
  4. "math"
  5. "reflect"
  6. "sync/atomic"
  7. "unsafe"
  8. )
  9. var _ = math.Pi
  10. var _ reflect.Kind
  11. var _ atomic.Value
  12. var _ unsafe.Pointer
  13. const (
  14. AF_802 = 18 // socket.h:296:1:
  15. AF_APPLETALK = 16 // socket.h:294:1:
  16. AF_CCITT = 10 // socket.h:288:1:
  17. AF_CHAOS = 5 // socket.h:283:1:
  18. AF_DATAKIT = 9 // socket.h:287:1:
  19. AF_DECnet = 12 // socket.h:290:1:
  20. AF_DLI = 13 // socket.h:291:1:
  21. AF_ECMA = 8 // socket.h:286:1:
  22. AF_FILE = 1 // socket.h:279:1:
  23. AF_GOSIP = 22 // socket.h:300:1:
  24. AF_HYLINK = 15 // socket.h:293:1:
  25. AF_IMPLINK = 3 // socket.h:281:1:
  26. AF_INET = 2 // socket.h:280:1:
  27. AF_INET6 = 26 // socket.h:304:1:
  28. AF_INET_OFFLOAD = 30 // socket.h:308:1:
  29. AF_IPX = 23 // socket.h:301:1:
  30. AF_KEY = 27 // socket.h:305:1:
  31. AF_LAT = 14 // socket.h:292:1:
  32. AF_LINK = 25 // socket.h:303:1:
  33. AF_LOCAL = 1 // socket.h:278:1:
  34. AF_LX_NETLINK = 33 // socket.h:311:1:
  35. AF_MAX = 33 // socket.h:313:1:
  36. AF_NBS = 7 // socket.h:285:1:
  37. AF_NCA = 28 // socket.h:306:1:
  38. AF_NIT = 17 // socket.h:295:1:
  39. AF_NS = 6 // socket.h:284:1:
  40. AF_OSI = 19 // socket.h:297:1:
  41. AF_OSINET = 21 // socket.h:299:1:
  42. AF_PACKET = 32 // socket.h:310:1:
  43. AF_POLICY = 29 // socket.h:307:1:
  44. AF_PUP = 4 // socket.h:282:1:
  45. AF_ROUTE = 24 // socket.h:302:1:
  46. AF_SNA = 11 // socket.h:289:1:
  47. AF_TRILL = 31 // socket.h:309:1:
  48. AF_UNIX = 1 // socket.h:277:1:
  49. AF_UNSPEC = 0 // socket.h:276:1:
  50. AF_X25 = 20 // socket.h:298:1:
  51. AI_ADDRCONFIG = 0x0004 // netdb.h:139:1:
  52. AI_ALL = 0x0002 // netdb.h:138:1:
  53. AI_CANONNAME = 0x0010 // netdb.h:132:1:
  54. AI_DEFAULT = 5 // netdb.h:147:1:
  55. AI_NUMERICHOST = 0x0020 // netdb.h:133:1:
  56. AI_NUMERICSERV = 0x0040 // netdb.h:134:1:
  57. AI_PASSIVE = 0x0008 // netdb.h:131:1:
  58. AI_V4MAPPED = 0x0001 // netdb.h:137:1:
  59. CANBSIZ = 256 // param.h:91:1:
  60. CDLIMIT = 2048 // param.h:164:1:
  61. CLOCKS_PER_SEC = 1000000 // time_iso.h:78:1:
  62. CLOCK_HIGHRES = 4 // time_impl.h:126:1:
  63. CLOCK_MONOTONIC = 4 // time_impl.h:124:1:
  64. CLOCK_PROCESS_CPUTIME_ID = 5 // time_impl.h:125:1:
  65. CLOCK_PROF = 2 // time_impl.h:127:1:
  66. CLOCK_REALTIME = 3 // time_impl.h:123:1:
  67. CLOCK_THREAD_CPUTIME_ID = 2 // time_impl.h:122:1:
  68. CLOCK_VIRTUAL = 1 // time_impl.h:121:1:
  69. CMASK = 022 // param.h:163:1:
  70. DEFAULT_JUMPPID = 0 // param.h:120:1:
  71. DEFAULT_MAXPID = 30000 // param.h:119:1:
  72. DEV_BSHIFT = 9 // param.h:251:1:
  73. DEV_BSIZE = 512 // param.h:250:1:
  74. DST_AUST = 2 // time.h:115:1:
  75. DST_AUSTALT = 10 // time.h:123:1:
  76. DST_CAN = 6 // time.h:119:1:
  77. DST_EET = 5 // time.h:118:1:
  78. DST_GB = 7 // time.h:120:1:
  79. DST_MET = 4 // time.h:117:1:
  80. DST_NONE = 0 // time.h:113:1:
  81. DST_RUM = 8 // time.h:121:1:
  82. DST_TUR = 9 // time.h:122:1:
  83. DST_USA = 1 // time.h:114:1:
  84. DST_WET = 3 // time.h:116:1:
  85. EAI_ADDRFAMILY = 1 // netdb.h:150:1:
  86. EAI_AGAIN = 2 // netdb.h:153:1:
  87. EAI_BADFLAGS = 3 // netdb.h:154:1:
  88. EAI_FAIL = 4 // netdb.h:155:1:
  89. EAI_FAMILY = 5 // netdb.h:156:1:
  90. EAI_MAX = 14 // netdb.h:164:1:
  91. EAI_MEMORY = 6 // netdb.h:157:1:
  92. EAI_NODATA = 7 // netdb.h:151:1:
  93. EAI_NONAME = 8 // netdb.h:158:1:
  94. EAI_OVERFLOW = 12 // netdb.h:162:1:
  95. EAI_PROTOCOL = 13 // netdb.h:163:1:
  96. EAI_SERVICE = 9 // netdb.h:159:1:
  97. EAI_SOCKTYPE = 10 // netdb.h:160:1:
  98. EAI_SYSTEM = 11 // netdb.h:161:1:
  99. FD_SETSIZE = 65536 // select.h:88:1:
  100. FILF_AUTO = 0x2 // socket.h:232:1:
  101. FILF_BYPASS = 0x4 // socket.h:233:1:
  102. FILF_PROG = 0x1 // socket.h:231:1:
  103. FILNAME_MAX = 32 // socket.h:221:1:
  104. FIL_ATTACH = 0x1 // socket.h:217:1:
  105. FIL_DETACH = 0x2 // socket.h:218:1:
  106. FIL_LIST = 0x3 // socket.h:219:1:
  107. FSCALE = 256 // param.h:304:1:
  108. FSHIFT = 8 // param.h:303:1:
  109. GID_NETADM = 65 // param.h:100:1:
  110. GID_NOBODY = 60001 // param.h:95:1:
  111. GID_UNKNOWN = 96 // param.h:97:1:
  112. HOST_NOT_FOUND = 1 // netdb.h:381:1:
  113. IMPLINK_HIGHEXPER = 158 // in.h:284:1:
  114. IMPLINK_IP = 155 // in.h:282:1:
  115. IMPLINK_LOWEXPER = 156 // in.h:283:1:
  116. INADDR_6TO4RRANYCAST = 0xc0586301 // in.h:392:1:
  117. INADDR_ALLHOSTS_GROUP = 0xe0000001 // in.h:372:1:
  118. INADDR_ALLRPTS_GROUP = 0xe0000016 // in.h:374:1:
  119. INADDR_ALLRTRS_GROUP = 0xe0000002 // in.h:373:1:
  120. INADDR_ANY = 0x00000000 // in.h:366:1:
  121. INADDR_BROADCAST = 0xffffffff // in.h:368:1:
  122. INADDR_LOOPBACK = 0x7F000001 // in.h:367:1:
  123. INADDR_MAX_LOCAL_GROUP = 0xe00000ff // in.h:375:1:
  124. INADDR_NONE = 0xffffffff // in.h:369:1:
  125. INADDR_UNSPEC_GROUP = 0xe0000000 // in.h:371:1:
  126. INET6_ADDRSTRLEN = 46 // in.h:1212:1:
  127. INET_ADDRSTRLEN = 16 // in.h:1210:1:
  128. IN_AUTOCONF_MASK = 0xffff0000 // in.h:379:1:
  129. IN_AUTOCONF_NET = 0xa9fe0000 // in.h:378:1:
  130. IN_CLASSA_HOST = 0x00ffffff // in.h:332:1:
  131. IN_CLASSA_MAX = 128 // in.h:333:1:
  132. IN_CLASSA_NET = 0xff000000 // in.h:330:1:
  133. IN_CLASSA_NSHIFT = 24 // in.h:331:1:
  134. IN_CLASSB_HOST = 0x0000ffff // in.h:338:1:
  135. IN_CLASSB_MAX = 65536 // in.h:339:1:
  136. IN_CLASSB_NET = 0xffff0000 // in.h:336:1:
  137. IN_CLASSB_NSHIFT = 16 // in.h:337:1:
  138. IN_CLASSC_HOST = 0x000000ff // in.h:344:1:
  139. IN_CLASSC_NET = 0xffffff00 // in.h:342:1:
  140. IN_CLASSC_NSHIFT = 8 // in.h:343:1:
  141. IN_CLASSD_HOST = 0x0fffffff // in.h:349:1:
  142. IN_CLASSD_NET = 0xf0000000 // in.h:347:1:
  143. IN_CLASSD_NSHIFT = 28 // in.h:348:1:
  144. IN_CLASSE_NET = 0xffffffff // in.h:352:1:
  145. IN_LOOPBACKNET = 127 // in.h:395:1:
  146. IN_PRIVATE12_MASK = 0xfff00000 // in.h:383:1:
  147. IN_PRIVATE12_NET = 0xac100000 // in.h:382:1:
  148. IN_PRIVATE16_MASK = 0xffff0000 // in.h:385:1:
  149. IN_PRIVATE16_NET = 0xc0a80000 // in.h:384:1:
  150. IN_PRIVATE8_MASK = 0xff000000 // in.h:381:1:
  151. IN_PRIVATE8_NET = 0x0a000000 // in.h:380:1:
  152. IPPORT_BIFFUDP = 512 // in.h:250:1:
  153. IPPORT_BOOTPC = 68 // in.h:214:1:
  154. IPPORT_BOOTPS = 67 // in.h:213:1:
  155. IPPORT_CHARGEN = 19 // in.h:199:1:
  156. IPPORT_CMDSERVER = 514 // in.h:243:1:
  157. IPPORT_DAYTIME = 13 // in.h:197:1:
  158. IPPORT_DHCPV6C = 546 // in.h:260:1:
  159. IPPORT_DHCPV6S = 547 // in.h:261:1:
  160. IPPORT_DISCARD = 9 // in.h:195:1:
  161. IPPORT_DOMAIN = 53 // in.h:206:1:
  162. IPPORT_ECHO = 7 // in.h:194:1:
  163. IPPORT_EFSSERVER = 520 // in.h:245:1:
  164. IPPORT_EXECSERVER = 512 // in.h:241:1:
  165. IPPORT_FINGER = 79 // in.h:217:1:
  166. IPPORT_FTP = 21 // in.h:200:1:
  167. IPPORT_HTTP = 80 // in.h:218:1:
  168. IPPORT_HTTP_ALT = 8080 // in.h:219:1:
  169. IPPORT_IKE = 500 // in.h:235:1:
  170. IPPORT_IKE_NATT = 4500 // in.h:236:1:
  171. IPPORT_LDAP = 389 // in.h:226:1:
  172. IPPORT_LOGINSERVER = 513 // in.h:242:1:
  173. IPPORT_MDNS = 5353 // in.h:207:1:
  174. IPPORT_MIP = 434 // in.h:228:1:
  175. IPPORT_MTP = 57 // in.h:208:1:
  176. IPPORT_NAMESERVER = 42 // in.h:204:1:
  177. IPPORT_NETBIOS_DGM = 138 // in.h:224:1:
  178. IPPORT_NETBIOS_NS = 137 // in.h:223:1:
  179. IPPORT_NETBIOS_SSN = 139 // in.h:225:1:
  180. IPPORT_NETSTAT = 15 // in.h:198:1:
  181. IPPORT_NTP = 123 // in.h:222:1:
  182. IPPORT_PRINTER = 515 // in.h:244:1:
  183. IPPORT_RESERVED = 1024 // in.h:271:1:
  184. IPPORT_RIPNG = 521 // in.h:255:1:
  185. IPPORT_RJE = 77 // in.h:216:1:
  186. IPPORT_ROUTESERVER = 520 // in.h:254:1:
  187. IPPORT_SLP = 427 // in.h:227:1:
  188. IPPORT_SMB = 445 // in.h:229:1:
  189. IPPORT_SMTP = 25 // in.h:202:1:
  190. IPPORT_SOCKS = 1080 // in.h:263:1:
  191. IPPORT_SUPDUP = 95 // in.h:221:1:
  192. IPPORT_SYSLOG = 514 // in.h:252:1:
  193. IPPORT_SYSTAT = 11 // in.h:196:1:
  194. IPPORT_TALK = 517 // in.h:253:1:
  195. IPPORT_TELNET = 23 // in.h:201:1:
  196. IPPORT_TFTP = 69 // in.h:215:1:
  197. IPPORT_TIMESERVER = 37 // in.h:203:1:
  198. IPPORT_TTYLINK = 87 // in.h:220:1:
  199. IPPORT_USERRESERVED = 5000 // in.h:272:1:
  200. IPPORT_VXLAN = 4789 // in.h:230:1:
  201. IPPORT_WHOIS = 43 // in.h:205:1:
  202. IPPORT_WHOSERVER = 513 // in.h:251:1:
  203. IPPROTO_AH = 51 // in.h:169:1:
  204. IPPROTO_DSTOPTS = 60 // in.h:172:1:
  205. IPPROTO_EGP = 8 // in.h:160:1:
  206. IPPROTO_ENCAP = 4 // in.h:158:1:
  207. IPPROTO_EON = 80 // in.h:175:1:
  208. IPPROTO_ESP = 50 // in.h:168:1:
  209. IPPROTO_FRAGMENT = 44 // in.h:166:1:
  210. IPPROTO_GGP = 3 // in.h:157:1:
  211. IPPROTO_HELLO = 63 // in.h:173:1:
  212. IPPROTO_HOPOPTS = 0 // in.h:154:1:
  213. IPPROTO_ICMP = 1 // in.h:155:1:
  214. IPPROTO_ICMPV6 = 58 // in.h:170:1:
  215. IPPROTO_IDP = 22 // in.h:163:1:
  216. IPPROTO_IGMP = 2 // in.h:156:1:
  217. IPPROTO_IP = 0 // in.h:153:1:
  218. IPPROTO_IPV6 = 41 // in.h:164:1:
  219. IPPROTO_MAX = 256 // in.h:182:1:
  220. IPPROTO_ND = 77 // in.h:174:1:
  221. IPPROTO_NONE = 59 // in.h:171:1:
  222. IPPROTO_OSPF = 89 // in.h:176:1:
  223. IPPROTO_PIM = 103 // in.h:177:1:
  224. IPPROTO_PUP = 12 // in.h:161:1:
  225. IPPROTO_RAW = 255 // in.h:181:1:
  226. IPPROTO_ROUTING = 43 // in.h:165:1:
  227. IPPROTO_RSVP = 46 // in.h:167:1:
  228. IPPROTO_SCTP = 132 // in.h:178:1:
  229. IPPROTO_TCP = 6 // in.h:159:1:
  230. IPPROTO_UDP = 17 // in.h:162:1:
  231. IPSEC_PREF_NEVER = 0x01 // in.h:941:1:
  232. IPSEC_PREF_REQUIRED = 0x02 // in.h:942:1:
  233. IPSEC_PREF_UNIQUE = 0x04 // in.h:943:1:
  234. IPSEC_PROTO_AH = 2 // netdb.h:209:1:
  235. IPSEC_PROTO_ESP = 3 // netdb.h:210:1:
  236. IPV6_ADD_MEMBERSHIP = 0x9 // in.h:1224:1:
  237. IPV6_BOUND_IF = 0x41 // in.h:1307:1:
  238. IPV6_CHECKSUM = 0x18 // in.h:1257:1:
  239. IPV6_DONTFRAG = 0x21 // in.h:1260:1:
  240. IPV6_DROP_MEMBERSHIP = 0xa // in.h:1226:1:
  241. IPV6_DSTOPTS = 0xf // in.h:1234:1:
  242. IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00 // in.h:447:1:
  243. IPV6_FLOWINFO_TCLASS = 0x0000f00f // in.h:448:1:
  244. IPV6_HOPLIMIT = 0xc // in.h:1231:1:
  245. IPV6_HOPOPTS = 0xe // in.h:1233:1:
  246. IPV6_JOIN_GROUP = 0x9 // in.h:1202:1:
  247. IPV6_LEAVE_GROUP = 0xa // in.h:1204:1:
  248. IPV6_MULTICAST_HOPS = 0x7 // in.h:1196:1:
  249. IPV6_MULTICAST_IF = 0x6 // in.h:1193:1:
  250. IPV6_MULTICAST_LOOP = 0x8 // in.h:1199:1:
  251. IPV6_NEXTHOP = 0xd // in.h:1232:1:
  252. IPV6_PAD1_OPT = 0 // in.h:1314:1:
  253. IPV6_PATHMTU = 0x25 // in.h:1264:1:
  254. IPV6_PKTINFO = 0xb // in.h:1229:1:
  255. IPV6_PREFER_SRC_CGA = 0x00000020 // in.h:1289:1:
  256. IPV6_PREFER_SRC_CGADEFAULT = 16 // in.h:1296:1:
  257. IPV6_PREFER_SRC_CGAMASK = 48 // in.h:1295:1:
  258. IPV6_PREFER_SRC_COA = 0x00000002 // in.h:1285:1:
  259. IPV6_PREFER_SRC_DEFAULT = 21 // in.h:1301:1:
  260. IPV6_PREFER_SRC_HOME = 0x00000001 // in.h:1284:1:
  261. IPV6_PREFER_SRC_MASK = 63 // in.h:1298:1:
  262. IPV6_PREFER_SRC_MIPDEFAULT = 1 // in.h:1292:1:
  263. IPV6_PREFER_SRC_MIPMASK = 3 // in.h:1291:1:
  264. IPV6_PREFER_SRC_NONCGA = 0x00000010 // in.h:1288:1:
  265. IPV6_PREFER_SRC_PUBLIC = 0x00000004 // in.h:1286:1:
  266. IPV6_PREFER_SRC_TMP = 0x00000008 // in.h:1287:1:
  267. IPV6_PREFER_SRC_TMPDEFAULT = 4 // in.h:1294:1:
  268. IPV6_PREFER_SRC_TMPMASK = 12 // in.h:1293:1:
  269. IPV6_RECVDSTOPTS = 0x28 // in.h:1271:1:
  270. IPV6_RECVHOPLIMIT = 0x13 // in.h:1240:1:
  271. IPV6_RECVHOPOPTS = 0x14 // in.h:1241:1:
  272. IPV6_RECVPATHMTU = 0x24 // in.h:1263:1:
  273. IPV6_RECVPKTINFO = 0x12 // in.h:1239:1:
  274. IPV6_RECVRTHDR = 0x16 // in.h:1249:1:
  275. IPV6_RECVRTHDRDSTOPTS = 0x17 // in.h:1255:1:
  276. IPV6_RECVTCLASS = 0x19 // in.h:1258:1:
  277. IPV6_RTHDR = 0x10 // in.h:1236:1:
  278. IPV6_RTHDRDSTOPTS = 0x11 // in.h:1237:1:
  279. IPV6_RTHDR_TYPE_0 = 0 // in.h:1152:1:
  280. IPV6_SEC_OPT = 0x22 // in.h:1261:1:
  281. IPV6_SRC_PREFERENCES = 0x23 // in.h:1262:1:
  282. IPV6_TCLASS = 0x26 // in.h:1265:1:
  283. IPV6_UNICAST_HOPS = 0x5 // in.h:1190:1:
  284. IPV6_UNSPEC_SRC = 0x42 // in.h:1308:1:
  285. IPV6_USE_MIN_MTU = 0x20 // in.h:1259:1:
  286. IPV6_V6ONLY = 0x27 // in.h:1266:1:
  287. IP_ADD_MEMBERSHIP = 0x13 // in.h:921:1:
  288. IP_ADD_SOURCE_MEMBERSHIP = 0x17 // in.h:925:1:
  289. IP_BLOCK_SOURCE = 0x15 // in.h:923:1:
  290. IP_BOUND_IF = 0x41 // in.h:976:1:
  291. IP_BROADCAST = 0x106 // in.h:994:1:
  292. IP_BROADCAST_TTL = 0x43 // in.h:978:1:
  293. IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:1009:1:
  294. IP_DEFAULT_MULTICAST_TTL = 1 // in.h:1008:1:
  295. IP_DHCPINIT_IF = 0x45 // in.h:980:1:
  296. IP_DONTFRAG = 0x1b // in.h:934:1:
  297. IP_DONTROUTE = 0x105 // in.h:990:1:
  298. IP_DROP_MEMBERSHIP = 0x14 // in.h:922:1:
  299. IP_DROP_SOURCE_MEMBERSHIP = 0x18 // in.h:926:1:
  300. IP_HDRINCL = 2 // in.h:899:1:
  301. IP_MULTICAST_IF = 0x10 // in.h:918:1:
  302. IP_MULTICAST_LOOP = 0x12 // in.h:920:1:
  303. IP_MULTICAST_TTL = 0x11 // in.h:919:1:
  304. IP_NEXTHOP = 0x19 // in.h:927:1:
  305. IP_OPTIONS = 1 // in.h:896:1:
  306. IP_PKTINFO = 0x1a // in.h:932:1:
  307. IP_RECVDSTADDR = 0x7 // in.h:911:1:
  308. IP_RECVIF = 0x9 // in.h:913:1:
  309. IP_RECVOPTS = 0x5 // in.h:909:1:
  310. IP_RECVPKTINFO = 0x1a // in.h:933:1:
  311. IP_RECVRETOPTS = 0x6 // in.h:910:1:
  312. IP_RECVSLLA = 0xa // in.h:914:1:
  313. IP_RECVTOS = 0xc // in.h:916:1:
  314. IP_RECVTTL = 0xb // in.h:915:1:
  315. IP_RETOPTS = 0x8 // in.h:912:1:
  316. IP_REUSEADDR = 0x104 // in.h:986:1:
  317. IP_SEC_OPT = 0x22 // in.h:940:1:
  318. IP_TOS = 3 // in.h:902:1:
  319. IP_TTL = 4 // in.h:906:1:
  320. IP_UNBLOCK_SOURCE = 0x16 // in.h:924:1:
  321. IP_UNSPEC_SRC = 0x42 // in.h:977:1:
  322. ITIMER_PROF = 2 // time.h:201:1:
  323. ITIMER_REAL = 0 // time.h:199:1:
  324. ITIMER_REALPROF = 3 // time.h:204:1:
  325. ITIMER_VIRTUAL = 1 // time.h:200:1:
  326. LINUX_SLL_BROADCAST = 1 // socket_impl.h:122:1:
  327. LINUX_SLL_HOST = 0 // socket_impl.h:121:1:
  328. LINUX_SLL_MULTICAST = 2 // socket_impl.h:123:1:
  329. LINUX_SLL_OTHERHOST = 3 // socket_impl.h:124:1:
  330. LINUX_SLL_OUTGOING = 4 // socket_impl.h:125:1:
  331. MAXADDRS = 35 // netdb.h:397:1:
  332. MAXALIASES = 35 // netdb.h:396:1:
  333. MAXBSIZE = 8192 // param.h:249:1:
  334. MAXFRAG = 8 // param.h:252:1:
  335. MAXHOSTNAMELEN = 256 // netdb.h:394:1:
  336. MAXLINK = 32767 // param.h:126:1:
  337. MAXLINKNAMELEN = 32 // param.h:209:1:
  338. MAXNAMELEN = 256 // param.h:202:1:
  339. MAXOFFSET_T = 0x7fffffffffffffff // param.h:258:1:
  340. MAXOFF_T = 0x7fffffffffffffff // param.h:257:1:
  341. MAXPATHLEN = 1024 // param.h:199:1:
  342. MAXPROJID = 2147483647 // param.h:125:1:
  343. MAXSYMLINKS = 20 // param.h:201:1:
  344. MAXUID = 2147483647 // param.h:123:1:
  345. MAX_CANON = 256 // param.h:89:1:
  346. MAX_INPUT = 512 // param.h:86:1:
  347. MCAST_BLOCK_SOURCE = 0x2b // in.h:1278:1:
  348. MCAST_EXCLUDE = 2 // in.h:1122:1:
  349. MCAST_INCLUDE = 1 // in.h:1121:1:
  350. MCAST_JOIN_GROUP = 0x29 // in.h:1276:1:
  351. MCAST_JOIN_SOURCE_GROUP = 0x2d // in.h:1280:1:
  352. MCAST_LEAVE_GROUP = 0x2a // in.h:1277:1:
  353. MCAST_LEAVE_SOURCE_GROUP = 0x2e // in.h:1281:1:
  354. MCAST_UNBLOCK_SOURCE = 0x2c // in.h:1279:1:
  355. MICROSEC = 1000000 // time.h:246:1:
  356. MILLISEC = 1000 // time.h:245:1:
  357. MINEPHUID = 0x80000000 // param.h:128:1:
  358. MSG_CTRUNC = 0x10 // socket.h:429:1:
  359. MSG_DONTROUTE = 0x4 // socket.h:427:1:
  360. MSG_DONTWAIT = 0x80 // socket.h:432:1:
  361. MSG_DUPCTRL = 0x800 // socket.h:435:1:
  362. MSG_EOR = 0x8 // socket.h:428:1:
  363. MSG_MAXIOVLEN = 16 // socket.h:440:1:
  364. MSG_NOSIGNAL = 0x200 // socket.h:434:1:
  365. MSG_NOTIFICATION = 0x100 // socket.h:433:1:
  366. MSG_OOB = 0x1 // socket.h:425:1:
  367. MSG_PEEK = 0x2 // socket.h:426:1:
  368. MSG_TRUNC = 0x20 // socket.h:430:1:
  369. MSG_WAITALL = 0x40 // socket.h:431:1:
  370. MSG_XPG4_2 = 0x8000 // socket.h:437:1:
  371. NADDR = 13 // param.h:212:1:
  372. NANOSEC = 1000000000 // time.h:247:1:
  373. NBBY = 8 // select.h:103:1:
  374. NBPS = 0x20000 // param.h:165:1:
  375. NBPSCTR = 512 // param.h:166:1:
  376. NCARGS = 2097152 // param.h:294:1:
  377. NCARGS32 = 0x100000 // param.h:291:1:
  378. NCARGS64 = 0x200000 // param.h:292:1:
  379. NC_APPLETALK = "appletalk" // netconfig.h:108:1:
  380. NC_BROADCAST = 02 // netconfig.h:85:1:
  381. NC_CCITT = "ccitt" // netconfig.h:102:1:
  382. NC_CHAOS = "chaos" // netconfig.h:97:1:
  383. NC_DATAKIT = "datakit" // netconfig.h:101:1:
  384. NC_DECNET = "decnet" // netconfig.h:104:1:
  385. NC_DLI = "dli" // netconfig.h:105:1:
  386. NC_ECMA = "ecma" // netconfig.h:100:1:
  387. NC_GOSIP = "gosip" // netconfig.h:114:1:
  388. NC_HYLINK = "hylink" // netconfig.h:107:1:
  389. NC_IBTF = "ibtf" // netconfig.h:138:1:
  390. NC_ICMP = "icmp" // netconfig.h:132:1:
  391. NC_IEEE802 = "ieee802" // netconfig.h:110:1:
  392. NC_IMPLINK = "implink" // netconfig.h:95:1:
  393. NC_INET = "inet" // netconfig.h:93:1:
  394. NC_INET6 = "inet6" // netconfig.h:94:1:
  395. NC_KDAPL = "kdapl" // netconfig.h:139:1:
  396. NC_KVIPL = "kvipl" // netconfig.h:137:1:
  397. NC_LAT = "lat" // netconfig.h:106:1:
  398. NC_LOOPBACK = "loopback" // netconfig.h:92:1:
  399. NC_NBS = "nbs" // netconfig.h:99:1:
  400. NC_NIT = "nit" // netconfig.h:109:1:
  401. NC_NOFLAG = 00 // netconfig.h:83:1:
  402. NC_NOPROTO = "-" // netconfig.h:129:1:
  403. NC_NOPROTOFMLY = "-" // netconfig.h:91:1:
  404. NC_NS = "ns" // netconfig.h:98:1:
  405. NC_OSI = "osi" // netconfig.h:111:1:
  406. NC_OSINET = "osinet" // netconfig.h:113:1:
  407. NC_PUP = "pup" // netconfig.h:96:1:
  408. NC_RDMA = "rdma" // netconfig.h:123:1:
  409. NC_SNA = "sna" // netconfig.h:103:1:
  410. NC_TCP = "tcp" // netconfig.h:130:1:
  411. NC_TPI_CLTS = 1 // netconfig.h:65:1:
  412. NC_TPI_COTS = 2 // netconfig.h:66:1:
  413. NC_TPI_COTS_ORD = 3 // netconfig.h:67:1:
  414. NC_TPI_RAW = 4 // netconfig.h:68:1:
  415. NC_TPI_RDMA = 5 // netconfig.h:77:1:
  416. NC_UDP = "udp" // netconfig.h:131:1:
  417. NC_VISIBLE = 01 // netconfig.h:84:1:
  418. NC_X25 = "x25" // netconfig.h:112:1:
  419. NETCONFIG = "/etc/netconfig" // netconfig.h:41:1:
  420. NETDB_INTERNAL = -1 // netdb.h:390:1:
  421. NETDB_SUCCESS = 0 // netdb.h:391:1:
  422. NETPATH = "NETPATH" // netconfig.h:42:1:
  423. NGROUPS_MAX_DEFAULT = 16 // param.h:148:1:
  424. NGROUPS_OLDMAX = 32 // param.h:143:1:
  425. NGROUPS_UMAX = 1024 // param.h:142:1:
  426. NGROUPS_UMIN = 0 // param.h:141:1:
  427. NI_DGRAM = 0x0010 // netdb.h:171:1:
  428. NI_MAXHOST = 1025 // netdb.h:179:1:
  429. NI_MAXSERV = 32 // netdb.h:180:1:
  430. NI_NAMEREQD = 0x0004 // netdb.h:169:1:
  431. NI_NOFQDN = 0x0001 // netdb.h:167:1:
  432. NI_NUMERICHOST = 0x0002 // netdb.h:168:1:
  433. NI_NUMERICSCOPE = 0x0040 // netdb.h:176:1:
  434. NI_NUMERICSERV = 0x0008 // netdb.h:170:1:
  435. NI_WITHSCOPEID = 0x0020 // netdb.h:175:1:
  436. NMOUNT = 40 // param.h:130:1:
  437. NOFILE = 20 // param.h:132:1:
  438. NO_ADDRESS = 4 // netdb.h:387:1:
  439. NO_DATA = 4 // netdb.h:384:1:
  440. NO_RECOVERY = 3 // netdb.h:383:1:
  441. NZERO = 20 // param.h:153:1:
  442. PF_802 = 18 // socket.h:338:1:
  443. PF_APPLETALK = 16 // socket.h:336:1:
  444. PF_CCITT = 10 // socket.h:330:1:
  445. PF_CHAOS = 5 // socket.h:325:1:
  446. PF_DATAKIT = 9 // socket.h:329:1:
  447. PF_DECnet = 12 // socket.h:332:1:
  448. PF_DLI = 13 // socket.h:333:1:
  449. PF_ECMA = 8 // socket.h:328:1:
  450. PF_FILE = 1 // socket.h:321:1:
  451. PF_GOSIP = 22 // socket.h:342:1:
  452. PF_HYLINK = 15 // socket.h:335:1:
  453. PF_IMPLINK = 3 // socket.h:323:1:
  454. PF_INET = 2 // socket.h:322:1:
  455. PF_INET6 = 26 // socket.h:346:1:
  456. PF_INET_OFFLOAD = 30 // socket.h:350:1:
  457. PF_IPX = 23 // socket.h:343:1:
  458. PF_KEY = 27 // socket.h:347:1:
  459. PF_LAT = 14 // socket.h:334:1:
  460. PF_LINK = 25 // socket.h:345:1:
  461. PF_LOCAL = 1 // socket.h:320:1:
  462. PF_LX_NETLINK = 33 // socket.h:353:1:
  463. PF_MAX = 33 // socket.h:355:1:
  464. PF_NBS = 7 // socket.h:327:1:
  465. PF_NCA = 28 // socket.h:348:1:
  466. PF_NIT = 17 // socket.h:337:1:
  467. PF_NS = 6 // socket.h:326:1:
  468. PF_OSI = 19 // socket.h:339:1:
  469. PF_OSINET = 21 // socket.h:341:1:
  470. PF_PACKET = 32 // socket.h:352:1:
  471. PF_POLICY = 29 // socket.h:349:1:
  472. PF_PUP = 4 // socket.h:324:1:
  473. PF_ROUTE = 24 // socket.h:344:1:
  474. PF_SNA = 11 // socket.h:331:1:
  475. PF_TRILL = 31 // socket.h:351:1:
  476. PF_UNIX = 1 // socket.h:319:1:
  477. PF_UNSPEC = 0 // socket.h:318:1:
  478. PF_X25 = 20 // socket.h:340:1:
  479. PIPE_BUF = 5120 // param.h:221:1:
  480. PIPE_MAX = 5120 // param.h:225:1:
  481. POLLERR = 0x0008 // poll.h:74:1:
  482. POLLET = 0x2000 // poll.h:84:1:
  483. POLLHUP = 0x0010 // poll.h:75:1:
  484. POLLIN = 0x0001 // poll.h:59:1:
  485. POLLNORM = 64 // poll.h:68:1:
  486. POLLNVAL = 0x0020 // poll.h:76:1:
  487. POLLONESHOT = 0x1000 // poll.h:83:1:
  488. POLLOUT = 0x0004 // poll.h:61:1:
  489. POLLPRI = 0x0002 // poll.h:60:1:
  490. POLLRDBAND = 0x0080 // poll.h:64:1:
  491. POLLRDHUP = 0x4000 // poll.h:66:1:
  492. POLLRDNORM = 0x0040 // poll.h:62:1:
  493. POLLREMOVE = 0x0800 // poll.h:82:1:
  494. POLLWRBAND = 0x0100 // poll.h:65:1:
  495. POLLWRNORM = 4 // poll.h:63:1:
  496. PREMOTE = 39 // param.h:185:1:
  497. PROTO_SDP = 257 // in.h:185:1:
  498. P_MYID = -1 // types.h:632:1:
  499. REG_LABEL_BP = 2 // machtypes.h:44:1:
  500. REG_LABEL_MAX = 8 // machtypes.h:51:1:
  501. REG_LABEL_PC = 0 // machtypes.h:42:1:
  502. REG_LABEL_R12 = 4 // machtypes.h:47:1:
  503. REG_LABEL_R13 = 5 // machtypes.h:48:1:
  504. REG_LABEL_R14 = 6 // machtypes.h:49:1:
  505. REG_LABEL_R15 = 7 // machtypes.h:50:1:
  506. REG_LABEL_RBX = 3 // machtypes.h:46:1:
  507. REG_LABEL_SP = 1 // machtypes.h:43:1:
  508. SCM_RIGHTS = 0x1010 // socket.h:197:1:
  509. SCM_TIMESTAMP = 4115 // socket.h:201:1:
  510. SCM_UCRED = 0x1012 // socket.h:199:1:
  511. SCOPE_DELIMITER = 37 // netdb.h:187:1:
  512. SCTRSHFT = 9 // param.h:168:1:
  513. SEC = 1 // time.h:244:1:
  514. SHUT_RD = 0 // socket.h:458:1:
  515. SHUT_RDWR = 2 // socket.h:460:1:
  516. SHUT_WR = 1 // socket.h:459:1:
  517. SOCK_CLOEXEC = 0x080000 // socket.h:127:1:
  518. SOCK_DGRAM = 1 // socket.h:113:1:
  519. SOCK_NDELAY = 0x200000 // socket.h:129:1:
  520. SOCK_NONBLOCK = 0x100000 // socket.h:128:1:
  521. SOCK_RAW = 4 // socket.h:114:1:
  522. SOCK_RDM = 5 // socket.h:120:1:
  523. SOCK_SEQPACKET = 6 // socket.h:121:1:
  524. SOCK_STREAM = 2 // socket.h:112:1:
  525. SOCK_TYPE_MASK = 0xffff // socket.h:122:1:
  526. SOL_FILTER = 0xfffc // socket.h:267:1:
  527. SOL_PACKET = 0xfffd // socket.h:266:1:
  528. SOL_ROUTE = 0xfffe // socket.h:264:1:
  529. SOL_SOCKET = 0xffff // socket.h:262:1:
  530. SOMAXCONN = 128 // socket.h:360:1:
  531. SO_ACCEPTCONN = 0x0002 // socket.h:135:1:
  532. SO_ALLZONES = 0x1014 // socket.h:202:1:
  533. SO_ANON_MLP = 0x100a // socket.h:191:1:
  534. SO_ATTACH_FILTER = 0x40000001 // socket.h:157:1:
  535. SO_BROADCAST = 0x0020 // socket.h:139:1:
  536. SO_DEBUG = 0x0001 // socket.h:134:1:
  537. SO_DETACH_FILTER = 0x40000002 // socket.h:158:1:
  538. SO_DGRAM_ERRIND = 0x0200 // socket.h:143:1:
  539. SO_DOMAIN = 0x100c // socket.h:193:1:
  540. SO_DONTLINGER = -129 // socket.h:177:1:
  541. SO_DONTROUTE = 0x0010 // socket.h:138:1:
  542. SO_ERROR = 0x1007 // socket.h:188:1:
  543. SO_EXCLBIND = 0x1015 // socket.h:203:1:
  544. SO_KEEPALIVE = 0x0008 // socket.h:137:1:
  545. SO_LINGER = 0x0080 // socket.h:141:1:
  546. SO_MAC_EXEMPT = 0x100b // socket.h:192:1:
  547. SO_MAC_IMPLICIT = 0x1016 // socket.h:204:1:
  548. SO_OOBINLINE = 0x0100 // socket.h:142:1:
  549. SO_PROTOTYPE = 0x1009 // socket.h:190:1:
  550. SO_RCVBUF = 0x1002 // socket.h:183:1:
  551. SO_RCVLOWAT = 0x1004 // socket.h:185:1:
  552. SO_RCVPSH = 0x100d // socket.h:194:1:
  553. SO_RCVTIMEO = 0x1006 // socket.h:187:1:
  554. SO_RECVUCRED = 0x0400 // socket.h:144:1:
  555. SO_REUSEADDR = 0x0004 // socket.h:136:1:
  556. SO_SECATTR = 0x1011 // socket.h:198:1:
  557. SO_SNDBUF = 0x1001 // socket.h:182:1:
  558. SO_SNDLOWAT = 0x1003 // socket.h:184:1:
  559. SO_SNDTIMEO = 0x1005 // socket.h:186:1:
  560. SO_TIMESTAMP = 0x1013 // socket.h:200:1:
  561. SO_TYPE = 0x1008 // socket.h:189:1:
  562. SO_USELOOPBACK = 0x0040 // socket.h:140:1:
  563. SO_VRRP = 0x1017 // socket.h:205:1:
  564. SYSNAME = 9 // param.h:184:1:
  565. TIMER_ABSTIME = 0x1 // time_impl.h:134:1:
  566. TIMER_RELTIME = 0x0 // time_impl.h:133:1:
  567. TIME_UTC = 0x1 // time.h:306:1:
  568. TRY_AGAIN = 2 // netdb.h:382:1:
  569. TYPICALMAXPATHLEN = 64 // param.h:200:1:
  570. UBSIZE = 512 // param.h:167:1:
  571. UID_DLADM = 15 // param.h:98:1:
  572. UID_NETADM = 16 // param.h:99:1:
  573. UID_NOACCESS = 60002 // param.h:101:1:
  574. UID_NOBODY = 60001 // param.h:94:1:
  575. UID_UNKNOWN = 96 // param.h:96:1:
  576. UIOA_ALLOC = 0x0001 // uio.h:194:1:
  577. UIOA_CLR = -16 // uio.h:199:1:
  578. UIOA_ENABLED = 0x0004 // uio.h:196:1:
  579. UIOA_FINI = 0x0008 // uio.h:197:1:
  580. UIOA_INIT = 0x0002 // uio.h:195:1:
  581. UIOA_IOV_MAX = 16 // uio.h:112:1:
  582. UIOA_POLL = 0x0010 // uio.h:201:1:
  583. UIO_ASYNC = 0x0002 // uio.h:237:1:
  584. UIO_COPY_CACHED = 0x0001 // uio.h:235:1:
  585. UIO_COPY_DEFAULT = 0x0000 // uio.h:234:1:
  586. UIO_XUIO = 0x0004 // uio.h:238:1:
  587. X_ACL_ACE_ENABLED = 0x2 // unistd.h:349:1:
  588. X_ACL_ACLENT_ENABLED = 0x1 // unistd.h:348:1:
  589. X_ALIGNMENT_REQUIRED = 1 // isa_defs.h:262:1:
  590. X_BIT_FIELDS_LTOH = 0 // isa_defs.h:245:1:
  591. X_BOOL_ALIGNMENT = 1 // isa_defs.h:248:1:
  592. X_CASE_INSENSITIVE = 0x2 // unistd.h:342:1:
  593. X_CASE_SENSITIVE = 0x1 // unistd.h:341:1:
  594. X_CHAR_ALIGNMENT = 1 // isa_defs.h:249:1:
  595. X_CHAR_IS_SIGNED = 0 // isa_defs.h:247:1:
  596. X_CLOCKID_T = 0 // types.h:568:1:
  597. X_CLOCK_T = 0 // types.h:563:1:
  598. X_COND_MAGIC = 0x4356 // types.h:426:1:
  599. X_CS_LFS64_CFLAGS = 72 // unistd.h:61:1:
  600. X_CS_LFS64_LDFLAGS = 73 // unistd.h:62:1:
  601. X_CS_LFS64_LIBS = 74 // unistd.h:63:1:
  602. X_CS_LFS64_LINTFLAGS = 75 // unistd.h:64:1:
  603. X_CS_LFS_CFLAGS = 68 // unistd.h:56:1:
  604. X_CS_LFS_LDFLAGS = 69 // unistd.h:57:1:
  605. X_CS_LFS_LIBS = 70 // unistd.h:58:1:
  606. X_CS_LFS_LINTFLAGS = 71 // unistd.h:59:1:
  607. X_CS_PATH = 65 // unistd.h:50:1:
  608. X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 800 // unistd.h:85:1:
  609. X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 801 // unistd.h:86:1:
  610. X_CS_POSIX_V6_ILP32_OFF32_LIBS = 802 // unistd.h:87:1:
  611. X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 803 // unistd.h:88:1:
  612. X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 804 // unistd.h:89:1:
  613. X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 805 // unistd.h:90:1:
  614. X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 806 // unistd.h:91:1:
  615. X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 807 // unistd.h:92:1:
  616. X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 808 // unistd.h:93:1:
  617. X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 809 // unistd.h:94:1:
  618. X_CS_POSIX_V6_LP64_OFF64_LIBS = 810 // unistd.h:95:1:
  619. X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 811 // unistd.h:96:1:
  620. X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 812 // unistd.h:97:1:
  621. X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 813 // unistd.h:98:1:
  622. X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 814 // unistd.h:99:1:
  623. X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 815 // unistd.h:100:1:
  624. X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 816 // unistd.h:101:1:
  625. X_CS_XBS5_ILP32_OFF32_CFLAGS = 700 // unistd.h:67:1:
  626. X_CS_XBS5_ILP32_OFF32_LDFLAGS = 701 // unistd.h:68:1:
  627. X_CS_XBS5_ILP32_OFF32_LIBS = 702 // unistd.h:69:1:
  628. X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 703 // unistd.h:70:1:
  629. X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 705 // unistd.h:71:1:
  630. X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 706 // unistd.h:72:1:
  631. X_CS_XBS5_ILP32_OFFBIG_LIBS = 707 // unistd.h:73:1:
  632. X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 708 // unistd.h:74:1:
  633. X_CS_XBS5_LP64_OFF64_CFLAGS = 709 // unistd.h:75:1:
  634. X_CS_XBS5_LP64_OFF64_LDFLAGS = 710 // unistd.h:76:1:
  635. X_CS_XBS5_LP64_OFF64_LIBS = 711 // unistd.h:77:1:
  636. X_CS_XBS5_LP64_OFF64_LINTFLAGS = 712 // unistd.h:78:1:
  637. X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 713 // unistd.h:79:1:
  638. X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 714 // unistd.h:80:1:
  639. X_CS_XBS5_LPBIG_OFFBIG_LIBS = 715 // unistd.h:81:1:
  640. X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 716 // unistd.h:82:1:
  641. X_DMA_USES_PHYSADDR = 0 // isa_defs.h:281:1:
  642. X_DONT_USE_1275_GENERIC_NAMES = 0 // isa_defs.h:287:1:
  643. X_DOUBLE_ALIGNMENT = 8 // isa_defs.h:256:1:
  644. X_DOUBLE_COMPLEX_ALIGNMENT = 8 // isa_defs.h:257:1:
  645. X_DTRACE_VERSION = 1 // feature_tests.h:490:1:
  646. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  647. X_FIRMWARE_NEEDS_FDISK = 0 // isa_defs.h:282:1:
  648. X_FLOAT_ALIGNMENT = 4 // isa_defs.h:252:1:
  649. X_FLOAT_COMPLEX_ALIGNMENT = 4 // isa_defs.h:253:1:
  650. X_HAVE_CPUID_INSN = 0 // isa_defs.h:288:1:
  651. X_IEEE_754 = 0 // isa_defs.h:246:1:
  652. X_INT64_TYPE = 0 // int_types.h:82:1:
  653. X_INT_ALIGNMENT = 4 // isa_defs.h:251:1:
  654. X_IN_ADDR_T = 0 // byteorder.h:78:1:
  655. X_IN_PORT_T = 0 // byteorder.h:73:1:
  656. X_IPADDR_T = 0 // in.h:98:1:
  657. X_ISO_CPP_14882_1998 = 0 // feature_tests.h:466:1:
  658. X_ISO_C_9899_1999 = 0 // feature_tests.h:472:1:
  659. X_ISO_C_9899_2011 = 0 // feature_tests.h:478:1:
  660. X_ISO_TIME_ISO_H = 0 // time_iso.h:46:1:
  661. X_LARGEFILE64_SOURCE = 1 // feature_tests.h:231:1:
  662. X_LARGEFILE_SOURCE = 1 // feature_tests.h:235:1:
  663. X_LITTLE_ENDIAN = 0 // isa_defs.h:242:1:
  664. X_LOCALE_T = 0 // time.h:291:1:
  665. X_LONGLONG_TYPE = 0 // feature_tests.h:412:1:
  666. X_LONG_ALIGNMENT = 8 // isa_defs.h:254:1:
  667. X_LONG_DOUBLE_ALIGNMENT = 16 // isa_defs.h:258:1:
  668. X_LONG_DOUBLE_COMPLEX_ALIGNMENT = 16 // isa_defs.h:259:1:
  669. X_LONG_LONG_ALIGNMENT = 8 // isa_defs.h:255:1:
  670. X_LONG_LONG_ALIGNMENT_32 = 4 // isa_defs.h:268:1:
  671. X_LONG_LONG_LTOH = 0 // isa_defs.h:244:1:
  672. X_LP64 = 1 // <predefined>:286:1:
  673. X_MAX_ALIGNMENT = 16 // isa_defs.h:261:1:
  674. X_MULTI_DATAMODEL = 0 // isa_defs.h:279:1:
  675. X_MUTEX_MAGIC = 0x4d58 // types.h:424:1:
  676. X_NBBY = 8 // select.h:100:1:
  677. X_NETDB_H = 0 // netdb.h:74:1:
  678. X_NETINET_IN_H = 0 // in.h:33:1:
  679. X_NET_IF_DL_H = 0 // if_dl.h:39:1:
  680. X_NORETURN_KYWD = 0 // feature_tests.h:448:1:
  681. X_OFF_T = 0 // types.h:142:1:
  682. X_OLD_IPV6_RECVDSTOPTS = 0x15 // in.h:1247:1:
  683. X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:87:1:
  684. X_PATH_HOSTS = "/etc/hosts" // netdb.h:88:1:
  685. X_PATH_IPNODES = "/etc/inet/ipnodes" // netdb.h:89:1:
  686. X_PATH_IPSECALGS = "/etc/inet/ipsecalgs" // netdb.h:90:1:
  687. X_PATH_NETMASKS = "/etc/netmasks" // netdb.h:91:1:
  688. X_PATH_NETWORKS = "/etc/networks" // netdb.h:92:1:
  689. X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:93:1:
  690. X_PATH_SERVICES = "/etc/services" // netdb.h:94:1:
  691. X_PC_2_SYMLINKS = 19 // unistd.h:309:1:
  692. X_PC_ACCESS_FILTERING = 25 // unistd.h:315:1:
  693. X_PC_ACL_ENABLED = 20 // unistd.h:310:1:
  694. X_PC_ALLOC_SIZE_MIN = 13 // unistd.h:303:1:
  695. X_PC_ASYNC_IO = 10 // unistd.h:299:1:
  696. X_PC_CASE_BEHAVIOR = 22 // unistd.h:312:1:
  697. X_PC_CHOWN_RESTRICTED = 9 // unistd.h:297:1:
  698. X_PC_FILESIZEBITS = 67 // unistd.h:325:1:
  699. X_PC_LAST = 101 // unistd.h:336:1:
  700. X_PC_LINK_MAX = 1 // unistd.h:289:1:
  701. X_PC_MAX_CANON = 2 // unistd.h:290:1:
  702. X_PC_MAX_INPUT = 3 // unistd.h:291:1:
  703. X_PC_MIN_HOLE_SIZE = 21 // unistd.h:311:1:
  704. X_PC_NAME_MAX = 4 // unistd.h:292:1:
  705. X_PC_NO_TRUNC = 7 // unistd.h:295:1:
  706. X_PC_PATH_MAX = 5 // unistd.h:293:1:
  707. X_PC_PIPE_BUF = 6 // unistd.h:294:1:
  708. X_PC_PRIO_IO = 11 // unistd.h:300:1:
  709. X_PC_REC_INCR_XFER_SIZE = 14 // unistd.h:304:1:
  710. X_PC_REC_MAX_XFER_SIZE = 15 // unistd.h:305:1:
  711. X_PC_REC_MIN_XFER_SIZE = 16 // unistd.h:306:1:
  712. X_PC_REC_XFER_ALIGN = 17 // unistd.h:307:1:
  713. X_PC_SATTR_ENABLED = 23 // unistd.h:313:1:
  714. X_PC_SATTR_EXISTS = 24 // unistd.h:314:1:
  715. X_PC_SYMLINK_MAX = 18 // unistd.h:308:1:
  716. X_PC_SYNC_IO = 12 // unistd.h:301:1:
  717. X_PC_TIMESTAMP_RESOLUTION = 26 // unistd.h:317:1:
  718. X_PC_VDISABLE = 8 // unistd.h:296:1:
  719. X_PC_XATTR_ENABLED = 100 // unistd.h:330:1:
  720. X_PC_XATTR_EXISTS = 101 // unistd.h:331:1:
  721. X_POINTER_ALIGNMENT = 8 // isa_defs.h:260:1:
  722. X_POSIX2_CHAR_TERM = 1 // unistd.h:391:1:
  723. X_POSIX2_C_BIND = 1 // unistd.h:401:1:
  724. X_POSIX2_C_DEV = 1 // unistd.h:402:1:
  725. X_POSIX2_C_VERSION = 199209 // unistd.h:376:1:
  726. X_POSIX2_FORT_RUN = 1 // unistd.h:403:1:
  727. X_POSIX2_LOCALEDEF = 1 // unistd.h:404:1:
  728. X_POSIX2_SW_DEV = 1 // unistd.h:405:1:
  729. X_POSIX2_UPE = 1 // unistd.h:406:1:
  730. X_POSIX2_VERSION = 199209 // unistd.h:363:1:
  731. X_POSIX_REGEXP = 1 // unistd.h:410:1:
  732. X_POSIX_SHELL = 1 // unistd.h:411:1:
  733. X_POSIX_VDISABLE = 0 // param.h:70:1:
  734. X_POSIX_VERSION = 199506 // unistd.h:355:1:
  735. X_PSM_MODULES = 0 // isa_defs.h:284:1:
  736. X_PTRDIFF_T = 0 // types.h:112:1:
  737. X_RESTRICT_KYWD = 0 // feature_tests.h:435:1:
  738. X_RTC_CONFIG = 0 // isa_defs.h:285:1:
  739. X_RWL_MAGIC = 0x5257 // types.h:427:1:
  740. X_SA_FAMILY_T = 0 // socket_impl.h:42:1:
  741. X_SC_2_CHAR_TERM = 66 // unistd.h:175:1:
  742. X_SC_2_C_BIND = 45 // unistd.h:153:1:
  743. X_SC_2_C_DEV = 46 // unistd.h:154:1:
  744. X_SC_2_C_VERSION = 47 // unistd.h:155:1:
  745. X_SC_2_FORT_DEV = 48 // unistd.h:156:1:
  746. X_SC_2_FORT_RUN = 49 // unistd.h:157:1:
  747. X_SC_2_LOCALEDEF = 50 // unistd.h:158:1:
  748. X_SC_2_PBS = 724 // unistd.h:246:1:
  749. X_SC_2_PBS_ACCOUNTING = 725 // unistd.h:247:1:
  750. X_SC_2_PBS_CHECKPOINT = 726 // unistd.h:248:1:
  751. X_SC_2_PBS_LOCATE = 728 // unistd.h:249:1:
  752. X_SC_2_PBS_MESSAGE = 729 // unistd.h:250:1:
  753. X_SC_2_PBS_TRACK = 730 // unistd.h:251:1:
  754. X_SC_2_SW_DEV = 51 // unistd.h:159:1:
  755. X_SC_2_UPE = 52 // unistd.h:160:1:
  756. X_SC_2_VERSION = 53 // unistd.h:161:1:
  757. X_SC_ADVISORY_INFO = 731 // unistd.h:252:1:
  758. X_SC_AIO_LISTIO_MAX = 18 // unistd.h:125:1:
  759. X_SC_AIO_MAX = 19 // unistd.h:126:1:
  760. X_SC_AIO_PRIO_DELTA_MAX = 20 // unistd.h:127:1:
  761. X_SC_ARG_MAX = 1 // unistd.h:106:1:
  762. X_SC_ASYNCHRONOUS_IO = 21 // unistd.h:128:1:
  763. X_SC_ATEXIT_MAX = 76 // unistd.h:179:1:
  764. X_SC_AVPHYS_PAGES = 501 // unistd.h:190:1:
  765. X_SC_BARRIERS = 732 // unistd.h:253:1:
  766. X_SC_BC_BASE_MAX = 54 // unistd.h:162:1:
  767. X_SC_BC_DIM_MAX = 55 // unistd.h:163:1:
  768. X_SC_BC_SCALE_MAX = 56 // unistd.h:164:1:
  769. X_SC_BC_STRING_MAX = 57 // unistd.h:165:1:
  770. X_SC_CHILD_MAX = 2 // unistd.h:107:1:
  771. X_SC_CLK_TCK = 3 // unistd.h:108:1:
  772. X_SC_CLOCK_SELECTION = 733 // unistd.h:254:1:
  773. X_SC_COHER_BLKSZ = 503 // unistd.h:196:1:
  774. X_SC_COLL_WEIGHTS_MAX = 58 // unistd.h:166:1:
  775. X_SC_CPUID_MAX = 517 // unistd.h:211:1:
  776. X_SC_CPUTIME = 734 // unistd.h:255:1:
  777. X_SC_DCACHE_ASSOC = 513 // unistd.h:206:1:
  778. X_SC_DCACHE_BLKSZ = 510 // unistd.h:203:1:
  779. X_SC_DCACHE_LINESZ = 508 // unistd.h:201:1:
  780. X_SC_DCACHE_SZ = 506 // unistd.h:199:1:
  781. X_SC_DCACHE_TBLKSZ = 511 // unistd.h:204:1:
  782. X_SC_DELAYTIMER_MAX = 22 // unistd.h:129:1:
  783. X_SC_EPHID_MAX = 518 // unistd.h:212:1:
  784. X_SC_EXPR_NEST_MAX = 59 // unistd.h:167:1:
  785. X_SC_FSYNC = 23 // unistd.h:130:1:
  786. X_SC_GETGR_R_SIZE_MAX = 569 // unistd.h:220:1:
  787. X_SC_GETPW_R_SIZE_MAX = 570 // unistd.h:221:1:
  788. X_SC_HOST_NAME_MAX = 735 // unistd.h:256:1:
  789. X_SC_ICACHE_ASSOC = 512 // unistd.h:205:1:
  790. X_SC_ICACHE_BLKSZ = 509 // unistd.h:202:1:
  791. X_SC_ICACHE_LINESZ = 507 // unistd.h:200:1:
  792. X_SC_ICACHE_SZ = 505 // unistd.h:198:1:
  793. X_SC_IOV_MAX = 77 // unistd.h:180:1:
  794. X_SC_IPV6 = 762 // unistd.h:283:1:
  795. X_SC_JOB_CONTROL = 6 // unistd.h:111:1:
  796. X_SC_LINE_MAX = 60 // unistd.h:168:1:
  797. X_SC_LOGIN_NAME_MAX = 571 // unistd.h:222:1:
  798. X_SC_LOGNAME_MAX = 10 // unistd.h:116:1:
  799. X_SC_MAPPED_FILES = 24 // unistd.h:131:1:
  800. X_SC_MAXPID = 514 // unistd.h:208:1:
  801. X_SC_MEMLOCK = 25 // unistd.h:132:1:
  802. X_SC_MEMLOCK_RANGE = 26 // unistd.h:133:1:
  803. X_SC_MEMORY_PROTECTION = 27 // unistd.h:134:1:
  804. X_SC_MESSAGE_PASSING = 28 // unistd.h:135:1:
  805. X_SC_MONOTONIC_CLOCK = 736 // unistd.h:257:1:
  806. X_SC_MQ_OPEN_MAX = 29 // unistd.h:136:1:
  807. X_SC_MQ_PRIO_MAX = 30 // unistd.h:137:1:
  808. X_SC_NGROUPS_MAX = 4 // unistd.h:109:1:
  809. X_SC_NPROCESSORS_CONF = 14 // unistd.h:120:1:
  810. X_SC_NPROCESSORS_MAX = 516 // unistd.h:210:1:
  811. X_SC_NPROCESSORS_ONLN = 15 // unistd.h:121:1:
  812. X_SC_OPEN_MAX = 5 // unistd.h:110:1:
  813. X_SC_PAGESIZE = 11 // unistd.h:117:1:
  814. X_SC_PAGE_SIZE = 11 // unistd.h:182:1:
  815. X_SC_PASS_MAX = 9 // unistd.h:115:1:
  816. X_SC_PHYS_PAGES = 500 // unistd.h:189:1:
  817. X_SC_PRIORITIZED_IO = 31 // unistd.h:138:1:
  818. X_SC_PRIORITY_SCHEDULING = 32 // unistd.h:139:1:
  819. X_SC_RAW_SOCKETS = 763 // unistd.h:284:1:
  820. X_SC_READER_WRITER_LOCKS = 737 // unistd.h:258:1:
  821. X_SC_REALTIME_SIGNALS = 33 // unistd.h:140:1:
  822. X_SC_REGEXP = 738 // unistd.h:259:1:
  823. X_SC_RE_DUP_MAX = 61 // unistd.h:169:1:
  824. X_SC_RTSIG_MAX = 34 // unistd.h:141:1:
  825. X_SC_SAVED_IDS = 7 // unistd.h:112:1:
  826. X_SC_SEMAPHORES = 35 // unistd.h:142:1:
  827. X_SC_SEM_NSEMS_MAX = 36 // unistd.h:143:1:
  828. X_SC_SEM_VALUE_MAX = 37 // unistd.h:144:1:
  829. X_SC_SHARED_MEMORY_OBJECTS = 38 // unistd.h:145:1:
  830. X_SC_SHELL = 739 // unistd.h:260:1:
  831. X_SC_SIGQUEUE_MAX = 39 // unistd.h:146:1:
  832. X_SC_SIGRT_MAX = 41 // unistd.h:148:1:
  833. X_SC_SIGRT_MIN = 40 // unistd.h:147:1:
  834. X_SC_SPAWN = 740 // unistd.h:261:1:
  835. X_SC_SPIN_LOCKS = 741 // unistd.h:262:1:
  836. X_SC_SPLIT_CACHE = 504 // unistd.h:197:1:
  837. X_SC_SPORADIC_SERVER = 742 // unistd.h:263:1:
  838. X_SC_SS_REPL_MAX = 743 // unistd.h:264:1:
  839. X_SC_STACK_PROT = 515 // unistd.h:209:1:
  840. X_SC_STREAM_MAX = 16 // unistd.h:122:1:
  841. X_SC_SYMLOOP_MAX = 744 // unistd.h:265:1:
  842. X_SC_SYNCHRONIZED_IO = 42 // unistd.h:149:1:
  843. X_SC_THREADS = 576 // unistd.h:227:1:
  844. X_SC_THREAD_ATTR_STACKADDR = 577 // unistd.h:228:1:
  845. X_SC_THREAD_ATTR_STACKSIZE = 578 // unistd.h:229:1:
  846. X_SC_THREAD_CPUTIME = 745 // unistd.h:266:1:
  847. X_SC_THREAD_DESTRUCTOR_ITERATIONS = 568 // unistd.h:219:1:
  848. X_SC_THREAD_KEYS_MAX = 572 // unistd.h:223:1:
  849. X_SC_THREAD_PRIORITY_SCHEDULING = 579 // unistd.h:230:1:
  850. X_SC_THREAD_PRIO_INHERIT = 580 // unistd.h:231:1:
  851. X_SC_THREAD_PRIO_PROTECT = 581 // unistd.h:232:1:
  852. X_SC_THREAD_PROCESS_SHARED = 582 // unistd.h:233:1:
  853. X_SC_THREAD_SAFE_FUNCTIONS = 583 // unistd.h:234:1:
  854. X_SC_THREAD_SPORADIC_SERVER = 746 // unistd.h:267:1:
  855. X_SC_THREAD_STACK_MIN = 573 // unistd.h:224:1:
  856. X_SC_THREAD_THREADS_MAX = 574 // unistd.h:225:1:
  857. X_SC_TIMEOUTS = 747 // unistd.h:268:1:
  858. X_SC_TIMERS = 43 // unistd.h:150:1:
  859. X_SC_TIMER_MAX = 44 // unistd.h:151:1:
  860. X_SC_TRACE = 748 // unistd.h:269:1:
  861. X_SC_TRACE_EVENT_FILTER = 749 // unistd.h:270:1:
  862. X_SC_TRACE_EVENT_NAME_MAX = 750 // unistd.h:271:1:
  863. X_SC_TRACE_INHERIT = 751 // unistd.h:272:1:
  864. X_SC_TRACE_LOG = 752 // unistd.h:273:1:
  865. X_SC_TRACE_NAME_MAX = 753 // unistd.h:274:1:
  866. X_SC_TRACE_SYS_MAX = 754 // unistd.h:275:1:
  867. X_SC_TRACE_USER_EVENT_MAX = 755 // unistd.h:276:1:
  868. X_SC_TTY_NAME_MAX = 575 // unistd.h:226:1:
  869. X_SC_TYPED_MEMORY_OBJECTS = 756 // unistd.h:277:1:
  870. X_SC_TZNAME_MAX = 17 // unistd.h:123:1:
  871. X_SC_T_IOV_MAX = 79 // unistd.h:186:1:
  872. X_SC_UADDR_MAX = 519 // unistd.h:213:1:
  873. X_SC_V6_ILP32_OFF32 = 757 // unistd.h:278:1:
  874. X_SC_V6_ILP32_OFFBIG = 758 // unistd.h:279:1:
  875. X_SC_V6_LP64_OFF64 = 759 // unistd.h:280:1:
  876. X_SC_V6_LPBIG_OFFBIG = 760 // unistd.h:281:1:
  877. X_SC_VERSION = 8 // unistd.h:113:1:
  878. X_SC_XBS5_ILP32_OFF32 = 720 // unistd.h:240:1:
  879. X_SC_XBS5_ILP32_OFFBIG = 721 // unistd.h:241:1:
  880. X_SC_XBS5_LP64_OFF64 = 722 // unistd.h:242:1:
  881. X_SC_XBS5_LPBIG_OFFBIG = 723 // unistd.h:243:1:
  882. X_SC_XOPEN_CRYPT = 62 // unistd.h:170:1:
  883. X_SC_XOPEN_ENH_I18N = 63 // unistd.h:171:1:
  884. X_SC_XOPEN_LEGACY = 717 // unistd.h:237:1:
  885. X_SC_XOPEN_REALTIME = 718 // unistd.h:238:1:
  886. X_SC_XOPEN_REALTIME_THREADS = 719 // unistd.h:239:1:
  887. X_SC_XOPEN_SHM = 64 // unistd.h:172:1:
  888. X_SC_XOPEN_STREAMS = 761 // unistd.h:282:1:
  889. X_SC_XOPEN_UNIX = 78 // unistd.h:181:1:
  890. X_SC_XOPEN_VERSION = 12 // unistd.h:118:1:
  891. X_SC_XOPEN_XCU_VERSION = 67 // unistd.h:176:1:
  892. X_SEMA_MAGIC = 0x534d // types.h:425:1:
  893. X_SHORT_ALIGNMENT = 2 // isa_defs.h:250:1:
  894. X_SIGEVENT = 0 // time.h:132:1:
  895. X_SIGSET_T = 0 // select.h:73:1:
  896. X_SIGVAL = 0 // time.h:124:1:
  897. X_SIZE_T = 0 // types.h:540:1:
  898. X_SOCKLEN_T = 0 // in.h:48:1:
  899. X_SOFT_HOSTID = 0 // isa_defs.h:286:1:
  900. X_SSIZE_T = 0 // types.h:549:1:
  901. X_SS_MAXSIZE = 256 // socket_impl.h:70:1:
  902. X_STACK_GROWS_DOWNWARD = 0 // isa_defs.h:243:1:
  903. X_STDC_C11 = 0 // feature_tests.h:165:1:
  904. X_STDC_C99 = 0 // feature_tests.h:169:1:
  905. X_SUNOS_VTOC_16 = 0 // isa_defs.h:280:1:
  906. X_SUSECONDS_T = 0 // types.h:343:1:
  907. X_SYS_BYTEORDER_H = 0 // byteorder.h:41:1:
  908. X_SYS_CCOMPILE_H = 0 // ccompile.h:32:1:
  909. X_SYS_CRED_H = 0 // cred.h:35:1:
  910. X_SYS_FEATURE_TESTS_H = 0 // feature_tests.h:41:1:
  911. X_SYS_INT_TYPES_H = 0 // int_types.h:30:1:
  912. X_SYS_ISA_DEFS_H = 0 // isa_defs.h:30:1:
  913. X_SYS_MACHTYPES_H = 0 // machtypes.h:27:1:
  914. X_SYS_NETCONFIG_H = 0 // netconfig.h:35:1:
  915. X_SYS_NULL_H = 0 // null.h:17:1:
  916. X_SYS_PARAM_H = 0 // param.h:41:1:
  917. X_SYS_POLL_H = 0 // poll.h:38:1:
  918. X_SYS_SELECT_H = 0 // select.h:45:1:
  919. X_SYS_SOCKET_H = 0 // socket.h:47:1:
  920. X_SYS_SOCKET_IMPL_H = 0 // socket_impl.h:35:1:
  921. X_SYS_TIME_H = 0 // time.h:27:1:
  922. X_SYS_TIME_IMPL_H = 0 // time_impl.h:38:1:
  923. X_SYS_TYPES_H = 0 // types.h:35:1:
  924. X_SYS_UIO_H = 0 // uio.h:45:1:
  925. X_SYS_UNISTD_H = 0 // unistd.h:40:1:
  926. X_SYS_UN_H = 0 // un.h:39:1:
  927. X_TIMER_T = 0 // types.h:573:1:
  928. X_TIME_H = 0 // time.h:37:1:
  929. X_TIME_T = 0 // types.h:558:1:
  930. X_TTY_BUFSIZ = 2048 // param.h:75:1:
  931. X_UID_T = 0 // types.h:400:1:
  932. X_XOPEN_ENH_I18N = 1 // unistd.h:389:1:
  933. X_XOPEN_REALTIME = 1 // unistd.h:388:1:
  934. X_XOPEN_SHM = 1 // unistd.h:390:1:
  935. X_XOPEN_STREAMS = 1 // unistd.h:412:1:
  936. X_XOPEN_UNIX = 0 // unistd.h:382:1:
  937. X_XOPEN_VERSION = 3 // feature_tests.h:392:1:
  938. X_XOPEN_XCU_VERSION = 4 // unistd.h:385:1:
  939. X_XOPEN_XPG3 = 0 // unistd.h:380:1:
  940. X_XOPEN_XPG4 = 0 // unistd.h:381:1:
  941. Sun = 1 // <predefined>:172:1:
  942. Unix = 1 // <predefined>:175:1:
  943. )
  944. // used for block sizes
  945. // The boolean_t type has had a varied amount of exposure over the years in
  946. // terms of how its enumeration constants have been exposed. In particular, it
  947. // originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
  948. // B_TRUE and B_FALSE with an underscore. This check never included the
  949. // question of if we were in a strict ANSI C environment or whether extensions
  950. // were defined.
  951. //
  952. // Compilers such as clang started defaulting to always including an
  953. // XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
  954. // This would lead most software that had used the non-underscore versions to
  955. // need it. As such, we have adjusted the non-strict XOPEN environment to retain
  956. // its old behavior so as to minimize namespace pollution; however, we instead
  957. // include both variants of the definitions in the generally visible version
  958. // allowing software written in either world to hopefully end up in a good
  959. // place.
  960. //
  961. // This isn't perfect, but should hopefully minimize the pain for folks actually
  962. // trying to build software.
  963. const ( /* types.h:215:1: */
  964. B_FALSE = 0
  965. B_TRUE = 1
  966. X_B_FALSE = 0
  967. X_B_TRUE = 1
  968. )
  969. // uio extensions
  970. //
  971. // PSARC 2009/478: Copy Reduction Interfaces
  972. const ( /* uio.h:146:1: */
  973. UIOTYPE_ASYNCIO = 0
  974. UIOTYPE_ZEROCOPY = 1
  975. UIOTYPE_PEEKSIZE = 2
  976. )
  977. // I/O direction.
  978. const ( /* uio.h:220:1: */
  979. UIO_READ = 0
  980. UIO_WRITE = 1
  981. )
  982. // Segment flag values.
  983. const ( /* uio.h:93:1: */
  984. UIO_USERSPACE = 0
  985. UIO_SYSSPACE = 1
  986. UIO_USERISPACE = 2
  987. )
  988. type Ptrdiff_t = int64 /* <builtin>:3:26 */
  989. type Size_t = uint64 /* <builtin>:9:23 */
  990. type Wchar_t = int32 /* <builtin>:15:24 */
  991. type X__int128_t = struct {
  992. Flo int64
  993. Fhi int64
  994. } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  995. type X__uint128_t = struct {
  996. Flo uint64
  997. Fhi uint64
  998. } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  999. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  1000. type X__float128 = float64 /* <builtin>:47:21 */
  1001. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  1002. //
  1003. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  1004. // Use is subject to license terms.
  1005. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  1006. // All Rights Reserved
  1007. // BIND 4.9.3:
  1008. //
  1009. // Copyright (c) 1980, 1983, 1988, 1993
  1010. // The Regents of the University of California. All rights reserved.
  1011. //
  1012. // Redistribution and use in source and binary forms, with or without
  1013. // modification, are permitted provided that the following conditions
  1014. // are met:
  1015. // 1. Redistributions of source code must retain the above copyright
  1016. // notice, this list of conditions and the following disclaimer.
  1017. // 2. Redistributions in binary form must reproduce the above copyright
  1018. // notice, this list of conditions and the following disclaimer in the
  1019. // documentation and/or other materials provided with the distribution.
  1020. // 3. All advertising materials mentioning features or use of this software
  1021. // must display the following acknowledgement:
  1022. // This product includes software developed by the University of
  1023. // California, Berkeley and its contributors.
  1024. // 4. Neither the name of the University nor the names of its contributors
  1025. // may be used to endorse or promote products derived from this software
  1026. // without specific prior written permission.
  1027. //
  1028. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1029. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1030. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1031. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1032. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1033. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1034. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1035. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1036. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1037. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1038. // SUCH DAMAGE.
  1039. // -
  1040. // Portions Copyright (c) 1993 by Digital Equipment Corporation.
  1041. //
  1042. // Permission to use, copy, modify, and distribute this software for any
  1043. // purpose with or without fee is hereby granted, provided that the above
  1044. // copyright notice and this permission notice appear in all copies, and that
  1045. // the name of Digital Equipment Corporation not be used in advertising or
  1046. // publicity pertaining to distribution of the document or software without
  1047. // specific, written prior permission.
  1048. //
  1049. // THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  1050. // WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
  1051. // OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
  1052. // CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  1053. // DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  1054. // PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  1055. // ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  1056. // SOFTWARE.
  1057. // --Copyright--
  1058. //
  1059. // End BIND 4.9.3
  1060. // Structures returned by network data base library.
  1061. // All addresses are supplied in host order, and
  1062. // returned in network order (suitable for use in system calls).
  1063. // CDDL HEADER START
  1064. //
  1065. // The contents of this file are subject to the terms of the
  1066. // Common Development and Distribution License (the "License").
  1067. // You may not use this file except in compliance with the License.
  1068. //
  1069. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1070. // or http://www.opensolaris.org/os/licensing.
  1071. // See the License for the specific language governing permissions
  1072. // and limitations under the License.
  1073. //
  1074. // When distributing Covered Code, include this CDDL HEADER in each
  1075. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1076. // If applicable, add the following below this CDDL HEADER, with the
  1077. // fields enclosed by brackets "[]" replaced with your own identifying
  1078. // information: Portions Copyright [yyyy] [name of copyright owner]
  1079. //
  1080. // CDDL HEADER END
  1081. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  1082. // All Rights Reserved
  1083. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  1084. // Use is subject to license terms.
  1085. //
  1086. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  1087. // Copyright 2016 Joyent, Inc.
  1088. // Copyright 2021 Oxide Computer Company
  1089. // DO NOT EDIT THIS FILE.
  1090. //
  1091. // It has been auto-edited by fixincludes from:
  1092. //
  1093. // "/usr/include/sys/feature_tests.h"
  1094. //
  1095. // This had to be done to correct non-standard usages in the
  1096. // original, manufacturer supplied header file.
  1097. // CDDL HEADER START
  1098. //
  1099. // The contents of this file are subject to the terms of the
  1100. // Common Development and Distribution License (the "License").
  1101. // You may not use this file except in compliance with the License.
  1102. //
  1103. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1104. // or http://www.opensolaris.org/os/licensing.
  1105. // See the License for the specific language governing permissions
  1106. // and limitations under the License.
  1107. //
  1108. // When distributing Covered Code, include this CDDL HEADER in each
  1109. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1110. // If applicable, add the following below this CDDL HEADER, with the
  1111. // fields enclosed by brackets "[]" replaced with your own identifying
  1112. // information: Portions Copyright [yyyy] [name of copyright owner]
  1113. //
  1114. // CDDL HEADER END
  1115. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1116. // Copyright 2016 Joyent, Inc.
  1117. // Copyright 2022 Oxide Computer Company
  1118. //
  1119. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1120. // Use is subject to license terms.
  1121. // CDDL HEADER START
  1122. //
  1123. // The contents of this file are subject to the terms of the
  1124. // Common Development and Distribution License, Version 1.0 only
  1125. // (the "License"). You may not use this file except in compliance
  1126. // with the License.
  1127. //
  1128. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1129. // or http://www.opensolaris.org/os/licensing.
  1130. // See the License for the specific language governing permissions
  1131. // and limitations under the License.
  1132. //
  1133. // When distributing Covered Code, include this CDDL HEADER in each
  1134. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1135. // If applicable, add the following below this CDDL HEADER, with the
  1136. // fields enclosed by brackets "[]" replaced with your own identifying
  1137. // information: Portions Copyright [yyyy] [name of copyright owner]
  1138. //
  1139. // CDDL HEADER END
  1140. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  1141. // Use is subject to license terms.
  1142. // Copyright 2015 EveryCity Ltd. All rights reserved.
  1143. // Copyright 2019 Joyent, Inc.
  1144. // This file contains definitions designed to enable different compilers
  1145. // to be used harmoniously on Solaris systems.
  1146. // Allow for version tests for compiler bugs and features.
  1147. // analogous to lint's PRINTFLIKEn
  1148. // Handle the kernel printf routines that can take '%b' too
  1149. // This one's pretty obvious -- the function never returns
  1150. // The function is 'extern inline' and expects GNU C89 behaviour, not C99
  1151. // behaviour.
  1152. //
  1153. // Should only be used on 'extern inline' definitions for GCC.
  1154. // The function has control flow such that it may return multiple times (in
  1155. // the manner of setjmp or vfork)
  1156. // This is an appropriate label for functions that do not
  1157. // modify their arguments, e.g. strlen()
  1158. // This is a stronger form of __pure__. Can be used for functions
  1159. // that do not modify their arguments and don't depend on global
  1160. // memory.
  1161. // This attribute, attached to a variable, means that the variable is meant to
  1162. // be possibly unused. GCC will not produce a warning for this variable.
  1163. // Shorthand versions for readability
  1164. // In release build, disable warnings about variables
  1165. // which are used only for debugging.
  1166. // CDDL HEADER START
  1167. //
  1168. // The contents of this file are subject to the terms of the
  1169. // Common Development and Distribution License (the "License").
  1170. // You may not use this file except in compliance with the License.
  1171. //
  1172. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1173. // or http://www.opensolaris.org/os/licensing.
  1174. // See the License for the specific language governing permissions
  1175. // and limitations under the License.
  1176. //
  1177. //
  1178. // When distributing Covered Code, include this CDDL HEADER in each
  1179. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1180. // If applicable, add the following below this CDDL HEADER, with the
  1181. // fields enclosed by brackets "[]" replaced with your own identifying
  1182. // information: Portions Copyright [yyyy] [name of copyright owner]
  1183. //
  1184. // CDDL HEADER END
  1185. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  1186. // Use is subject to license terms.
  1187. // Copyright 2016 Joyent, Inc.
  1188. // This header file serves to group a set of well known defines and to
  1189. // set these for each instruction set architecture. These defines may
  1190. // be divided into two groups; characteristics of the processor and
  1191. // implementation choices for Solaris on a processor.
  1192. //
  1193. // Processor Characteristics:
  1194. //
  1195. // _LITTLE_ENDIAN / _BIG_ENDIAN:
  1196. // The natural byte order of the processor. A pointer to an int points
  1197. // to the least/most significant byte of that int.
  1198. //
  1199. // _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
  1200. // The processor specific direction of stack growth. A push onto the
  1201. // stack increases/decreases the stack pointer, so it stores data at
  1202. // successively higher/lower addresses. (Stackless machines ignored
  1203. // without regrets).
  1204. //
  1205. // _LONG_LONG_HTOL / _LONG_LONG_LTOH:
  1206. // A pointer to a long long points to the most/least significant long
  1207. // within that long long.
  1208. //
  1209. // _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
  1210. // The C compiler assigns bit fields from the high/low to the low/high end
  1211. // of an int (most to least significant vs. least to most significant).
  1212. //
  1213. // _IEEE_754:
  1214. // The processor (or supported implementations of the processor)
  1215. // supports the ieee-754 floating point standard. No other floating
  1216. // point standards are supported (or significant). Any other supported
  1217. // floating point formats are expected to be cased on the ISA processor
  1218. // symbol.
  1219. //
  1220. // _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
  1221. // The C Compiler implements objects of type `char' as `unsigned' or
  1222. // `signed' respectively. This is really an implementation choice of
  1223. // the compiler writer, but it is specified in the ABI and tends to
  1224. // be uniform across compilers for an instruction set architecture.
  1225. // Hence, it has the properties of a processor characteristic.
  1226. //
  1227. // _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
  1228. // _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
  1229. // _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
  1230. // The ABI defines alignment requirements of each of the primitive
  1231. // object types. Some, if not all, may be hardware requirements as
  1232. // well. The values are expressed in "byte-alignment" units.
  1233. //
  1234. // _MAX_ALIGNMENT:
  1235. // The most stringent alignment requirement as specified by the ABI.
  1236. // Equal to the maximum of all the above _XXX_ALIGNMENT values.
  1237. //
  1238. // _MAX_ALIGNMENT_TYPE:
  1239. // The name of the C type that has the value descried in _MAX_ALIGNMENT.
  1240. //
  1241. // _ALIGNMENT_REQUIRED:
  1242. // True or false (1 or 0) whether or not the hardware requires the ABI
  1243. // alignment.
  1244. //
  1245. // _LONG_LONG_ALIGNMENT_32
  1246. // The 32-bit ABI supported by a 64-bit kernel may have different
  1247. // alignment requirements for primitive object types. The value of this
  1248. // identifier is expressed in "byte-alignment" units.
  1249. //
  1250. // _HAVE_CPUID_INSN
  1251. // This indicates that the architecture supports the 'cpuid'
  1252. // instruction as defined by Intel. (Intel allows other vendors
  1253. // to extend the instruction for their own purposes.)
  1254. //
  1255. //
  1256. // Implementation Choices:
  1257. //
  1258. // _ILP32 / _LP64:
  1259. // This specifies the compiler data type implementation as specified in
  1260. // the relevant ABI. The choice between these is strongly influenced
  1261. // by the underlying hardware, but is not absolutely tied to it.
  1262. // Currently only two data type models are supported:
  1263. //
  1264. // _ILP32:
  1265. // Int/Long/Pointer are 32 bits. This is the historical UNIX
  1266. // and Solaris implementation. Due to its historical standing,
  1267. // this is the default case.
  1268. //
  1269. // _LP64:
  1270. // Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
  1271. // implementation for 64-bit ABIs such as SPARC V9.
  1272. //
  1273. // _I32LPx:
  1274. // A compilation environment where 'int' is 32-bit, and
  1275. // longs and pointers are simply the same size.
  1276. //
  1277. // In all cases, Char is 8 bits and Short is 16 bits.
  1278. //
  1279. // _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
  1280. // This specifies the form of the disk VTOC (or label):
  1281. //
  1282. // _SUNOS_VTOC_8:
  1283. // This is a VTOC form which is upwardly compatible with the
  1284. // SunOS 4.x disk label and allows 8 partitions per disk.
  1285. //
  1286. // _SUNOS_VTOC_16:
  1287. // In this format the incore vtoc image matches the ondisk
  1288. // version. It allows 16 slices per disk, and is not
  1289. // compatible with the SunOS 4.x disk label.
  1290. //
  1291. // Note that these are not the only two VTOC forms possible and
  1292. // additional forms may be added. One possible form would be the
  1293. // SVr4 VTOC form. The symbol for that is reserved now, although
  1294. // it is not implemented.
  1295. //
  1296. // _SVR4_VTOC_16:
  1297. // This VTOC form is compatible with the System V Release 4
  1298. // VTOC (as implemented on the SVr4 Intel and 3b ports) with
  1299. // 16 partitions per disk.
  1300. //
  1301. //
  1302. // _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
  1303. // This describes the type of addresses used by system DMA:
  1304. //
  1305. // _DMA_USES_PHYSADDR:
  1306. // This type of DMA, used in the x86 implementation,
  1307. // requires physical addresses for DMA buffers. The 24-bit
  1308. // addresses used by some legacy boards is the source of the
  1309. // "low-memory" (<16MB) requirement for some devices using DMA.
  1310. //
  1311. // _DMA_USES_VIRTADDR:
  1312. // This method of DMA allows the use of virtual addresses for
  1313. // DMA transfers.
  1314. //
  1315. // _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
  1316. // This indicates the presence/absence of an fdisk table.
  1317. //
  1318. // _FIRMWARE_NEEDS_FDISK
  1319. // The fdisk table is required by system firmware. If present,
  1320. // it allows a disk to be subdivided into multiple fdisk
  1321. // partitions, each of which is equivalent to a separate,
  1322. // virtual disk. This enables the co-existence of multiple
  1323. // operating systems on a shared hard disk.
  1324. //
  1325. // _NO_FDISK_PRESENT
  1326. // If the fdisk table is absent, it is assumed that the entire
  1327. // media is allocated for a single operating system.
  1328. //
  1329. // _HAVE_TEM_FIRMWARE
  1330. // Defined if this architecture has the (fallback) option of
  1331. // using prom_* calls for doing I/O if a suitable kernel driver
  1332. // is not available to do it.
  1333. //
  1334. // _DONT_USE_1275_GENERIC_NAMES
  1335. // Controls whether or not device tree node names should
  1336. // comply with the IEEE 1275 "Generic Names" Recommended
  1337. // Practice. With _DONT_USE_GENERIC_NAMES, device-specific
  1338. // names identifying the particular device will be used.
  1339. //
  1340. // __i386_COMPAT
  1341. // This indicates whether the i386 ABI is supported as a *non-native*
  1342. // mode for the platform. When this symbol is defined:
  1343. // - 32-bit xstat-style system calls are enabled
  1344. // - 32-bit xmknod-style system calls are enabled
  1345. // - 32-bit system calls use i386 sizes -and- alignments
  1346. //
  1347. // Note that this is NOT defined for the i386 native environment!
  1348. //
  1349. // __x86
  1350. // This is ONLY a synonym for defined(__i386) || defined(__amd64)
  1351. // which is useful only insofar as these two architectures share
  1352. // common attributes. Analogous to __sparc.
  1353. //
  1354. // _PSM_MODULES
  1355. // This indicates whether or not the implementation uses PSM
  1356. // modules for processor support, reading /etc/mach from inside
  1357. // the kernel to extract a list.
  1358. //
  1359. // _RTC_CONFIG
  1360. // This indicates whether or not the implementation uses /etc/rtc_config
  1361. // to configure the real-time clock in the kernel.
  1362. //
  1363. // _UNIX_KRTLD
  1364. // This indicates that the implementation uses a dynamically
  1365. // linked unix + krtld to form the core kernel image at boot
  1366. // time, or (in the absence of this symbol) a prelinked kernel image.
  1367. //
  1368. // _OBP
  1369. // This indicates the firmware interface is OBP.
  1370. //
  1371. // _SOFT_HOSTID
  1372. // This indicates that the implementation obtains the hostid
  1373. // from the file /etc/hostid, rather than from hardware.
  1374. // The following set of definitions characterize Solaris on AMD's
  1375. // 64-bit systems.
  1376. // Define the appropriate "processor characteristics"
  1377. // Different alignment constraints for the i386 ABI in compatibility mode
  1378. // Define the appropriate "implementation choices".
  1379. // The feature test macro __i386 is generic for all processors implementing
  1380. // the Intel 386 instruction set or a superset of it. Specifically, this
  1381. // includes all members of the 386, 486, and Pentium family of processors.
  1382. // Values of _POSIX_C_SOURCE
  1383. //
  1384. // undefined not a POSIX compilation
  1385. // 1 POSIX.1-1990 compilation
  1386. // 2 POSIX.2-1992 compilation
  1387. // 199309L POSIX.1b-1993 compilation (Real Time)
  1388. // 199506L POSIX.1c-1995 compilation (POSIX Threads)
  1389. // 200112L POSIX.1-2001 compilation (Austin Group Revision)
  1390. // 200809L POSIX.1-2008 compilation
  1391. // The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
  1392. // and _STDC_C99 are Sun implementation specific macros created in order to
  1393. // compress common standards specified feature test macros for easier reading.
  1394. // These macros should not be used by the application developer as
  1395. // unexpected results may occur. Instead, the user should reference
  1396. // standards(7) for correct usage of the standards feature test macros.
  1397. //
  1398. // __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
  1399. // X/Open or POSIX or in the negative, when neither
  1400. // X/Open or POSIX defines a symbol.
  1401. //
  1402. // _STRICT_STDC __STDC__ is specified by the C Standards and defined
  1403. // by the compiler. For Sun compilers the value of
  1404. // __STDC__ is either 1, 0, or not defined based on the
  1405. // compilation mode (see cc(1)). When the value of
  1406. // __STDC__ is 1 and in the absence of any other feature
  1407. // test macros, the namespace available to the application
  1408. // is limited to only those symbols defined by the C
  1409. // Standard. _STRICT_STDC provides a more readable means
  1410. // of identifying symbols defined by the standard, or in
  1411. // the negative, symbols that are extensions to the C
  1412. // Standard. See additional comments for GNU C differences.
  1413. //
  1414. // _STDC_C99 __STDC_VERSION__ is specified by the C standards and
  1415. // defined by the compiler and indicates the version of
  1416. // the C standard. A value of 199901L indicates a
  1417. // compiler that complies with ISO/IEC 9899:1999, other-
  1418. // wise known as the C99 standard.
  1419. //
  1420. // _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
  1421. // is 201112L indicating a compiler that compiles with
  1422. // ISO/IEC 9899:2011, otherwise known as the C11 standard.
  1423. //
  1424. // _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
  1425. // by the standards, and the user has not explicitly
  1426. // relaxed the strictness via __EXTENSIONS__.
  1427. // ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
  1428. // 99899:2011 specify the following predefined macro name:
  1429. //
  1430. // __STDC__ The integer constant 1, intended to indicate a conforming
  1431. // implementation.
  1432. //
  1433. // Furthermore, a strictly conforming program shall use only those features
  1434. // of the language and library specified in these standards. A conforming
  1435. // implementation shall accept any strictly conforming program.
  1436. //
  1437. // Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
  1438. // strictly conforming environments and __STDC__ to 0 for environments that
  1439. // use ANSI C semantics but allow extensions to the C standard. For non-ANSI
  1440. // C semantics, Sun's C compiler does not define __STDC__.
  1441. //
  1442. // The GNU C project interpretation is that __STDC__ should always be defined
  1443. // to 1 for compilation modes that accept ANSI C syntax regardless of whether
  1444. // or not extensions to the C standard are used. Violations of conforming
  1445. // behavior are conditionally flagged as warnings via the use of the
  1446. // -pedantic option. In addition to defining __STDC__ to 1, the GNU C
  1447. // compiler also defines __STRICT_ANSI__ as a means of specifying strictly
  1448. // conforming environments using the -ansi or -std=<standard> options.
  1449. //
  1450. // In the absence of any other compiler options, Sun and GNU set the value
  1451. // of __STDC__ as follows when using the following options:
  1452. //
  1453. // Value of __STDC__ __STRICT_ANSI__
  1454. //
  1455. // cc -Xa (default) 0 undefined
  1456. // cc -Xt (transitional) 0 undefined
  1457. // cc -Xc (strictly conforming) 1 undefined
  1458. // cc -Xs (K&R C) undefined undefined
  1459. //
  1460. // gcc (default) 1 undefined
  1461. // gcc -ansi, -std={c89, c99,...) 1 defined
  1462. // gcc -traditional (K&R) undefined undefined
  1463. //
  1464. // The default compilation modes for Sun C compilers versus GNU C compilers
  1465. // results in a differing value for __STDC__ which results in a more
  1466. // restricted namespace when using Sun compilers. To allow both GNU and Sun
  1467. // interpretations to peacefully co-exist, we use the following Sun
  1468. // implementation _STRICT_STDC_ macro:
  1469. // Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
  1470. // Use strict symbol visibility.
  1471. // This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
  1472. // governed by POSIX, but have not been governed by ISO C. One can go two ways
  1473. // on what should happen if an application actively includes (not transitively)
  1474. // a header that isn't part of the ISO C spec, we opt to say that if someone has
  1475. // gone out of there way then they're doing it for a reason and that is an act
  1476. // of non-compliance and therefore it's not up to us to hide away every symbol.
  1477. //
  1478. // In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
  1479. // cases where in the past we have only used a POSIX related check and we don't
  1480. // wish to make something stricter. Often applications are relying on the
  1481. // ability to, or more realistically unwittingly, have _STRICT_STDC declared and
  1482. // still use these interfaces.
  1483. // Large file interfaces:
  1484. //
  1485. // _LARGEFILE_SOURCE
  1486. // 1 large file-related additions to POSIX
  1487. // interfaces requested (fseeko, etc.)
  1488. // _LARGEFILE64_SOURCE
  1489. // 1 transitional large-file-related interfaces
  1490. // requested (seek64, stat64, etc.)
  1491. //
  1492. // The corresponding announcement macros are respectively:
  1493. // _LFS_LARGEFILE
  1494. // _LFS64_LARGEFILE
  1495. // (These are set in <unistd.h>.)
  1496. //
  1497. // Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
  1498. // well.
  1499. //
  1500. // The large file interfaces are made visible regardless of the initial values
  1501. // of the feature test macros under certain circumstances:
  1502. // - If no explicit standards-conforming environment is requested (neither
  1503. // of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
  1504. // __STDC__ does not imply standards conformance).
  1505. // - Extended system interfaces are explicitly requested (__EXTENSIONS__
  1506. // is defined).
  1507. // - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
  1508. // defined). (Note that this dependency is an artifact of the current
  1509. // kernel implementation and may change in future releases.)
  1510. // Large file compilation environment control:
  1511. //
  1512. // The setting of _FILE_OFFSET_BITS controls the size of various file-related
  1513. // types and governs the mapping between file-related source function symbol
  1514. // names and the corresponding binary entry points.
  1515. //
  1516. // In the 32-bit environment, the default value is 32; if not set, set it to
  1517. // the default here, to simplify tests in other headers.
  1518. //
  1519. // In the 64-bit compilation environment, the only value allowed is 64.
  1520. // Use of _XOPEN_SOURCE
  1521. //
  1522. // The following X/Open specifications are supported:
  1523. //
  1524. // X/Open Portability Guide, Issue 3 (XPG3)
  1525. // X/Open CAE Specification, Issue 4 (XPG4)
  1526. // X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
  1527. // X/Open CAE Specification, Issue 5 (XPG5)
  1528. // Open Group Technical Standard, Issue 6 (XPG6), also referred to as
  1529. // IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
  1530. // Open Group Technical Standard, Issue 7 (XPG7), also referred to as
  1531. // IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
  1532. //
  1533. // XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
  1534. // XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
  1535. // Version 2 (SUSv2)
  1536. // XPG6 is the result of a merge of the X/Open and POSIX specifications
  1537. // and as such is also referred to as IEEE Std. 1003.1-2001 in
  1538. // addition to UNIX 03 and SUSv3.
  1539. // XPG7 is also referred to as UNIX 08 and SUSv4.
  1540. //
  1541. // When writing a conforming X/Open application, as per the specification
  1542. // requirements, the appropriate feature test macros must be defined at
  1543. // compile time. These are as follows. For more info, see standards(7).
  1544. //
  1545. // Feature Test Macro Specification
  1546. // ------------------------------------------------ -------------
  1547. // _XOPEN_SOURCE XPG3
  1548. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  1549. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  1550. // _XOPEN_SOURCE = 500 XPG5
  1551. // _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
  1552. // _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
  1553. //
  1554. // In order to simplify the guards within the headers, the following
  1555. // implementation private test macros have been created. Applications
  1556. // must NOT use these private test macros as unexpected results will
  1557. // occur.
  1558. //
  1559. // Note that in general, the use of these private macros is cumulative.
  1560. // For example, the use of _XPG3 with no other restrictions on the X/Open
  1561. // namespace will make the symbols visible for XPG3 through XPG6
  1562. // compilation environments. The use of _XPG4_2 with no other X/Open
  1563. // namespace restrictions indicates that the symbols were introduced in
  1564. // XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
  1565. // environments, but not for XPG3 or XPG4 compilation environments.
  1566. //
  1567. // _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
  1568. // _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
  1569. // _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
  1570. // _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
  1571. // _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
  1572. // _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
  1573. // X/Open Portability Guide, Issue 3
  1574. // _XOPEN_VERSION is defined by the X/Open specifications and is not
  1575. // normally defined by the application, except in the case of an XPG4
  1576. // application. On the implementation side, _XOPEN_VERSION defined with
  1577. // the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
  1578. // with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
  1579. // _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
  1580. // application and with a value of 600 indicates an XPG6 (UNIX 03)
  1581. // application and with a value of 700 indicates an XPG7 (UNIX 08).
  1582. // The appropriate version is determined by the use of the
  1583. // feature test macros described earlier. The value of _XOPEN_VERSION
  1584. // defaults to 3 otherwise indicating support for XPG3 applications.
  1585. // ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
  1586. // conforming environments. ISO 9899:1999 says it does.
  1587. //
  1588. // The presence of _LONGLONG_TYPE says "long long exists" which is therefore
  1589. // defined in all but strictly conforming environments that disallow it.
  1590. // The following macro defines a value for the ISO C99 restrict
  1591. // keyword so that _RESTRICT_KYWD resolves to "restrict" if
  1592. // an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
  1593. // if any other compiler is used. This allows for the use of single
  1594. // prototype declarations regardless of compiler version.
  1595. // The following macro defines a value for the ISO C11 _Noreturn
  1596. // keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
  1597. // an ISO C11 compiler is used and "" (null string) if any other
  1598. // compiler is used. This allows for the use of single prototype
  1599. // declarations regardless of compiler version.
  1600. // ISO/IEC 9899:2011 Annex K
  1601. // The following macro indicates header support for the ANSI C++
  1602. // standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
  1603. // The following macro indicates header support for the C99 standard,
  1604. // ISO/IEC 9899:1999, Programming Languages - C.
  1605. // The following macro indicates header support for the C11 standard,
  1606. // ISO/IEC 9899:2011, Programming Languages - C.
  1607. // The following macro indicates header support for the C11 standard,
  1608. // ISO/IEC 9899:2011 Annex K, Programming Languages - C.
  1609. // The following macro indicates header support for DTrace. The value is an
  1610. // integer that corresponds to the major version number for DTrace.
  1611. // CDDL HEADER START
  1612. //
  1613. // The contents of this file are subject to the terms of the
  1614. // Common Development and Distribution License (the "License").
  1615. // You may not use this file except in compliance with the License.
  1616. //
  1617. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1618. // or http://www.opensolaris.org/os/licensing.
  1619. // See the License for the specific language governing permissions
  1620. // and limitations under the License.
  1621. //
  1622. //
  1623. // When distributing Covered Code, include this CDDL HEADER in each
  1624. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1625. // If applicable, add the following below this CDDL HEADER, with the
  1626. // fields enclosed by brackets "[]" replaced with your own identifying
  1627. // information: Portions Copyright [yyyy] [name of copyright owner]
  1628. //
  1629. // CDDL HEADER END
  1630. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  1631. // Use is subject to license terms.
  1632. // Copyright 2016 Joyent, Inc.
  1633. // Machine dependent definitions moved to <sys/machtypes.h>.
  1634. // CDDL HEADER START
  1635. //
  1636. // The contents of this file are subject to the terms of the
  1637. // Common Development and Distribution License (the "License").
  1638. // You may not use this file except in compliance with the License.
  1639. //
  1640. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1641. // or http://www.opensolaris.org/os/licensing.
  1642. // See the License for the specific language governing permissions
  1643. // and limitations under the License.
  1644. //
  1645. // When distributing Covered Code, include this CDDL HEADER in each
  1646. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1647. // If applicable, add the following below this CDDL HEADER, with the
  1648. // fields enclosed by brackets "[]" replaced with your own identifying
  1649. // information: Portions Copyright [yyyy] [name of copyright owner]
  1650. //
  1651. // CDDL HEADER END
  1652. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  1653. // Use is subject to license terms.
  1654. // Machine dependent types:
  1655. //
  1656. // intel ia32 Version
  1657. type X_label_t = struct{ Fval [8]int64 } /* machtypes.h:59:9 */
  1658. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  1659. //
  1660. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  1661. // Use is subject to license terms.
  1662. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  1663. // All Rights Reserved
  1664. // BIND 4.9.3:
  1665. //
  1666. // Copyright (c) 1980, 1983, 1988, 1993
  1667. // The Regents of the University of California. All rights reserved.
  1668. //
  1669. // Redistribution and use in source and binary forms, with or without
  1670. // modification, are permitted provided that the following conditions
  1671. // are met:
  1672. // 1. Redistributions of source code must retain the above copyright
  1673. // notice, this list of conditions and the following disclaimer.
  1674. // 2. Redistributions in binary form must reproduce the above copyright
  1675. // notice, this list of conditions and the following disclaimer in the
  1676. // documentation and/or other materials provided with the distribution.
  1677. // 3. All advertising materials mentioning features or use of this software
  1678. // must display the following acknowledgement:
  1679. // This product includes software developed by the University of
  1680. // California, Berkeley and its contributors.
  1681. // 4. Neither the name of the University nor the names of its contributors
  1682. // may be used to endorse or promote products derived from this software
  1683. // without specific prior written permission.
  1684. //
  1685. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1686. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1687. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1688. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1689. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1690. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1691. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1692. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1693. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1694. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1695. // SUCH DAMAGE.
  1696. // -
  1697. // Portions Copyright (c) 1993 by Digital Equipment Corporation.
  1698. //
  1699. // Permission to use, copy, modify, and distribute this software for any
  1700. // purpose with or without fee is hereby granted, provided that the above
  1701. // copyright notice and this permission notice appear in all copies, and that
  1702. // the name of Digital Equipment Corporation not be used in advertising or
  1703. // publicity pertaining to distribution of the document or software without
  1704. // specific, written prior permission.
  1705. //
  1706. // THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  1707. // WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
  1708. // OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
  1709. // CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  1710. // DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  1711. // PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  1712. // ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  1713. // SOFTWARE.
  1714. // --Copyright--
  1715. //
  1716. // End BIND 4.9.3
  1717. // Structures returned by network data base library.
  1718. // All addresses are supplied in host order, and
  1719. // returned in network order (suitable for use in system calls).
  1720. // CDDL HEADER START
  1721. //
  1722. // The contents of this file are subject to the terms of the
  1723. // Common Development and Distribution License (the "License").
  1724. // You may not use this file except in compliance with the License.
  1725. //
  1726. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1727. // or http://www.opensolaris.org/os/licensing.
  1728. // See the License for the specific language governing permissions
  1729. // and limitations under the License.
  1730. //
  1731. // When distributing Covered Code, include this CDDL HEADER in each
  1732. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1733. // If applicable, add the following below this CDDL HEADER, with the
  1734. // fields enclosed by brackets "[]" replaced with your own identifying
  1735. // information: Portions Copyright [yyyy] [name of copyright owner]
  1736. //
  1737. // CDDL HEADER END
  1738. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  1739. // All Rights Reserved
  1740. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  1741. // Use is subject to license terms.
  1742. //
  1743. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  1744. // Copyright 2016 Joyent, Inc.
  1745. // Copyright 2021 Oxide Computer Company
  1746. // DO NOT EDIT THIS FILE.
  1747. //
  1748. // It has been auto-edited by fixincludes from:
  1749. //
  1750. // "/usr/include/sys/feature_tests.h"
  1751. //
  1752. // This had to be done to correct non-standard usages in the
  1753. // original, manufacturer supplied header file.
  1754. // CDDL HEADER START
  1755. //
  1756. // The contents of this file are subject to the terms of the
  1757. // Common Development and Distribution License (the "License").
  1758. // You may not use this file except in compliance with the License.
  1759. //
  1760. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1761. // or http://www.opensolaris.org/os/licensing.
  1762. // See the License for the specific language governing permissions
  1763. // and limitations under the License.
  1764. //
  1765. // When distributing Covered Code, include this CDDL HEADER in each
  1766. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1767. // If applicable, add the following below this CDDL HEADER, with the
  1768. // fields enclosed by brackets "[]" replaced with your own identifying
  1769. // information: Portions Copyright [yyyy] [name of copyright owner]
  1770. //
  1771. // CDDL HEADER END
  1772. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  1773. // Copyright 2016 Joyent, Inc.
  1774. // Copyright 2022 Oxide Computer Company
  1775. //
  1776. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  1777. // Use is subject to license terms.
  1778. // CDDL HEADER START
  1779. //
  1780. // The contents of this file are subject to the terms of the
  1781. // Common Development and Distribution License, Version 1.0 only
  1782. // (the "License"). You may not use this file except in compliance
  1783. // with the License.
  1784. //
  1785. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1786. // or http://www.opensolaris.org/os/licensing.
  1787. // See the License for the specific language governing permissions
  1788. // and limitations under the License.
  1789. //
  1790. // When distributing Covered Code, include this CDDL HEADER in each
  1791. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1792. // If applicable, add the following below this CDDL HEADER, with the
  1793. // fields enclosed by brackets "[]" replaced with your own identifying
  1794. // information: Portions Copyright [yyyy] [name of copyright owner]
  1795. //
  1796. // CDDL HEADER END
  1797. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  1798. // Use is subject to license terms.
  1799. // Copyright 2015 EveryCity Ltd. All rights reserved.
  1800. // Copyright 2019 Joyent, Inc.
  1801. // This file contains definitions designed to enable different compilers
  1802. // to be used harmoniously on Solaris systems.
  1803. // Allow for version tests for compiler bugs and features.
  1804. // analogous to lint's PRINTFLIKEn
  1805. // Handle the kernel printf routines that can take '%b' too
  1806. // This one's pretty obvious -- the function never returns
  1807. // The function is 'extern inline' and expects GNU C89 behaviour, not C99
  1808. // behaviour.
  1809. //
  1810. // Should only be used on 'extern inline' definitions for GCC.
  1811. // The function has control flow such that it may return multiple times (in
  1812. // the manner of setjmp or vfork)
  1813. // This is an appropriate label for functions that do not
  1814. // modify their arguments, e.g. strlen()
  1815. // This is a stronger form of __pure__. Can be used for functions
  1816. // that do not modify their arguments and don't depend on global
  1817. // memory.
  1818. // This attribute, attached to a variable, means that the variable is meant to
  1819. // be possibly unused. GCC will not produce a warning for this variable.
  1820. // Shorthand versions for readability
  1821. // In release build, disable warnings about variables
  1822. // which are used only for debugging.
  1823. // CDDL HEADER START
  1824. //
  1825. // The contents of this file are subject to the terms of the
  1826. // Common Development and Distribution License (the "License").
  1827. // You may not use this file except in compliance with the License.
  1828. //
  1829. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  1830. // or http://www.opensolaris.org/os/licensing.
  1831. // See the License for the specific language governing permissions
  1832. // and limitations under the License.
  1833. //
  1834. //
  1835. // When distributing Covered Code, include this CDDL HEADER in each
  1836. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  1837. // If applicable, add the following below this CDDL HEADER, with the
  1838. // fields enclosed by brackets "[]" replaced with your own identifying
  1839. // information: Portions Copyright [yyyy] [name of copyright owner]
  1840. //
  1841. // CDDL HEADER END
  1842. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  1843. // Use is subject to license terms.
  1844. // Copyright 2016 Joyent, Inc.
  1845. // This header file serves to group a set of well known defines and to
  1846. // set these for each instruction set architecture. These defines may
  1847. // be divided into two groups; characteristics of the processor and
  1848. // implementation choices for Solaris on a processor.
  1849. //
  1850. // Processor Characteristics:
  1851. //
  1852. // _LITTLE_ENDIAN / _BIG_ENDIAN:
  1853. // The natural byte order of the processor. A pointer to an int points
  1854. // to the least/most significant byte of that int.
  1855. //
  1856. // _STACK_GROWS_UPWARD / _STACK_GROWS_DOWNWARD:
  1857. // The processor specific direction of stack growth. A push onto the
  1858. // stack increases/decreases the stack pointer, so it stores data at
  1859. // successively higher/lower addresses. (Stackless machines ignored
  1860. // without regrets).
  1861. //
  1862. // _LONG_LONG_HTOL / _LONG_LONG_LTOH:
  1863. // A pointer to a long long points to the most/least significant long
  1864. // within that long long.
  1865. //
  1866. // _BIT_FIELDS_HTOL / _BIT_FIELDS_LTOH:
  1867. // The C compiler assigns bit fields from the high/low to the low/high end
  1868. // of an int (most to least significant vs. least to most significant).
  1869. //
  1870. // _IEEE_754:
  1871. // The processor (or supported implementations of the processor)
  1872. // supports the ieee-754 floating point standard. No other floating
  1873. // point standards are supported (or significant). Any other supported
  1874. // floating point formats are expected to be cased on the ISA processor
  1875. // symbol.
  1876. //
  1877. // _CHAR_IS_UNSIGNED / _CHAR_IS_SIGNED:
  1878. // The C Compiler implements objects of type `char' as `unsigned' or
  1879. // `signed' respectively. This is really an implementation choice of
  1880. // the compiler writer, but it is specified in the ABI and tends to
  1881. // be uniform across compilers for an instruction set architecture.
  1882. // Hence, it has the properties of a processor characteristic.
  1883. //
  1884. // _CHAR_ALIGNMENT / _SHORT_ALIGNMENT / _INT_ALIGNMENT / _LONG_ALIGNMENT /
  1885. // _LONG_LONG_ALIGNMENT / _DOUBLE_ALIGNMENT / _LONG_DOUBLE_ALIGNMENT /
  1886. // _POINTER_ALIGNMENT / _FLOAT_ALIGNMENT:
  1887. // The ABI defines alignment requirements of each of the primitive
  1888. // object types. Some, if not all, may be hardware requirements as
  1889. // well. The values are expressed in "byte-alignment" units.
  1890. //
  1891. // _MAX_ALIGNMENT:
  1892. // The most stringent alignment requirement as specified by the ABI.
  1893. // Equal to the maximum of all the above _XXX_ALIGNMENT values.
  1894. //
  1895. // _MAX_ALIGNMENT_TYPE:
  1896. // The name of the C type that has the value descried in _MAX_ALIGNMENT.
  1897. //
  1898. // _ALIGNMENT_REQUIRED:
  1899. // True or false (1 or 0) whether or not the hardware requires the ABI
  1900. // alignment.
  1901. //
  1902. // _LONG_LONG_ALIGNMENT_32
  1903. // The 32-bit ABI supported by a 64-bit kernel may have different
  1904. // alignment requirements for primitive object types. The value of this
  1905. // identifier is expressed in "byte-alignment" units.
  1906. //
  1907. // _HAVE_CPUID_INSN
  1908. // This indicates that the architecture supports the 'cpuid'
  1909. // instruction as defined by Intel. (Intel allows other vendors
  1910. // to extend the instruction for their own purposes.)
  1911. //
  1912. //
  1913. // Implementation Choices:
  1914. //
  1915. // _ILP32 / _LP64:
  1916. // This specifies the compiler data type implementation as specified in
  1917. // the relevant ABI. The choice between these is strongly influenced
  1918. // by the underlying hardware, but is not absolutely tied to it.
  1919. // Currently only two data type models are supported:
  1920. //
  1921. // _ILP32:
  1922. // Int/Long/Pointer are 32 bits. This is the historical UNIX
  1923. // and Solaris implementation. Due to its historical standing,
  1924. // this is the default case.
  1925. //
  1926. // _LP64:
  1927. // Long/Pointer are 64 bits, Int is 32 bits. This is the chosen
  1928. // implementation for 64-bit ABIs such as SPARC V9.
  1929. //
  1930. // _I32LPx:
  1931. // A compilation environment where 'int' is 32-bit, and
  1932. // longs and pointers are simply the same size.
  1933. //
  1934. // In all cases, Char is 8 bits and Short is 16 bits.
  1935. //
  1936. // _SUNOS_VTOC_8 / _SUNOS_VTOC_16 / _SVR4_VTOC_16:
  1937. // This specifies the form of the disk VTOC (or label):
  1938. //
  1939. // _SUNOS_VTOC_8:
  1940. // This is a VTOC form which is upwardly compatible with the
  1941. // SunOS 4.x disk label and allows 8 partitions per disk.
  1942. //
  1943. // _SUNOS_VTOC_16:
  1944. // In this format the incore vtoc image matches the ondisk
  1945. // version. It allows 16 slices per disk, and is not
  1946. // compatible with the SunOS 4.x disk label.
  1947. //
  1948. // Note that these are not the only two VTOC forms possible and
  1949. // additional forms may be added. One possible form would be the
  1950. // SVr4 VTOC form. The symbol for that is reserved now, although
  1951. // it is not implemented.
  1952. //
  1953. // _SVR4_VTOC_16:
  1954. // This VTOC form is compatible with the System V Release 4
  1955. // VTOC (as implemented on the SVr4 Intel and 3b ports) with
  1956. // 16 partitions per disk.
  1957. //
  1958. //
  1959. // _DMA_USES_PHYSADDR / _DMA_USES_VIRTADDR
  1960. // This describes the type of addresses used by system DMA:
  1961. //
  1962. // _DMA_USES_PHYSADDR:
  1963. // This type of DMA, used in the x86 implementation,
  1964. // requires physical addresses for DMA buffers. The 24-bit
  1965. // addresses used by some legacy boards is the source of the
  1966. // "low-memory" (<16MB) requirement for some devices using DMA.
  1967. //
  1968. // _DMA_USES_VIRTADDR:
  1969. // This method of DMA allows the use of virtual addresses for
  1970. // DMA transfers.
  1971. //
  1972. // _FIRMWARE_NEEDS_FDISK / _NO_FDISK_PRESENT
  1973. // This indicates the presence/absence of an fdisk table.
  1974. //
  1975. // _FIRMWARE_NEEDS_FDISK
  1976. // The fdisk table is required by system firmware. If present,
  1977. // it allows a disk to be subdivided into multiple fdisk
  1978. // partitions, each of which is equivalent to a separate,
  1979. // virtual disk. This enables the co-existence of multiple
  1980. // operating systems on a shared hard disk.
  1981. //
  1982. // _NO_FDISK_PRESENT
  1983. // If the fdisk table is absent, it is assumed that the entire
  1984. // media is allocated for a single operating system.
  1985. //
  1986. // _HAVE_TEM_FIRMWARE
  1987. // Defined if this architecture has the (fallback) option of
  1988. // using prom_* calls for doing I/O if a suitable kernel driver
  1989. // is not available to do it.
  1990. //
  1991. // _DONT_USE_1275_GENERIC_NAMES
  1992. // Controls whether or not device tree node names should
  1993. // comply with the IEEE 1275 "Generic Names" Recommended
  1994. // Practice. With _DONT_USE_GENERIC_NAMES, device-specific
  1995. // names identifying the particular device will be used.
  1996. //
  1997. // __i386_COMPAT
  1998. // This indicates whether the i386 ABI is supported as a *non-native*
  1999. // mode for the platform. When this symbol is defined:
  2000. // - 32-bit xstat-style system calls are enabled
  2001. // - 32-bit xmknod-style system calls are enabled
  2002. // - 32-bit system calls use i386 sizes -and- alignments
  2003. //
  2004. // Note that this is NOT defined for the i386 native environment!
  2005. //
  2006. // __x86
  2007. // This is ONLY a synonym for defined(__i386) || defined(__amd64)
  2008. // which is useful only insofar as these two architectures share
  2009. // common attributes. Analogous to __sparc.
  2010. //
  2011. // _PSM_MODULES
  2012. // This indicates whether or not the implementation uses PSM
  2013. // modules for processor support, reading /etc/mach from inside
  2014. // the kernel to extract a list.
  2015. //
  2016. // _RTC_CONFIG
  2017. // This indicates whether or not the implementation uses /etc/rtc_config
  2018. // to configure the real-time clock in the kernel.
  2019. //
  2020. // _UNIX_KRTLD
  2021. // This indicates that the implementation uses a dynamically
  2022. // linked unix + krtld to form the core kernel image at boot
  2023. // time, or (in the absence of this symbol) a prelinked kernel image.
  2024. //
  2025. // _OBP
  2026. // This indicates the firmware interface is OBP.
  2027. //
  2028. // _SOFT_HOSTID
  2029. // This indicates that the implementation obtains the hostid
  2030. // from the file /etc/hostid, rather than from hardware.
  2031. // The following set of definitions characterize Solaris on AMD's
  2032. // 64-bit systems.
  2033. // Define the appropriate "processor characteristics"
  2034. // Different alignment constraints for the i386 ABI in compatibility mode
  2035. // Define the appropriate "implementation choices".
  2036. // The feature test macro __i386 is generic for all processors implementing
  2037. // the Intel 386 instruction set or a superset of it. Specifically, this
  2038. // includes all members of the 386, 486, and Pentium family of processors.
  2039. // Values of _POSIX_C_SOURCE
  2040. //
  2041. // undefined not a POSIX compilation
  2042. // 1 POSIX.1-1990 compilation
  2043. // 2 POSIX.2-1992 compilation
  2044. // 199309L POSIX.1b-1993 compilation (Real Time)
  2045. // 199506L POSIX.1c-1995 compilation (POSIX Threads)
  2046. // 200112L POSIX.1-2001 compilation (Austin Group Revision)
  2047. // 200809L POSIX.1-2008 compilation
  2048. // The feature test macros __XOPEN_OR_POSIX, _STRICT_STDC, _STRICT_SYMBOLS,
  2049. // and _STDC_C99 are Sun implementation specific macros created in order to
  2050. // compress common standards specified feature test macros for easier reading.
  2051. // These macros should not be used by the application developer as
  2052. // unexpected results may occur. Instead, the user should reference
  2053. // standards(7) for correct usage of the standards feature test macros.
  2054. //
  2055. // __XOPEN_OR_POSIX Used in cases where a symbol is defined by both
  2056. // X/Open or POSIX or in the negative, when neither
  2057. // X/Open or POSIX defines a symbol.
  2058. //
  2059. // _STRICT_STDC __STDC__ is specified by the C Standards and defined
  2060. // by the compiler. For Sun compilers the value of
  2061. // __STDC__ is either 1, 0, or not defined based on the
  2062. // compilation mode (see cc(1)). When the value of
  2063. // __STDC__ is 1 and in the absence of any other feature
  2064. // test macros, the namespace available to the application
  2065. // is limited to only those symbols defined by the C
  2066. // Standard. _STRICT_STDC provides a more readable means
  2067. // of identifying symbols defined by the standard, or in
  2068. // the negative, symbols that are extensions to the C
  2069. // Standard. See additional comments for GNU C differences.
  2070. //
  2071. // _STDC_C99 __STDC_VERSION__ is specified by the C standards and
  2072. // defined by the compiler and indicates the version of
  2073. // the C standard. A value of 199901L indicates a
  2074. // compiler that complies with ISO/IEC 9899:1999, other-
  2075. // wise known as the C99 standard.
  2076. //
  2077. // _STDC_C11 Like _STDC_C99 except that the value of __STDC_VERSION__
  2078. // is 201112L indicating a compiler that compiles with
  2079. // ISO/IEC 9899:2011, otherwise known as the C11 standard.
  2080. //
  2081. // _STRICT_SYMBOLS Used in cases where symbol visibility is restricted
  2082. // by the standards, and the user has not explicitly
  2083. // relaxed the strictness via __EXTENSIONS__.
  2084. // ISO/IEC 9899:1990 and it's revisions, ISO/IEC 9899:1999 and ISO/IEC
  2085. // 99899:2011 specify the following predefined macro name:
  2086. //
  2087. // __STDC__ The integer constant 1, intended to indicate a conforming
  2088. // implementation.
  2089. //
  2090. // Furthermore, a strictly conforming program shall use only those features
  2091. // of the language and library specified in these standards. A conforming
  2092. // implementation shall accept any strictly conforming program.
  2093. //
  2094. // Based on these requirements, Sun's C compiler defines __STDC__ to 1 for
  2095. // strictly conforming environments and __STDC__ to 0 for environments that
  2096. // use ANSI C semantics but allow extensions to the C standard. For non-ANSI
  2097. // C semantics, Sun's C compiler does not define __STDC__.
  2098. //
  2099. // The GNU C project interpretation is that __STDC__ should always be defined
  2100. // to 1 for compilation modes that accept ANSI C syntax regardless of whether
  2101. // or not extensions to the C standard are used. Violations of conforming
  2102. // behavior are conditionally flagged as warnings via the use of the
  2103. // -pedantic option. In addition to defining __STDC__ to 1, the GNU C
  2104. // compiler also defines __STRICT_ANSI__ as a means of specifying strictly
  2105. // conforming environments using the -ansi or -std=<standard> options.
  2106. //
  2107. // In the absence of any other compiler options, Sun and GNU set the value
  2108. // of __STDC__ as follows when using the following options:
  2109. //
  2110. // Value of __STDC__ __STRICT_ANSI__
  2111. //
  2112. // cc -Xa (default) 0 undefined
  2113. // cc -Xt (transitional) 0 undefined
  2114. // cc -Xc (strictly conforming) 1 undefined
  2115. // cc -Xs (K&R C) undefined undefined
  2116. //
  2117. // gcc (default) 1 undefined
  2118. // gcc -ansi, -std={c89, c99,...) 1 defined
  2119. // gcc -traditional (K&R) undefined undefined
  2120. //
  2121. // The default compilation modes for Sun C compilers versus GNU C compilers
  2122. // results in a differing value for __STDC__ which results in a more
  2123. // restricted namespace when using Sun compilers. To allow both GNU and Sun
  2124. // interpretations to peacefully co-exist, we use the following Sun
  2125. // implementation _STRICT_STDC_ macro:
  2126. // Compiler complies with ISO/IEC 9899:1999 or ISO/IEC 9989:2011
  2127. // Use strict symbol visibility.
  2128. // This is a variant of _STRICT_SYMBOLS that is meant to cover headers that are
  2129. // governed by POSIX, but have not been governed by ISO C. One can go two ways
  2130. // on what should happen if an application actively includes (not transitively)
  2131. // a header that isn't part of the ISO C spec, we opt to say that if someone has
  2132. // gone out of there way then they're doing it for a reason and that is an act
  2133. // of non-compliance and therefore it's not up to us to hide away every symbol.
  2134. //
  2135. // In general, prefer using _STRICT_SYMBOLS, but this is here in particular for
  2136. // cases where in the past we have only used a POSIX related check and we don't
  2137. // wish to make something stricter. Often applications are relying on the
  2138. // ability to, or more realistically unwittingly, have _STRICT_STDC declared and
  2139. // still use these interfaces.
  2140. // Large file interfaces:
  2141. //
  2142. // _LARGEFILE_SOURCE
  2143. // 1 large file-related additions to POSIX
  2144. // interfaces requested (fseeko, etc.)
  2145. // _LARGEFILE64_SOURCE
  2146. // 1 transitional large-file-related interfaces
  2147. // requested (seek64, stat64, etc.)
  2148. //
  2149. // The corresponding announcement macros are respectively:
  2150. // _LFS_LARGEFILE
  2151. // _LFS64_LARGEFILE
  2152. // (These are set in <unistd.h>.)
  2153. //
  2154. // Requesting _LARGEFILE64_SOURCE implies requesting _LARGEFILE_SOURCE as
  2155. // well.
  2156. //
  2157. // The large file interfaces are made visible regardless of the initial values
  2158. // of the feature test macros under certain circumstances:
  2159. // - If no explicit standards-conforming environment is requested (neither
  2160. // of _POSIX_SOURCE nor _XOPEN_SOURCE is defined and the value of
  2161. // __STDC__ does not imply standards conformance).
  2162. // - Extended system interfaces are explicitly requested (__EXTENSIONS__
  2163. // is defined).
  2164. // - Access to in-kernel interfaces is requested (_KERNEL or _KMEMUSER is
  2165. // defined). (Note that this dependency is an artifact of the current
  2166. // kernel implementation and may change in future releases.)
  2167. // Large file compilation environment control:
  2168. //
  2169. // The setting of _FILE_OFFSET_BITS controls the size of various file-related
  2170. // types and governs the mapping between file-related source function symbol
  2171. // names and the corresponding binary entry points.
  2172. //
  2173. // In the 32-bit environment, the default value is 32; if not set, set it to
  2174. // the default here, to simplify tests in other headers.
  2175. //
  2176. // In the 64-bit compilation environment, the only value allowed is 64.
  2177. // Use of _XOPEN_SOURCE
  2178. //
  2179. // The following X/Open specifications are supported:
  2180. //
  2181. // X/Open Portability Guide, Issue 3 (XPG3)
  2182. // X/Open CAE Specification, Issue 4 (XPG4)
  2183. // X/Open CAE Specification, Issue 4, Version 2 (XPG4v2)
  2184. // X/Open CAE Specification, Issue 5 (XPG5)
  2185. // Open Group Technical Standard, Issue 6 (XPG6), also referred to as
  2186. // IEEE Std. 1003.1-2001 and ISO/IEC 9945:2002.
  2187. // Open Group Technical Standard, Issue 7 (XPG7), also referred to as
  2188. // IEEE Std. 1003.1-2008 and ISO/IEC 9945:2009.
  2189. //
  2190. // XPG4v2 is also referred to as UNIX 95 (SUS or SUSv1).
  2191. // XPG5 is also referred to as UNIX 98 or the Single Unix Specification,
  2192. // Version 2 (SUSv2)
  2193. // XPG6 is the result of a merge of the X/Open and POSIX specifications
  2194. // and as such is also referred to as IEEE Std. 1003.1-2001 in
  2195. // addition to UNIX 03 and SUSv3.
  2196. // XPG7 is also referred to as UNIX 08 and SUSv4.
  2197. //
  2198. // When writing a conforming X/Open application, as per the specification
  2199. // requirements, the appropriate feature test macros must be defined at
  2200. // compile time. These are as follows. For more info, see standards(7).
  2201. //
  2202. // Feature Test Macro Specification
  2203. // ------------------------------------------------ -------------
  2204. // _XOPEN_SOURCE XPG3
  2205. // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
  2206. // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
  2207. // _XOPEN_SOURCE = 500 XPG5
  2208. // _XOPEN_SOURCE = 600 (or POSIX_C_SOURCE=200112L) XPG6
  2209. // _XOPEN_SOURCE = 700 (or POSIX_C_SOURCE=200809L) XPG7
  2210. //
  2211. // In order to simplify the guards within the headers, the following
  2212. // implementation private test macros have been created. Applications
  2213. // must NOT use these private test macros as unexpected results will
  2214. // occur.
  2215. //
  2216. // Note that in general, the use of these private macros is cumulative.
  2217. // For example, the use of _XPG3 with no other restrictions on the X/Open
  2218. // namespace will make the symbols visible for XPG3 through XPG6
  2219. // compilation environments. The use of _XPG4_2 with no other X/Open
  2220. // namespace restrictions indicates that the symbols were introduced in
  2221. // XPG4v2 and are therefore visible for XPG4v2 through XPG6 compilation
  2222. // environments, but not for XPG3 or XPG4 compilation environments.
  2223. //
  2224. // _XPG3 X/Open Portability Guide, Issue 3 (XPG3)
  2225. // _XPG4 X/Open CAE Specification, Issue 4 (XPG4)
  2226. // _XPG4_2 X/Open CAE Specification, Issue 4, Version 2 (XPG4v2/UNIX 95/SUS)
  2227. // _XPG5 X/Open CAE Specification, Issue 5 (XPG5/UNIX 98/SUSv2)
  2228. // _XPG6 Open Group Technical Standard, Issue 6 (XPG6/UNIX 03/SUSv3)
  2229. // _XPG7 Open Group Technical Standard, Issue 7 (XPG7/UNIX 08/SUSv4)
  2230. // X/Open Portability Guide, Issue 3
  2231. // _XOPEN_VERSION is defined by the X/Open specifications and is not
  2232. // normally defined by the application, except in the case of an XPG4
  2233. // application. On the implementation side, _XOPEN_VERSION defined with
  2234. // the value of 3 indicates an XPG3 application. _XOPEN_VERSION defined
  2235. // with the value of 4 indicates an XPG4 or XPG4v2 (UNIX 95) application.
  2236. // _XOPEN_VERSION defined with a value of 500 indicates an XPG5 (UNIX 98)
  2237. // application and with a value of 600 indicates an XPG6 (UNIX 03)
  2238. // application and with a value of 700 indicates an XPG7 (UNIX 08).
  2239. // The appropriate version is determined by the use of the
  2240. // feature test macros described earlier. The value of _XOPEN_VERSION
  2241. // defaults to 3 otherwise indicating support for XPG3 applications.
  2242. // ANSI C and ISO 9899:1990 say the type long long doesn't exist in strictly
  2243. // conforming environments. ISO 9899:1999 says it does.
  2244. //
  2245. // The presence of _LONGLONG_TYPE says "long long exists" which is therefore
  2246. // defined in all but strictly conforming environments that disallow it.
  2247. // The following macro defines a value for the ISO C99 restrict
  2248. // keyword so that _RESTRICT_KYWD resolves to "restrict" if
  2249. // an ISO C99 compiler is used, "__restrict" for c++ and "" (null string)
  2250. // if any other compiler is used. This allows for the use of single
  2251. // prototype declarations regardless of compiler version.
  2252. // The following macro defines a value for the ISO C11 _Noreturn
  2253. // keyword so that _NORETURN_KYWD resolves to "_Noreturn" if
  2254. // an ISO C11 compiler is used and "" (null string) if any other
  2255. // compiler is used. This allows for the use of single prototype
  2256. // declarations regardless of compiler version.
  2257. // ISO/IEC 9899:2011 Annex K
  2258. // The following macro indicates header support for the ANSI C++
  2259. // standard. The ISO/IEC designation for this is ISO/IEC FDIS 14882.
  2260. // The following macro indicates header support for the C99 standard,
  2261. // ISO/IEC 9899:1999, Programming Languages - C.
  2262. // The following macro indicates header support for the C11 standard,
  2263. // ISO/IEC 9899:2011, Programming Languages - C.
  2264. // The following macro indicates header support for the C11 standard,
  2265. // ISO/IEC 9899:2011 Annex K, Programming Languages - C.
  2266. // The following macro indicates header support for DTrace. The value is an
  2267. // integer that corresponds to the major version number for DTrace.
  2268. // CDDL HEADER START
  2269. //
  2270. // The contents of this file are subject to the terms of the
  2271. // Common Development and Distribution License (the "License").
  2272. // You may not use this file except in compliance with the License.
  2273. //
  2274. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2275. // or http://www.opensolaris.org/os/licensing.
  2276. // See the License for the specific language governing permissions
  2277. // and limitations under the License.
  2278. //
  2279. //
  2280. // When distributing Covered Code, include this CDDL HEADER in each
  2281. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2282. // If applicable, add the following below this CDDL HEADER, with the
  2283. // fields enclosed by brackets "[]" replaced with your own identifying
  2284. // information: Portions Copyright [yyyy] [name of copyright owner]
  2285. //
  2286. // CDDL HEADER END
  2287. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  2288. // Use is subject to license terms.
  2289. // Copyright 2016 Joyent, Inc.
  2290. // Machine dependent definitions moved to <sys/machtypes.h>.
  2291. // CDDL HEADER START
  2292. //
  2293. // The contents of this file are subject to the terms of the
  2294. // Common Development and Distribution License (the "License").
  2295. // You may not use this file except in compliance with the License.
  2296. //
  2297. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2298. // or http://www.opensolaris.org/os/licensing.
  2299. // See the License for the specific language governing permissions
  2300. // and limitations under the License.
  2301. //
  2302. // When distributing Covered Code, include this CDDL HEADER in each
  2303. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2304. // If applicable, add the following below this CDDL HEADER, with the
  2305. // fields enclosed by brackets "[]" replaced with your own identifying
  2306. // information: Portions Copyright [yyyy] [name of copyright owner]
  2307. //
  2308. // CDDL HEADER END
  2309. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  2310. // Use is subject to license terms.
  2311. // Machine dependent types:
  2312. //
  2313. // intel ia32 Version
  2314. type Label_t = X_label_t /* machtypes.h:59:54 */
  2315. type Lock_t = uint8 /* machtypes.h:63:23 */ // lock work for busy wait
  2316. // Include fixed width type declarations proposed by the ISO/JTC1/SC22/WG14 C
  2317. // committee's working draft for the revision of the current ISO C standard,
  2318. // ISO/IEC 9899:1990 Programming language - C. These are not currently
  2319. // required by any standard but constitute a useful, general purpose set
  2320. // of type definitions which is namespace clean with respect to all standards.
  2321. // CDDL HEADER START
  2322. //
  2323. // The contents of this file are subject to the terms of the
  2324. // Common Development and Distribution License, Version 1.0 only
  2325. // (the "License"). You may not use this file except in compliance
  2326. // with the License.
  2327. //
  2328. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2329. // or http://www.opensolaris.org/os/licensing.
  2330. // See the License for the specific language governing permissions
  2331. // and limitations under the License.
  2332. //
  2333. // When distributing Covered Code, include this CDDL HEADER in each
  2334. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2335. // If applicable, add the following below this CDDL HEADER, with the
  2336. // fields enclosed by brackets "[]" replaced with your own identifying
  2337. // information: Portions Copyright [yyyy] [name of copyright owner]
  2338. //
  2339. // CDDL HEADER END
  2340. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2341. //
  2342. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  2343. // Use is subject to license terms.
  2344. // This file, <sys/int_types.h>, is part of the Sun Microsystems implementation
  2345. // of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999
  2346. // Programming language - C.
  2347. //
  2348. // Programs/Modules should not directly include this file. Access to the
  2349. // types defined in this file should be through the inclusion of one of the
  2350. // following files:
  2351. //
  2352. // <sys/types.h> Provides only the "_t" types defined in this
  2353. // file which is a subset of the contents of
  2354. // <inttypes.h>. (This can be appropriate for
  2355. // all programs/modules except those claiming
  2356. // ANSI-C conformance.)
  2357. //
  2358. // <sys/inttypes.h> Provides the Kernel and Driver appropriate
  2359. // components of <inttypes.h>.
  2360. //
  2361. // <inttypes.h> For use by applications.
  2362. //
  2363. // See these files for more details.
  2364. // DO NOT EDIT THIS FILE.
  2365. //
  2366. // It has been auto-edited by fixincludes from:
  2367. //
  2368. // "/usr/include/sys/feature_tests.h"
  2369. //
  2370. // This had to be done to correct non-standard usages in the
  2371. // original, manufacturer supplied header file.
  2372. // CDDL HEADER START
  2373. //
  2374. // The contents of this file are subject to the terms of the
  2375. // Common Development and Distribution License (the "License").
  2376. // You may not use this file except in compliance with the License.
  2377. //
  2378. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2379. // or http://www.opensolaris.org/os/licensing.
  2380. // See the License for the specific language governing permissions
  2381. // and limitations under the License.
  2382. //
  2383. // When distributing Covered Code, include this CDDL HEADER in each
  2384. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2385. // If applicable, add the following below this CDDL HEADER, with the
  2386. // fields enclosed by brackets "[]" replaced with your own identifying
  2387. // information: Portions Copyright [yyyy] [name of copyright owner]
  2388. //
  2389. // CDDL HEADER END
  2390. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2391. // Copyright 2016 Joyent, Inc.
  2392. // Copyright 2022 Oxide Computer Company
  2393. //
  2394. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2395. // Use is subject to license terms.
  2396. // Basic / Extended integer types
  2397. //
  2398. // The following defines the basic fixed-size integer types.
  2399. //
  2400. // Implementations are free to typedef them to Standard C integer types or
  2401. // extensions that they support. If an implementation does not support one
  2402. // of the particular integer data types below, then it should not define the
  2403. // typedefs and macros corresponding to that data type. Note that int8_t
  2404. // is not defined in -Xs mode on ISAs for which the ABI specifies "char"
  2405. // as an unsigned entity because there is no way to define an eight bit
  2406. // signed integral.
  2407. type Int8_t = int8 /* int_types.h:75:16 */
  2408. type Int16_t = int16 /* int_types.h:79:17 */
  2409. type Int32_t = int32 /* int_types.h:80:15 */
  2410. type Int64_t = int64 /* int_types.h:83:16 */
  2411. type Uint8_t = uint8 /* int_types.h:91:24 */
  2412. type Uint16_t = uint16 /* int_types.h:92:25 */
  2413. type Uint32_t = uint32 /* int_types.h:93:23 */
  2414. type Uint64_t = uint64 /* int_types.h:95:24 */
  2415. // intmax_t and uintmax_t are to be the longest (in number of bits) signed
  2416. // and unsigned integer types supported by the implementation.
  2417. type Intmax_t = int64 /* int_types.h:107:19 */
  2418. type Uintmax_t = uint64 /* int_types.h:108:19 */
  2419. // intptr_t and uintptr_t are signed and unsigned integer types large enough
  2420. // to hold any data pointer; that is, data pointers can be assigned into or
  2421. // from these integer types without losing precision.
  2422. type Intptr_t = int64 /* int_types.h:120:16 */
  2423. type Uintptr_t = uint64 /* int_types.h:121:24 */
  2424. // The following define the fastest integer types that can hold the
  2425. // specified number of bits.
  2426. type Int_fast8_t = int8 /* int_types.h:132:16 */
  2427. type Int_fast16_t = int32 /* int_types.h:136:15 */
  2428. type Int_fast32_t = int32 /* int_types.h:137:15 */
  2429. type Int_fast64_t = int64 /* int_types.h:139:16 */
  2430. type Uint_fast8_t = uint8 /* int_types.h:146:24 */
  2431. type Uint_fast16_t = uint32 /* int_types.h:147:23 */
  2432. type Uint_fast32_t = uint32 /* int_types.h:148:23 */
  2433. type Uint_fast64_t = uint64 /* int_types.h:150:24 */
  2434. // The following define the smallest integer types that can hold the
  2435. // specified number of bits.
  2436. type Int_least8_t = int8 /* int_types.h:162:16 */
  2437. type Int_least16_t = int16 /* int_types.h:166:17 */
  2438. type Int_least32_t = int32 /* int_types.h:167:15 */
  2439. type Int_least64_t = int64 /* int_types.h:169:16 */
  2440. // If these are changed, please update char16_t and char32_t in head/uchar.h.
  2441. type Uint_least8_t = uint8 /* int_types.h:179:24 */
  2442. type Uint_least16_t = uint16 /* int_types.h:180:25 */
  2443. type Uint_least32_t = uint32 /* int_types.h:181:23 */
  2444. type Uint_least64_t = uint64 /* int_types.h:183:24 */
  2445. // Strictly conforming ANSI C environments prior to the 1999
  2446. // revision of the C Standard (ISO/IEC 9899:1999) do not have
  2447. // the long long data type.
  2448. type Longlong_t = int64 /* types.h:72:20 */
  2449. type U_longlong_t = uint64 /* types.h:73:28 */
  2450. // These types (t_{u}scalar_t) exist because the XTI/TPI/DLPI standards had
  2451. // to use them instead of int32_t and uint32_t because DEC had
  2452. // shipped 64-bit wide.
  2453. type T_scalar_t = int32 /* types.h:92:18 */
  2454. type T_uscalar_t = uint32 /* types.h:93:18 */
  2455. // POSIX Extensions
  2456. type Uchar_t = uint8 /* types.h:102:23 */
  2457. type Ushort_t = uint16 /* types.h:103:24 */
  2458. type Uint_t = uint32 /* types.h:104:22 */
  2459. type Ulong_t = uint64 /* types.h:105:23 */
  2460. type Caddr_t = uintptr /* types.h:107:15 */ // ?<core address> type
  2461. type Daddr_t = int64 /* types.h:108:15 */ // <disk address> type
  2462. type Cnt_t = int16 /* types.h:109:16 */ // pointer difference
  2463. // VM-related types
  2464. type Pfn_t = uint64 /* types.h:123:18 */ // page frame number
  2465. type Pgcnt_t = uint64 /* types.h:124:18 */ // number of pages
  2466. type Spgcnt_t = int64 /* types.h:125:15 */ // signed number of pages
  2467. type Use_t = uint8 /* types.h:127:18 */ // use count for swap.
  2468. type Sysid_t = int16 /* types.h:128:16 */
  2469. type Index_t = int16 /* types.h:129:16 */
  2470. type Timeout_id_t = uintptr /* types.h:130:15 */ // opaque handle from timeout(9F)
  2471. type Bufcall_id_t = uintptr /* types.h:131:15 */ // opaque handle from bufcall(9F)
  2472. // The size of off_t and related types depends on the setting of
  2473. // _FILE_OFFSET_BITS. (Note that other system headers define other types
  2474. // related to those defined here.)
  2475. //
  2476. // If _LARGEFILE64_SOURCE is defined, variants of these types that are
  2477. // explicitly 64 bits wide become available.
  2478. type Off_t = int64 /* types.h:145:15 */ // offsets within files
  2479. type Off64_t = int64 /* types.h:152:16 */ // offsets within files
  2480. type Ino_t = uint64 /* types.h:161:18 */ // expanded inode type
  2481. type Blkcnt_t = int64 /* types.h:162:15 */ // count of file blocks
  2482. type Fsblkcnt_t = uint64 /* types.h:163:18 */ // count of file system blocks
  2483. type Fsfilcnt_t = uint64 /* types.h:164:18 */ // count of files
  2484. type Ino64_t = uint64 /* types.h:174:16 */ // expanded inode type
  2485. type Blkcnt64_t = int64 /* types.h:175:18 */ // count of file blocks
  2486. type Fsblkcnt64_t = uint64 /* types.h:176:20 */ // count of file system blocks
  2487. type Fsfilcnt64_t = uint64 /* types.h:177:20 */ // count of files
  2488. type Blksize_t = int32 /* types.h:187:14 */ // used for block sizes
  2489. // The boolean_t type has had a varied amount of exposure over the years in
  2490. // terms of how its enumeration constants have been exposed. In particular, it
  2491. // originally used the __XOPEN_OR_POSIX macro to determine whether to prefix the
  2492. // B_TRUE and B_FALSE with an underscore. This check never included the
  2493. // question of if we were in a strict ANSI C environment or whether extensions
  2494. // were defined.
  2495. //
  2496. // Compilers such as clang started defaulting to always including an
  2497. // XOPEN_SOURCE declaration on behalf of users, but also noted __EXTENSIONS__.
  2498. // This would lead most software that had used the non-underscore versions to
  2499. // need it. As such, we have adjusted the non-strict XOPEN environment to retain
  2500. // its old behavior so as to minimize namespace pollution; however, we instead
  2501. // include both variants of the definitions in the generally visible version
  2502. // allowing software written in either world to hopefully end up in a good
  2503. // place.
  2504. //
  2505. // This isn't perfect, but should hopefully minimize the pain for folks actually
  2506. // trying to build software.
  2507. type Boolean_t = uint32 /* types.h:215:69 */
  2508. // The {u,}pad64_t types can be used in structures such that those structures
  2509. // may be accessed by code produced by compilation environments which don't
  2510. // support a 64 bit integral datatype. The intention is not to allow
  2511. // use of these fields in such environments, but to maintain the alignment
  2512. // and offsets of the structure.
  2513. //
  2514. // Similar comments for {u,}pad128_t.
  2515. //
  2516. // Note that these types do NOT generate any stronger alignment constraints
  2517. // than those available in the underlying ABI. See <sys/isa_defs.h>
  2518. type Pad64_t = int64 /* types.h:240:18 */
  2519. type Upad64_t = uint64 /* types.h:241:18 */
  2520. type Pad128_t = struct {
  2521. F_q float64
  2522. F__ccgo_pad1 [8]byte
  2523. } /* types.h:257:3 */
  2524. type Upad128_t = struct {
  2525. F_q float64
  2526. F__ccgo_pad1 [8]byte
  2527. } /* types.h:262:3 */
  2528. type Offset_t = int64 /* types.h:264:20 */
  2529. type U_offset_t = uint64 /* types.h:265:22 */
  2530. type Len_t = uint64 /* types.h:266:22 */
  2531. type Diskaddr_t = uint64 /* types.h:267:22 */
  2532. // Definitions remaining from previous partial support for 64-bit file
  2533. // offsets. This partial support for devices greater than 2gb requires
  2534. // compiler support for long long.
  2535. type Lloff_t = struct{ F_f int64 } /* types.h:284:3 */
  2536. type Lldaddr_t = struct{ F_f int64 } /* types.h:304:3 */
  2537. type K_fltset_t = uint32 /* types.h:317:16 */ // kernel fault set type
  2538. // The following type is for various kinds of identifiers. The
  2539. // actual type must be the same for all since some system calls
  2540. // (such as sigsend) take arguments that may be any of these
  2541. // types. The enumeration type idtype_t defined in sys/procset.h
  2542. // is used to indicate what type of id is being specified --
  2543. // a process id, process group id, session id, scheduling class id,
  2544. // user id, group id, project id, task id or zone id.
  2545. type Id_t = int32 /* types.h:329:14 */
  2546. type Lgrp_id_t = int32 /* types.h:334:15 */ // lgroup ID
  2547. // Type useconds_t is an unsigned integral type capable of storing
  2548. // values at least in the range of zero to 1,000,000.
  2549. type Useconds_t = uint32 /* types.h:340:17 */ // Time, in microseconds
  2550. type Suseconds_t = int64 /* types.h:344:14 */ // signed # of microseconds
  2551. // Typedefs for dev_t components.
  2552. type Major_t = uint32 /* types.h:351:16 */ // major part of device number
  2553. type Minor_t = uint32 /* types.h:352:16 */ // minor part of device number
  2554. // The data type of a thread priority.
  2555. type Pri_t = int16 /* types.h:361:15 */
  2556. // The data type for a CPU flags field. (Can be extended to larger unsigned
  2557. // types, if needed, limited by ability to update atomically.)
  2558. type Cpu_flag_t = uint16 /* types.h:367:18 */
  2559. // For compatibility reasons the following typedefs (prefixed o_)
  2560. // can't grow regardless of the EFT definition. Although,
  2561. // applications should not explicitly use these typedefs
  2562. // they may be included via a system header definition.
  2563. // WARNING: These typedefs may be removed in a future
  2564. // release.
  2565. //
  2566. // ex. the definitions in s5inode.h (now obsoleted)
  2567. // remained small to preserve compatibility
  2568. // in the S5 file system type.
  2569. type O_mode_t = uint16 /* types.h:380:18 */ // old file attribute type
  2570. type O_dev_t = int16 /* types.h:381:15 */ // old device type
  2571. type O_uid_t = uint16 /* types.h:382:18 */ // old UID type
  2572. type O_gid_t = uint16 /* types.h:383:17 */ // old GID type
  2573. type O_nlink_t = int16 /* types.h:384:15 */ // old file link type
  2574. type O_pid_t = int16 /* types.h:385:15 */ // old process id type
  2575. type O_ino_t = uint16 /* types.h:386:18 */ // old inode type
  2576. // POSIX and XOPEN Declarations
  2577. type Key_t = int32 /* types.h:392:13 */ // IPC key type
  2578. type Mode_t = uint32 /* types.h:394:16 */ // file attribute type
  2579. type Uid_t = uint32 /* types.h:401:22 */ // UID type
  2580. type Gid_t = uint32 /* types.h:404:15 */ // GID type
  2581. type Datalink_id_t = uint32 /* types.h:406:18 */
  2582. type Vrid_t = uint32 /* types.h:407:18 */
  2583. type Taskid_t = int32 /* types.h:409:17 */
  2584. type Projid_t = int32 /* types.h:410:17 */
  2585. type Poolid_t = int32 /* types.h:411:14 */
  2586. type Zoneid_t = int32 /* types.h:412:14 */
  2587. type Ctid_t = int32 /* types.h:413:14 */
  2588. // POSIX definitions are same as defined in thread.h and synch.h.
  2589. // Any changes made to here should be reflected in corresponding
  2590. // files as described in comments.
  2591. type Pthread_t = uint32 /* types.h:420:16 */ // = thread_t in thread.h
  2592. type Pthread_key_t = uint32 /* types.h:421:16 */ // = thread_key_t in thread.h
  2593. // "Magic numbers" tagging synchronization object types
  2594. type X_pthread_mutex = struct {
  2595. F__pthread_mutex_flags struct {
  2596. F__pthread_mutex_flag1 uint16
  2597. F__pthread_mutex_flag2 uint8
  2598. F__pthread_mutex_ceiling uint8
  2599. F__pthread_mutex_type uint16
  2600. F__pthread_mutex_magic uint16
  2601. }
  2602. F__pthread_mutex_lock struct {
  2603. F__ccgo_pad1 [0]uint64
  2604. F__pthread_mutex_lock64 struct{ F__pthread_mutex_pad [8]uint8 }
  2605. }
  2606. F__pthread_mutex_data uint64
  2607. } /* types.h:429:9 */
  2608. // = thread_key_t in thread.h
  2609. // "Magic numbers" tagging synchronization object types
  2610. type Pthread_mutex_t = X_pthread_mutex /* types.h:448:3 */
  2611. type X_pthread_cond = struct {
  2612. F__pthread_cond_flags struct {
  2613. F__pthread_cond_flag [4]uint8
  2614. F__pthread_cond_type uint16
  2615. F__pthread_cond_magic uint16
  2616. }
  2617. F__pthread_cond_data uint64
  2618. } /* types.h:450:9 */
  2619. type Pthread_cond_t = X_pthread_cond /* types.h:457:3 */
  2620. // UNIX 98 Extension
  2621. type X_pthread_rwlock = struct {
  2622. F__pthread_rwlock_readers int32
  2623. F__pthread_rwlock_type uint16
  2624. F__pthread_rwlock_magic uint16
  2625. F__pthread_rwlock_mutex Pthread_mutex_t
  2626. F__pthread_rwlock_readercv Pthread_cond_t
  2627. F__pthread_rwlock_writercv Pthread_cond_t
  2628. } /* types.h:462:9 */
  2629. // UNIX 98 Extension
  2630. type Pthread_rwlock_t = X_pthread_rwlock /* types.h:469:3 */
  2631. // SUSV3
  2632. type Pthread_barrier_t = struct {
  2633. F__pthread_barrier_count uint32
  2634. F__pthread_barrier_current uint32
  2635. F__pthread_barrier_cycle uint64
  2636. F__pthread_barrier_reserved uint64
  2637. F__pthread_barrier_lock Pthread_mutex_t
  2638. F__pthread_barrier_cond Pthread_cond_t
  2639. } /* types.h:481:3 */
  2640. type Pthread_spinlock_t = Pthread_mutex_t /* types.h:483:25 */
  2641. // attributes for threads, dynamically allocated by library
  2642. type X_pthread_attr = struct{ F__pthread_attrp uintptr } /* types.h:488:9 */
  2643. // attributes for threads, dynamically allocated by library
  2644. type Pthread_attr_t = X_pthread_attr /* types.h:490:3 */
  2645. // attributes for mutex, dynamically allocated by library
  2646. type X_pthread_mutexattr = struct{ F__pthread_mutexattrp uintptr } /* types.h:495:9 */
  2647. // attributes for mutex, dynamically allocated by library
  2648. type Pthread_mutexattr_t = X_pthread_mutexattr /* types.h:497:3 */
  2649. // attributes for cond, dynamically allocated by library
  2650. type X_pthread_condattr = struct{ F__pthread_condattrp uintptr } /* types.h:502:9 */
  2651. // attributes for cond, dynamically allocated by library
  2652. type Pthread_condattr_t = X_pthread_condattr /* types.h:504:3 */
  2653. // pthread_once
  2654. type X_once = struct{ F__pthread_once_pad [4]uint64 } /* types.h:509:9 */
  2655. // pthread_once
  2656. type Pthread_once_t = X_once /* types.h:511:3 */
  2657. // UNIX 98 Extensions
  2658. // attributes for rwlock, dynamically allocated by library
  2659. type X_pthread_rwlockattr = struct{ F__pthread_rwlockattrp uintptr } /* types.h:517:9 */
  2660. // UNIX 98 Extensions
  2661. // attributes for rwlock, dynamically allocated by library
  2662. type Pthread_rwlockattr_t = X_pthread_rwlockattr /* types.h:519:3 */
  2663. // SUSV3
  2664. // attributes for pthread_barrier_t, dynamically allocated by library
  2665. type Pthread_barrierattr_t = struct{ F__pthread_barrierattrp uintptr } /* types.h:527:3 */
  2666. type Dev_t = uint64 /* types.h:529:17 */ // expanded device type
  2667. type Nlink_t = uint32 /* types.h:532:16 */ // file link type
  2668. type Pid_t = int32 /* types.h:533:13 */ // size of something in bytes
  2669. type Ssize_t = int64 /* types.h:551:14 */ // size of something in bytes or -1
  2670. type Time_t = int64 /* types.h:559:15 */ // time of day in seconds
  2671. type Clock_t = int64 /* types.h:564:15 */ // relative time in a specified resolution
  2672. type Clockid_t = int32 /* types.h:569:13 */ // clock identifier type
  2673. type Timer_t = int32 /* types.h:574:13 */ // timer identifier type
  2674. // BEGIN CSTYLED
  2675. type Unchar = uint8 /* types.h:580:23 */
  2676. type Ushort = uint16 /* types.h:581:24 */
  2677. type Uint = uint32 /* types.h:582:22 */
  2678. type Ulong = uint64 /* types.h:583:23 */
  2679. // END CSTYLED
  2680. // The following is the value of type id_t to use to indicate the
  2681. // caller's current id. See procset.h for the type idtype_t
  2682. // which defines which kind of id is being specified.
  2683. // The following value of type pfn_t is used to indicate
  2684. // invalid page frame number.
  2685. // BEGIN CSTYLED
  2686. type U_char = uint8 /* types.h:650:23 */
  2687. type U_short = uint16 /* types.h:651:24 */
  2688. type U_int = uint32 /* types.h:652:22 */
  2689. type U_long = uint64 /* types.h:653:23 */
  2690. type X_quad = struct{ Fval [2]int32 } /* types.h:654:9 */
  2691. type Quad_t = X_quad /* types.h:654:38 */ // used by UFS
  2692. type Quad = Quad_t /* types.h:655:17 */ // used by UFS
  2693. // END CSTYLED
  2694. // Nested include for BSD/sockets source compatibility.
  2695. // (The select macros used to be defined here).
  2696. // CDDL HEADER START
  2697. //
  2698. // The contents of this file are subject to the terms of the
  2699. // Common Development and Distribution License (the "License").
  2700. // You may not use this file except in compliance with the License.
  2701. //
  2702. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2703. // or http://www.opensolaris.org/os/licensing.
  2704. // See the License for the specific language governing permissions
  2705. // and limitations under the License.
  2706. //
  2707. // When distributing Covered Code, include this CDDL HEADER in each
  2708. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2709. // If applicable, add the following below this CDDL HEADER, with the
  2710. // fields enclosed by brackets "[]" replaced with your own identifying
  2711. // information: Portions Copyright [yyyy] [name of copyright owner]
  2712. //
  2713. // CDDL HEADER END
  2714. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2715. //
  2716. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2717. //
  2718. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  2719. // Use is subject to license terms.
  2720. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2721. // All Rights Reserved
  2722. // University Copyright- Copyright (c) 1982, 1986, 1988
  2723. // The Regents of the University of California
  2724. // All Rights Reserved
  2725. //
  2726. // University Acknowledgment- Portions of this document are derived from
  2727. // software developed by the University of California, Berkeley, and its
  2728. // contributors.
  2729. // DO NOT EDIT THIS FILE.
  2730. //
  2731. // It has been auto-edited by fixincludes from:
  2732. //
  2733. // "/usr/include/sys/feature_tests.h"
  2734. //
  2735. // This had to be done to correct non-standard usages in the
  2736. // original, manufacturer supplied header file.
  2737. // CDDL HEADER START
  2738. //
  2739. // The contents of this file are subject to the terms of the
  2740. // Common Development and Distribution License (the "License").
  2741. // You may not use this file except in compliance with the License.
  2742. //
  2743. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2744. // or http://www.opensolaris.org/os/licensing.
  2745. // See the License for the specific language governing permissions
  2746. // and limitations under the License.
  2747. //
  2748. // When distributing Covered Code, include this CDDL HEADER in each
  2749. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2750. // If applicable, add the following below this CDDL HEADER, with the
  2751. // fields enclosed by brackets "[]" replaced with your own identifying
  2752. // information: Portions Copyright [yyyy] [name of copyright owner]
  2753. //
  2754. // CDDL HEADER END
  2755. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2756. // Copyright 2016 Joyent, Inc.
  2757. // Copyright 2022 Oxide Computer Company
  2758. //
  2759. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2760. // Use is subject to license terms.
  2761. // CDDL HEADER START
  2762. //
  2763. // The contents of this file are subject to the terms of the
  2764. // Common Development and Distribution License, Version 1.0 only
  2765. // (the "License"). You may not use this file except in compliance
  2766. // with the License.
  2767. //
  2768. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2769. // or http://www.opensolaris.org/os/licensing.
  2770. // See the License for the specific language governing permissions
  2771. // and limitations under the License.
  2772. //
  2773. // When distributing Covered Code, include this CDDL HEADER in each
  2774. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2775. // If applicable, add the following below this CDDL HEADER, with the
  2776. // fields enclosed by brackets "[]" replaced with your own identifying
  2777. // information: Portions Copyright [yyyy] [name of copyright owner]
  2778. //
  2779. // CDDL HEADER END
  2780. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  2781. // Use is subject to license terms.
  2782. // Implementation-private. This header should not be included
  2783. // directly by an application. The application should instead
  2784. // include <time.h> which includes this header conditionally
  2785. // depending on which feature test macros are defined. By default,
  2786. // this header is included by <time.h>. X/Open and POSIX
  2787. // standards requirements result in this header being included
  2788. // by <time.h> only under a restricted set of conditions.
  2789. // DO NOT EDIT THIS FILE.
  2790. //
  2791. // It has been auto-edited by fixincludes from:
  2792. //
  2793. // "/usr/include/sys/feature_tests.h"
  2794. //
  2795. // This had to be done to correct non-standard usages in the
  2796. // original, manufacturer supplied header file.
  2797. // CDDL HEADER START
  2798. //
  2799. // The contents of this file are subject to the terms of the
  2800. // Common Development and Distribution License (the "License").
  2801. // You may not use this file except in compliance with the License.
  2802. //
  2803. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2804. // or http://www.opensolaris.org/os/licensing.
  2805. // See the License for the specific language governing permissions
  2806. // and limitations under the License.
  2807. //
  2808. // When distributing Covered Code, include this CDDL HEADER in each
  2809. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2810. // If applicable, add the following below this CDDL HEADER, with the
  2811. // fields enclosed by brackets "[]" replaced with your own identifying
  2812. // information: Portions Copyright [yyyy] [name of copyright owner]
  2813. //
  2814. // CDDL HEADER END
  2815. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2816. // Copyright 2016 Joyent, Inc.
  2817. // Copyright 2022 Oxide Computer Company
  2818. //
  2819. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2820. // Use is subject to license terms.
  2821. // Time expressed in seconds and nanoseconds
  2822. type Timespec = struct {
  2823. Ftv_sec int64
  2824. Ftv_nsec int64
  2825. } /* time_impl.h:57:9 */
  2826. // used by UFS
  2827. // END CSTYLED
  2828. // Nested include for BSD/sockets source compatibility.
  2829. // (The select macros used to be defined here).
  2830. // CDDL HEADER START
  2831. //
  2832. // The contents of this file are subject to the terms of the
  2833. // Common Development and Distribution License (the "License").
  2834. // You may not use this file except in compliance with the License.
  2835. //
  2836. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2837. // or http://www.opensolaris.org/os/licensing.
  2838. // See the License for the specific language governing permissions
  2839. // and limitations under the License.
  2840. //
  2841. // When distributing Covered Code, include this CDDL HEADER in each
  2842. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2843. // If applicable, add the following below this CDDL HEADER, with the
  2844. // fields enclosed by brackets "[]" replaced with your own identifying
  2845. // information: Portions Copyright [yyyy] [name of copyright owner]
  2846. //
  2847. // CDDL HEADER END
  2848. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2849. //
  2850. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2851. //
  2852. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  2853. // Use is subject to license terms.
  2854. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2855. // All Rights Reserved
  2856. // University Copyright- Copyright (c) 1982, 1986, 1988
  2857. // The Regents of the University of California
  2858. // All Rights Reserved
  2859. //
  2860. // University Acknowledgment- Portions of this document are derived from
  2861. // software developed by the University of California, Berkeley, and its
  2862. // contributors.
  2863. // DO NOT EDIT THIS FILE.
  2864. //
  2865. // It has been auto-edited by fixincludes from:
  2866. //
  2867. // "/usr/include/sys/feature_tests.h"
  2868. //
  2869. // This had to be done to correct non-standard usages in the
  2870. // original, manufacturer supplied header file.
  2871. // CDDL HEADER START
  2872. //
  2873. // The contents of this file are subject to the terms of the
  2874. // Common Development and Distribution License (the "License").
  2875. // You may not use this file except in compliance with the License.
  2876. //
  2877. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2878. // or http://www.opensolaris.org/os/licensing.
  2879. // See the License for the specific language governing permissions
  2880. // and limitations under the License.
  2881. //
  2882. // When distributing Covered Code, include this CDDL HEADER in each
  2883. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2884. // If applicable, add the following below this CDDL HEADER, with the
  2885. // fields enclosed by brackets "[]" replaced with your own identifying
  2886. // information: Portions Copyright [yyyy] [name of copyright owner]
  2887. //
  2888. // CDDL HEADER END
  2889. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2890. // Copyright 2016 Joyent, Inc.
  2891. // Copyright 2022 Oxide Computer Company
  2892. //
  2893. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2894. // Use is subject to license terms.
  2895. // CDDL HEADER START
  2896. //
  2897. // The contents of this file are subject to the terms of the
  2898. // Common Development and Distribution License, Version 1.0 only
  2899. // (the "License"). You may not use this file except in compliance
  2900. // with the License.
  2901. //
  2902. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2903. // or http://www.opensolaris.org/os/licensing.
  2904. // See the License for the specific language governing permissions
  2905. // and limitations under the License.
  2906. //
  2907. // When distributing Covered Code, include this CDDL HEADER in each
  2908. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2909. // If applicable, add the following below this CDDL HEADER, with the
  2910. // fields enclosed by brackets "[]" replaced with your own identifying
  2911. // information: Portions Copyright [yyyy] [name of copyright owner]
  2912. //
  2913. // CDDL HEADER END
  2914. // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
  2915. // Use is subject to license terms.
  2916. // Implementation-private. This header should not be included
  2917. // directly by an application. The application should instead
  2918. // include <time.h> which includes this header conditionally
  2919. // depending on which feature test macros are defined. By default,
  2920. // this header is included by <time.h>. X/Open and POSIX
  2921. // standards requirements result in this header being included
  2922. // by <time.h> only under a restricted set of conditions.
  2923. // DO NOT EDIT THIS FILE.
  2924. //
  2925. // It has been auto-edited by fixincludes from:
  2926. //
  2927. // "/usr/include/sys/feature_tests.h"
  2928. //
  2929. // This had to be done to correct non-standard usages in the
  2930. // original, manufacturer supplied header file.
  2931. // CDDL HEADER START
  2932. //
  2933. // The contents of this file are subject to the terms of the
  2934. // Common Development and Distribution License (the "License").
  2935. // You may not use this file except in compliance with the License.
  2936. //
  2937. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  2938. // or http://www.opensolaris.org/os/licensing.
  2939. // See the License for the specific language governing permissions
  2940. // and limitations under the License.
  2941. //
  2942. // When distributing Covered Code, include this CDDL HEADER in each
  2943. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  2944. // If applicable, add the following below this CDDL HEADER, with the
  2945. // fields enclosed by brackets "[]" replaced with your own identifying
  2946. // information: Portions Copyright [yyyy] [name of copyright owner]
  2947. //
  2948. // CDDL HEADER END
  2949. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  2950. // Copyright 2016 Joyent, Inc.
  2951. // Copyright 2022 Oxide Computer Company
  2952. //
  2953. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  2954. // Use is subject to license terms.
  2955. // Time expressed in seconds and nanoseconds
  2956. type Timespec_t = Timespec /* time_impl.h:60:3 */
  2957. type Timestruc_t = Timespec /* time_impl.h:81:25 */ // definition per SVr4
  2958. // The following has been left in for backward compatibility. Portable
  2959. // applications should not use the structure name timestruc.
  2960. // Timer specification
  2961. type Itimerspec = struct {
  2962. Fit_interval struct {
  2963. Ftv_sec int64
  2964. Ftv_nsec int64
  2965. }
  2966. Fit_value struct {
  2967. Ftv_sec int64
  2968. Ftv_nsec int64
  2969. }
  2970. } /* time_impl.h:95:9 */
  2971. // definition per SVr4
  2972. // The following has been left in for backward compatibility. Portable
  2973. // applications should not use the structure name timestruc.
  2974. // Timer specification
  2975. type Itimerspec_t = Itimerspec /* time_impl.h:98:3 */
  2976. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  2977. // All Rights Reserved
  2978. // Copyright (c) 1982, 1986, 1993 Regents of the University of California.
  2979. // All rights reserved. The Berkeley software License Agreement
  2980. // specifies the terms and conditions for redistribution.
  2981. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  2982. //
  2983. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  2984. // Use is subject to license terms.
  2985. //
  2986. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  2987. // Copyright 2016 Joyent, Inc.
  2988. // Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  2989. // Copyright (c) 2013, 2016 by Delphix. All rights reserved.
  2990. // DO NOT EDIT THIS FILE.
  2991. //
  2992. // It has been auto-edited by fixincludes from:
  2993. //
  2994. // "/usr/include/sys/feature_tests.h"
  2995. //
  2996. // This had to be done to correct non-standard usages in the
  2997. // original, manufacturer supplied header file.
  2998. // CDDL HEADER START
  2999. //
  3000. // The contents of this file are subject to the terms of the
  3001. // Common Development and Distribution License (the "License").
  3002. // You may not use this file except in compliance with the License.
  3003. //
  3004. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3005. // or http://www.opensolaris.org/os/licensing.
  3006. // See the License for the specific language governing permissions
  3007. // and limitations under the License.
  3008. //
  3009. // When distributing Covered Code, include this CDDL HEADER in each
  3010. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3011. // If applicable, add the following below this CDDL HEADER, with the
  3012. // fields enclosed by brackets "[]" replaced with your own identifying
  3013. // information: Portions Copyright [yyyy] [name of copyright owner]
  3014. //
  3015. // CDDL HEADER END
  3016. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  3017. // Copyright 2016 Joyent, Inc.
  3018. // Copyright 2022 Oxide Computer Company
  3019. //
  3020. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  3021. // Use is subject to license terms.
  3022. // Structure returned by gettimeofday(2) system call,
  3023. // and used in other calls.
  3024. type Timeval = struct {
  3025. Ftv_sec int64
  3026. Ftv_usec int64
  3027. } /* time.h:54:1 */
  3028. type Timezone = struct {
  3029. Ftz_minuteswest int32
  3030. Ftz_dsttime int32
  3031. } /* time.h:86:1 */
  3032. // Needed for longlong_t type. Placement of this due to <sys/types.h>
  3033. // including <sys/select.h> which relies on the presense of the itimerval
  3034. // structure.
  3035. // CDDL HEADER START
  3036. //
  3037. // The contents of this file are subject to the terms of the
  3038. // Common Development and Distribution License (the "License").
  3039. // You may not use this file except in compliance with the License.
  3040. //
  3041. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3042. // or http://www.opensolaris.org/os/licensing.
  3043. // See the License for the specific language governing permissions
  3044. // and limitations under the License.
  3045. //
  3046. // When distributing Covered Code, include this CDDL HEADER in each
  3047. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3048. // If applicable, add the following below this CDDL HEADER, with the
  3049. // fields enclosed by brackets "[]" replaced with your own identifying
  3050. // information: Portions Copyright [yyyy] [name of copyright owner]
  3051. //
  3052. // CDDL HEADER END
  3053. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  3054. // All Rights Reserved
  3055. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  3056. // Use is subject to license terms.
  3057. //
  3058. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  3059. // Copyright 2016 Joyent, Inc.
  3060. // Copyright 2021 Oxide Computer Company
  3061. // Operations on timevals.
  3062. // Names of the interval timers, and structure
  3063. // defining a timer setting.
  3064. // time and when system is running on
  3065. // behalf of the process.
  3066. // time profiling of multithreaded
  3067. // programs.
  3068. type Itimerval = struct {
  3069. Fit_interval struct {
  3070. Ftv_sec int64
  3071. Ftv_usec int64
  3072. }
  3073. Fit_value struct {
  3074. Ftv_sec int64
  3075. Ftv_usec int64
  3076. }
  3077. } /* time.h:209:1 */
  3078. // Definitions for commonly used resolutions.
  3079. // Time expressed as a 64-bit nanosecond counter.
  3080. type Hrtime_t = int64 /* time.h:265:20 */
  3081. // The inclusion of <time.h> is historical and was added for
  3082. // backward compatibility in delta 1.2 when a number of definitions
  3083. // were moved out of <sys/time.h>. More recently, the timespec and
  3084. // itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
  3085. // _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
  3086. // which is now included by <time.h>. This change was due to POSIX
  3087. // 1003.1b-1993 and X/Open UNIX 98 requirements. For non-POSIX and
  3088. // non-X/Open applications, including this header will still make
  3089. // visible these definitions.
  3090. // CDDL HEADER START
  3091. //
  3092. // The contents of this file are subject to the terms of the
  3093. // Common Development and Distribution License (the "License").
  3094. // You may not use this file except in compliance with the License.
  3095. //
  3096. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3097. // or http://www.opensolaris.org/os/licensing.
  3098. // See the License for the specific language governing permissions
  3099. // and limitations under the License.
  3100. //
  3101. // When distributing Covered Code, include this CDDL HEADER in each
  3102. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3103. // If applicable, add the following below this CDDL HEADER, with the
  3104. // fields enclosed by brackets "[]" replaced with your own identifying
  3105. // information: Portions Copyright [yyyy] [name of copyright owner]
  3106. //
  3107. // CDDL HEADER END
  3108. // Copyright (c) 1988 AT&T
  3109. // All Rights Reserved
  3110. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  3111. //
  3112. // Copyright 2007 Sun Microsystems, Inc. All rights reserved.
  3113. // Use is subject to license terms.
  3114. // Copyright 2010 Nexenta Systems, Inc. Al rights reserved.
  3115. // Copyright 2016 Joyent, Inc.
  3116. // DO NOT EDIT THIS FILE.
  3117. //
  3118. // It has been auto-edited by fixincludes from:
  3119. //
  3120. // "/usr/include/sys/feature_tests.h"
  3121. //
  3122. // This had to be done to correct non-standard usages in the
  3123. // original, manufacturer supplied header file.
  3124. // CDDL HEADER START
  3125. //
  3126. // The contents of this file are subject to the terms of the
  3127. // Common Development and Distribution License (the "License").
  3128. // You may not use this file except in compliance with the License.
  3129. //
  3130. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3131. // or http://www.opensolaris.org/os/licensing.
  3132. // See the License for the specific language governing permissions
  3133. // and limitations under the License.
  3134. //
  3135. // When distributing Covered Code, include this CDDL HEADER in each
  3136. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3137. // If applicable, add the following below this CDDL HEADER, with the
  3138. // fields enclosed by brackets "[]" replaced with your own identifying
  3139. // information: Portions Copyright [yyyy] [name of copyright owner]
  3140. //
  3141. // CDDL HEADER END
  3142. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  3143. // Copyright 2016 Joyent, Inc.
  3144. // Copyright 2022 Oxide Computer Company
  3145. //
  3146. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  3147. // Use is subject to license terms.
  3148. // CDDL HEADER START
  3149. //
  3150. // The contents of this file are subject to the terms of the
  3151. // Common Development and Distribution License, Version 1.0 only
  3152. // (the "License"). You may not use this file except in compliance
  3153. // with the License.
  3154. //
  3155. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3156. // or http://www.opensolaris.org/os/licensing.
  3157. // See the License for the specific language governing permissions
  3158. // and limitations under the License.
  3159. //
  3160. // When distributing Covered Code, include this CDDL HEADER in each
  3161. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3162. // If applicable, add the following below this CDDL HEADER, with the
  3163. // fields enclosed by brackets "[]" replaced with your own identifying
  3164. // information: Portions Copyright [yyyy] [name of copyright owner]
  3165. //
  3166. // CDDL HEADER END
  3167. // Copyright (c) 1988 AT&T
  3168. // All Rights Reserved
  3169. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  3170. // Copyright 2014 PALO, Richard.
  3171. //
  3172. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  3173. // Use is subject to license terms.
  3174. // An application should not include this header directly. Instead it
  3175. // should be included only through the inclusion of other Sun headers.
  3176. //
  3177. // The contents of this header is limited to identifiers specified in the
  3178. // C Standard. Any new identifiers specified in future amendments to the
  3179. // C Standard must be placed in this header. If these new identifiers
  3180. // are required to also be in the C++ Standard "std" namespace, then for
  3181. // anything other than macro definitions, corresponding "using" directives
  3182. // must also be added to <time.h.h>.
  3183. // DO NOT EDIT THIS FILE.
  3184. //
  3185. // It has been auto-edited by fixincludes from:
  3186. //
  3187. // "/usr/include/sys/feature_tests.h"
  3188. //
  3189. // This had to be done to correct non-standard usages in the
  3190. // original, manufacturer supplied header file.
  3191. // CDDL HEADER START
  3192. //
  3193. // The contents of this file are subject to the terms of the
  3194. // Common Development and Distribution License (the "License").
  3195. // You may not use this file except in compliance with the License.
  3196. //
  3197. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3198. // or http://www.opensolaris.org/os/licensing.
  3199. // See the License for the specific language governing permissions
  3200. // and limitations under the License.
  3201. //
  3202. // When distributing Covered Code, include this CDDL HEADER in each
  3203. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3204. // If applicable, add the following below this CDDL HEADER, with the
  3205. // fields enclosed by brackets "[]" replaced with your own identifying
  3206. // information: Portions Copyright [yyyy] [name of copyright owner]
  3207. //
  3208. // CDDL HEADER END
  3209. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  3210. // Copyright 2016 Joyent, Inc.
  3211. // Copyright 2022 Oxide Computer Company
  3212. //
  3213. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  3214. // Use is subject to license terms.
  3215. // This file and its contents are supplied under the terms of the
  3216. // Common Development and Distribution License ("CDDL"), version 1.0.
  3217. // You may only use this file in accordance with the terms of version
  3218. // 1.0 of the CDDL.
  3219. //
  3220. // A full copy of the text of the CDDL should have accompanied this
  3221. // source. A copy of the CDDL is also available via the Internet at
  3222. // http://www.illumos.org/license/CDDL.
  3223. // Copyright 2014-2016 PALO, Richard.
  3224. // DO NOT EDIT THIS FILE.
  3225. //
  3226. // It has been auto-edited by fixincludes from:
  3227. //
  3228. // "/usr/include/sys/feature_tests.h"
  3229. //
  3230. // This had to be done to correct non-standard usages in the
  3231. // original, manufacturer supplied header file.
  3232. // CDDL HEADER START
  3233. //
  3234. // The contents of this file are subject to the terms of the
  3235. // Common Development and Distribution License (the "License").
  3236. // You may not use this file except in compliance with the License.
  3237. //
  3238. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3239. // or http://www.opensolaris.org/os/licensing.
  3240. // See the License for the specific language governing permissions
  3241. // and limitations under the License.
  3242. //
  3243. // When distributing Covered Code, include this CDDL HEADER in each
  3244. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3245. // If applicable, add the following below this CDDL HEADER, with the
  3246. // fields enclosed by brackets "[]" replaced with your own identifying
  3247. // information: Portions Copyright [yyyy] [name of copyright owner]
  3248. //
  3249. // CDDL HEADER END
  3250. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  3251. // Copyright 2016 Joyent, Inc.
  3252. // Copyright 2022 Oxide Computer Company
  3253. //
  3254. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  3255. // Use is subject to license terms.
  3256. // POSIX.1-2008 requires that the NULL macro be cast to type void *.
  3257. type Tm = struct {
  3258. Ftm_sec int32
  3259. Ftm_min int32
  3260. Ftm_hour int32
  3261. Ftm_mday int32
  3262. Ftm_mon int32
  3263. Ftm_year int32
  3264. Ftm_wday int32
  3265. Ftm_yday int32
  3266. Ftm_isdst int32
  3267. } /* time_iso.h:80:1 */
  3268. // Neither X/Open nor POSIX allow the inclusion of <signal.h> for the
  3269. // definition of the sigevent structure. Both require the inclusion
  3270. // of <signal.h> and <time.h> when using the timer_create() function.
  3271. // However, X/Open also specifies that the sigevent structure be defined
  3272. // in <time.h> as described in the header <signal.h>. This prevents
  3273. // compiler warnings for applications that only include <time.h> and not
  3274. // also <signal.h>. The sigval union and the sigevent structure is
  3275. // therefore defined both here and in <sys/siginfo.h> which gets included
  3276. // via inclusion of <signal.h>.
  3277. type Sigval = struct {
  3278. F__ccgo_pad1 [0]uint64
  3279. Fsival_int int32
  3280. F__ccgo_pad2 [4]byte
  3281. } /* time.h:125:1 */
  3282. type Sigevent = struct {
  3283. Fsigev_notify int32
  3284. Fsigev_signo int32
  3285. Fsigev_value struct {
  3286. F__ccgo_pad1 [0]uint64
  3287. Fsival_int int32
  3288. F__ccgo_pad2 [4]byte
  3289. }
  3290. Fsigev_notify_function uintptr
  3291. Fsigev_notify_attributes uintptr
  3292. F__sigev_pad2 int32
  3293. F__ccgo_pad1 [4]byte
  3294. } /* time.h:133:1 */
  3295. type Locale_t = uintptr /* time.h:292:24 */
  3296. // The inclusion of <sys/select.h> is needed for the FD_CLR,
  3297. // FD_ISSET, FD_SET, and FD_SETSIZE macros as well as the
  3298. // select() prototype defined in the XOpen specifications
  3299. // beginning with XSH4v2. Placement required after definition
  3300. // for itimerval.
  3301. // CDDL HEADER START
  3302. //
  3303. // The contents of this file are subject to the terms of the
  3304. // Common Development and Distribution License (the "License").
  3305. // You may not use this file except in compliance with the License.
  3306. //
  3307. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3308. // or http://www.opensolaris.org/os/licensing.
  3309. // See the License for the specific language governing permissions
  3310. // and limitations under the License.
  3311. //
  3312. // When distributing Covered Code, include this CDDL HEADER in each
  3313. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3314. // If applicable, add the following below this CDDL HEADER, with the
  3315. // fields enclosed by brackets "[]" replaced with your own identifying
  3316. // information: Portions Copyright [yyyy] [name of copyright owner]
  3317. //
  3318. // CDDL HEADER END
  3319. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  3320. //
  3321. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  3322. //
  3323. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  3324. // Use is subject to license terms.
  3325. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  3326. // All Rights Reserved
  3327. // University Copyright- Copyright (c) 1982, 1986, 1988
  3328. // The Regents of the University of California
  3329. // All Rights Reserved
  3330. //
  3331. // University Acknowledgment- Portions of this document are derived from
  3332. // software developed by the University of California, Berkeley, and its
  3333. // contributors.
  3334. // The sigset_t type is defined in <sys/signal.h> and duplicated
  3335. // in <sys/ucontext.h> as a result of XPG4v2 requirements. XPG6
  3336. // now allows the visibility of signal.h in this header, however
  3337. // an order of inclusion problem occurs as a result of inclusion
  3338. // of <sys/select.h> in <signal.h> under certain conditions.
  3339. // Rather than include <sys/signal.h> here, we've duplicated
  3340. // the sigset_t type instead. This type is required for the XPG6
  3341. // introduced pselect() function also declared in this header.
  3342. type Sigset_t = struct{ F__sigbits [4]uint32 } /* select.h:76:3 */
  3343. // Select uses bit masks of file descriptors in longs.
  3344. // These macros manipulate such bit fields.
  3345. // FD_SETSIZE may be defined by the user, but the default here
  3346. // should be >= RLIM_FD_MAX.
  3347. type Fd_mask = int64 /* select.h:92:14 */
  3348. type Fds_mask = int64 /* select.h:94:14 */
  3349. // The value of _NBBY needs to be consistant with the value
  3350. // of NBBY in <sys/param.h>.
  3351. type Fd_set1 = struct{ Ffds_bits [1024]int64 } /* select.h:120:9 */
  3352. // The value of _NBBY needs to be consistant with the value
  3353. // of NBBY in <sys/param.h>.
  3354. type Fd_set = Fd_set1 /* select.h:125:3 */
  3355. // _VOID was defined to be either void or char but this is not
  3356. // required because previous SunOS compilers have accepted the void
  3357. // type. However, because many system header and source files use the
  3358. // void keyword, the volatile keyword, and ANSI C function prototypes,
  3359. // non-ANSI compilers cannot compile the system anyway. The _VOID macro
  3360. // should therefore not be used and remains for source compatibility
  3361. // only.
  3362. // CSTYLED
  3363. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  3364. // Use is subject to license terms.
  3365. //
  3366. // Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  3367. // Copyright 2015, Joyent, Inc.
  3368. // Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  3369. // Copyright (c) 1982, 1986 Regents of the University of California.
  3370. // All rights reserved.
  3371. //
  3372. // Redistribution and use in source and binary forms are permitted
  3373. // provided that this notice is preserved and that due credit is given
  3374. // to the University of California at Berkeley. The name of the University
  3375. // may not be used to endorse or promote products derived from this
  3376. // software without specific prior written permission. This software
  3377. // is provided ``as is'' without express or implied warranty.
  3378. // Constants and structures defined by the internet system,
  3379. // according to following documents
  3380. //
  3381. // Internet ASSIGNED NUMBERS (RFC1700) and its successors:
  3382. // http://www.iana.org/assignments/protocol-numbers
  3383. // http://www.iana.org/assignments/port-numbers
  3384. // Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
  3385. //
  3386. // DO NOT EDIT THIS FILE.
  3387. //
  3388. // It has been auto-edited by fixincludes from:
  3389. //
  3390. // "/usr/include/sys/feature_tests.h"
  3391. //
  3392. // This had to be done to correct non-standard usages in the
  3393. // original, manufacturer supplied header file.
  3394. // CDDL HEADER START
  3395. //
  3396. // The contents of this file are subject to the terms of the
  3397. // Common Development and Distribution License (the "License").
  3398. // You may not use this file except in compliance with the License.
  3399. //
  3400. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3401. // or http://www.opensolaris.org/os/licensing.
  3402. // See the License for the specific language governing permissions
  3403. // and limitations under the License.
  3404. //
  3405. // When distributing Covered Code, include this CDDL HEADER in each
  3406. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3407. // If applicable, add the following below this CDDL HEADER, with the
  3408. // fields enclosed by brackets "[]" replaced with your own identifying
  3409. // information: Portions Copyright [yyyy] [name of copyright owner]
  3410. //
  3411. // CDDL HEADER END
  3412. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  3413. // Copyright 2016 Joyent, Inc.
  3414. // Copyright 2022 Oxide Computer Company
  3415. //
  3416. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  3417. // Use is subject to license terms.
  3418. // CDDL HEADER START
  3419. //
  3420. // The contents of this file are subject to the terms of the
  3421. // Common Development and Distribution License (the "License").
  3422. // You may not use this file except in compliance with the License.
  3423. //
  3424. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3425. // or http://www.opensolaris.org/os/licensing.
  3426. // See the License for the specific language governing permissions
  3427. // and limitations under the License.
  3428. //
  3429. // When distributing Covered Code, include this CDDL HEADER in each
  3430. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3431. // If applicable, add the following below this CDDL HEADER, with the
  3432. // fields enclosed by brackets "[]" replaced with your own identifying
  3433. // information: Portions Copyright [yyyy] [name of copyright owner]
  3434. //
  3435. // CDDL HEADER END
  3436. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  3437. // All Rights Reserved
  3438. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  3439. // Use is subject to license terms.
  3440. //
  3441. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  3442. // Copyright 2016 Joyent, Inc.
  3443. // Copyright 2021 Oxide Computer Company
  3444. // CDDL HEADER START
  3445. //
  3446. // The contents of this file are subject to the terms of the
  3447. // Common Development and Distribution License (the "License").
  3448. // You may not use this file except in compliance with the License.
  3449. //
  3450. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3451. // or http://www.opensolaris.org/os/licensing.
  3452. // See the License for the specific language governing permissions
  3453. // and limitations under the License.
  3454. //
  3455. // When distributing Covered Code, include this CDDL HEADER in each
  3456. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3457. // If applicable, add the following below this CDDL HEADER, with the
  3458. // fields enclosed by brackets "[]" replaced with your own identifying
  3459. // information: Portions Copyright [yyyy] [name of copyright owner]
  3460. //
  3461. // CDDL HEADER END
  3462. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  3463. // Use is subject to license terms.
  3464. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  3465. // All Rights Reserved
  3466. // Portions of this source code were derived from Berkeley 4.3 BSD
  3467. // under license from the Regents of the University of California.
  3468. type Sa_family_t = uint16 /* socket_impl.h:43:18 */
  3469. // Structure used by kernel to store most
  3470. // addresses.
  3471. type Sockaddr = struct {
  3472. Fsa_family uint16
  3473. Fsa_data [14]int8
  3474. } /* socket_impl.h:50:1 */
  3475. // CDDL HEADER START
  3476. //
  3477. // The contents of this file are subject to the terms of the
  3478. // Common Development and Distribution License (the "License").
  3479. // You may not use this file except in compliance with the License.
  3480. //
  3481. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3482. // or http://www.opensolaris.org/os/licensing.
  3483. // See the License for the specific language governing permissions
  3484. // and limitations under the License.
  3485. //
  3486. // When distributing Covered Code, include this CDDL HEADER in each
  3487. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3488. // If applicable, add the following below this CDDL HEADER, with the
  3489. // fields enclosed by brackets "[]" replaced with your own identifying
  3490. // information: Portions Copyright [yyyy] [name of copyright owner]
  3491. //
  3492. // CDDL HEADER END
  3493. // Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
  3494. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  3495. // All Rights Reserved
  3496. // University Copyright- Copyright (c) 1982, 1986, 1988
  3497. // The Regents of the University of California
  3498. // All Rights Reserved
  3499. //
  3500. // University Acknowledgment- Portions of this document are derived from
  3501. // software developed by the University of California, Berkeley, and its
  3502. // contributors.
  3503. // Definitions for UNIX IPC domain.
  3504. type Sockaddr_un = struct {
  3505. Fsun_family uint16
  3506. Fsun_path [108]int8
  3507. } /* un.h:53:1 */
  3508. // Copyright 1993-2003 Sun Microsystems, Inc. All rights reserved.
  3509. // Use is subject to license terms.
  3510. // Copyright (c) 1990, 1993
  3511. // The Regents of the University of California. All rights reserved.
  3512. //
  3513. // Redistribution and use in source and binary forms, with or without
  3514. // modification, are permitted provided that the following conditions
  3515. // are met:
  3516. // 1. Redistributions of source code must retain the above copyright
  3517. // notice, this list of conditions and the following disclaimer.
  3518. // 2. Redistributions in binary form must reproduce the above copyright
  3519. // notice, this list of conditions and the following disclaimer in the
  3520. // documentation and/or other materials provided with the distribution.
  3521. // 3. All advertising materials mentioning features or use of this software
  3522. // must display the following acknowledgement:
  3523. // This product includes software developed by the University of
  3524. // California, Berkeley and its contributors.
  3525. // 4. Neither the name of the University nor the names of its contributors
  3526. // may be used to endorse or promote products derived from this software
  3527. // without specific prior written permission.
  3528. //
  3529. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  3530. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3531. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3532. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  3533. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3534. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3535. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3536. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3537. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3538. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3539. // SUCH DAMAGE.
  3540. // from UCB 8.1 (Berkeley) 6/10/93
  3541. // A Link-Level Sockaddr may specify the interface in one of two
  3542. // ways: either by means of a system-provided index number (computed
  3543. // anew and possibly differently on every reboot), or by a human-readable
  3544. // string such as "il0" (for managerial convenience).
  3545. //
  3546. // Census taking actions, such as something akin to SIOCGCONF would return
  3547. // both the index and the human name.
  3548. //
  3549. // High volume transactions (such as giving a link-level ``from'' address
  3550. // in a recvfrom or recvmsg call) may be likely only to provide the indexed
  3551. // form, (which requires fewer copy operations and less space).
  3552. //
  3553. // The form and interpretation of the link-level address is purely a matter
  3554. // of convention between the device driver and its consumers; however, it is
  3555. // expected that all drivers for an interface of a given if_type will agree.
  3556. // Structure of a Link-Level sockaddr:
  3557. type Sockaddr_dl = struct {
  3558. Fsdl_family uint16
  3559. Fsdl_index uint16
  3560. Fsdl_type uint8
  3561. Fsdl_nlen uint8
  3562. Fsdl_alen uint8
  3563. Fsdl_slen uint8
  3564. Fsdl_data [244]int8
  3565. } /* if_dl.h:68:1 */
  3566. // sockaddr_storage:
  3567. // Common superset of at least AF_INET, AF_INET6 and AF_LINK sockaddr
  3568. // structures. Has sufficient size and alignment for those sockaddrs.
  3569. // Desired maximum size, alignment size and related types.
  3570. // To represent desired sockaddr max alignment for platform, a
  3571. // type is chosen which may depend on implementation platform architecture.
  3572. // Type chosen based on alignment size restrictions from <sys/isa_defs.h>.
  3573. // We desire to force up to (but no more than) 64-bit (8 byte) alignment,
  3574. // on platforms where it is possible to do so. (e.g not possible on ia32).
  3575. // For all currently supported platforms by our implementation
  3576. // in <sys/isa_defs.h>, (i.e. sparc, sparcv9, ia32, ia64)
  3577. // type "double" is suitable for that intent.
  3578. //
  3579. // Note: Type "double" is chosen over the more obvious integer type int64_t.
  3580. //
  3581. // int64_t is not a valid type for strict ANSI/ISO C compilation on ILP32.
  3582. type Sockaddr_maxalign_t = float64 /* socket_impl.h:85:17 */
  3583. // Definitions used for sockaddr_storage structure paddings design.
  3584. type Sockaddr_storage = struct {
  3585. Fss_family uint16
  3586. F_ss_pad1 [6]int8
  3587. F_ss_align float64
  3588. F_ss_pad2 [240]int8
  3589. } /* socket_impl.h:96:1 */
  3590. // To be compatible with the Linux interfaces used, this structure is
  3591. // placed in socket_impl.h so that an include for <sys/socket.h> will
  3592. // pickup this structure. This structure is for use with PF_PACKET
  3593. // sockets.
  3594. type Sockaddr_ll = struct {
  3595. Fsll_family uint16
  3596. Fsll_protocol uint16
  3597. Fsll_ifindex int32
  3598. Fsll_hatype uint16
  3599. Fsll_pkttype uint8
  3600. Fsll_halen uint8
  3601. Fsll_addr [8]uint8
  3602. } /* socket_impl.h:111:1 */
  3603. // The socklen definitions are reproduced here from sys/socket.h so as to
  3604. // not introduce that namespace into existing users of netinet/in.h.
  3605. type Socklen_t = uint32 /* in.h:57:18 */
  3606. type Psocklen_t = uintptr /* in.h:63:15 */
  3607. // Symbols such as htonl() are required to be exposed through this file,
  3608. // per XNS Issue 5. This is achieved by inclusion of <sys/byteorder.h>
  3609. // CDDL HEADER START
  3610. //
  3611. // The contents of this file are subject to the terms of the
  3612. // Common Development and Distribution License (the "License").
  3613. // You may not use this file except in compliance with the License.
  3614. //
  3615. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3616. // or http://www.opensolaris.org/os/licensing.
  3617. // See the License for the specific language governing permissions
  3618. // and limitations under the License.
  3619. //
  3620. // When distributing Covered Code, include this CDDL HEADER in each
  3621. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3622. // If applicable, add the following below this CDDL HEADER, with the
  3623. // fields enclosed by brackets "[]" replaced with your own identifying
  3624. // information: Portions Copyright [yyyy] [name of copyright owner]
  3625. //
  3626. // CDDL HEADER END
  3627. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  3628. // Use is subject to license terms.
  3629. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  3630. // All Rights Reserved
  3631. // University Copyright- Copyright (c) 1982, 1986, 1988
  3632. // The Regents of the University of California
  3633. // All Rights Reserved
  3634. //
  3635. // University Acknowledgment- Portions of this document are derived from
  3636. // software developed by the University of California, Berkeley, and its
  3637. // contributors.
  3638. // CDDL HEADER START
  3639. //
  3640. // The contents of this file are subject to the terms of the
  3641. // Common Development and Distribution License (the "License").
  3642. // You may not use this file except in compliance with the License.
  3643. //
  3644. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3645. // or http://www.opensolaris.org/os/licensing.
  3646. // See the License for the specific language governing permissions
  3647. // and limitations under the License.
  3648. //
  3649. //
  3650. // When distributing Covered Code, include this CDDL HEADER in each
  3651. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3652. // If applicable, add the following below this CDDL HEADER, with the
  3653. // fields enclosed by brackets "[]" replaced with your own identifying
  3654. // information: Portions Copyright [yyyy] [name of copyright owner]
  3655. //
  3656. // CDDL HEADER END
  3657. // Copyright 2008 Sun Microsystems, Inc. All rights reserved.
  3658. // Use is subject to license terms.
  3659. // Copyright 2016 Joyent, Inc.
  3660. // CDDL HEADER START
  3661. //
  3662. // The contents of this file are subject to the terms of the
  3663. // Common Development and Distribution License, Version 1.0 only
  3664. // (the "License"). You may not use this file except in compliance
  3665. // with the License.
  3666. //
  3667. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  3668. // or http://www.opensolaris.org/os/licensing.
  3669. // See the License for the specific language governing permissions
  3670. // and limitations under the License.
  3671. //
  3672. // When distributing Covered Code, include this CDDL HEADER in each
  3673. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  3674. // If applicable, add the following below this CDDL HEADER, with the
  3675. // fields enclosed by brackets "[]" replaced with your own identifying
  3676. // information: Portions Copyright [yyyy] [name of copyright owner]
  3677. //
  3678. // CDDL HEADER END
  3679. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  3680. //
  3681. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  3682. // Use is subject to license terms.
  3683. // macros for conversion between host and (internet) network byte order
  3684. type In_port_t = uint16 /* byteorder.h:74:18 */
  3685. type In_addr_t = uint32 /* byteorder.h:79:18 */
  3686. // Macros to reverse byte order
  3687. // Macros to convert from a specific byte order to/from native byte order
  3688. // Macros to read unaligned values from a specific byte order to
  3689. // native byte order
  3690. // Macros to write unaligned values from native byte order to a specific byte
  3691. // order.
  3692. // Note: IPv4 address data structures usage conventions.
  3693. // The "in_addr_t" type below (required by Unix standards)
  3694. // is NOT a typedef of "struct in_addr" and violates the usual
  3695. // conventions where "struct <name>" and <name>_t are corresponding
  3696. // typedefs.
  3697. // To minimize confusion, kernel data structures/usage prefers use
  3698. // of "ipaddr_t" as atomic uint32_t type and avoid using "in_addr_t"
  3699. // The user level APIs continue to follow the historic popular
  3700. // practice of using "struct in_addr".
  3701. type Ipaddr_t = uint32 /* in.h:99:18 */
  3702. type In6_addr = struct {
  3703. F_S6_un struct {
  3704. F__ccgo_pad1 [0]uint32
  3705. F_S6_u8 [16]uint8
  3706. }
  3707. } /* in.h:104:1 */
  3708. type In6_addr_t = In6_addr /* in.h:137:25 */
  3709. // Protocols
  3710. //
  3711. // Some of these constant names are copied for the DTrace IP provider in
  3712. // usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
  3713. // in sync.
  3714. // Transmission Protocol
  3715. // Port/socket numbers: network standard functions
  3716. //
  3717. // Entries should exist here for each port number compiled into an ON
  3718. // component, such as snoop.
  3719. // Port/socket numbers: host specific functions
  3720. // Internet Key Exchange (IKE) ports
  3721. // UNIX TCP sockets
  3722. // UNIX UDP sockets
  3723. // DHCPv6 UDP ports
  3724. // Ports < IPPORT_RESERVED are reserved for
  3725. // privileged processes (e.g. root).
  3726. // Ports > IPPORT_USERRESERVED are reserved
  3727. // for servers, not necessarily privileged.
  3728. // Link numbers
  3729. // IPv4 Internet address
  3730. // This definition contains obsolete fields for compatibility
  3731. // with SunOS 3.x and 4.2bsd. The presence of subnets renders
  3732. // divisions into fixed fields misleading at best. New code
  3733. // should use only the s_addr field.
  3734. type In_addr = struct {
  3735. FS_un struct {
  3736. F__ccgo_pad1 [0]uint32
  3737. FS_un_b struct {
  3738. Fs_b1 uint8
  3739. Fs_b2 uint8
  3740. Fs_b3 uint8
  3741. Fs_b4 uint8
  3742. }
  3743. }
  3744. } /* in.h:301:1 */
  3745. // Definitions of bits in internet address integers.
  3746. // On subnets, the decomposition of addresses to host and net parts
  3747. // is done according to subnet mask, not the masks here.
  3748. //
  3749. // Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB,
  3750. // IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto
  3751. // obsolete". IN_MULTICAST macro should be used to test if a address
  3752. // is a multicast address.
  3753. // We have removed CLASS E checks from the kernel
  3754. // But we preserve these defines for userland in order
  3755. // to avoid compile breakage of some 3rd party piece of software
  3756. // Scoped IPv4 prefixes (in host byte-order)
  3757. // RFC 3927 IPv4 link local address (i in host byte-order)
  3758. // Well known 6to4 Relay Router Anycast address defined in RFC 3068
  3759. // Define a macro to stuff the loopback address into an Internet address
  3760. // IPv4 Socket address.
  3761. type Sockaddr_in = struct {
  3762. Fsin_family uint16
  3763. Fsin_port uint16
  3764. Fsin_addr struct {
  3765. FS_un struct {
  3766. F__ccgo_pad1 [0]uint32
  3767. FS_un_b struct {
  3768. Fs_b1 uint8
  3769. Fs_b2 uint8
  3770. Fs_b3 uint8
  3771. Fs_b4 uint8
  3772. }
  3773. }
  3774. }
  3775. Fsin_zero [8]int8
  3776. } /* in.h:409:1 */
  3777. // IPv6 socket address.
  3778. type Sockaddr_in6 = struct {
  3779. Fsin6_family uint16
  3780. Fsin6_port uint16
  3781. Fsin6_flowinfo uint32
  3782. Fsin6_addr struct {
  3783. F_S6_un struct {
  3784. F__ccgo_pad1 [0]uint32
  3785. F_S6_u8 [16]uint8
  3786. }
  3787. }
  3788. Fsin6_scope_id uint32
  3789. F__sin6_src_id uint32
  3790. } /* in.h:424:1 */
  3791. // Macros for accessing the traffic class and flow label fields from
  3792. // sin6_flowinfo.
  3793. // These are designed to be applied to a 32-bit value.
  3794. // masks
  3795. // Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
  3796. // use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
  3797. // only. They need to be different for User/Kernel versions because union
  3798. // component data structure is defined differently (it is identical at
  3799. // binary representation level).
  3800. //
  3801. // const struct in6_addr IN6ADDR_ANY_INIT;
  3802. // const struct in6_addr IN6ADDR_LOOPBACK_INIT;
  3803. // RFC 2553 specifies the following macros. Their type is defined
  3804. // as "int" in the RFC but they only have boolean significance
  3805. // (zero or non-zero). For the purposes of our comment notation,
  3806. // we assume a hypothetical type "bool" defined as follows to
  3807. // write the prototypes assumed for macros in our comments better.
  3808. //
  3809. // typedef int bool;
  3810. // IN6 macros used to test for special IPv6 addresses
  3811. // (Mostly from spec)
  3812. //
  3813. // bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
  3814. // bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *);
  3815. // bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *);
  3816. // bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *);
  3817. // bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *);
  3818. // bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *);
  3819. // bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
  3820. // bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
  3821. // bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
  3822. // bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
  3823. // bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
  3824. // bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
  3825. // bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
  3826. // bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
  3827. // bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553
  3828. // bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
  3829. // const struct in6_addr *); -- Not from RFC2553
  3830. // bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553
  3831. // IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
  3832. // Note: This macro is currently NOT defined in RFC2553 specification
  3833. // and not a standard macro that portable applications should use.
  3834. // Exclude loopback and unspecified address
  3835. // Note:
  3836. // IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
  3837. // specification and not a standard macro that portable applications
  3838. // should use.
  3839. // The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
  3840. // RFC, and shouldn't be used by portable applications. It is used to see
  3841. // if an address is a solicited-node multicast address, which is prefixed
  3842. // with ff02:0:0:0:0:1:ff00::/104.
  3843. // Macros to a) test for 6to4 IPv6 address, and b) to test if two
  3844. // 6to4 addresses have the same /48 prefix, and, hence, are from the
  3845. // same 6to4 site.
  3846. // IN6_IS_ADDR_LINKSCOPE
  3847. // Identifies an address as being either link-local, link-local multicast or
  3848. // node-local multicast. All types of addresses are considered to be unique
  3849. // within the scope of a given link.
  3850. // Useful utility macros for operations with IPv6 addresses
  3851. // Note: These macros are NOT defined in the RFC2553 or any other
  3852. // standard specification and are not standard macros that portable
  3853. // applications should use.
  3854. // IN6_V4MAPPED_TO_INADDR
  3855. // IN6_V4MAPPED_TO_IPADDR
  3856. // Assign a IPv4-Mapped IPv6 address to an IPv4 address.
  3857. // Note: These macros are NOT defined in RFC2553 or any other standard
  3858. // specification and are not macros that portable applications should
  3859. // use.
  3860. //
  3861. // void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
  3862. // void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
  3863. //
  3864. // IN6_INADDR_TO_V4MAPPED
  3865. // IN6_IPADDR_TO_V4MAPPED
  3866. // Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
  3867. // address.
  3868. // Note: These macros are NOT defined in RFC2553 or any other standard
  3869. // specification and are not macros that portable applications should
  3870. // use.
  3871. //
  3872. // void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
  3873. // void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
  3874. //
  3875. // IN6_6TO4_TO_V4ADDR
  3876. // Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
  3877. // address.
  3878. // Note: This macro is NOT defined in RFC2553 or any other standard
  3879. // specification and is not a macro that portable applications should
  3880. // use.
  3881. // Note: we don't use the IPADDR form of the macro because we need
  3882. // to do a bytewise copy; the V4ADDR in the 6to4 address is not
  3883. // 32-bit aligned.
  3884. //
  3885. // void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
  3886. //
  3887. // IN6_V4ADDR_TO_6TO4
  3888. // Given an IPv4 address and an IPv6 address for output, a 6to4 address
  3889. // will be created from the IPv4 Address.
  3890. // Note: This method for creating 6to4 addresses is not standardized
  3891. // outside of Solaris. The newly created 6to4 address will be of the form
  3892. // 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
  3893. // HOSTID will equal 1.
  3894. //
  3895. // void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
  3896. //
  3897. // IN6_ARE_ADDR_EQUAL (defined in RFC2292)
  3898. // Compares if IPv6 addresses are equal.
  3899. // Note: Compares in order of high likelyhood of a miss so we minimize
  3900. // compares. (Current heuristic order, compare in reverse order of
  3901. // uint32_t units)
  3902. //
  3903. // bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
  3904. // const struct in6_addr *);
  3905. // IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
  3906. // Compares if prefixed parts of IPv6 addresses are equal.
  3907. //
  3908. // uint32_t IN6_MASK_FROM_PREFIX(int, int);
  3909. // bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
  3910. // const struct in6_addr *,
  3911. // int);
  3912. // Options for use with [gs]etsockopt at the IP level.
  3913. //
  3914. // Note: Some of the IP_ namespace has conflict with and
  3915. // and is exposed through <xti.h>. (It also requires exposing
  3916. // options not implemented). The options with potential
  3917. // for conflicts use #ifndef guards.
  3918. // IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
  3919. // is used to differentiate b/w the two.
  3920. // Different preferences that can be requested from IPSEC protocols.
  3921. // This can be used with the setsockopt() call to set per socket security
  3922. // options. When the application uses per-socket API, we will reflect
  3923. // the request on both outbound and inbound packets.
  3924. type Ipsec_req = struct {
  3925. Fipsr_ah_req uint32
  3926. Fipsr_esp_req uint32
  3927. Fipsr_self_encap_req uint32
  3928. Fipsr_auth_alg uint8
  3929. Fipsr_esp_alg uint8
  3930. Fipsr_esp_auth_alg uint8
  3931. F__ccgo_pad1 [1]byte
  3932. } /* in.h:950:9 */
  3933. // Macros for accessing the traffic class and flow label fields from
  3934. // sin6_flowinfo.
  3935. // These are designed to be applied to a 32-bit value.
  3936. // masks
  3937. // Note: Macros IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT are for
  3938. // use as RHS of Static initializers of "struct in6_addr" (or in6_addr_t)
  3939. // only. They need to be different for User/Kernel versions because union
  3940. // component data structure is defined differently (it is identical at
  3941. // binary representation level).
  3942. //
  3943. // const struct in6_addr IN6ADDR_ANY_INIT;
  3944. // const struct in6_addr IN6ADDR_LOOPBACK_INIT;
  3945. // RFC 2553 specifies the following macros. Their type is defined
  3946. // as "int" in the RFC but they only have boolean significance
  3947. // (zero or non-zero). For the purposes of our comment notation,
  3948. // we assume a hypothetical type "bool" defined as follows to
  3949. // write the prototypes assumed for macros in our comments better.
  3950. //
  3951. // typedef int bool;
  3952. // IN6 macros used to test for special IPv6 addresses
  3953. // (Mostly from spec)
  3954. //
  3955. // bool IN6_IS_ADDR_UNSPECIFIED (const struct in6_addr *);
  3956. // bool IN6_IS_ADDR_LOOPBACK (const struct in6_addr *);
  3957. // bool IN6_IS_ADDR_MULTICAST (const struct in6_addr *);
  3958. // bool IN6_IS_ADDR_LINKLOCAL (const struct in6_addr *);
  3959. // bool IN6_IS_ADDR_SITELOCAL (const struct in6_addr *);
  3960. // bool IN6_IS_ADDR_V4MAPPED (const struct in6_addr *);
  3961. // bool IN6_IS_ADDR_V4MAPPED_ANY(const struct in6_addr *); -- Not from RFC2553
  3962. // bool IN6_IS_ADDR_V4COMPAT (const struct in6_addr *);
  3963. // bool IN6_IS_ADDR_MC_RESERVED (const struct in6_addr *); -- Not from RFC2553
  3964. // bool IN6_IS_ADDR_MC_NODELOCAL(const struct in6_addr *);
  3965. // bool IN6_IS_ADDR_MC_LINKLOCAL(const struct in6_addr *);
  3966. // bool IN6_IS_ADDR_MC_SITELOCAL(const struct in6_addr *);
  3967. // bool IN6_IS_ADDR_MC_ORGLOCAL (const struct in6_addr *);
  3968. // bool IN6_IS_ADDR_MC_GLOBAL (const struct in6_addr *);
  3969. // bool IN6_IS_ADDR_6TO4 (const struct in6_addr *); -- Not from RFC2553
  3970. // bool IN6_ARE_6TO4_PREFIX_EQUAL(const struct in6_addr *,
  3971. // const struct in6_addr *); -- Not from RFC2553
  3972. // bool IN6_IS_ADDR_LINKSCOPE (const struct in6addr *); -- Not from RFC2553
  3973. // IN6_IS_ADDR_V4MAPPED - A IPv4 mapped INADDR_ANY
  3974. // Note: This macro is currently NOT defined in RFC2553 specification
  3975. // and not a standard macro that portable applications should use.
  3976. // Exclude loopback and unspecified address
  3977. // Note:
  3978. // IN6_IS_ADDR_MC_RESERVED macro is currently NOT defined in RFC2553
  3979. // specification and not a standard macro that portable applications
  3980. // should use.
  3981. // The IN6_IS_ADDR_MC_SOLICITEDNODE macro is not defined in any standard or
  3982. // RFC, and shouldn't be used by portable applications. It is used to see
  3983. // if an address is a solicited-node multicast address, which is prefixed
  3984. // with ff02:0:0:0:0:1:ff00::/104.
  3985. // Macros to a) test for 6to4 IPv6 address, and b) to test if two
  3986. // 6to4 addresses have the same /48 prefix, and, hence, are from the
  3987. // same 6to4 site.
  3988. // IN6_IS_ADDR_LINKSCOPE
  3989. // Identifies an address as being either link-local, link-local multicast or
  3990. // node-local multicast. All types of addresses are considered to be unique
  3991. // within the scope of a given link.
  3992. // Useful utility macros for operations with IPv6 addresses
  3993. // Note: These macros are NOT defined in the RFC2553 or any other
  3994. // standard specification and are not standard macros that portable
  3995. // applications should use.
  3996. // IN6_V4MAPPED_TO_INADDR
  3997. // IN6_V4MAPPED_TO_IPADDR
  3998. // Assign a IPv4-Mapped IPv6 address to an IPv4 address.
  3999. // Note: These macros are NOT defined in RFC2553 or any other standard
  4000. // specification and are not macros that portable applications should
  4001. // use.
  4002. //
  4003. // void IN6_V4MAPPED_TO_INADDR(const in6_addr_t *v6, struct in_addr *v4);
  4004. // void IN6_V4MAPPED_TO_IPADDR(const in6_addr_t *v6, ipaddr_t v4);
  4005. //
  4006. // IN6_INADDR_TO_V4MAPPED
  4007. // IN6_IPADDR_TO_V4MAPPED
  4008. // Assign a IPv4 address address to an IPv6 address as a IPv4-mapped
  4009. // address.
  4010. // Note: These macros are NOT defined in RFC2553 or any other standard
  4011. // specification and are not macros that portable applications should
  4012. // use.
  4013. //
  4014. // void IN6_INADDR_TO_V4MAPPED(const struct in_addr *v4, in6_addr_t *v6);
  4015. // void IN6_IPADDR_TO_V4MAPPED(const ipaddr_t v4, in6_addr_t *v6);
  4016. //
  4017. // IN6_6TO4_TO_V4ADDR
  4018. // Extract the embedded IPv4 address from the prefix to a 6to4 IPv6
  4019. // address.
  4020. // Note: This macro is NOT defined in RFC2553 or any other standard
  4021. // specification and is not a macro that portable applications should
  4022. // use.
  4023. // Note: we don't use the IPADDR form of the macro because we need
  4024. // to do a bytewise copy; the V4ADDR in the 6to4 address is not
  4025. // 32-bit aligned.
  4026. //
  4027. // void IN6_6TO4_TO_V4ADDR(const in6_addr_t *v6, struct in_addr *v4);
  4028. //
  4029. // IN6_V4ADDR_TO_6TO4
  4030. // Given an IPv4 address and an IPv6 address for output, a 6to4 address
  4031. // will be created from the IPv4 Address.
  4032. // Note: This method for creating 6to4 addresses is not standardized
  4033. // outside of Solaris. The newly created 6to4 address will be of the form
  4034. // 2002:<V4ADDR>:<SUBNETID>::<HOSTID>, where SUBNETID will equal 0 and
  4035. // HOSTID will equal 1.
  4036. //
  4037. // void IN6_V4ADDR_TO_6TO4(const struct in_addr *v4, in6_addr_t *v6)
  4038. //
  4039. // IN6_ARE_ADDR_EQUAL (defined in RFC2292)
  4040. // Compares if IPv6 addresses are equal.
  4041. // Note: Compares in order of high likelyhood of a miss so we minimize
  4042. // compares. (Current heuristic order, compare in reverse order of
  4043. // uint32_t units)
  4044. //
  4045. // bool IN6_ARE_ADDR_EQUAL(const struct in6_addr *,
  4046. // const struct in6_addr *);
  4047. // IN6_ARE_PREFIXEDADDR_EQUAL (not defined in RFCs)
  4048. // Compares if prefixed parts of IPv6 addresses are equal.
  4049. //
  4050. // uint32_t IN6_MASK_FROM_PREFIX(int, int);
  4051. // bool IN6_ARE_PREFIXEDADDR_EQUAL(const struct in6_addr *,
  4052. // const struct in6_addr *,
  4053. // int);
  4054. // Options for use with [gs]etsockopt at the IP level.
  4055. //
  4056. // Note: Some of the IP_ namespace has conflict with and
  4057. // and is exposed through <xti.h>. (It also requires exposing
  4058. // options not implemented). The options with potential
  4059. // for conflicts use #ifndef guards.
  4060. // IP_PKTINFO and IP_RECVPKTINFO have same value. Size of argument passed in
  4061. // is used to differentiate b/w the two.
  4062. // Different preferences that can be requested from IPSEC protocols.
  4063. // This can be used with the setsockopt() call to set per socket security
  4064. // options. When the application uses per-socket API, we will reflect
  4065. // the request on both outbound and inbound packets.
  4066. type Ipsec_req_t = Ipsec_req /* in.h:957:3 */
  4067. // MCAST_* options are protocol-independent. The actual definitions
  4068. // are with the v6 options below; this comment is here to note the
  4069. // namespace usage.
  4070. //
  4071. // #define MCAST_JOIN_GROUP 0x29
  4072. // #define MCAST_LEAVE_GROUP 0x2a
  4073. // #define MCAST_BLOCK_SOURCE 0x2b
  4074. // #define MCAST_UNBLOCK_SOURCE 0x2c
  4075. // #define MCAST_JOIN_SOURCE_GROUP 0x2d
  4076. // #define MCAST_LEAVE_SOURCE_GROUP 0x2e
  4077. // SunOS private (potentially not portable) IP_ option names
  4078. // can be reused 0x44
  4079. // Option values and names (when !_XPG5) shared with <xti_inet.h>
  4080. // The following option values are reserved by <xti_inet.h>
  4081. //
  4082. // T_IP_OPTIONS 0x107 - IP per-packet options
  4083. // T_IP_TOS 0x108 - IP per packet type of service
  4084. // Default value constants for multicast attributes controlled by
  4085. // IP*_MULTICAST_LOOP and IP*_MULTICAST_{TTL,HOPS} options.
  4086. // Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
  4087. type Ip_mreq = struct {
  4088. Fimr_multiaddr struct {
  4089. FS_un struct {
  4090. F__ccgo_pad1 [0]uint32
  4091. FS_un_b struct {
  4092. Fs_b1 uint8
  4093. Fs_b2 uint8
  4094. Fs_b3 uint8
  4095. Fs_b4 uint8
  4096. }
  4097. }
  4098. }
  4099. Fimr_interface struct {
  4100. FS_un struct {
  4101. F__ccgo_pad1 [0]uint32
  4102. FS_un_b struct {
  4103. Fs_b1 uint8
  4104. Fs_b2 uint8
  4105. Fs_b3 uint8
  4106. Fs_b4 uint8
  4107. }
  4108. }
  4109. }
  4110. } /* in.h:1015:1 */
  4111. // Argument structure for IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
  4112. // IP_ADD_SOURCE_MEMBERSHIP, and IP_DROP_SOURCE_MEMBERSHIP.
  4113. type Ip_mreq_source = struct {
  4114. Fimr_multiaddr struct {
  4115. FS_un struct {
  4116. F__ccgo_pad1 [0]uint32
  4117. FS_un_b struct {
  4118. Fs_b1 uint8
  4119. Fs_b2 uint8
  4120. Fs_b3 uint8
  4121. Fs_b4 uint8
  4122. }
  4123. }
  4124. }
  4125. Fimr_sourceaddr struct {
  4126. FS_un struct {
  4127. F__ccgo_pad1 [0]uint32
  4128. FS_un_b struct {
  4129. Fs_b1 uint8
  4130. Fs_b2 uint8
  4131. Fs_b3 uint8
  4132. Fs_b4 uint8
  4133. }
  4134. }
  4135. }
  4136. Fimr_interface struct {
  4137. FS_un struct {
  4138. F__ccgo_pad1 [0]uint32
  4139. FS_un_b struct {
  4140. Fs_b1 uint8
  4141. Fs_b2 uint8
  4142. Fs_b3 uint8
  4143. Fs_b4 uint8
  4144. }
  4145. }
  4146. }
  4147. } /* in.h:1024:1 */
  4148. // Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP on
  4149. // IPv6 addresses.
  4150. type Ipv6_mreq = struct {
  4151. Fipv6mr_multiaddr struct {
  4152. F_S6_un struct {
  4153. F__ccgo_pad1 [0]uint32
  4154. F_S6_u8 [16]uint8
  4155. }
  4156. }
  4157. Fipv6mr_interface uint32
  4158. } /* in.h:1034:1 */
  4159. // Use #pragma pack() construct to force 32-bit alignment on amd64.
  4160. // This is needed to keep the structure size and offsets consistent
  4161. // between a 32-bit app and the 64-bit amd64 kernel in structures
  4162. // where 64-bit alignment would create gaps (in this case, structures
  4163. // which have a uint32_t followed by a struct sockaddr_storage).
  4164. // Argument structure for MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
  4165. type Group_req = struct {
  4166. Fgr_interface uint32
  4167. F__ccgo_pad1 [4]byte
  4168. Fgr_group struct {
  4169. Fss_family uint16
  4170. F_ss_pad1 [6]int8
  4171. F_ss_align float64
  4172. F_ss_pad2 [240]int8
  4173. }
  4174. } /* in.h:1053:1 */
  4175. // Argument structure for MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE,
  4176. // MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP.
  4177. type Group_source_req = struct {
  4178. Fgsr_interface uint32
  4179. F__ccgo_pad1 [4]byte
  4180. Fgsr_group struct {
  4181. Fss_family uint16
  4182. F_ss_pad1 [6]int8
  4183. F_ss_align float64
  4184. F_ss_pad2 [240]int8
  4185. }
  4186. Fgsr_source struct {
  4187. Fss_family uint16
  4188. F_ss_pad1 [6]int8
  4189. F_ss_align float64
  4190. F_ss_pad2 [240]int8
  4191. }
  4192. } /* in.h:1062:1 */
  4193. // Argument for SIOC[GS]MSFILTER ioctls
  4194. type Group_filter = struct {
  4195. Fgf_interface uint32
  4196. F__ccgo_pad1 [4]byte
  4197. Fgf_group struct {
  4198. Fss_family uint16
  4199. F_ss_pad1 [6]int8
  4200. F_ss_align float64
  4201. F_ss_pad2 [240]int8
  4202. }
  4203. Fgf_fmode uint32
  4204. Fgf_numsrc uint32
  4205. Fgf_slist [1]struct {
  4206. Fss_family uint16
  4207. F_ss_pad1 [6]int8
  4208. F_ss_align float64
  4209. F_ss_pad2 [240]int8
  4210. }
  4211. } /* in.h:1071:1 */
  4212. // Argument for SIOC[GS]IPMSFILTER ioctls (IPv4-specific)
  4213. type Ip_msfilter = struct {
  4214. Fimsf_multiaddr struct {
  4215. FS_un struct {
  4216. F__ccgo_pad1 [0]uint32
  4217. FS_un_b struct {
  4218. Fs_b1 uint8
  4219. Fs_b2 uint8
  4220. Fs_b3 uint8
  4221. Fs_b4 uint8
  4222. }
  4223. }
  4224. }
  4225. Fimsf_interface struct {
  4226. FS_un struct {
  4227. F__ccgo_pad1 [0]uint32
  4228. FS_un_b struct {
  4229. Fs_b1 uint8
  4230. Fs_b2 uint8
  4231. Fs_b3 uint8
  4232. Fs_b4 uint8
  4233. }
  4234. }
  4235. }
  4236. Fimsf_fmode uint32
  4237. Fimsf_numsrc uint32
  4238. Fimsf_slist [1]struct {
  4239. FS_un struct {
  4240. F__ccgo_pad1 [0]uint32
  4241. FS_un_b struct {
  4242. Fs_b1 uint8
  4243. Fs_b2 uint8
  4244. Fs_b3 uint8
  4245. Fs_b4 uint8
  4246. }
  4247. }
  4248. }
  4249. } /* in.h:1090:1 */
  4250. // Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
  4251. // Argument struct for IP_PKTINFO option
  4252. type In_pktinfo = struct {
  4253. Fipi_ifindex uint32
  4254. Fipi_spec_dst struct {
  4255. FS_un struct {
  4256. F__ccgo_pad1 [0]uint32
  4257. FS_un_b struct {
  4258. Fs_b1 uint8
  4259. Fs_b2 uint8
  4260. Fs_b3 uint8
  4261. Fs_b4 uint8
  4262. }
  4263. }
  4264. }
  4265. Fipi_addr struct {
  4266. FS_un struct {
  4267. F__ccgo_pad1 [0]uint32
  4268. FS_un_b struct {
  4269. Fs_b1 uint8
  4270. Fs_b2 uint8
  4271. Fs_b3 uint8
  4272. Fs_b4 uint8
  4273. }
  4274. }
  4275. }
  4276. } /* in.h:1127:9 */
  4277. // Definitions needed for [gs]etsourcefilter(), [gs]etipv4sourcefilter()
  4278. // Argument struct for IP_PKTINFO option
  4279. type In_pktinfo_t = In_pktinfo /* in.h:1131:3 */
  4280. // Argument struct for IPV6_PKTINFO option
  4281. type In6_pktinfo = struct {
  4282. Fipi6_addr struct {
  4283. F_S6_un struct {
  4284. F__ccgo_pad1 [0]uint32
  4285. F_S6_u8 [16]uint8
  4286. }
  4287. }
  4288. Fipi6_ifindex uint32
  4289. } /* in.h:1136:1 */
  4290. // Argument struct for IPV6_MTUINFO option
  4291. type Ip6_mtuinfo = struct {
  4292. Fip6m_addr struct {
  4293. Fsin6_family uint16
  4294. Fsin6_port uint16
  4295. Fsin6_flowinfo uint32
  4296. Fsin6_addr struct {
  4297. F_S6_un struct {
  4298. F__ccgo_pad1 [0]uint32
  4299. F_S6_u8 [16]uint8
  4300. }
  4301. }
  4302. Fsin6_scope_id uint32
  4303. F__sin6_src_id uint32
  4304. }
  4305. Fip6m_mtu uint32
  4306. } /* in.h:1144:1 */
  4307. // Argument structure for IP_ADD_PROXY_ADDR.
  4308. // Note that this is an unstable, experimental interface. It may change
  4309. // later. Don't use it unless you know what it is.
  4310. type In_prefix_t = struct {
  4311. Fin_prefix_addr In_addr
  4312. Fin_prefix_len uint32
  4313. } /* in.h:1183:3 */
  4314. // CDDL HEADER START
  4315. //
  4316. // The contents of this file are subject to the terms of the
  4317. // Common Development and Distribution License (the "License").
  4318. // You may not use this file except in compliance with the License.
  4319. //
  4320. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4321. // or http://www.opensolaris.org/os/licensing.
  4322. // See the License for the specific language governing permissions
  4323. // and limitations under the License.
  4324. //
  4325. // When distributing Covered Code, include this CDDL HEADER in each
  4326. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4327. // If applicable, add the following below this CDDL HEADER, with the
  4328. // fields enclosed by brackets "[]" replaced with your own identifying
  4329. // information: Portions Copyright [yyyy] [name of copyright owner]
  4330. //
  4331. // CDDL HEADER END
  4332. // Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  4333. // Copyright 2015, Joyent, Inc. All rights reserved.
  4334. // Copyright 2022 Garrett D'Amore
  4335. //
  4336. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  4337. // All Rights Reserved
  4338. // University Copyright- Copyright (c) 1982, 1986, 1988
  4339. // The Regents of the University of California
  4340. // All Rights Reserved
  4341. //
  4342. // University Acknowledgment- Portions of this document are derived from
  4343. // software developed by the University of California, Berkeley, and its
  4344. // contributors.
  4345. // Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
  4346. // Copyright (c) 2014, Joyent, Inc. All rights reserved.
  4347. // CDDL HEADER START
  4348. //
  4349. // The contents of this file are subject to the terms of the
  4350. // Common Development and Distribution License (the "License").
  4351. // You may not use this file except in compliance with the License.
  4352. //
  4353. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4354. // or http://www.opensolaris.org/os/licensing.
  4355. // See the License for the specific language governing permissions
  4356. // and limitations under the License.
  4357. //
  4358. // When distributing Covered Code, include this CDDL HEADER in each
  4359. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4360. // If applicable, add the following below this CDDL HEADER, with the
  4361. // fields enclosed by brackets "[]" replaced with your own identifying
  4362. // information: Portions Copyright [yyyy] [name of copyright owner]
  4363. //
  4364. // CDDL HEADER END
  4365. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  4366. // All Rights Reserved
  4367. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  4368. // Use is subject to license terms.
  4369. //
  4370. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  4371. // Copyright 2016 Joyent, Inc.
  4372. // Copyright 2021 Oxide Computer Company
  4373. // CDDL HEADER START
  4374. //
  4375. // The contents of this file are subject to the terms of the
  4376. // Common Development and Distribution License (the "License").
  4377. // You may not use this file except in compliance with the License.
  4378. //
  4379. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4380. // or http://www.opensolaris.org/os/licensing.
  4381. // See the License for the specific language governing permissions
  4382. // and limitations under the License.
  4383. //
  4384. // When distributing Covered Code, include this CDDL HEADER in each
  4385. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4386. // If applicable, add the following below this CDDL HEADER, with the
  4387. // fields enclosed by brackets "[]" replaced with your own identifying
  4388. // information: Portions Copyright [yyyy] [name of copyright owner]
  4389. //
  4390. // CDDL HEADER END
  4391. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  4392. //
  4393. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  4394. // Use is subject to license terms.
  4395. //
  4396. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  4397. // Copyright (c) 2015, Joyent, Inc. All rights reserved.
  4398. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  4399. // All Rights Reserved
  4400. // University Copyright- Copyright (c) 1982, 1986, 1988
  4401. // The Regents of the University of California
  4402. // All Rights Reserved
  4403. //
  4404. // University Acknowledgment- Portions of this document are derived from
  4405. // software developed by the University of California, Berkeley, and its
  4406. // contributors.
  4407. // DO NOT EDIT THIS FILE.
  4408. //
  4409. // It has been auto-edited by fixincludes from:
  4410. //
  4411. // "/usr/include/sys/feature_tests.h"
  4412. //
  4413. // This had to be done to correct non-standard usages in the
  4414. // original, manufacturer supplied header file.
  4415. // CDDL HEADER START
  4416. //
  4417. // The contents of this file are subject to the terms of the
  4418. // Common Development and Distribution License (the "License").
  4419. // You may not use this file except in compliance with the License.
  4420. //
  4421. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4422. // or http://www.opensolaris.org/os/licensing.
  4423. // See the License for the specific language governing permissions
  4424. // and limitations under the License.
  4425. //
  4426. // When distributing Covered Code, include this CDDL HEADER in each
  4427. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4428. // If applicable, add the following below this CDDL HEADER, with the
  4429. // fields enclosed by brackets "[]" replaced with your own identifying
  4430. // information: Portions Copyright [yyyy] [name of copyright owner]
  4431. //
  4432. // CDDL HEADER END
  4433. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  4434. // Copyright 2016 Joyent, Inc.
  4435. // Copyright 2022 Oxide Computer Company
  4436. //
  4437. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  4438. // Use is subject to license terms.
  4439. // CDDL HEADER START
  4440. //
  4441. // The contents of this file are subject to the terms of the
  4442. // Common Development and Distribution License (the "License").
  4443. // You may not use this file except in compliance with the License.
  4444. //
  4445. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4446. // or http://www.opensolaris.org/os/licensing.
  4447. // See the License for the specific language governing permissions
  4448. // and limitations under the License.
  4449. //
  4450. // When distributing Covered Code, include this CDDL HEADER in each
  4451. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4452. // If applicable, add the following below this CDDL HEADER, with the
  4453. // fields enclosed by brackets "[]" replaced with your own identifying
  4454. // information: Portions Copyright [yyyy] [name of copyright owner]
  4455. //
  4456. // CDDL HEADER END
  4457. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  4458. // All Rights Reserved
  4459. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  4460. // Use is subject to license terms.
  4461. //
  4462. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  4463. // Copyright 2016 Joyent, Inc.
  4464. // Copyright 2021 Oxide Computer Company
  4465. // I/O parameter information. A uio structure describes the I/O which
  4466. // is to be performed by an operation. Typically the data movement will
  4467. // be performed by a routine such as uiomove(), which updates the uio
  4468. // structure to reflect what was done.
  4469. type Iovec = struct {
  4470. Fiov_base uintptr
  4471. Fiov_len uint64
  4472. } /* uio.h:68:9 */
  4473. // CDDL HEADER START
  4474. //
  4475. // The contents of this file are subject to the terms of the
  4476. // Common Development and Distribution License (the "License").
  4477. // You may not use this file except in compliance with the License.
  4478. //
  4479. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4480. // or http://www.opensolaris.org/os/licensing.
  4481. // See the License for the specific language governing permissions
  4482. // and limitations under the License.
  4483. //
  4484. // When distributing Covered Code, include this CDDL HEADER in each
  4485. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4486. // If applicable, add the following below this CDDL HEADER, with the
  4487. // fields enclosed by brackets "[]" replaced with your own identifying
  4488. // information: Portions Copyright [yyyy] [name of copyright owner]
  4489. //
  4490. // CDDL HEADER END
  4491. // Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  4492. // Copyright 2015, Joyent, Inc. All rights reserved.
  4493. // Copyright 2022 Garrett D'Amore
  4494. //
  4495. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  4496. // All Rights Reserved
  4497. // University Copyright- Copyright (c) 1982, 1986, 1988
  4498. // The Regents of the University of California
  4499. // All Rights Reserved
  4500. //
  4501. // University Acknowledgment- Portions of this document are derived from
  4502. // software developed by the University of California, Berkeley, and its
  4503. // contributors.
  4504. // Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
  4505. // Copyright (c) 2014, Joyent, Inc. All rights reserved.
  4506. // CDDL HEADER START
  4507. //
  4508. // The contents of this file are subject to the terms of the
  4509. // Common Development and Distribution License (the "License").
  4510. // You may not use this file except in compliance with the License.
  4511. //
  4512. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4513. // or http://www.opensolaris.org/os/licensing.
  4514. // See the License for the specific language governing permissions
  4515. // and limitations under the License.
  4516. //
  4517. // When distributing Covered Code, include this CDDL HEADER in each
  4518. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4519. // If applicable, add the following below this CDDL HEADER, with the
  4520. // fields enclosed by brackets "[]" replaced with your own identifying
  4521. // information: Portions Copyright [yyyy] [name of copyright owner]
  4522. //
  4523. // CDDL HEADER END
  4524. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  4525. // All Rights Reserved
  4526. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  4527. // Use is subject to license terms.
  4528. //
  4529. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  4530. // Copyright 2016 Joyent, Inc.
  4531. // Copyright 2021 Oxide Computer Company
  4532. // CDDL HEADER START
  4533. //
  4534. // The contents of this file are subject to the terms of the
  4535. // Common Development and Distribution License (the "License").
  4536. // You may not use this file except in compliance with the License.
  4537. //
  4538. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4539. // or http://www.opensolaris.org/os/licensing.
  4540. // See the License for the specific language governing permissions
  4541. // and limitations under the License.
  4542. //
  4543. // When distributing Covered Code, include this CDDL HEADER in each
  4544. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4545. // If applicable, add the following below this CDDL HEADER, with the
  4546. // fields enclosed by brackets "[]" replaced with your own identifying
  4547. // information: Portions Copyright [yyyy] [name of copyright owner]
  4548. //
  4549. // CDDL HEADER END
  4550. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  4551. //
  4552. // Copyright 2010 Sun Microsystems, Inc. All rights reserved.
  4553. // Use is subject to license terms.
  4554. //
  4555. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  4556. // Copyright (c) 2015, Joyent, Inc. All rights reserved.
  4557. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  4558. // All Rights Reserved
  4559. // University Copyright- Copyright (c) 1982, 1986, 1988
  4560. // The Regents of the University of California
  4561. // All Rights Reserved
  4562. //
  4563. // University Acknowledgment- Portions of this document are derived from
  4564. // software developed by the University of California, Berkeley, and its
  4565. // contributors.
  4566. // DO NOT EDIT THIS FILE.
  4567. //
  4568. // It has been auto-edited by fixincludes from:
  4569. //
  4570. // "/usr/include/sys/feature_tests.h"
  4571. //
  4572. // This had to be done to correct non-standard usages in the
  4573. // original, manufacturer supplied header file.
  4574. // CDDL HEADER START
  4575. //
  4576. // The contents of this file are subject to the terms of the
  4577. // Common Development and Distribution License (the "License").
  4578. // You may not use this file except in compliance with the License.
  4579. //
  4580. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4581. // or http://www.opensolaris.org/os/licensing.
  4582. // See the License for the specific language governing permissions
  4583. // and limitations under the License.
  4584. //
  4585. // When distributing Covered Code, include this CDDL HEADER in each
  4586. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4587. // If applicable, add the following below this CDDL HEADER, with the
  4588. // fields enclosed by brackets "[]" replaced with your own identifying
  4589. // information: Portions Copyright [yyyy] [name of copyright owner]
  4590. //
  4591. // CDDL HEADER END
  4592. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  4593. // Copyright 2016 Joyent, Inc.
  4594. // Copyright 2022 Oxide Computer Company
  4595. //
  4596. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  4597. // Use is subject to license terms.
  4598. // CDDL HEADER START
  4599. //
  4600. // The contents of this file are subject to the terms of the
  4601. // Common Development and Distribution License (the "License").
  4602. // You may not use this file except in compliance with the License.
  4603. //
  4604. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4605. // or http://www.opensolaris.org/os/licensing.
  4606. // See the License for the specific language governing permissions
  4607. // and limitations under the License.
  4608. //
  4609. // When distributing Covered Code, include this CDDL HEADER in each
  4610. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4611. // If applicable, add the following below this CDDL HEADER, with the
  4612. // fields enclosed by brackets "[]" replaced with your own identifying
  4613. // information: Portions Copyright [yyyy] [name of copyright owner]
  4614. //
  4615. // CDDL HEADER END
  4616. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  4617. // All Rights Reserved
  4618. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  4619. // Use is subject to license terms.
  4620. //
  4621. // Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  4622. // Copyright 2016 Joyent, Inc.
  4623. // Copyright 2021 Oxide Computer Company
  4624. // I/O parameter information. A uio structure describes the I/O which
  4625. // is to be performed by an operation. Typically the data movement will
  4626. // be performed by a routine such as uiomove(), which updates the uio
  4627. // structure to reflect what was done.
  4628. type Iovec_t = Iovec /* uio.h:75:3 */
  4629. // Segment flag values.
  4630. type Uio_seg_t = uint32 /* uio.h:93:70 */
  4631. type Uio = struct {
  4632. Fuio_iov uintptr
  4633. Fuio_iovcnt int32
  4634. F__ccgo_pad1 [4]byte
  4635. F_uio_offset Lloff_t
  4636. Fuio_segflg uint32
  4637. Fuio_fmode uint16
  4638. Fuio_extflg uint16
  4639. F_uio_limit Lloff_t
  4640. Fuio_resid int64
  4641. } /* uio.h:95:9 */
  4642. type Uio_t = Uio /* uio.h:104:3 */
  4643. // Extended uio_t uioa_t used for asynchronous uio.
  4644. //
  4645. // Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
  4646. // as there isn't a formal definition of IOV_MAX for the kernel.
  4647. type Uioa_page_s = struct {
  4648. Fuioa_pfncnt int32
  4649. F__ccgo_pad1 [4]byte
  4650. Fuioa_ppp uintptr
  4651. Fuioa_base uintptr
  4652. Fuioa_len uint64
  4653. } /* uio.h:114:9 */
  4654. // Extended uio_t uioa_t used for asynchronous uio.
  4655. //
  4656. // Note: UIOA_IOV_MAX is defined and used as it is in "fs/vncalls.c"
  4657. // as there isn't a formal definition of IOV_MAX for the kernel.
  4658. type Uioa_page_t = Uioa_page_s /* uio.h:119:3 */
  4659. type Uioa_s = struct {
  4660. Fuio_iov uintptr
  4661. Fuio_iovcnt int32
  4662. F__ccgo_pad1 [4]byte
  4663. F_uio_offset Lloff_t
  4664. Fuio_segflg uint32
  4665. Fuio_fmode uint16
  4666. Fuio_extflg uint16
  4667. F_uio_limit Lloff_t
  4668. Fuio_resid int64
  4669. Fuioa_state uint32
  4670. F__ccgo_pad2 [4]byte
  4671. Fuioa_mbytes int64
  4672. Fuioa_lcur uintptr
  4673. Fuioa_lppp uintptr
  4674. Fuioa_hwst [4]uintptr
  4675. Fuioa_locked [16]Uioa_page_t
  4676. } /* uio.h:121:9 */
  4677. type Uioa_t = Uioa_s /* uio.h:139:3 */
  4678. // uio extensions
  4679. //
  4680. // PSARC 2009/478: Copy Reduction Interfaces
  4681. type Xuio_type_t = uint32 /* uio.h:150:3 */
  4682. type Xuio = struct {
  4683. Fxu_uio Uio_t
  4684. Fxu_type uint32
  4685. F__ccgo_pad1 [4]byte
  4686. Fxu_ext struct {
  4687. Fxu_aio struct {
  4688. Fxu_a_state uint32
  4689. F__ccgo_pad1 [4]byte
  4690. Fxu_a_mbytes int64
  4691. Fxu_a_lcur uintptr
  4692. Fxu_a_lppp uintptr
  4693. Fxu_a_hwst [4]uintptr
  4694. Fxu_a_locked [16]Uioa_page_t
  4695. }
  4696. }
  4697. } /* uio.h:152:9 */
  4698. type Xuio_t = Xuio /* uio.h:189:3 */
  4699. // I/O direction.
  4700. type Uio_rw_t = uint32 /* uio.h:220:45 */
  4701. // uio_extflg: extended flags
  4702. //
  4703. // NOTE: This flag will be used in uiomove to determine if non-temporal
  4704. // access, ie, access bypassing caches, should be used. Filesystems that
  4705. // don't initialize this field could experience suboptimal performance due to
  4706. // the random data the field contains.
  4707. //
  4708. // NOTE: This flag is also used by uioasync callers to pass an extended
  4709. // uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
  4710. // consumers of a uioa_t require the uio_extflg to be initialized.
  4711. // Global uioasync capability shadow state.
  4712. type Uioasync_s = struct {
  4713. Fenabled uint32
  4714. F__ccgo_pad1 [4]byte
  4715. Fmincnt uint64
  4716. } /* uio.h:243:9 */
  4717. // uio_extflg: extended flags
  4718. //
  4719. // NOTE: This flag will be used in uiomove to determine if non-temporal
  4720. // access, ie, access bypassing caches, should be used. Filesystems that
  4721. // don't initialize this field could experience suboptimal performance due to
  4722. // the random data the field contains.
  4723. //
  4724. // NOTE: This flag is also used by uioasync callers to pass an extended
  4725. // uio_t (uioa_t), to uioasync enabled consumers. Unlike above all
  4726. // consumers of a uioa_t require the uio_extflg to be initialized.
  4727. // Global uioasync capability shadow state.
  4728. type Uioasync_t = Uioasync_s /* uio.h:246:3 */
  4729. // DO NOT EDIT THIS FILE.
  4730. //
  4731. // It has been auto-edited by fixincludes from:
  4732. //
  4733. // "/usr/include/sys/feature_tests.h"
  4734. //
  4735. // This had to be done to correct non-standard usages in the
  4736. // original, manufacturer supplied header file.
  4737. // CDDL HEADER START
  4738. //
  4739. // The contents of this file are subject to the terms of the
  4740. // Common Development and Distribution License (the "License").
  4741. // You may not use this file except in compliance with the License.
  4742. //
  4743. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4744. // or http://www.opensolaris.org/os/licensing.
  4745. // See the License for the specific language governing permissions
  4746. // and limitations under the License.
  4747. //
  4748. // When distributing Covered Code, include this CDDL HEADER in each
  4749. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4750. // If applicable, add the following below this CDDL HEADER, with the
  4751. // fields enclosed by brackets "[]" replaced with your own identifying
  4752. // information: Portions Copyright [yyyy] [name of copyright owner]
  4753. //
  4754. // CDDL HEADER END
  4755. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  4756. // Copyright 2016 Joyent, Inc.
  4757. // Copyright 2022 Oxide Computer Company
  4758. //
  4759. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  4760. // Use is subject to license terms.
  4761. // CDDL HEADER START
  4762. //
  4763. // The contents of this file are subject to the terms of the
  4764. // Common Development and Distribution License (the "License").
  4765. // You may not use this file except in compliance with the License.
  4766. //
  4767. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4768. // or http://www.opensolaris.org/os/licensing.
  4769. // See the License for the specific language governing permissions
  4770. // and limitations under the License.
  4771. //
  4772. // When distributing Covered Code, include this CDDL HEADER in each
  4773. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4774. // If applicable, add the following below this CDDL HEADER, with the
  4775. // fields enclosed by brackets "[]" replaced with your own identifying
  4776. // information: Portions Copyright [yyyy] [name of copyright owner]
  4777. //
  4778. // CDDL HEADER END
  4779. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  4780. // Use is subject to license terms.
  4781. // Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T
  4782. // All Rights Reserved
  4783. // Portions of this source code were derived from Berkeley 4.3 BSD
  4784. // under license from the Regents of the University of California.
  4785. // CDDL HEADER START
  4786. //
  4787. // The contents of this file are subject to the terms of the
  4788. // Common Development and Distribution License, Version 1.0 only
  4789. // (the "License"). You may not use this file except in compliance
  4790. // with the License.
  4791. //
  4792. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4793. // or http://www.opensolaris.org/os/licensing.
  4794. // See the License for the specific language governing permissions
  4795. // and limitations under the License.
  4796. //
  4797. // When distributing Covered Code, include this CDDL HEADER in each
  4798. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4799. // If applicable, add the following below this CDDL HEADER, with the
  4800. // fields enclosed by brackets "[]" replaced with your own identifying
  4801. // information: Portions Copyright [yyyy] [name of copyright owner]
  4802. //
  4803. // CDDL HEADER END
  4804. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  4805. // All Rights Reserved
  4806. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  4807. //
  4808. // Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  4809. // Use is subject to license terms.
  4810. // Copyright 2015 Joyent, Inc.
  4811. type Netconfig = struct {
  4812. Fnc_netid uintptr
  4813. Fnc_semantics uint32
  4814. Fnc_flag uint32
  4815. Fnc_protofmly uintptr
  4816. Fnc_proto uintptr
  4817. Fnc_device uintptr
  4818. Fnc_nlookups uint32
  4819. F__ccgo_pad1 [4]byte
  4820. Fnc_lookups uintptr
  4821. Fnc_unused [8]uint32
  4822. } /* netconfig.h:44:1 */
  4823. type NCONF_HANDLE = struct {
  4824. Fnc_head uintptr
  4825. Fnc_curr uintptr
  4826. } /* netconfig.h:59:3 */
  4827. // CDDL HEADER START
  4828. //
  4829. // The contents of this file are subject to the terms of the
  4830. // Common Development and Distribution License, Version 1.0 only
  4831. // (the "License"). You may not use this file except in compliance
  4832. // with the License.
  4833. //
  4834. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4835. // or http://www.opensolaris.org/os/licensing.
  4836. // See the License for the specific language governing permissions
  4837. // and limitations under the License.
  4838. //
  4839. // When distributing Covered Code, include this CDDL HEADER in each
  4840. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4841. // If applicable, add the following below this CDDL HEADER, with the
  4842. // fields enclosed by brackets "[]" replaced with your own identifying
  4843. // information: Portions Copyright [yyyy] [name of copyright owner]
  4844. //
  4845. // CDDL HEADER END
  4846. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  4847. // All Rights Reserved
  4848. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  4849. //
  4850. // Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
  4851. // All rights reserved.
  4852. // Copyright 2015, Joyent, Inc.
  4853. // Structure of file descriptor/event pairs supplied in
  4854. // the poll arrays.
  4855. type Pollfd = struct {
  4856. Ffd int32
  4857. Fevents int16
  4858. Frevents int16
  4859. } /* poll.h:48:9 */
  4860. // CDDL HEADER START
  4861. //
  4862. // The contents of this file are subject to the terms of the
  4863. // Common Development and Distribution License, Version 1.0 only
  4864. // (the "License"). You may not use this file except in compliance
  4865. // with the License.
  4866. //
  4867. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4868. // or http://www.opensolaris.org/os/licensing.
  4869. // See the License for the specific language governing permissions
  4870. // and limitations under the License.
  4871. //
  4872. // When distributing Covered Code, include this CDDL HEADER in each
  4873. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4874. // If applicable, add the following below this CDDL HEADER, with the
  4875. // fields enclosed by brackets "[]" replaced with your own identifying
  4876. // information: Portions Copyright [yyyy] [name of copyright owner]
  4877. //
  4878. // CDDL HEADER END
  4879. // Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
  4880. // All Rights Reserved
  4881. // Copyright 2014 Garrett D'Amore <garrett@damore.org>
  4882. //
  4883. // Copyright (c) 1995, 1998 by Sun Microsystems, Inc.
  4884. // All rights reserved.
  4885. // Copyright 2015, Joyent, Inc.
  4886. // Structure of file descriptor/event pairs supplied in
  4887. // the poll arrays.
  4888. type Pollfd_t = Pollfd /* poll.h:52:3 */
  4889. type Nfds_t = uint64 /* poll.h:54:23 */
  4890. // Copyright 2009 Sun Microsystems, Inc. All rights reserved.
  4891. // Use is subject to license terms.
  4892. //
  4893. // Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  4894. // Copyright 2015, Joyent, Inc.
  4895. // Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
  4896. // Copyright (c) 1982, 1986 Regents of the University of California.
  4897. // All rights reserved.
  4898. //
  4899. // Redistribution and use in source and binary forms are permitted
  4900. // provided that this notice is preserved and that due credit is given
  4901. // to the University of California at Berkeley. The name of the University
  4902. // may not be used to endorse or promote products derived from this
  4903. // software without specific prior written permission. This software
  4904. // is provided ``as is'' without express or implied warranty.
  4905. // Constants and structures defined by the internet system,
  4906. // according to following documents
  4907. //
  4908. // Internet ASSIGNED NUMBERS (RFC1700) and its successors:
  4909. // http://www.iana.org/assignments/protocol-numbers
  4910. // http://www.iana.org/assignments/port-numbers
  4911. // Basic Socket Interface Extensions for IPv6 (RFC2133 and its successors)
  4912. //
  4913. // Definitions related to sockets: types, address families, options.
  4914. // Types
  4915. // Flags for socket() and accept4()
  4916. // Option flags per-socket.
  4917. // Socket options are passed using a signed integer, but it is also rare
  4918. // for more than one to ever be passed at the same time with setsockopt
  4919. // and only one at a time can be retrieved with getsockopt.
  4920. //
  4921. // Since the lower numbers cannot be renumbered for compatibility reasons,
  4922. // it would seem that we need to start a new number space (0x40000000 -
  4923. // 0x7fffffff) for those that don't need to be stored as a bit flag
  4924. // somewhere. This limits the flag options to 30 but that seems to be
  4925. // plenty, anyway. 0x40000000 is reserved for future use.
  4926. // N.B.: The following definition is present only for compatibility
  4927. // with release 3.0. It will disappear in later releases.
  4928. // Additional options, not kept in so_options.
  4929. // "Socket"-level control message types:
  4930. // Socket filter options
  4931. // Structure returned by FIL_LIST
  4932. type Fil_info = struct {
  4933. Ffi_flags int32
  4934. Ffi_pos int32
  4935. Ffi_name [32]int8
  4936. } /* socket.h:225:1 */
  4937. // Structure used for manipulating linger option.
  4938. type Linger = struct {
  4939. Fl_onoff int32
  4940. Fl_linger int32
  4941. } /* socket.h:254:1 */
  4942. // Levels for (get/set)sockopt() that don't apply to a specific protocol.
  4943. // Address families.
  4944. //
  4945. // Some of these constant names are copied for the DTrace IP provider in
  4946. // usr/src/lib/libdtrace/common/{ip.d.in, ip.sed.in}, which should be kept
  4947. // in sync.
  4948. // Protocol families, same as address families for now.
  4949. // Maximum queue length specifiable by listen.
  4950. // Message header for recvmsg and sendmsg calls.
  4951. type Msghdr = struct {
  4952. Fmsg_name uintptr
  4953. Fmsg_namelen uint32
  4954. F__ccgo_pad1 [4]byte
  4955. Fmsg_iov uintptr
  4956. Fmsg_iovlen int32
  4957. F__ccgo_pad2 [4]byte
  4958. Fmsg_accrights uintptr
  4959. Fmsg_accrightslen int32
  4960. F__ccgo_pad3 [4]byte
  4961. } /* socket.h:365:1 */
  4962. // with left over data
  4963. // Obsolete but kept for compilation compatibility. Use IOV_MAX.
  4964. // Added for XPGv2 compliance
  4965. type Cmsghdr = struct {
  4966. Fcmsg_len uint32
  4967. Fcmsg_level int32
  4968. Fcmsg_type int32
  4969. } /* socket.h:462:1 */
  4970. // DO NOT EDIT THIS FILE.
  4971. //
  4972. // It has been auto-edited by fixincludes from:
  4973. //
  4974. // "/usr/include/sys/feature_tests.h"
  4975. //
  4976. // This had to be done to correct non-standard usages in the
  4977. // original, manufacturer supplied header file.
  4978. // CDDL HEADER START
  4979. //
  4980. // The contents of this file are subject to the terms of the
  4981. // Common Development and Distribution License (the "License").
  4982. // You may not use this file except in compliance with the License.
  4983. //
  4984. // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  4985. // or http://www.opensolaris.org/os/licensing.
  4986. // See the License for the specific language governing permissions
  4987. // and limitations under the License.
  4988. //
  4989. // When distributing Covered Code, include this CDDL HEADER in each
  4990. // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  4991. // If applicable, add the following below this CDDL HEADER, with the
  4992. // fields enclosed by brackets "[]" replaced with your own identifying
  4993. // information: Portions Copyright [yyyy] [name of copyright owner]
  4994. //
  4995. // CDDL HEADER END
  4996. // Copyright 2013 Garrett D'Amore <garrett@damore.org>
  4997. // Copyright 2016 Joyent, Inc.
  4998. // Copyright 2022 Oxide Computer Company
  4999. //
  5000. // Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  5001. // Use is subject to license terms.
  5002. type Hostent = struct {
  5003. Fh_name uintptr
  5004. Fh_aliases uintptr
  5005. Fh_addrtype int32
  5006. Fh_length int32
  5007. Fh_addr_list uintptr
  5008. } /* netdb.h:96:1 */
  5009. // addrinfo introduced with IPv6 for Protocol-Independent Hostname
  5010. // and Service Name Translation.
  5011. type Addrinfo = struct {
  5012. Fai_flags int32
  5013. Fai_family int32
  5014. Fai_socktype int32
  5015. Fai_protocol int32
  5016. Fai_addrlen uint32
  5017. F__ccgo_pad1 [4]byte
  5018. Fai_canonname uintptr
  5019. Fai_addr uintptr
  5020. Fai_next uintptr
  5021. } /* netdb.h:112:1 */
  5022. // The flag 0x8000 is currently reserved for private use between libnsl and
  5023. // libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
  5024. // addrinfo flags
  5025. // getipnodebyname() flags
  5026. // These were defined in RFC 2553 but not SUSv3
  5027. // or RFC 3493 which obsoleted 2553.
  5028. // addrinfo errors
  5029. // getnameinfo flags
  5030. // Not listed in any standards document
  5031. // getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493
  5032. // Scope delimit character
  5033. // Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
  5034. // and algorithms.
  5035. type Ipsecalgent = struct {
  5036. Fa_names uintptr
  5037. Fa_proto_num int32
  5038. Fa_alg_num int32
  5039. Fa_mech_name uintptr
  5040. Fa_block_sizes uintptr
  5041. Fa_key_sizes uintptr
  5042. Fa_key_increment int32
  5043. F__ccgo_pad1 [4]byte
  5044. Fa_mech_params uintptr
  5045. Fa_alg_flags int32
  5046. F__ccgo_pad2 [4]byte
  5047. } /* netdb.h:195:9 */
  5048. // The flag 0x8000 is currently reserved for private use between libnsl and
  5049. // libsocket. See lib/libsocket/inet/getaddrinfo.c for more information.
  5050. // addrinfo flags
  5051. // getipnodebyname() flags
  5052. // These were defined in RFC 2553 but not SUSv3
  5053. // or RFC 3493 which obsoleted 2553.
  5054. // addrinfo errors
  5055. // getnameinfo flags
  5056. // Not listed in any standards document
  5057. // getnameinfo max sizes as defined in RFC 2553 obsoleted in RFC 3493
  5058. // Scope delimit character
  5059. // Algorithm entry for /etc/inet/ipsecalgs which defines IPsec protocols
  5060. // and algorithms.
  5061. type Ipsecalgent_t = Ipsecalgent /* netdb.h:205:3 */
  5062. // well-known IPsec protocol numbers
  5063. // Assumption here is that a network number
  5064. // fits in 32 bits -- probably a poor one.
  5065. type Netent = struct {
  5066. Fn_name uintptr
  5067. Fn_aliases uintptr
  5068. Fn_addrtype int32
  5069. Fn_net uint32
  5070. } /* netdb.h:217:1 */
  5071. type Protoent = struct {
  5072. Fp_name uintptr
  5073. Fp_aliases uintptr
  5074. Fp_proto int32
  5075. F__ccgo_pad1 [4]byte
  5076. } /* netdb.h:224:1 */
  5077. type Servent = struct {
  5078. Fs_name uintptr
  5079. Fs_aliases uintptr
  5080. Fs_port int32
  5081. F__ccgo_pad1 [4]byte
  5082. Fs_proto uintptr
  5083. } /* netdb.h:230:1 */
  5084. // Error return codes from gethostbyname() and gethostbyaddr()
  5085. // (left in extern int h_errno).
  5086. // BIND
  5087. // End BIND
  5088. var _ int8 /* gen.c:2:13: */