version: 1.10

package syscall

import "syscall"

Overview

Package syscall contains an interface to the low-level operating system
primitives. The details vary depending on the underlying system, and by default,
godoc will display the syscall documentation for the current system. If you want
godoc to display syscall documentation for another system, set $GOOS and $GOARCH
to the desired system. For example, if you want to view documentation for
freebsd/arm on linux/amd64, set $GOOS to freebsd and $GOARCH to arm. The primary
use of syscall is inside other packages that provide a more portable interface
to the system, such as “os”, “time” and “net”. Use those packages rather than
this one if you can. For details of the functions and data types in this package
consult the manuals for the appropriate operating system. These calls return err
== nil to indicate success; otherwise err is an operating system error
describing the failure. On most systems, that error has type syscall.Errno.

NOTE: This package is locked down. Code outside the standard Go repository
should be migrated to use the corresponding package in the golang.org/x/sys
repository. That is also where updates required by new systems or versions
should be applied. Signal, Errno and SysProcAttr are not yet available in
golang.org/x/sys and must still be referenced from the syscall package. See
https://golang.org/s/go1.4-syscall for more information.

Index

Package files

dirent.go endian_little.go env_unix.go exec_linux.go exec_unix.go flock.go lsf_linux.go msan0.go net.go netlink_linux.go setuidgid_linux.go sockcmsg_linux.go sockcmsg_unix.go str.go syscall.go syscall_linux.go syscall_linux_amd64.go syscall_unix.go timestruct.go zerrors_linux_amd64.go zsyscall_linux_amd64.go zsysnum_linux_amd64.go ztypes_linux_amd64.go

Constants

  1. const (
  2. AF_ALG = 0x26
  3. AF_APPLETALK = 0x5
  4. AF_ASH = 0x12
  5. AF_ATMPVC = 0x8
  6. AF_ATMSVC = 0x14
  7. AF_AX25 = 0x3
  8. AF_BLUETOOTH = 0x1f
  9. AF_BRIDGE = 0x7
  10. AF_CAIF = 0x25
  11. AF_CAN = 0x1d
  12. AF_DECnet = 0xc
  13. AF_ECONET = 0x13
  14. AF_FILE = 0x1
  15. AF_IEEE802154 = 0x24
  16. AF_INET = 0x2
  17. AF_INET6 = 0xa
  18. AF_IPX = 0x4
  19. AF_IRDA = 0x17
  20. AF_ISDN = 0x22
  21. AF_IUCV = 0x20
  22. AF_KEY = 0xf
  23. AF_LLC = 0x1a
  24. AF_LOCAL = 0x1
  25. AF_MAX = 0x27
  26. AF_NETBEUI = 0xd
  27. AF_NETLINK = 0x10
  28. AF_NETROM = 0x6
  29. AF_PACKET = 0x11
  30. AF_PHONET = 0x23
  31. AF_PPPOX = 0x18
  32. AF_RDS = 0x15
  33. AF_ROSE = 0xb
  34. AF_ROUTE = 0x10
  35. AF_RXRPC = 0x21
  36. AF_SECURITY = 0xe
  37. AF_SNA = 0x16
  38. AF_TIPC = 0x1e
  39. AF_UNIX = 0x1
  40. AF_UNSPEC = 0x0
  41. AF_WANPIPE = 0x19
  42. AF_X25 = 0x9
  43. ARPHRD_ADAPT = 0x108
  44. ARPHRD_APPLETLK = 0x8
  45. ARPHRD_ARCNET = 0x7
  46. ARPHRD_ASH = 0x30d
  47. ARPHRD_ATM = 0x13
  48. ARPHRD_AX25 = 0x3
  49. ARPHRD_BIF = 0x307
  50. ARPHRD_CHAOS = 0x5
  51. ARPHRD_CISCO = 0x201
  52. ARPHRD_CSLIP = 0x101
  53. ARPHRD_CSLIP6 = 0x103
  54. ARPHRD_DDCMP = 0x205
  55. ARPHRD_DLCI = 0xf
  56. ARPHRD_ECONET = 0x30e
  57. ARPHRD_EETHER = 0x2
  58. ARPHRD_ETHER = 0x1
  59. ARPHRD_EUI64 = 0x1b
  60. ARPHRD_FCAL = 0x311
  61. ARPHRD_FCFABRIC = 0x313
  62. ARPHRD_FCPL = 0x312
  63. ARPHRD_FCPP = 0x310
  64. ARPHRD_FDDI = 0x306
  65. ARPHRD_FRAD = 0x302
  66. ARPHRD_HDLC = 0x201
  67. ARPHRD_HIPPI = 0x30c
  68. ARPHRD_HWX25 = 0x110
  69. ARPHRD_IEEE1394 = 0x18
  70. ARPHRD_IEEE802 = 0x6
  71. ARPHRD_IEEE80211 = 0x321
  72. ARPHRD_IEEE80211_PRISM = 0x322
  73. ARPHRD_IEEE80211_RADIOTAP = 0x323
  74. ARPHRD_IEEE802154 = 0x324
  75. ARPHRD_IEEE802154_PHY = 0x325
  76. ARPHRD_IEEE802_TR = 0x320
  77. ARPHRD_INFINIBAND = 0x20
  78. ARPHRD_IPDDP = 0x309
  79. ARPHRD_IPGRE = 0x30a
  80. ARPHRD_IRDA = 0x30f
  81. ARPHRD_LAPB = 0x204
  82. ARPHRD_LOCALTLK = 0x305
  83. ARPHRD_LOOPBACK = 0x304
  84. ARPHRD_METRICOM = 0x17
  85. ARPHRD_NETROM = 0x0
  86. ARPHRD_NONE = 0xfffe
  87. ARPHRD_PIMREG = 0x30b
  88. ARPHRD_PPP = 0x200
  89. ARPHRD_PRONET = 0x4
  90. ARPHRD_RAWHDLC = 0x206
  91. ARPHRD_ROSE = 0x10e
  92. ARPHRD_RSRVD = 0x104
  93. ARPHRD_SIT = 0x308
  94. ARPHRD_SKIP = 0x303
  95. ARPHRD_SLIP = 0x100
  96. ARPHRD_SLIP6 = 0x102
  97. ARPHRD_TUNNEL = 0x300
  98. ARPHRD_TUNNEL6 = 0x301
  99. ARPHRD_VOID = 0xffff
  100. ARPHRD_X25 = 0x10f
  101. BPF_A = 0x10
  102. BPF_ABS = 0x20
  103. BPF_ADD = 0x0
  104. BPF_ALU = 0x4
  105. BPF_AND = 0x50
  106. BPF_B = 0x10
  107. BPF_DIV = 0x30
  108. BPF_H = 0x8
  109. BPF_IMM = 0x0
  110. BPF_IND = 0x40
  111. BPF_JA = 0x0
  112. BPF_JEQ = 0x10
  113. BPF_JGE = 0x30
  114. BPF_JGT = 0x20
  115. BPF_JMP = 0x5
  116. BPF_JSET = 0x40
  117. BPF_K = 0x0
  118. BPF_LD = 0x0
  119. BPF_LDX = 0x1
  120. BPF_LEN = 0x80
  121. BPF_LSH = 0x60
  122. BPF_MAJOR_VERSION = 0x1
  123. BPF_MAXINSNS = 0x1000
  124. BPF_MEM = 0x60
  125. BPF_MEMWORDS = 0x10
  126. BPF_MINOR_VERSION = 0x1
  127. BPF_MISC = 0x7
  128. BPF_MSH = 0xa0
  129. BPF_MUL = 0x20
  130. BPF_NEG = 0x80
  131. BPF_OR = 0x40
  132. BPF_RET = 0x6
  133. BPF_RSH = 0x70
  134. BPF_ST = 0x2
  135. BPF_STX = 0x3
  136. BPF_SUB = 0x10
  137. BPF_TAX = 0x0
  138. BPF_TXA = 0x80
  139. BPF_W = 0x0
  140. BPF_X = 0x8
  141. CLONE_CHILD_CLEARTID = 0x200000
  142. CLONE_CHILD_SETTID = 0x1000000
  143. CLONE_DETACHED = 0x400000
  144. CLONE_FILES = 0x400
  145. CLONE_FS = 0x200
  146. CLONE_IO = 0x80000000
  147. CLONE_NEWIPC = 0x8000000
  148. CLONE_NEWNET = 0x40000000
  149. CLONE_NEWNS = 0x20000
  150. CLONE_NEWPID = 0x20000000
  151. CLONE_NEWUSER = 0x10000000
  152. CLONE_NEWUTS = 0x4000000
  153. CLONE_PARENT = 0x8000
  154. CLONE_PARENT_SETTID = 0x100000
  155. CLONE_PTRACE = 0x2000
  156. CLONE_SETTLS = 0x80000
  157. CLONE_SIGHAND = 0x800
  158. CLONE_SYSVSEM = 0x40000
  159. CLONE_THREAD = 0x10000
  160. CLONE_UNTRACED = 0x800000
  161. CLONE_VFORK = 0x4000
  162. CLONE_VM = 0x100
  163. DT_BLK = 0x6
  164. DT_CHR = 0x2
  165. DT_DIR = 0x4
  166. DT_FIFO = 0x1
  167. DT_LNK = 0xa
  168. DT_REG = 0x8
  169. DT_SOCK = 0xc
  170. DT_UNKNOWN = 0x0
  171. DT_WHT = 0xe
  172. EPOLLERR = 0x8
  173. EPOLLET = -0x80000000
  174. EPOLLHUP = 0x10
  175. EPOLLIN = 0x1
  176. EPOLLMSG = 0x400
  177. EPOLLONESHOT = 0x40000000
  178. EPOLLOUT = 0x4
  179. EPOLLPRI = 0x2
  180. EPOLLRDBAND = 0x80
  181. EPOLLRDHUP = 0x2000
  182. EPOLLRDNORM = 0x40
  183. EPOLLWRBAND = 0x200
  184. EPOLLWRNORM = 0x100
  185. EPOLL_CLOEXEC = 0x80000
  186. EPOLL_CTL_ADD = 0x1
  187. EPOLL_CTL_DEL = 0x2
  188. EPOLL_CTL_MOD = 0x3
  189. EPOLL_NONBLOCK = 0x800
  190. ETH_P_1588 = 0x88f7
  191. ETH_P_8021Q = 0x8100
  192. ETH_P_802_2 = 0x4
  193. ETH_P_802_3 = 0x1
  194. ETH_P_AARP = 0x80f3
  195. ETH_P_ALL = 0x3
  196. ETH_P_AOE = 0x88a2
  197. ETH_P_ARCNET = 0x1a
  198. ETH_P_ARP = 0x806
  199. ETH_P_ATALK = 0x809b
  200. ETH_P_ATMFATE = 0x8884
  201. ETH_P_ATMMPOA = 0x884c
  202. ETH_P_AX25 = 0x2
  203. ETH_P_BPQ = 0x8ff
  204. ETH_P_CAIF = 0xf7
  205. ETH_P_CAN = 0xc
  206. ETH_P_CONTROL = 0x16
  207. ETH_P_CUST = 0x6006
  208. ETH_P_DDCMP = 0x6
  209. ETH_P_DEC = 0x6000
  210. ETH_P_DIAG = 0x6005
  211. ETH_P_DNA_DL = 0x6001
  212. ETH_P_DNA_RC = 0x6002
  213. ETH_P_DNA_RT = 0x6003
  214. ETH_P_DSA = 0x1b
  215. ETH_P_ECONET = 0x18
  216. ETH_P_EDSA = 0xdada
  217. ETH_P_FCOE = 0x8906
  218. ETH_P_FIP = 0x8914
  219. ETH_P_HDLC = 0x19
  220. ETH_P_IEEE802154 = 0xf6
  221. ETH_P_IEEEPUP = 0xa00
  222. ETH_P_IEEEPUPAT = 0xa01
  223. ETH_P_IP = 0x800
  224. ETH_P_IPV6 = 0x86dd
  225. ETH_P_IPX = 0x8137
  226. ETH_P_IRDA = 0x17
  227. ETH_P_LAT = 0x6004
  228. ETH_P_LINK_CTL = 0x886c
  229. ETH_P_LOCALTALK = 0x9
  230. ETH_P_LOOP = 0x60
  231. ETH_P_MOBITEX = 0x15
  232. ETH_P_MPLS_MC = 0x8848
  233. ETH_P_MPLS_UC = 0x8847
  234. ETH_P_PAE = 0x888e
  235. ETH_P_PAUSE = 0x8808
  236. ETH_P_PHONET = 0xf5
  237. ETH_P_PPPTALK = 0x10
  238. ETH_P_PPP_DISC = 0x8863
  239. ETH_P_PPP_MP = 0x8
  240. ETH_P_PPP_SES = 0x8864
  241. ETH_P_PUP = 0x200
  242. ETH_P_PUPAT = 0x201
  243. ETH_P_RARP = 0x8035
  244. ETH_P_SCA = 0x6007
  245. ETH_P_SLOW = 0x8809
  246. ETH_P_SNAP = 0x5
  247. ETH_P_TEB = 0x6558
  248. ETH_P_TIPC = 0x88ca
  249. ETH_P_TRAILER = 0x1c
  250. ETH_P_TR_802_2 = 0x11
  251. ETH_P_WAN_PPP = 0x7
  252. ETH_P_WCCP = 0x883e
  253. ETH_P_X25 = 0x805
  254. FD_CLOEXEC = 0x1
  255. FD_SETSIZE = 0x400
  256. F_DUPFD = 0x0
  257. F_DUPFD_CLOEXEC = 0x406
  258. F_EXLCK = 0x4
  259. F_GETFD = 0x1
  260. F_GETFL = 0x3
  261. F_GETLEASE = 0x401
  262. F_GETLK = 0x5
  263. F_GETLK64 = 0x5
  264. F_GETOWN = 0x9
  265. F_GETOWN_EX = 0x10
  266. F_GETPIPE_SZ = 0x408
  267. F_GETSIG = 0xb
  268. F_LOCK = 0x1
  269. F_NOTIFY = 0x402
  270. F_OK = 0x0
  271. F_RDLCK = 0x0
  272. F_SETFD = 0x2
  273. F_SETFL = 0x4
  274. F_SETLEASE = 0x400
  275. F_SETLK = 0x6
  276. F_SETLK64 = 0x6
  277. F_SETLKW = 0x7
  278. F_SETLKW64 = 0x7
  279. F_SETOWN = 0x8
  280. F_SETOWN_EX = 0xf
  281. F_SETPIPE_SZ = 0x407
  282. F_SETSIG = 0xa
  283. F_SHLCK = 0x8
  284. F_TEST = 0x3
  285. F_TLOCK = 0x2
  286. F_ULOCK = 0x0
  287. F_UNLCK = 0x2
  288. F_WRLCK = 0x1
  289. ICMPV6_FILTER = 0x1
  290. IFA_F_DADFAILED = 0x8
  291. IFA_F_DEPRECATED = 0x20
  292. IFA_F_HOMEADDRESS = 0x10
  293. IFA_F_NODAD = 0x2
  294. IFA_F_OPTIMISTIC = 0x4
  295. IFA_F_PERMANENT = 0x80
  296. IFA_F_SECONDARY = 0x1
  297. IFA_F_TEMPORARY = 0x1
  298. IFA_F_TENTATIVE = 0x40
  299. IFA_MAX = 0x7
  300. IFF_ALLMULTI = 0x200
  301. IFF_AUTOMEDIA = 0x4000
  302. IFF_BROADCAST = 0x2
  303. IFF_DEBUG = 0x4
  304. IFF_DYNAMIC = 0x8000
  305. IFF_LOOPBACK = 0x8
  306. IFF_MASTER = 0x400
  307. IFF_MULTICAST = 0x1000
  308. IFF_NOARP = 0x80
  309. IFF_NOTRAILERS = 0x20
  310. IFF_NO_PI = 0x1000
  311. IFF_ONE_QUEUE = 0x2000
  312. IFF_POINTOPOINT = 0x10
  313. IFF_PORTSEL = 0x2000
  314. IFF_PROMISC = 0x100
  315. IFF_RUNNING = 0x40
  316. IFF_SLAVE = 0x800
  317. IFF_TAP = 0x2
  318. IFF_TUN = 0x1
  319. IFF_TUN_EXCL = 0x8000
  320. IFF_UP = 0x1
  321. IFF_VNET_HDR = 0x4000
  322. IFNAMSIZ = 0x10
  323. IN_ACCESS = 0x1
  324. IN_ALL_EVENTS = 0xfff
  325. IN_ATTRIB = 0x4
  326. IN_CLASSA_HOST = 0xffffff
  327. IN_CLASSA_MAX = 0x80
  328. IN_CLASSA_NET = 0xff000000
  329. IN_CLASSA_NSHIFT = 0x18
  330. IN_CLASSB_HOST = 0xffff
  331. IN_CLASSB_MAX = 0x10000
  332. IN_CLASSB_NET = 0xffff0000
  333. IN_CLASSB_NSHIFT = 0x10
  334. IN_CLASSC_HOST = 0xff
  335. IN_CLASSC_NET = 0xffffff00
  336. IN_CLASSC_NSHIFT = 0x8
  337. IN_CLOEXEC = 0x80000
  338. IN_CLOSE = 0x18
  339. IN_CLOSE_NOWRITE = 0x10
  340. IN_CLOSE_WRITE = 0x8
  341. IN_CREATE = 0x100
  342. IN_DELETE = 0x200
  343. IN_DELETE_SELF = 0x400
  344. IN_DONT_FOLLOW = 0x2000000
  345. IN_EXCL_UNLINK = 0x4000000
  346. IN_IGNORED = 0x8000
  347. IN_ISDIR = 0x40000000
  348. IN_LOOPBACKNET = 0x7f
  349. IN_MASK_ADD = 0x20000000
  350. IN_MODIFY = 0x2
  351. IN_MOVE = 0xc0
  352. IN_MOVED_FROM = 0x40
  353. IN_MOVED_TO = 0x80
  354. IN_MOVE_SELF = 0x800
  355. IN_NONBLOCK = 0x800
  356. IN_ONESHOT = 0x80000000
  357. IN_ONLYDIR = 0x1000000
  358. IN_OPEN = 0x20
  359. IN_Q_OVERFLOW = 0x4000
  360. IN_UNMOUNT = 0x2000
  361. IPPROTO_AH = 0x33
  362. IPPROTO_COMP = 0x6c
  363. IPPROTO_DCCP = 0x21
  364. IPPROTO_DSTOPTS = 0x3c
  365. IPPROTO_EGP = 0x8
  366. IPPROTO_ENCAP = 0x62
  367. IPPROTO_ESP = 0x32
  368. IPPROTO_FRAGMENT = 0x2c
  369. IPPROTO_GRE = 0x2f
  370. IPPROTO_HOPOPTS = 0x0
  371. IPPROTO_ICMP = 0x1
  372. IPPROTO_ICMPV6 = 0x3a
  373. IPPROTO_IDP = 0x16
  374. IPPROTO_IGMP = 0x2
  375. IPPROTO_IP = 0x0
  376. IPPROTO_IPIP = 0x4
  377. IPPROTO_IPV6 = 0x29
  378. IPPROTO_MTP = 0x5c
  379. IPPROTO_NONE = 0x3b
  380. IPPROTO_PIM = 0x67
  381. IPPROTO_PUP = 0xc
  382. IPPROTO_RAW = 0xff
  383. IPPROTO_ROUTING = 0x2b
  384. IPPROTO_RSVP = 0x2e
  385. IPPROTO_SCTP = 0x84
  386. IPPROTO_TCP = 0x6
  387. IPPROTO_TP = 0x1d
  388. IPPROTO_UDP = 0x11
  389. IPPROTO_UDPLITE = 0x88
  390. IPV6_2292DSTOPTS = 0x4
  391. IPV6_2292HOPLIMIT = 0x8
  392. IPV6_2292HOPOPTS = 0x3
  393. IPV6_2292PKTINFO = 0x2
  394. IPV6_2292PKTOPTIONS = 0x6
  395. IPV6_2292RTHDR = 0x5
  396. IPV6_ADDRFORM = 0x1
  397. IPV6_ADD_MEMBERSHIP = 0x14
  398. IPV6_AUTHHDR = 0xa
  399. IPV6_CHECKSUM = 0x7
  400. IPV6_DROP_MEMBERSHIP = 0x15
  401. IPV6_DSTOPTS = 0x3b
  402. IPV6_HOPLIMIT = 0x34
  403. IPV6_HOPOPTS = 0x36
  404. IPV6_IPSEC_POLICY = 0x22
  405. IPV6_JOIN_ANYCAST = 0x1b
  406. IPV6_JOIN_GROUP = 0x14
  407. IPV6_LEAVE_ANYCAST = 0x1c
  408. IPV6_LEAVE_GROUP = 0x15
  409. IPV6_MTU = 0x18
  410. IPV6_MTU_DISCOVER = 0x17
  411. IPV6_MULTICAST_HOPS = 0x12
  412. IPV6_MULTICAST_IF = 0x11
  413. IPV6_MULTICAST_LOOP = 0x13
  414. IPV6_NEXTHOP = 0x9
  415. IPV6_PKTINFO = 0x32
  416. IPV6_PMTUDISC_DO = 0x2
  417. IPV6_PMTUDISC_DONT = 0x0
  418. IPV6_PMTUDISC_PROBE = 0x3
  419. IPV6_PMTUDISC_WANT = 0x1
  420. IPV6_RECVDSTOPTS = 0x3a
  421. IPV6_RECVERR = 0x19
  422. IPV6_RECVHOPLIMIT = 0x33
  423. IPV6_RECVHOPOPTS = 0x35
  424. IPV6_RECVPKTINFO = 0x31
  425. IPV6_RECVRTHDR = 0x38
  426. IPV6_RECVTCLASS = 0x42
  427. IPV6_ROUTER_ALERT = 0x16
  428. IPV6_RTHDR = 0x39
  429. IPV6_RTHDRDSTOPTS = 0x37
  430. IPV6_RTHDR_LOOSE = 0x0
  431. IPV6_RTHDR_STRICT = 0x1
  432. IPV6_RTHDR_TYPE_0 = 0x0
  433. IPV6_RXDSTOPTS = 0x3b
  434. IPV6_RXHOPOPTS = 0x36
  435. IPV6_TCLASS = 0x43
  436. IPV6_UNICAST_HOPS = 0x10
  437. IPV6_V6ONLY = 0x1a
  438. IPV6_XFRM_POLICY = 0x23
  439. IP_ADD_MEMBERSHIP = 0x23
  440. IP_ADD_SOURCE_MEMBERSHIP = 0x27
  441. IP_BLOCK_SOURCE = 0x26
  442. IP_DEFAULT_MULTICAST_LOOP = 0x1
  443. IP_DEFAULT_MULTICAST_TTL = 0x1
  444. IP_DF = 0x4000
  445. IP_DROP_MEMBERSHIP = 0x24
  446. IP_DROP_SOURCE_MEMBERSHIP = 0x28
  447. IP_FREEBIND = 0xf
  448. IP_HDRINCL = 0x3
  449. IP_IPSEC_POLICY = 0x10
  450. IP_MAXPACKET = 0xffff
  451. IP_MAX_MEMBERSHIPS = 0x14
  452. IP_MF = 0x2000
  453. IP_MINTTL = 0x15
  454. IP_MSFILTER = 0x29
  455. IP_MSS = 0x240
  456. IP_MTU = 0xe
  457. IP_MTU_DISCOVER = 0xa
  458. IP_MULTICAST_IF = 0x20
  459. IP_MULTICAST_LOOP = 0x22
  460. IP_MULTICAST_TTL = 0x21
  461. IP_OFFMASK = 0x1fff
  462. IP_OPTIONS = 0x4
  463. IP_ORIGDSTADDR = 0x14
  464. IP_PASSSEC = 0x12
  465. IP_PKTINFO = 0x8
  466. IP_PKTOPTIONS = 0x9
  467. IP_PMTUDISC = 0xa
  468. IP_PMTUDISC_DO = 0x2
  469. IP_PMTUDISC_DONT = 0x0
  470. IP_PMTUDISC_PROBE = 0x3
  471. IP_PMTUDISC_WANT = 0x1
  472. IP_RECVERR = 0xb
  473. IP_RECVOPTS = 0x6
  474. IP_RECVORIGDSTADDR = 0x14
  475. IP_RECVRETOPTS = 0x7
  476. IP_RECVTOS = 0xd
  477. IP_RECVTTL = 0xc
  478. IP_RETOPTS = 0x7
  479. IP_RF = 0x8000
  480. IP_ROUTER_ALERT = 0x5
  481. IP_TOS = 0x1
  482. IP_TRANSPARENT = 0x13
  483. IP_TTL = 0x2
  484. IP_UNBLOCK_SOURCE = 0x25
  485. IP_XFRM_POLICY = 0x11
  486. LINUX_REBOOT_CMD_CAD_OFF = 0x0
  487. LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
  488. LINUX_REBOOT_CMD_HALT = 0xcdef0123
  489. LINUX_REBOOT_CMD_KEXEC = 0x45584543
  490. LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc
  491. LINUX_REBOOT_CMD_RESTART = 0x1234567
  492. LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4
  493. LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2
  494. LINUX_REBOOT_MAGIC1 = 0xfee1dead
  495. LINUX_REBOOT_MAGIC2 = 0x28121969
  496. LOCK_EX = 0x2
  497. LOCK_NB = 0x4
  498. LOCK_SH = 0x1
  499. LOCK_UN = 0x8
  500. MADV_DOFORK = 0xb
  501. MADV_DONTFORK = 0xa
  502. MADV_DONTNEED = 0x4
  503. MADV_HUGEPAGE = 0xe
  504. MADV_HWPOISON = 0x64
  505. MADV_MERGEABLE = 0xc
  506. MADV_NOHUGEPAGE = 0xf
  507. MADV_NORMAL = 0x0
  508. MADV_RANDOM = 0x1
  509. MADV_REMOVE = 0x9
  510. MADV_SEQUENTIAL = 0x2
  511. MADV_UNMERGEABLE = 0xd
  512. MADV_WILLNEED = 0x3
  513. MAP_32BIT = 0x40
  514. MAP_ANON = 0x20
  515. MAP_ANONYMOUS = 0x20
  516. MAP_DENYWRITE = 0x800
  517. MAP_EXECUTABLE = 0x1000
  518. MAP_FILE = 0x0
  519. MAP_FIXED = 0x10
  520. MAP_GROWSDOWN = 0x100
  521. MAP_HUGETLB = 0x40000
  522. MAP_LOCKED = 0x2000
  523. MAP_NONBLOCK = 0x10000
  524. MAP_NORESERVE = 0x4000
  525. MAP_POPULATE = 0x8000
  526. MAP_PRIVATE = 0x2
  527. MAP_SHARED = 0x1
  528. MAP_STACK = 0x20000
  529. MAP_TYPE = 0xf
  530. MCL_CURRENT = 0x1
  531. MCL_FUTURE = 0x2
  532. MNT_DETACH = 0x2
  533. MNT_EXPIRE = 0x4
  534. MNT_FORCE = 0x1
  535. MSG_CMSG_CLOEXEC = 0x40000000
  536. MSG_CONFIRM = 0x800
  537. MSG_CTRUNC = 0x8
  538. MSG_DONTROUTE = 0x4
  539. MSG_DONTWAIT = 0x40
  540. MSG_EOR = 0x80
  541. MSG_ERRQUEUE = 0x2000
  542. MSG_FASTOPEN = 0x20000000
  543. MSG_FIN = 0x200
  544. MSG_MORE = 0x8000
  545. MSG_NOSIGNAL = 0x4000
  546. MSG_OOB = 0x1
  547. MSG_PEEK = 0x2
  548. MSG_PROXY = 0x10
  549. MSG_RST = 0x1000
  550. MSG_SYN = 0x400
  551. MSG_TRUNC = 0x20
  552. MSG_TRYHARD = 0x4
  553. MSG_WAITALL = 0x100
  554. MSG_WAITFORONE = 0x10000
  555. MS_ACTIVE = 0x40000000
  556. MS_ASYNC = 0x1
  557. MS_BIND = 0x1000
  558. MS_DIRSYNC = 0x80
  559. MS_INVALIDATE = 0x2
  560. MS_I_VERSION = 0x800000
  561. MS_KERNMOUNT = 0x400000
  562. MS_MANDLOCK = 0x40
  563. MS_MGC_MSK = 0xffff0000
  564. MS_MGC_VAL = 0xc0ed0000
  565. MS_MOVE = 0x2000
  566. MS_NOATIME = 0x400
  567. MS_NODEV = 0x4
  568. MS_NODIRATIME = 0x800
  569. MS_NOEXEC = 0x8
  570. MS_NOSUID = 0x2
  571. MS_NOUSER = -0x80000000
  572. MS_POSIXACL = 0x10000
  573. MS_PRIVATE = 0x40000
  574. MS_RDONLY = 0x1
  575. MS_REC = 0x4000
  576. MS_RELATIME = 0x200000
  577. MS_REMOUNT = 0x20
  578. MS_RMT_MASK = 0x800051
  579. MS_SHARED = 0x100000
  580. MS_SILENT = 0x8000
  581. MS_SLAVE = 0x80000
  582. MS_STRICTATIME = 0x1000000
  583. MS_SYNC = 0x4
  584. MS_SYNCHRONOUS = 0x10
  585. MS_UNBINDABLE = 0x20000
  586. NAME_MAX = 0xff
  587. NETLINK_ADD_MEMBERSHIP = 0x1
  588. NETLINK_AUDIT = 0x9
  589. NETLINK_BROADCAST_ERROR = 0x4
  590. NETLINK_CONNECTOR = 0xb
  591. NETLINK_DNRTMSG = 0xe
  592. NETLINK_DROP_MEMBERSHIP = 0x2
  593. NETLINK_ECRYPTFS = 0x13
  594. NETLINK_FIB_LOOKUP = 0xa
  595. NETLINK_FIREWALL = 0x3
  596. NETLINK_GENERIC = 0x10
  597. NETLINK_INET_DIAG = 0x4
  598. NETLINK_IP6_FW = 0xd
  599. NETLINK_ISCSI = 0x8
  600. NETLINK_KOBJECT_UEVENT = 0xf
  601. NETLINK_NETFILTER = 0xc
  602. NETLINK_NFLOG = 0x5
  603. NETLINK_NO_ENOBUFS = 0x5
  604. NETLINK_PKTINFO = 0x3
  605. NETLINK_ROUTE = 0x0
  606. NETLINK_SCSITRANSPORT = 0x12
  607. NETLINK_SELINUX = 0x7
  608. NETLINK_UNUSED = 0x1
  609. NETLINK_USERSOCK = 0x2
  610. NETLINK_XFRM = 0x6
  611. NLA_ALIGNTO = 0x4
  612. NLA_F_NESTED = 0x8000
  613. NLA_F_NET_BYTEORDER = 0x4000
  614. NLA_HDRLEN = 0x4
  615. NLMSG_ALIGNTO = 0x4
  616. NLMSG_DONE = 0x3
  617. NLMSG_ERROR = 0x2
  618. NLMSG_HDRLEN = 0x10
  619. NLMSG_MIN_TYPE = 0x10
  620. NLMSG_NOOP = 0x1
  621. NLMSG_OVERRUN = 0x4
  622. NLM_F_ACK = 0x4
  623. NLM_F_APPEND = 0x800
  624. NLM_F_ATOMIC = 0x400
  625. NLM_F_CREATE = 0x400
  626. NLM_F_DUMP = 0x300
  627. NLM_F_ECHO = 0x8
  628. NLM_F_EXCL = 0x200
  629. NLM_F_MATCH = 0x200
  630. NLM_F_MULTI = 0x2
  631. NLM_F_REPLACE = 0x100
  632. NLM_F_REQUEST = 0x1
  633. NLM_F_ROOT = 0x100
  634. O_ACCMODE = 0x3
  635. O_APPEND = 0x400
  636. O_ASYNC = 0x2000
  637. O_CLOEXEC = 0x80000
  638. O_CREAT = 0x40
  639. O_DIRECT = 0x4000
  640. O_DIRECTORY = 0x10000
  641. O_DSYNC = 0x1000
  642. O_EXCL = 0x80
  643. O_FSYNC = 0x101000
  644. O_LARGEFILE = 0x0
  645. O_NDELAY = 0x800
  646. O_NOATIME = 0x40000
  647. O_NOCTTY = 0x100
  648. O_NOFOLLOW = 0x20000
  649. O_NONBLOCK = 0x800
  650. O_RDONLY = 0x0
  651. O_RDWR = 0x2
  652. O_RSYNC = 0x101000
  653. O_SYNC = 0x101000
  654. O_TRUNC = 0x200
  655. O_WRONLY = 0x1
  656. PACKET_ADD_MEMBERSHIP = 0x1
  657. PACKET_BROADCAST = 0x1
  658. PACKET_DROP_MEMBERSHIP = 0x2
  659. PACKET_FASTROUTE = 0x6
  660. PACKET_HOST = 0x0
  661. PACKET_LOOPBACK = 0x5
  662. PACKET_MR_ALLMULTI = 0x2
  663. PACKET_MR_MULTICAST = 0x0
  664. PACKET_MR_PROMISC = 0x1
  665. PACKET_MULTICAST = 0x2
  666. PACKET_OTHERHOST = 0x3
  667. PACKET_OUTGOING = 0x4
  668. PACKET_RECV_OUTPUT = 0x3
  669. PACKET_RX_RING = 0x5
  670. PACKET_STATISTICS = 0x6
  671. PRIO_PGRP = 0x1
  672. PRIO_PROCESS = 0x0
  673. PRIO_USER = 0x2
  674. PROT_EXEC = 0x4
  675. PROT_GROWSDOWN = 0x1000000
  676. PROT_GROWSUP = 0x2000000
  677. PROT_NONE = 0x0
  678. PROT_READ = 0x1
  679. PROT_WRITE = 0x2
  680. PR_CAPBSET_DROP = 0x18
  681. PR_CAPBSET_READ = 0x17
  682. PR_ENDIAN_BIG = 0x0
  683. PR_ENDIAN_LITTLE = 0x1
  684. PR_ENDIAN_PPC_LITTLE = 0x2
  685. PR_FPEMU_NOPRINT = 0x1
  686. PR_FPEMU_SIGFPE = 0x2
  687. PR_FP_EXC_ASYNC = 0x2
  688. PR_FP_EXC_DISABLED = 0x0
  689. PR_FP_EXC_DIV = 0x10000
  690. PR_FP_EXC_INV = 0x100000
  691. PR_FP_EXC_NONRECOV = 0x1
  692. PR_FP_EXC_OVF = 0x20000
  693. PR_FP_EXC_PRECISE = 0x3
  694. PR_FP_EXC_RES = 0x80000
  695. PR_FP_EXC_SW_ENABLE = 0x80
  696. PR_FP_EXC_UND = 0x40000
  697. PR_GET_DUMPABLE = 0x3
  698. PR_GET_ENDIAN = 0x13
  699. PR_GET_FPEMU = 0x9
  700. PR_GET_FPEXC = 0xb
  701. PR_GET_KEEPCAPS = 0x7
  702. PR_GET_NAME = 0x10
  703. PR_GET_PDEATHSIG = 0x2
  704. PR_GET_SECCOMP = 0x15
  705. PR_GET_SECUREBITS = 0x1b
  706. PR_GET_TIMERSLACK = 0x1e
  707. PR_GET_TIMING = 0xd
  708. PR_GET_TSC = 0x19
  709. PR_GET_UNALIGN = 0x5
  710. PR_MCE_KILL = 0x21
  711. PR_MCE_KILL_CLEAR = 0x0
  712. PR_MCE_KILL_DEFAULT = 0x2
  713. PR_MCE_KILL_EARLY = 0x1
  714. PR_MCE_KILL_GET = 0x22
  715. PR_MCE_KILL_LATE = 0x0
  716. PR_MCE_KILL_SET = 0x1
  717. PR_SET_DUMPABLE = 0x4
  718. PR_SET_ENDIAN = 0x14
  719. PR_SET_FPEMU = 0xa
  720. PR_SET_FPEXC = 0xc
  721. PR_SET_KEEPCAPS = 0x8
  722. PR_SET_NAME = 0xf
  723. PR_SET_PDEATHSIG = 0x1
  724. PR_SET_PTRACER = 0x59616d61
  725. PR_SET_SECCOMP = 0x16
  726. PR_SET_SECUREBITS = 0x1c
  727. PR_SET_TIMERSLACK = 0x1d
  728. PR_SET_TIMING = 0xe
  729. PR_SET_TSC = 0x1a
  730. PR_SET_UNALIGN = 0x6
  731. PR_TASK_PERF_EVENTS_DISABLE = 0x1f
  732. PR_TASK_PERF_EVENTS_ENABLE = 0x20
  733. PR_TIMING_STATISTICAL = 0x0
  734. PR_TIMING_TIMESTAMP = 0x1
  735. PR_TSC_ENABLE = 0x1
  736. PR_TSC_SIGSEGV = 0x2
  737. PR_UNALIGN_NOPRINT = 0x1
  738. PR_UNALIGN_SIGBUS = 0x2
  739. PTRACE_ARCH_PRCTL = 0x1e
  740. PTRACE_ATTACH = 0x10
  741. PTRACE_CONT = 0x7
  742. PTRACE_DETACH = 0x11
  743. PTRACE_EVENT_CLONE = 0x3
  744. PTRACE_EVENT_EXEC = 0x4
  745. PTRACE_EVENT_EXIT = 0x6
  746. PTRACE_EVENT_FORK = 0x1
  747. PTRACE_EVENT_VFORK = 0x2
  748. PTRACE_EVENT_VFORK_DONE = 0x5
  749. PTRACE_GETEVENTMSG = 0x4201
  750. PTRACE_GETFPREGS = 0xe
  751. PTRACE_GETFPXREGS = 0x12
  752. PTRACE_GETREGS = 0xc
  753. PTRACE_GETREGSET = 0x4204
  754. PTRACE_GETSIGINFO = 0x4202
  755. PTRACE_GET_THREAD_AREA = 0x19
  756. PTRACE_KILL = 0x8
  757. PTRACE_OLDSETOPTIONS = 0x15
  758. PTRACE_O_MASK = 0x7f
  759. PTRACE_O_TRACECLONE = 0x8
  760. PTRACE_O_TRACEEXEC = 0x10
  761. PTRACE_O_TRACEEXIT = 0x40
  762. PTRACE_O_TRACEFORK = 0x2
  763. PTRACE_O_TRACESYSGOOD = 0x1
  764. PTRACE_O_TRACEVFORK = 0x4
  765. PTRACE_O_TRACEVFORKDONE = 0x20
  766. PTRACE_PEEKDATA = 0x2
  767. PTRACE_PEEKTEXT = 0x1
  768. PTRACE_PEEKUSR = 0x3
  769. PTRACE_POKEDATA = 0x5
  770. PTRACE_POKETEXT = 0x4
  771. PTRACE_POKEUSR = 0x6
  772. PTRACE_SETFPREGS = 0xf
  773. PTRACE_SETFPXREGS = 0x13
  774. PTRACE_SETOPTIONS = 0x4200
  775. PTRACE_SETREGS = 0xd
  776. PTRACE_SETREGSET = 0x4205
  777. PTRACE_SETSIGINFO = 0x4203
  778. PTRACE_SET_THREAD_AREA = 0x1a
  779. PTRACE_SINGLEBLOCK = 0x21
  780. PTRACE_SINGLESTEP = 0x9
  781. PTRACE_SYSCALL = 0x18
  782. PTRACE_SYSEMU = 0x1f
  783. PTRACE_SYSEMU_SINGLESTEP = 0x20
  784. PTRACE_TRACEME = 0x0
  785. RLIMIT_AS = 0x9
  786. RLIMIT_CORE = 0x4
  787. RLIMIT_CPU = 0x0
  788. RLIMIT_DATA = 0x2
  789. RLIMIT_FSIZE = 0x1
  790. RLIMIT_NOFILE = 0x7
  791. RLIMIT_STACK = 0x3
  792. RLIM_INFINITY = -0x1
  793. RTAX_ADVMSS = 0x8
  794. RTAX_CWND = 0x7
  795. RTAX_FEATURES = 0xc
  796. RTAX_FEATURE_ALLFRAG = 0x8
  797. RTAX_FEATURE_ECN = 0x1
  798. RTAX_FEATURE_SACK = 0x2
  799. RTAX_FEATURE_TIMESTAMP = 0x4
  800. RTAX_HOPLIMIT = 0xa
  801. RTAX_INITCWND = 0xb
  802. RTAX_INITRWND = 0xe
  803. RTAX_LOCK = 0x1
  804. RTAX_MAX = 0xe
  805. RTAX_MTU = 0x2
  806. RTAX_REORDERING = 0x9
  807. RTAX_RTO_MIN = 0xd
  808. RTAX_RTT = 0x4
  809. RTAX_RTTVAR = 0x5
  810. RTAX_SSTHRESH = 0x6
  811. RTAX_UNSPEC = 0x0
  812. RTAX_WINDOW = 0x3
  813. RTA_ALIGNTO = 0x4
  814. RTA_MAX = 0x10
  815. RTCF_DIRECTSRC = 0x4000000
  816. RTCF_DOREDIRECT = 0x1000000
  817. RTCF_LOG = 0x2000000
  818. RTCF_MASQ = 0x400000
  819. RTCF_NAT = 0x800000
  820. RTCF_VALVE = 0x200000
  821. RTF_ADDRCLASSMASK = 0xf8000000
  822. RTF_ADDRCONF = 0x40000
  823. RTF_ALLONLINK = 0x20000
  824. RTF_BROADCAST = 0x10000000
  825. RTF_CACHE = 0x1000000
  826. RTF_DEFAULT = 0x10000
  827. RTF_DYNAMIC = 0x10
  828. RTF_FLOW = 0x2000000
  829. RTF_GATEWAY = 0x2
  830. RTF_HOST = 0x4
  831. RTF_INTERFACE = 0x40000000
  832. RTF_IRTT = 0x100
  833. RTF_LINKRT = 0x100000
  834. RTF_LOCAL = 0x80000000
  835. RTF_MODIFIED = 0x20
  836. RTF_MSS = 0x40
  837. RTF_MTU = 0x40
  838. RTF_MULTICAST = 0x20000000
  839. RTF_NAT = 0x8000000
  840. RTF_NOFORWARD = 0x1000
  841. RTF_NONEXTHOP = 0x200000
  842. RTF_NOPMTUDISC = 0x4000
  843. RTF_POLICY = 0x4000000
  844. RTF_REINSTATE = 0x8
  845. RTF_REJECT = 0x200
  846. RTF_STATIC = 0x400
  847. RTF_THROW = 0x2000
  848. RTF_UP = 0x1
  849. RTF_WINDOW = 0x80
  850. RTF_XRESOLVE = 0x800
  851. RTM_BASE = 0x10
  852. RTM_DELACTION = 0x31
  853. RTM_DELADDR = 0x15
  854. RTM_DELADDRLABEL = 0x49
  855. RTM_DELLINK = 0x11
  856. RTM_DELNEIGH = 0x1d
  857. RTM_DELQDISC = 0x25
  858. RTM_DELROUTE = 0x19
  859. RTM_DELRULE = 0x21
  860. RTM_DELTCLASS = 0x29
  861. RTM_DELTFILTER = 0x2d
  862. RTM_F_CLONED = 0x200
  863. RTM_F_EQUALIZE = 0x400
  864. RTM_F_NOTIFY = 0x100
  865. RTM_F_PREFIX = 0x800
  866. RTM_GETACTION = 0x32
  867. RTM_GETADDR = 0x16
  868. RTM_GETADDRLABEL = 0x4a
  869. RTM_GETANYCAST = 0x3e
  870. RTM_GETDCB = 0x4e
  871. RTM_GETLINK = 0x12
  872. RTM_GETMULTICAST = 0x3a
  873. RTM_GETNEIGH = 0x1e
  874. RTM_GETNEIGHTBL = 0x42
  875. RTM_GETQDISC = 0x26
  876. RTM_GETROUTE = 0x1a
  877. RTM_GETRULE = 0x22
  878. RTM_GETTCLASS = 0x2a
  879. RTM_GETTFILTER = 0x2e
  880. RTM_MAX = 0x4f
  881. RTM_NEWACTION = 0x30
  882. RTM_NEWADDR = 0x14
  883. RTM_NEWADDRLABEL = 0x48
  884. RTM_NEWLINK = 0x10
  885. RTM_NEWNDUSEROPT = 0x44
  886. RTM_NEWNEIGH = 0x1c
  887. RTM_NEWNEIGHTBL = 0x40
  888. RTM_NEWPREFIX = 0x34
  889. RTM_NEWQDISC = 0x24
  890. RTM_NEWROUTE = 0x18
  891. RTM_NEWRULE = 0x20
  892. RTM_NEWTCLASS = 0x28
  893. RTM_NEWTFILTER = 0x2c
  894. RTM_NR_FAMILIES = 0x10
  895. RTM_NR_MSGTYPES = 0x40
  896. RTM_SETDCB = 0x4f
  897. RTM_SETLINK = 0x13
  898. RTM_SETNEIGHTBL = 0x43
  899. RTNH_ALIGNTO = 0x4
  900. RTNH_F_DEAD = 0x1
  901. RTNH_F_ONLINK = 0x4
  902. RTNH_F_PERVASIVE = 0x2
  903. RTN_MAX = 0xb
  904. RTPROT_BIRD = 0xc
  905. RTPROT_BOOT = 0x3
  906. RTPROT_DHCP = 0x10
  907. RTPROT_DNROUTED = 0xd
  908. RTPROT_GATED = 0x8
  909. RTPROT_KERNEL = 0x2
  910. RTPROT_MRT = 0xa
  911. RTPROT_NTK = 0xf
  912. RTPROT_RA = 0x9
  913. RTPROT_REDIRECT = 0x1
  914. RTPROT_STATIC = 0x4
  915. RTPROT_UNSPEC = 0x0
  916. RTPROT_XORP = 0xe
  917. RTPROT_ZEBRA = 0xb
  918. RT_CLASS_DEFAULT = 0xfd
  919. RT_CLASS_LOCAL = 0xff
  920. RT_CLASS_MAIN = 0xfe
  921. RT_CLASS_MAX = 0xff
  922. RT_CLASS_UNSPEC = 0x0
  923. RUSAGE_CHILDREN = -0x1
  924. RUSAGE_SELF = 0x0
  925. RUSAGE_THREAD = 0x1
  926. SCM_CREDENTIALS = 0x2
  927. SCM_RIGHTS = 0x1
  928. SCM_TIMESTAMP = 0x1d
  929. SCM_TIMESTAMPING = 0x25
  930. SCM_TIMESTAMPNS = 0x23
  931. SHUT_RD = 0x0
  932. SHUT_RDWR = 0x2
  933. SHUT_WR = 0x1
  934. SIOCADDDLCI = 0x8980
  935. SIOCADDMULTI = 0x8931
  936. SIOCADDRT = 0x890b
  937. SIOCATMARK = 0x8905
  938. SIOCDARP = 0x8953
  939. SIOCDELDLCI = 0x8981
  940. SIOCDELMULTI = 0x8932
  941. SIOCDELRT = 0x890c
  942. SIOCDEVPRIVATE = 0x89f0
  943. SIOCDIFADDR = 0x8936
  944. SIOCDRARP = 0x8960
  945. SIOCGARP = 0x8954
  946. SIOCGIFADDR = 0x8915
  947. SIOCGIFBR = 0x8940
  948. SIOCGIFBRDADDR = 0x8919
  949. SIOCGIFCONF = 0x8912
  950. SIOCGIFCOUNT = 0x8938
  951. SIOCGIFDSTADDR = 0x8917
  952. SIOCGIFENCAP = 0x8925
  953. SIOCGIFFLAGS = 0x8913
  954. SIOCGIFHWADDR = 0x8927
  955. SIOCGIFINDEX = 0x8933
  956. SIOCGIFMAP = 0x8970
  957. SIOCGIFMEM = 0x891f
  958. SIOCGIFMETRIC = 0x891d
  959. SIOCGIFMTU = 0x8921
  960. SIOCGIFNAME = 0x8910
  961. SIOCGIFNETMASK = 0x891b
  962. SIOCGIFPFLAGS = 0x8935
  963. SIOCGIFSLAVE = 0x8929
  964. SIOCGIFTXQLEN = 0x8942
  965. SIOCGPGRP = 0x8904
  966. SIOCGRARP = 0x8961
  967. SIOCGSTAMP = 0x8906
  968. SIOCGSTAMPNS = 0x8907
  969. SIOCPROTOPRIVATE = 0x89e0
  970. SIOCRTMSG = 0x890d
  971. SIOCSARP = 0x8955
  972. SIOCSIFADDR = 0x8916
  973. SIOCSIFBR = 0x8941
  974. SIOCSIFBRDADDR = 0x891a
  975. SIOCSIFDSTADDR = 0x8918
  976. SIOCSIFENCAP = 0x8926
  977. SIOCSIFFLAGS = 0x8914
  978. SIOCSIFHWADDR = 0x8924
  979. SIOCSIFHWBROADCAST = 0x8937
  980. SIOCSIFLINK = 0x8911
  981. SIOCSIFMAP = 0x8971
  982. SIOCSIFMEM = 0x8920
  983. SIOCSIFMETRIC = 0x891e
  984. SIOCSIFMTU = 0x8922
  985. SIOCSIFNAME = 0x8923
  986. SIOCSIFNETMASK = 0x891c
  987. SIOCSIFPFLAGS = 0x8934
  988. SIOCSIFSLAVE = 0x8930
  989. SIOCSIFTXQLEN = 0x8943
  990. SIOCSPGRP = 0x8902
  991. SIOCSRARP = 0x8962
  992. SOCK_CLOEXEC = 0x80000
  993. SOCK_DCCP = 0x6
  994. SOCK_DGRAM = 0x2
  995. SOCK_NONBLOCK = 0x800
  996. SOCK_PACKET = 0xa
  997. SOCK_RAW = 0x3
  998. SOCK_RDM = 0x4
  999. SOCK_SEQPACKET = 0x5
  1000. SOCK_STREAM = 0x1
  1001. SOL_AAL = 0x109
  1002. SOL_ATM = 0x108
  1003. SOL_DECNET = 0x105
  1004. SOL_ICMPV6 = 0x3a
  1005. SOL_IP = 0x0
  1006. SOL_IPV6 = 0x29
  1007. SOL_IRDA = 0x10a
  1008. SOL_PACKET = 0x107
  1009. SOL_RAW = 0xff
  1010. SOL_SOCKET = 0x1
  1011. SOL_TCP = 0x6
  1012. SOL_X25 = 0x106
  1013. SOMAXCONN = 0x80
  1014. SO_ACCEPTCONN = 0x1e
  1015. SO_ATTACH_FILTER = 0x1a
  1016. SO_BINDTODEVICE = 0x19
  1017. SO_BROADCAST = 0x6
  1018. SO_BSDCOMPAT = 0xe
  1019. SO_DEBUG = 0x1
  1020. SO_DETACH_FILTER = 0x1b
  1021. SO_DOMAIN = 0x27
  1022. SO_DONTROUTE = 0x5
  1023. SO_ERROR = 0x4
  1024. SO_KEEPALIVE = 0x9
  1025. SO_LINGER = 0xd
  1026. SO_MARK = 0x24
  1027. SO_NO_CHECK = 0xb
  1028. SO_OOBINLINE = 0xa
  1029. SO_PASSCRED = 0x10
  1030. SO_PASSSEC = 0x22
  1031. SO_PEERCRED = 0x11
  1032. SO_PEERNAME = 0x1c
  1033. SO_PEERSEC = 0x1f
  1034. SO_PRIORITY = 0xc
  1035. SO_PROTOCOL = 0x26
  1036. SO_RCVBUF = 0x8
  1037. SO_RCVBUFFORCE = 0x21
  1038. SO_RCVLOWAT = 0x12
  1039. SO_RCVTIMEO = 0x14
  1040. SO_REUSEADDR = 0x2
  1041. SO_RXQ_OVFL = 0x28
  1042. SO_SECURITY_AUTHENTICATION = 0x16
  1043. SO_SECURITY_ENCRYPTION_NETWORK = 0x18
  1044. SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
  1045. SO_SNDBUF = 0x7
  1046. SO_SNDBUFFORCE = 0x20
  1047. SO_SNDLOWAT = 0x13
  1048. SO_SNDTIMEO = 0x15
  1049. SO_TIMESTAMP = 0x1d
  1050. SO_TIMESTAMPING = 0x25
  1051. SO_TIMESTAMPNS = 0x23
  1052. SO_TYPE = 0x3
  1053. S_BLKSIZE = 0x200
  1054. S_IEXEC = 0x40
  1055. S_IFBLK = 0x6000
  1056. S_IFCHR = 0x2000
  1057. S_IFDIR = 0x4000
  1058. S_IFIFO = 0x1000
  1059. S_IFLNK = 0xa000
  1060. S_IFMT = 0xf000
  1061. S_IFREG = 0x8000
  1062. S_IFSOCK = 0xc000
  1063. S_IREAD = 0x100
  1064. S_IRGRP = 0x20
  1065. S_IROTH = 0x4
  1066. S_IRUSR = 0x100
  1067. S_IRWXG = 0x38
  1068. S_IRWXO = 0x7
  1069. S_IRWXU = 0x1c0
  1070. S_ISGID = 0x400
  1071. S_ISUID = 0x800
  1072. S_ISVTX = 0x200
  1073. S_IWGRP = 0x10
  1074. S_IWOTH = 0x2
  1075. S_IWRITE = 0x80
  1076. S_IWUSR = 0x80
  1077. S_IXGRP = 0x8
  1078. S_IXOTH = 0x1
  1079. S_IXUSR = 0x40
  1080. TCIFLUSH = 0x0
  1081. TCIOFLUSH = 0x2
  1082. TCOFLUSH = 0x1
  1083. TCP_CONGESTION = 0xd
  1084. TCP_CORK = 0x3
  1085. TCP_DEFER_ACCEPT = 0x9
  1086. TCP_INFO = 0xb
  1087. TCP_KEEPCNT = 0x6
  1088. TCP_KEEPIDLE = 0x4
  1089. TCP_KEEPINTVL = 0x5
  1090. TCP_LINGER2 = 0x8
  1091. TCP_MAXSEG = 0x2
  1092. TCP_MAXWIN = 0xffff
  1093. TCP_MAX_WINSHIFT = 0xe
  1094. TCP_MD5SIG = 0xe
  1095. TCP_MD5SIG_MAXKEYLEN = 0x50
  1096. TCP_MSS = 0x200
  1097. TCP_NODELAY = 0x1
  1098. TCP_QUICKACK = 0xc
  1099. TCP_SYNCNT = 0x7
  1100. TCP_WINDOW_CLAMP = 0xa
  1101. TIOCCBRK = 0x5428
  1102. TIOCCONS = 0x541d
  1103. TIOCEXCL = 0x540c
  1104. TIOCGDEV = 0x80045432
  1105. TIOCGETD = 0x5424
  1106. TIOCGICOUNT = 0x545d
  1107. TIOCGLCKTRMIOS = 0x5456
  1108. TIOCGPGRP = 0x540f
  1109. TIOCGPTN = 0x80045430
  1110. TIOCGRS485 = 0x542e
  1111. TIOCGSERIAL = 0x541e
  1112. TIOCGSID = 0x5429
  1113. TIOCGSOFTCAR = 0x5419
  1114. TIOCGWINSZ = 0x5413
  1115. TIOCINQ = 0x541b
  1116. TIOCLINUX = 0x541c
  1117. TIOCMBIC = 0x5417
  1118. TIOCMBIS = 0x5416
  1119. TIOCMGET = 0x5415
  1120. TIOCMIWAIT = 0x545c
  1121. TIOCMSET = 0x5418
  1122. TIOCM_CAR = 0x40
  1123. TIOCM_CD = 0x40
  1124. TIOCM_CTS = 0x20
  1125. TIOCM_DSR = 0x100
  1126. TIOCM_DTR = 0x2
  1127. TIOCM_LE = 0x1
  1128. TIOCM_RI = 0x80
  1129. TIOCM_RNG = 0x80
  1130. TIOCM_RTS = 0x4
  1131. TIOCM_SR = 0x10
  1132. TIOCM_ST = 0x8
  1133. TIOCNOTTY = 0x5422
  1134. TIOCNXCL = 0x540d
  1135. TIOCOUTQ = 0x5411
  1136. TIOCPKT = 0x5420
  1137. TIOCPKT_DATA = 0x0
  1138. TIOCPKT_DOSTOP = 0x20
  1139. TIOCPKT_FLUSHREAD = 0x1
  1140. TIOCPKT_FLUSHWRITE = 0x2
  1141. TIOCPKT_IOCTL = 0x40
  1142. TIOCPKT_NOSTOP = 0x10
  1143. TIOCPKT_START = 0x8
  1144. TIOCPKT_STOP = 0x4
  1145. TIOCSBRK = 0x5427
  1146. TIOCSCTTY = 0x540e
  1147. TIOCSERCONFIG = 0x5453
  1148. TIOCSERGETLSR = 0x5459
  1149. TIOCSERGETMULTI = 0x545a
  1150. TIOCSERGSTRUCT = 0x5458
  1151. TIOCSERGWILD = 0x5454
  1152. TIOCSERSETMULTI = 0x545b
  1153. TIOCSERSWILD = 0x5455
  1154. TIOCSER_TEMT = 0x1
  1155. TIOCSETD = 0x5423
  1156. TIOCSIG = 0x40045436
  1157. TIOCSLCKTRMIOS = 0x5457
  1158. TIOCSPGRP = 0x5410
  1159. TIOCSPTLCK = 0x40045431
  1160. TIOCSRS485 = 0x542f
  1161. TIOCSSERIAL = 0x541f
  1162. TIOCSSOFTCAR = 0x541a
  1163. TIOCSTI = 0x5412
  1164. TIOCSWINSZ = 0x5414
  1165. TUNATTACHFILTER = 0x401054d5
  1166. TUNDETACHFILTER = 0x401054d6
  1167. TUNGETFEATURES = 0x800454cf
  1168. TUNGETIFF = 0x800454d2
  1169. TUNGETSNDBUF = 0x800454d3
  1170. TUNGETVNETHDRSZ = 0x800454d7
  1171. TUNSETDEBUG = 0x400454c9
  1172. TUNSETGROUP = 0x400454ce
  1173. TUNSETIFF = 0x400454ca
  1174. TUNSETLINK = 0x400454cd
  1175. TUNSETNOCSUM = 0x400454c8
  1176. TUNSETOFFLOAD = 0x400454d0
  1177. TUNSETOWNER = 0x400454cc
  1178. TUNSETPERSIST = 0x400454cb
  1179. TUNSETSNDBUF = 0x400454d4
  1180. TUNSETTXFILTER = 0x400454d1
  1181. TUNSETVNETHDRSZ = 0x400454d8
  1182. WALL = 0x40000000
  1183. WCLONE = 0x80000000
  1184. WCONTINUED = 0x8
  1185. WEXITED = 0x4
  1186. WNOHANG = 0x1
  1187. WNOTHREAD = 0x20000000
  1188. WNOWAIT = 0x1000000
  1189. WORDSIZE = 0x40
  1190. WSTOPPED = 0x2
  1191. WUNTRACED = 0x2
  1192. )
const (
    E2BIG           = Errno(0x7)
    EACCES          = Errno(0xd)
    EADDRINUSE      = Errno(0x62)
    EADDRNOTAVAIL   = Errno(0x63)
    EADV            = Errno(0x44)
    EAFNOSUPPORT    = Errno(0x61)
    EAGAIN          = Errno(0xb)
    EALREADY        = Errno(0x72)
    EBADE           = Errno(0x34)
    EBADF           = Errno(0x9)
    EBADFD          = Errno(0x4d)
    EBADMSG         = Errno(0x4a)
    EBADR           = Errno(0x35)
    EBADRQC         = Errno(0x38)
    EBADSLT         = Errno(0x39)
    EBFONT          = Errno(0x3b)
    EBUSY           = Errno(0x10)
    ECANCELED       = Errno(0x7d)
    ECHILD          = Errno(0xa)
    ECHRNG          = Errno(0x2c)
    ECOMM           = Errno(0x46)
    ECONNABORTED    = Errno(0x67)
    ECONNREFUSED    = Errno(0x6f)
    ECONNRESET      = Errno(0x68)
    EDEADLK         = Errno(0x23)
    EDEADLOCK       = Errno(0x23)
    EDESTADDRREQ    = Errno(0x59)
    EDOM            = Errno(0x21)
    EDOTDOT         = Errno(0x49)
    EDQUOT          = Errno(0x7a)
    EEXIST          = Errno(0x11)
    EFAULT          = Errno(0xe)
    EFBIG           = Errno(0x1b)
    EHOSTDOWN       = Errno(0x70)
    EHOSTUNREACH    = Errno(0x71)
    EIDRM           = Errno(0x2b)
    EILSEQ          = Errno(0x54)
    EINPROGRESS     = Errno(0x73)
    EINTR           = Errno(0x4)
    EINVAL          = Errno(0x16)
    EIO             = Errno(0x5)
    EISCONN         = Errno(0x6a)
    EISDIR          = Errno(0x15)
    EISNAM          = Errno(0x78)
    EKEYEXPIRED     = Errno(0x7f)
    EKEYREJECTED    = Errno(0x81)
    EKEYREVOKED     = Errno(0x80)
    EL2HLT          = Errno(0x33)
    EL2NSYNC        = Errno(0x2d)
    EL3HLT          = Errno(0x2e)
    EL3RST          = Errno(0x2f)
    ELIBACC         = Errno(0x4f)
    ELIBBAD         = Errno(0x50)
    ELIBEXEC        = Errno(0x53)
    ELIBMAX         = Errno(0x52)
    ELIBSCN         = Errno(0x51)
    ELNRNG          = Errno(0x30)
    ELOOP           = Errno(0x28)
    EMEDIUMTYPE     = Errno(0x7c)
    EMFILE          = Errno(0x18)
    EMLINK          = Errno(0x1f)
    EMSGSIZE        = Errno(0x5a)
    EMULTIHOP       = Errno(0x48)
    ENAMETOOLONG    = Errno(0x24)
    ENAVAIL         = Errno(0x77)
    ENETDOWN        = Errno(0x64)
    ENETRESET       = Errno(0x66)
    ENETUNREACH     = Errno(0x65)
    ENFILE          = Errno(0x17)
    ENOANO          = Errno(0x37)
    ENOBUFS         = Errno(0x69)
    ENOCSI          = Errno(0x32)
    ENODATA         = Errno(0x3d)
    ENODEV          = Errno(0x13)
    ENOENT          = Errno(0x2)
    ENOEXEC         = Errno(0x8)
    ENOKEY          = Errno(0x7e)
    ENOLCK          = Errno(0x25)
    ENOLINK         = Errno(0x43)
    ENOMEDIUM       = Errno(0x7b)
    ENOMEM          = Errno(0xc)
    ENOMSG          = Errno(0x2a)
    ENONET          = Errno(0x40)
    ENOPKG          = Errno(0x41)
    ENOPROTOOPT     = Errno(0x5c)
    ENOSPC          = Errno(0x1c)
    ENOSR           = Errno(0x3f)
    ENOSTR          = Errno(0x3c)
    ENOSYS          = Errno(0x26)
    ENOTBLK         = Errno(0xf)
    ENOTCONN        = Errno(0x6b)
    ENOTDIR         = Errno(0x14)
    ENOTEMPTY       = Errno(0x27)
    ENOTNAM         = Errno(0x76)
    ENOTRECOVERABLE = Errno(0x83)
    ENOTSOCK        = Errno(0x58)
    ENOTSUP         = Errno(0x5f)
    ENOTTY          = Errno(0x19)
    ENOTUNIQ        = Errno(0x4c)
    ENXIO           = Errno(0x6)
    EOPNOTSUPP      = Errno(0x5f)
    EOVERFLOW       = Errno(0x4b)
    EOWNERDEAD      = Errno(0x82)
    EPERM           = Errno(0x1)
    EPFNOSUPPORT    = Errno(0x60)
    EPIPE           = Errno(0x20)
    EPROTO          = Errno(0x47)
    EPROTONOSUPPORT = Errno(0x5d)
    EPROTOTYPE      = Errno(0x5b)
    ERANGE          = Errno(0x22)
    EREMCHG         = Errno(0x4e)
    EREMOTE         = Errno(0x42)
    EREMOTEIO       = Errno(0x79)
    ERESTART        = Errno(0x55)
    ERFKILL         = Errno(0x84)
    EROFS           = Errno(0x1e)
    ESHUTDOWN       = Errno(0x6c)
    ESOCKTNOSUPPORT = Errno(0x5e)
    ESPIPE          = Errno(0x1d)
    ESRCH           = Errno(0x3)
    ESRMNT          = Errno(0x45)
    ESTALE          = Errno(0x74)
    ESTRPIPE        = Errno(0x56)
    ETIME           = Errno(0x3e)
    ETIMEDOUT       = Errno(0x6e)
    ETOOMANYREFS    = Errno(0x6d)
    ETXTBSY         = Errno(0x1a)
    EUCLEAN         = Errno(0x75)
    EUNATCH         = Errno(0x31)
    EUSERS          = Errno(0x57)
    EWOULDBLOCK     = Errno(0xb)
    EXDEV           = Errno(0x12)
    EXFULL          = Errno(0x36)
)

Errors

const (
    SIGABRT   = Signal(0x6)
    SIGALRM   = Signal(0xe)
    SIGBUS    = Signal(0x7)
    SIGCHLD   = Signal(0x11)
    SIGCLD    = Signal(0x11)
    SIGCONT   = Signal(0x12)
    SIGFPE    = Signal(0x8)
    SIGHUP    = Signal(0x1)
    SIGILL    = Signal(0x4)
    SIGINT    = Signal(0x2)
    SIGIO     = Signal(0x1d)
    SIGIOT    = Signal(0x6)
    SIGKILL   = Signal(0x9)
    SIGPIPE   = Signal(0xd)
    SIGPOLL   = Signal(0x1d)
    SIGPROF   = Signal(0x1b)
    SIGPWR    = Signal(0x1e)
    SIGQUIT   = Signal(0x3)
    SIGSEGV   = Signal(0xb)
    SIGSTKFLT = Signal(0x10)
    SIGSTOP   = Signal(0x13)
    SIGSYS    = Signal(0x1f)
    SIGTERM   = Signal(0xf)
    SIGTRAP   = Signal(0x5)
    SIGTSTP   = Signal(0x14)
    SIGTTIN   = Signal(0x15)
    SIGTTOU   = Signal(0x16)
    SIGUNUSED = Signal(0x1f)
    SIGURG    = Signal(0x17)
    SIGUSR1   = Signal(0xa)
    SIGUSR2   = Signal(0xc)
    SIGVTALRM = Signal(0x1a)
    SIGWINCH  = Signal(0x1c)
    SIGXCPU   = Signal(0x18)
    SIGXFSZ   = Signal(0x19)
)

Signals

const (
    SYS_READ                   = 0
    SYS_WRITE                  = 1
    SYS_OPEN                   = 2
    SYS_CLOSE                  = 3
    SYS_STAT                   = 4
    SYS_FSTAT                  = 5
    SYS_LSTAT                  = 6
    SYS_POLL                   = 7
    SYS_LSEEK                  = 8
    SYS_MMAP                   = 9
    SYS_MPROTECT               = 10
    SYS_MUNMAP                 = 11
    SYS_BRK                    = 12
    SYS_RT_SIGACTION           = 13
    SYS_RT_SIGPROCMASK         = 14
    SYS_RT_SIGRETURN           = 15
    SYS_IOCTL                  = 16
    SYS_PREAD64                = 17
    SYS_PWRITE64               = 18
    SYS_READV                  = 19
    SYS_WRITEV                 = 20
    SYS_ACCESS                 = 21
    SYS_PIPE                   = 22
    SYS_SELECT                 = 23
    SYS_SCHED_YIELD            = 24
    SYS_MREMAP                 = 25
    SYS_MSYNC                  = 26
    SYS_MINCORE                = 27
    SYS_MADVISE                = 28
    SYS_SHMGET                 = 29
    SYS_SHMAT                  = 30
    SYS_SHMCTL                 = 31
    SYS_DUP                    = 32
    SYS_DUP2                   = 33
    SYS_PAUSE                  = 34
    SYS_NANOSLEEP              = 35
    SYS_GETITIMER              = 36
    SYS_ALARM                  = 37
    SYS_SETITIMER              = 38
    SYS_GETPID                 = 39
    SYS_SENDFILE               = 40
    SYS_SOCKET                 = 41
    SYS_CONNECT                = 42
    SYS_ACCEPT                 = 43
    SYS_SENDTO                 = 44
    SYS_RECVFROM               = 45
    SYS_SENDMSG                = 46
    SYS_RECVMSG                = 47
    SYS_SHUTDOWN               = 48
    SYS_BIND                   = 49
    SYS_LISTEN                 = 50
    SYS_GETSOCKNAME            = 51
    SYS_GETPEERNAME            = 52
    SYS_SOCKETPAIR             = 53
    SYS_SETSOCKOPT             = 54
    SYS_GETSOCKOPT             = 55
    SYS_CLONE                  = 56
    SYS_FORK                   = 57
    SYS_VFORK                  = 58
    SYS_EXECVE                 = 59
    SYS_EXIT                   = 60
    SYS_WAIT4                  = 61
    SYS_KILL                   = 62
    SYS_UNAME                  = 63
    SYS_SEMGET                 = 64
    SYS_SEMOP                  = 65
    SYS_SEMCTL                 = 66
    SYS_SHMDT                  = 67
    SYS_MSGGET                 = 68
    SYS_MSGSND                 = 69
    SYS_MSGRCV                 = 70
    SYS_MSGCTL                 = 71
    SYS_FCNTL                  = 72
    SYS_FLOCK                  = 73
    SYS_FSYNC                  = 74
    SYS_FDATASYNC              = 75
    SYS_TRUNCATE               = 76
    SYS_FTRUNCATE              = 77
    SYS_GETDENTS               = 78
    SYS_GETCWD                 = 79
    SYS_CHDIR                  = 80
    SYS_FCHDIR                 = 81
    SYS_RENAME                 = 82
    SYS_MKDIR                  = 83
    SYS_RMDIR                  = 84
    SYS_CREAT                  = 85
    SYS_LINK                   = 86
    SYS_UNLINK                 = 87
    SYS_SYMLINK                = 88
    SYS_READLINK               = 89
    SYS_CHMOD                  = 90
    SYS_FCHMOD                 = 91
    SYS_CHOWN                  = 92
    SYS_FCHOWN                 = 93
    SYS_LCHOWN                 = 94
    SYS_UMASK                  = 95
    SYS_GETTIMEOFDAY           = 96
    SYS_GETRLIMIT              = 97
    SYS_GETRUSAGE              = 98
    SYS_SYSINFO                = 99
    SYS_TIMES                  = 100
    SYS_PTRACE                 = 101
    SYS_GETUID                 = 102
    SYS_SYSLOG                 = 103
    SYS_GETGID                 = 104
    SYS_SETUID                 = 105
    SYS_SETGID                 = 106
    SYS_GETEUID                = 107
    SYS_GETEGID                = 108
    SYS_SETPGID                = 109
    SYS_GETPPID                = 110
    SYS_GETPGRP                = 111
    SYS_SETSID                 = 112
    SYS_SETREUID               = 113
    SYS_SETREGID               = 114
    SYS_GETGROUPS              = 115
    SYS_SETGROUPS              = 116
    SYS_SETRESUID              = 117
    SYS_GETRESUID              = 118
    SYS_SETRESGID              = 119
    SYS_GETRESGID              = 120
    SYS_GETPGID                = 121
    SYS_SETFSUID               = 122
    SYS_SETFSGID               = 123
    SYS_GETSID                 = 124
    SYS_CAPGET                 = 125
    SYS_CAPSET                 = 126
    SYS_RT_SIGPENDING          = 127
    SYS_RT_SIGTIMEDWAIT        = 128
    SYS_RT_SIGQUEUEINFO        = 129
    SYS_RT_SIGSUSPEND          = 130
    SYS_SIGALTSTACK            = 131
    SYS_UTIME                  = 132
    SYS_MKNOD                  = 133
    SYS_USELIB                 = 134
    SYS_PERSONALITY            = 135
    SYS_USTAT                  = 136
    SYS_STATFS                 = 137
    SYS_FSTATFS                = 138
    SYS_SYSFS                  = 139
    SYS_GETPRIORITY            = 140
    SYS_SETPRIORITY            = 141
    SYS_SCHED_SETPARAM         = 142
    SYS_SCHED_GETPARAM         = 143
    SYS_SCHED_SETSCHEDULER     = 144
    SYS_SCHED_GETSCHEDULER     = 145
    SYS_SCHED_GET_PRIORITY_MAX = 146
    SYS_SCHED_GET_PRIORITY_MIN = 147
    SYS_SCHED_RR_GET_INTERVAL  = 148
    SYS_MLOCK                  = 149
    SYS_MUNLOCK                = 150
    SYS_MLOCKALL               = 151
    SYS_MUNLOCKALL             = 152
    SYS_VHANGUP                = 153
    SYS_MODIFY_LDT             = 154
    SYS_PIVOT_ROOT             = 155
    SYS__SYSCTL                = 156
    SYS_PRCTL                  = 157
    SYS_ARCH_PRCTL             = 158
    SYS_ADJTIMEX               = 159
    SYS_SETRLIMIT              = 160
    SYS_CHROOT                 = 161
    SYS_SYNC                   = 162
    SYS_ACCT                   = 163
    SYS_SETTIMEOFDAY           = 164
    SYS_MOUNT                  = 165
    SYS_UMOUNT2                = 166
    SYS_SWAPON                 = 167
    SYS_SWAPOFF                = 168
    SYS_REBOOT                 = 169
    SYS_SETHOSTNAME            = 170
    SYS_SETDOMAINNAME          = 171
    SYS_IOPL                   = 172
    SYS_IOPERM                 = 173
    SYS_CREATE_MODULE          = 174
    SYS_INIT_MODULE            = 175
    SYS_DELETE_MODULE          = 176
    SYS_GET_KERNEL_SYMS        = 177
    SYS_QUERY_MODULE           = 178
    SYS_QUOTACTL               = 179
    SYS_NFSSERVCTL             = 180
    SYS_GETPMSG                = 181
    SYS_PUTPMSG                = 182
    SYS_AFS_SYSCALL            = 183
    SYS_TUXCALL                = 184
    SYS_SECURITY               = 185
    SYS_GETTID                 = 186
    SYS_READAHEAD              = 187
    SYS_SETXATTR               = 188
    SYS_LSETXATTR              = 189
    SYS_FSETXATTR              = 190
    SYS_GETXATTR               = 191
    SYS_LGETXATTR              = 192
    SYS_FGETXATTR              = 193
    SYS_LISTXATTR              = 194
    SYS_LLISTXATTR             = 195
    SYS_FLISTXATTR             = 196
    SYS_REMOVEXATTR            = 197
    SYS_LREMOVEXATTR           = 198
    SYS_FREMOVEXATTR           = 199
    SYS_TKILL                  = 200
    SYS_TIME                   = 201
    SYS_FUTEX                  = 202
    SYS_SCHED_SETAFFINITY      = 203
    SYS_SCHED_GETAFFINITY      = 204
    SYS_SET_THREAD_AREA        = 205
    SYS_IO_SETUP               = 206
    SYS_IO_DESTROY             = 207
    SYS_IO_GETEVENTS           = 208
    SYS_IO_SUBMIT              = 209
    SYS_IO_CANCEL              = 210
    SYS_GET_THREAD_AREA        = 211
    SYS_LOOKUP_DCOOKIE         = 212
    SYS_EPOLL_CREATE           = 213
    SYS_EPOLL_CTL_OLD          = 214
    SYS_EPOLL_WAIT_OLD         = 215
    SYS_REMAP_FILE_PAGES       = 216
    SYS_GETDENTS64             = 217
    SYS_SET_TID_ADDRESS        = 218
    SYS_RESTART_SYSCALL        = 219
    SYS_SEMTIMEDOP             = 220
    SYS_FADVISE64              = 221
    SYS_TIMER_CREATE           = 222
    SYS_TIMER_SETTIME          = 223
    SYS_TIMER_GETTIME          = 224
    SYS_TIMER_GETOVERRUN       = 225
    SYS_TIMER_DELETE           = 226
    SYS_CLOCK_SETTIME          = 227
    SYS_CLOCK_GETTIME          = 228
    SYS_CLOCK_GETRES           = 229
    SYS_CLOCK_NANOSLEEP        = 230
    SYS_EXIT_GROUP             = 231
    SYS_EPOLL_WAIT             = 232
    SYS_EPOLL_CTL              = 233
    SYS_TGKILL                 = 234
    SYS_UTIMES                 = 235
    SYS_VSERVER                = 236
    SYS_MBIND                  = 237
    SYS_SET_MEMPOLICY          = 238
    SYS_GET_MEMPOLICY          = 239
    SYS_MQ_OPEN                = 240
    SYS_MQ_UNLINK              = 241
    SYS_MQ_TIMEDSEND           = 242
    SYS_MQ_TIMEDRECEIVE        = 243
    SYS_MQ_NOTIFY              = 244
    SYS_MQ_GETSETATTR          = 245
    SYS_KEXEC_LOAD             = 246
    SYS_WAITID                 = 247
    SYS_ADD_KEY                = 248
    SYS_REQUEST_KEY            = 249
    SYS_KEYCTL                 = 250
    SYS_IOPRIO_SET             = 251
    SYS_IOPRIO_GET             = 252
    SYS_INOTIFY_INIT           = 253
    SYS_INOTIFY_ADD_WATCH      = 254
    SYS_INOTIFY_RM_WATCH       = 255
    SYS_MIGRATE_PAGES          = 256
    SYS_OPENAT                 = 257
    SYS_MKDIRAT                = 258
    SYS_MKNODAT                = 259
    SYS_FCHOWNAT               = 260
    SYS_FUTIMESAT              = 261
    SYS_NEWFSTATAT             = 262
    SYS_UNLINKAT               = 263
    SYS_RENAMEAT               = 264
    SYS_LINKAT                 = 265
    SYS_SYMLINKAT              = 266
    SYS_READLINKAT             = 267
    SYS_FCHMODAT               = 268
    SYS_FACCESSAT              = 269
    SYS_PSELECT6               = 270
    SYS_PPOLL                  = 271
    SYS_UNSHARE                = 272
    SYS_SET_ROBUST_LIST        = 273
    SYS_GET_ROBUST_LIST        = 274
    SYS_SPLICE                 = 275
    SYS_TEE                    = 276
    SYS_SYNC_FILE_RANGE        = 277
    SYS_VMSPLICE               = 278
    SYS_MOVE_PAGES             = 279
    SYS_UTIMENSAT              = 280
    SYS_EPOLL_PWAIT            = 281
    SYS_SIGNALFD               = 282
    SYS_TIMERFD_CREATE         = 283
    SYS_EVENTFD                = 284
    SYS_FALLOCATE              = 285
    SYS_TIMERFD_SETTIME        = 286
    SYS_TIMERFD_GETTIME        = 287
    SYS_ACCEPT4                = 288
    SYS_SIGNALFD4              = 289
    SYS_EVENTFD2               = 290
    SYS_EPOLL_CREATE1          = 291
    SYS_DUP3                   = 292
    SYS_PIPE2                  = 293
    SYS_INOTIFY_INIT1          = 294
    SYS_PREADV                 = 295
    SYS_PWRITEV                = 296
    SYS_RT_TGSIGQUEUEINFO      = 297
    SYS_PERF_EVENT_OPEN        = 298
    SYS_RECVMMSG               = 299
    SYS_FANOTIFY_INIT          = 300
    SYS_FANOTIFY_MARK          = 301
    SYS_PRLIMIT64              = 302
)
const (
    SizeofSockaddrInet4     = 0x10
    SizeofSockaddrInet6     = 0x1c
    SizeofSockaddrAny       = 0x70
    SizeofSockaddrUnix      = 0x6e
    SizeofSockaddrLinklayer = 0x14
    SizeofSockaddrNetlink   = 0xc
    SizeofLinger            = 0x8
    SizeofIPMreq            = 0x8
    SizeofIPMreqn           = 0xc
    SizeofIPv6Mreq          = 0x14
    SizeofMsghdr            = 0x38
    SizeofCmsghdr           = 0x10
    SizeofInet4Pktinfo      = 0xc
    SizeofInet6Pktinfo      = 0x14
    SizeofIPv6MTUInfo       = 0x20
    SizeofICMPv6Filter      = 0x20
    SizeofUcred             = 0xc
    SizeofTCPInfo           = 0x68
)
const (
    IFA_UNSPEC          = 0x0
    IFA_ADDRESS         = 0x1
    IFA_LOCAL           = 0x2
    IFA_LABEL           = 0x3
    IFA_BROADCAST       = 0x4
    IFA_ANYCAST         = 0x5
    IFA_CACHEINFO       = 0x6
    IFA_MULTICAST       = 0x7
    IFLA_UNSPEC         = 0x0
    IFLA_ADDRESS        = 0x1
    IFLA_BROADCAST      = 0x2
    IFLA_IFNAME         = 0x3
    IFLA_MTU            = 0x4
    IFLA_LINK           = 0x5
    IFLA_QDISC          = 0x6
    IFLA_STATS          = 0x7
    IFLA_COST           = 0x8
    IFLA_PRIORITY       = 0x9
    IFLA_MASTER         = 0xa
    IFLA_WIRELESS       = 0xb
    IFLA_PROTINFO       = 0xc
    IFLA_TXQLEN         = 0xd
    IFLA_MAP            = 0xe
    IFLA_WEIGHT         = 0xf
    IFLA_OPERSTATE      = 0x10
    IFLA_LINKMODE       = 0x11
    IFLA_LINKINFO       = 0x12
    IFLA_NET_NS_PID     = 0x13
    IFLA_IFALIAS        = 0x14
    IFLA_MAX            = 0x1d
    RT_SCOPE_UNIVERSE   = 0x0
    RT_SCOPE_SITE       = 0xc8
    RT_SCOPE_LINK       = 0xfd
    RT_SCOPE_HOST       = 0xfe
    RT_SCOPE_NOWHERE    = 0xff
    RT_TABLE_UNSPEC     = 0x0
    RT_TABLE_COMPAT     = 0xfc
    RT_TABLE_DEFAULT    = 0xfd
    RT_TABLE_MAIN       = 0xfe
    RT_TABLE_LOCAL      = 0xff
    RT_TABLE_MAX        = 0xffffffff
    RTA_UNSPEC          = 0x0
    RTA_DST             = 0x1
    RTA_SRC             = 0x2
    RTA_IIF             = 0x3
    RTA_OIF             = 0x4
    RTA_GATEWAY         = 0x5
    RTA_PRIORITY        = 0x6
    RTA_PREFSRC         = 0x7
    RTA_METRICS         = 0x8
    RTA_MULTIPATH       = 0x9
    RTA_FLOW            = 0xb
    RTA_CACHEINFO       = 0xc
    RTA_TABLE           = 0xf
    RTN_UNSPEC          = 0x0
    RTN_UNICAST         = 0x1
    RTN_LOCAL           = 0x2
    RTN_BROADCAST       = 0x3
    RTN_ANYCAST         = 0x4
    RTN_MULTICAST       = 0x5
    RTN_BLACKHOLE       = 0x6
    RTN_UNREACHABLE     = 0x7
    RTN_PROHIBIT        = 0x8
    RTN_THROW           = 0x9
    RTN_NAT             = 0xa
    RTN_XRESOLVE        = 0xb
    RTNLGRP_NONE        = 0x0
    RTNLGRP_LINK        = 0x1
    RTNLGRP_NOTIFY      = 0x2
    RTNLGRP_NEIGH       = 0x3
    RTNLGRP_TC          = 0x4
    RTNLGRP_IPV4_IFADDR = 0x5
    RTNLGRP_IPV4_MROUTE = 0x6
    RTNLGRP_IPV4_ROUTE  = 0x7
    RTNLGRP_IPV4_RULE   = 0x8
    RTNLGRP_IPV6_IFADDR = 0x9
    RTNLGRP_IPV6_MROUTE = 0xa
    RTNLGRP_IPV6_ROUTE  = 0xb
    RTNLGRP_IPV6_IFINFO = 0xc
    RTNLGRP_IPV6_PREFIX = 0x12
    RTNLGRP_IPV6_RULE   = 0x13
    RTNLGRP_ND_USEROPT  = 0x14
    SizeofNlMsghdr      = 0x10
    SizeofNlMsgerr      = 0x14
    SizeofRtGenmsg      = 0x1
    SizeofNlAttr        = 0x4
    SizeofRtAttr        = 0x4
    SizeofIfInfomsg     = 0x10
    SizeofIfAddrmsg     = 0x8
    SizeofRtMsg         = 0xc
    SizeofRtNexthop     = 0x8
)
const (
    SizeofSockFilter = 0x8
    SizeofSockFprog  = 0x10
)
const (
    VINTR    = 0x0
    VQUIT    = 0x1
    VERASE   = 0x2
    VKILL    = 0x3
    VEOF     = 0x4
    VTIME    = 0x5
    VMIN     = 0x6
    VSWTC    = 0x7
    VSTART   = 0x8
    VSTOP    = 0x9
    VSUSP    = 0xa
    VEOL     = 0xb
    VREPRINT = 0xc
    VDISCARD = 0xd
    VWERASE  = 0xe
    VLNEXT   = 0xf
    VEOL2    = 0x10
    IGNBRK   = 0x1
    BRKINT   = 0x2
    IGNPAR   = 0x4
    PARMRK   = 0x8
    INPCK    = 0x10
    ISTRIP   = 0x20
    INLCR    = 0x40
    IGNCR    = 0x80
    ICRNL    = 0x100
    IUCLC    = 0x200
    IXON     = 0x400
    IXANY    = 0x800
    IXOFF    = 0x1000
    IMAXBEL  = 0x2000
    IUTF8    = 0x4000
    OPOST    = 0x1
    OLCUC    = 0x2
    ONLCR    = 0x4
    OCRNL    = 0x8
    ONOCR    = 0x10
    ONLRET   = 0x20
    OFILL    = 0x40
    OFDEL    = 0x80
    B0       = 0x0
    B50      = 0x1
    B75      = 0x2
    B110     = 0x3
    B134     = 0x4
    B150     = 0x5
    B200     = 0x6
    B300     = 0x7
    B600     = 0x8
    B1200    = 0x9
    B1800    = 0xa
    B2400    = 0xb
    B4800    = 0xc
    B9600    = 0xd
    B19200   = 0xe
    B38400   = 0xf
    CSIZE    = 0x30
    CS5      = 0x0
    CS6      = 0x10
    CS7      = 0x20
    CS8      = 0x30
    CSTOPB   = 0x40
    CREAD    = 0x80
    PARENB   = 0x100
    PARODD   = 0x200
    HUPCL    = 0x400
    CLOCAL   = 0x800
    B57600   = 0x1001
    B115200  = 0x1002
    B230400  = 0x1003
    B460800  = 0x1004
    B500000  = 0x1005
    B576000  = 0x1006
    B921600  = 0x1007
    B1000000 = 0x1008
    B1152000 = 0x1009
    B1500000 = 0x100a
    B2000000 = 0x100b
    B2500000 = 0x100c
    B3000000 = 0x100d
    B3500000 = 0x100e
    B4000000 = 0x100f
    ISIG     = 0x1
    ICANON   = 0x2
    XCASE    = 0x4
    ECHO     = 0x8
    ECHOE    = 0x10
    ECHOK    = 0x20
    ECHONL   = 0x40
    NOFLSH   = 0x80
    TOSTOP   = 0x100
    ECHOCTL  = 0x200
    ECHOPRT  = 0x400
    ECHOKE   = 0x800
    FLUSHO   = 0x1000
    PENDIN   = 0x4000
    IEXTEN   = 0x8000
    TCGETS   = 0x5401
    TCSETS   = 0x5402
)
const ImplementsGetwd = true
const (
    PathMax = 0x1000
)
const SizeofInotifyEvent = 0x10

Variables

var (
    Stdin  = 0
    Stdout = 1
    Stderr = 2
)
var ForkLock sync.RWMutex
var SocketDisableIPv6 bool

For testing: clients can set this flag to force creation of IPv6 sockets to
return EAFNOSUPPORT.

func Accept

func Accept(fd int) (nfd int, sa Sockaddr, err error)

func Accept4

func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error)

func Access

func Access(path string, mode uint32) (err error)

func Acct

func Acct(path string) (err error)

func Adjtimex

func Adjtimex(buf *Timex) (state int, err error)

func AttachLsf

func AttachLsf(fd int, i []SockFilter) error

Deprecated: Use golang.org/x/net/bpf instead.

func Bind

func Bind(fd int, sa Sockaddr) (err error)

func BindToDevice

func BindToDevice(fd int, device string) (err error)

BindToDevice binds the socket associated with fd to device.

func BytePtrFromString

func BytePtrFromString(s string) (*byte, error)

BytePtrFromString returns a pointer to a NUL-terminated array of bytes
containing the text of s. If s contains a NUL byte at any location, it returns
(nil, EINVAL).

func ByteSliceFromString

func ByteSliceFromString(s string) ([]byte, error)

ByteSliceFromString returns a NUL-terminated slice of bytes containing the text
of s. If s contains a NUL byte at any location, it returns (nil, EINVAL).

func Chdir

func Chdir(path string) (err error)

func Chmod

func Chmod(path string, mode uint32) (err error)

func Chown

func Chown(path string, uid int, gid int) (err error)

func Chroot

func Chroot(path string) (err error)

func Clearenv

func Clearenv()

func Close

func Close(fd int) (err error)

func CloseOnExec

func CloseOnExec(fd int)

func CmsgLen

func CmsgLen(datalen int) int

CmsgLen returns the value to store in the Len field of the Cmsghdr structure,
taking into account any necessary alignment.

func CmsgSpace

func CmsgSpace(datalen int) int

CmsgSpace returns the number of bytes an ancillary element with payload of the
passed data length occupies.

func Connect

func Connect(fd int, sa Sockaddr) (err error)

func Creat

func Creat(path string, mode uint32) (fd int, err error)

func DetachLsf

func DetachLsf(fd int) error

Deprecated: Use golang.org/x/net/bpf instead.

func Dup

func Dup(oldfd int) (fd int, err error)

func Dup2

func Dup2(oldfd int, newfd int) (err error)

func Dup3

func Dup3(oldfd int, newfd int, flags int) (err error)

func Environ

func Environ() []string

func EpollCreate

func EpollCreate(size int) (fd int, err error)

func EpollCreate1

func EpollCreate1(flag int) (fd int, err error)

func EpollCtl

func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)

func EpollWait

func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)

func Exec

func Exec(argv0 string, argv []string, envv []string) (err error)

Exec invokes the execve(2) system call.

func Exit

func Exit(code int)

func Faccessat

func Faccessat(dirfd int, path string, mode uint32, flags int) (err error)

func Fallocate

func Fallocate(fd int, mode uint32, off int64, len int64) (err error)

func Fchdir

func Fchdir(fd int) (err error)

func Fchmod

func Fchmod(fd int, mode uint32) (err error)

func Fchmodat

func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)

func Fchown

func Fchown(fd int, uid int, gid int) (err error)

func Fchownat

func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)

func FcntlFlock

func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error

FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW
command.

func Fdatasync

func Fdatasync(fd int) (err error)

func Flock

func Flock(fd int, how int) (err error)

func ForkExec

func ForkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error)

Combination of fork and exec, careful to be thread safe.

func Fstat

func Fstat(fd int, stat *Stat_t) (err error)

func Fstatfs

func Fstatfs(fd int, buf *Statfs_t) (err error)

func Fsync

func Fsync(fd int) (err error)

func Ftruncate

func Ftruncate(fd int, length int64) (err error)

func Futimes

func Futimes(fd int, tv []Timeval) (err error)

func Futimesat

func Futimesat(dirfd int, path string, tv []Timeval) (err error)

func Getcwd

func Getcwd(buf []byte) (n int, err error)

func Getdents

func Getdents(fd int, buf []byte) (n int, err error)

func Getegid

func Getegid() (egid int)

func Getenv

func Getenv(key string) (value string, found bool)

func Geteuid

func Geteuid() (euid int)

func Getgid

func Getgid() (gid int)

func Getgroups

func Getgroups() (gids []int, err error)

func Getpagesize

func Getpagesize() int

func Getpgid

func Getpgid(pid int) (pgid int, err error)

func Getpgrp

func Getpgrp() (pid int)

func Getpid

func Getpid() (pid int)

func Getppid

func Getppid() (ppid int)

func Getpriority

func Getpriority(which int, who int) (prio int, err error)

func Getrlimit

func Getrlimit(resource int, rlim *Rlimit) (err error)

func Getrusage

func Getrusage(who int, rusage *Rusage) (err error)

func GetsockoptInet4Addr

func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error)

func GetsockoptInt

func GetsockoptInt(fd, level, opt int) (value int, err error)

func Gettid

func Gettid() (tid int)

func Gettimeofday

func Gettimeofday(tv *Timeval) (err error)

func Getuid

func Getuid() (uid int)

func Getwd

func Getwd() (wd string, err error)

func Getxattr

func Getxattr(path string, attr string, dest []byte) (sz int, err error)

func InotifyAddWatch

func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)

func InotifyInit

func InotifyInit() (fd int, err error)

func InotifyInit1

func InotifyInit1(flags int) (fd int, err error)

func InotifyRmWatch

func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error)

func Ioperm

func Ioperm(from int, num int, on int) (err error)

func Iopl

func Iopl(level int) (err error)

func Kill

func Kill(pid int, sig Signal) (err error)

func Klogctl

func Klogctl(typ int, buf []byte) (n int, err error)

func Lchown

func Lchown(path string, uid int, gid int) (err error)

func Link(oldpath string, newpath string) (err error)

func Listen

func Listen(s int, n int) (err error)

func Listxattr

func Listxattr(path string, dest []byte) (sz int, err error)

func LsfSocket

func LsfSocket(ifindex, proto int) (int, error)

Deprecated: Use golang.org/x/net/bpf instead.

func Lstat

func Lstat(path string, stat *Stat_t) (err error)

func Madvise

func Madvise(b []byte, advice int) (err error)

func Mkdir

func Mkdir(path string, mode uint32) (err error)

func Mkdirat

func Mkdirat(dirfd int, path string, mode uint32) (err error)

func Mkfifo

func Mkfifo(path string, mode uint32) (err error)

func Mknod

func Mknod(path string, mode uint32, dev int) (err error)

func Mknodat

func Mknodat(dirfd int, path string, mode uint32, dev int) (err error)

func Mlock

func Mlock(b []byte) (err error)

func Mlockall

func Mlockall(flags int) (err error)

func Mmap

func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error)

func Mount

func Mount(source string, target string, fstype string, flags uintptr, data string) (err error)

func Mprotect

func Mprotect(b []byte, prot int) (err error)

func Munlock

func Munlock(b []byte) (err error)

func Munlockall

func Munlockall() (err error)

func Munmap

func Munmap(b []byte) (err error)

func Nanosleep

func Nanosleep(time *Timespec, leftover *Timespec) (err error)

func NetlinkRIB

func NetlinkRIB(proto, family int) ([]byte, error)

NetlinkRIB returns routing information base, as known as RIB, which consists of
network facility information, states and parameters.

func Open

func Open(path string, mode int, perm uint32) (fd int, err error)

func Openat

func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)

func ParseDirent

func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string)

ParseDirent parses up to max directory entries in buf, appending the names to
names. It returns the number of bytes consumed from buf, the number of entries
added to names, and the new names slice.

func ParseNetlinkMessage

func ParseNetlinkMessage(b []byte) ([]NetlinkMessage, error)

ParseNetlinkMessage parses b as an array of netlink messages and returns the
slice containing the NetlinkMessage structures.

func ParseNetlinkRouteAttr

func ParseNetlinkRouteAttr(m *NetlinkMessage) ([]NetlinkRouteAttr, error)

ParseNetlinkRouteAttr parses m’s payload as an array of netlink route attributes
and returns the slice containing the NetlinkRouteAttr structures.

func ParseSocketControlMessage

func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error)

ParseSocketControlMessage parses b as an array of socket control messages.

func ParseUnixRights

func ParseUnixRights(m *SocketControlMessage) ([]int, error)

ParseUnixRights decodes a socket control message that contains an integer array
of open file descriptors from another process.

func Pause

func Pause() (err error)

func Pipe

func Pipe(p []int) (err error)

func Pipe2

func Pipe2(p []int, flags int) (err error)

func PivotRoot

func PivotRoot(newroot string, putold string) (err error)

func Pread

func Pread(fd int, p []byte, offset int64) (n int, err error)

func PtraceAttach

func PtraceAttach(pid int) (err error)

func PtraceCont

func PtraceCont(pid int, signal int) (err error)

func PtraceDetach

func PtraceDetach(pid int) (err error)

func PtraceGetEventMsg

func PtraceGetEventMsg(pid int) (msg uint, err error)

func PtraceGetRegs

func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error)

func PtracePeekData

func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error)

func PtracePeekText

func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error)

func PtracePokeData

func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error)

func PtracePokeText

func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error)

func PtraceSetOptions

func PtraceSetOptions(pid int, options int) (err error)

func PtraceSetRegs

func PtraceSetRegs(pid int, regs *PtraceRegs) (err error)

func PtraceSingleStep

func PtraceSingleStep(pid int) (err error)

func PtraceSyscall

func PtraceSyscall(pid int, signal int) (err error)

func Pwrite

func Pwrite(fd int, p []byte, offset int64) (n int, err error)

func RawSyscall

func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)

func RawSyscall6

func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)

func Read

func Read(fd int, p []byte) (n int, err error)

func ReadDirent

func ReadDirent(fd int, buf []byte) (n int, err error)

func Readlink(path string, buf []byte) (n int, err error)

func Reboot

func Reboot(cmd int) (err error)

func Recvfrom

func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error)

func Recvmsg

func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error)

func Removexattr

func Removexattr(path string, attr string) (err error)

func Rename

func Rename(oldpath string, newpath string) (err error)

func Renameat

func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)

func Rmdir

func Rmdir(path string) error

func Seek

func Seek(fd int, offset int64, whence int) (off int64, err error)

func Select

func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)

func Sendfile

func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)

func Sendmsg

func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error)

func SendmsgN

func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)

func Sendto

func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error)

func SetLsfPromisc

func SetLsfPromisc(name string, m bool) error

Deprecated: Use golang.org/x/net/bpf instead.

func SetNonblock

func SetNonblock(fd int, nonblocking bool) (err error)

func Setdomainname

func Setdomainname(p []byte) (err error)

func Setenv

func Setenv(key, value string) error

func Setfsgid

func Setfsgid(gid int) (err error)

func Setfsuid

func Setfsuid(uid int) (err error)

func Setgid

func Setgid(gid int) (err error)

func Setgroups

func Setgroups(gids []int) (err error)

func Sethostname

func Sethostname(p []byte) (err error)

func Setpgid

func Setpgid(pid int, pgid int) (err error)

func Setpriority

func Setpriority(which int, who int, prio int) (err error)

func Setregid

func Setregid(rgid int, egid int) (err error)

func Setresgid

func Setresgid(rgid int, egid int, sgid int) (err error)

func Setresuid

func Setresuid(ruid int, euid int, suid int) (err error)

func Setreuid

func Setreuid(ruid int, euid int) (err error)

func Setrlimit

func Setrlimit(resource int, rlim *Rlimit) (err error)

func Setsid

func Setsid() (pid int, err error)

func SetsockoptByte

func SetsockoptByte(fd, level, opt int, value byte) (err error)

func SetsockoptICMPv6Filter

func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error

func SetsockoptIPMreq

func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error)

func SetsockoptIPMreqn

func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error)

func SetsockoptIPv6Mreq

func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error)

func SetsockoptInet4Addr

func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error)

func SetsockoptInt

func SetsockoptInt(fd, level, opt int, value int) (err error)

func SetsockoptLinger

func SetsockoptLinger(fd, level, opt int, l *Linger) (err error)

func SetsockoptString

func SetsockoptString(fd, level, opt int, s string) (err error)

func SetsockoptTimeval

func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error)

func Settimeofday

func Settimeofday(tv *Timeval) (err error)

func Setuid

func Setuid(uid int) (err error)

func Setxattr

func Setxattr(path string, attr string, data []byte, flags int) (err error)

func Shutdown

func Shutdown(fd int, how int) (err error)

func SlicePtrFromStrings

func SlicePtrFromStrings(ss []string) ([]*byte, error)

SlicePtrFromStrings converts a slice of strings to a slice of pointers to
NUL-terminated byte arrays. If any string contains a NUL byte, it returns (nil,
EINVAL).

func Socket

func Socket(domain, typ, proto int) (fd int, err error)

func Socketpair

func Socketpair(domain, typ, proto int) (fd [2]int, err error)

func Splice

func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)

func StartProcess

func StartProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, handle uintptr, err error)

StartProcess wraps ForkExec for package os.

func Stat

func Stat(path string, stat *Stat_t) (err error)

func Statfs

func Statfs(path string, buf *Statfs_t) (err error)

func StringBytePtr

func StringBytePtr(s string) *byte

StringBytePtr returns a pointer to a NUL-terminated array of bytes. If s
contains a NUL byte this function panics instead of returning an error.

Deprecated: Use BytePtrFromString instead.

func StringByteSlice

func StringByteSlice(s string) []byte

StringByteSlice converts a string to a NUL-terminated []byte, If s contains a
NUL byte this function panics instead of returning an error.

Deprecated: Use ByteSliceFromString instead.

func StringSlicePtr

func StringSlicePtr(ss []string) []*byte

StringSlicePtr converts a slice of strings to a slice of pointers to
NUL-terminated byte arrays. If any string contains a NUL byte this function
panics instead of returning an error.

Deprecated: Use SlicePtrFromStrings instead.

func Symlink(oldpath string, newpath string) (err error)

func Sync

func Sync()

func SyncFileRange

func SyncFileRange(fd int, off int64, n int64, flags int) (err error)

func Syscall

func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)

func Syscall6

func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)

func Sysinfo

func Sysinfo(info *Sysinfo_t) (err error)

func Tee

func Tee(rfd int, wfd int, len int, flags int) (n int64, err error)

func Tgkill

func Tgkill(tgid int, tid int, sig Signal) (err error)

func Times

func Times(tms *Tms) (ticks uintptr, err error)

func TimespecToNsec

func TimespecToNsec(ts Timespec) int64

TimespecToNsec converts a Timespec value into a number of nanoseconds since the
Unix epoch.

func TimevalToNsec

func TimevalToNsec(tv Timeval) int64

TimevalToNsec converts a Timeval value into a number of nanoseconds since the
Unix epoch.

func Truncate

func Truncate(path string, length int64) (err error)

func Umask

func Umask(mask int) (oldmask int)

func Uname

func Uname(buf *Utsname) (err error)

func UnixCredentials

func UnixCredentials(ucred *Ucred) []byte

UnixCredentials encodes credentials into a socket control message for sending to
another process. This can be used for authentication.

func UnixRights

func UnixRights(fds ...int) []byte

UnixRights encodes a set of open file descriptors into a socket control message
for sending to another process.

func Unlink(path string) error

func Unlinkat

func Unlinkat(dirfd int, path string) error

func Unmount

func Unmount(target string, flags int) (err error)

func Unsetenv

func Unsetenv(key string) error

func Unshare

func Unshare(flags int) (err error)

func Ustat

func Ustat(dev int, ubuf *Ustat_t) (err error)

func Utime

func Utime(path string, buf *Utimbuf) (err error)

func Utimes

func Utimes(path string, tv []Timeval) (err error)

func UtimesNano

func UtimesNano(path string, ts []Timespec) (err error)

func Wait4

func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error)

func Write

func Write(fd int, p []byte) (n int, err error)

type Cmsghdr

type Cmsghdr struct {
    Len   uint64
    Level int32
    Type  int32
}

func (*Cmsghdr) SetLen

func (cmsg *Cmsghdr) SetLen(length int)

type Conn

type Conn interface {
    // SyscallConn returns a raw network connection.
    SyscallConn() (RawConn, error)
}

Conn is implemented by some types in the net package to provide access to the
underlying file descriptor or handle.

type Credential

type Credential struct {
    Uid         uint32   // User ID.
    Gid         uint32   // Group ID.
    Groups      []uint32 // Supplementary group IDs.
    NoSetGroups bool     // If true, don't set supplementary groups
}

Credential holds user and group identities to be assumed by a child process
started by StartProcess.

type Dirent

type Dirent struct {
    Ino       uint64
    Off       int64
    Reclen    uint16
    Type      uint8
    Name      [256]int8
    Pad_cgo_0 [5]byte
}

type EpollEvent

type EpollEvent struct {
    Events uint32
    Fd     int32
    Pad    int32
}

type Errno

type Errno uintptr

An Errno is an unsigned number describing an error condition. It implements the
error interface. The zero Errno is by convention a non-error, so code to convert
from Errno to error should use:

err = nil
if errno != 0 {
    err = errno
}

func (Errno) Error

func (e Errno) Error() string

func (Errno) Temporary

func (e Errno) Temporary() bool

func (Errno) Timeout

func (e Errno) Timeout() bool

type FdSet

type FdSet struct {
    Bits [16]int64
}

type Flock_t

type Flock_t struct {
    Type      int16
    Whence    int16
    Pad_cgo_0 [4]byte
    Start     int64
    Len       int64
    Pid       int32
    Pad_cgo_1 [4]byte
}

type Fsid

type Fsid struct {
    X__val [2]int32
}

type ICMPv6Filter

type ICMPv6Filter struct {
    Data [8]uint32
}

func GetsockoptICMPv6Filter

func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error)

type IPMreq

type IPMreq struct {
    Multiaddr [4]byte /* in_addr */
    Interface [4]byte /* in_addr */
}

func GetsockoptIPMreq

func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error)

type IPMreqn

type IPMreqn struct {
    Multiaddr [4]byte /* in_addr */
    Address   [4]byte /* in_addr */
    Ifindex   int32
}

func GetsockoptIPMreqn

func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error)

type IPv6MTUInfo

type IPv6MTUInfo struct {
    Addr RawSockaddrInet6
    Mtu  uint32
}

func GetsockoptIPv6MTUInfo

func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error)

type IPv6Mreq

type IPv6Mreq struct {
    Multiaddr [16]byte /* in6_addr */
    Interface uint32
}

func GetsockoptIPv6Mreq

func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error)

type IfAddrmsg

type IfAddrmsg struct {
    Family    uint8
    Prefixlen uint8
    Flags     uint8
    Scope     uint8
    Index     uint32
}

type IfInfomsg

type IfInfomsg struct {
    Family     uint8
    X__ifi_pad uint8
    Type       uint16
    Index      int32
    Flags      uint32
    Change     uint32
}

type Inet4Pktinfo

type Inet4Pktinfo struct {
    Ifindex  int32
    Spec_dst [4]byte /* in_addr */
    Addr     [4]byte /* in_addr */
}

type Inet6Pktinfo

type Inet6Pktinfo struct {
    Addr    [16]byte /* in6_addr */
    Ifindex uint32
}

type InotifyEvent

type InotifyEvent struct {
    Wd     int32
    Mask   uint32
    Cookie uint32
    Len    uint32
    Name   [0]uint8
}

type Iovec

type Iovec struct {
    Base *byte
    Len  uint64
}

func (*Iovec) SetLen

func (iov *Iovec) SetLen(length int)

type Linger

type Linger struct {
    Onoff  int32
    Linger int32
}

type Msghdr

type Msghdr struct {
    Name       *byte
    Namelen    uint32
    Pad_cgo_0  [4]byte
    Iov        *Iovec
    Iovlen     uint64
    Control    *byte
    Controllen uint64
    Flags      int32
    Pad_cgo_1  [4]byte
}

func (*Msghdr) SetControllen

func (msghdr *Msghdr) SetControllen(length int)

type NetlinkMessage

type NetlinkMessage struct {
    Header NlMsghdr
    Data   []byte
}

NetlinkMessage represents a netlink message.

type NetlinkRouteAttr

type NetlinkRouteAttr struct {
    Attr  RtAttr
    Value []byte
}

NetlinkRouteAttr represents a netlink route attribute.

type NetlinkRouteRequest

type NetlinkRouteRequest struct {
    Header NlMsghdr
    Data   RtGenmsg
}

NetlinkRouteRequest represents a request message to receive routing and link
states from the kernel.

type NlAttr

type NlAttr struct {
    Len  uint16
    Type uint16
}

type NlMsgerr

type NlMsgerr struct {
    Error int32
    Msg   NlMsghdr
}

type NlMsghdr

type NlMsghdr struct {
    Len   uint32
    Type  uint16
    Flags uint16
    Seq   uint32
    Pid   uint32
}

type ProcAttr

type ProcAttr struct {
    Dir   string    // Current working directory.
    Env   []string  // Environment.
    Files []uintptr // File descriptors.
    Sys   *SysProcAttr
}

ProcAttr holds attributes that will be applied to a new process started by
StartProcess.

type PtraceRegs

type PtraceRegs struct {
    R15      uint64
    R14      uint64
    R13      uint64
    R12      uint64
    Rbp      uint64
    Rbx      uint64
    R11      uint64
    R10      uint64
    R9       uint64
    R8       uint64
    Rax      uint64
    Rcx      uint64
    Rdx      uint64
    Rsi      uint64
    Rdi      uint64
    Orig_rax uint64
    Rip      uint64
    Cs       uint64
    Eflags   uint64
    Rsp      uint64
    Ss       uint64
    Fs_base  uint64
    Gs_base  uint64
    Ds       uint64
    Es       uint64
    Fs       uint64
    Gs       uint64
}

func (*PtraceRegs) PC

func (r *PtraceRegs) PC() uint64

func (*PtraceRegs) SetPC

func (r *PtraceRegs) SetPC(pc uint64)

type RawConn

type RawConn interface {
    // Control invokes f on the underlying connection's file
    // descriptor or handle.
    // The file descriptor fd is guaranteed to remain valid while
    // f executes but not after f returns.
    Control(f func(fd uintptr)) error

    // Read invokes f on the underlying connection's file
    // descriptor or handle; f is expected to try to read from the
    // file descriptor.
    // If f returns true, Read returns. Otherwise Read blocks
    // waiting for the connection to be ready for reading and
    // tries again repeatedly.
    // The file descriptor is guaranteed to remain valid while f
    // executes but not after f returns.
    Read(f func(fd uintptr) (done bool)) error

    // Write is like Read but for writing.
    Write(f func(fd uintptr) (done bool)) error
}

A RawConn is a raw network connection.

type RawSockaddr

type RawSockaddr struct {
    Family uint16
    Data   [14]int8
}

type RawSockaddrAny

type RawSockaddrAny struct {
    Addr RawSockaddr
    Pad  [96]int8
}

type RawSockaddrInet4

type RawSockaddrInet4 struct {
    Family uint16
    Port   uint16
    Addr   [4]byte /* in_addr */
    Zero   [8]uint8
}

type RawSockaddrInet6

type RawSockaddrInet6 struct {
    Family   uint16
    Port     uint16
    Flowinfo uint32
    Addr     [16]byte /* in6_addr */
    Scope_id uint32
}

type RawSockaddrLinklayer

type RawSockaddrLinklayer struct {
    Family   uint16
    Protocol uint16
    Ifindex  int32
    Hatype   uint16
    Pkttype  uint8
    Halen    uint8
    Addr     [8]uint8
}

type RawSockaddrNetlink struct {
    Family uint16
    Pad    uint16
    Pid    uint32
    Groups uint32
}

type RawSockaddrUnix

type RawSockaddrUnix struct {
    Family uint16
    Path   [108]int8
}

type Rlimit

type Rlimit struct {
    Cur uint64
    Max uint64
}

type RtAttr

type RtAttr struct {
    Len  uint16
    Type uint16
}

type RtGenmsg

type RtGenmsg struct {
    Family uint8
}

type RtMsg

type RtMsg struct {
    Family   uint8
    Dst_len  uint8
    Src_len  uint8
    Tos      uint8
    Table    uint8
    Protocol uint8
    Scope    uint8
    Type     uint8
    Flags    uint32
}

type RtNexthop

type RtNexthop struct {
    Len     uint16
    Flags   uint8
    Hops    uint8
    Ifindex int32
}

type Rusage

type Rusage struct {
    Utime    Timeval
    Stime    Timeval
    Maxrss   int64
    Ixrss    int64
    Idrss    int64
    Isrss    int64
    Minflt   int64
    Majflt   int64
    Nswap    int64
    Inblock  int64
    Oublock  int64
    Msgsnd   int64
    Msgrcv   int64
    Nsignals int64
    Nvcsw    int64
    Nivcsw   int64
}

type Signal

type Signal int

A Signal is a number describing a process signal. It implements the os.Signal
interface.

func (Signal) Signal

func (s Signal) Signal()

func (Signal) String

func (s Signal) String() string

type SockFilter

type SockFilter struct {
    Code uint16
    Jt   uint8
    Jf   uint8
    K    uint32
}

func LsfJump

func LsfJump(code, k, jt, jf int) *SockFilter

Deprecated: Use golang.org/x/net/bpf instead.

func LsfStmt

func LsfStmt(code, k int) *SockFilter

Deprecated: Use golang.org/x/net/bpf instead.

type SockFprog

type SockFprog struct {
    Len       uint16
    Pad_cgo_0 [6]byte
    Filter    *SockFilter
}

type Sockaddr

type Sockaddr interface {
    // contains filtered or unexported methods
}

func Getpeername

func Getpeername(fd int) (sa Sockaddr, err error)

func Getsockname

func Getsockname(fd int) (sa Sockaddr, err error)

type SockaddrInet4

type SockaddrInet4 struct {
    Port int
    Addr [4]byte
    // contains filtered or unexported fields
}

type SockaddrInet6

type SockaddrInet6 struct {
    Port   int
    ZoneId uint32
    Addr   [16]byte
    // contains filtered or unexported fields
}

type SockaddrLinklayer

type SockaddrLinklayer struct {
    Protocol uint16
    Ifindex  int
    Hatype   uint16
    Pkttype  uint8
    Halen    uint8
    Addr     [8]byte
    // contains filtered or unexported fields
}

type SockaddrNetlink struct {
    Family uint16
    Pad    uint16
    Pid    uint32
    Groups uint32
    // contains filtered or unexported fields
}

type SockaddrUnix

type SockaddrUnix struct {
    Name string
    // contains filtered or unexported fields
}

type SocketControlMessage

type SocketControlMessage struct {
    Header Cmsghdr
    Data   []byte
}

SocketControlMessage represents a socket control message.

type Stat_t

type Stat_t struct {
    Dev       uint64
    Ino       uint64
    Nlink     uint64
    Mode      uint32
    Uid       uint32
    Gid       uint32
    X__pad0   int32
    Rdev      uint64
    Size      int64
    Blksize   int64
    Blocks    int64
    Atim      Timespec
    Mtim      Timespec
    Ctim      Timespec
    X__unused [3]int64
}

type Statfs_t

type Statfs_t struct {
    Type    int64
    Bsize   int64
    Blocks  uint64
    Bfree   uint64
    Bavail  uint64
    Files   uint64
    Ffree   uint64
    Fsid    Fsid
    Namelen int64
    Frsize  int64
    Flags   int64
    Spare   [4]int64
}

type SysProcAttr

type SysProcAttr struct {
    Chroot       string         // Chroot.
    Credential   *Credential    // Credential.
    Ptrace       bool           // Enable tracing.
    Setsid       bool           // Create session.
    Setpgid      bool           // Set process group ID to Pgid, or, if Pgid == 0, to new pid.
    Setctty      bool           // Set controlling terminal to fd Ctty (only meaningful if Setsid is set)
    Noctty       bool           // Detach fd 0 from controlling terminal
    Ctty         int            // Controlling TTY fd
    Foreground   bool           // Place child's process group in foreground. (Implies Setpgid. Uses Ctty as fd of controlling TTY)
    Pgid         int            // Child's process group ID if Setpgid.
    Pdeathsig    Signal         // Signal that the process will get when its parent dies (Linux only)
    Cloneflags   uintptr        // Flags for clone calls (Linux only)
    Unshareflags uintptr        // Flags for unshare calls (Linux only)
    UidMappings  []SysProcIDMap // User ID mappings for user namespaces.
    GidMappings  []SysProcIDMap // Group ID mappings for user namespaces.
    // GidMappingsEnableSetgroups enabling setgroups syscall.
    // If false, then setgroups syscall will be disabled for the child process.
    // This parameter is no-op if GidMappings == nil. Otherwise for unprivileged
    // users this should be set to false for mappings work.
    GidMappingsEnableSetgroups bool
    AmbientCaps                []uintptr // Ambient capabilities (Linux only)
}

type SysProcIDMap

type SysProcIDMap struct {
    ContainerID int // Container ID.
    HostID      int // Host ID.
    Size        int // Size.
}

SysProcIDMap holds Container ID to Host ID mappings used for User Namespaces in
Linux. See user_namespaces(7).

type Sysinfo_t

type Sysinfo_t struct {
    Uptime    int64
    Loads     [3]uint64
    Totalram  uint64
    Freeram   uint64
    Sharedram uint64
    Bufferram uint64
    Totalswap uint64
    Freeswap  uint64
    Procs     uint16
    Pad       uint16
    Pad_cgo_0 [4]byte
    Totalhigh uint64
    Freehigh  uint64
    Unit      uint32
    X_f       [0]byte
    Pad_cgo_1 [4]byte
}

type TCPInfo

type TCPInfo struct {
    State          uint8
    Ca_state       uint8
    Retransmits    uint8
    Probes         uint8
    Backoff        uint8
    Options        uint8
    Pad_cgo_0      [2]byte
    Rto            uint32
    Ato            uint32
    Snd_mss        uint32
    Rcv_mss        uint32
    Unacked        uint32
    Sacked         uint32
    Lost           uint32
    Retrans        uint32
    Fackets        uint32
    Last_data_sent uint32
    Last_ack_sent  uint32
    Last_data_recv uint32
    Last_ack_recv  uint32
    Pmtu           uint32
    Rcv_ssthresh   uint32
    Rtt            uint32
    Rttvar         uint32
    Snd_ssthresh   uint32
    Snd_cwnd       uint32
    Advmss         uint32
    Reordering     uint32
    Rcv_rtt        uint32
    Rcv_space      uint32
    Total_retrans  uint32
}

type Termios

type Termios struct {
    Iflag     uint32
    Oflag     uint32
    Cflag     uint32
    Lflag     uint32
    Line      uint8
    Cc        [32]uint8
    Pad_cgo_0 [3]byte
    Ispeed    uint32
    Ospeed    uint32
}

type Time_t

type Time_t int64

func Time

func Time(t *Time_t) (tt Time_t, err error)

type Timespec

type Timespec struct {
    Sec  int64
    Nsec int64
}

func NsecToTimespec

func NsecToTimespec(nsec int64) Timespec

NsecToTimespec takes a number of nanoseconds since the Unix epoch and returns
the corresponding Timespec value.

func (*Timespec) Nano

func (ts *Timespec) Nano() int64

Nano returns ts as the number of nanoseconds elapsed since the Unix epoch.

func (*Timespec) Unix

func (ts *Timespec) Unix() (sec int64, nsec int64)

Unix returns ts as the number of seconds and nanoseconds elapsed since the Unix
epoch.

type Timeval

type Timeval struct {
    Sec  int64
    Usec int64
}

func NsecToTimeval

func NsecToTimeval(nsec int64) Timeval

NsecToTimeval takes a number of nanoseconds since the Unix epoch and returns the
corresponding Timeval value.

func (*Timeval) Nano

func (tv *Timeval) Nano() int64

Nano returns tv as the number of nanoseconds elapsed since the Unix epoch.

func (*Timeval) Unix

func (tv *Timeval) Unix() (sec int64, nsec int64)

Unix returns tv as the number of seconds and nanoseconds elapsed since the Unix
epoch.

type Timex

type Timex struct {
    Modes     uint32
    Pad_cgo_0 [4]byte
    Offset    int64
    Freq      int64
    Maxerror  int64
    Esterror  int64
    Status    int32
    Pad_cgo_1 [4]byte
    Constant  int64
    Precision int64
    Tolerance int64
    Time      Timeval
    Tick      int64
    Ppsfreq   int64
    Jitter    int64
    Shift     int32
    Pad_cgo_2 [4]byte
    Stabil    int64
    Jitcnt    int64
    Calcnt    int64
    Errcnt    int64
    Stbcnt    int64
    Tai       int32
    Pad_cgo_3 [44]byte
}

type Tms

type Tms struct {
    Utime  int64
    Stime  int64
    Cutime int64
    Cstime int64
}

type Ucred

type Ucred struct {
    Pid int32
    Uid uint32
    Gid uint32
}

func GetsockoptUcred

func GetsockoptUcred(fd, level, opt int) (*Ucred, error)

func ParseUnixCredentials

func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error)

ParseUnixCredentials decodes a socket control message that contains credentials
in a Ucred structure. To receive such a message, the SO_PASSCRED option must be
enabled on the socket.

type Ustat_t

type Ustat_t struct {
    Tfree     int32
    Pad_cgo_0 [4]byte
    Tinode    uint64
    Fname     [6]int8
    Fpack     [6]int8
    Pad_cgo_1 [4]byte
}

type Utimbuf

type Utimbuf struct {
    Actime  int64
    Modtime int64
}

type Utsname

type Utsname struct {
    Sysname    [65]int8
    Nodename   [65]int8
    Release    [65]int8
    Version    [65]int8
    Machine    [65]int8
    Domainname [65]int8
}

type WaitStatus

type WaitStatus uint32

func (WaitStatus) Continued

func (w WaitStatus) Continued() bool

func (WaitStatus) CoreDump

func (w WaitStatus) CoreDump() bool

func (WaitStatus) ExitStatus

func (w WaitStatus) ExitStatus() int

func (WaitStatus) Exited

func (w WaitStatus) Exited() bool

func (WaitStatus) Signal

func (w WaitStatus) Signal() Signal

func (WaitStatus) Signaled

func (w WaitStatus) Signaled() bool

func (WaitStatus) StopSignal

func (w WaitStatus) StopSignal() Signal

func (WaitStatus) Stopped

func (w WaitStatus) Stopped() bool

func (WaitStatus) TrapCause

func (w WaitStatus) TrapCause() int