You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

557 lines
8.7 KiB

  1. // cgo -godefs types_freebsd.go | go run mkpost.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build amd64,freebsd
  4. package unix
  5. const (
  6. sizeofPtr = 0x8
  7. sizeofShort = 0x2
  8. sizeofInt = 0x4
  9. sizeofLong = 0x8
  10. sizeofLongLong = 0x8
  11. )
  12. type (
  13. _C_short int16
  14. _C_int int32
  15. _C_long int64
  16. _C_long_long int64
  17. )
  18. type Timespec struct {
  19. Sec int64
  20. Nsec int64
  21. }
  22. type Timeval struct {
  23. Sec int64
  24. Usec int64
  25. }
  26. type Rusage struct {
  27. Utime Timeval
  28. Stime Timeval
  29. Maxrss int64
  30. Ixrss int64
  31. Idrss int64
  32. Isrss int64
  33. Minflt int64
  34. Majflt int64
  35. Nswap int64
  36. Inblock int64
  37. Oublock int64
  38. Msgsnd int64
  39. Msgrcv int64
  40. Nsignals int64
  41. Nvcsw int64
  42. Nivcsw int64
  43. }
  44. type Rlimit struct {
  45. Cur int64
  46. Max int64
  47. }
  48. type _Gid_t uint32
  49. const (
  50. S_IFMT = 0xf000
  51. S_IFIFO = 0x1000
  52. S_IFCHR = 0x2000
  53. S_IFDIR = 0x4000
  54. S_IFBLK = 0x6000
  55. S_IFREG = 0x8000
  56. S_IFLNK = 0xa000
  57. S_IFSOCK = 0xc000
  58. S_ISUID = 0x800
  59. S_ISGID = 0x400
  60. S_ISVTX = 0x200
  61. S_IRUSR = 0x100
  62. S_IWUSR = 0x80
  63. S_IXUSR = 0x40
  64. )
  65. type Stat_t struct {
  66. Dev uint32
  67. Ino uint32
  68. Mode uint16
  69. Nlink uint16
  70. Uid uint32
  71. Gid uint32
  72. Rdev uint32
  73. Atimespec Timespec
  74. Mtimespec Timespec
  75. Ctimespec Timespec
  76. Size int64
  77. Blocks int64
  78. Blksize int32
  79. Flags uint32
  80. Gen uint32
  81. Lspare int32
  82. Birthtimespec Timespec
  83. }
  84. type Statfs_t struct {
  85. Version uint32
  86. Type uint32
  87. Flags uint64
  88. Bsize uint64
  89. Iosize uint64
  90. Blocks uint64
  91. Bfree uint64
  92. Bavail int64
  93. Files uint64
  94. Ffree int64
  95. Syncwrites uint64
  96. Asyncwrites uint64
  97. Syncreads uint64
  98. Asyncreads uint64
  99. Spare [10]uint64
  100. Namemax uint32
  101. Owner uint32
  102. Fsid Fsid
  103. Charspare [80]int8
  104. Fstypename [16]int8
  105. Mntfromname [88]int8
  106. Mntonname [88]int8
  107. }
  108. type Flock_t struct {
  109. Start int64
  110. Len int64
  111. Pid int32
  112. Type int16
  113. Whence int16
  114. Sysid int32
  115. Pad_cgo_0 [4]byte
  116. }
  117. type Dirent struct {
  118. Fileno uint32
  119. Reclen uint16
  120. Type uint8
  121. Namlen uint8
  122. Name [256]int8
  123. }
  124. type Fsid struct {
  125. Val [2]int32
  126. }
  127. const (
  128. PathMax = 0x400
  129. )
  130. const (
  131. FADV_NORMAL = 0x0
  132. FADV_RANDOM = 0x1
  133. FADV_SEQUENTIAL = 0x2
  134. FADV_WILLNEED = 0x3
  135. FADV_DONTNEED = 0x4
  136. FADV_NOREUSE = 0x5
  137. )
  138. type RawSockaddrInet4 struct {
  139. Len uint8
  140. Family uint8
  141. Port uint16
  142. Addr [4]byte /* in_addr */
  143. Zero [8]int8
  144. }
  145. type RawSockaddrInet6 struct {
  146. Len uint8
  147. Family uint8
  148. Port uint16
  149. Flowinfo uint32
  150. Addr [16]byte /* in6_addr */
  151. Scope_id uint32
  152. }
  153. type RawSockaddrUnix struct {
  154. Len uint8
  155. Family uint8
  156. Path [104]int8
  157. }
  158. type RawSockaddrDatalink struct {
  159. Len uint8
  160. Family uint8
  161. Index uint16
  162. Type uint8
  163. Nlen uint8
  164. Alen uint8
  165. Slen uint8
  166. Data [46]int8
  167. }
  168. type RawSockaddr struct {
  169. Len uint8
  170. Family uint8
  171. Data [14]int8
  172. }
  173. type RawSockaddrAny struct {
  174. Addr RawSockaddr
  175. Pad [92]int8
  176. }
  177. type _Socklen uint32
  178. type Linger struct {
  179. Onoff int32
  180. Linger int32
  181. }
  182. type Iovec struct {
  183. Base *byte
  184. Len uint64
  185. }
  186. type IPMreq struct {
  187. Multiaddr [4]byte /* in_addr */
  188. Interface [4]byte /* in_addr */
  189. }
  190. type IPMreqn struct {
  191. Multiaddr [4]byte /* in_addr */
  192. Address [4]byte /* in_addr */
  193. Ifindex int32
  194. }
  195. type IPv6Mreq struct {
  196. Multiaddr [16]byte /* in6_addr */
  197. Interface uint32
  198. }
  199. type Msghdr struct {
  200. Name *byte
  201. Namelen uint32
  202. Pad_cgo_0 [4]byte
  203. Iov *Iovec
  204. Iovlen int32
  205. Pad_cgo_1 [4]byte
  206. Control *byte
  207. Controllen uint32
  208. Flags int32
  209. }
  210. type Cmsghdr struct {
  211. Len uint32
  212. Level int32
  213. Type int32
  214. }
  215. type Inet6Pktinfo struct {
  216. Addr [16]byte /* in6_addr */
  217. Ifindex uint32
  218. }
  219. type IPv6MTUInfo struct {
  220. Addr RawSockaddrInet6
  221. Mtu uint32
  222. }
  223. type ICMPv6Filter struct {
  224. Filt [8]uint32
  225. }
  226. const (
  227. SizeofSockaddrInet4 = 0x10
  228. SizeofSockaddrInet6 = 0x1c
  229. SizeofSockaddrAny = 0x6c
  230. SizeofSockaddrUnix = 0x6a
  231. SizeofSockaddrDatalink = 0x36
  232. SizeofLinger = 0x8
  233. SizeofIPMreq = 0x8
  234. SizeofIPMreqn = 0xc
  235. SizeofIPv6Mreq = 0x14
  236. SizeofMsghdr = 0x30
  237. SizeofCmsghdr = 0xc
  238. SizeofInet6Pktinfo = 0x14
  239. SizeofIPv6MTUInfo = 0x20
  240. SizeofICMPv6Filter = 0x20
  241. )
  242. const (
  243. PTRACE_TRACEME = 0x0
  244. PTRACE_CONT = 0x7
  245. PTRACE_KILL = 0x8
  246. )
  247. type Kevent_t struct {
  248. Ident uint64
  249. Filter int16
  250. Flags uint16
  251. Fflags uint32
  252. Data int64
  253. Udata *byte
  254. }
  255. type FdSet struct {
  256. X__fds_bits [16]uint64
  257. }
  258. const (
  259. sizeofIfMsghdr = 0xa8
  260. SizeofIfMsghdr = 0xa8
  261. sizeofIfData = 0x98
  262. SizeofIfData = 0x98
  263. SizeofIfaMsghdr = 0x14
  264. SizeofIfmaMsghdr = 0x10
  265. SizeofIfAnnounceMsghdr = 0x18
  266. SizeofRtMsghdr = 0x98
  267. SizeofRtMetrics = 0x70
  268. )
  269. type ifMsghdr struct {
  270. Msglen uint16
  271. Version uint8
  272. Type uint8
  273. Addrs int32
  274. Flags int32
  275. Index uint16
  276. Pad_cgo_0 [2]byte
  277. Data ifData
  278. }
  279. type IfMsghdr struct {
  280. Msglen uint16
  281. Version uint8
  282. Type uint8
  283. Addrs int32
  284. Flags int32
  285. Index uint16
  286. Pad_cgo_0 [2]byte
  287. Data IfData
  288. }
  289. type ifData struct {
  290. Type uint8
  291. Physical uint8
  292. Addrlen uint8
  293. Hdrlen uint8
  294. Link_state uint8
  295. Vhid uint8
  296. Datalen uint16
  297. Mtu uint32
  298. Metric uint32
  299. Baudrate uint64
  300. Ipackets uint64
  301. Ierrors uint64
  302. Opackets uint64
  303. Oerrors uint64
  304. Collisions uint64
  305. Ibytes uint64
  306. Obytes uint64
  307. Imcasts uint64
  308. Omcasts uint64
  309. Iqdrops uint64
  310. Oqdrops uint64
  311. Noproto uint64
  312. Hwassist uint64
  313. X__ifi_epoch [8]byte
  314. X__ifi_lastchange [16]byte
  315. }
  316. type IfData struct {
  317. Type uint8
  318. Physical uint8
  319. Addrlen uint8
  320. Hdrlen uint8
  321. Link_state uint8
  322. Spare_char1 uint8
  323. Spare_char2 uint8
  324. Datalen uint8
  325. Mtu uint64
  326. Metric uint64
  327. Baudrate uint64
  328. Ipackets uint64
  329. Ierrors uint64
  330. Opackets uint64
  331. Oerrors uint64
  332. Collisions uint64
  333. Ibytes uint64
  334. Obytes uint64
  335. Imcasts uint64
  336. Omcasts uint64
  337. Iqdrops uint64
  338. Noproto uint64
  339. Hwassist uint64
  340. Epoch int64
  341. Lastchange Timeval
  342. }
  343. type IfaMsghdr struct {
  344. Msglen uint16
  345. Version uint8
  346. Type uint8
  347. Addrs int32
  348. Flags int32
  349. Index uint16
  350. Pad_cgo_0 [2]byte
  351. Metric int32
  352. }
  353. type IfmaMsghdr struct {
  354. Msglen uint16
  355. Version uint8
  356. Type uint8
  357. Addrs int32
  358. Flags int32
  359. Index uint16
  360. Pad_cgo_0 [2]byte
  361. }
  362. type IfAnnounceMsghdr struct {
  363. Msglen uint16
  364. Version uint8
  365. Type uint8
  366. Index uint16
  367. Name [16]int8
  368. What uint16
  369. }
  370. type RtMsghdr struct {
  371. Msglen uint16
  372. Version uint8
  373. Type uint8
  374. Index uint16
  375. Pad_cgo_0 [2]byte
  376. Flags int32
  377. Addrs int32
  378. Pid int32
  379. Seq int32
  380. Errno int32
  381. Fmask int32
  382. Inits uint64
  383. Rmx RtMetrics
  384. }
  385. type RtMetrics struct {
  386. Locks uint64
  387. Mtu uint64
  388. Hopcount uint64
  389. Expire uint64
  390. Recvpipe uint64
  391. Sendpipe uint64
  392. Ssthresh uint64
  393. Rtt uint64
  394. Rttvar uint64
  395. Pksent uint64
  396. Weight uint64
  397. Filler [3]uint64
  398. }
  399. const (
  400. SizeofBpfVersion = 0x4
  401. SizeofBpfStat = 0x8
  402. SizeofBpfZbuf = 0x18
  403. SizeofBpfProgram = 0x10
  404. SizeofBpfInsn = 0x8
  405. SizeofBpfHdr = 0x20
  406. SizeofBpfZbufHeader = 0x20
  407. )
  408. type BpfVersion struct {
  409. Major uint16
  410. Minor uint16
  411. }
  412. type BpfStat struct {
  413. Recv uint32
  414. Drop uint32
  415. }
  416. type BpfZbuf struct {
  417. Bufa *byte
  418. Bufb *byte
  419. Buflen uint64
  420. }
  421. type BpfProgram struct {
  422. Len uint32
  423. Pad_cgo_0 [4]byte
  424. Insns *BpfInsn
  425. }
  426. type BpfInsn struct {
  427. Code uint16
  428. Jt uint8
  429. Jf uint8
  430. K uint32
  431. }
  432. type BpfHdr struct {
  433. Tstamp Timeval
  434. Caplen uint32
  435. Datalen uint32
  436. Hdrlen uint16
  437. Pad_cgo_0 [6]byte
  438. }
  439. type BpfZbufHeader struct {
  440. Kernel_gen uint32
  441. Kernel_len uint32
  442. User_gen uint32
  443. X_bzh_pad [5]uint32
  444. }
  445. type Termios struct {
  446. Iflag uint32
  447. Oflag uint32
  448. Cflag uint32
  449. Lflag uint32
  450. Cc [20]uint8
  451. Ispeed uint32
  452. Ospeed uint32
  453. }
  454. type Winsize struct {
  455. Row uint16
  456. Col uint16
  457. Xpixel uint16
  458. Ypixel uint16
  459. }
  460. const (
  461. AT_FDCWD = -0x64
  462. AT_REMOVEDIR = 0x800
  463. AT_SYMLINK_FOLLOW = 0x400
  464. AT_SYMLINK_NOFOLLOW = 0x200
  465. )
  466. type PollFd struct {
  467. Fd int32
  468. Events int16
  469. Revents int16
  470. }
  471. const (
  472. POLLERR = 0x8
  473. POLLHUP = 0x10
  474. POLLIN = 0x1
  475. POLLINIGNEOF = 0x2000
  476. POLLNVAL = 0x20
  477. POLLOUT = 0x4
  478. POLLPRI = 0x2
  479. POLLRDBAND = 0x80
  480. POLLRDNORM = 0x40
  481. POLLWRBAND = 0x100
  482. POLLWRNORM = 0x4
  483. )
  484. type CapRights struct {
  485. Rights [2]uint64
  486. }
  487. type Utsname struct {
  488. Sysname [256]byte
  489. Nodename [256]byte
  490. Release [256]byte
  491. Version [256]byte
  492. Machine [256]byte
  493. }