zsyscall_solaris_amd64.go 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630
  1. // mksyscall_solaris.pl -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build solaris,amd64
  4. package unix
  5. import (
  6. "syscall"
  7. "unsafe"
  8. )
  9. //go:cgo_import_dynamic libc_pipe pipe "libc.so"
  10. //go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
  11. //go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
  12. //go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
  13. //go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
  14. //go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
  15. //go:cgo_import_dynamic libc_gethostname gethostname "libc.so"
  16. //go:cgo_import_dynamic libc_utimes utimes "libc.so"
  17. //go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
  18. //go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
  19. //go:cgo_import_dynamic libc_futimesat futimesat "libc.so"
  20. //go:cgo_import_dynamic libc_accept accept "libsocket.so"
  21. //go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so"
  22. //go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so"
  23. //go:cgo_import_dynamic libc_acct acct "libc.so"
  24. //go:cgo_import_dynamic libc___makedev __makedev "libc.so"
  25. //go:cgo_import_dynamic libc___major __major "libc.so"
  26. //go:cgo_import_dynamic libc___minor __minor "libc.so"
  27. //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
  28. //go:cgo_import_dynamic libc_access access "libc.so"
  29. //go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
  30. //go:cgo_import_dynamic libc_chdir chdir "libc.so"
  31. //go:cgo_import_dynamic libc_chmod chmod "libc.so"
  32. //go:cgo_import_dynamic libc_chown chown "libc.so"
  33. //go:cgo_import_dynamic libc_chroot chroot "libc.so"
  34. //go:cgo_import_dynamic libc_close close "libc.so"
  35. //go:cgo_import_dynamic libc_creat creat "libc.so"
  36. //go:cgo_import_dynamic libc_dup dup "libc.so"
  37. //go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
  38. //go:cgo_import_dynamic libc_exit exit "libc.so"
  39. //go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
  40. //go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
  41. //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
  42. //go:cgo_import_dynamic libc_fchown fchown "libc.so"
  43. //go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
  44. //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so"
  45. //go:cgo_import_dynamic libc_flock flock "libc.so"
  46. //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
  47. //go:cgo_import_dynamic libc_fstat fstat "libc.so"
  48. //go:cgo_import_dynamic libc_fstatvfs fstatvfs "libc.so"
  49. //go:cgo_import_dynamic libc_getdents getdents "libc.so"
  50. //go:cgo_import_dynamic libc_getgid getgid "libc.so"
  51. //go:cgo_import_dynamic libc_getpid getpid "libc.so"
  52. //go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
  53. //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
  54. //go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
  55. //go:cgo_import_dynamic libc_getegid getegid "libc.so"
  56. //go:cgo_import_dynamic libc_getppid getppid "libc.so"
  57. //go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
  58. //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
  59. //go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
  60. //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
  61. //go:cgo_import_dynamic libc_getuid getuid "libc.so"
  62. //go:cgo_import_dynamic libc_kill kill "libc.so"
  63. //go:cgo_import_dynamic libc_lchown lchown "libc.so"
  64. //go:cgo_import_dynamic libc_link link "libc.so"
  65. //go:cgo_import_dynamic libc___xnet_llisten __xnet_llisten "libsocket.so"
  66. //go:cgo_import_dynamic libc_lstat lstat "libc.so"
  67. //go:cgo_import_dynamic libc_madvise madvise "libc.so"
  68. //go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
  69. //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
  70. //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
  71. //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
  72. //go:cgo_import_dynamic libc_mknod mknod "libc.so"
  73. //go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
  74. //go:cgo_import_dynamic libc_mlock mlock "libc.so"
  75. //go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
  76. //go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
  77. //go:cgo_import_dynamic libc_msync msync "libc.so"
  78. //go:cgo_import_dynamic libc_munlock munlock "libc.so"
  79. //go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
  80. //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
  81. //go:cgo_import_dynamic libc_open open "libc.so"
  82. //go:cgo_import_dynamic libc_openat openat "libc.so"
  83. //go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
  84. //go:cgo_import_dynamic libc_pause pause "libc.so"
  85. //go:cgo_import_dynamic libc_pread pread "libc.so"
  86. //go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
  87. //go:cgo_import_dynamic libc_read read "libc.so"
  88. //go:cgo_import_dynamic libc_readlink readlink "libc.so"
  89. //go:cgo_import_dynamic libc_rename rename "libc.so"
  90. //go:cgo_import_dynamic libc_renameat renameat "libc.so"
  91. //go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
  92. //go:cgo_import_dynamic libc_lseek lseek "libc.so"
  93. //go:cgo_import_dynamic libc_setegid setegid "libc.so"
  94. //go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
  95. //go:cgo_import_dynamic libc_setgid setgid "libc.so"
  96. //go:cgo_import_dynamic libc_sethostname sethostname "libc.so"
  97. //go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
  98. //go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
  99. //go:cgo_import_dynamic libc_setregid setregid "libc.so"
  100. //go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
  101. //go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
  102. //go:cgo_import_dynamic libc_setsid setsid "libc.so"
  103. //go:cgo_import_dynamic libc_setuid setuid "libc.so"
  104. //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so"
  105. //go:cgo_import_dynamic libc_stat stat "libc.so"
  106. //go:cgo_import_dynamic libc_statvfs statvfs "libc.so"
  107. //go:cgo_import_dynamic libc_symlink symlink "libc.so"
  108. //go:cgo_import_dynamic libc_sync sync "libc.so"
  109. //go:cgo_import_dynamic libc_times times "libc.so"
  110. //go:cgo_import_dynamic libc_truncate truncate "libc.so"
  111. //go:cgo_import_dynamic libc_fsync fsync "libc.so"
  112. //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
  113. //go:cgo_import_dynamic libc_umask umask "libc.so"
  114. //go:cgo_import_dynamic libc_uname uname "libc.so"
  115. //go:cgo_import_dynamic libc_umount umount "libc.so"
  116. //go:cgo_import_dynamic libc_unlink unlink "libc.so"
  117. //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
  118. //go:cgo_import_dynamic libc_ustat ustat "libc.so"
  119. //go:cgo_import_dynamic libc_utime utime "libc.so"
  120. //go:cgo_import_dynamic libc___xnet_bind __xnet_bind "libsocket.so"
  121. //go:cgo_import_dynamic libc___xnet_connect __xnet_connect "libsocket.so"
  122. //go:cgo_import_dynamic libc_mmap mmap "libc.so"
  123. //go:cgo_import_dynamic libc_munmap munmap "libc.so"
  124. //go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto "libsocket.so"
  125. //go:cgo_import_dynamic libc___xnet_socket __xnet_socket "libsocket.so"
  126. //go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair "libsocket.so"
  127. //go:cgo_import_dynamic libc_write write "libc.so"
  128. //go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
  129. //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
  130. //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
  131. //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
  132. //go:linkname procpipe libc_pipe
  133. //go:linkname procgetsockname libc_getsockname
  134. //go:linkname procGetcwd libc_getcwd
  135. //go:linkname procgetgroups libc_getgroups
  136. //go:linkname procsetgroups libc_setgroups
  137. //go:linkname procwait4 libc_wait4
  138. //go:linkname procgethostname libc_gethostname
  139. //go:linkname procutimes libc_utimes
  140. //go:linkname procutimensat libc_utimensat
  141. //go:linkname procfcntl libc_fcntl
  142. //go:linkname procfutimesat libc_futimesat
  143. //go:linkname procaccept libc_accept
  144. //go:linkname proc__xnet_recvmsg libc___xnet_recvmsg
  145. //go:linkname proc__xnet_sendmsg libc___xnet_sendmsg
  146. //go:linkname procacct libc_acct
  147. //go:linkname proc__makedev libc___makedev
  148. //go:linkname proc__major libc___major
  149. //go:linkname proc__minor libc___minor
  150. //go:linkname procioctl libc_ioctl
  151. //go:linkname procAccess libc_access
  152. //go:linkname procAdjtime libc_adjtime
  153. //go:linkname procChdir libc_chdir
  154. //go:linkname procChmod libc_chmod
  155. //go:linkname procChown libc_chown
  156. //go:linkname procChroot libc_chroot
  157. //go:linkname procClose libc_close
  158. //go:linkname procCreat libc_creat
  159. //go:linkname procDup libc_dup
  160. //go:linkname procDup2 libc_dup2
  161. //go:linkname procExit libc_exit
  162. //go:linkname procFchdir libc_fchdir
  163. //go:linkname procFchmod libc_fchmod
  164. //go:linkname procFchmodat libc_fchmodat
  165. //go:linkname procFchown libc_fchown
  166. //go:linkname procFchownat libc_fchownat
  167. //go:linkname procFdatasync libc_fdatasync
  168. //go:linkname procFlock libc_flock
  169. //go:linkname procFpathconf libc_fpathconf
  170. //go:linkname procFstat libc_fstat
  171. //go:linkname procFstatvfs libc_fstatvfs
  172. //go:linkname procGetdents libc_getdents
  173. //go:linkname procGetgid libc_getgid
  174. //go:linkname procGetpid libc_getpid
  175. //go:linkname procGetpgid libc_getpgid
  176. //go:linkname procGetpgrp libc_getpgrp
  177. //go:linkname procGeteuid libc_geteuid
  178. //go:linkname procGetegid libc_getegid
  179. //go:linkname procGetppid libc_getppid
  180. //go:linkname procGetpriority libc_getpriority
  181. //go:linkname procGetrlimit libc_getrlimit
  182. //go:linkname procGetrusage libc_getrusage
  183. //go:linkname procGettimeofday libc_gettimeofday
  184. //go:linkname procGetuid libc_getuid
  185. //go:linkname procKill libc_kill
  186. //go:linkname procLchown libc_lchown
  187. //go:linkname procLink libc_link
  188. //go:linkname proc__xnet_llisten libc___xnet_llisten
  189. //go:linkname procLstat libc_lstat
  190. //go:linkname procMadvise libc_madvise
  191. //go:linkname procMkdir libc_mkdir
  192. //go:linkname procMkdirat libc_mkdirat
  193. //go:linkname procMkfifo libc_mkfifo
  194. //go:linkname procMkfifoat libc_mkfifoat
  195. //go:linkname procMknod libc_mknod
  196. //go:linkname procMknodat libc_mknodat
  197. //go:linkname procMlock libc_mlock
  198. //go:linkname procMlockall libc_mlockall
  199. //go:linkname procMprotect libc_mprotect
  200. //go:linkname procMsync libc_msync
  201. //go:linkname procMunlock libc_munlock
  202. //go:linkname procMunlockall libc_munlockall
  203. //go:linkname procNanosleep libc_nanosleep
  204. //go:linkname procOpen libc_open
  205. //go:linkname procOpenat libc_openat
  206. //go:linkname procPathconf libc_pathconf
  207. //go:linkname procPause libc_pause
  208. //go:linkname procPread libc_pread
  209. //go:linkname procPwrite libc_pwrite
  210. //go:linkname procread libc_read
  211. //go:linkname procReadlink libc_readlink
  212. //go:linkname procRename libc_rename
  213. //go:linkname procRenameat libc_renameat
  214. //go:linkname procRmdir libc_rmdir
  215. //go:linkname proclseek libc_lseek
  216. //go:linkname procSetegid libc_setegid
  217. //go:linkname procSeteuid libc_seteuid
  218. //go:linkname procSetgid libc_setgid
  219. //go:linkname procSethostname libc_sethostname
  220. //go:linkname procSetpgid libc_setpgid
  221. //go:linkname procSetpriority libc_setpriority
  222. //go:linkname procSetregid libc_setregid
  223. //go:linkname procSetreuid libc_setreuid
  224. //go:linkname procSetrlimit libc_setrlimit
  225. //go:linkname procSetsid libc_setsid
  226. //go:linkname procSetuid libc_setuid
  227. //go:linkname procshutdown libc_shutdown
  228. //go:linkname procStat libc_stat
  229. //go:linkname procStatvfs libc_statvfs
  230. //go:linkname procSymlink libc_symlink
  231. //go:linkname procSync libc_sync
  232. //go:linkname procTimes libc_times
  233. //go:linkname procTruncate libc_truncate
  234. //go:linkname procFsync libc_fsync
  235. //go:linkname procFtruncate libc_ftruncate
  236. //go:linkname procUmask libc_umask
  237. //go:linkname procUname libc_uname
  238. //go:linkname procumount libc_umount
  239. //go:linkname procUnlink libc_unlink
  240. //go:linkname procUnlinkat libc_unlinkat
  241. //go:linkname procUstat libc_ustat
  242. //go:linkname procUtime libc_utime
  243. //go:linkname proc__xnet_bind libc___xnet_bind
  244. //go:linkname proc__xnet_connect libc___xnet_connect
  245. //go:linkname procmmap libc_mmap
  246. //go:linkname procmunmap libc_munmap
  247. //go:linkname proc__xnet_sendto libc___xnet_sendto
  248. //go:linkname proc__xnet_socket libc___xnet_socket
  249. //go:linkname proc__xnet_socketpair libc___xnet_socketpair
  250. //go:linkname procwrite libc_write
  251. //go:linkname proc__xnet_getsockopt libc___xnet_getsockopt
  252. //go:linkname procgetpeername libc_getpeername
  253. //go:linkname procsetsockopt libc_setsockopt
  254. //go:linkname procrecvfrom libc_recvfrom
  255. var (
  256. procpipe,
  257. procgetsockname,
  258. procGetcwd,
  259. procgetgroups,
  260. procsetgroups,
  261. procwait4,
  262. procgethostname,
  263. procutimes,
  264. procutimensat,
  265. procfcntl,
  266. procfutimesat,
  267. procaccept,
  268. proc__xnet_recvmsg,
  269. proc__xnet_sendmsg,
  270. procacct,
  271. proc__makedev,
  272. proc__major,
  273. proc__minor,
  274. procioctl,
  275. procAccess,
  276. procAdjtime,
  277. procChdir,
  278. procChmod,
  279. procChown,
  280. procChroot,
  281. procClose,
  282. procCreat,
  283. procDup,
  284. procDup2,
  285. procExit,
  286. procFchdir,
  287. procFchmod,
  288. procFchmodat,
  289. procFchown,
  290. procFchownat,
  291. procFdatasync,
  292. procFlock,
  293. procFpathconf,
  294. procFstat,
  295. procFstatvfs,
  296. procGetdents,
  297. procGetgid,
  298. procGetpid,
  299. procGetpgid,
  300. procGetpgrp,
  301. procGeteuid,
  302. procGetegid,
  303. procGetppid,
  304. procGetpriority,
  305. procGetrlimit,
  306. procGetrusage,
  307. procGettimeofday,
  308. procGetuid,
  309. procKill,
  310. procLchown,
  311. procLink,
  312. proc__xnet_llisten,
  313. procLstat,
  314. procMadvise,
  315. procMkdir,
  316. procMkdirat,
  317. procMkfifo,
  318. procMkfifoat,
  319. procMknod,
  320. procMknodat,
  321. procMlock,
  322. procMlockall,
  323. procMprotect,
  324. procMsync,
  325. procMunlock,
  326. procMunlockall,
  327. procNanosleep,
  328. procOpen,
  329. procOpenat,
  330. procPathconf,
  331. procPause,
  332. procPread,
  333. procPwrite,
  334. procread,
  335. procReadlink,
  336. procRename,
  337. procRenameat,
  338. procRmdir,
  339. proclseek,
  340. procSetegid,
  341. procSeteuid,
  342. procSetgid,
  343. procSethostname,
  344. procSetpgid,
  345. procSetpriority,
  346. procSetregid,
  347. procSetreuid,
  348. procSetrlimit,
  349. procSetsid,
  350. procSetuid,
  351. procshutdown,
  352. procStat,
  353. procStatvfs,
  354. procSymlink,
  355. procSync,
  356. procTimes,
  357. procTruncate,
  358. procFsync,
  359. procFtruncate,
  360. procUmask,
  361. procUname,
  362. procumount,
  363. procUnlink,
  364. procUnlinkat,
  365. procUstat,
  366. procUtime,
  367. proc__xnet_bind,
  368. proc__xnet_connect,
  369. procmmap,
  370. procmunmap,
  371. proc__xnet_sendto,
  372. proc__xnet_socket,
  373. proc__xnet_socketpair,
  374. procwrite,
  375. proc__xnet_getsockopt,
  376. procgetpeername,
  377. procsetsockopt,
  378. procrecvfrom syscallFunc
  379. )
  380. func pipe(p *[2]_C_int) (n int, err error) {
  381. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)
  382. n = int(r0)
  383. if e1 != 0 {
  384. err = e1
  385. }
  386. return
  387. }
  388. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  389. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  390. if e1 != 0 {
  391. err = e1
  392. }
  393. return
  394. }
  395. func Getcwd(buf []byte) (n int, err error) {
  396. var _p0 *byte
  397. if len(buf) > 0 {
  398. _p0 = &buf[0]
  399. }
  400. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
  401. n = int(r0)
  402. if e1 != 0 {
  403. err = e1
  404. }
  405. return
  406. }
  407. func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
  408. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
  409. n = int(r0)
  410. if e1 != 0 {
  411. err = e1
  412. }
  413. return
  414. }
  415. func setgroups(ngid int, gid *_Gid_t) (err error) {
  416. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
  417. if e1 != 0 {
  418. err = e1
  419. }
  420. return
  421. }
  422. func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) {
  423. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  424. wpid = int32(r0)
  425. if e1 != 0 {
  426. err = e1
  427. }
  428. return
  429. }
  430. func gethostname(buf []byte) (n int, err error) {
  431. var _p0 *byte
  432. if len(buf) > 0 {
  433. _p0 = &buf[0]
  434. }
  435. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
  436. n = int(r0)
  437. if e1 != 0 {
  438. err = e1
  439. }
  440. return
  441. }
  442. func utimes(path string, times *[2]Timeval) (err error) {
  443. var _p0 *byte
  444. _p0, err = BytePtrFromString(path)
  445. if err != nil {
  446. return
  447. }
  448. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)
  449. if e1 != 0 {
  450. err = e1
  451. }
  452. return
  453. }
  454. func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) {
  455. var _p0 *byte
  456. _p0, err = BytePtrFromString(path)
  457. if err != nil {
  458. return
  459. }
  460. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
  461. if e1 != 0 {
  462. err = e1
  463. }
  464. return
  465. }
  466. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  467. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
  468. val = int(r0)
  469. if e1 != 0 {
  470. err = e1
  471. }
  472. return
  473. }
  474. func futimesat(fildes int, path *byte, times *[2]Timeval) (err error) {
  475. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0)
  476. if e1 != 0 {
  477. err = e1
  478. }
  479. return
  480. }
  481. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  482. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  483. fd = int(r0)
  484. if e1 != 0 {
  485. err = e1
  486. }
  487. return
  488. }
  489. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  490. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
  491. n = int(r0)
  492. if e1 != 0 {
  493. err = e1
  494. }
  495. return
  496. }
  497. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  498. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
  499. n = int(r0)
  500. if e1 != 0 {
  501. err = e1
  502. }
  503. return
  504. }
  505. func acct(path *byte) (err error) {
  506. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0)
  507. if e1 != 0 {
  508. err = e1
  509. }
  510. return
  511. }
  512. func __makedev(version int, major uint, minor uint) (val uint64) {
  513. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__makedev)), 3, uintptr(version), uintptr(major), uintptr(minor), 0, 0, 0)
  514. val = uint64(r0)
  515. return
  516. }
  517. func __major(version int, dev uint64) (val uint) {
  518. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__major)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0)
  519. val = uint(r0)
  520. return
  521. }
  522. func __minor(version int, dev uint64) (val uint) {
  523. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__minor)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0)
  524. val = uint(r0)
  525. return
  526. }
  527. func ioctl(fd int, req uint, arg uintptr) (err error) {
  528. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
  529. if e1 != 0 {
  530. err = e1
  531. }
  532. return
  533. }
  534. func Access(path string, mode uint32) (err error) {
  535. var _p0 *byte
  536. _p0, err = BytePtrFromString(path)
  537. if err != nil {
  538. return
  539. }
  540. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  541. if e1 != 0 {
  542. err = e1
  543. }
  544. return
  545. }
  546. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  547. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)
  548. if e1 != 0 {
  549. err = e1
  550. }
  551. return
  552. }
  553. func Chdir(path string) (err error) {
  554. var _p0 *byte
  555. _p0, err = BytePtrFromString(path)
  556. if err != nil {
  557. return
  558. }
  559. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  560. if e1 != 0 {
  561. err = e1
  562. }
  563. return
  564. }
  565. func Chmod(path string, mode uint32) (err error) {
  566. var _p0 *byte
  567. _p0, err = BytePtrFromString(path)
  568. if err != nil {
  569. return
  570. }
  571. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  572. if e1 != 0 {
  573. err = e1
  574. }
  575. return
  576. }
  577. func Chown(path string, uid int, gid int) (err error) {
  578. var _p0 *byte
  579. _p0, err = BytePtrFromString(path)
  580. if err != nil {
  581. return
  582. }
  583. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
  584. if e1 != 0 {
  585. err = e1
  586. }
  587. return
  588. }
  589. func Chroot(path string) (err error) {
  590. var _p0 *byte
  591. _p0, err = BytePtrFromString(path)
  592. if err != nil {
  593. return
  594. }
  595. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  596. if e1 != 0 {
  597. err = e1
  598. }
  599. return
  600. }
  601. func Close(fd int) (err error) {
  602. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  603. if e1 != 0 {
  604. err = e1
  605. }
  606. return
  607. }
  608. func Creat(path string, mode uint32) (fd int, err error) {
  609. var _p0 *byte
  610. _p0, err = BytePtrFromString(path)
  611. if err != nil {
  612. return
  613. }
  614. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  615. fd = int(r0)
  616. if e1 != 0 {
  617. err = e1
  618. }
  619. return
  620. }
  621. func Dup(fd int) (nfd int, err error) {
  622. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  623. nfd = int(r0)
  624. if e1 != 0 {
  625. err = e1
  626. }
  627. return
  628. }
  629. func Dup2(oldfd int, newfd int) (err error) {
  630. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)
  631. if e1 != 0 {
  632. err = e1
  633. }
  634. return
  635. }
  636. func Exit(code int) {
  637. sysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 0, 0)
  638. return
  639. }
  640. func Fchdir(fd int) (err error) {
  641. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  642. if e1 != 0 {
  643. err = e1
  644. }
  645. return
  646. }
  647. func Fchmod(fd int, mode uint32) (err error) {
  648. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
  649. if e1 != 0 {
  650. err = e1
  651. }
  652. return
  653. }
  654. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  655. var _p0 *byte
  656. _p0, err = BytePtrFromString(path)
  657. if err != nil {
  658. return
  659. }
  660. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  661. if e1 != 0 {
  662. err = e1
  663. }
  664. return
  665. }
  666. func Fchown(fd int, uid int, gid int) (err error) {
  667. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
  668. if e1 != 0 {
  669. err = e1
  670. }
  671. return
  672. }
  673. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  674. var _p0 *byte
  675. _p0, err = BytePtrFromString(path)
  676. if err != nil {
  677. return
  678. }
  679. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  680. if e1 != 0 {
  681. err = e1
  682. }
  683. return
  684. }
  685. func Fdatasync(fd int) (err error) {
  686. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  687. if e1 != 0 {
  688. err = e1
  689. }
  690. return
  691. }
  692. func Flock(fd int, how int) (err error) {
  693. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0)
  694. if e1 != 0 {
  695. err = e1
  696. }
  697. return
  698. }
  699. func Fpathconf(fd int, name int) (val int, err error) {
  700. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
  701. val = int(r0)
  702. if e1 != 0 {
  703. err = e1
  704. }
  705. return
  706. }
  707. func Fstat(fd int, stat *Stat_t) (err error) {
  708. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
  709. if e1 != 0 {
  710. err = e1
  711. }
  712. return
  713. }
  714. func Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) {
  715. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatvfs)), 2, uintptr(fd), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
  716. if e1 != 0 {
  717. err = e1
  718. }
  719. return
  720. }
  721. func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
  722. var _p0 *byte
  723. if len(buf) > 0 {
  724. _p0 = &buf[0]
  725. }
  726. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  727. n = int(r0)
  728. if e1 != 0 {
  729. err = e1
  730. }
  731. return
  732. }
  733. func Getgid() (gid int) {
  734. r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0)
  735. gid = int(r0)
  736. return
  737. }
  738. func Getpid() (pid int) {
  739. r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0)
  740. pid = int(r0)
  741. return
  742. }
  743. func Getpgid(pid int) (pgid int, err error) {
  744. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
  745. pgid = int(r0)
  746. if e1 != 0 {
  747. err = e1
  748. }
  749. return
  750. }
  751. func Getpgrp() (pgid int, err error) {
  752. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0)
  753. pgid = int(r0)
  754. if e1 != 0 {
  755. err = e1
  756. }
  757. return
  758. }
  759. func Geteuid() (euid int) {
  760. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0)
  761. euid = int(r0)
  762. return
  763. }
  764. func Getegid() (egid int) {
  765. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0)
  766. egid = int(r0)
  767. return
  768. }
  769. func Getppid() (ppid int) {
  770. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 0, 0, 0)
  771. ppid = int(r0)
  772. return
  773. }
  774. func Getpriority(which int, who int) (n int, err error) {
  775. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
  776. n = int(r0)
  777. if e1 != 0 {
  778. err = e1
  779. }
  780. return
  781. }
  782. func Getrlimit(which int, lim *Rlimit) (err error) {
  783. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
  784. if e1 != 0 {
  785. err = e1
  786. }
  787. return
  788. }
  789. func Getrusage(who int, rusage *Rusage) (err error) {
  790. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0)
  791. if e1 != 0 {
  792. err = e1
  793. }
  794. return
  795. }
  796. func Gettimeofday(tv *Timeval) (err error) {
  797. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
  798. if e1 != 0 {
  799. err = e1
  800. }
  801. return
  802. }
  803. func Getuid() (uid int) {
  804. r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0)
  805. uid = int(r0)
  806. return
  807. }
  808. func Kill(pid int, signum syscall.Signal) (err error) {
  809. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
  810. if e1 != 0 {
  811. err = e1
  812. }
  813. return
  814. }
  815. func Lchown(path string, uid int, gid int) (err error) {
  816. var _p0 *byte
  817. _p0, err = BytePtrFromString(path)
  818. if err != nil {
  819. return
  820. }
  821. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
  822. if e1 != 0 {
  823. err = e1
  824. }
  825. return
  826. }
  827. func Link(path string, link string) (err error) {
  828. var _p0 *byte
  829. _p0, err = BytePtrFromString(path)
  830. if err != nil {
  831. return
  832. }
  833. var _p1 *byte
  834. _p1, err = BytePtrFromString(link)
  835. if err != nil {
  836. return
  837. }
  838. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
  839. if e1 != 0 {
  840. err = e1
  841. }
  842. return
  843. }
  844. func Listen(s int, backlog int) (err error) {
  845. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
  846. if e1 != 0 {
  847. err = e1
  848. }
  849. return
  850. }
  851. func Lstat(path string, stat *Stat_t) (err error) {
  852. var _p0 *byte
  853. _p0, err = BytePtrFromString(path)
  854. if err != nil {
  855. return
  856. }
  857. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
  858. if e1 != 0 {
  859. err = e1
  860. }
  861. return
  862. }
  863. func Madvise(b []byte, advice int) (err error) {
  864. var _p0 *byte
  865. if len(b) > 0 {
  866. _p0 = &b[0]
  867. }
  868. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMadvise)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0)
  869. if e1 != 0 {
  870. err = e1
  871. }
  872. return
  873. }
  874. func Mkdir(path string, mode uint32) (err error) {
  875. var _p0 *byte
  876. _p0, err = BytePtrFromString(path)
  877. if err != nil {
  878. return
  879. }
  880. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  881. if e1 != 0 {
  882. err = e1
  883. }
  884. return
  885. }
  886. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  887. var _p0 *byte
  888. _p0, err = BytePtrFromString(path)
  889. if err != nil {
  890. return
  891. }
  892. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
  893. if e1 != 0 {
  894. err = e1
  895. }
  896. return
  897. }
  898. func Mkfifo(path string, mode uint32) (err error) {
  899. var _p0 *byte
  900. _p0, err = BytePtrFromString(path)
  901. if err != nil {
  902. return
  903. }
  904. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  905. if e1 != 0 {
  906. err = e1
  907. }
  908. return
  909. }
  910. func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
  911. var _p0 *byte
  912. _p0, err = BytePtrFromString(path)
  913. if err != nil {
  914. return
  915. }
  916. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
  917. if e1 != 0 {
  918. err = e1
  919. }
  920. return
  921. }
  922. func Mknod(path string, mode uint32, dev int) (err error) {
  923. var _p0 *byte
  924. _p0, err = BytePtrFromString(path)
  925. if err != nil {
  926. return
  927. }
  928. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
  929. if e1 != 0 {
  930. err = e1
  931. }
  932. return
  933. }
  934. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  935. var _p0 *byte
  936. _p0, err = BytePtrFromString(path)
  937. if err != nil {
  938. return
  939. }
  940. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  941. if e1 != 0 {
  942. err = e1
  943. }
  944. return
  945. }
  946. func Mlock(b []byte) (err error) {
  947. var _p0 *byte
  948. if len(b) > 0 {
  949. _p0 = &b[0]
  950. }
  951. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
  952. if e1 != 0 {
  953. err = e1
  954. }
  955. return
  956. }
  957. func Mlockall(flags int) (err error) {
  958. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0)
  959. if e1 != 0 {
  960. err = e1
  961. }
  962. return
  963. }
  964. func Mprotect(b []byte, prot int) (err error) {
  965. var _p0 *byte
  966. if len(b) > 0 {
  967. _p0 = &b[0]
  968. }
  969. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMprotect)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(prot), 0, 0, 0)
  970. if e1 != 0 {
  971. err = e1
  972. }
  973. return
  974. }
  975. func Msync(b []byte, flags int) (err error) {
  976. var _p0 *byte
  977. if len(b) > 0 {
  978. _p0 = &b[0]
  979. }
  980. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMsync)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(flags), 0, 0, 0)
  981. if e1 != 0 {
  982. err = e1
  983. }
  984. return
  985. }
  986. func Munlock(b []byte) (err error) {
  987. var _p0 *byte
  988. if len(b) > 0 {
  989. _p0 = &b[0]
  990. }
  991. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
  992. if e1 != 0 {
  993. err = e1
  994. }
  995. return
  996. }
  997. func Munlockall() (err error) {
  998. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0)
  999. if e1 != 0 {
  1000. err = e1
  1001. }
  1002. return
  1003. }
  1004. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1005. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
  1006. if e1 != 0 {
  1007. err = e1
  1008. }
  1009. return
  1010. }
  1011. func Open(path string, mode int, perm uint32) (fd int, err error) {
  1012. var _p0 *byte
  1013. _p0, err = BytePtrFromString(path)
  1014. if err != nil {
  1015. return
  1016. }
  1017. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
  1018. fd = int(r0)
  1019. if e1 != 0 {
  1020. err = e1
  1021. }
  1022. return
  1023. }
  1024. func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  1025. var _p0 *byte
  1026. _p0, err = BytePtrFromString(path)
  1027. if err != nil {
  1028. return
  1029. }
  1030. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  1031. fd = int(r0)
  1032. if e1 != 0 {
  1033. err = e1
  1034. }
  1035. return
  1036. }
  1037. func Pathconf(path string, name int) (val int, err error) {
  1038. var _p0 *byte
  1039. _p0, err = BytePtrFromString(path)
  1040. if err != nil {
  1041. return
  1042. }
  1043. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
  1044. val = int(r0)
  1045. if e1 != 0 {
  1046. err = e1
  1047. }
  1048. return
  1049. }
  1050. func Pause() (err error) {
  1051. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0)
  1052. if e1 != 0 {
  1053. err = e1
  1054. }
  1055. return
  1056. }
  1057. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1058. var _p0 *byte
  1059. if len(p) > 0 {
  1060. _p0 = &p[0]
  1061. }
  1062. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
  1063. n = int(r0)
  1064. if e1 != 0 {
  1065. err = e1
  1066. }
  1067. return
  1068. }
  1069. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1070. var _p0 *byte
  1071. if len(p) > 0 {
  1072. _p0 = &p[0]
  1073. }
  1074. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
  1075. n = int(r0)
  1076. if e1 != 0 {
  1077. err = e1
  1078. }
  1079. return
  1080. }
  1081. func read(fd int, p []byte) (n int, err error) {
  1082. var _p0 *byte
  1083. if len(p) > 0 {
  1084. _p0 = &p[0]
  1085. }
  1086. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
  1087. n = int(r0)
  1088. if e1 != 0 {
  1089. err = e1
  1090. }
  1091. return
  1092. }
  1093. func Readlink(path string, buf []byte) (n int, err error) {
  1094. var _p0 *byte
  1095. _p0, err = BytePtrFromString(path)
  1096. if err != nil {
  1097. return
  1098. }
  1099. var _p1 *byte
  1100. if len(buf) > 0 {
  1101. _p1 = &buf[0]
  1102. }
  1103. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
  1104. n = int(r0)
  1105. if e1 != 0 {
  1106. err = e1
  1107. }
  1108. return
  1109. }
  1110. func Rename(from string, to string) (err error) {
  1111. var _p0 *byte
  1112. _p0, err = BytePtrFromString(from)
  1113. if err != nil {
  1114. return
  1115. }
  1116. var _p1 *byte
  1117. _p1, err = BytePtrFromString(to)
  1118. if err != nil {
  1119. return
  1120. }
  1121. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
  1122. if e1 != 0 {
  1123. err = e1
  1124. }
  1125. return
  1126. }
  1127. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1128. var _p0 *byte
  1129. _p0, err = BytePtrFromString(oldpath)
  1130. if err != nil {
  1131. return
  1132. }
  1133. var _p1 *byte
  1134. _p1, err = BytePtrFromString(newpath)
  1135. if err != nil {
  1136. return
  1137. }
  1138. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1139. if e1 != 0 {
  1140. err = e1
  1141. }
  1142. return
  1143. }
  1144. func Rmdir(path string) (err error) {
  1145. var _p0 *byte
  1146. _p0, err = BytePtrFromString(path)
  1147. if err != nil {
  1148. return
  1149. }
  1150. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  1151. if e1 != 0 {
  1152. err = e1
  1153. }
  1154. return
  1155. }
  1156. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1157. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
  1158. newoffset = int64(r0)
  1159. if e1 != 0 {
  1160. err = e1
  1161. }
  1162. return
  1163. }
  1164. func Setegid(egid int) (err error) {
  1165. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)
  1166. if e1 != 0 {
  1167. err = e1
  1168. }
  1169. return
  1170. }
  1171. func Seteuid(euid int) (err error) {
  1172. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0)
  1173. if e1 != 0 {
  1174. err = e1
  1175. }
  1176. return
  1177. }
  1178. func Setgid(gid int) (err error) {
  1179. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0)
  1180. if e1 != 0 {
  1181. err = e1
  1182. }
  1183. return
  1184. }
  1185. func Sethostname(p []byte) (err error) {
  1186. var _p0 *byte
  1187. if len(p) > 0 {
  1188. _p0 = &p[0]
  1189. }
  1190. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0, 0)
  1191. if e1 != 0 {
  1192. err = e1
  1193. }
  1194. return
  1195. }
  1196. func Setpgid(pid int, pgid int) (err error) {
  1197. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
  1198. if e1 != 0 {
  1199. err = e1
  1200. }
  1201. return
  1202. }
  1203. func Setpriority(which int, who int, prio int) (err error) {
  1204. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
  1205. if e1 != 0 {
  1206. err = e1
  1207. }
  1208. return
  1209. }
  1210. func Setregid(rgid int, egid int) (err error) {
  1211. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
  1212. if e1 != 0 {
  1213. err = e1
  1214. }
  1215. return
  1216. }
  1217. func Setreuid(ruid int, euid int) (err error) {
  1218. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
  1219. if e1 != 0 {
  1220. err = e1
  1221. }
  1222. return
  1223. }
  1224. func Setrlimit(which int, lim *Rlimit) (err error) {
  1225. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
  1226. if e1 != 0 {
  1227. err = e1
  1228. }
  1229. return
  1230. }
  1231. func Setsid() (pid int, err error) {
  1232. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0)
  1233. pid = int(r0)
  1234. if e1 != 0 {
  1235. err = e1
  1236. }
  1237. return
  1238. }
  1239. func Setuid(uid int) (err error) {
  1240. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
  1241. if e1 != 0 {
  1242. err = e1
  1243. }
  1244. return
  1245. }
  1246. func Shutdown(s int, how int) (err error) {
  1247. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
  1248. if e1 != 0 {
  1249. err = e1
  1250. }
  1251. return
  1252. }
  1253. func Stat(path string, stat *Stat_t) (err error) {
  1254. var _p0 *byte
  1255. _p0, err = BytePtrFromString(path)
  1256. if err != nil {
  1257. return
  1258. }
  1259. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
  1260. if e1 != 0 {
  1261. err = e1
  1262. }
  1263. return
  1264. }
  1265. func Statvfs(path string, vfsstat *Statvfs_t) (err error) {
  1266. var _p0 *byte
  1267. _p0, err = BytePtrFromString(path)
  1268. if err != nil {
  1269. return
  1270. }
  1271. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStatvfs)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
  1272. if e1 != 0 {
  1273. err = e1
  1274. }
  1275. return
  1276. }
  1277. func Symlink(path string, link string) (err error) {
  1278. var _p0 *byte
  1279. _p0, err = BytePtrFromString(path)
  1280. if err != nil {
  1281. return
  1282. }
  1283. var _p1 *byte
  1284. _p1, err = BytePtrFromString(link)
  1285. if err != nil {
  1286. return
  1287. }
  1288. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
  1289. if e1 != 0 {
  1290. err = e1
  1291. }
  1292. return
  1293. }
  1294. func Sync() (err error) {
  1295. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0)
  1296. if e1 != 0 {
  1297. err = e1
  1298. }
  1299. return
  1300. }
  1301. func Times(tms *Tms) (ticks uintptr, err error) {
  1302. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0)
  1303. ticks = uintptr(r0)
  1304. if e1 != 0 {
  1305. err = e1
  1306. }
  1307. return
  1308. }
  1309. func Truncate(path string, length int64) (err error) {
  1310. var _p0 *byte
  1311. _p0, err = BytePtrFromString(path)
  1312. if err != nil {
  1313. return
  1314. }
  1315. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
  1316. if e1 != 0 {
  1317. err = e1
  1318. }
  1319. return
  1320. }
  1321. func Fsync(fd int) (err error) {
  1322. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  1323. if e1 != 0 {
  1324. err = e1
  1325. }
  1326. return
  1327. }
  1328. func Ftruncate(fd int, length int64) (err error) {
  1329. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
  1330. if e1 != 0 {
  1331. err = e1
  1332. }
  1333. return
  1334. }
  1335. func Umask(mask int) (oldmask int) {
  1336. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 0, 0)
  1337. oldmask = int(r0)
  1338. return
  1339. }
  1340. func Uname(buf *Utsname) (err error) {
  1341. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0)
  1342. if e1 != 0 {
  1343. err = e1
  1344. }
  1345. return
  1346. }
  1347. func Unmount(target string, flags int) (err error) {
  1348. var _p0 *byte
  1349. _p0, err = BytePtrFromString(target)
  1350. if err != nil {
  1351. return
  1352. }
  1353. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0)
  1354. if e1 != 0 {
  1355. err = e1
  1356. }
  1357. return
  1358. }
  1359. func Unlink(path string) (err error) {
  1360. var _p0 *byte
  1361. _p0, err = BytePtrFromString(path)
  1362. if err != nil {
  1363. return
  1364. }
  1365. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  1366. if e1 != 0 {
  1367. err = e1
  1368. }
  1369. return
  1370. }
  1371. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1372. var _p0 *byte
  1373. _p0, err = BytePtrFromString(path)
  1374. if err != nil {
  1375. return
  1376. }
  1377. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0)
  1378. if e1 != 0 {
  1379. err = e1
  1380. }
  1381. return
  1382. }
  1383. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  1384. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0)
  1385. if e1 != 0 {
  1386. err = e1
  1387. }
  1388. return
  1389. }
  1390. func Utime(path string, buf *Utimbuf) (err error) {
  1391. var _p0 *byte
  1392. _p0, err = BytePtrFromString(path)
  1393. if err != nil {
  1394. return
  1395. }
  1396. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0)
  1397. if e1 != 0 {
  1398. err = e1
  1399. }
  1400. return
  1401. }
  1402. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1403. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
  1404. if e1 != 0 {
  1405. err = e1
  1406. }
  1407. return
  1408. }
  1409. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1410. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
  1411. if e1 != 0 {
  1412. err = e1
  1413. }
  1414. return
  1415. }
  1416. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1417. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
  1418. ret = uintptr(r0)
  1419. if e1 != 0 {
  1420. err = e1
  1421. }
  1422. return
  1423. }
  1424. func munmap(addr uintptr, length uintptr) (err error) {
  1425. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
  1426. if e1 != 0 {
  1427. err = e1
  1428. }
  1429. return
  1430. }
  1431. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1432. var _p0 *byte
  1433. if len(buf) > 0 {
  1434. _p0 = &buf[0]
  1435. }
  1436. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1437. if e1 != 0 {
  1438. err = e1
  1439. }
  1440. return
  1441. }
  1442. func socket(domain int, typ int, proto int) (fd int, err error) {
  1443. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
  1444. fd = int(r0)
  1445. if e1 != 0 {
  1446. err = e1
  1447. }
  1448. return
  1449. }
  1450. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1451. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1452. if e1 != 0 {
  1453. err = e1
  1454. }
  1455. return
  1456. }
  1457. func write(fd int, p []byte) (n int, err error) {
  1458. var _p0 *byte
  1459. if len(p) > 0 {
  1460. _p0 = &p[0]
  1461. }
  1462. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
  1463. n = int(r0)
  1464. if e1 != 0 {
  1465. err = e1
  1466. }
  1467. return
  1468. }
  1469. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1470. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1471. if e1 != 0 {
  1472. err = e1
  1473. }
  1474. return
  1475. }
  1476. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1477. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  1478. if e1 != 0 {
  1479. err = e1
  1480. }
  1481. return
  1482. }
  1483. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1484. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1485. if e1 != 0 {
  1486. err = e1
  1487. }
  1488. return
  1489. }
  1490. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1491. var _p0 *byte
  1492. if len(p) > 0 {
  1493. _p0 = &p[0]
  1494. }
  1495. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1496. n = int(r0)
  1497. if e1 != 0 {
  1498. err = e1
  1499. }
  1500. return
  1501. }