bsd  package unix  import (  "syscall"  "unsafe" )  var _ syscall.Errno  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func getgroups(ngid int, gid *_Gid_t) (n int, err error) {  r0, _, e0 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)  n = int(r0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func setgroups(ngid int, gid *_Gid_t) (err error) {  _, _, e0 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func wait0(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {  r0, _, e0 := Syscall0(SYS_WAIT0, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)  wpid = int(r0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {  r0, _, e0 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))  fd = int(r0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {  _, _, e0 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {  _, _, e0 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func socket(domain int, typ int, proto int) (fd int, err error) {  r0, _, e0 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))  fd = int(r0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {  _, _, e0 := Syscall0(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {  _, _, e0 := Syscall0(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {  _, _, e0 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {  _, _, e0 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func Shutdown(s int, how int) (err error) {  _, _, e0 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func socketpair(domain int, typ int, proto int, fd *[0]int00) (err error) {  _, _, e0 := RawSyscall0(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {  var _p0 unsafe.Pointer  if len(p) > 0 {   _p0 = unsafe.Pointer(&p[0])  } else {   _p0 = unsafe.Pointer(&_zero)  }  r0, _, e0 := Syscall0(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))  n = int(r0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {  var _p0 unsafe.Pointer  if len(buf) > 0 {   _p0 = unsafe.Pointer(&buf[0])  } else {   _p0 = unsafe.Pointer(&_zero)  }  _, _, e0 := Syscall0(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {  r0, _, e0 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))  n = int(r0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {  r0, _, e0 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))  n = int(r0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {  r0, _, e0 := Syscall0(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))  n = int(r0)  if e0 != 0 {   err = errnoErr(e0)  }  return }  // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT  func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {  var _p0 unsafe.Pointer  if len(mib) > 0 {   _p0 = unsafe.Pointer(&mib[0])  } else {   _p0 = unsafe.Pointer(&_zero)  }  _, _, e0 := Syscall0(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))  