You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2017/03/28 22:40:58 UTC

[01/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Repository: incubator-mynewt-newtmgr
Updated Branches:
  refs/heads/master f0a27b629 -> 15498bdcf


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
deleted file mode 100644
index f5d488b..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ /dev/null
@@ -1,1876 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build ppc64,linux
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(arg)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(source)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	var _p2 *byte
-	_p2, err = BytePtrFromString(fstype)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	use(unsafe.Pointer(_p2))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
-	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
-	state = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
-	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
-	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
-	tid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(dest) > 0 {
-		_p2 = unsafe.Pointer(&dest[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(pathname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
-	use(unsafe.Pointer(_p0))
-	watchdesc = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
-	success = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(dest) > 0 {
-		_p1 = unsafe.Pointer(&dest[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
-	use(unsafe.Pointer(_p0))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(newroot)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(putold)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
-	_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(data) > 0 {
-		_p2 = unsafe.Pointer(&data[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
-	Syscall(SYS_SYNC, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
-	ticks = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
-	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
-	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
-	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
-	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(events) > 0 {
-		_p0 = unsafe.Pointer(&events[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	euid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
-	_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
-	_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
-	_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	off = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
-	written = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
-	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	nn = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Time(t *Time_t) (tt Time_t, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
-	tt = Time_t(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}



[45/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/toolchain/deps.go
----------------------------------------------------------------------
diff --git a/newt/toolchain/deps.go b/newt/toolchain/deps.go
deleted file mode 100644
index db04e6d..0000000
--- a/newt/toolchain/deps.go
+++ /dev/null
@@ -1,452 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package toolchain
-
-import (
-	"bytes"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"strings"
-	"time"
-
-	"mynewt.apache.org/newt/util"
-)
-
-type DepTracker struct {
-	// Most recent .o modification time.
-	MostRecent time.Time
-
-	compiler *Compiler
-}
-
-func NewDepTracker(c *Compiler) DepTracker {
-	tracker := DepTracker{
-		MostRecent: time.Unix(0, 0),
-		compiler:   c,
-	}
-
-	return tracker
-}
-
-// @return string               The name of the dependent file (i.e., the first
-//                                  .o file encountered).
-// @return []string             Populated with the dependencies' filenames.
-func parseDepsLine(line string) (string, []string, error) {
-	tokens := strings.Fields(line)
-	if len(tokens) == 0 {
-		return "", nil, nil
-	}
-
-	dFileTok := tokens[0]
-	if dFileTok[len(dFileTok)-1:] != ":" {
-		return "", nil, util.NewNewtError("line missing ':'")
-	}
-
-	dFileName := dFileTok[:len(dFileTok)-1]
-	return dFileName, tokens[1:], nil
-
-}
-
-// Parses a dependency (.d) file generated by gcc.  On success, the returned
-// string array is populated with the dependency filenames.  This function
-// expects each line of a dependency file to have the following format:
-//
-// <file>.o: <file>.c a.h b.h c.h \
-//  d.h e.h f.h
-//
-// Only the first dependent object(<file>.o) is considered.
-//
-// @return []string             Populated with the dependencies' filenames.
-func ParseDepsFile(filename string) ([]string, error) {
-	lines, err := util.ReadLines(filename)
-	if err != nil {
-		return nil, err
-	}
-
-	if len(lines) == 0 {
-		return []string{}, nil
-	}
-
-	var dFile string
-	allDeps := []string{}
-	for _, line := range lines {
-		src, deps, err := parseDepsLine(line)
-		if err != nil {
-			return nil, util.FmtNewtError(
-				"Invalid Makefile dependency file \"%s\"; %s",
-				filename, err.Error())
-		}
-
-		if dFile == "" {
-			dFile = src
-		}
-
-		if src == dFile {
-			allDeps = append(allDeps, deps...)
-		}
-	}
-
-	return allDeps, nil
-}
-
-// Updates the dependency tracker's most recent timestamp according to the
-// modification time of the specified file.  If the specified file is older
-// than the tracker's currently most-recent time, this function has no effect.
-func (tracker *DepTracker) ProcessFileTime(file string) error {
-	modTime, err := util.FileModificationTime(file)
-	if err != nil {
-		return err
-	}
-
-	if modTime.After(tracker.MostRecent) {
-		tracker.MostRecent = modTime
-	}
-
-	return nil
-}
-
-// Determines if a file was previously built with a command line invocation
-// different from the one specified.
-//
-// @param dstFile               The output file whose build invocation is being
-//                                  tested.
-// @param cmd                   The command that would be used to generate the
-//                                  specified destination file.
-//
-// @return                      true if the command has changed or if the
-//                                  destination file was never built;
-//                              false otherwise.
-func commandHasChanged(dstFile string, cmd []string) bool {
-	cmdFile := dstFile + ".cmd"
-	prevCmd, err := ioutil.ReadFile(cmdFile)
-	if err != nil {
-		return true
-	}
-
-	curCmd := serializeCommand(cmd)
-
-	changed := bytes.Compare(prevCmd, curCmd) != 0
-	return changed
-}
-
-// Determines if the specified C or assembly file needs to be built.  A compile
-// is required if any of the following is true:
-//     * The destination object file does not exist.
-//     * The existing object file was built with a different compiler
-//       invocation.
-//     * The source file has a newer modification time than the object file.
-//     * One or more included header files has a newer modification time than
-//       the object file.
-func (tracker *DepTracker) CompileRequired(srcFile string,
-	compilerType int) (bool, error) {
-
-	objPath := tracker.compiler.dstFilePath(srcFile) + ".o"
-	depPath := tracker.compiler.dstFilePath(srcFile) + ".d"
-
-	// If the object was previously built with a different set of options, a
-	// rebuild is necessary.
-	cmd, err := tracker.compiler.CompileFileCmd(srcFile, compilerType)
-	if err != nil {
-		return false, err
-	}
-
-	if commandHasChanged(objPath, cmd) {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "%s - rebuild required; "+
-			"different command\n", srcFile)
-		err := tracker.compiler.GenDepsForFile(srcFile)
-		if err != nil {
-			return false, err
-		}
-		return true, nil
-	}
-
-	if util.NodeNotExist(depPath) {
-		err := tracker.compiler.GenDepsForFile(srcFile)
-		if err != nil {
-			return false, err
-		}
-	}
-
-	srcModTime, err := util.FileModificationTime(srcFile)
-	if err != nil {
-		return false, err
-	}
-
-	objModTime, err := util.FileModificationTime(objPath)
-	if err != nil {
-		return false, err
-	}
-
-	// If the object doesn't exist or is older than the source file, a build is
-	// required; no need to check dependencies.
-	if srcModTime.After(objModTime) {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "%s - rebuild required; "+
-			"source newer than obj\n", srcFile)
-		return true, nil
-	}
-
-	// Determine if the dependency (.d) file needs to be generated.  If it
-	// doesn't exist or is older than the source file, it is out of date and
-	// needs to be created.
-	depModTime, err := util.FileModificationTime(depPath)
-	if err != nil {
-		return false, err
-	}
-
-	if srcModTime.After(depModTime) {
-		err := tracker.compiler.GenDepsForFile(srcFile)
-		if err != nil {
-			return false, err
-		}
-	}
-
-	// Extract the dependency filenames from the dependency file.
-	deps, err := ParseDepsFile(depPath)
-	if err != nil {
-		return false, err
-	}
-
-	// Check if any dependencies are newer than the destination object file.
-	for _, dep := range deps {
-		if util.NodeNotExist(dep) {
-			// The dependency has been deleted; a rebuild is required.  Also,
-			// the dependency file is out of date, so it needs to be deleted.
-			// We cannot regenerate it now because the source file might be
-			// including a nonexistent header.
-			util.StatusMessage(util.VERBOSITY_VERBOSE,
-				"%s - rebuild required; dependency \"%s\" has been deleted\n",
-				srcFile, dep)
-			os.Remove(depPath)
-			return true, nil
-		} else {
-			depModTime, err = util.FileModificationTime(dep)
-			if err != nil {
-				return false, err
-			}
-		}
-
-		if depModTime.After(objModTime) {
-			util.StatusMessage(util.VERBOSITY_VERBOSE, "%s - rebuild required; obj older than dependency (%s)\n", srcFile, dep)
-			return true, nil
-		}
-	}
-
-	return false, nil
-}
-
-// Determines if the specified static library needs to be rearchived.  The
-// library needs to be archived if any of the following is true:
-//     * The destination library file does not exist.
-//     * The existing library file was built with a different compiler
-//       invocation.
-//     * One or more source object files has a newer modification time than the
-//       library file.
-func (tracker *DepTracker) ArchiveRequired(archiveFile string,
-	objFiles []string) (bool, error) {
-
-	// If the archive was previously built with a different set of options, a
-	// rebuild is required.
-	cmd := tracker.compiler.CompileArchiveCmd(archiveFile, objFiles)
-	if commandHasChanged(archiveFile, cmd) {
-		return true, nil
-	}
-
-	// If the archive doesn't exist or is older than any object file, a rebuild
-	// is required.
-	aModTime, err := util.FileModificationTime(archiveFile)
-	if err != nil {
-		return false, err
-	}
-	if tracker.MostRecent.After(aModTime) {
-		return true, nil
-	}
-
-	// The library is up to date.
-	return false, nil
-}
-
-func (tracker *DepTracker) TrimmedArchiveRequired(dstFile string,
-	srcFile string, elfLib string) (bool, error) {
-
-	// If the .A file doesn't exist or is older than the input file, a rebuild
-	// is required.
-	dstModTime, err := util.FileModificationTime(dstFile)
-	if err != nil {
-		return false, err
-	}
-
-	// If the elf file doesn't exist or is older than any input file,
-	// a rebuild is required.
-	if elfLib != "" {
-		elfDstModTime, err := util.FileModificationTime(elfLib)
-		if err != nil {
-			return false, err
-		}
-
-		if elfDstModTime.After(dstModTime) {
-			return true, nil
-		}
-	}
-	objModTime, err := util.FileModificationTime(srcFile)
-	if err != nil {
-		return false, err
-	}
-
-	if objModTime.After(dstModTime) {
-		return true, nil
-	}
-	return false, nil
-}
-
-// Determines if the specified elf file needs to be linked.  Linking is
-// necessary if the elf file does not exist or has an older modification time
-// than any source object or library file.
-// Determines if the specified static library needs to be rearchived.  The
-// library needs to be archived if any of the following is true:
-//     * The destination library file does not exist.
-//     * The existing library file was built with a different compiler
-//       invocation.
-//     * One or more source object files has a newer modification time than the
-//       library file.
-func (tracker *DepTracker) LinkRequired(dstFile string,
-	options map[string]bool, objFiles []string,
-	keepSymbols []string, elfLib string) (bool, error) {
-
-	// If the elf file was previously built with a different set of options, a
-	// rebuild is required.
-	cmd := tracker.compiler.CompileBinaryCmd(dstFile, options, objFiles, keepSymbols, elfLib)
-	if commandHasChanged(dstFile, cmd) {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "%s - link required; "+
-			"different command\n", dstFile)
-		return true, nil
-	}
-
-	// If the elf file doesn't exist or is older than any input file, a rebuild
-	// is required.
-	dstModTime, err := util.FileModificationTime(dstFile)
-	if err != nil {
-		return false, err
-	}
-
-	// If the elf file doesn't exist or is older than any input file, a rebuild
-	// is required.
-	if elfLib != "" {
-		elfDstModTime, err := util.FileModificationTime(elfLib)
-		if err != nil {
-			return false, err
-		}
-		if elfDstModTime.After(dstModTime) {
-			util.StatusMessage(util.VERBOSITY_VERBOSE, "%s - link required; "+
-				"old elf file\n", elfLib)
-			return true, nil
-		}
-	}
-
-	// Check timestamp of each .o file in the project.
-	if tracker.MostRecent.After(dstModTime) {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "%s - link required; "+
-			"source newer than elf\n", dstFile)
-		return true, nil
-	}
-
-	// Check timestamp of the linker script and all input libraries.
-	for _, ls := range tracker.compiler.LinkerScripts {
-		objFiles = append(objFiles, ls)
-	}
-	for _, obj := range objFiles {
-		objModTime, err := util.FileModificationTime(obj)
-		if err != nil {
-			return false, err
-		}
-
-		if objModTime.After(dstModTime) {
-			util.StatusMessage(util.VERBOSITY_VERBOSE, "%s - rebuild "+
-				"required; obj older than dependency (%s)\n", dstFile, obj)
-			return true, nil
-		}
-	}
-
-	return false, nil
-}
-
-/* Building a ROM elf is used for shared application linking.
- * A ROM elf requires a rebuild if any of archives (.a files) are newer
- * than the rom elf, or if the elf file is newer than the rom_elf */
-func (tracker *DepTracker) RomElfBuildRequired(dstFile string, elfFile string,
-	archFiles []string) (bool, error) {
-
-	// If the rom_elf file doesn't exist or is older than any input file, a
-	// rebuild is required.
-	dstModTime, err := util.FileModificationTime(dstFile)
-	if err != nil {
-		return false, err
-	}
-
-	// If the elf file doesn't exist or is older than any input file, a rebuild
-	// is required.
-	elfDstModTime, err := util.FileModificationTime(elfFile)
-	if err != nil {
-		return false, err
-	}
-
-	if elfDstModTime.After(dstModTime) {
-		return true, nil
-	}
-
-	for _, arch := range archFiles {
-		objModTime, err := util.FileModificationTime(arch)
-		if err != nil {
-			return false, err
-		}
-
-		if objModTime.After(dstModTime) {
-			return true, nil
-		}
-	}
-	return false, nil
-}
-
-// Determines if the specified static library needs to be copied.  The
-// library needs to be archived if any of the following is true:
-//     * The destination library file does not exist.
-//     * Source object files has a newer modification time than the
-//       target file.
-func (tracker *DepTracker) CopyRequired(srcFile string) (bool, error) {
-
-	tgtFile := tracker.compiler.DstDir() + "/" + filepath.Base(srcFile)
-
-	// If the target doesn't exist or is older than source file, a copy
-	// is required.
-	srcModTime, err := util.FileModificationTime(srcFile)
-	if err != nil {
-		return false, err
-	}
-	tgtModTime, err := util.FileModificationTime(tgtFile)
-	if err != nil {
-		return false, err
-	}
-	if srcModTime.After(tgtModTime) {
-		return true, nil
-	}
-
-	// The target is up to date.
-	return false, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/.gitignore
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/.gitignore b/newt/vendor/github.com/Sirupsen/logrus/.gitignore
deleted file mode 100644
index 66be63a..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-logrus

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/.travis.yml
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/.travis.yml b/newt/vendor/github.com/Sirupsen/logrus/.travis.yml
deleted file mode 100644
index ec7dd78..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: go
-go:
-  - 1.6
-  - 1.7
-  - tip
-install:
-  - go get -t $(go list ./... | grep -v /examples/)
-script:
-  - GOMAXPROCS=4 GORACE="halt_on_error=1" go test -race -v $(go list ./... | grep -v /examples/)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/CHANGELOG.md b/newt/vendor/github.com/Sirupsen/logrus/CHANGELOG.md
deleted file mode 100644
index f2c2bc2..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/CHANGELOG.md
+++ /dev/null
@@ -1,66 +0,0 @@
-# 0.10.0
-
-* feature: Add a test hook (#180)
-* feature: `ParseLevel` is now case-insensitive (#326)
-* feature: `FieldLogger` interface that generalizes `Logger` and `Entry` (#308)
-* performance: avoid re-allocations on `WithFields` (#335)
-
-# 0.9.0
-
-* logrus/text_formatter: don't emit empty msg
-* logrus/hooks/airbrake: move out of main repository
-* logrus/hooks/sentry: move out of main repository
-* logrus/hooks/papertrail: move out of main repository
-* logrus/hooks/bugsnag: move out of main repository
-* logrus/core: run tests with `-race`
-* logrus/core: detect TTY based on `stderr`
-* logrus/core: support `WithError` on logger
-* logrus/core: Solaris support
-
-# 0.8.7
-
-* logrus/core: fix possible race (#216)
-* logrus/doc: small typo fixes and doc improvements
-
-
-# 0.8.6
-
-* hooks/raven: allow passing an initialized client
-
-# 0.8.5
-
-* logrus/core: revert #208
-
-# 0.8.4
-
-* formatter/text: fix data race (#218)
-
-# 0.8.3
-
-* logrus/core: fix entry log level (#208)
-* logrus/core: improve performance of text formatter by 40%
-* logrus/core: expose `LevelHooks` type
-* logrus/core: add support for DragonflyBSD and NetBSD
-* formatter/text: print structs more verbosely
-
-# 0.8.2
-
-* logrus: fix more Fatal family functions
-
-# 0.8.1
-
-* logrus: fix not exiting on `Fatalf` and `Fatalln`
-
-# 0.8.0
-
-* logrus: defaults to stderr instead of stdout
-* hooks/sentry: add special field for `*http.Request`
-* formatter/text: ignore Windows for colors
-
-# 0.7.3
-
-* formatter/\*: allow configuration of timestamp layout
-
-# 0.7.2
-
-* formatter/text: Add configuration option for time format (#158)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/LICENSE
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/LICENSE b/newt/vendor/github.com/Sirupsen/logrus/LICENSE
deleted file mode 100644
index f090cb4..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Simon Eskildsen
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/README.md
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/README.md b/newt/vendor/github.com/Sirupsen/logrus/README.md
deleted file mode 100644
index f9cfb0a..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/README.md
+++ /dev/null
@@ -1,426 +0,0 @@
-# Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:"/>&nbsp;[![Build Status](https://travis-ci.org/Sirupsen/logrus.svg?branch=master)](https://travis-ci.org/Sirupsen/logrus)&nbsp;[![GoDoc](https://godoc.org/github.com/Sirupsen/logrus?status.svg)](https://godoc.org/github.com/Sirupsen/logrus)
-
-Logrus is a structured logger for Go (golang), completely API compatible with
-the standard library logger. [Godoc][godoc]. **Please note the Logrus API is not
-yet stable (pre 1.0). Logrus itself is completely stable and has been used in
-many large deployments. The core API is unlikely to change much but please
-version control your Logrus to make sure you aren't fetching latest `master` on
-every build.**
-
-Nicely color-coded in development (when a TTY is attached, otherwise just
-plain text):
-
-![Colored](http://i.imgur.com/PY7qMwd.png)
-
-With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash
-or Splunk:
-
-```json
-{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the
-ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"}
-
-{"level":"warning","msg":"The group's number increased tremendously!",
-"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"}
-
-{"animal":"walrus","level":"info","msg":"A giant walrus appears!",
-"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"}
-
-{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.",
-"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"}
-
-{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true,
-"time":"2014-03-10 19:57:38.562543128 -0400 EDT"}
-```
-
-With the default `log.SetFormatter(&log.TextFormatter{})` when a TTY is not
-attached, the output is compatible with the
-[logfmt](http://godoc.org/github.com/kr/logfmt) format:
-
-```text
-time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8
-time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10
-time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true
-time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4
-time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009
-time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true
-exit status 1
-```
-
-#### Example
-
-The simplest way to use Logrus is simply the package-level exported logger:
-
-```go
-package main
-
-import (
-  log "github.com/Sirupsen/logrus"
-)
-
-func main() {
-  log.WithFields(log.Fields{
-    "animal": "walrus",
-  }).Info("A walrus appears")
-}
-```
-
-Note that it's completely api-compatible with the stdlib logger, so you can
-replace your `log` imports everywhere with `log "github.com/Sirupsen/logrus"`
-and you'll now have the flexibility of Logrus. You can customize it all you
-want:
-
-```go
-package main
-
-import (
-  "os"
-  log "github.com/Sirupsen/logrus"
-)
-
-func init() {
-  // Log as JSON instead of the default ASCII formatter.
-  log.SetFormatter(&log.JSONFormatter{})
-
-  // Output to stderr instead of stdout, could also be a file.
-  log.SetOutput(os.Stderr)
-
-  // Only log the warning severity or above.
-  log.SetLevel(log.WarnLevel)
-}
-
-func main() {
-  log.WithFields(log.Fields{
-    "animal": "walrus",
-    "size":   10,
-  }).Info("A group of walrus emerges from the ocean")
-
-  log.WithFields(log.Fields{
-    "omg":    true,
-    "number": 122,
-  }).Warn("The group's number increased tremendously!")
-
-  log.WithFields(log.Fields{
-    "omg":    true,
-    "number": 100,
-  }).Fatal("The ice breaks!")
-
-  // A common pattern is to re-use fields between logging statements by re-using
-  // the logrus.Entry returned from WithFields()
-  contextLogger := log.WithFields(log.Fields{
-    "common": "this is a common field",
-    "other": "I also should be logged always",
-  })
-
-  contextLogger.Info("I'll be logged with common and other field")
-  contextLogger.Info("Me too")
-}
-```
-
-For more advanced usage such as logging to multiple locations from the same
-application, you can also create an instance of the `logrus` Logger:
-
-```go
-package main
-
-import (
-  "github.com/Sirupsen/logrus"
-)
-
-// Create a new instance of the logger. You can have any number of instances.
-var log = logrus.New()
-
-func main() {
-  // The API for setting attributes is a little different than the package level
-  // exported logger. See Godoc.
-  log.Out = os.Stderr
-
-  log.WithFields(logrus.Fields{
-    "animal": "walrus",
-    "size":   10,
-  }).Info("A group of walrus emerges from the ocean")
-}
-```
-
-#### Fields
-
-Logrus encourages careful, structured logging though logging fields instead of
-long, unparseable error messages. For example, instead of: `log.Fatalf("Failed
-to send event %s to topic %s with key %d")`, you should log the much more
-discoverable:
-
-```go
-log.WithFields(log.Fields{
-  "event": event,
-  "topic": topic,
-  "key": key,
-}).Fatal("Failed to send event")
-```
-
-We've found this API forces you to think about logging in a way that produces
-much more useful logging messages. We've been in countless situations where just
-a single added field to a log statement that was already there would've saved us
-hours. The `WithFields` call is optional.
-
-In general, with Logrus using any of the `printf`-family functions should be
-seen as a hint you should add a field, however, you can still use the
-`printf`-family functions with Logrus.
-
-#### Hooks
-
-You can add hooks for logging levels. For example to send errors to an exception
-tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to
-multiple places simultaneously, e.g. syslog.
-
-Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in
-`init`:
-
-```go
-import (
-  log "github.com/Sirupsen/logrus"
-  "gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "aibrake"
-  logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog"
-  "log/syslog"
-)
-
-func init() {
-
-  // Use the Airbrake hook to report errors that have Error severity or above to
-  // an exception tracker. You can create custom hooks, see the Hooks section.
-  log.AddHook(airbrake.NewHook(123, "xyz", "production"))
-
-  hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
-  if err != nil {
-    log.Error("Unable to connect to local syslog daemon")
-  } else {
-    log.AddHook(hook)
-  }
-}
-```
-Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md).
-
-| Hook  | Description |
-| ----- | ----------- |
-| [Airbrake](https://github.com/gemnasium/logrus-airbrake-hook) | Send errors to the Airbrake API V3. Uses the official [`gobrake`](https://github.com/airbrake/gobrake) behind the scenes. |
-| [Airbrake "legacy"](https://github.com/gemnasium/logrus-airbrake-legacy-hook) | Send errors to an exception tracking service compatible with the Airbrake API V2. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. |
-| [Papertrail](https://github.com/polds/logrus-papertrail-hook) | Send errors to the [Papertrail](https://papertrailapp.com) hosted logging service via UDP. |
-| [Syslog](https://github.com/Sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. |
-| [Bugsnag](https://github.com/Shopify/logrus-bugsnag/blob/master/bugsnag.go) | Send errors to the Bugsnag exception tracking service. |
-| [Sentry](https://github.com/evalphobia/logrus_sentry) | Send errors to the Sentry error logging and aggregation service. |
-| [Hiprus](https://github.com/nubo/hiprus) | Send errors to a channel in hipchat. |
-| [Logrusly](https://github.com/sebest/logrusly) | Send logs to [Loggly](https://www.loggly.com/) |
-| [Slackrus](https://github.com/johntdyer/slackrus) | Hook for Slack chat. |
-| [Journalhook](https://github.com/wercker/journalhook) | Hook for logging to `systemd-journald` |
-| [Graylog](https://github.com/gemnasium/logrus-graylog-hook) | Hook for logging to [Graylog](http://graylog2.org/) |
-| [Raygun](https://github.com/squirkle/logrus-raygun-hook) | Hook for logging to [Raygun.io](http://raygun.io/) |
-| [LFShook](https://github.com/rifflock/lfshook) | Hook for logging to the local filesystem |
-| [Honeybadger](https://github.com/agonzalezro/logrus_honeybadger) | Hook for sending exceptions to Honeybadger |
-| [Mail](https://github.com/zbindenren/logrus_mail) | Hook for sending exceptions via mail |
-| [Rollrus](https://github.com/heroku/rollrus) | Hook for sending errors to rollbar |
-| [Fluentd](https://github.com/evalphobia/logrus_fluent) | Hook for logging to fluentd |
-| [Mongodb](https://github.com/weekface/mgorus) | Hook for logging to mongodb |
-| [Influxus] (http://github.com/vlad-doru/influxus) | Hook for concurrently logging to [InfluxDB] (http://influxdata.com/) |
-| [InfluxDB](https://github.com/Abramovic/logrus_influxdb) | Hook for logging to influxdb |
-| [Octokit](https://github.com/dorajistyle/logrus-octokit-hook) | Hook for logging to github via octokit |
-| [DeferPanic](https://github.com/deferpanic/dp-logrus) | Hook for logging to DeferPanic |
-| [Redis-Hook](https://github.com/rogierlommers/logrus-redis-hook) | Hook for logging to a ELK stack (through Redis) |
-| [Amqp-Hook](https://github.com/vladoatanasov/logrus_amqp) | Hook for logging to Amqp broker (Like RabbitMQ) |
-| [KafkaLogrus](https://github.com/goibibo/KafkaLogrus) | Hook for logging to kafka |
-| [Typetalk](https://github.com/dragon3/logrus-typetalk-hook) | Hook for logging to [Typetalk](https://www.typetalk.in/) |
-| [ElasticSearch](https://github.com/sohlich/elogrus) | Hook for logging to ElasticSearch|
-| [Sumorus](https://github.com/doublefree/sumorus) | Hook for logging to [SumoLogic](https://www.sumologic.com/)|
-| [Scribe](https://github.com/sagar8192/logrus-scribe-hook) | Hook for logging to [Scribe](https://github.com/facebookarchive/scribe)|
-| [Logstash](https://github.com/bshuster-repo/logrus-logstash-hook) | Hook for logging to [Logstash](https://www.elastic.co/products/logstash) |
-| [logz.io](https://github.com/ripcurld00d/logrus-logzio-hook) | Hook for logging to [logz.io](https://logz.io), a Log as a Service using Logstash |
-| [Logmatic.io](https://github.com/logmatic/logmatic-go) | Hook for logging to [Logmatic.io](http://logmatic.io/) |
-| [Pushover](https://github.com/toorop/logrus_pushover) | Send error via [Pushover](https://pushover.net) |
-| [PostgreSQL](https://github.com/gemnasium/logrus-postgresql-hook) | Send logs to [PostgreSQL](http://postgresql.org) |
-
-
-#### Level logging
-
-Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic.
-
-```go
-log.Debug("Useful debugging information.")
-log.Info("Something noteworthy happened!")
-log.Warn("You should probably take a look at this.")
-log.Error("Something failed but I'm not quitting.")
-// Calls os.Exit(1) after logging
-log.Fatal("Bye.")
-// Calls panic() after logging
-log.Panic("I'm bailing.")
-```
-
-You can set the logging level on a `Logger`, then it will only log entries with
-that severity or anything above it:
-
-```go
-// Will log anything that is info or above (warn, error, fatal, panic). Default.
-log.SetLevel(log.InfoLevel)
-```
-
-It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose
-environment if your application has that.
-
-#### Entries
-
-Besides the fields added with `WithField` or `WithFields` some fields are
-automatically added to all logging events:
-
-1. `time`. The timestamp when the entry was created.
-2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after
-   the `AddFields` call. E.g. `Failed to send event.`
-3. `level`. The logging level. E.g. `info`.
-
-#### Environments
-
-Logrus has no notion of environment.
-
-If you wish for hooks and formatters to only be used in specific environments,
-you should handle that yourself. For example, if your application has a global
-variable `Environment`, which is a string representation of the environment you
-could do:
-
-```go
-import (
-  log "github.com/Sirupsen/logrus"
-)
-
-init() {
-  // do something here to set environment depending on an environment variable
-  // or command-line flag
-  if Environment == "production" {
-    log.SetFormatter(&log.JSONFormatter{})
-  } else {
-    // The TextFormatter is default, you don't actually have to do this.
-    log.SetFormatter(&log.TextFormatter{})
-  }
-}
-```
-
-This configuration is how `logrus` was intended to be used, but JSON in
-production is mostly only useful if you do log aggregation with tools like
-Splunk or Logstash.
-
-#### Formatters
-
-The built-in logging formatters are:
-
-* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise
-  without colors.
-  * *Note:* to force colored output when there is no TTY, set the `ForceColors`
-    field to `true`.  To force no colored output even if there is a TTY  set the
-    `DisableColors` field to `true`
-* `logrus.JSONFormatter`. Logs fields as JSON.
-
-Third party logging formatters:
-
-* [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events.
-* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout.
-* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the P\u0349\u032bo\u0333\u033c\u030aw\u0316\u0348\u0330\u034ee\u032c\u0354\u032d\u0342r\u035a\u033c\u0339\u0332 \u032b\u0353\u0349\u0333\u0348\u014d\u0320\u0355\u0356\u031af\u031d\u034d\u0320 \u0355\u0332\u031e\u0356\u0351Z\u0316\u032b\u0324\u032b\u036aa\u0349\u032c\u0348\u0317l\u0356\u034eg\u0333\u0325o\u0330\u0325\u0305!\u0323\u0354\u0332\u033b\u034a\u0304 \u0319\u0318\u0326\u0339\u0326.
-
-You can define your formatter by implementing the `Formatter` interface,
-requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a
-`Fields` type (`map[string]interface{}`) with all your fields as well as the
-default ones (see Entries section above):
-
-```go
-type MyJSONFormatter struct {
-}
-
-log.SetFormatter(new(MyJSONFormatter))
-
-func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) {
-  // Note this doesn't include Time, Level and Message which are available on
-  // the Entry. Consult `godoc` on information about those fields or read the
-  // source of the official loggers.
-  serialized, err := json.Marshal(entry.Data)
-    if err != nil {
-      return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
-    }
-  return append(serialized, '\n'), nil
-}
-```
-
-#### Logger as an `io.Writer`
-
-Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it.
-
-```go
-w := logger.Writer()
-defer w.Close()
-
-srv := http.Server{
-    // create a stdlib log.Logger that writes to
-    // logrus.Logger.
-    ErrorLog: log.New(w, "", 0),
-}
-```
-
-Each line written to that writer will be printed the usual way, using formatters
-and hooks. The level for those entries is `info`.
-
-#### Rotation
-
-Log rotation is not provided with Logrus. Log rotation should be done by an
-external program (like `logrotate(8)`) that can compress and delete old log
-entries. It should not be a feature of the application-level logger.
-
-#### Tools
-
-| Tool | Description |
-| ---- | ----------- |
-|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will generated with different config at different environment.|
-|[Logrus Viper Helper](https://github.com/heirko/go-contrib/tree/master/logrusHelper)|An Helper arround Logrus to wrap with spf13/Viper to load configuration with fangs! And to simplify Logrus configuration use some behavior of [Logrus Mate](https://github.com/gogap/logrus_mate). [sample](https://github.com/heirko/iris-contrib/blob/master/middleware/logrus-logger/example) |
-
-#### Testing
-
-Logrus has a built in facility for asserting the presence of log messages. This is implemented through the `test` hook and provides:
-
-* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just add the `test` hook
-* a test logger (`test.NewNullLogger`) that just records log messages (and does not output any):
-
-```go
-logger, hook := NewNullLogger()
-logger.Error("Hello error")
-
-assert.Equal(1, len(hook.Entries))
-assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level)
-assert.Equal("Hello error", hook.LastEntry().Message)
-
-hook.Reset()
-assert.Nil(hook.LastEntry())
-```
-
-#### Fatal handlers
-
-Logrus can register one or more functions that will be called when any `fatal`
-level message is logged. The registered handlers will be executed before
-logrus performs a `os.Exit(1)`. This behavior may be helpful if callers need
-to gracefully shutdown. Unlike a `panic("Something went wrong...")` call which can be intercepted with a deferred `recover` a call to `os.Exit(1)` can not be intercepted.
-
-```
-...
-handler := func() {
-  // gracefully shutdown something...
-}
-logrus.RegisterExitHandler(handler)
-...
-```
-
-#### Thread safty
-
-By default Logger is protected by mutex for concurrent writes, this mutex is invoked when calling hooks and writing logs.
-If you are sure such locking is not needed, you can call logger.SetNoLock() to disable the locking.
-
-Situation when locking is not needed includes:
-
-* You have no hooks registered, or hooks calling is already thread-safe.
-
-* Writing to logger.Out is already thread-safe, for example:
-
-  1) logger.Out is protected by locks.
-
-  2) logger.Out is a os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allow multi-thread/multi-process writing)
-
-     (Refer to http://www.notthewizard.com/2014/06/17/are-files-appends-really-atomic/)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/alt_exit.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/alt_exit.go b/newt/vendor/github.com/Sirupsen/logrus/alt_exit.go
deleted file mode 100644
index b4c9e84..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/alt_exit.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package logrus
-
-// The following code was sourced and modified from the
-// https://bitbucket.org/tebeka/atexit package governed by the following license:
-//
-// Copyright (c) 2012 Miki Tebeka <mi...@gmail.com>.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy of
-// this software and associated documentation files (the "Software"), to deal in
-// the Software without restriction, including without limitation the rights to
-// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-// the Software, and to permit persons to whom the Software is furnished to do so,
-// subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-import (
-	"fmt"
-	"os"
-)
-
-var handlers = []func(){}
-
-func runHandler(handler func()) {
-	defer func() {
-		if err := recover(); err != nil {
-			fmt.Fprintln(os.Stderr, "Error: Logrus exit handler error:", err)
-		}
-	}()
-
-	handler()
-}
-
-func runHandlers() {
-	for _, handler := range handlers {
-		runHandler(handler)
-	}
-}
-
-// Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code)
-func Exit(code int) {
-	runHandlers()
-	os.Exit(code)
-}
-
-// RegisterExitHandler adds a Logrus Exit handler, call logrus.Exit to invoke
-// all handlers. The handlers will also be invoked when any Fatal log entry is
-// made.
-//
-// This method is useful when a caller wishes to use logrus to log a fatal
-// message but also needs to gracefully shutdown. An example usecase could be
-// closing database connections, or sending a alert that the application is
-// closing.
-func RegisterExitHandler(handler func()) {
-	handlers = append(handlers, handler)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/doc.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/doc.go b/newt/vendor/github.com/Sirupsen/logrus/doc.go
deleted file mode 100644
index dddd5f8..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/doc.go
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
-
-
-The simplest way to use Logrus is simply the package-level exported logger:
-
-  package main
-
-  import (
-    log "github.com/Sirupsen/logrus"
-  )
-
-  func main() {
-    log.WithFields(log.Fields{
-      "animal": "walrus",
-      "number": 1,
-      "size":   10,
-    }).Info("A walrus appears")
-  }
-
-Output:
-  time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
-
-For a full guide visit https://github.com/Sirupsen/logrus
-*/
-package logrus

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/entry.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/entry.go b/newt/vendor/github.com/Sirupsen/logrus/entry.go
deleted file mode 100644
index 4edbe7a..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/entry.go
+++ /dev/null
@@ -1,275 +0,0 @@
-package logrus
-
-import (
-	"bytes"
-	"fmt"
-	"os"
-	"sync"
-	"time"
-)
-
-var bufferPool *sync.Pool
-
-func init() {
-	bufferPool = &sync.Pool{
-		New: func() interface{} {
-			return new(bytes.Buffer)
-		},
-	}
-}
-
-// Defines the key when adding errors using WithError.
-var ErrorKey = "error"
-
-// An entry is the final or intermediate Logrus logging entry. It contains all
-// the fields passed with WithField{,s}. It's finally logged when Debug, Info,
-// Warn, Error, Fatal or Panic is called on it. These objects can be reused and
-// passed around as much as you wish to avoid field duplication.
-type Entry struct {
-	Logger *Logger
-
-	// Contains all the fields set by the user.
-	Data Fields
-
-	// Time at which the log entry was created
-	Time time.Time
-
-	// Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic
-	Level Level
-
-	// Message passed to Debug, Info, Warn, Error, Fatal or Panic
-	Message string
-
-	// When formatter is called in entry.log(), an Buffer may be set to entry
-	Buffer *bytes.Buffer
-}
-
-func NewEntry(logger *Logger) *Entry {
-	return &Entry{
-		Logger: logger,
-		// Default is three fields, give a little extra room
-		Data: make(Fields, 5),
-	}
-}
-
-// Returns the string representation from the reader and ultimately the
-// formatter.
-func (entry *Entry) String() (string, error) {
-	serialized, err := entry.Logger.Formatter.Format(entry)
-	if err != nil {
-		return "", err
-	}
-	str := string(serialized)
-	return str, nil
-}
-
-// Add an error as single field (using the key defined in ErrorKey) to the Entry.
-func (entry *Entry) WithError(err error) *Entry {
-	return entry.WithField(ErrorKey, err)
-}
-
-// Add a single field to the Entry.
-func (entry *Entry) WithField(key string, value interface{}) *Entry {
-	return entry.WithFields(Fields{key: value})
-}
-
-// Add a map of fields to the Entry.
-func (entry *Entry) WithFields(fields Fields) *Entry {
-	data := make(Fields, len(entry.Data)+len(fields))
-	for k, v := range entry.Data {
-		data[k] = v
-	}
-	for k, v := range fields {
-		data[k] = v
-	}
-	return &Entry{Logger: entry.Logger, Data: data}
-}
-
-// This function is not declared with a pointer value because otherwise
-// race conditions will occur when using multiple goroutines
-func (entry Entry) log(level Level, msg string) {
-	var buffer *bytes.Buffer
-	entry.Time = time.Now()
-	entry.Level = level
-	entry.Message = msg
-
-	if err := entry.Logger.Hooks.Fire(level, &entry); err != nil {
-		entry.Logger.mu.Lock()
-		fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err)
-		entry.Logger.mu.Unlock()
-	}
-	buffer = bufferPool.Get().(*bytes.Buffer)
-	buffer.Reset()
-	defer bufferPool.Put(buffer)
-	entry.Buffer = buffer
-	serialized, err := entry.Logger.Formatter.Format(&entry)
-	entry.Buffer = nil
-	if err != nil {
-		entry.Logger.mu.Lock()
-		fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
-		entry.Logger.mu.Unlock()
-	} else {
-		entry.Logger.mu.Lock()
-		_, err = entry.Logger.Out.Write(serialized)
-		if err != nil {
-			fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
-		}
-		entry.Logger.mu.Unlock()
-	}
-
-	// To avoid Entry#log() returning a value that only would make sense for
-	// panic() to use in Entry#Panic(), we avoid the allocation by checking
-	// directly here.
-	if level <= PanicLevel {
-		panic(&entry)
-	}
-}
-
-func (entry *Entry) Debug(args ...interface{}) {
-	if entry.Logger.Level >= DebugLevel {
-		entry.log(DebugLevel, fmt.Sprint(args...))
-	}
-}
-
-func (entry *Entry) Print(args ...interface{}) {
-	entry.Info(args...)
-}
-
-func (entry *Entry) Info(args ...interface{}) {
-	if entry.Logger.Level >= InfoLevel {
-		entry.log(InfoLevel, fmt.Sprint(args...))
-	}
-}
-
-func (entry *Entry) Warn(args ...interface{}) {
-	if entry.Logger.Level >= WarnLevel {
-		entry.log(WarnLevel, fmt.Sprint(args...))
-	}
-}
-
-func (entry *Entry) Warning(args ...interface{}) {
-	entry.Warn(args...)
-}
-
-func (entry *Entry) Error(args ...interface{}) {
-	if entry.Logger.Level >= ErrorLevel {
-		entry.log(ErrorLevel, fmt.Sprint(args...))
-	}
-}
-
-func (entry *Entry) Fatal(args ...interface{}) {
-	if entry.Logger.Level >= FatalLevel {
-		entry.log(FatalLevel, fmt.Sprint(args...))
-	}
-	Exit(1)
-}
-
-func (entry *Entry) Panic(args ...interface{}) {
-	if entry.Logger.Level >= PanicLevel {
-		entry.log(PanicLevel, fmt.Sprint(args...))
-	}
-	panic(fmt.Sprint(args...))
-}
-
-// Entry Printf family functions
-
-func (entry *Entry) Debugf(format string, args ...interface{}) {
-	if entry.Logger.Level >= DebugLevel {
-		entry.Debug(fmt.Sprintf(format, args...))
-	}
-}
-
-func (entry *Entry) Infof(format string, args ...interface{}) {
-	if entry.Logger.Level >= InfoLevel {
-		entry.Info(fmt.Sprintf(format, args...))
-	}
-}
-
-func (entry *Entry) Printf(format string, args ...interface{}) {
-	entry.Infof(format, args...)
-}
-
-func (entry *Entry) Warnf(format string, args ...interface{}) {
-	if entry.Logger.Level >= WarnLevel {
-		entry.Warn(fmt.Sprintf(format, args...))
-	}
-}
-
-func (entry *Entry) Warningf(format string, args ...interface{}) {
-	entry.Warnf(format, args...)
-}
-
-func (entry *Entry) Errorf(format string, args ...interface{}) {
-	if entry.Logger.Level >= ErrorLevel {
-		entry.Error(fmt.Sprintf(format, args...))
-	}
-}
-
-func (entry *Entry) Fatalf(format string, args ...interface{}) {
-	if entry.Logger.Level >= FatalLevel {
-		entry.Fatal(fmt.Sprintf(format, args...))
-	}
-	Exit(1)
-}
-
-func (entry *Entry) Panicf(format string, args ...interface{}) {
-	if entry.Logger.Level >= PanicLevel {
-		entry.Panic(fmt.Sprintf(format, args...))
-	}
-}
-
-// Entry Println family functions
-
-func (entry *Entry) Debugln(args ...interface{}) {
-	if entry.Logger.Level >= DebugLevel {
-		entry.Debug(entry.sprintlnn(args...))
-	}
-}
-
-func (entry *Entry) Infoln(args ...interface{}) {
-	if entry.Logger.Level >= InfoLevel {
-		entry.Info(entry.sprintlnn(args...))
-	}
-}
-
-func (entry *Entry) Println(args ...interface{}) {
-	entry.Infoln(args...)
-}
-
-func (entry *Entry) Warnln(args ...interface{}) {
-	if entry.Logger.Level >= WarnLevel {
-		entry.Warn(entry.sprintlnn(args...))
-	}
-}
-
-func (entry *Entry) Warningln(args ...interface{}) {
-	entry.Warnln(args...)
-}
-
-func (entry *Entry) Errorln(args ...interface{}) {
-	if entry.Logger.Level >= ErrorLevel {
-		entry.Error(entry.sprintlnn(args...))
-	}
-}
-
-func (entry *Entry) Fatalln(args ...interface{}) {
-	if entry.Logger.Level >= FatalLevel {
-		entry.Fatal(entry.sprintlnn(args...))
-	}
-	Exit(1)
-}
-
-func (entry *Entry) Panicln(args ...interface{}) {
-	if entry.Logger.Level >= PanicLevel {
-		entry.Panic(entry.sprintlnn(args...))
-	}
-}
-
-// Sprintlnn => Sprint no newline. This is to get the behavior of how
-// fmt.Sprintln where spaces are always added between operands, regardless of
-// their type. Instead of vendoring the Sprintln implementation to spare a
-// string allocation, we do the simplest thing.
-func (entry *Entry) sprintlnn(args ...interface{}) string {
-	msg := fmt.Sprintln(args...)
-	return msg[:len(msg)-1]
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/exported.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/exported.go b/newt/vendor/github.com/Sirupsen/logrus/exported.go
deleted file mode 100644
index 9a0120a..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/exported.go
+++ /dev/null
@@ -1,193 +0,0 @@
-package logrus
-
-import (
-	"io"
-)
-
-var (
-	// std is the name of the standard logger in stdlib `log`
-	std = New()
-)
-
-func StandardLogger() *Logger {
-	return std
-}
-
-// SetOutput sets the standard logger output.
-func SetOutput(out io.Writer) {
-	std.mu.Lock()
-	defer std.mu.Unlock()
-	std.Out = out
-}
-
-// SetFormatter sets the standard logger formatter.
-func SetFormatter(formatter Formatter) {
-	std.mu.Lock()
-	defer std.mu.Unlock()
-	std.Formatter = formatter
-}
-
-// SetLevel sets the standard logger level.
-func SetLevel(level Level) {
-	std.mu.Lock()
-	defer std.mu.Unlock()
-	std.Level = level
-}
-
-// GetLevel returns the standard logger level.
-func GetLevel() Level {
-	std.mu.Lock()
-	defer std.mu.Unlock()
-	return std.Level
-}
-
-// AddHook adds a hook to the standard logger hooks.
-func AddHook(hook Hook) {
-	std.mu.Lock()
-	defer std.mu.Unlock()
-	std.Hooks.Add(hook)
-}
-
-// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
-func WithError(err error) *Entry {
-	return std.WithField(ErrorKey, err)
-}
-
-// WithField creates an entry from the standard logger and adds a field to
-// it. If you want multiple fields, use `WithFields`.
-//
-// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
-// or Panic on the Entry it returns.
-func WithField(key string, value interface{}) *Entry {
-	return std.WithField(key, value)
-}
-
-// WithFields creates an entry from the standard logger and adds multiple
-// fields to it. This is simply a helper for `WithField`, invoking it
-// once for each field.
-//
-// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
-// or Panic on the Entry it returns.
-func WithFields(fields Fields) *Entry {
-	return std.WithFields(fields)
-}
-
-// Debug logs a message at level Debug on the standard logger.
-func Debug(args ...interface{}) {
-	std.Debug(args...)
-}
-
-// Print logs a message at level Info on the standard logger.
-func Print(args ...interface{}) {
-	std.Print(args...)
-}
-
-// Info logs a message at level Info on the standard logger.
-func Info(args ...interface{}) {
-	std.Info(args...)
-}
-
-// Warn logs a message at level Warn on the standard logger.
-func Warn(args ...interface{}) {
-	std.Warn(args...)
-}
-
-// Warning logs a message at level Warn on the standard logger.
-func Warning(args ...interface{}) {
-	std.Warning(args...)
-}
-
-// Error logs a message at level Error on the standard logger.
-func Error(args ...interface{}) {
-	std.Error(args...)
-}
-
-// Panic logs a message at level Panic on the standard logger.
-func Panic(args ...interface{}) {
-	std.Panic(args...)
-}
-
-// Fatal logs a message at level Fatal on the standard logger.
-func Fatal(args ...interface{}) {
-	std.Fatal(args...)
-}
-
-// Debugf logs a message at level Debug on the standard logger.
-func Debugf(format string, args ...interface{}) {
-	std.Debugf(format, args...)
-}
-
-// Printf logs a message at level Info on the standard logger.
-func Printf(format string, args ...interface{}) {
-	std.Printf(format, args...)
-}
-
-// Infof logs a message at level Info on the standard logger.
-func Infof(format string, args ...interface{}) {
-	std.Infof(format, args...)
-}
-
-// Warnf logs a message at level Warn on the standard logger.
-func Warnf(format string, args ...interface{}) {
-	std.Warnf(format, args...)
-}
-
-// Warningf logs a message at level Warn on the standard logger.
-func Warningf(format string, args ...interface{}) {
-	std.Warningf(format, args...)
-}
-
-// Errorf logs a message at level Error on the standard logger.
-func Errorf(format string, args ...interface{}) {
-	std.Errorf(format, args...)
-}
-
-// Panicf logs a message at level Panic on the standard logger.
-func Panicf(format string, args ...interface{}) {
-	std.Panicf(format, args...)
-}
-
-// Fatalf logs a message at level Fatal on the standard logger.
-func Fatalf(format string, args ...interface{}) {
-	std.Fatalf(format, args...)
-}
-
-// Debugln logs a message at level Debug on the standard logger.
-func Debugln(args ...interface{}) {
-	std.Debugln(args...)
-}
-
-// Println logs a message at level Info on the standard logger.
-func Println(args ...interface{}) {
-	std.Println(args...)
-}
-
-// Infoln logs a message at level Info on the standard logger.
-func Infoln(args ...interface{}) {
-	std.Infoln(args...)
-}
-
-// Warnln logs a message at level Warn on the standard logger.
-func Warnln(args ...interface{}) {
-	std.Warnln(args...)
-}
-
-// Warningln logs a message at level Warn on the standard logger.
-func Warningln(args ...interface{}) {
-	std.Warningln(args...)
-}
-
-// Errorln logs a message at level Error on the standard logger.
-func Errorln(args ...interface{}) {
-	std.Errorln(args...)
-}
-
-// Panicln logs a message at level Panic on the standard logger.
-func Panicln(args ...interface{}) {
-	std.Panicln(args...)
-}
-
-// Fatalln logs a message at level Fatal on the standard logger.
-func Fatalln(args ...interface{}) {
-	std.Fatalln(args...)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/formatter.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/formatter.go b/newt/vendor/github.com/Sirupsen/logrus/formatter.go
deleted file mode 100644
index b5fbe93..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/formatter.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package logrus
-
-import "time"
-
-const DefaultTimestampFormat = time.RFC3339
-
-// The Formatter interface is used to implement a custom Formatter. It takes an
-// `Entry`. It exposes all the fields, including the default ones:
-//
-// * `entry.Data["msg"]`. The message passed from Info, Warn, Error ..
-// * `entry.Data["time"]`. The timestamp.
-// * `entry.Data["level"]. The level the entry was logged at.
-//
-// Any additional fields added with `WithField` or `WithFields` are also in
-// `entry.Data`. Format is expected to return an array of bytes which are then
-// logged to `logger.Out`.
-type Formatter interface {
-	Format(*Entry) ([]byte, error)
-}
-
-// This is to not silently overwrite `time`, `msg` and `level` fields when
-// dumping it. If this code wasn't there doing:
-//
-//  logrus.WithField("level", 1).Info("hello")
-//
-// Would just silently drop the user provided level. Instead with this code
-// it'll logged as:
-//
-//  {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."}
-//
-// It's not exported because it's still using Data in an opinionated way. It's to
-// avoid code duplication between the two default formatters.
-func prefixFieldClashes(data Fields) {
-	if t, ok := data["time"]; ok {
-		data["fields.time"] = t
-	}
-
-	if m, ok := data["msg"]; ok {
-		data["fields.msg"] = m
-	}
-
-	if l, ok := data["level"]; ok {
-		data["fields.level"] = l
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/hooks.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/hooks.go b/newt/vendor/github.com/Sirupsen/logrus/hooks.go
deleted file mode 100644
index 3f151cd..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/hooks.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package logrus
-
-// A hook to be fired when logging on the logging levels returned from
-// `Levels()` on your implementation of the interface. Note that this is not
-// fired in a goroutine or a channel with workers, you should handle such
-// functionality yourself if your call is non-blocking and you don't wish for
-// the logging calls for levels returned from `Levels()` to block.
-type Hook interface {
-	Levels() []Level
-	Fire(*Entry) error
-}
-
-// Internal type for storing the hooks on a logger instance.
-type LevelHooks map[Level][]Hook
-
-// Add a hook to an instance of logger. This is called with
-// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface.
-func (hooks LevelHooks) Add(hook Hook) {
-	for _, level := range hook.Levels() {
-		hooks[level] = append(hooks[level], hook)
-	}
-}
-
-// Fire all the hooks for the passed level. Used by `entry.log` to fire
-// appropriate hooks for a log entry.
-func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
-	for _, hook := range hooks[level] {
-		if err := hook.Fire(entry); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/json_formatter.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/json_formatter.go b/newt/vendor/github.com/Sirupsen/logrus/json_formatter.go
deleted file mode 100644
index f3729bf..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/json_formatter.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package logrus
-
-import (
-	"encoding/json"
-	"fmt"
-)
-
-type fieldKey string
-type FieldMap map[fieldKey]string
-
-const (
-	FieldKeyMsg   = "msg"
-	FieldKeyLevel = "level"
-	FieldKeyTime  = "time"
-)
-
-func (f FieldMap) resolve(key fieldKey) string {
-	if k, ok := f[key]; ok {
-		return k
-	}
-
-	return string(key)
-}
-
-type JSONFormatter struct {
-	// TimestampFormat sets the format used for marshaling timestamps.
-	TimestampFormat string
-
-	// FieldMap allows users to customize the names of keys for various fields.
-	// As an example:
-	// formatter := &JSONFormatter{
-	//   	FieldMap: FieldMap{
-	// 		 FieldKeyTime: "@timestamp",
-	// 		 FieldKeyLevel: "@level",
-	// 		 FieldKeyLevel: "@message",
-	//    },
-	// }
-	FieldMap FieldMap
-}
-
-func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
-	data := make(Fields, len(entry.Data)+3)
-	for k, v := range entry.Data {
-		switch v := v.(type) {
-		case error:
-			// Otherwise errors are ignored by `encoding/json`
-			// https://github.com/Sirupsen/logrus/issues/137
-			data[k] = v.Error()
-		default:
-			data[k] = v
-		}
-	}
-	prefixFieldClashes(data)
-
-	timestampFormat := f.TimestampFormat
-	if timestampFormat == "" {
-		timestampFormat = DefaultTimestampFormat
-	}
-
-	data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat)
-	data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message
-	data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String()
-
-	serialized, err := json.Marshal(data)
-	if err != nil {
-		return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
-	}
-	return append(serialized, '\n'), nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/logger.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/logger.go b/newt/vendor/github.com/Sirupsen/logrus/logger.go
deleted file mode 100644
index b769f3d..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/logger.go
+++ /dev/null
@@ -1,308 +0,0 @@
-package logrus
-
-import (
-	"io"
-	"os"
-	"sync"
-)
-
-type Logger struct {
-	// The logs are `io.Copy`'d to this in a mutex. It's common to set this to a
-	// file, or leave it default which is `os.Stderr`. You can also set this to
-	// something more adventorous, such as logging to Kafka.
-	Out io.Writer
-	// Hooks for the logger instance. These allow firing events based on logging
-	// levels and log entries. For example, to send errors to an error tracking
-	// service, log to StatsD or dump the core on fatal errors.
-	Hooks LevelHooks
-	// All log entries pass through the formatter before logged to Out. The
-	// included formatters are `TextFormatter` and `JSONFormatter` for which
-	// TextFormatter is the default. In development (when a TTY is attached) it
-	// logs with colors, but to a file it wouldn't. You can easily implement your
-	// own that implements the `Formatter` interface, see the `README` or included
-	// formatters for examples.
-	Formatter Formatter
-	// The logging level the logger should log at. This is typically (and defaults
-	// to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be
-	// logged. `logrus.Debug` is useful in
-	Level Level
-	// Used to sync writing to the log. Locking is enabled by Default
-	mu MutexWrap
-	// Reusable empty entry
-	entryPool sync.Pool
-}
-
-type MutexWrap struct {
-	lock     sync.Mutex
-	disabled bool
-}
-
-func (mw *MutexWrap) Lock() {
-	if !mw.disabled {
-		mw.lock.Lock()
-	}
-}
-
-func (mw *MutexWrap) Unlock() {
-	if !mw.disabled {
-		mw.lock.Unlock()
-	}
-}
-
-func (mw *MutexWrap) Disable() {
-	mw.disabled = true
-}
-
-// Creates a new logger. Configuration should be set by changing `Formatter`,
-// `Out` and `Hooks` directly on the default logger instance. You can also just
-// instantiate your own:
-//
-//    var log = &Logger{
-//      Out: os.Stderr,
-//      Formatter: new(JSONFormatter),
-//      Hooks: make(LevelHooks),
-//      Level: logrus.DebugLevel,
-//    }
-//
-// It's recommended to make this a global instance called `log`.
-func New() *Logger {
-	return &Logger{
-		Out:       os.Stderr,
-		Formatter: new(TextFormatter),
-		Hooks:     make(LevelHooks),
-		Level:     InfoLevel,
-	}
-}
-
-func (logger *Logger) newEntry() *Entry {
-	entry, ok := logger.entryPool.Get().(*Entry)
-	if ok {
-		return entry
-	}
-	return NewEntry(logger)
-}
-
-func (logger *Logger) releaseEntry(entry *Entry) {
-	logger.entryPool.Put(entry)
-}
-
-// Adds a field to the log entry, note that it doesn't log until you call
-// Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry.
-// If you want multiple fields, use `WithFields`.
-func (logger *Logger) WithField(key string, value interface{}) *Entry {
-	entry := logger.newEntry()
-	defer logger.releaseEntry(entry)
-	return entry.WithField(key, value)
-}
-
-// Adds a struct of fields to the log entry. All it does is call `WithField` for
-// each `Field`.
-func (logger *Logger) WithFields(fields Fields) *Entry {
-	entry := logger.newEntry()
-	defer logger.releaseEntry(entry)
-	return entry.WithFields(fields)
-}
-
-// Add an error as single field to the log entry.  All it does is call
-// `WithError` for the given `error`.
-func (logger *Logger) WithError(err error) *Entry {
-	entry := logger.newEntry()
-	defer logger.releaseEntry(entry)
-	return entry.WithError(err)
-}
-
-func (logger *Logger) Debugf(format string, args ...interface{}) {
-	if logger.Level >= DebugLevel {
-		entry := logger.newEntry()
-		entry.Debugf(format, args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Infof(format string, args ...interface{}) {
-	if logger.Level >= InfoLevel {
-		entry := logger.newEntry()
-		entry.Infof(format, args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Printf(format string, args ...interface{}) {
-	entry := logger.newEntry()
-	entry.Printf(format, args...)
-	logger.releaseEntry(entry)
-}
-
-func (logger *Logger) Warnf(format string, args ...interface{}) {
-	if logger.Level >= WarnLevel {
-		entry := logger.newEntry()
-		entry.Warnf(format, args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Warningf(format string, args ...interface{}) {
-	if logger.Level >= WarnLevel {
-		entry := logger.newEntry()
-		entry.Warnf(format, args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Errorf(format string, args ...interface{}) {
-	if logger.Level >= ErrorLevel {
-		entry := logger.newEntry()
-		entry.Errorf(format, args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Fatalf(format string, args ...interface{}) {
-	if logger.Level >= FatalLevel {
-		entry := logger.newEntry()
-		entry.Fatalf(format, args...)
-		logger.releaseEntry(entry)
-	}
-	Exit(1)
-}
-
-func (logger *Logger) Panicf(format string, args ...interface{}) {
-	if logger.Level >= PanicLevel {
-		entry := logger.newEntry()
-		entry.Panicf(format, args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Debug(args ...interface{}) {
-	if logger.Level >= DebugLevel {
-		entry := logger.newEntry()
-		entry.Debug(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Info(args ...interface{}) {
-	if logger.Level >= InfoLevel {
-		entry := logger.newEntry()
-		entry.Info(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Print(args ...interface{}) {
-	entry := logger.newEntry()
-	entry.Info(args...)
-	logger.releaseEntry(entry)
-}
-
-func (logger *Logger) Warn(args ...interface{}) {
-	if logger.Level >= WarnLevel {
-		entry := logger.newEntry()
-		entry.Warn(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Warning(args ...interface{}) {
-	if logger.Level >= WarnLevel {
-		entry := logger.newEntry()
-		entry.Warn(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Error(args ...interface{}) {
-	if logger.Level >= ErrorLevel {
-		entry := logger.newEntry()
-		entry.Error(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Fatal(args ...interface{}) {
-	if logger.Level >= FatalLevel {
-		entry := logger.newEntry()
-		entry.Fatal(args...)
-		logger.releaseEntry(entry)
-	}
-	Exit(1)
-}
-
-func (logger *Logger) Panic(args ...interface{}) {
-	if logger.Level >= PanicLevel {
-		entry := logger.newEntry()
-		entry.Panic(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Debugln(args ...interface{}) {
-	if logger.Level >= DebugLevel {
-		entry := logger.newEntry()
-		entry.Debugln(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Infoln(args ...interface{}) {
-	if logger.Level >= InfoLevel {
-		entry := logger.newEntry()
-		entry.Infoln(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Println(args ...interface{}) {
-	entry := logger.newEntry()
-	entry.Println(args...)
-	logger.releaseEntry(entry)
-}
-
-func (logger *Logger) Warnln(args ...interface{}) {
-	if logger.Level >= WarnLevel {
-		entry := logger.newEntry()
-		entry.Warnln(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Warningln(args ...interface{}) {
-	if logger.Level >= WarnLevel {
-		entry := logger.newEntry()
-		entry.Warnln(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Errorln(args ...interface{}) {
-	if logger.Level >= ErrorLevel {
-		entry := logger.newEntry()
-		entry.Errorln(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-func (logger *Logger) Fatalln(args ...interface{}) {
-	if logger.Level >= FatalLevel {
-		entry := logger.newEntry()
-		entry.Fatalln(args...)
-		logger.releaseEntry(entry)
-	}
-	Exit(1)
-}
-
-func (logger *Logger) Panicln(args ...interface{}) {
-	if logger.Level >= PanicLevel {
-		entry := logger.newEntry()
-		entry.Panicln(args...)
-		logger.releaseEntry(entry)
-	}
-}
-
-//When file is opened with appending mode, it's safe to
-//write concurrently to a file (within 4k message on Linux).
-//In these cases user can choose to disable the lock.
-func (logger *Logger) SetNoLock() {
-	logger.mu.Disable()
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/logrus.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/logrus.go b/newt/vendor/github.com/Sirupsen/logrus/logrus.go
deleted file mode 100644
index e596691..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/logrus.go
+++ /dev/null
@@ -1,143 +0,0 @@
-package logrus
-
-import (
-	"fmt"
-	"log"
-	"strings"
-)
-
-// Fields type, used to pass to `WithFields`.
-type Fields map[string]interface{}
-
-// Level type
-type Level uint8
-
-// Convert the Level to a string. E.g. PanicLevel becomes "panic".
-func (level Level) String() string {
-	switch level {
-	case DebugLevel:
-		return "debug"
-	case InfoLevel:
-		return "info"
-	case WarnLevel:
-		return "warning"
-	case ErrorLevel:
-		return "error"
-	case FatalLevel:
-		return "fatal"
-	case PanicLevel:
-		return "panic"
-	}
-
-	return "unknown"
-}
-
-// ParseLevel takes a string level and returns the Logrus log level constant.
-func ParseLevel(lvl string) (Level, error) {
-	switch strings.ToLower(lvl) {
-	case "panic":
-		return PanicLevel, nil
-	case "fatal":
-		return FatalLevel, nil
-	case "error":
-		return ErrorLevel, nil
-	case "warn", "warning":
-		return WarnLevel, nil
-	case "info":
-		return InfoLevel, nil
-	case "debug":
-		return DebugLevel, nil
-	}
-
-	var l Level
-	return l, fmt.Errorf("not a valid logrus Level: %q", lvl)
-}
-
-// A constant exposing all logging levels
-var AllLevels = []Level{
-	PanicLevel,
-	FatalLevel,
-	ErrorLevel,
-	WarnLevel,
-	InfoLevel,
-	DebugLevel,
-}
-
-// These are the different logging levels. You can set the logging level to log
-// on your instance of logger, obtained with `logrus.New()`.
-const (
-	// PanicLevel level, highest level of severity. Logs and then calls panic with the
-	// message passed to Debug, Info, ...
-	PanicLevel Level = iota
-	// FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the
-	// logging level is set to Panic.
-	FatalLevel
-	// ErrorLevel level. Logs. Used for errors that should definitely be noted.
-	// Commonly used for hooks to send errors to an error tracking service.
-	ErrorLevel
-	// WarnLevel level. Non-critical entries that deserve eyes.
-	WarnLevel
-	// InfoLevel level. General operational entries about what's going on inside the
-	// application.
-	InfoLevel
-	// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
-	DebugLevel
-)
-
-// Won't compile if StdLogger can't be realized by a log.Logger
-var (
-	_ StdLogger = &log.Logger{}
-	_ StdLogger = &Entry{}
-	_ StdLogger = &Logger{}
-)
-
-// StdLogger is what your logrus-enabled library should take, that way
-// it'll accept a stdlib logger and a logrus logger. There's no standard
-// interface, this is the closest we get, unfortunately.
-type StdLogger interface {
-	Print(...interface{})
-	Printf(string, ...interface{})
-	Println(...interface{})
-
-	Fatal(...interface{})
-	Fatalf(string, ...interface{})
-	Fatalln(...interface{})
-
-	Panic(...interface{})
-	Panicf(string, ...interface{})
-	Panicln(...interface{})
-}
-
-// The FieldLogger interface generalizes the Entry and Logger types
-type FieldLogger interface {
-	WithField(key string, value interface{}) *Entry
-	WithFields(fields Fields) *Entry
-	WithError(err error) *Entry
-
-	Debugf(format string, args ...interface{})
-	Infof(format string, args ...interface{})
-	Printf(format string, args ...interface{})
-	Warnf(format string, args ...interface{})
-	Warningf(format string, args ...interface{})
-	Errorf(format string, args ...interface{})
-	Fatalf(format string, args ...interface{})
-	Panicf(format string, args ...interface{})
-
-	Debug(args ...interface{})
-	Info(args ...interface{})
-	Print(args ...interface{})
-	Warn(args ...interface{})
-	Warning(args ...interface{})
-	Error(args ...interface{})
-	Fatal(args ...interface{})
-	Panic(args ...interface{})
-
-	Debugln(args ...interface{})
-	Infoln(args ...interface{})
-	Println(args ...interface{})
-	Warnln(args ...interface{})
-	Warningln(args ...interface{})
-	Errorln(args ...interface{})
-	Fatalln(args ...interface{})
-	Panicln(args ...interface{})
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/terminal_appengine.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/terminal_appengine.go b/newt/vendor/github.com/Sirupsen/logrus/terminal_appengine.go
deleted file mode 100644
index 1960169..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/terminal_appengine.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// +build appengine
-
-package logrus
-
-// IsTerminal returns true if stderr's file descriptor is a terminal.
-func IsTerminal() bool {
-	return true
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/terminal_bsd.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/terminal_bsd.go b/newt/vendor/github.com/Sirupsen/logrus/terminal_bsd.go
deleted file mode 100644
index 5f6be4d..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/terminal_bsd.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// +build darwin freebsd openbsd netbsd dragonfly
-// +build !appengine
-
-package logrus
-
-import "syscall"
-
-const ioctlReadTermios = syscall.TIOCGETA
-
-type Termios syscall.Termios

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/terminal_linux.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/terminal_linux.go b/newt/vendor/github.com/Sirupsen/logrus/terminal_linux.go
deleted file mode 100644
index 308160c..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/terminal_linux.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Based on ssh/terminal:
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !appengine
-
-package logrus
-
-import "syscall"
-
-const ioctlReadTermios = syscall.TCGETS
-
-type Termios syscall.Termios

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go b/newt/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go
deleted file mode 100644
index 329038f..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Based on ssh/terminal:
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux darwin freebsd openbsd netbsd dragonfly
-// +build !appengine
-
-package logrus
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-// IsTerminal returns true if stderr's file descriptor is a terminal.
-func IsTerminal() bool {
-	fd := syscall.Stderr
-	var termios Termios
-	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
-	return err == 0
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/terminal_solaris.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/terminal_solaris.go b/newt/vendor/github.com/Sirupsen/logrus/terminal_solaris.go
deleted file mode 100644
index a3c6f6e..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/terminal_solaris.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// +build solaris,!appengine
-
-package logrus
-
-import (
-	"os"
-
-	"golang.org/x/sys/unix"
-)
-
-// IsTerminal returns true if the given file descriptor is a terminal.
-func IsTerminal() bool {
-	_, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA)
-	return err == nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/terminal_windows.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/terminal_windows.go b/newt/vendor/github.com/Sirupsen/logrus/terminal_windows.go
deleted file mode 100644
index 3727e8a..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/terminal_windows.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Based on ssh/terminal:
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows,!appengine
-
-package logrus
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-var kernel32 = syscall.NewLazyDLL("kernel32.dll")
-
-var (
-	procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
-)
-
-// IsTerminal returns true if stderr's file descriptor is a terminal.
-func IsTerminal() bool {
-	fd := syscall.Stderr
-	var st uint32
-	r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
-	return r != 0 && e == 0
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/text_formatter.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/text_formatter.go b/newt/vendor/github.com/Sirupsen/logrus/text_formatter.go
deleted file mode 100644
index 9114b3c..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/text_formatter.go
+++ /dev/null
@@ -1,168 +0,0 @@
-package logrus
-
-import (
-	"bytes"
-	"fmt"
-	"runtime"
-	"sort"
-	"strings"
-	"time"
-)
-
-const (
-	nocolor = 0
-	red     = 31
-	green   = 32
-	yellow  = 33
-	blue    = 34
-	gray    = 37
-)
-
-var (
-	baseTimestamp time.Time
-	isTerminal    bool
-)
-
-func init() {
-	baseTimestamp = time.Now()
-	isTerminal = IsTerminal()
-}
-
-func miniTS() int {
-	return int(time.Since(baseTimestamp) / time.Second)
-}
-
-type TextFormatter struct {
-	// Set to true to bypass checking for a TTY before outputting colors.
-	ForceColors bool
-
-	// Force disabling colors.
-	DisableColors bool
-
-	// Disable timestamp logging. useful when output is redirected to logging
-	// system that already adds timestamps.
-	DisableTimestamp bool
-
-	// Enable logging the full timestamp when a TTY is attached instead of just
-	// the time passed since beginning of execution.
-	FullTimestamp bool
-
-	// TimestampFormat to use for display when a full timestamp is printed
-	TimestampFormat string
-
-	// The fields are sorted by default for a consistent output. For applications
-	// that log extremely frequently and don't use the JSON formatter this may not
-	// be desired.
-	DisableSorting bool
-}
-
-func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
-	var b *bytes.Buffer
-	var keys []string = make([]string, 0, len(entry.Data))
-	for k := range entry.Data {
-		keys = append(keys, k)
-	}
-
-	if !f.DisableSorting {
-		sort.Strings(keys)
-	}
-	if entry.Buffer != nil {
-		b = entry.Buffer
-	} else {
-		b = &bytes.Buffer{}
-	}
-
-	prefixFieldClashes(entry.Data)
-
-	isColorTerminal := isTerminal && (runtime.GOOS != "windows")
-	isColored := (f.ForceColors || isColorTerminal) && !f.DisableColors
-
-	timestampFormat := f.TimestampFormat
-	if timestampFormat == "" {
-		timestampFormat = DefaultTimestampFormat
-	}
-	if isColored {
-		f.printColored(b, entry, keys, timestampFormat)
-	} else {
-		if !f.DisableTimestamp {
-			f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat))
-		}
-		f.appendKeyValue(b, "level", entry.Level.String())
-		if entry.Message != "" {
-			f.appendKeyValue(b, "msg", entry.Message)
-		}
-		for _, key := range keys {
-			f.appendKeyValue(b, key, entry.Data[key])
-		}
-	}
-
-	b.WriteByte('\n')
-	return b.Bytes(), nil
-}
-
-func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) {
-	var levelColor int
-	switch entry.Level {
-	case DebugLevel:
-		levelColor = gray
-	case WarnLevel:
-		levelColor = yellow
-	case ErrorLevel, FatalLevel, PanicLevel:
-		levelColor = red
-	default:
-		levelColor = blue
-	}
-
-	levelText := strings.ToUpper(entry.Level.String())[0:4]
-
-	if !f.FullTimestamp {
-		fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, miniTS(), entry.Message)
-	} else {
-		fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message)
-	}
-	for _, k := range keys {
-		v := entry.Data[k]
-		fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=", levelColor, k)
-		f.appendValue(b, v)
-	}
-}
-
-func needsQuoting(text string) bool {
-	for _, ch := range text {
-		if !((ch >= 'a' && ch <= 'z') ||
-			(ch >= 'A' && ch <= 'Z') ||
-			(ch >= '0' && ch <= '9') ||
-			ch == '-' || ch == '.') {
-			return true
-		}
-	}
-	return false
-}
-
-func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) {
-
-	b.WriteString(key)
-	b.WriteByte('=')
-	f.appendValue(b, value)
-	b.WriteByte(' ')
-}
-
-func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) {
-	switch value := value.(type) {
-	case string:
-		if !needsQuoting(value) {
-			b.WriteString(value)
-		} else {
-			fmt.Fprintf(b, "%q", value)
-		}
-	case error:
-		errmsg := value.Error()
-		if !needsQuoting(errmsg) {
-			b.WriteString(errmsg)
-		} else {
-			fmt.Fprintf(b, "%q", errmsg)
-		}
-	default:
-		fmt.Fprint(b, value)
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/Sirupsen/logrus/writer.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/Sirupsen/logrus/writer.go b/newt/vendor/github.com/Sirupsen/logrus/writer.go
deleted file mode 100644
index f74d2aa..0000000
--- a/newt/vendor/github.com/Sirupsen/logrus/writer.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package logrus
-
-import (
-	"bufio"
-	"io"
-	"runtime"
-)
-
-func (logger *Logger) Writer() *io.PipeWriter {
-	return logger.WriterLevel(InfoLevel)
-}
-
-func (logger *Logger) WriterLevel(level Level) *io.PipeWriter {
-	reader, writer := io.Pipe()
-
-	var printFunc func(args ...interface{})
-	switch level {
-	case DebugLevel:
-		printFunc = logger.Debug
-	case InfoLevel:
-		printFunc = logger.Info
-	case WarnLevel:
-		printFunc = logger.Warn
-	case ErrorLevel:
-		printFunc = logger.Error
-	case FatalLevel:
-		printFunc = logger.Fatal
-	case PanicLevel:
-		printFunc = logger.Panic
-	default:
-		printFunc = logger.Print
-	}
-
-	go logger.writerScanner(reader, printFunc)
-	runtime.SetFinalizer(writer, writerFinalizer)
-
-	return writer
-}
-
-func (logger *Logger) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) {
-	scanner := bufio.NewScanner(reader)
-	for scanner.Scan() {
-		printFunc(scanner.Text())
-	}
-	if err := scanner.Err(); err != nil {
-		logger.Errorf("Error while reading from Writer: %s", err)
-	}
-	reader.Close()
-}
-
-func writerFinalizer(writer *io.PipeWriter) {
-	writer.Close()
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/inconshreveable/mousetrap/LICENSE
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/inconshreveable/mousetrap/LICENSE b/newt/vendor/github.com/inconshreveable/mousetrap/LICENSE
deleted file mode 100644
index 5f0d1fb..0000000
--- a/newt/vendor/github.com/inconshreveable/mousetrap/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright 2014 Alan Shreve
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/inconshreveable/mousetrap/README.md
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/inconshreveable/mousetrap/README.md b/newt/vendor/github.com/inconshreveable/mousetrap/README.md
deleted file mode 100644
index 7a950d1..0000000
--- a/newt/vendor/github.com/inconshreveable/mousetrap/README.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# mousetrap
-
-mousetrap is a tiny library that answers a single question.
-
-On a Windows machine, was the process invoked by someone double clicking on
-the executable file while browsing in explorer?
-
-### Motivation
-
-Windows developers unfamiliar with command line tools will often "double-click"
-the executable for a tool. Because most CLI tools print the help and then exit
-when invoked without arguments, this is often very frustrating for those users.
-
-mousetrap provides a way to detect these invocations so that you can provide
-more helpful behavior and instructions on how to run the CLI tool. To see what
-this looks like, both from an organizational and a technical perspective, see
-https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/
-
-### The interface
-
-The library exposes a single interface:
-
-    func StartedByExplorer() (bool)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/inconshreveable/mousetrap/trap_others.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/inconshreveable/mousetrap/trap_others.go b/newt/vendor/github.com/inconshreveable/mousetrap/trap_others.go
deleted file mode 100644
index 9d2d8a4..0000000
--- a/newt/vendor/github.com/inconshreveable/mousetrap/trap_others.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// +build !windows
-
-package mousetrap
-
-// StartedByExplorer returns true if the program was invoked by the user
-// double-clicking on the executable from explorer.exe
-//
-// It is conservative and returns false if any of the internal calls fail.
-// It does not guarantee that the program was run from a terminal. It only can tell you
-// whether it was launched from explorer.exe
-//
-// On non-Windows platforms, it always returns false.
-func StartedByExplorer() bool {
-	return false
-}


[51/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
newtmgr - Remove newt code


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/e31a7d31
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/e31a7d31
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/e31a7d31

Branch: refs/heads/master
Commit: e31a7d31e1ed9a581f1e5e58c64c659cf5dfa2ea
Parents: 963e368
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Mar 28 15:30:13 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 INSTALLING.md                                   |   83 -
 README.md                                       |  105 +-
 RELEASE_NOTES.md                                |   25 -
 build.sh                                        |   83 -
 newt/Godeps/Godeps.json                         |   69 -
 newt/Godeps/Readme                              |    5 -
 newt/builder/build.go                           |  755 -----
 newt/builder/buildpackage.go                    |  260 --
 newt/builder/buildutil.go                       |  125 -
 newt/builder/depgraph.go                        |  174 --
 newt/builder/library.go                         |  218 --
 newt/builder/load.go                            |  214 --
 newt/builder/paths.go                           |  185 --
 newt/builder/selftest.go                        |  174 --
 newt/builder/size.go                            |  534 ----
 newt/builder/size_report.go                     |  332 ---
 newt/builder/symbol_tree.go                     |  195 --
 newt/builder/targetbuild.go                     |  818 ------
 newt/cli/build_cmds.go                          |  478 ---
 newt/cli/complete_cmd.go                        |  252 --
 newt/cli/image_cmds.go                          |   95 -
 newt/cli/mfg_cmds.go                            |  201 --
 newt/cli/pkg_cmds.go                            |  288 --
 newt/cli/project_cmds.go                        |  259 --
 newt/cli/run_cmds.go                            |  115 -
 newt/cli/target_cmds.go                         |  809 ------
 newt/cli/util.go                                |  353 ---
 newt/cli/vals_cmds.go                           |   71 -
 newt/cli/vars.go                                |  172 --
 newt/compat/compat.go                           |  275 --
 newt/downloader/downloader.go                   |  472 ---
 newt/flash/flash.go                             |  421 ---
 newt/image/image.go                             |  777 -----
 newt/interfaces/interfaces.go                   |   78 -
 newt/mfg/create.go                              |  515 ----
 newt/mfg/load.go                                |  305 --
 newt/mfg/meta.go                                |  247 --
 newt/mfg/mfg.go                                 |   96 -
 newt/mfg/paths.go                               |  167 --
 newt/mfg/read.go                                |   40 -
 newt/newt.go                                    |  171 --
 newt/newtutil/newtutil.go                       |  309 --
 newt/pkg/bsp_package.go                         |  183 --
 newt/pkg/dependency.go                          |   89 -
 newt/pkg/localpackage.go                        |  463 ---
 newt/pkg/package.go                             |   94 -
 newt/pkg/packageutil.go                         |   58 -
 newt/project/pkgwriter.go                       |  174 --
 newt/project/project.go                         |  719 -----
 newt/project/projectstate.go                    |  109 -
 newt/repo/repo.go                               |  757 -----
 newt/repo/version.go                            |  257 --
 newt/resolve/resolve.go                         |  626 ----
 newt/resolve/resolveutil.go                     |   92 -
 newt/symbol/symbol.go                           |  322 ---
 newt/syscfg/restrict.go                         |  199 --
 newt/syscfg/syscfg.go                           | 1045 -------
 newt/sysinit/sysinit.go                         |  170 --
 newt/target/target.go                           |  293 --
 newt/toolchain/compiler.go                      | 1286 --------
 newt/toolchain/deps.go                          |  452 ---
 .../github.com/Sirupsen/logrus/.gitignore       |    1 -
 .../github.com/Sirupsen/logrus/.travis.yml      |    9 -
 .../github.com/Sirupsen/logrus/CHANGELOG.md     |   66 -
 newt/vendor/github.com/Sirupsen/logrus/LICENSE  |   21 -
 .../vendor/github.com/Sirupsen/logrus/README.md |  426 ---
 .../github.com/Sirupsen/logrus/alt_exit.go      |   64 -
 newt/vendor/github.com/Sirupsen/logrus/doc.go   |   26 -
 newt/vendor/github.com/Sirupsen/logrus/entry.go |  275 --
 .../github.com/Sirupsen/logrus/exported.go      |  193 --
 .../github.com/Sirupsen/logrus/formatter.go     |   45 -
 newt/vendor/github.com/Sirupsen/logrus/hooks.go |   34 -
 .../Sirupsen/logrus/json_formatter.go           |   69 -
 .../vendor/github.com/Sirupsen/logrus/logger.go |  308 --
 .../vendor/github.com/Sirupsen/logrus/logrus.go |  143 -
 .../Sirupsen/logrus/terminal_appengine.go       |    8 -
 .../github.com/Sirupsen/logrus/terminal_bsd.go  |   10 -
 .../Sirupsen/logrus/terminal_linux.go           |   14 -
 .../Sirupsen/logrus/terminal_notwindows.go      |   22 -
 .../Sirupsen/logrus/terminal_solaris.go         |   15 -
 .../Sirupsen/logrus/terminal_windows.go         |   27 -
 .../Sirupsen/logrus/text_formatter.go           |  168 --
 .../vendor/github.com/Sirupsen/logrus/writer.go |   53 -
 .../inconshreveable/mousetrap/LICENSE           |   13 -
 .../inconshreveable/mousetrap/README.md         |   23 -
 .../inconshreveable/mousetrap/trap_others.go    |   15 -
 .../inconshreveable/mousetrap/trap_windows.go   |   98 -
 .../mousetrap/trap_windows_1.4.go               |   46 -
 newt/vendor/github.com/kr/pretty/.gitignore     |    4 -
 newt/vendor/github.com/kr/pretty/License        |   21 -
 newt/vendor/github.com/kr/pretty/Readme         |    9 -
 newt/vendor/github.com/kr/pretty/diff.go        |  265 --
 newt/vendor/github.com/kr/pretty/formatter.go   |  328 ---
 newt/vendor/github.com/kr/pretty/pretty.go      |  108 -
 newt/vendor/github.com/kr/pretty/zero.go        |   41 -
 newt/vendor/github.com/kr/text/License          |   19 -
 newt/vendor/github.com/kr/text/Readme           |    3 -
 newt/vendor/github.com/kr/text/doc.go           |    3 -
 newt/vendor/github.com/kr/text/indent.go        |   74 -
 newt/vendor/github.com/kr/text/wrap.go          |   86 -
 .../mitchellh/mapstructure/.travis.yml          |    7 -
 .../github.com/mitchellh/mapstructure/LICENSE   |   21 -
 .../github.com/mitchellh/mapstructure/README.md |   46 -
 .../mitchellh/mapstructure/decode_hooks.go      |  154 -
 .../github.com/mitchellh/mapstructure/error.go  |   50 -
 .../mitchellh/mapstructure/mapstructure.go      |  782 -----
 newt/vendor/github.com/spf13/cast/.gitignore    |   25 -
 newt/vendor/github.com/spf13/cast/LICENSE       |   21 -
 newt/vendor/github.com/spf13/cast/README.md     |   72 -
 newt/vendor/github.com/spf13/cast/cast.go       |   83 -
 newt/vendor/github.com/spf13/cast/caste.go      |  527 ----
 newt/vendor/github.com/spf13/cobra/.gitignore   |   36 -
 newt/vendor/github.com/spf13/cobra/.mailmap     |    3 -
 newt/vendor/github.com/spf13/cobra/.travis.yml  |   24 -
 newt/vendor/github.com/spf13/cobra/LICENSE.txt  |  174 --
 newt/vendor/github.com/spf13/cobra/README.md    |  898 ------
 .../github.com/spf13/cobra/bash_completions.go  |  641 ----
 .../github.com/spf13/cobra/bash_completions.md  |  206 --
 newt/vendor/github.com/spf13/cobra/cobra.go     |  173 --
 newt/vendor/github.com/spf13/cobra/command.go   | 1291 ---------
 .../github.com/spf13/cobra/command_notwin.go    |    5 -
 .../github.com/spf13/cobra/command_win.go       |   26 -
 .../spf13/jwalterweatherman/.gitignore          |   22 -
 .../github.com/spf13/jwalterweatherman/LICENSE  |   21 -
 .../spf13/jwalterweatherman/README.md           |  161 --
 .../thatswhyyoualwaysleaveanote.go              |  256 --
 newt/vendor/github.com/spf13/pflag/.travis.yml  |   20 -
 newt/vendor/github.com/spf13/pflag/LICENSE      |   28 -
 newt/vendor/github.com/spf13/pflag/README.md    |  275 --
 newt/vendor/github.com/spf13/pflag/bool.go      |   94 -
 newt/vendor/github.com/spf13/pflag/count.go     |   94 -
 newt/vendor/github.com/spf13/pflag/duration.go  |   86 -
 newt/vendor/github.com/spf13/pflag/flag.go      |  947 ------
 newt/vendor/github.com/spf13/pflag/float32.go   |   88 -
 newt/vendor/github.com/spf13/pflag/float64.go   |   84 -
 .../vendor/github.com/spf13/pflag/golangflag.go |  104 -
 newt/vendor/github.com/spf13/pflag/int.go       |   84 -
 newt/vendor/github.com/spf13/pflag/int32.go     |   88 -
 newt/vendor/github.com/spf13/pflag/int64.go     |   84 -
 newt/vendor/github.com/spf13/pflag/int8.go      |   88 -
 newt/vendor/github.com/spf13/pflag/int_slice.go |  128 -
 newt/vendor/github.com/spf13/pflag/ip.go        |   96 -
 newt/vendor/github.com/spf13/pflag/ipmask.go    |  122 -
 newt/vendor/github.com/spf13/pflag/ipnet.go     |  100 -
 newt/vendor/github.com/spf13/pflag/string.go    |   80 -
 .../github.com/spf13/pflag/string_array.go      |  109 -
 .../github.com/spf13/pflag/string_slice.go      |  132 -
 newt/vendor/github.com/spf13/pflag/uint.go      |   88 -
 newt/vendor/github.com/spf13/pflag/uint16.go    |   88 -
 newt/vendor/github.com/spf13/pflag/uint32.go    |   88 -
 newt/vendor/github.com/spf13/pflag/uint64.go    |   88 -
 newt/vendor/github.com/spf13/pflag/uint8.go     |   88 -
 newt/vendor/golang.org/x/sys/LICENSE            |   27 -
 newt/vendor/golang.org/x/sys/PATENTS            |   22 -
 newt/vendor/golang.org/x/sys/unix/.gitignore    |    1 -
 newt/vendor/golang.org/x/sys/unix/asm.s         |   10 -
 .../golang.org/x/sys/unix/asm_darwin_386.s      |   29 -
 .../golang.org/x/sys/unix/asm_darwin_amd64.s    |   29 -
 .../golang.org/x/sys/unix/asm_darwin_arm.s      |   30 -
 .../golang.org/x/sys/unix/asm_darwin_arm64.s    |   30 -
 .../golang.org/x/sys/unix/asm_dragonfly_amd64.s |   29 -
 .../golang.org/x/sys/unix/asm_freebsd_386.s     |   29 -
 .../golang.org/x/sys/unix/asm_freebsd_amd64.s   |   29 -
 .../golang.org/x/sys/unix/asm_freebsd_arm.s     |   29 -
 .../golang.org/x/sys/unix/asm_linux_386.s       |   35 -
 .../golang.org/x/sys/unix/asm_linux_amd64.s     |   29 -
 .../golang.org/x/sys/unix/asm_linux_arm.s       |   29 -
 .../golang.org/x/sys/unix/asm_linux_arm64.s     |   24 -
 .../golang.org/x/sys/unix/asm_linux_mips64x.s   |   28 -
 .../golang.org/x/sys/unix/asm_linux_ppc64x.s    |   28 -
 .../golang.org/x/sys/unix/asm_linux_s390x.s     |   28 -
 .../golang.org/x/sys/unix/asm_netbsd_386.s      |   29 -
 .../golang.org/x/sys/unix/asm_netbsd_amd64.s    |   29 -
 .../golang.org/x/sys/unix/asm_netbsd_arm.s      |   29 -
 .../golang.org/x/sys/unix/asm_openbsd_386.s     |   29 -
 .../golang.org/x/sys/unix/asm_openbsd_amd64.s   |   29 -
 .../golang.org/x/sys/unix/asm_solaris_amd64.s   |   17 -
 .../golang.org/x/sys/unix/bluetooth_linux.go    |   35 -
 newt/vendor/golang.org/x/sys/unix/constants.go  |   13 -
 newt/vendor/golang.org/x/sys/unix/env_unix.go   |   27 -
 newt/vendor/golang.org/x/sys/unix/env_unset.go  |   14 -
 newt/vendor/golang.org/x/sys/unix/flock.go      |   24 -
 .../golang.org/x/sys/unix/flock_linux_32bit.go  |   13 -
 newt/vendor/golang.org/x/sys/unix/gccgo.go      |   46 -
 newt/vendor/golang.org/x/sys/unix/gccgo_c.c     |   41 -
 .../golang.org/x/sys/unix/gccgo_linux_amd64.go  |   20 -
 .../x/sys/unix/gccgo_linux_sparc64.go           |   20 -
 newt/vendor/golang.org/x/sys/unix/mkall.sh      |  292 --
 newt/vendor/golang.org/x/sys/unix/mkerrors.sh   |  483 ----
 newt/vendor/golang.org/x/sys/unix/mkpost.go     |   62 -
 newt/vendor/golang.org/x/sys/unix/mksyscall.pl  |  323 ---
 .../golang.org/x/sys/unix/mksyscall_solaris.pl  |  294 --
 .../golang.org/x/sys/unix/mksysctl_openbsd.pl   |  264 --
 .../golang.org/x/sys/unix/mksysnum_darwin.pl    |   39 -
 .../golang.org/x/sys/unix/mksysnum_dragonfly.pl |   50 -
 .../golang.org/x/sys/unix/mksysnum_freebsd.pl   |   63 -
 .../golang.org/x/sys/unix/mksysnum_linux.pl     |   58 -
 .../golang.org/x/sys/unix/mksysnum_netbsd.pl    |   58 -
 .../golang.org/x/sys/unix/mksysnum_openbsd.pl   |   50 -
 newt/vendor/golang.org/x/sys/unix/race.go       |   30 -
 newt/vendor/golang.org/x/sys/unix/race0.go      |   25 -
 .../golang.org/x/sys/unix/sockcmsg_linux.go     |   36 -
 .../golang.org/x/sys/unix/sockcmsg_unix.go      |  103 -
 newt/vendor/golang.org/x/sys/unix/str.go        |   26 -
 newt/vendor/golang.org/x/sys/unix/syscall.go    |   76 -
 .../vendor/golang.org/x/sys/unix/syscall_bsd.go |  628 ----
 .../golang.org/x/sys/unix/syscall_darwin.go     |  511 ----
 .../golang.org/x/sys/unix/syscall_darwin_386.go |   77 -
 .../x/sys/unix/syscall_darwin_amd64.go          |   79 -
 .../golang.org/x/sys/unix/syscall_darwin_arm.go |   71 -
 .../x/sys/unix/syscall_darwin_arm64.go          |   77 -
 .../golang.org/x/sys/unix/syscall_dragonfly.go  |  412 ---
 .../x/sys/unix/syscall_dragonfly_amd64.go       |   61 -
 .../golang.org/x/sys/unix/syscall_freebsd.go    |  683 -----
 .../x/sys/unix/syscall_freebsd_386.go           |   61 -
 .../x/sys/unix/syscall_freebsd_amd64.go         |   61 -
 .../x/sys/unix/syscall_freebsd_arm.go           |   61 -
 .../golang.org/x/sys/unix/syscall_linux.go      | 1111 -------
 .../golang.org/x/sys/unix/syscall_linux_386.go  |  399 ---
 .../x/sys/unix/syscall_linux_amd64.go           |  157 -
 .../golang.org/x/sys/unix/syscall_linux_arm.go  |  263 --
 .../x/sys/unix/syscall_linux_arm64.go           |  190 --
 .../x/sys/unix/syscall_linux_mips64x.go         |  208 --
 .../x/sys/unix/syscall_linux_ppc64x.go          |  135 -
 .../x/sys/unix/syscall_linux_s390x.go           |  329 ---
 .../x/sys/unix/syscall_linux_sparc64.go         |  169 --
 .../golang.org/x/sys/unix/syscall_netbsd.go     |  492 ----
 .../golang.org/x/sys/unix/syscall_netbsd_386.go |   42 -
 .../x/sys/unix/syscall_netbsd_amd64.go          |   42 -
 .../golang.org/x/sys/unix/syscall_netbsd_arm.go |   42 -
 .../golang.org/x/sys/unix/syscall_no_getwd.go   |   11 -
 .../golang.org/x/sys/unix/syscall_openbsd.go    |  304 --
 .../x/sys/unix/syscall_openbsd_386.go           |   42 -
 .../x/sys/unix/syscall_openbsd_amd64.go         |   42 -
 .../golang.org/x/sys/unix/syscall_solaris.go    |  725 -----
 .../x/sys/unix/syscall_solaris_amd64.go         |   35 -
 .../golang.org/x/sys/unix/syscall_unix.go       |  297 --
 .../golang.org/x/sys/unix/types_darwin.go       |  250 --
 .../golang.org/x/sys/unix/types_dragonfly.go    |  242 --
 .../golang.org/x/sys/unix/types_freebsd.go      |  353 ---
 .../vendor/golang.org/x/sys/unix/types_linux.go |  457 ---
 .../golang.org/x/sys/unix/types_netbsd.go       |  232 --
 .../golang.org/x/sys/unix/types_openbsd.go      |  244 --
 .../golang.org/x/sys/unix/types_solaris.go      |  262 --
 .../golang.org/x/sys/unix/zerrors_darwin_386.go | 1576 ----------
 .../x/sys/unix/zerrors_darwin_amd64.go          | 1576 ----------
 .../golang.org/x/sys/unix/zerrors_darwin_arm.go | 1293 ---------
 .../x/sys/unix/zerrors_darwin_arm64.go          | 1576 ----------
 .../x/sys/unix/zerrors_dragonfly_amd64.go       | 1530 ----------
 .../x/sys/unix/zerrors_freebsd_386.go           | 1743 -----------
 .../x/sys/unix/zerrors_freebsd_amd64.go         | 1748 -----------
 .../x/sys/unix/zerrors_freebsd_arm.go           | 1729 -----------
 .../golang.org/x/sys/unix/zerrors_linux_386.go  | 1819 ------------
 .../x/sys/unix/zerrors_linux_amd64.go           | 1820 ------------
 .../golang.org/x/sys/unix/zerrors_linux_arm.go  | 1743 -----------
 .../x/sys/unix/zerrors_linux_arm64.go           | 1897 ------------
 .../x/sys/unix/zerrors_linux_mips64.go          | 1917 ------------
 .../x/sys/unix/zerrors_linux_mips64le.go        | 1917 ------------
 .../x/sys/unix/zerrors_linux_ppc64.go           | 1970 -------------
 .../x/sys/unix/zerrors_linux_ppc64le.go         | 1969 -------------
 .../x/sys/unix/zerrors_linux_s390x.go           | 2027 -------------
 .../x/sys/unix/zerrors_linux_sparc64.go         | 2077 -------------
 .../golang.org/x/sys/unix/zerrors_netbsd_386.go | 1712 -----------
 .../x/sys/unix/zerrors_netbsd_amd64.go          | 1702 -----------
 .../golang.org/x/sys/unix/zerrors_netbsd_arm.go | 1688 -----------
 .../x/sys/unix/zerrors_openbsd_386.go           | 1584 ----------
 .../x/sys/unix/zerrors_openbsd_amd64.go         | 1583 ----------
 .../x/sys/unix/zerrors_solaris_amd64.go         | 1436 ---------
 .../x/sys/unix/zsyscall_darwin_386.go           | 1427 ---------
 .../x/sys/unix/zsyscall_darwin_amd64.go         | 1443 ---------
 .../x/sys/unix/zsyscall_darwin_arm.go           | 1427 ---------
 .../x/sys/unix/zsyscall_darwin_arm64.go         | 1427 ---------
 .../x/sys/unix/zsyscall_dragonfly_amd64.go      | 1413 ---------
 .../x/sys/unix/zsyscall_freebsd_386.go          | 1665 -----------
 .../x/sys/unix/zsyscall_freebsd_amd64.go        | 1665 -----------
 .../x/sys/unix/zsyscall_freebsd_arm.go          | 1665 -----------
 .../golang.org/x/sys/unix/zsyscall_linux_386.go | 1671 -----------
 .../x/sys/unix/zsyscall_linux_amd64.go          | 1865 ------------
 .../golang.org/x/sys/unix/zsyscall_linux_arm.go | 1772 ------------
 .../x/sys/unix/zsyscall_linux_arm64.go          | 1745 -----------
 .../x/sys/unix/zsyscall_linux_mips64.go         | 1814 ------------
 .../x/sys/unix/zsyscall_linux_mips64le.go       | 1814 ------------
 .../x/sys/unix/zsyscall_linux_ppc64.go          | 1876 ------------
 .../x/sys/unix/zsyscall_linux_ppc64le.go        | 1876 ------------
 .../x/sys/unix/zsyscall_linux_s390x.go          | 1656 -----------
 .../x/sys/unix/zsyscall_linux_sparc64.go        | 1845 ------------
 .../x/sys/unix/zsyscall_netbsd_386.go           | 1327 ---------
 .../x/sys/unix/zsyscall_netbsd_amd64.go         | 1327 ---------
 .../x/sys/unix/zsyscall_netbsd_arm.go           | 1327 ---------
 .../x/sys/unix/zsyscall_openbsd_386.go          | 1387 ---------
 .../x/sys/unix/zsyscall_openbsd_amd64.go        | 1387 ---------
 .../x/sys/unix/zsyscall_solaris_amd64.go        | 1599 ----------
 .../golang.org/x/sys/unix/zsysctl_openbsd.go    |  270 --
 .../golang.org/x/sys/unix/zsysnum_darwin_386.go |  398 ---
 .../x/sys/unix/zsysnum_darwin_amd64.go          |  398 ---
 .../golang.org/x/sys/unix/zsysnum_darwin_arm.go |  358 ---
 .../x/sys/unix/zsysnum_darwin_arm64.go          |  398 ---
 .../x/sys/unix/zsysnum_dragonfly_amd64.go       |  304 --
 .../x/sys/unix/zsysnum_freebsd_386.go           |  351 ---
 .../x/sys/unix/zsysnum_freebsd_amd64.go         |  351 ---
 .../x/sys/unix/zsysnum_freebsd_arm.go           |  351 ---
 .../golang.org/x/sys/unix/zsysnum_linux_386.go  |  355 ---
 .../x/sys/unix/zsysnum_linux_amd64.go           |  321 --
 .../golang.org/x/sys/unix/zsysnum_linux_arm.go  |  356 ---
 .../x/sys/unix/zsysnum_linux_arm64.go           |  272 --
 .../x/sys/unix/zsysnum_linux_mips64.go          |  327 ---
 .../x/sys/unix/zsysnum_linux_mips64le.go        |  327 ---
 .../x/sys/unix/zsysnum_linux_ppc64.go           |  360 ---
 .../x/sys/unix/zsysnum_linux_ppc64le.go         |  353 ---
 .../x/sys/unix/zsysnum_linux_s390x.go           |  328 ---
 .../x/sys/unix/zsysnum_linux_sparc64.go         |  348 ---
 .../golang.org/x/sys/unix/zsysnum_netbsd_386.go |  273 --
 .../x/sys/unix/zsysnum_netbsd_amd64.go          |  273 --
 .../golang.org/x/sys/unix/zsysnum_netbsd_arm.go |  273 --
 .../x/sys/unix/zsysnum_openbsd_386.go           |  207 --
 .../x/sys/unix/zsysnum_openbsd_amd64.go         |  207 --
 .../x/sys/unix/zsysnum_solaris_amd64.go         |   13 -
 .../golang.org/x/sys/unix/ztypes_darwin_386.go  |  447 ---
 .../x/sys/unix/ztypes_darwin_amd64.go           |  462 ---
 .../golang.org/x/sys/unix/ztypes_darwin_arm.go  |  449 ---
 .../x/sys/unix/ztypes_darwin_arm64.go           |  457 ---
 .../x/sys/unix/ztypes_dragonfly_amd64.go        |  443 ---
 .../golang.org/x/sys/unix/ztypes_freebsd_386.go |  502 ----
 .../x/sys/unix/ztypes_freebsd_amd64.go          |  505 ----
 .../golang.org/x/sys/unix/ztypes_freebsd_arm.go |  497 ----
 .../golang.org/x/sys/unix/ztypes_linux_386.go   |  627 ----
 .../golang.org/x/sys/unix/ztypes_linux_amd64.go |  645 -----
 .../golang.org/x/sys/unix/ztypes_linux_arm.go   |  616 ----
 .../golang.org/x/sys/unix/ztypes_linux_arm64.go |  624 ----
 .../x/sys/unix/ztypes_linux_mips64.go           |  627 ----
 .../x/sys/unix/ztypes_linux_mips64le.go         |  627 ----
 .../golang.org/x/sys/unix/ztypes_linux_ppc64.go |  634 ----
 .../x/sys/unix/ztypes_linux_ppc64le.go          |  634 ----
 .../golang.org/x/sys/unix/ztypes_linux_s390x.go |  649 -----
 .../x/sys/unix/ztypes_linux_sparc64.go          |  640 ----
 .../golang.org/x/sys/unix/ztypes_netbsd_386.go  |  396 ---
 .../x/sys/unix/ztypes_netbsd_amd64.go           |  403 ---
 .../golang.org/x/sys/unix/ztypes_netbsd_arm.go  |  401 ---
 .../golang.org/x/sys/unix/ztypes_openbsd_386.go |  441 ---
 .../x/sys/unix/ztypes_openbsd_amd64.go          |  448 ---
 .../x/sys/unix/ztypes_solaris_amd64.go          |  423 ---
 newt/vendor/gopkg.in/fsnotify.v1/.editorconfig  |    5 -
 newt/vendor/gopkg.in/fsnotify.v1/.gitignore     |    6 -
 newt/vendor/gopkg.in/fsnotify.v1/.travis.yml    |   28 -
 newt/vendor/gopkg.in/fsnotify.v1/AUTHORS        |   46 -
 newt/vendor/gopkg.in/fsnotify.v1/CHANGELOG.md   |  307 --
 .../vendor/gopkg.in/fsnotify.v1/CONTRIBUTING.md |   77 -
 newt/vendor/gopkg.in/fsnotify.v1/LICENSE        |   28 -
 newt/vendor/gopkg.in/fsnotify.v1/README.md      |   50 -
 newt/vendor/gopkg.in/fsnotify.v1/fen.go         |   37 -
 newt/vendor/gopkg.in/fsnotify.v1/fsnotify.go    |   62 -
 newt/vendor/gopkg.in/fsnotify.v1/inotify.go     |  325 ---
 .../gopkg.in/fsnotify.v1/inotify_poller.go      |  187 --
 newt/vendor/gopkg.in/fsnotify.v1/kqueue.go      |  503 ----
 .../gopkg.in/fsnotify.v1/open_mode_bsd.go       |   11 -
 .../gopkg.in/fsnotify.v1/open_mode_darwin.go    |   12 -
 newt/vendor/gopkg.in/fsnotify.v1/windows.go     |  561 ----
 newt/vendor/mynewt.apache.org/newt/util/util.go |  621 ----
 .../vendor/mynewt.apache.org/newt/viper/LICENSE |   21 -
 .../mynewt.apache.org/newt/viper/README.md      |  620 ----
 .../mynewt.apache.org/newt/viper/flags.go       |   57 -
 .../vendor/mynewt.apache.org/newt/viper/util.go |  195 --
 .../mynewt.apache.org/newt/viper/viper.go       | 1300 ---------
 newt/vendor/mynewt.apache.org/newt/yaml/apic.go |  767 -----
 .../mynewt.apache.org/newt/yaml/decode.go       |  308 --
 .../mynewt.apache.org/newt/yaml/emitterc.go     | 1710 -----------
 newt/vendor/mynewt.apache.org/newt/yaml/misc.go |   32 -
 .../mynewt.apache.org/newt/yaml/parserc.go      | 1121 -------
 .../mynewt.apache.org/newt/yaml/readerc.go      |  419 ---
 .../mynewt.apache.org/newt/yaml/scannerc.go     | 2735 ------------------
 newt/vendor/mynewt.apache.org/newt/yaml/shim.go |   42 -
 .../mynewt.apache.org/newt/yaml/writerc.go      |  114 -
 .../vendor/mynewt.apache.org/newt/yaml/yamlh.go |  754 -----
 .../mynewt.apache.org/newt/yaml/yamlprivateh.go |  198 --
 newtvm/newtvm.go                                |  194 --
 util/unixchild/unixchild.go                     |  340 ---
 util/util.go                                    |  628 ----
 viper/LICENSE                                   |   21 -
 viper/README.md                                 |  620 ----
 viper/flags.go                                  |   57 -
 viper/flags_test.go                             |   66 -
 viper/remote/remote.go                          |   77 -
 viper/util.go                                   |  195 --
 viper/viper.go                                  | 1300 ---------
 viper/viper_test.go                             |  783 -----
 yaml/apic.go                                    |  767 -----
 yaml/decode.go                                  |  308 --
 yaml/emitterc.go                                | 1710 -----------
 yaml/misc.go                                    |   32 -
 yaml/parserc.go                                 | 1121 -------
 yaml/readerc.go                                 |  419 ---
 yaml/scannerc.go                                | 2735 ------------------
 yaml/shim.go                                    |   42 -
 yaml/writerc.go                                 |  114 -
 yaml/yamlh.go                                   |  754 -----
 yaml/yamlprivateh.go                            |  198 --
 396 files changed, 1 insertion(+), 170216 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/INSTALLING.md
----------------------------------------------------------------------
diff --git a/INSTALLING.md b/INSTALLING.md
deleted file mode 100644
index 0718925..0000000
--- a/INSTALLING.md
+++ /dev/null
@@ -1,83 +0,0 @@
-# Installing Newt
-
-There are two methods for the installation of newt, either from source, or
-from a binary release.  This document contains information on how to do both.
-
-# Downloading Binary Newt
-
-Binary releases of newt will be published on the Apache Mynewt website
-when available.  To find these, please go to https://mynewt.apache.org/.
-
-# Installing From Source
-
-The newt tool is written in Go (https://golang.org/).  In order to build Apache
-Mynewt, you must have Go 1.7 or later installed on your system.  Please visit
-the Golang website for more information on installing Go (https://golang.org/).
-
-Once you have Go installed, you can build newt by running the contained
-build.sh script.  This script will create the newt executable with the
-following path, relative to the source directory:
-
-```no-highlight
-    newt/newt
-```
-
-If you do not wish to run the included script, you can build newt manually with Go as follows (executed from the source directory):
-
-```no-highlight
-    $ mkdir "$GOPATH"/src/mynewt.apache.org
-    $ cp -r * "$GOPATH"/src/mynewt.apache.org     # Or untar to this path
-    $ go install mynewt.apache.org/newt/newt
-```
-
-This puts the newt binary in $GOPATH/bin
-
-You can test the installation by running newt:
-
-```no-highlight
-$ newt
-Newt allows you to create your own embedded application based on the Mynewt
-operating system. Newt provides both build and package management in a single
-tool, which allows you to compose an embedded application, and set of
-projects, and then build the necessary artifacts from those projects. For more
-information on the Mynewt operating system, please visit
-https://mynewt.apache.org/.
-
-Please use the newt help command, and specify the name of the command you want
-help for, for help on how to use a specific command
-
-Usage:
-  newt [flags]
-  newt [command]
-
-Examples:
-  newt
-  newt help [<command-name>]
-    For help on <command-name>.  If not specified, print this message.
-
-Available Commands:
-  version      Display the Newt version number.
-  install      Install project dependencies
-  upgrade      Upgrade project dependencies
-  new          Create a new project
-  info         Show project info
-  target       Command for manipulating targets
-  build        Builds one or more apps.
-  clean        Deletes app build artifacts.
-  test         Executes unit tests for one or more packages
-  load         Load built target to board
-  debug        Open debugger session to target
-  size         Size of target components
-  create-image Add image header to target binary
-  run          build/create-image/download/debug <target>
-
-Flags:
-  -h, --help              help for newt
-  -l, --loglevel string   Log level, defaults to WARN. (default "WARN")
-  -o, --outfile string    Filename to tee log output to
-  -q, --quiet             Be quiet; only display error output.
-  -s, --silent            Be silent; don't output anything.
-  -v, --verbose           Enable verbose output when executing commands.
-
-Use "newt [command] --help" for more information about a command.
-```

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index a61b01d..5c26a1a 100644
--- a/README.md
+++ b/README.md
@@ -19,107 +19,4 @@
 #
 -->
 
-# Newt
-
-Apache Newt is a smart build and package management tool, designed for C and C++
-applications in embedded contexts.  Newt was developed as a part of the
-Apache Mynewt Operating System, more information on Apache Mynewt can be found
-at https://mynewt.apache.org/.
-
-# Features
-
-Newt is a build system that can read a directory tree, build a dependency tree, and emit the right build artifacts. It then allows you to do the following:
-
-* Download built target to board
-* Generate full flash images
-* Download debug images to a target board using a debugger
-* Conditionally compile libraries & code based upon build settings
-* Generate and download manufacturing flash images
-
-Newt is also a source management system that allows you to do the following:
-
-* Create reusable source distributions (called repos) from a collection of code.
-* Use third-party components with licenses that are not comptatible with the ASF (Apache Software Foundation) license
-* Upgrade repos
-
-
-# How it Works
-
-When Newt sees a directory tree that contains a "project.yml" file, it recognizes it as the base directory of a project, and automatically builds a package tree.
-More information can be found in the "Newt Tool Manual" under Docs at https://mynewt.apache.org/.
-
-
-# Getting Started
-
-To build Apache Newt, simply run the included build.sh script.  For more
-information on building and installng Apache Newt, please read
-[INSTALLING](/INSTALLING.md) or the documentation on https://mynewt.apache.org/
-
-Once you've installed newt, you can get started by creating a new project:
-
-```no-highlight
-  $ newt new your_project
-```
-
-For more information, and a tutorial for getting started, please take a look at
-the [Apache Mynewt documentation](https://mynewt.apache.org/os/get_started/introduction/).
-
-
-
-# Contributing
-
-## Introduction
-
-Anybody who works with Apache Mynewt can be a contributing member of the
-community that develops and deploys it.  The process of releasing an operating
-system for microcontrollers is never done: and we welcome your contributions
-to that effort.
-
-## Pull Requests
-
-Apache Mynewt welcomes pull request via Github.  Discussions are done on Github,
-but depending on the topic, can also be relayed to the official Apache Mynewt
-developer mailing list dev@mynewt.incubator.apache.org.
-
-If you are suggesting a new feature, please email the developer list directly,
-with a description of the feature you are planning to work on.
-
-We do not merge pull requests directly on Github, all PRs will be pulled and
-pushed through https://git.apache.org/.
-
-## Filing Bugs
-
-Bugs can be filed on the
-[Apache Mynewt Bug Tracker](https://issues.apache.org/jira/browse/MYNEWT).
-
-Where possible, please include a self-contained reproduction case!
-
-## Feature Requests
-
-Feature requests should also be filed on the
-[Apache Mynewt Bug Tracker](https://issues.apache.org/jira/browse/MYNEWT).
-Please introduce it as a ticket type "Wish."
-
-## Writing Tests
-
-We love getting newt tests!  Apache Mynewt is a huge undertaking, and improving
-code coverage is a win for every Apache Mynewt user.
-
-## Writing Documentation
-
-Contributing to documentation (in addition to writing tests), is a great way
-to get involved with the Apache Mynewt project.
-
-Pull requests to the apache-mynewt-site repository on Github are the best
-way to submit documentation.  For more information on contributing to the
-documentation, the [FAQ](https://mynewt.apache.org/faq/answers/) has some
-more information.
-
-## Getting Help
-
-If you are having trouble contributing to Apache Mynewt, or just want to talk
-to a human about what you're working on, you can contact us via the
-[developers mailing list](mailto:dev@mynewt.incubator.apache.org).
-
-Although not a formal channel, you can also find a number of core developers
-on the #mynewt channel on Freenode.
+# Newtmgr

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/RELEASE_NOTES.md
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
deleted file mode 100644
index e92398b..0000000
--- a/RELEASE_NOTES.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# RELEASE NOTES
-
-7 March 2017 - Apache Newt v1.0.0
-
-For full release notes, please visit the
-[Apache Mynewt Wiki](https://cwiki.apache.org/confluence/display/MYNEWT/Release+Notes).
-
-Apache Newt is the build and package management system for the Apache Mynewt
-project.  More information on Newt can be found
-[here](http://mail-archives.apache.org/mod_mbox/incubator-mynewt-dev/201603.mbox/%3C56E21C13.9050303%40apache.org%3E)
-
-Apache Mynewt continues to stabilize with each release, and we believe this
-release is a further step forward.  People who are interested in playing
-around, and trying Newt, are encouraged to download and begin evaluating it.
-
-Future versions will add:
-
-  * More robust package management and versioning
-
-  * Plenty of helper commands for seeing what's installed, what's changed,
-    and why things failed.
-
-If working on next-generation build and source package management systems
-sounds exciting to you, get in touch, by sending a mail to the Apache Mynewt
-Developer's list, dev@mynewt.incubator.apache.org.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/build.sh
----------------------------------------------------------------------
diff --git a/build.sh b/build.sh
deleted file mode 100755
index 9405e6b..0000000
--- a/build.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -e
-
-### Function to do the task of the non-standard realpath utility.  This does
-### not expand links, however.
-expandpath() {
-    (
-        cd "$1" && pwd
-    )
-}
-
-### Ensure >= go1.7 is installed.
-go_ver_str="$(go version | cut -d ' ' -f 3)"
-go_ver="${go_ver_str#go}"
-
-oldIFS="$IFS"
-IFS='.'
-set -- $go_ver
-IFS="$oldIFS"
-go_maj="$1"
-go_min="$2"
-
-if [ "$go_maj" = "" ]
-then
-    printf "* Error: could not extract go version (version string: %s)\n" \
-        "$go_ver_str"
-    exit 1
-fi
-
-if [ "$go_min" = "" ]
-then
-    go_min=0
-fi
-
-if [ ! "$go_maj" -gt 1 ] && [ ! "$go_min" -ge 7 ]
-then
-    printf "* Error: go 1.7 or later is required (detected version: %s)\n" \
-        "$go_maj"."$go_min".X
-    exit 1
-fi
-
-### Create a temporary go tree in /tmp.
-installdir="$(expandpath "$(dirname "$0")")"
-godir="$(mktemp -d /tmp/mynewt.XXXXXXXXXX)"
-mynewtdir="$godir"/src/mynewt.apache.org
-repodir="$mynewtdir"/newt
-newtdir="$repodir"/newt
-dstfile="$installdir"/newt/newt
-
-mkdir -p "$mynewtdir"
-ln -s "$installdir" "$repodir"
-
-### Build newt.
-(
-    cd "$newtdir"
-
-    printf "Building newt.  This may take a minute...\n"
-    GOPATH="$godir" GO15VENDOREXPERIMENT=1 go install
-
-    mv "$godir"/bin/newt "$dstfile"
-
-    printf "Successfully built executable: %s\n" "$dstfile"
-)
-
-### Delete the temporary directory.
-rm -r "$godir"

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/Godeps/Godeps.json
----------------------------------------------------------------------
diff --git a/newt/Godeps/Godeps.json b/newt/Godeps/Godeps.json
deleted file mode 100644
index 32f885b..0000000
--- a/newt/Godeps/Godeps.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
-	"ImportPath": "mynewt.apache.org/newt/newt",
-	"GoVersion": "go1.6",
-	"GodepVersion": "v74",
-	"Deps": [
-		{
-			"ImportPath": "github.com/Sirupsen/logrus",
-			"Comment": "v0.11.0-10-ga437dfd",
-			"Rev": "a437dfd2463eaedbec3dfe443e477d3b0a810b3f"
-		},
-		{
-			"ImportPath": "github.com/inconshreveable/mousetrap",
-			"Rev": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
-		},
-		{
-			"ImportPath": "github.com/kr/pretty",
-			"Comment": "go.weekly.2011-12-22-36-gcfb55aa",
-			"Rev": "cfb55aafdaf3ec08f0db22699ab822c50091b1c4"
-		},
-		{
-			"ImportPath": "github.com/kr/text",
-			"Rev": "7cafcd837844e784b526369c9bce262804aebc60"
-		},
-		{
-			"ImportPath": "github.com/mitchellh/mapstructure",
-			"Rev": "f3009df150dadf309fdee4a54ed65c124afad715"
-		},
-		{
-			"ImportPath": "github.com/spf13/cast",
-			"Rev": "24b6558033ffe202bf42f0f3b870dcc798dd2ba8"
-		},
-		{
-			"ImportPath": "github.com/spf13/cobra",
-			"Rev": "9495bc009a56819bdb0ddbc1a373e29c140bc674"
-		},
-		{
-			"ImportPath": "github.com/spf13/jwalterweatherman",
-			"Rev": "33c24e77fb80341fe7130ee7c594256ff08ccc46"
-		},
-		{
-			"ImportPath": "github.com/spf13/pflag",
-			"Rev": "5ccb023bc27df288a957c5e994cd44fd19619465"
-		},
-		{
-			"ImportPath": "golang.org/x/sys/unix",
-			"Rev": "b699b7032584f0953262cb2788a0ca19bb494703"
-		},
-		{
-			"ImportPath": "gopkg.in/fsnotify.v1",
-			"Comment": "v1.4.2",
-			"Rev": "629574ca2a5df945712d3079857300b5e4da0236"
-		},
-		{
-			"ImportPath": "mynewt.apache.org/newt/util",
-			"Comment": "pre_sterly_refactor-136-gb93ff7f",
-			"Rev": "b93ff7f6f8715f92d37ce68c66978f2b9bf20692"
-		},
-		{
-			"ImportPath": "mynewt.apache.org/newt/viper",
-			"Comment": "pre_sterly_refactor-136-gb93ff7f",
-			"Rev": "b93ff7f6f8715f92d37ce68c66978f2b9bf20692"
-		},
-		{
-			"ImportPath": "mynewt.apache.org/newt/yaml",
-			"Comment": "pre_sterly_refactor-136-gb93ff7f",
-			"Rev": "b93ff7f6f8715f92d37ce68c66978f2b9bf20692"
-		}
-	]
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/Godeps/Readme
----------------------------------------------------------------------
diff --git a/newt/Godeps/Readme b/newt/Godeps/Readme
deleted file mode 100644
index 4cdaa53..0000000
--- a/newt/Godeps/Readme
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory tree is generated automatically by godep.
-
-Please do not edit.
-
-See https://github.com/tools/godep for more information.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/build.go
----------------------------------------------------------------------
diff --git a/newt/builder/build.go b/newt/builder/build.go
deleted file mode 100644
index d82d9ff..0000000
--- a/newt/builder/build.go
+++ /dev/null
@@ -1,755 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"fmt"
-	"os"
-	"path/filepath"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/newt/image"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/repo"
-	"mynewt.apache.org/newt/newt/resolve"
-	"mynewt.apache.org/newt/newt/symbol"
-	"mynewt.apache.org/newt/newt/syscfg"
-	"mynewt.apache.org/newt/newt/target"
-	"mynewt.apache.org/newt/newt/toolchain"
-	"mynewt.apache.org/newt/util"
-)
-
-type Builder struct {
-	PkgMap map[*resolve.ResolvePackage]*BuildPackage
-
-	apiMap           map[string]*BuildPackage
-	appPkg           *BuildPackage
-	bspPkg           *BuildPackage
-	compilerPkg      *BuildPackage
-	targetPkg        *BuildPackage
-	compilerInfo     *toolchain.CompilerInfo
-	targetBuilder    *TargetBuilder
-	cfg              syscfg.Cfg
-	linkerScripts    []string
-	buildName        string
-	linkElf          string
-	injectedSettings map[string]string
-}
-
-func NewBuilder(
-	t *TargetBuilder,
-	buildName string,
-	rpkgs []*resolve.ResolvePackage,
-	apiMap map[string]*resolve.ResolvePackage,
-	cfg syscfg.Cfg) (*Builder, error) {
-
-	b := &Builder{
-		PkgMap: make(map[*resolve.ResolvePackage]*BuildPackage, len(rpkgs)),
-		cfg:    cfg,
-
-		buildName:        buildName,
-		apiMap:           make(map[string]*BuildPackage, len(apiMap)),
-		linkElf:          "",
-		targetBuilder:    t,
-		injectedSettings: map[string]string{},
-	}
-
-	for _, rpkg := range rpkgs {
-		if _, err := b.addPackage(rpkg); err != nil {
-			return nil, err
-		}
-	}
-
-	// Create a pseudo build package for the generated sysinit code.
-	if _, err := b.addSysinitBpkg(); err != nil {
-		return nil, err
-	}
-
-	for api, rpkg := range apiMap {
-		bpkg := b.PkgMap[rpkg]
-		if bpkg == nil {
-			for _, rpkg := range b.sortedRpkgs() {
-				log.Debugf("    * %s", rpkg.Lpkg.Name())
-			}
-			return nil, util.FmtNewtError(
-				"Unexpected unsatisfied API: %s; required by: %s", api,
-				rpkg.Lpkg.Name())
-		}
-
-		b.apiMap[api] = bpkg
-	}
-
-	return b, nil
-}
-
-func (b *Builder) addPackage(rpkg *resolve.ResolvePackage) (
-	*BuildPackage, error) {
-
-	// Don't allow nil entries to the map
-	if rpkg == nil {
-		panic("Cannot add nil package builder map")
-	}
-
-	bpkg := b.PkgMap[rpkg]
-	if bpkg == nil {
-		bpkg = NewBuildPackage(rpkg)
-
-		switch bpkg.rpkg.Lpkg.Type() {
-		case pkg.PACKAGE_TYPE_APP:
-			if b.appPkg != nil {
-				return nil, pkgTypeConflictErr(b.appPkg, bpkg)
-			}
-			b.appPkg = bpkg
-
-		case pkg.PACKAGE_TYPE_BSP:
-			if b.bspPkg != nil {
-				return nil, pkgTypeConflictErr(b.bspPkg, bpkg)
-			}
-			b.bspPkg = bpkg
-
-		case pkg.PACKAGE_TYPE_COMPILER:
-			if b.compilerPkg != nil {
-				return nil, pkgTypeConflictErr(b.compilerPkg, bpkg)
-			}
-			b.compilerPkg = bpkg
-
-		case pkg.PACKAGE_TYPE_TARGET:
-			if b.targetPkg != nil {
-				return nil, pkgTypeConflictErr(b.targetPkg, bpkg)
-			}
-			b.targetPkg = bpkg
-		}
-
-		b.PkgMap[rpkg] = bpkg
-	}
-
-	return bpkg, nil
-}
-
-func pkgTypeConflictErr(p1 *BuildPackage, p2 *BuildPackage) error {
-	return util.FmtNewtError("Two %s packages in build: %s, %s",
-		pkg.PackageTypeNames[p1.rpkg.Lpkg.Type()],
-		p1.rpkg.Lpkg.Name(),
-		p2.rpkg.Lpkg.Name())
-}
-
-// Recursively compiles all the .c and .s files in the specified directory.
-// Architecture-specific files are also compiled.
-func collectCompileEntriesDir(srcDir string, c *toolchain.Compiler,
-	arch string, ignDirs []string) ([]toolchain.CompilerJob, error) {
-
-	// Quietly succeed if the source directory doesn't exist.
-	if util.NodeNotExist(srcDir) {
-		return nil, nil
-	}
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE,
-		"Compiling src in base directory: %s\n", srcDir)
-
-	// Start from the source directory.
-	c.SetSrcDir(srcDir)
-
-	// Ignore architecture-specific source files for now.  Use a temporary
-	// string slice here so that the "arch" directory is not ignored in the
-	// subsequent architecture-specific compile phase.
-	ignDirsArch := append(ignDirs, "arch")
-
-	entries := []toolchain.CompilerJob{}
-
-	subEntries, err := c.RecursiveCollectEntries(toolchain.COMPILER_TYPE_C,
-		ignDirsArch)
-	if err != nil {
-		return nil, err
-	}
-	entries = append(entries, subEntries...)
-
-	// Compile CPP files
-	subEntries, err = c.RecursiveCollectEntries(toolchain.COMPILER_TYPE_CPP,
-		ignDirsArch)
-	if err != nil {
-		return nil, err
-	}
-	entries = append(entries, subEntries...)
-
-	// Copy in pre-compiled library files
-	subEntries, err = c.RecursiveCollectEntries(
-		toolchain.COMPILER_TYPE_ARCHIVE, ignDirsArch)
-	if err != nil {
-		return nil, err
-	}
-	entries = append(entries, subEntries...)
-
-	archDir := srcDir + "/arch/" + arch + "/"
-	if util.NodeExist(archDir) {
-		util.StatusMessage(util.VERBOSITY_VERBOSE,
-			"Compiling architecture specific src pkgs in directory: %s\n",
-			archDir)
-		c.SetSrcDir(archDir)
-
-		// Compile C source.
-		subEntries, err = c.RecursiveCollectEntries(
-			toolchain.COMPILER_TYPE_C, ignDirs)
-		if err != nil {
-			return nil, err
-		}
-		entries = append(entries, subEntries...)
-
-		// Compile CPP source
-		subEntries, err = c.RecursiveCollectEntries(
-			toolchain.COMPILER_TYPE_CPP, ignDirs)
-		if err != nil {
-			return nil, err
-		}
-		entries = append(entries, subEntries...)
-
-		// Compile assembly source (only architecture-specific).
-		subEntries, err = c.RecursiveCollectEntries(
-			toolchain.COMPILER_TYPE_ASM, ignDirs)
-		if err != nil {
-			return nil, err
-		}
-		entries = append(entries, subEntries...)
-
-		// Copy in pre-compiled library files
-		subEntries, err = c.RecursiveCollectEntries(
-			toolchain.COMPILER_TYPE_ARCHIVE, ignDirs)
-		if err != nil {
-			return nil, err
-		}
-		entries = append(entries, subEntries...)
-	}
-
-	return entries, nil
-}
-
-func (b *Builder) newCompiler(bpkg *BuildPackage,
-	dstDir string) (*toolchain.Compiler, error) {
-
-	c, err := b.targetBuilder.NewCompiler(dstDir)
-	if err != nil {
-		return nil, err
-	}
-
-	c.AddInfo(b.compilerInfo)
-
-	if bpkg != nil {
-		log.Debugf("Generating build flags for package %s",
-			bpkg.rpkg.Lpkg.FullName())
-		ci, err := bpkg.CompilerInfo(b)
-		if err != nil {
-			return nil, err
-		}
-		c.AddInfo(ci)
-	}
-
-	return c, nil
-}
-
-func (b *Builder) collectCompileEntriesBpkg(bpkg *BuildPackage) (
-	[]toolchain.CompilerJob, error) {
-
-	c, err := b.newCompiler(bpkg, b.PkgBinDir(bpkg))
-	if err != nil {
-		return nil, err
-	}
-
-	srcDirs := []string{}
-
-	if len(bpkg.SourceDirectories) > 0 {
-		for _, relDir := range bpkg.SourceDirectories {
-			dir := bpkg.rpkg.Lpkg.BasePath() + "/" + relDir
-			if util.NodeNotExist(dir) {
-				return nil, util.NewNewtError(fmt.Sprintf(
-					"Specified source directory %s, does not exist.",
-					dir))
-			}
-			srcDirs = append(srcDirs, dir)
-		}
-	} else {
-		srcDir := bpkg.rpkg.Lpkg.BasePath() + "/src"
-		if util.NodeNotExist(srcDir) {
-			// Nothing to compile.
-			return nil, nil
-		}
-
-		srcDirs = append(srcDirs, srcDir)
-	}
-
-	entries := []toolchain.CompilerJob{}
-	for _, dir := range srcDirs {
-		subEntries, err := collectCompileEntriesDir(dir, c,
-			b.targetBuilder.bspPkg.Arch, nil)
-		if err != nil {
-			return nil, err
-		}
-
-		entries = append(entries, subEntries...)
-	}
-
-	return entries, nil
-}
-
-func (b *Builder) createArchive(c *toolchain.Compiler,
-	bpkg *BuildPackage) error {
-
-	// Create a static library ("archive").
-	c.SetSrcDir(bpkg.rpkg.Lpkg.RelativePath())
-	archiveFile := b.ArchivePath(bpkg)
-	if err := c.CompileArchive(archiveFile); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (b *Builder) RemovePackages(cmn map[string]bool) error {
-	for pkgName, _ := range cmn {
-		for lp, bpkg := range b.PkgMap {
-			if bpkg.rpkg.Lpkg.Name() == pkgName {
-				delete(b.PkgMap, lp)
-			}
-		}
-	}
-	return nil
-}
-
-func (b *Builder) ExtractSymbolInfo() (error, *symbol.SymbolMap) {
-	syms := symbol.NewSymbolMap()
-	for _, bpkg := range b.PkgMap {
-		err, sm := b.ParseObjectLibrary(bpkg)
-		if err == nil {
-			syms, err = (*syms).Merge(sm)
-			if err != nil {
-				return err, nil
-			}
-		}
-	}
-	return nil, syms
-}
-
-func (b *Builder) link(elfName string, linkerScripts []string,
-	keepSymbols []string) error {
-
-	c, err := b.newCompiler(b.appPkg, b.FileBinDir(elfName))
-	if err != nil {
-		return err
-	}
-
-	/* Always used the trimmed archive files. */
-	pkgNames := []string{}
-
-	for _, bpkg := range b.PkgMap {
-		archiveNames, _ := filepath.Glob(b.PkgBinDir(bpkg) + "/*.a")
-		for i, archiveName := range archiveNames {
-			archiveNames[i] = filepath.ToSlash(archiveName)
-		}
-		pkgNames = append(pkgNames, archiveNames...)
-	}
-
-	c.LinkerScripts = linkerScripts
-	err = c.CompileElf(elfName, pkgNames, keepSymbols, b.linkElf)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-// Populates the builder with all the packages that need to be built and
-// configures each package's build settings.  After this function executes,
-// packages are ready to be built.
-func (b *Builder) PrepBuild() error {
-	// Populate the base set of compiler flags.  Flags from the following
-	// packages get applied to every source file:
-	//     * target
-	//     * app (if present)
-	//     * bsp
-	//     * compiler (not added here)
-	//
-	// In the case of conflicting flags, the higher priority package's flag
-	// wins.  Package priorities are assigned as follows (highest priority
-	// first):
-	//     * target
-	//     * app (if present)
-	//     * bsp
-	//     * <library package>
-	//     * compiler
-	baseCi := toolchain.NewCompilerInfo()
-
-	// Target flags.
-	log.Debugf("Generating build flags for target %s",
-		b.targetPkg.rpkg.Lpkg.FullName())
-	targetCi, err := b.targetPkg.CompilerInfo(b)
-	if err != nil {
-		return err
-	}
-	baseCi.AddCompilerInfo(targetCi)
-
-	// App flags.
-	if b.appPkg != nil {
-		log.Debugf("Generating build flags for app %s",
-			b.appPkg.rpkg.Lpkg.FullName())
-		appCi, err := b.appPkg.CompilerInfo(b)
-		if err != nil {
-			return err
-		}
-
-		baseCi.AddCompilerInfo(appCi)
-	}
-
-	// Bsp flags.
-	log.Debugf("Generating build flags for bsp %s",
-		b.bspPkg.rpkg.Lpkg.FullName())
-	bspCi, err := b.bspPkg.CompilerInfo(b)
-	if err != nil {
-		return err
-	}
-
-	// Define a cpp symbol indicating the BSP architecture, name of the
-	// BSP and app.
-
-	archName := b.targetBuilder.bspPkg.Arch
-	bspCi.Cflags = append(bspCi.Cflags, "-DARCH_"+util.CIdentifier(archName))
-	bspCi.Cflags = append(bspCi.Cflags, "-DARCH_NAME="+archName+"")
-
-	if b.appPkg != nil {
-		appName := filepath.Base(b.appPkg.rpkg.Lpkg.Name())
-		bspCi.Cflags = append(bspCi.Cflags, "-DAPP_"+util.CIdentifier(appName))
-		bspCi.Cflags = append(bspCi.Cflags, "-DAPP_NAME="+appName+"")
-	}
-
-	bspName := filepath.Base(b.bspPkg.rpkg.Lpkg.Name())
-	bspCi.Cflags = append(bspCi.Cflags, "-DBSP_"+util.CIdentifier(bspName))
-	bspCi.Cflags = append(bspCi.Cflags, "-DBSP_NAME="+bspName+"")
-
-	baseCi.AddCompilerInfo(bspCi)
-
-	// All packages have access to the generated code header directory.
-	baseCi.Cflags = append(baseCi.Cflags,
-		"-I"+GeneratedIncludeDir(b.targetPkg.rpkg.Lpkg.Name()))
-
-	// Note: Compiler flags get added at the end, after the flags for library
-	// package being built are calculated.
-	b.compilerInfo = baseCi
-
-	return nil
-}
-
-func (b *Builder) AddCompilerInfo(info *toolchain.CompilerInfo) {
-	b.compilerInfo.AddCompilerInfo(info)
-}
-
-func (b *Builder) addSysinitBpkg() (*BuildPackage, error) {
-	lpkg := pkg.NewLocalPackage(b.targetPkg.rpkg.Lpkg.Repo().(*repo.Repo),
-		GeneratedBaseDir(b.targetPkg.rpkg.Lpkg.Name()))
-	lpkg.SetName(pkg.ShortName(b.targetPkg.rpkg.Lpkg) + "-sysinit-" +
-		b.buildName)
-	lpkg.SetType(pkg.PACKAGE_TYPE_GENERATED)
-
-	rpkg := resolve.NewResolvePkg(lpkg)
-	return b.addPackage(rpkg)
-}
-
-// Runs build jobs while any remain.  On failure, signals the other workers to
-// stop via the stop channel.  On error, the error object is signaled via the
-// results channel.  On successful completion, nil is signaled via the results
-// channel.
-func buildWorker(
-	id int,
-	jobs <-chan toolchain.CompilerJob,
-	stop chan struct{},
-	results chan error) {
-
-	// Execute each job until failure or until a stop is signalled.
-	for {
-		select {
-		case s := <-stop:
-			// Re-enqueue the stop signal for the other routines.
-			stop <- s
-
-			// Terminate this go routine.
-			results <- nil
-			return
-
-		case j := <-jobs:
-			if err := toolchain.RunJob(j); err != nil {
-				// Stop the other routines.
-				stop <- struct{}{}
-
-				// Report the error back to the master thread and terminate.
-				results <- err
-				return
-			}
-
-		default:
-			// Terminate this go routine.
-			results <- nil
-			return
-		}
-	}
-}
-
-func (b *Builder) Build() error {
-	b.CleanArtifacts()
-
-	// Build the packages alphabetically to ensure a consistent order.
-	bpkgs := b.sortedBuildPackages()
-
-	// Calculate the list of jobs.  Each record represents a single file that
-	// needs to be compiled.
-	entries := []toolchain.CompilerJob{}
-	bpkgCompilerMap := map[*BuildPackage]*toolchain.Compiler{}
-	for _, bpkg := range bpkgs {
-		subEntries, err := b.collectCompileEntriesBpkg(bpkg)
-		if err != nil {
-			return err
-		}
-		entries = append(entries, subEntries...)
-
-		if len(subEntries) > 0 {
-			bpkgCompilerMap[bpkg] = subEntries[0].Compiler
-		}
-	}
-
-	// Build each file in parallel.
-	jobs := make(chan toolchain.CompilerJob, len(entries))
-	defer close(jobs)
-
-	stop := make(chan struct{}, newtutil.NewtNumJobs)
-	defer close(stop)
-
-	errors := make(chan error, newtutil.NewtNumJobs)
-	defer close(errors)
-
-	for _, entry := range entries {
-		jobs <- entry
-	}
-
-	for i := 0; i < newtutil.NewtNumJobs; i++ {
-		go buildWorker(i, jobs, stop, errors)
-	}
-
-	var err error
-	for i := 0; i < newtutil.NewtNumJobs; i++ {
-		subErr := <-errors
-		if err == nil && subErr != nil {
-			err = subErr
-		}
-	}
-	if err != nil {
-		return err
-	}
-
-	for _, bpkg := range bpkgs {
-		c := bpkgCompilerMap[bpkg]
-		if c != nil {
-			if err := b.createArchive(c, bpkg); err != nil {
-				return err
-			}
-		}
-	}
-
-	return nil
-}
-
-func (b *Builder) Link(linkerScripts []string) error {
-	if err := b.link(b.AppElfPath(), linkerScripts, nil); err != nil {
-		return err
-	}
-	return nil
-}
-
-func (b *Builder) KeepLink(
-	linkerScripts []string, keepMap *symbol.SymbolMap) error {
-
-	keepSymbols := make([]string, 0)
-
-	if keepMap != nil {
-		for _, info := range *keepMap {
-			keepSymbols = append(keepSymbols, info.Name)
-		}
-	}
-	if err := b.link(b.AppElfPath(), linkerScripts, keepSymbols); err != nil {
-		return err
-	}
-	return nil
-}
-
-func (b *Builder) TentativeLink(linkerScripts []string) error {
-	if err := b.link(b.AppTentativeElfPath(), linkerScripts, nil); err != nil {
-		return err
-	}
-	return nil
-}
-
-func (b *Builder) pkgWithPath(path string) *BuildPackage {
-	for _, bpkg := range b.PkgMap {
-		if bpkg.rpkg.Lpkg.BasePath() == path {
-			return bpkg
-		}
-	}
-
-	return nil
-}
-
-func (b *Builder) FetchSymbolMap() (error, *symbol.SymbolMap) {
-	loaderSm := symbol.NewSymbolMap()
-
-	for _, bpkg := range b.PkgMap {
-		err, sm := b.ParseObjectLibrary(bpkg)
-		if err == nil {
-			util.StatusMessage(util.VERBOSITY_VERBOSE,
-				"Size of %s Loader Map %d\n", bpkg.rpkg.Lpkg.Name(), len(*sm))
-			loaderSm, err = loaderSm.Merge(sm)
-			if err != nil {
-				return err, nil
-			}
-		}
-	}
-
-	return nil, loaderSm
-}
-
-func (b *Builder) GetTarget() *target.Target {
-	return b.targetBuilder.GetTarget()
-}
-
-func (b *Builder) buildRomElf(common *symbol.SymbolMap) error {
-	// check dependencies on the ROM ELF.  This is really dependent on
-	// all of the .a files, but since we already depend on the loader
-	// .as to build the initial elf, we only need to check the app .a
-	c, err := b.targetBuilder.NewCompiler(b.AppElfPath())
-	d := toolchain.NewDepTracker(c)
-	if err != nil {
-		return err
-	}
-
-	archNames := []string{}
-
-	// build the set of archive file names
-	for _, bpkg := range b.PkgMap {
-		archiveNames, _ := filepath.Glob(b.PkgBinDir(bpkg) + "/*.a")
-		archNames = append(archNames, archiveNames...)
-	}
-
-	bld, err := d.RomElfBuildRequired(b.AppLinkerElfPath(),
-		b.AppElfPath(), archNames)
-	if err != nil {
-		return err
-	}
-
-	if !bld {
-		return nil
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"Generating ROM elf \n")
-
-	/* the linker needs these symbols kept for the split app
-	 * to initialize the loader data and bss */
-	common.Add(*symbol.NewElfSymbol("__HeapBase"))
-	common.Add(*symbol.NewElfSymbol("__bss_start__"))
-	common.Add(*symbol.NewElfSymbol("__bss_end__"))
-	common.Add(*symbol.NewElfSymbol("__etext"))
-	common.Add(*symbol.NewElfSymbol("__data_start__"))
-	common.Add(*symbol.NewElfSymbol("__data_end__"))
-
-	/* the split app may need this to access interrupts */
-	common.Add(*symbol.NewElfSymbol("__vector_tbl_reloc__"))
-	common.Add(*symbol.NewElfSymbol("__isr_vector"))
-
-	err = b.CopySymbols(common)
-	if err != nil {
-		return err
-	}
-
-	/* These symbols are needed by the split app so it can zero
-	 * bss and copy data from the loader app before it restarts,
-	 * but we have to rename them since it has its own copies of
-	 * these special linker symbols  */
-	tmp_sm := symbol.NewSymbolMap()
-	tmp_sm.Add(*symbol.NewElfSymbol("__HeapBase"))
-	tmp_sm.Add(*symbol.NewElfSymbol("__bss_start__"))
-	tmp_sm.Add(*symbol.NewElfSymbol("__bss_end__"))
-	tmp_sm.Add(*symbol.NewElfSymbol("__etext"))
-	tmp_sm.Add(*symbol.NewElfSymbol("__data_start__"))
-	tmp_sm.Add(*symbol.NewElfSymbol("__data_end__"))
-	err = c.RenameSymbols(tmp_sm, b.AppLinkerElfPath(), "_loader")
-
-	if err != nil {
-		return err
-	}
-	return nil
-}
-
-func (b *Builder) CreateImage(version string,
-	keystr string, keyId uint8, loaderImg *image.Image) (*image.Image, error) {
-
-	img, err := image.NewImage(b.AppBinPath(), b.AppImgPath())
-	if err != nil {
-		return nil, err
-	}
-
-	err = img.SetVersion(version)
-	if err != nil {
-		return nil, err
-	}
-
-	if keystr != "" {
-		err = img.SetSigningKey(keystr, keyId)
-		if err != nil {
-			return nil, err
-		}
-	}
-
-	err = img.Generate(loaderImg)
-	if err != nil {
-		return nil, err
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"App image succesfully generated: %s\n", img.TargetImg)
-
-	return img, nil
-}
-
-// Deletes files that should never be reused for a subsequent build.  This
-// list includes:
-//     <app>.img
-//     <app>.elf.bin
-//     manifest.json
-func (b *Builder) CleanArtifacts() {
-	if b.appPkg == nil {
-		return
-	}
-
-	paths := []string{
-		b.AppImgPath(),
-		b.AppBinPath(),
-		b.ManifestPath(),
-	}
-
-	// Attempt to delete each artifact, ignoring errors.
-	for _, p := range paths {
-		os.Remove(p)
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/buildpackage.go
----------------------------------------------------------------------
diff --git a/newt/builder/buildpackage.go b/newt/builder/buildpackage.go
deleted file mode 100644
index e82566f..0000000
--- a/newt/builder/buildpackage.go
+++ /dev/null
@@ -1,260 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"os"
-	"path/filepath"
-	"regexp"
-
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/resolve"
-	"mynewt.apache.org/newt/newt/syscfg"
-	"mynewt.apache.org/newt/newt/toolchain"
-	"mynewt.apache.org/newt/util"
-)
-
-type BuildPackage struct {
-	rpkg              *resolve.ResolvePackage
-	SourceDirectories []string
-	ci                *toolchain.CompilerInfo
-}
-
-func NewBuildPackage(rpkg *resolve.ResolvePackage) *BuildPackage {
-	bpkg := &BuildPackage{
-		rpkg: rpkg,
-	}
-
-	return bpkg
-}
-
-// Recursively iterates through an pkg's dependencies, adding each pkg
-// encountered to the supplied set.
-func (bpkg *BuildPackage) collectDepsAux(b *Builder,
-	set *map[*BuildPackage]bool) error {
-
-	if (*set)[bpkg] {
-		return nil
-	}
-
-	(*set)[bpkg] = true
-
-	for _, dep := range bpkg.rpkg.Deps {
-		dbpkg := b.PkgMap[dep.Rpkg]
-		if dbpkg == nil {
-			return util.FmtNewtError("Package not found %s; required by %s",
-				dbpkg.rpkg.Lpkg.Name(), bpkg.rpkg.Lpkg.Name())
-		}
-
-		if err := dbpkg.collectDepsAux(b, set); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-// Recursively iterates through an pkg's dependencies.  The resulting array
-// contains a pointer to each encountered pkg.
-func (bpkg *BuildPackage) collectDeps(b *Builder) ([]*BuildPackage, error) {
-	set := map[*BuildPackage]bool{}
-
-	err := bpkg.collectDepsAux(b, &set)
-	if err != nil {
-		return nil, err
-	}
-
-	arr := []*BuildPackage{}
-	for p, _ := range set {
-		arr = append(arr, p)
-	}
-
-	return arr, nil
-}
-
-// Calculates the include paths exported by the specified pkg and all of
-// its recursive dependencies.
-func (bpkg *BuildPackage) recursiveIncludePaths(
-	b *Builder) ([]string, error) {
-
-	deps, err := bpkg.collectDeps(b)
-	if err != nil {
-		return nil, err
-	}
-
-	incls := []string{}
-	for _, p := range deps {
-		incls = append(incls, p.publicIncludeDirs(b.targetBuilder.bspPkg)...)
-	}
-
-	return incls, nil
-}
-
-// Replaces instances of "@<repo-name>" with repo paths.
-func expandFlags(flags []string) {
-	for i, f := range flags {
-		newFlag, changed := newtutil.ReplaceRepoDesignators(f)
-		if changed {
-			flags[i] = newFlag
-		}
-	}
-}
-
-func (bpkg *BuildPackage) CompilerInfo(
-	b *Builder) (*toolchain.CompilerInfo, error) {
-
-	// If this package's compiler info has already been generated, returned the
-	// cached copy.
-	if bpkg.ci != nil {
-		return bpkg.ci, nil
-	}
-
-	ci := toolchain.NewCompilerInfo()
-	features := b.cfg.FeaturesForLpkg(bpkg.rpkg.Lpkg)
-
-	// Read each set of flags and expand repo designators ("@<repo-nme>") into
-	// paths.
-	ci.Cflags = newtutil.GetStringSliceFeatures(bpkg.rpkg.Lpkg.PkgV, features,
-		"pkg.cflags")
-	expandFlags(ci.Cflags)
-
-	ci.Lflags = newtutil.GetStringSliceFeatures(bpkg.rpkg.Lpkg.PkgV, features,
-		"pkg.lflags")
-	expandFlags(ci.Lflags)
-
-	ci.Aflags = newtutil.GetStringSliceFeatures(bpkg.rpkg.Lpkg.PkgV, features,
-		"pkg.aflags")
-	expandFlags(ci.Aflags)
-
-	// Package-specific injected settings get specified as C flags on the
-	// command line.
-	for k, _ := range bpkg.rpkg.Lpkg.InjectedSettings() {
-		ci.Cflags = append(ci.Cflags, syscfg.FeatureToCflag(k))
-	}
-
-	ci.IgnoreFiles = []*regexp.Regexp{}
-	ignPats := newtutil.GetStringSliceFeatures(bpkg.rpkg.Lpkg.PkgV,
-		features, "pkg.ign_files")
-	for _, str := range ignPats {
-		re, err := regexp.Compile(str)
-		if err != nil {
-			return nil, util.NewNewtError(
-				"Ignore files, unable to compile re: " + err.Error())
-		}
-		ci.IgnoreFiles = append(ci.IgnoreFiles, re)
-	}
-
-	ci.IgnoreDirs = []*regexp.Regexp{}
-	ignPats = newtutil.GetStringSliceFeatures(bpkg.rpkg.Lpkg.PkgV,
-		features, "pkg.ign_dirs")
-	for _, str := range ignPats {
-		re, err := regexp.Compile(str)
-		if err != nil {
-			return nil, util.NewNewtError(
-				"Ignore dirs, unable to compile re: " + err.Error())
-		}
-		ci.IgnoreDirs = append(ci.IgnoreDirs, re)
-	}
-
-	bpkg.SourceDirectories = newtutil.GetStringSliceFeatures(
-		bpkg.rpkg.Lpkg.PkgV,
-		features, "pkg.src_dirs")
-
-	includePaths, err := bpkg.recursiveIncludePaths(b)
-	if err != nil {
-		return nil, err
-	}
-
-	ci.Includes = append(bpkg.privateIncludeDirs(b), includePaths...)
-	bpkg.ci = ci
-
-	return bpkg.ci, nil
-}
-
-func (bpkg *BuildPackage) findSdkIncludes() []string {
-	sdkDir := bpkg.rpkg.Lpkg.BasePath() + "/src/ext/"
-
-	sdkPathList := []string{}
-	err := filepath.Walk(sdkDir,
-		func(path string, info os.FileInfo, err error) error {
-			if !info.IsDir() {
-				return nil
-			}
-
-			sdkPathList = append(sdkPathList, path)
-			return nil
-		})
-	if err != nil {
-		return []string{}
-	}
-
-	return sdkPathList
-}
-
-func (bpkg *BuildPackage) publicIncludeDirs(bspPkg *pkg.BspPackage) []string {
-	pkgBase := filepath.Base(bpkg.rpkg.Lpkg.Name())
-	bp := bpkg.rpkg.Lpkg.BasePath()
-
-	incls := []string{
-		bp + "/include",
-		bp + "/include/" + pkgBase + "/arch/" + bspPkg.Arch,
-	}
-
-	if bpkg.rpkg.Lpkg.Type() == pkg.PACKAGE_TYPE_SDK {
-		incls = append(incls, bspPkg.BasePath()+"/include/bsp/")
-
-		sdkIncls := bpkg.findSdkIncludes()
-		incls = append(incls, sdkIncls...)
-	}
-
-	return incls
-}
-
-func (bpkg *BuildPackage) privateIncludeDirs(b *Builder) []string {
-	srcDir := bpkg.rpkg.Lpkg.BasePath() + "/src/"
-
-	incls := []string{}
-	incls = append(incls, srcDir)
-	incls = append(incls, srcDir+"/arch/"+b.targetBuilder.bspPkg.Arch)
-
-	switch bpkg.rpkg.Lpkg.Type() {
-	case pkg.PACKAGE_TYPE_SDK:
-		// If pkgType == SDK, include all the items in "ext" directly into the
-		// include path
-		incls = append(incls, b.bspPkg.rpkg.Lpkg.BasePath()+"/include/bsp/")
-
-		sdkIncls := bpkg.findSdkIncludes()
-		incls = append(incls, sdkIncls...)
-
-	case pkg.PACKAGE_TYPE_UNITTEST:
-		// A unittest package gets access to its parent package's private
-		// includes.
-		parentPkg := b.testOwner(bpkg)
-		if parentPkg != nil {
-			parentIncls := parentPkg.privateIncludeDirs(b)
-			incls = append(incls, parentIncls...)
-		}
-
-	default:
-	}
-
-	return incls
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/buildutil.go
----------------------------------------------------------------------
diff --git a/newt/builder/buildutil.go b/newt/builder/buildutil.go
deleted file mode 100644
index 61e5b65..0000000
--- a/newt/builder/buildutil.go
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"bytes"
-	"sort"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/newt/resolve"
-)
-
-func TestTargetName(testPkgName string) string {
-	return strings.Replace(testPkgName, "/", "_", -1)
-}
-
-func (b *Builder) FeatureString() string {
-	var buffer bytes.Buffer
-
-	featureMap := b.cfg.Features()
-	featureSlice := make([]string, 0, len(featureMap))
-	for k, _ := range featureMap {
-		featureSlice = append(featureSlice, k)
-	}
-	sort.Strings(featureSlice)
-
-	for i, feature := range featureSlice {
-		if i != 0 {
-			buffer.WriteString(" ")
-		}
-
-		buffer.WriteString(feature)
-	}
-	return buffer.String()
-}
-
-type bpkgSorter struct {
-	bpkgs []*BuildPackage
-}
-
-func (b bpkgSorter) Len() int {
-	return len(b.bpkgs)
-}
-func (b bpkgSorter) Swap(i, j int) {
-	b.bpkgs[i], b.bpkgs[j] = b.bpkgs[j], b.bpkgs[i]
-}
-func (b bpkgSorter) Less(i, j int) bool {
-	return b.bpkgs[i].rpkg.Lpkg.Name() < b.bpkgs[j].rpkg.Lpkg.Name()
-}
-
-func (b *Builder) sortedBuildPackages() []*BuildPackage {
-	sorter := bpkgSorter{
-		bpkgs: make([]*BuildPackage, 0, len(b.PkgMap)),
-	}
-
-	for _, bpkg := range b.PkgMap {
-		sorter.bpkgs = append(sorter.bpkgs, bpkg)
-	}
-
-	sort.Sort(sorter)
-	return sorter.bpkgs
-}
-
-func (b *Builder) sortedRpkgs() []*resolve.ResolvePackage {
-	bpkgs := b.sortedBuildPackages()
-
-	rpkgs := make([]*resolve.ResolvePackage, len(bpkgs), len(bpkgs))
-	for i, bpkg := range bpkgs {
-		rpkgs[i] = bpkg.rpkg
-	}
-
-	return rpkgs
-}
-
-func logDepInfo(res *resolve.Resolution) {
-	// Log API set.
-	apis := []string{}
-	for api, _ := range res.ApiMap {
-		apis = append(apis, api)
-	}
-	sort.Strings(apis)
-
-	log.Debugf("API set:")
-	for _, api := range apis {
-		rpkg := res.ApiMap[api]
-		log.Debugf("    * " + api + " (" + rpkg.Lpkg.FullName() + ")")
-	}
-
-	// Log dependency graph.
-	dg, err := depGraph(res.MasterSet)
-	if err != nil {
-		log.Debugf("Error while constructing dependency graph: %s\n",
-			err.Error())
-	} else {
-		log.Debugf("%s", DepGraphText(dg))
-	}
-
-	// Log reverse dependency graph.
-	rdg, err := revdepGraph(res.MasterSet)
-	if err != nil {
-		log.Debugf("Error while constructing reverse dependency graph: %s\n",
-			err.Error())
-	} else {
-		log.Debugf("%s", RevdepGraphText(rdg))
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/depgraph.go
----------------------------------------------------------------------
diff --git a/newt/builder/depgraph.go b/newt/builder/depgraph.go
deleted file mode 100644
index 6fc8a19..0000000
--- a/newt/builder/depgraph.go
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"bytes"
-	"fmt"
-
-	"mynewt.apache.org/newt/newt/resolve"
-)
-
-type DepGraph map[*resolve.ResolvePackage][]*resolve.ResolveDep
-type graphMap map[*resolve.ResolvePackage]map[*resolve.ResolveDep]struct{}
-
-func graphMapAdd(gm graphMap, p *resolve.ResolvePackage, c *resolve.ResolveDep) {
-	dstGraph := gm[p]
-	if dstGraph == nil {
-		dstGraph = map[*resolve.ResolveDep]struct{}{}
-	}
-	dstGraph[c] = struct{}{}
-
-	gm[p] = dstGraph
-}
-
-func graphMapToDepGraph(gm graphMap) DepGraph {
-	dg := DepGraph{}
-
-	for parent, childMap := range gm {
-		dg[parent] = []*resolve.ResolveDep{}
-		for child, _ := range childMap {
-			dg[parent] = append(dg[parent], child)
-		}
-		resolve.SortResolveDeps(dg[parent])
-	}
-
-	return dg
-}
-
-func depGraph(rs *resolve.ResolveSet) (DepGraph, error) {
-	graph := DepGraph{}
-
-	for _, parent := range rs.Rpkgs {
-		graph[parent] = []*resolve.ResolveDep{}
-
-		for _, dep := range parent.Deps {
-			graph[parent] = append(graph[parent], dep)
-		}
-
-		resolve.SortResolveDeps(graph[parent])
-	}
-
-	return graph, nil
-}
-
-func revdepGraph(rs *resolve.ResolveSet) (DepGraph, error) {
-	graph, err := depGraph(rs)
-	if err != nil {
-		return nil, err
-	}
-
-	revGm := graphMap{}
-	for parent, children := range graph {
-		for _, child := range children {
-			rParent := child.Rpkg
-			rChild := *child
-			rChild.Rpkg = parent
-
-			graphMapAdd(revGm, rParent, &rChild)
-		}
-	}
-
-	return graphMapToDepGraph(revGm), nil
-}
-
-func depString(dep *resolve.ResolveDep) string {
-	s := fmt.Sprintf("%s", dep.Rpkg.Lpkg.FullName())
-	if dep.Api != "" {
-		s += fmt.Sprintf("(api:%s)", dep.Api)
-	}
-
-	return s
-}
-
-func DepGraphText(graph DepGraph) string {
-	parents := make([]*resolve.ResolvePackage, 0, len(graph))
-	for lpkg, _ := range graph {
-		parents = append(parents, lpkg)
-	}
-	parents = resolve.SortResolvePkgs(parents)
-
-	buffer := bytes.NewBufferString("")
-
-	fmt.Fprintf(buffer, "Dependency graph (depender --> [dependees]):")
-	for _, parent := range parents {
-		children := resolve.SortResolveDeps(graph[parent])
-		fmt.Fprintf(buffer, "\n    * %s --> [", parent.Lpkg.FullName())
-		for i, child := range children {
-			if i != 0 {
-				fmt.Fprintf(buffer, " ")
-			}
-			fmt.Fprintf(buffer, "%s", depString(child))
-		}
-		fmt.Fprintf(buffer, "]")
-	}
-
-	return buffer.String()
-}
-
-func RevdepGraphText(graph DepGraph) string {
-	parents := make([]*resolve.ResolvePackage, 0, len(graph))
-	for lpkg, _ := range graph {
-		parents = append(parents, lpkg)
-	}
-	parents = resolve.SortResolvePkgs(parents)
-
-	buffer := bytes.NewBufferString("")
-
-	fmt.Fprintf(buffer, "Reverse dependency graph (dependee <-- [dependers]):")
-	for _, parent := range parents {
-		children := resolve.SortResolveDeps(graph[parent])
-		fmt.Fprintf(buffer, "\n    * %s <-- [", parent.Lpkg.FullName())
-		for i, child := range children {
-			if i != 0 {
-				fmt.Fprintf(buffer, " ")
-			}
-			fmt.Fprintf(buffer, "%s", depString(child))
-		}
-		fmt.Fprintf(buffer, "]")
-	}
-
-	return buffer.String()
-}
-
-// Extracts a new dependency graph containing only the specified parents.
-//
-// @param dg                    The source graph to filter.
-// @param parents               The parent nodes to keep.
-//
-// @return DepGraph             Filtered dependency graph.
-//         []*ResolvePackage    Specified packages that were not parents in
-//                                  original graph.
-func FilterDepGraph(dg DepGraph, parents []*resolve.ResolvePackage) (
-	DepGraph, []*resolve.ResolvePackage) {
-
-	newDg := DepGraph{}
-
-	var missing []*resolve.ResolvePackage
-	for _, p := range parents {
-		if dg[p] == nil {
-			missing = append(missing, p)
-		} else {
-			newDg[p] = dg[p]
-		}
-	}
-
-	return newDg, missing
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/library.go
----------------------------------------------------------------------
diff --git a/newt/builder/library.go b/newt/builder/library.go
deleted file mode 100644
index af3c5b8..0000000
--- a/newt/builder/library.go
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/* this file parses a library file for the build and returns
- * a list of all the symbols with their types and sizes */
-
-/* gets an objdump -t and parses into a symbolMap" */
-
-package builder
-
-import (
-	"bytes"
-	"path/filepath"
-	"regexp"
-	"strconv"
-
-	"mynewt.apache.org/newt/newt/symbol"
-	"mynewt.apache.org/newt/util"
-)
-
-/* This is a tricky thing to parse. Right now, I keep all the
- * flags together and just store the offset, size, name and flags.
-* 00012970 l       .bss	00000000 _end
-* 00011c60 l       .init_array	00000000 __init_array_start
-* 00011c60 l       .init_array	00000000 __preinit_array_start
-* 000084b0 g     F .text	00000034 os_arch_start
-* 00000000 g       .debug_aranges	00000000 __HeapBase
-* 00011c88 g     O .data	00000008 g_os_task_list
-* 000082cc g     F .text	0000004c os_idle_task
-* 000094e0 g     F .text	0000002e .hidden __gnu_uldivmod_helper
-* 00000000 g       .svc_table	00000000 SVC_Count
-* 000125e4 g     O .bss	00000004 g_console_is_init
-* 00009514 g     F .text	0000029c .hidden __divdi3
-* 000085a8 g     F .text	00000054 os_eventq_put
-* 00000100       O *COM*	00000004 g_idle_task_stack
-
-*/
-func parseObjectLine(line string, r *regexp.Regexp) (error, *symbol.SymbolInfo) {
-
-	answer := r.FindAllStringSubmatch(line, 11)
-
-	if len(answer) == 0 {
-		return nil, nil
-	}
-
-	data := answer[0]
-
-	if len(data) != 6 {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Not enough content in object file line --- %s", line)
-		return nil, nil
-	}
-
-	si := symbol.NewSymbolInfo()
-
-	si.Name = data[5]
-
-	v, err := strconv.ParseUint(data[1], 16, 32)
-
-	if err != nil {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Could not convert location from object file line --- %s", line)
-		return nil, nil
-	}
-
-	si.Loc = int(v)
-
-	v, err = strconv.ParseUint(data[4], 16, 32)
-
-	if err != nil {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Could not convert size form object file line --- %s", line)
-		return nil, nil
-	}
-
-	si.Size = int(v)
-	si.Code = data[2]
-	si.Section = data[3]
-
-	/*  Common section has length in a different spot. Also, these
-	 * are really global variables so mark them as such */
-	if si.IsSection("*COM*") {
-		si.Size = (*si).Loc
-		si.Code = "g" + si.Code[1:]
-	}
-
-	return nil, si
-}
-
-func getParseRexeg() (error, *regexp.Regexp) {
-	r, err := regexp.Compile("^([0-9A-Fa-f]+)[\t ]+([lgu! ][w ][C ][W ][Ii ][Dd ][FfO ])[\t ]+([^\t\n\f\r ]+)[\t ]+([0-9a-fA-F]+)[\t ]([^\t\n\f\r ]+)")
-
-	if err != nil {
-		return err, nil
-	}
-
-	return nil, r
-}
-
-func (b *Builder) ParseObjectLibrary(bp *BuildPackage) (
-	error, *symbol.SymbolMap) {
-
-	file := b.ArchivePath(bp)
-	return b.ParseObjectLibraryFile(bp, file, true)
-}
-
-func (b *Builder) ParseObjectElf(elf_file string) (error, *symbol.SymbolMap) {
-	return b.ParseObjectLibraryFile(nil, elf_file, false)
-}
-
-func (b *Builder) ParseObjectLibraryFile(bp *BuildPackage,
-	file string, textDataOnly bool) (error, *symbol.SymbolMap) {
-
-	c, err := b.targetBuilder.NewCompiler(b.AppElfPath())
-
-	ext := filepath.Ext(file)
-
-	if err != nil {
-		return err, nil
-	}
-
-	err, out := c.ParseLibrary(file)
-
-	if err != nil {
-		return err, nil
-	}
-
-	sm := symbol.NewSymbolMap()
-
-	buffer := bytes.NewBuffer(out)
-
-	err, r := getParseRexeg()
-
-	if err != nil {
-		return err, nil
-	}
-
-	for {
-		line, err := buffer.ReadString('\n')
-		if err != nil {
-			break
-		}
-		err, si := parseObjectLine(line, r)
-
-		if err == nil && si != nil {
-
-			/* assign the library */
-			if bp != nil {
-				(*si).Bpkg = bp.rpkg.Lpkg.Name()
-			} else {
-				(*si).Bpkg = "elf"
-			}
-
-			/*  discard undefined */
-			if (*si).IsSection("*UND*") {
-				continue
-			}
-
-			/* discard debug symbols */
-			if (*si).IsDebug() {
-				continue
-			}
-
-			if (*si).IsFile() {
-				continue
-			}
-
-			/* if we are looking for text and data only, do a special check */
-			if textDataOnly {
-				include := (*si).IsSection(".bss") ||
-					(*si).IsSection(".text") ||
-					(*si).IsSection(".data") ||
-					(*si).IsSection("*COM*") ||
-					(*si).IsSection(".rodata")
-
-				if !include {
-					continue
-				}
-			}
-
-			/* add the symbol to the map */
-			(*si).Ext = ext
-			sm.Add(*si)
-			util.StatusMessage(util.VERBOSITY_VERBOSE,
-				"Keeping Symbol %s in package %s\n", (*si).Name, (*si).Bpkg)
-		}
-	}
-
-	return nil, sm
-}
-
-func (b *Builder) CopySymbols(sm *symbol.SymbolMap) error {
-	c, err := b.targetBuilder.NewCompiler(b.AppElfPath())
-
-	if err != nil {
-		return err
-	}
-
-	err = c.CopySymbols(b.AppElfPath(), b.AppLinkerElfPath(), sm)
-
-	return err
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/load.go
----------------------------------------------------------------------
diff --git a/newt/builder/load.go b/newt/builder/load.go
deleted file mode 100644
index eb7396e..0000000
--- a/newt/builder/load.go
+++ /dev/null
@@ -1,214 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"fmt"
-	"os"
-	"sort"
-	"strconv"
-	"strings"
-
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/util"
-)
-
-func (t *TargetBuilder) Load(extraJtagCmd string) error {
-
-	err := t.PrepBuild()
-
-	if err != nil {
-		return err
-	}
-
-	if t.LoaderBuilder != nil {
-		err = t.AppBuilder.Load(1, extraJtagCmd)
-		if err == nil {
-			err = t.LoaderBuilder.Load(0, extraJtagCmd)
-		}
-	} else {
-		err = t.AppBuilder.Load(0, extraJtagCmd)
-	}
-
-	return err
-}
-
-func Load(binBaseName string, bspPkg *pkg.BspPackage,
-	extraEnvSettings map[string]string) error {
-
-	if bspPkg.DownloadScript == "" {
-		return nil
-	}
-
-	bspPath := bspPkg.BasePath()
-
-	sortedKeys := make([]string, 0, len(extraEnvSettings))
-	for k, _ := range extraEnvSettings {
-		sortedKeys = append(sortedKeys, k)
-	}
-	sort.Strings(sortedKeys)
-
-	env := []string{}
-	for _, key := range sortedKeys {
-		env = append(env, fmt.Sprintf("%s=%s", key, extraEnvSettings[key]))
-	}
-
-	coreRepo := project.GetProject().FindRepo("apache-mynewt-core")
-	env = append(env, fmt.Sprintf("CORE_PATH=%s", coreRepo.Path()))
-	env = append(env, fmt.Sprintf("BSP_PATH=%s", bspPath))
-	env = append(env, fmt.Sprintf("BIN_BASENAME=%s", binBaseName))
-
-	// bspPath, binBaseName are passed in command line for backwards
-	// compatibility
-	cmd := []string{
-		bspPkg.DownloadScript,
-		bspPath,
-		binBaseName,
-	}
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Load command: %s\n",
-		strings.Join(cmd, " "))
-	if _, err := util.ShellCommand(cmd, env); err != nil {
-		return err
-	}
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Successfully loaded image.\n")
-
-	return nil
-}
-
-func (b *Builder) Load(imageSlot int, extraJtagCmd string) error {
-	if b.appPkg == nil {
-		return util.NewNewtError("app package not specified")
-	}
-
-	/* Populate the package list and feature sets. */
-	err := b.targetBuilder.PrepBuild()
-	if err != nil {
-		return err
-	}
-
-	envSettings := map[string]string{
-		"IMAGE_SLOT": strconv.Itoa(imageSlot),
-		"FEATURES":   b.FeatureString(),
-	}
-	if extraJtagCmd != "" {
-		envSettings["EXTRA_JTAG_CMD"] = extraJtagCmd
-	}
-	features := b.cfg.Features()
-
-	var flashTargetArea string
-	if _, ok := features["BOOT_LOADER"]; ok {
-		envSettings["BOOT_LOADER"] = "1"
-
-		flashTargetArea = "FLASH_AREA_BOOTLOADER"
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Loading bootloader\n")
-	} else {
-		if imageSlot == 0 {
-			flashTargetArea = "FLASH_AREA_IMAGE_0"
-		} else if imageSlot == 1 {
-			flashTargetArea = "FLASH_AREA_IMAGE_1"
-		}
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Loading %s image into slot %d\n", b.buildName, imageSlot+1)
-	}
-
-	bspPkg := b.targetBuilder.bspPkg
-	tgtArea := bspPkg.FlashMap.Areas[flashTargetArea]
-	if tgtArea.Name == "" {
-		return util.NewNewtError(fmt.Sprintf("No flash target area %s\n",
-			flashTargetArea))
-	}
-	envSettings["FLASH_OFFSET"] = "0x" + strconv.FormatInt(int64(tgtArea.Offset), 16)
-
-	if err := Load(b.AppBinBasePath(), b.targetBuilder.bspPkg,
-		envSettings); err != nil {
-
-		return err
-	}
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Successfully loaded image.\n")
-
-	return nil
-}
-
-func (t *TargetBuilder) Debug(extraJtagCmd string, reset bool, noGDB bool) error {
-	if err := t.PrepBuild(); err != nil {
-		return err
-	}
-
-	if t.LoaderBuilder == nil {
-		return t.AppBuilder.Debug(extraJtagCmd, reset, noGDB)
-	}
-	return t.LoaderBuilder.Debug(extraJtagCmd, reset, noGDB)
-}
-
-func (b *Builder) debugBin(binPath string, extraJtagCmd string, reset bool,
-	noGDB bool) error {
-	/*
-	 * Populate the package list and feature sets.
-	 */
-	err := b.targetBuilder.PrepBuild()
-	if err != nil {
-		return err
-	}
-
-	bspPath := b.bspPkg.rpkg.Lpkg.BasePath()
-	binBaseName := binPath
-	featureString := b.FeatureString()
-
-	coreRepo := project.GetProject().FindRepo("apache-mynewt-core")
-	envSettings := []string{
-		fmt.Sprintf("CORE_PATH=%s", coreRepo.Path()),
-		fmt.Sprintf("BSP_PATH=%s", bspPath),
-		fmt.Sprintf("BIN_BASENAME=%s", binBaseName),
-		fmt.Sprintf("FEATURES=%s", featureString),
-	}
-	if extraJtagCmd != "" {
-		envSettings = append(envSettings,
-			fmt.Sprintf("EXTRA_JTAG_CMD=%s", extraJtagCmd))
-	}
-	if reset == true {
-		envSettings = append(envSettings, fmt.Sprintf("RESET=true"))
-	}
-	if noGDB == true {
-		envSettings = append(envSettings, fmt.Sprintf("NO_GDB=1"))
-	}
-
-	os.Chdir(project.GetProject().Path())
-
-	// bspPath, binBaseName are passed in command line for backwards
-	// compatibility
-	cmdLine := []string{
-		b.targetBuilder.bspPkg.DebugScript, bspPath, binBaseName,
-	}
-
-	fmt.Printf("%s\n", cmdLine)
-	return util.ShellInteractiveCommand(cmdLine, envSettings)
-}
-
-func (b *Builder) Debug(extraJtagCmd string, reset bool, noGDB bool) error {
-	if b.appPkg == nil {
-		return util.NewNewtError("app package not specified")
-	}
-
-	return b.debugBin(b.AppBinBasePath(), extraJtagCmd, reset, noGDB)
-}


[16/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
deleted file mode 100644
index 4994437..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go
+++ /dev/null
@@ -1,1702 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,netbsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_ARP                            = 0x1c
-	AF_BLUETOOTH                      = 0x1f
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1a
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x20
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x18
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1a
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x23
-	AF_MPLS                           = 0x21
-	AF_NATM                           = 0x1b
-	AF_NS                             = 0x6
-	AF_OROUTE                         = 0x11
-	AF_OSI                            = 0x7
-	AF_PUP                            = 0x4
-	AF_ROUTE                          = 0x22
-	AF_SNA                            = 0xb
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	ARPHRD_ARCNET                     = 0x7
-	ARPHRD_ETHER                      = 0x1
-	ARPHRD_FRELAY                     = 0xf
-	ARPHRD_IEEE1394                   = 0x18
-	ARPHRD_IEEE802                    = 0x6
-	ARPHRD_STRIP                      = 0x17
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B460800                           = 0x70800
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B921600                           = 0xe1000
-	B9600                             = 0x2580
-	BIOCFEEDBACK                      = 0x8004427d
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc0104277
-	BIOCGETIF                         = 0x4090426b
-	BIOCGFEEDBACK                     = 0x4004427c
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRTIMEOUT                     = 0x4010427b
-	BIOCGSEESENT                      = 0x40044278
-	BIOCGSTATS                        = 0x4080426f
-	BIOCGSTATSOLD                     = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDLT                          = 0x80044276
-	BIOCSETF                          = 0x80104267
-	BIOCSETIF                         = 0x8090426c
-	BIOCSFEEDBACK                     = 0x8004427d
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRTIMEOUT                     = 0x8010427a
-	BIOCSSEESENT                      = 0x80044279
-	BIOCSTCPF                         = 0x80104272
-	BIOCSUDPF                         = 0x80104273
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x8
-	BPF_ALIGNMENT32                   = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DFLTBUFSIZE                   = 0x100000
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x1000000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CLONE_CSIGNAL                     = 0xff
-	CLONE_FILES                       = 0x400
-	CLONE_FS                          = 0x200
-	CLONE_PID                         = 0x1000
-	CLONE_PTRACE                      = 0x2000
-	CLONE_SIGHAND                     = 0x800
-	CLONE_VFORK                       = 0x4000
-	CLONE_VM                          = 0x100
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	CTL_QUERY                         = -0x2
-	DIOCBSFLUSH                       = 0x20006478
-	DLT_A429                          = 0xb8
-	DLT_A653_ICM                      = 0xb9
-	DLT_AIRONET_HEADER                = 0x78
-	DLT_AOS                           = 0xde
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ARCNET_LINUX                  = 0x81
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AURORA                        = 0x7e
-	DLT_AX25                          = 0x3
-	DLT_AX25_KISS                     = 0xca
-	DLT_BACNET_MS_TP                  = 0xa5
-	DLT_BLUETOOTH_HCI_H4              = 0xbb
-	DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-	DLT_CAN20B                        = 0xbe
-	DLT_CAN_SOCKETCAN                 = 0xe3
-	DLT_CHAOS                         = 0x5
-	DLT_CISCO_IOS                     = 0x76
-	DLT_C_HDLC                        = 0x68
-	DLT_C_HDLC_WITH_DIR               = 0xcd
-	DLT_DECT                          = 0xdd
-	DLT_DOCSIS                        = 0x8f
-	DLT_ECONET                        = 0x73
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0x6d
-	DLT_ERF                           = 0xc5
-	DLT_ERF_ETH                       = 0xaf
-	DLT_ERF_POS                       = 0xb0
-	DLT_FC_2                          = 0xe0
-	DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-	DLT_FDDI                          = 0xa
-	DLT_FLEXRAY                       = 0xd2
-	DLT_FRELAY                        = 0x6b
-	DLT_FRELAY_WITH_DIR               = 0xce
-	DLT_GCOM_SERIAL                   = 0xad
-	DLT_GCOM_T1E1                     = 0xac
-	DLT_GPF_F                         = 0xab
-	DLT_GPF_T                         = 0xaa
-	DLT_GPRS_LLC                      = 0xa9
-	DLT_GSMTAP_ABIS                   = 0xda
-	DLT_GSMTAP_UM                     = 0xd9
-	DLT_HDLC                          = 0x10
-	DLT_HHDLC                         = 0x79
-	DLT_HIPPI                         = 0xf
-	DLT_IBM_SN                        = 0x92
-	DLT_IBM_SP                        = 0x91
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_IEEE802_15_4                  = 0xc3
-	DLT_IEEE802_15_4_LINUX            = 0xbf
-	DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-	DLT_IEEE802_16_MAC_CPS            = 0xbc
-	DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-	DLT_IPMB                          = 0xc7
-	DLT_IPMB_LINUX                    = 0xd1
-	DLT_IPNET                         = 0xe2
-	DLT_IPV4                          = 0xe4
-	DLT_IPV6                          = 0xe5
-	DLT_IP_OVER_FC                    = 0x7a
-	DLT_JUNIPER_ATM1                  = 0x89
-	DLT_JUNIPER_ATM2                  = 0x87
-	DLT_JUNIPER_CHDLC                 = 0xb5
-	DLT_JUNIPER_ES                    = 0x84
-	DLT_JUNIPER_ETHER                 = 0xb2
-	DLT_JUNIPER_FRELAY                = 0xb4
-	DLT_JUNIPER_GGSN                  = 0x85
-	DLT_JUNIPER_ISM                   = 0xc2
-	DLT_JUNIPER_MFR                   = 0x86
-	DLT_JUNIPER_MLFR                  = 0x83
-	DLT_JUNIPER_MLPPP                 = 0x82
-	DLT_JUNIPER_MONITOR               = 0xa4
-	DLT_JUNIPER_PIC_PEER              = 0xae
-	DLT_JUNIPER_PPP                   = 0xb3
-	DLT_JUNIPER_PPPOE                 = 0xa7
-	DLT_JUNIPER_PPPOE_ATM             = 0xa8
-	DLT_JUNIPER_SERVICES              = 0x88
-	DLT_JUNIPER_ST                    = 0xc8
-	DLT_JUNIPER_VP                    = 0xb7
-	DLT_LAPB_WITH_DIR                 = 0xcf
-	DLT_LAPD                          = 0xcb
-	DLT_LIN                           = 0xd4
-	DLT_LINUX_EVDEV                   = 0xd8
-	DLT_LINUX_IRDA                    = 0x90
-	DLT_LINUX_LAPD                    = 0xb1
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_LTALK                         = 0x72
-	DLT_MFR                           = 0xb6
-	DLT_MOST                          = 0xd3
-	DLT_MPLS                          = 0xdb
-	DLT_MTP2                          = 0x8c
-	DLT_MTP2_WITH_PHDR                = 0x8b
-	DLT_MTP3                          = 0x8d
-	DLT_NULL                          = 0x0
-	DLT_PCI_EXP                       = 0x7d
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPI                           = 0xc0
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0xe
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_PPPD                      = 0xa6
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PPP_WITH_DIR                  = 0xcc
-	DLT_PRISM_HEADER                  = 0x77
-	DLT_PRONET                        = 0x4
-	DLT_RAIF1                         = 0xc6
-	DLT_RAW                           = 0xc
-	DLT_RAWAF_MASK                    = 0x2240000
-	DLT_RIO                           = 0x7c
-	DLT_SCCP                          = 0x8e
-	DLT_SITA                          = 0xc4
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xd
-	DLT_SUNATM                        = 0x7b
-	DLT_SYMANTEC_FIREWALL             = 0x63
-	DLT_TZSP                          = 0x80
-	DLT_USB                           = 0xba
-	DLT_USB_LINUX                     = 0xbd
-	DLT_USB_LINUX_MMAPPED             = 0xdc
-	DLT_WIHART                        = 0xdf
-	DLT_X2E_SERIAL                    = 0xd5
-	DLT_X2E_XORAYA                    = 0xd6
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EMUL_LINUX                        = 0x1
-	EMUL_LINUX32                      = 0x5
-	EMUL_MAXID                        = 0x6
-	ETHERCAP_JUMBO_MTU                = 0x4
-	ETHERCAP_VLAN_HWTAGGING           = 0x2
-	ETHERCAP_VLAN_MTU                 = 0x1
-	ETHERMIN                          = 0x2e
-	ETHERMTU                          = 0x5dc
-	ETHERMTU_JUMBO                    = 0x2328
-	ETHERTYPE_8023                    = 0x4
-	ETHERTYPE_AARP                    = 0x80f3
-	ETHERTYPE_ACCTON                  = 0x8390
-	ETHERTYPE_AEONIC                  = 0x8036
-	ETHERTYPE_ALPHA                   = 0x814a
-	ETHERTYPE_AMBER                   = 0x6008
-	ETHERTYPE_AMOEBA                  = 0x8145
-	ETHERTYPE_APOLLO                  = 0x80f7
-	ETHERTYPE_APOLLODOMAIN            = 0x8019
-	ETHERTYPE_APPLETALK               = 0x809b
-	ETHERTYPE_APPLITEK                = 0x80c7
-	ETHERTYPE_ARGONAUT                = 0x803a
-	ETHERTYPE_ARP                     = 0x806
-	ETHERTYPE_AT                      = 0x809b
-	ETHERTYPE_ATALK                   = 0x809b
-	ETHERTYPE_ATOMIC                  = 0x86df
-	ETHERTYPE_ATT                     = 0x8069
-	ETHERTYPE_ATTSTANFORD             = 0x8008
-	ETHERTYPE_AUTOPHON                = 0x806a
-	ETHERTYPE_AXIS                    = 0x8856
-	ETHERTYPE_BCLOOP                  = 0x9003
-	ETHERTYPE_BOFL                    = 0x8102
-	ETHERTYPE_CABLETRON               = 0x7034
-	ETHERTYPE_CHAOS                   = 0x804
-	ETHERTYPE_COMDESIGN               = 0x806c
-	ETHERTYPE_COMPUGRAPHIC            = 0x806d
-	ETHERTYPE_COUNTERPOINT            = 0x8062
-	ETHERTYPE_CRONUS                  = 0x8004
-	ETHERTYPE_CRONUSVLN               = 0x8003
-	ETHERTYPE_DCA                     = 0x1234
-	ETHERTYPE_DDE                     = 0x807b
-	ETHERTYPE_DEBNI                   = 0xaaaa
-	ETHERTYPE_DECAM                   = 0x8048
-	ETHERTYPE_DECCUST                 = 0x6006
-	ETHERTYPE_DECDIAG                 = 0x6005
-	ETHERTYPE_DECDNS                  = 0x803c
-	ETHERTYPE_DECDTS                  = 0x803e
-	ETHERTYPE_DECEXPER                = 0x6000
-	ETHERTYPE_DECLAST                 = 0x8041
-	ETHERTYPE_DECLTM                  = 0x803f
-	ETHERTYPE_DECMUMPS                = 0x6009
-	ETHERTYPE_DECNETBIOS              = 0x8040
-	ETHERTYPE_DELTACON                = 0x86de
-	ETHERTYPE_DIDDLE                  = 0x4321
-	ETHERTYPE_DLOG1                   = 0x660
-	ETHERTYPE_DLOG2                   = 0x661
-	ETHERTYPE_DN                      = 0x6003
-	ETHERTYPE_DOGFIGHT                = 0x1989
-	ETHERTYPE_DSMD                    = 0x8039
-	ETHERTYPE_ECMA                    = 0x803
-	ETHERTYPE_ENCRYPT                 = 0x803d
-	ETHERTYPE_ES                      = 0x805d
-	ETHERTYPE_EXCELAN                 = 0x8010
-	ETHERTYPE_EXPERDATA               = 0x8049
-	ETHERTYPE_FLIP                    = 0x8146
-	ETHERTYPE_FLOWCONTROL             = 0x8808
-	ETHERTYPE_FRARP                   = 0x808
-	ETHERTYPE_GENDYN                  = 0x8068
-	ETHERTYPE_HAYES                   = 0x8130
-	ETHERTYPE_HIPPI_FP                = 0x8180
-	ETHERTYPE_HITACHI                 = 0x8820
-	ETHERTYPE_HP                      = 0x8005
-	ETHERTYPE_IEEEPUP                 = 0xa00
-	ETHERTYPE_IEEEPUPAT               = 0xa01
-	ETHERTYPE_IMLBL                   = 0x4c42
-	ETHERTYPE_IMLBLDIAG               = 0x424c
-	ETHERTYPE_IP                      = 0x800
-	ETHERTYPE_IPAS                    = 0x876c
-	ETHERTYPE_IPV6                    = 0x86dd
-	ETHERTYPE_IPX                     = 0x8137
-	ETHERTYPE_IPXNEW                  = 0x8037
-	ETHERTYPE_KALPANA                 = 0x8582
-	ETHERTYPE_LANBRIDGE               = 0x8038
-	ETHERTYPE_LANPROBE                = 0x8888
-	ETHERTYPE_LAT                     = 0x6004
-	ETHERTYPE_LBACK                   = 0x9000
-	ETHERTYPE_LITTLE                  = 0x8060
-	ETHERTYPE_LOGICRAFT               = 0x8148
-	ETHERTYPE_LOOPBACK                = 0x9000
-	ETHERTYPE_MATRA                   = 0x807a
-	ETHERTYPE_MAX                     = 0xffff
-	ETHERTYPE_MERIT                   = 0x807c
-	ETHERTYPE_MICP                    = 0x873a
-	ETHERTYPE_MOPDL                   = 0x6001
-	ETHERTYPE_MOPRC                   = 0x6002
-	ETHERTYPE_MOTOROLA                = 0x818d
-	ETHERTYPE_MPLS                    = 0x8847
-	ETHERTYPE_MPLS_MCAST              = 0x8848
-	ETHERTYPE_MUMPS                   = 0x813f
-	ETHERTYPE_NBPCC                   = 0x3c04
-	ETHERTYPE_NBPCLAIM                = 0x3c09
-	ETHERTYPE_NBPCLREQ                = 0x3c05
-	ETHERTYPE_NBPCLRSP                = 0x3c06
-	ETHERTYPE_NBPCREQ                 = 0x3c02
-	ETHERTYPE_NBPCRSP                 = 0x3c03
-	ETHERTYPE_NBPDG                   = 0x3c07
-	ETHERTYPE_NBPDGB                  = 0x3c08
-	ETHERTYPE_NBPDLTE                 = 0x3c0a
-	ETHERTYPE_NBPRAR                  = 0x3c0c
-	ETHERTYPE_NBPRAS                  = 0x3c0b
-	ETHERTYPE_NBPRST                  = 0x3c0d
-	ETHERTYPE_NBPSCD                  = 0x3c01
-	ETHERTYPE_NBPVCD                  = 0x3c00
-	ETHERTYPE_NBS                     = 0x802
-	ETHERTYPE_NCD                     = 0x8149
-	ETHERTYPE_NESTAR                  = 0x8006
-	ETHERTYPE_NETBEUI                 = 0x8191
-	ETHERTYPE_NOVELL                  = 0x8138
-	ETHERTYPE_NS                      = 0x600
-	ETHERTYPE_NSAT                    = 0x601
-	ETHERTYPE_NSCOMPAT                = 0x807
-	ETHERTYPE_NTRAILER                = 0x10
-	ETHERTYPE_OS9                     = 0x7007
-	ETHERTYPE_OS9NET                  = 0x7009
-	ETHERTYPE_PACER                   = 0x80c6
-	ETHERTYPE_PAE                     = 0x888e
-	ETHERTYPE_PCS                     = 0x4242
-	ETHERTYPE_PLANNING                = 0x8044
-	ETHERTYPE_PPP                     = 0x880b
-	ETHERTYPE_PPPOE                   = 0x8864
-	ETHERTYPE_PPPOEDISC               = 0x8863
-	ETHERTYPE_PRIMENTS                = 0x7031
-	ETHERTYPE_PUP                     = 0x200
-	ETHERTYPE_PUPAT                   = 0x200
-	ETHERTYPE_RACAL                   = 0x7030
-	ETHERTYPE_RATIONAL                = 0x8150
-	ETHERTYPE_RAWFR                   = 0x6559
-	ETHERTYPE_RCL                     = 0x1995
-	ETHERTYPE_RDP                     = 0x8739
-	ETHERTYPE_RETIX                   = 0x80f2
-	ETHERTYPE_REVARP                  = 0x8035
-	ETHERTYPE_SCA                     = 0x6007
-	ETHERTYPE_SECTRA                  = 0x86db
-	ETHERTYPE_SECUREDATA              = 0x876d
-	ETHERTYPE_SGITW                   = 0x817e
-	ETHERTYPE_SG_BOUNCE               = 0x8016
-	ETHERTYPE_SG_DIAG                 = 0x8013
-	ETHERTYPE_SG_NETGAMES             = 0x8014
-	ETHERTYPE_SG_RESV                 = 0x8015
-	ETHERTYPE_SIMNET                  = 0x5208
-	ETHERTYPE_SLOWPROTOCOLS           = 0x8809
-	ETHERTYPE_SNA                     = 0x80d5
-	ETHERTYPE_SNMP                    = 0x814c
-	ETHERTYPE_SONIX                   = 0xfaf5
-	ETHERTYPE_SPIDER                  = 0x809f
-	ETHERTYPE_SPRITE                  = 0x500
-	ETHERTYPE_STP                     = 0x8181
-	ETHERTYPE_TALARIS                 = 0x812b
-	ETHERTYPE_TALARISMC               = 0x852b
-	ETHERTYPE_TCPCOMP                 = 0x876b
-	ETHERTYPE_TCPSM                   = 0x9002
-	ETHERTYPE_TEC                     = 0x814f
-	ETHERTYPE_TIGAN                   = 0x802f
-	ETHERTYPE_TRAIL                   = 0x1000
-	ETHERTYPE_TRANSETHER              = 0x6558
-	ETHERTYPE_TYMSHARE                = 0x802e
-	ETHERTYPE_UBBST                   = 0x7005
-	ETHERTYPE_UBDEBUG                 = 0x900
-	ETHERTYPE_UBDIAGLOOP              = 0x7002
-	ETHERTYPE_UBDL                    = 0x7000
-	ETHERTYPE_UBNIU                   = 0x7001
-	ETHERTYPE_UBNMC                   = 0x7003
-	ETHERTYPE_VALID                   = 0x1600
-	ETHERTYPE_VARIAN                  = 0x80dd
-	ETHERTYPE_VAXELN                  = 0x803b
-	ETHERTYPE_VEECO                   = 0x8067
-	ETHERTYPE_VEXP                    = 0x805b
-	ETHERTYPE_VGLAB                   = 0x8131
-	ETHERTYPE_VINES                   = 0xbad
-	ETHERTYPE_VINESECHO               = 0xbaf
-	ETHERTYPE_VINESLOOP               = 0xbae
-	ETHERTYPE_VITAL                   = 0xff00
-	ETHERTYPE_VLAN                    = 0x8100
-	ETHERTYPE_VLTLMAN                 = 0x8080
-	ETHERTYPE_VPROD                   = 0x805c
-	ETHERTYPE_VURESERVED              = 0x8147
-	ETHERTYPE_WATERLOO                = 0x8130
-	ETHERTYPE_WELLFLEET               = 0x8103
-	ETHERTYPE_X25                     = 0x805
-	ETHERTYPE_X75                     = 0x801
-	ETHERTYPE_XNSSM                   = 0x9001
-	ETHERTYPE_XTP                     = 0x817d
-	ETHER_ADDR_LEN                    = 0x6
-	ETHER_CRC_LEN                     = 0x4
-	ETHER_CRC_POLY_BE                 = 0x4c11db6
-	ETHER_CRC_POLY_LE                 = 0xedb88320
-	ETHER_HDR_LEN                     = 0xe
-	ETHER_MAX_LEN                     = 0x5ee
-	ETHER_MAX_LEN_JUMBO               = 0x233a
-	ETHER_MIN_LEN                     = 0x40
-	ETHER_PPPOE_ENCAP_LEN             = 0x8
-	ETHER_TYPE_LEN                    = 0x2
-	ETHER_VLAN_ENCAP_LEN              = 0x4
-	EVFILT_AIO                        = 0x2
-	EVFILT_PROC                       = 0x4
-	EVFILT_READ                       = 0x0
-	EVFILT_SIGNAL                     = 0x5
-	EVFILT_SYSCOUNT                   = 0x7
-	EVFILT_TIMER                      = 0x6
-	EVFILT_VNODE                      = 0x3
-	EVFILT_WRITE                      = 0x1
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x100
-	FLUSHO                            = 0x800000
-	F_CLOSEM                          = 0xa
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0xc
-	F_FSCTL                           = -0x80000000
-	F_FSDIRMASK                       = 0x70000000
-	F_FSIN                            = 0x10000000
-	F_FSINOUT                         = 0x30000000
-	F_FSOUT                           = 0x20000000
-	F_FSPRIV                          = 0x8000
-	F_FSVOID                          = 0x40000000
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETNOSIGPIPE                    = 0xd
-	F_GETOWN                          = 0x5
-	F_MAXFD                           = 0xb
-	F_OK                              = 0x0
-	F_PARAM_MASK                      = 0xfff
-	F_PARAM_MAX                       = 0xfff
-	F_RDLCK                           = 0x1
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETNOSIGPIPE                    = 0xe
-	F_SETOWN                          = 0x6
-	F_UNLCK                           = 0x2
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFAN_ARRIVAL                      = 0x0
-	IFAN_DEPARTURE                    = 0x1
-	IFA_ROUTE                         = 0x1
-	IFF_ALLMULTI                      = 0x200
-	IFF_BROADCAST                     = 0x2
-	IFF_CANTCHANGE                    = 0x8f52
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_A12MPPSWITCH                  = 0x82
-	IFT_AAL2                          = 0xbb
-	IFT_AAL5                          = 0x31
-	IFT_ADSL                          = 0x5e
-	IFT_AFLANE8023                    = 0x3b
-	IFT_AFLANE8025                    = 0x3c
-	IFT_ARAP                          = 0x58
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ASYNC                         = 0x54
-	IFT_ATM                           = 0x25
-	IFT_ATMDXI                        = 0x69
-	IFT_ATMFUNI                       = 0x6a
-	IFT_ATMIMA                        = 0x6b
-	IFT_ATMLOGICAL                    = 0x50
-	IFT_ATMRADIO                      = 0xbd
-	IFT_ATMSUBINTERFACE               = 0x86
-	IFT_ATMVCIENDPT                   = 0xc2
-	IFT_ATMVIRTUAL                    = 0x95
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
-	IFT_BRIDGE                        = 0xd1
-	IFT_BSC                           = 0x53
-	IFT_CARP                          = 0xf8
-	IFT_CCTEMUL                       = 0x3d
-	IFT_CEPT                          = 0x13
-	IFT_CES                           = 0x85
-	IFT_CHANNEL                       = 0x46
-	IFT_CNR                           = 0x55
-	IFT_COFFEE                        = 0x84
-	IFT_COMPOSITELINK                 = 0x9b
-	IFT_DCN                           = 0x8d
-	IFT_DIGITALPOWERLINE              = 0x8a
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-	IFT_DLSW                          = 0x4a
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
-	IFT_DOCSCABLEMACLAYER             = 0x7f
-	IFT_DOCSCABLEUPSTREAM             = 0x81
-	IFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd
-	IFT_DS0                           = 0x51
-	IFT_DS0BUNDLE                     = 0x52
-	IFT_DS1FDL                        = 0xaa
-	IFT_DS3                           = 0x1e
-	IFT_DTM                           = 0x8c
-	IFT_DVBASILN                      = 0xac
-	IFT_DVBASIOUT                     = 0xad
-	IFT_DVBRCCDOWNSTREAM              = 0x93
-	IFT_DVBRCCMACLAYER                = 0x92
-	IFT_DVBRCCUPSTREAM                = 0x94
-	IFT_ECONET                        = 0xce
-	IFT_EON                           = 0x19
-	IFT_EPLRS                         = 0x57
-	IFT_ESCON                         = 0x49
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0xf2
-	IFT_FAST                          = 0x7d
-	IFT_FASTETHER                     = 0x3e
-	IFT_FASTETHERFX                   = 0x45
-	IFT_FDDI                          = 0xf
-	IFT_FIBRECHANNEL                  = 0x38
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
-	IFT_FRAMERELAYMPI                 = 0x5c
-	IFT_FRDLCIENDPT                   = 0xc1
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_FRF16MFRBUNDLE                = 0xa3
-	IFT_FRFORWARD                     = 0x9e
-	IFT_G703AT2MB                     = 0x43
-	IFT_G703AT64K                     = 0x42
-	IFT_GIF                           = 0xf0
-	IFT_GIGABITETHERNET               = 0x75
-	IFT_GR303IDT                      = 0xb2
-	IFT_GR303RDT                      = 0xb1
-	IFT_H323GATEKEEPER                = 0xa4
-	IFT_H323PROXY                     = 0xa5
-	IFT_HDH1822                       = 0x3
-	IFT_HDLC                          = 0x76
-	IFT_HDSL2                         = 0xa8
-	IFT_HIPERLAN2                     = 0xb7
-	IFT_HIPPI                         = 0x2f
-	IFT_HIPPIINTERFACE                = 0x39
-	IFT_HOSTPAD                       = 0x5a
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IBM370PARCHAN                 = 0x48
-	IFT_IDSL                          = 0x9a
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE80211                     = 0x47
-	IFT_IEEE80212                     = 0x37
-	IFT_IEEE8023ADLAG                 = 0xa1
-	IFT_IFGSN                         = 0x91
-	IFT_IMT                           = 0xbe
-	IFT_INFINIBAND                    = 0xc7
-	IFT_INTERLEAVE                    = 0x7c
-	IFT_IP                            = 0x7e
-	IFT_IPFORWARD                     = 0x8e
-	IFT_IPOVERATM                     = 0x72
-	IFT_IPOVERCDLC                    = 0x6d
-	IFT_IPOVERCLAW                    = 0x6e
-	IFT_IPSWITCH                      = 0x4e
-	IFT_ISDN                          = 0x3f
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISDNS                         = 0x4b
-	IFT_ISDNU                         = 0x4c
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88025CRFPINT               = 0x62
-	IFT_ISO88025DTR                   = 0x56
-	IFT_ISO88025FIBER                 = 0x73
-	IFT_ISO88026                      = 0xa
-	IFT_ISUP                          = 0xb3
-	IFT_L2VLAN                        = 0x87
-	IFT_L3IPVLAN                      = 0x88
-	IFT_L3IPXVLAN                     = 0x89
-	IFT_LAPB                          = 0x10
-	IFT_LAPD                          = 0x4d
-	IFT_LAPF                          = 0x77
-	IFT_LINEGROUP                     = 0xd2
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MEDIAMAILOVERIP               = 0x8b
-	IFT_MFSIGLINK                     = 0xa7
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_MPC                           = 0x71
-	IFT_MPLS                          = 0xa6
-	IFT_MPLSTUNNEL                    = 0x96
-	IFT_MSDSL                         = 0x8f
-	IFT_MVL                           = 0xbf
-	IFT_MYRINET                       = 0x63
-	IFT_NFAS                          = 0xaf
-	IFT_NSIP                          = 0x1b
-	IFT_OPTICALCHANNEL                = 0xc3
-	IFT_OPTICALTRANSPORT              = 0xc4
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PFLOG                         = 0xf5
-	IFT_PFSYNC                        = 0xf6
-	IFT_PLC                           = 0xae
-	IFT_PON155                        = 0xcf
-	IFT_PON622                        = 0xd0
-	IFT_POS                           = 0xab
-	IFT_PPP                           = 0x17
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
-	IFT_PROPATM                       = 0xc5
-	IFT_PROPBWAP2MP                   = 0xb8
-	IFT_PROPCNLS                      = 0x59
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PROPWIRELESSP2P               = 0x9d
-	IFT_PTPSERIAL                     = 0x16
-	IFT_PVC                           = 0xf1
-	IFT_Q2931                         = 0xc9
-	IFT_QLLC                          = 0x44
-	IFT_RADIOMAC                      = 0xbc
-	IFT_RADSL                         = 0x5f
-	IFT_REACHDSL                      = 0xc0
-	IFT_RFC1483                       = 0x9f
-	IFT_RS232                         = 0x21
-	IFT_RSRB                          = 0x4f
-	IFT_SDLC                          = 0x11
-	IFT_SDSL                          = 0x60
-	IFT_SHDSL                         = 0xa9
-	IFT_SIP                           = 0x1f
-	IFT_SIPSIG                        = 0xcc
-	IFT_SIPTG                         = 0xcb
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_SRP                           = 0x97
-	IFT_SS7SIGLINK                    = 0x9c
-	IFT_STACKTOSTACK                  = 0x6f
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0xd7
-	IFT_T1                            = 0x12
-	IFT_TDLC                          = 0x74
-	IFT_TELINK                        = 0xc8
-	IFT_TERMPAD                       = 0x5b
-	IFT_TR008                         = 0xb0
-	IFT_TRANSPHDLC                    = 0x7b
-	IFT_TUNNEL                        = 0x83
-	IFT_ULTRA                         = 0x1d
-	IFT_USB                           = 0xa0
-	IFT_V11                           = 0x40
-	IFT_V35                           = 0x2d
-	IFT_V36                           = 0x41
-	IFT_V37                           = 0x78
-	IFT_VDSL                          = 0x61
-	IFT_VIRTUALIPADDRESS              = 0x70
-	IFT_VIRTUALTG                     = 0xca
-	IFT_VOICEDID                      = 0xd5
-	IFT_VOICEEM                       = 0x64
-	IFT_VOICEEMFGD                    = 0xd3
-	IFT_VOICEENCAP                    = 0x67
-	IFT_VOICEFGDEANA                  = 0xd4
-	IFT_VOICEFXO                      = 0x65
-	IFT_VOICEFXS                      = 0x66
-	IFT_VOICEOVERATM                  = 0x98
-	IFT_VOICEOVERCABLE                = 0xc6
-	IFT_VOICEOVERFRAMERELAY           = 0x99
-	IFT_VOICEOVERIP                   = 0x68
-	IFT_X213                          = 0x5d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25HUNTGROUP                  = 0x7a
-	IFT_X25MLP                        = 0x79
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LOOPBACKNET                    = 0x7f
-	IPPROTO_AH                        = 0x33
-	IPPROTO_CARP                      = 0x70
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IPV6_ICMP                 = 0x3a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MOBILE                    = 0x37
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_PFSYNC                    = 0xf0
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_VRRP                      = 0x70
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_DONTFRAG                     = 0x3e
-	IPV6_DSTOPTS                      = 0x32
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_HOPLIMIT                     = 0x2f
-	IPV6_HOPOPTS                      = 0x31
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_NEXTHOP                      = 0x30
-	IPV6_PATHMTU                      = 0x2c
-	IPV6_PKTINFO                      = 0x2e
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVDSTOPTS                  = 0x28
-	IPV6_RECVHOPLIMIT                 = 0x25
-	IPV6_RECVHOPOPTS                  = 0x27
-	IPV6_RECVPATHMTU                  = 0x2b
-	IPV6_RECVPKTINFO                  = 0x24
-	IPV6_RECVRTHDR                    = 0x26
-	IPV6_RECVTCLASS                   = 0x39
-	IPV6_RTHDR                        = 0x33
-	IPV6_RTHDRDSTOPTS                 = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x3d
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_USE_MIN_MTU                  = 0x2a
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_EF                             = 0x8000
-	IP_ERRORMTU                       = 0x15
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x16
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_MEMBERSHIPS                = 0x14
-	IP_MF                             = 0x2000
-	IP_MINFRAGSIZE                    = 0x45
-	IP_MINTTL                         = 0x18
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_OFFMASK                        = 0x1fff
-	IP_OPTIONS                        = 0x1
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTTL                        = 0x17
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_TOS                            = 0x3
-	IP_TTL                            = 0x4
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x6
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_SPACEAVAIL                   = 0x5
-	MADV_WILLNEED                     = 0x3
-	MAP_ALIGNMENT_16MB                = 0x18000000
-	MAP_ALIGNMENT_1TB                 = 0x28000000
-	MAP_ALIGNMENT_256TB               = 0x30000000
-	MAP_ALIGNMENT_4GB                 = 0x20000000
-	MAP_ALIGNMENT_64KB                = 0x10000000
-	MAP_ALIGNMENT_64PB                = 0x38000000
-	MAP_ALIGNMENT_MASK                = -0x1000000
-	MAP_ALIGNMENT_SHIFT               = 0x18
-	MAP_ANON                          = 0x1000
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_INHERIT                       = 0x80
-	MAP_INHERIT_COPY                  = 0x1
-	MAP_INHERIT_DEFAULT               = 0x1
-	MAP_INHERIT_DONATE_COPY           = 0x3
-	MAP_INHERIT_NONE                  = 0x2
-	MAP_INHERIT_SHARE                 = 0x0
-	MAP_NORESERVE                     = 0x40
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_SHARED                        = 0x1
-	MAP_STACK                         = 0x2000
-	MAP_TRYFIXED                      = 0x400
-	MAP_WIRED                         = 0x800
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_BCAST                         = 0x100
-	MSG_CMSG_CLOEXEC                  = 0x800
-	MSG_CONTROLMBUF                   = 0x2000000
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOR                           = 0x8
-	MSG_IOVUSRSPACE                   = 0x4000000
-	MSG_LENUSRSPACE                   = 0x8000000
-	MSG_MCAST                         = 0x200
-	MSG_NAMEMBUF                      = 0x1000000
-	MSG_NBIO                          = 0x1000
-	MSG_NOSIGNAL                      = 0x400
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_TRUNC                         = 0x10
-	MSG_USERFLAGS                     = 0xffffff
-	MSG_WAITALL                       = 0x40
-	MS_ASYNC                          = 0x1
-	MS_INVALIDATE                     = 0x2
-	MS_SYNC                           = 0x4
-	NAME_MAX                          = 0x1ff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x5
-	NET_RT_MAXID                      = 0x6
-	NET_RT_OIFLIST                    = 0x4
-	NET_RT_OOIFLIST                   = 0x3
-	NOFLSH                            = 0x80000000
-	NOTE_ATTRIB                       = 0x8
-	NOTE_CHILD                        = 0x4
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FORK                         = 0x40000000
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_PCTRLMASK                    = 0xf0000000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	OFIOGETBMAP                       = 0xc004667a
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_ALT_IO                          = 0x40000
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x400000
-	O_CREAT                           = 0x200
-	O_DIRECT                          = 0x80000
-	O_DIRECTORY                       = 0x200000
-	O_DSYNC                           = 0x10000
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x8000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_NOSIGPIPE                       = 0x1000000
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_RSYNC                           = 0x20000
-	O_SHLOCK                          = 0x10
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PRI_IOFLUSH                       = 0x7c
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	RLIMIT_AS                         = 0xa
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x9
-	RTAX_NETMASK                      = 0x2
-	RTAX_TAG                          = 0x8
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTA_TAG                           = 0x100
-	RTF_ANNOUNCE                      = 0x20000
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_CLONED                        = 0x2000
-	RTF_CLONING                       = 0x100
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_LLINFO                        = 0x400
-	RTF_MASK                          = 0x80
-	RTF_MODIFIED                      = 0x20
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_REJECT                        = 0x8
-	RTF_SRC                           = 0x10000
-	RTF_STATIC                        = 0x800
-	RTF_UP                            = 0x1
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_CHGADDR                       = 0x15
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_GET                           = 0x4
-	RTM_IEEE80211                     = 0x11
-	RTM_IFANNOUNCE                    = 0x10
-	RTM_IFINFO                        = 0x14
-	RTM_LLINFO_UPD                    = 0x13
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_OIFINFO                       = 0xf
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_OOIFINFO                      = 0xe
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_SETGATE                       = 0x12
-	RTM_VERSION                       = 0x4
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	SCM_CREDS                         = 0x4
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x8
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80906931
-	SIOCADDRT                         = 0x8038720a
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCALIFADDR                      = 0x8118691c
-	SIOCATMARK                        = 0x40047307
-	SIOCDELMULTI                      = 0x80906932
-	SIOCDELRT                         = 0x8038720b
-	SIOCDIFADDR                       = 0x80906919
-	SIOCDIFPHYADDR                    = 0x80906949
-	SIOCDLIFADDR                      = 0x8118691e
-	SIOCGDRVSPEC                      = 0xc028697b
-	SIOCGETPFSYNC                     = 0xc09069f8
-	SIOCGETSGCNT                      = 0xc0207534
-	SIOCGETVIFCNT                     = 0xc0287533
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0906921
-	SIOCGIFADDRPREF                   = 0xc0986920
-	SIOCGIFALIAS                      = 0xc040691b
-	SIOCGIFBRDADDR                    = 0xc0906923
-	SIOCGIFCAP                        = 0xc0206976
-	SIOCGIFCONF                       = 0xc0106926
-	SIOCGIFDATA                       = 0xc0986985
-	SIOCGIFDLT                        = 0xc0906977
-	SIOCGIFDSTADDR                    = 0xc0906922
-	SIOCGIFFLAGS                      = 0xc0906911
-	SIOCGIFGENERIC                    = 0xc090693a
-	SIOCGIFMEDIA                      = 0xc0306936
-	SIOCGIFMETRIC                     = 0xc0906917
-	SIOCGIFMTU                        = 0xc090697e
-	SIOCGIFNETMASK                    = 0xc0906925
-	SIOCGIFPDSTADDR                   = 0xc0906948
-	SIOCGIFPSRCADDR                   = 0xc0906947
-	SIOCGLIFADDR                      = 0xc118691d
-	SIOCGLIFPHYADDR                   = 0xc118694b
-	SIOCGLINKSTR                      = 0xc0286987
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCGVH                           = 0xc0906983
-	SIOCIFCREATE                      = 0x8090697a
-	SIOCIFDESTROY                     = 0x80906979
-	SIOCIFGCLONERS                    = 0xc0106978
-	SIOCINITIFADDR                    = 0xc0706984
-	SIOCSDRVSPEC                      = 0x8028697b
-	SIOCSETPFSYNC                     = 0x809069f7
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8090690c
-	SIOCSIFADDRPREF                   = 0x8098691f
-	SIOCSIFBRDADDR                    = 0x80906913
-	SIOCSIFCAP                        = 0x80206975
-	SIOCSIFDSTADDR                    = 0x8090690e
-	SIOCSIFFLAGS                      = 0x80906910
-	SIOCSIFGENERIC                    = 0x80906939
-	SIOCSIFMEDIA                      = 0xc0906935
-	SIOCSIFMETRIC                     = 0x80906918
-	SIOCSIFMTU                        = 0x8090697f
-	SIOCSIFNETMASK                    = 0x80906916
-	SIOCSIFPHYADDR                    = 0x80406946
-	SIOCSLIFPHYADDR                   = 0x8118694a
-	SIOCSLINKSTR                      = 0x80286988
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SIOCSVH                           = 0xc0906982
-	SIOCZIFDATA                       = 0xc0986986
-	SOCK_CLOEXEC                      = 0x10000000
-	SOCK_DGRAM                        = 0x2
-	SOCK_FLAGS_MASK                   = 0xf0000000
-	SOCK_NONBLOCK                     = 0x20000000
-	SOCK_NOSIGPIPE                    = 0x40000000
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_ACCEPTFILTER                   = 0x1000
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LINGER                         = 0x80
-	SO_NOHEADER                       = 0x100a
-	SO_NOSIGPIPE                      = 0x800
-	SO_OOBINLINE                      = 0x100
-	SO_OVERFLOWED                     = 0x1009
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x100c
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x100b
-	SO_TIMESTAMP                      = 0x2000
-	SO_TYPE                           = 0x1008
-	SO_USELOOPBACK                    = 0x40
-	SYSCTL_VERSION                    = 0x1000000
-	SYSCTL_VERS_0                     = 0x0
-	SYSCTL_VERS_1                     = 0x1000000
-	SYSCTL_VERS_MASK                  = 0xff000000
-	S_ARCH1                           = 0x10000
-	S_ARCH2                           = 0x20000
-	S_BLKSIZE                         = 0x200
-	S_IEXEC                           = 0x40
-	S_IFBLK                           = 0x6000
-	S_IFCHR                           = 0x2000
-	S_IFDIR                           = 0x4000
-	S_IFIFO                           = 0x1000
-	S_IFLNK                           = 0xa000
-	S_IFMT                            = 0xf000
-	S_IFREG                           = 0x8000
-	S_IFSOCK                          = 0xc000
-	S_IFWHT                           = 0xe000
-	S_IREAD                           = 0x100
-	S_IRGRP                           = 0x20
-	S_IROTH                           = 0x4
-	S_IRUSR                           = 0x100
-	S_IRWXG                           = 0x38
-	S_IRWXO                           = 0x7
-	S_IRWXU                           = 0x1c0
-	S_ISGID                           = 0x400
-	S_ISTXT                           = 0x200
-	S_ISUID                           = 0x800
-	S_ISVTX                           = 0x200
-	S_IWGRP                           = 0x10
-	S_IWOTH                           = 0x2
-	S_IWRITE                          = 0x80
-	S_IWUSR                           = 0x80
-	S_IXGRP                           = 0x8
-	S_IXOTH                           = 0x1
-	S_IXUSR                           = 0x40
-	S_LOGIN_SET                       = 0x1
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CONGCTL                       = 0x20
-	TCP_KEEPCNT                       = 0x6
-	TCP_KEEPIDLE                      = 0x3
-	TCP_KEEPINIT                      = 0x7
-	TCP_KEEPINTVL                     = 0x5
-	TCP_MAXBURST                      = 0x4
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MD5SIG                        = 0x10
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x218
-	TCP_NODELAY                       = 0x1
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDCDTIMESTAMP                  = 0x40107458
-	TIOCDRAIN                         = 0x2000745e
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLAG_CDTRCTS                  = 0x10
-	TIOCFLAG_CLOCAL                   = 0x2
-	TIOCFLAG_CRTSCTS                  = 0x4
-	TIOCFLAG_MDMBUF                   = 0x8
-	TIOCFLAG_SOFTCAR                  = 0x1
-	TIOCFLUSH                         = 0x80047410
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGFLAGS                        = 0x4004745d
-	TIOCGLINED                        = 0x40207442
-	TIOCGPGRP                         = 0x40047477
-	TIOCGQSIZE                        = 0x40047481
-	TIOCGRANTPT                       = 0x20007447
-	TIOCGSID                          = 0x40047463
-	TIOCGSIZE                         = 0x40087468
-	TIOCGWINSZ                        = 0x40087468
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGET                          = 0x4004746a
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTMGET                        = 0x40287446
-	TIOCPTSNAME                       = 0x40287448
-	TIOCRCVFRAME                      = 0x80087445
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSFLAGS                        = 0x8004745c
-	TIOCSIG                           = 0x2000745f
-	TIOCSLINED                        = 0x80207443
-	TIOCSPGRP                         = 0x80047476
-	TIOCSQSIZE                        = 0x80047480
-	TIOCSSIZE                         = 0x80087467
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x80047465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCUCNTL                         = 0x80047466
-	TIOCXMTFRAME                      = 0x80087444
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WALL                              = 0x8
-	WALLSIG                           = 0x8
-	WALTSIG                           = 0x4
-	WCLONE                            = 0x4
-	WCOREFLAG                         = 0x80
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x10000
-	WNOZOMBIE                         = 0x20000
-	WOPTSCHECKED                      = 0x40000
-	WSTOPPED                          = 0x7f
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADF           = syscall.Errno(0x9)
-	EBADMSG         = syscall.Errno(0x58)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x57)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDOM            = syscall.Errno(0x21)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x52)
-	EILSEQ          = syscall.Errno(0x55)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x60)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5e)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x5d)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODATA         = syscall.Errno(0x59)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x5f)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x53)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x5a)
-	ENOSTR          = syscall.Errno(0x5b)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x56)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x2d)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x60)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIME           = syscall.Errno(0x5c)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x20)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:  "operation not permitted",
-	2:  "no such file or directory",
-	3:  "no such process",
-	4:  "interrupted system call",
-	5:  "input/output error",
-	6:  "device not configured",
-	7:  "argument list too long",
-	8:  "exec format error",
-	9:  "bad file descriptor",
-	10: "no child processes",
-	11: "resource deadlock avoided",
-	12: "cannot allocate memory",
-	13: "permission denied",
-	14: "bad address",
-	15: "block device required",
-	16: "device busy",
-	17: "file exists",
-	18: "cross-device link",
-	19: "operation not supported by device",
-	20: "not a directory",
-	21: "is a directory",
-	22: "invalid argument",
-	23: "too many open files in system",
-	24: "too many open files",
-	25: "inappropriate ioctl for device",
-	26: "text file busy",
-	27: "file too large",
-	28: "no space left on device",
-	29: "illegal seek",
-	30: "read-only file system",
-	31: "too many links",
-	32: "broken pipe",
-	33: "numerical argument out of domain",
-	34: "result too large or too small",
-	35: "resource temporarily unavailable",
-	36: "operation now in progress",
-	37: "operation already in progress",
-	38: "socket operation on non-socket",
-	39: "destination address required",
-	40: "message too long",
-	41: "protocol wrong type for socket",
-	42: "protocol option not available",
-	43: "protocol not supported",
-	44: "socket type not supported",
-	45: "operation not supported",
-	46: "protocol family not supported",
-	47: "address family not supported by protocol family",
-	48: "address already in use",
-	49: "can't assign requested address",
-	50: "network is down",
-	51: "network is unreachable",
-	52: "network dropped connection on reset",
-	53: "software caused connection abort",
-	54: "connection reset by peer",
-	55: "no buffer space available",
-	56: "socket is already connected",
-	57: "socket is not connected",
-	58: "can't send after socket shutdown",
-	59: "too many references: can't splice",
-	60: "connection timed out",
-	61: "connection refused",
-	62: "too many levels of symbolic links",
-	63: "file name too long",
-	64: "host is down",
-	65: "no route to host",
-	66: "directory not empty",
-	67: "too many processes",
-	68: "too many users",
-	69: "disc quota exceeded",
-	70: "stale NFS file handle",
-	71: "too many levels of remote in path",
-	72: "RPC struct is bad",
-	73: "RPC version wrong",
-	74: "RPC prog. not avail",
-	75: "program version wrong",
-	76: "bad procedure for program",
-	77: "no locks available",
-	78: "function not implemented",
-	79: "inappropriate file type or format",
-	80: "authentication error",
-	81: "need authenticator",
-	82: "identifier removed",
-	83: "no message of desired type",
-	84: "value too large to be stored in data type",
-	85: "illegal byte sequence",
-	86: "not supported",
-	87: "operation Canceled",
-	88: "bad or Corrupt message",
-	89: "no message available",
-	90: "no STREAM resources",
-	91: "not a STREAM",
-	92: "STREAM ioctl timeout",
-	93: "attribute not found",
-	94: "multihop attempted",
-	95: "link has been severed",
-	96: "protocol error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "stopped (signal)",
-	18: "stopped",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-	32: "power fail/restart",
-}


[64/67] [abbrv] incubator-mynewt-newtmgr git commit: newtmgr - use newtmgr repo, not newt repo.

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_plain_sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_plain_sesn.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_plain_sesn.go
new file mode 100644
index 0000000..a8a46d6
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_plain_sesn.go
@@ -0,0 +1,186 @@
+package nmble
+
+import (
+	"fmt"
+	"sync"
+	"time"
+
+	. "mynewt.apache.org/newtmgr/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+	"mynewt.apache.org/newt/util"
+)
+
+type BlePlainSesn struct {
+	bf           *BleFsm
+	nls          map[*nmp.NmpListener]struct{}
+	nd           *nmp.NmpDispatcher
+	closeTimeout time.Duration
+	onCloseCb    sesn.BleOnCloseFn
+
+	closeChan chan error
+	mx        sync.Mutex
+}
+
+func NewBlePlainSesn(bx *BleXport, cfg sesn.SesnCfg) *BlePlainSesn {
+	bps := &BlePlainSesn{
+		nls:          map[*nmp.NmpListener]struct{}{},
+		nd:           nmp.NewNmpDispatcher(),
+		closeTimeout: cfg.Ble.CloseTimeout,
+		onCloseCb:    cfg.Ble.OnCloseCb,
+	}
+
+	svcUuid, err := ParseUuid(NmpPlainSvcUuid)
+	if err != nil {
+		panic(err.Error())
+	}
+
+	chrUuid, err := ParseUuid(NmpPlainChrUuid)
+	if err != nil {
+		panic(err.Error())
+	}
+
+	bps.bf = NewBleFsm(BleFsmParams{
+		Bx:           bx,
+		OwnAddrType:  cfg.Ble.OwnAddrType,
+		PeerSpec:     cfg.Ble.PeerSpec,
+		SvcUuid:      svcUuid,
+		ReqChrUuid:   chrUuid,
+		RspChrUuid:   chrUuid,
+		RxNmpCb:      func(d []byte) { bps.onRxNmp(d) },
+		DisconnectCb: func(p BleDev, e error) { bps.onDisconnect(p, e) },
+	})
+
+	return bps
+}
+
+func (bps *BlePlainSesn) addNmpListener(seq uint8) (*nmp.NmpListener, error) {
+	nl := nmp.NewNmpListener()
+	bps.nls[nl] = struct{}{}
+
+	if err := bps.nd.AddListener(seq, nl); err != nil {
+		delete(bps.nls, nl)
+		return nil, err
+	}
+
+	return nl, nil
+}
+
+func (bps *BlePlainSesn) removeNmpListener(seq uint8) {
+	listener := bps.nd.RemoveListener(seq)
+	if listener != nil {
+		delete(bps.nls, listener)
+	}
+}
+
+// Returns true if a new channel was assigned.
+func (bps *BlePlainSesn) setCloseChan() bool {
+	bps.mx.Lock()
+	defer bps.mx.Unlock()
+
+	if bps.closeChan != nil {
+		return false
+	}
+
+	bps.closeChan = make(chan error, 1)
+	return true
+}
+
+func (bps *BlePlainSesn) clearCloseChan() {
+	bps.mx.Lock()
+	defer bps.mx.Unlock()
+
+	bps.closeChan = nil
+}
+
+func (bps *BlePlainSesn) AbortRx(seq uint8) error {
+	return bps.nd.FakeRxError(seq, fmt.Errorf("Rx aborted"))
+}
+
+func (bps *BlePlainSesn) Open() error {
+	return bps.bf.Start()
+}
+
+func (bps *BlePlainSesn) Close() error {
+	if !bps.setCloseChan() {
+		return bps.bf.closedError(
+			"Attempt to close an unopened BLE session")
+	}
+	defer bps.clearCloseChan()
+
+	done, err := bps.bf.Stop()
+	if err != nil {
+		return err
+	}
+
+	if done {
+		// Close complete.
+		return nil
+	}
+
+	// Block until close completes or timeout.
+	select {
+	case <-bps.closeChan:
+	case <-time.After(bps.closeTimeout):
+	}
+
+	return nil
+}
+
+func (bps *BlePlainSesn) IsOpen() bool {
+	return bps.bf.IsOpen()
+}
+
+func (bps *BlePlainSesn) onRxNmp(data []byte) {
+	bps.nd.Dispatch(data)
+}
+
+func (bps *BlePlainSesn) onDisconnect(peer BleDev, err error) {
+	for nl, _ := range bps.nls {
+		nl.ErrChan <- err
+	}
+
+	// If the session is being closed, unblock the close() call.
+	if bps.closeChan != nil {
+		bps.closeChan <- err
+	}
+	if bps.onCloseCb != nil {
+		bps.onCloseCb(bps, peer, err)
+	}
+}
+
+func (bps *BlePlainSesn) EncodeNmpMsg(m *nmp.NmpMsg) ([]byte, error) {
+	return nmp.EncodeNmpPlain(m)
+}
+
+// Blocking.
+func (bps *BlePlainSesn) TxNmpOnce(msg *nmp.NmpMsg, opt sesn.TxOptions) (
+	nmp.NmpRsp, error) {
+
+	if !bps.IsOpen() {
+		return nil, bps.bf.closedError(
+			"Attempt to transmit over closed BLE session")
+	}
+
+	nl, err := bps.addNmpListener(msg.Hdr.Seq)
+	if err != nil {
+		return nil, err
+	}
+	defer bps.removeNmpListener(msg.Hdr.Seq)
+
+	b, err := bps.EncodeNmpMsg(msg)
+	if err != nil {
+		return nil, err
+	}
+
+	return bps.bf.TxNmp(b, nl, opt.Timeout)
+}
+
+func (bps *BlePlainSesn) MtuIn() int {
+	return bps.bf.attMtu - NOTIFY_CMD_BASE_SZ - nmp.NMP_HDR_SIZE
+}
+
+func (bps *BlePlainSesn) MtuOut() int {
+	mtu := bps.bf.attMtu - WRITE_CMD_BASE_SZ - nmp.NMP_HDR_SIZE
+	return util.IntMin(mtu, BLE_ATT_ATTR_MAX_LEN)
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_proto.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_proto.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_proto.go
new file mode 100644
index 0000000..fe9112d
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_proto.go
@@ -0,0 +1,829 @@
+package nmble
+
+import (
+	"bytes"
+	"encoding/json"
+	"errors"
+	"fmt"
+	"strconv"
+	"strings"
+
+	. "mynewt.apache.org/newtmgr/nmxact/bledefs"
+)
+
+type MsgOp int
+type MsgType int
+
+type BleBytes struct {
+	Bytes []byte
+}
+
+type BleUuid struct {
+	Bytes [16]byte
+}
+
+const ERR_CODE_ATT_BASE = 0x100
+const ERR_CODE_HCI_BASE = 0x200
+const ERR_CODE_L2C_BASE = 0x300
+const ERR_CODE_SM_US_BASE = 0x400
+const ERR_CODE_SM_PEER_BASE = 0x500
+
+const (
+	ERR_CODE_EAGAIN       int = 1
+	ERR_CODE_EALREADY         = 2
+	ERR_CODE_EINVAL           = 3
+	ERR_CODE_EMSGSIZE         = 4
+	ERR_CODE_ENOENT           = 5
+	ERR_CODE_ENOMEM           = 6
+	ERR_CODE_ENOTCONN         = 7
+	ERR_CODE_ENOTSUP          = 8
+	ERR_CODE_EAPP             = 9
+	ERR_CODE_EBADDATA         = 10
+	ERR_CODE_EOS              = 11
+	ERR_CODE_ECONTROLLER      = 12
+	ERR_CODE_ETIMEOUT         = 13
+	ERR_CODE_EDONE            = 14
+	ERR_CODE_EBUSY            = 15
+	ERR_CODE_EREJECT          = 16
+	ERR_CODE_EUNKNOWN         = 17
+	ERR_CODE_EROLE            = 18
+	ERR_CODE_ETIMEOUT_HCI     = 19
+	ERR_CODE_ENOMEM_EVT       = 20
+	ERR_CODE_ENOADDR          = 21
+	ERR_CODE_ENOTSYNCED       = 22
+)
+
+var ErrCodeStringMap = map[int]string{
+	ERR_CODE_EAGAIN:       "eagain",
+	ERR_CODE_EALREADY:     "ealready",
+	ERR_CODE_EINVAL:       "einval",
+	ERR_CODE_EMSGSIZE:     "emsgsize",
+	ERR_CODE_ENOENT:       "enoent",
+	ERR_CODE_ENOMEM:       "enomem",
+	ERR_CODE_ENOTCONN:     "enotconn",
+	ERR_CODE_ENOTSUP:      "enotsup",
+	ERR_CODE_EAPP:         "eapp",
+	ERR_CODE_EBADDATA:     "ebaddata",
+	ERR_CODE_EOS:          "eos",
+	ERR_CODE_ECONTROLLER:  "econtroller",
+	ERR_CODE_ETIMEOUT:     "etimeout",
+	ERR_CODE_EDONE:        "edone",
+	ERR_CODE_EBUSY:        "ebusy",
+	ERR_CODE_EREJECT:      "ereject",
+	ERR_CODE_EUNKNOWN:     "eunknown",
+	ERR_CODE_EROLE:        "erole",
+	ERR_CODE_ETIMEOUT_HCI: "etimeout_hci",
+	ERR_CODE_ENOMEM_EVT:   "enomem_evt",
+	ERR_CODE_ENOADDR:      "enoaddr",
+	ERR_CODE_ENOTSYNCED:   "enotsynced",
+}
+
+const (
+	ERR_CODE_HCI_UNKNOWN_HCI_CMD     int = 1
+	ERR_CODE_HCI_UNK_CONN_ID             = 2
+	ERR_CODE_HCI_HW_FAIL                 = 3
+	ERR_CODE_HCI_PAGE_TMO                = 4
+	ERR_CODE_HCI_AUTH_FAIL               = 5
+	ERR_CODE_HCI_PINKEY_MISSING          = 6
+	ERR_CODE_HCI_MEM_CAPACITY            = 7
+	ERR_CODE_HCI_CONN_SPVN_TMO           = 8
+	ERR_CODE_HCI_CONN_LIMIT              = 9
+	ERR_CODE_HCI_SYNCH_CONN_LIMIT        = 10
+	ERR_CODE_HCI_ACL_CONN_EXISTS         = 11
+	ERR_CODE_HCI_CMD_DISALLOWED          = 12
+	ERR_CODE_HCI_CONN_REJ_RESOURCES      = 13
+	ERR_CODE_HCI_CONN_REJ_SECURITY       = 14
+	ERR_CODE_HCI_CONN_REJ_BD_ADDR        = 15
+	ERR_CODE_HCI_CONN_ACCEPT_TMO         = 16
+	ERR_CODE_HCI_UNSUPPORTED             = 17
+	ERR_CODE_HCI_INV_HCI_CMD_PARMS       = 18
+	ERR_CODE_HCI_REM_USER_CONN_TERM      = 19
+	ERR_CODE_HCI_RD_CONN_TERM_RESRCS     = 20
+	ERR_CODE_HCI_RD_CONN_TERM_PWROFF     = 21
+	ERR_CODE_HCI_CONN_TERM_LOCAL         = 22
+	ERR_CODE_HCI_REPEATED_ATTEMPTS       = 23
+	ERR_CODE_HCI_NO_PAIRING              = 24
+	ERR_CODE_HCI_UNK_LMP                 = 25
+	ERR_CODE_HCI_UNSUPP_REM_FEATURE      = 26
+	ERR_CODE_HCI_SCO_OFFSET              = 27
+	ERR_CODE_HCI_SCO_ITVL                = 28
+	ERR_CODE_HCI_SCO_AIR_MODE            = 29
+	ERR_CODE_HCI_INV_LMP_LL_PARM         = 30
+	ERR_CODE_HCI_UNSPECIFIED             = 31
+	ERR_CODE_HCI_UNSUPP_LMP_LL_PARM      = 32
+	ERR_CODE_HCI_NO_ROLE_CHANGE          = 33
+	ERR_CODE_HCI_LMP_LL_RSP_TMO          = 34
+	ERR_CODE_HCI_LMP_COLLISION           = 35
+	ERR_CODE_HCI_LMP_PDU                 = 36
+	ERR_CODE_HCI_ENCRYPTION_MODE         = 37
+	ERR_CODE_HCI_LINK_KEY_CHANGE         = 38
+	ERR_CODE_HCI_UNSUPP_QOS              = 39
+	ERR_CODE_HCI_INSTANT_PASSED          = 40
+	ERR_CODE_HCI_UNIT_KEY_PAIRING        = 41
+	ERR_CODE_HCI_DIFF_TRANS_COLL         = 42
+	ERR_CODE_HCI_QOS_PARM                = 44
+	ERR_CODE_HCI_QOS_REJECTED            = 45
+	ERR_CODE_HCI_CHAN_CLASS              = 46
+	ERR_CODE_HCI_INSUFFICIENT_SEC        = 47
+	ERR_CODE_HCI_PARM_OUT_OF_RANGE       = 48
+	ERR_CODE_HCI_PENDING_ROLE_SW         = 50
+	ERR_CODE_HCI_RESERVED_SLOT           = 52
+	ERR_CODE_HCI_ROLE_SW_FAIL            = 53
+	ERR_CODE_HCI_INQ_RSP_TOO_BIG         = 54
+	ERR_CODE_HCI_SEC_SIMPLE_PAIR         = 55
+	ERR_CODE_HCI_HOST_BUSY_PAIR          = 56
+	ERR_CODE_HCI_CONN_REJ_CHANNEL        = 57
+	ERR_CODE_HCI_CTLR_BUSY               = 58
+	ERR_CODE_HCI_CONN_PARMS              = 59
+	ERR_CODE_HCI_DIR_ADV_TMO             = 60
+	ERR_CODE_HCI_CONN_TERM_MIC           = 61
+	ERR_CODE_HCI_CONN_ESTABLISHMENT      = 62
+	ERR_CODE_HCI_MAC_CONN_FAIL           = 63
+	ERR_CODE_HCI_COARSE_CLK_ADJ          = 64
+)
+
+var HciErrCodeStringMap = map[int]string{
+	ERR_CODE_HCI_UNKNOWN_HCI_CMD:     "unknown hci cmd",
+	ERR_CODE_HCI_UNK_CONN_ID:         "unknown connection id",
+	ERR_CODE_HCI_HW_FAIL:             "hw fail",
+	ERR_CODE_HCI_PAGE_TMO:            "page tmo",
+	ERR_CODE_HCI_AUTH_FAIL:           "auth fail",
+	ERR_CODE_HCI_PINKEY_MISSING:      "pinkey missing",
+	ERR_CODE_HCI_MEM_CAPACITY:        "mem capacity",
+	ERR_CODE_HCI_CONN_SPVN_TMO:       "connection supervision timeout",
+	ERR_CODE_HCI_CONN_LIMIT:          "conn limit",
+	ERR_CODE_HCI_SYNCH_CONN_LIMIT:    "synch conn limit",
+	ERR_CODE_HCI_ACL_CONN_EXISTS:     "acl conn exists",
+	ERR_CODE_HCI_CMD_DISALLOWED:      "cmd disallowed",
+	ERR_CODE_HCI_CONN_REJ_RESOURCES:  "conn rej resources",
+	ERR_CODE_HCI_CONN_REJ_SECURITY:   "conn rej security",
+	ERR_CODE_HCI_CONN_REJ_BD_ADDR:    "conn rej bd addr",
+	ERR_CODE_HCI_CONN_ACCEPT_TMO:     "conn accept tmo",
+	ERR_CODE_HCI_UNSUPPORTED:         "unsupported",
+	ERR_CODE_HCI_INV_HCI_CMD_PARMS:   "inv hci cmd parms",
+	ERR_CODE_HCI_REM_USER_CONN_TERM:  "rem user conn term",
+	ERR_CODE_HCI_RD_CONN_TERM_RESRCS: "rd conn term resrcs",
+	ERR_CODE_HCI_RD_CONN_TERM_PWROFF: "rd conn term pwroff",
+	ERR_CODE_HCI_CONN_TERM_LOCAL:     "conn term local",
+	ERR_CODE_HCI_REPEATED_ATTEMPTS:   "repeated attempts",
+	ERR_CODE_HCI_NO_PAIRING:          "no pairing",
+	ERR_CODE_HCI_UNK_LMP:             "unk lmp",
+	ERR_CODE_HCI_UNSUPP_REM_FEATURE:  "unsupp rem feature",
+	ERR_CODE_HCI_SCO_OFFSET:          "sco offset",
+	ERR_CODE_HCI_SCO_ITVL:            "sco itvl",
+	ERR_CODE_HCI_SCO_AIR_MODE:        "sco air mode",
+	ERR_CODE_HCI_INV_LMP_LL_PARM:     "inv lmp ll parm",
+	ERR_CODE_HCI_UNSPECIFIED:         "unspecified",
+	ERR_CODE_HCI_UNSUPP_LMP_LL_PARM:  "unsupp lmp ll parm",
+	ERR_CODE_HCI_NO_ROLE_CHANGE:      "no role change",
+	ERR_CODE_HCI_LMP_LL_RSP_TMO:      "lmp ll rsp tmo",
+	ERR_CODE_HCI_LMP_COLLISION:       "lmp collision",
+	ERR_CODE_HCI_LMP_PDU:             "lmp pdu",
+	ERR_CODE_HCI_ENCRYPTION_MODE:     "encryption mode",
+	ERR_CODE_HCI_LINK_KEY_CHANGE:     "link key change",
+	ERR_CODE_HCI_UNSUPP_QOS:          "unsupp qos",
+	ERR_CODE_HCI_INSTANT_PASSED:      "instant passed",
+	ERR_CODE_HCI_UNIT_KEY_PAIRING:    "unit key pairing",
+	ERR_CODE_HCI_DIFF_TRANS_COLL:     "diff trans coll",
+	ERR_CODE_HCI_QOS_PARM:            "qos parm",
+	ERR_CODE_HCI_QOS_REJECTED:        "qos rejected",
+	ERR_CODE_HCI_CHAN_CLASS:          "chan class",
+	ERR_CODE_HCI_INSUFFICIENT_SEC:    "insufficient sec",
+	ERR_CODE_HCI_PARM_OUT_OF_RANGE:   "parm out of range",
+	ERR_CODE_HCI_PENDING_ROLE_SW:     "pending role sw",
+	ERR_CODE_HCI_RESERVED_SLOT:       "reserved slot",
+	ERR_CODE_HCI_ROLE_SW_FAIL:        "role sw fail",
+	ERR_CODE_HCI_INQ_RSP_TOO_BIG:     "inq rsp too big",
+	ERR_CODE_HCI_SEC_SIMPLE_PAIR:     "sec simple pair",
+	ERR_CODE_HCI_HOST_BUSY_PAIR:      "host busy pair",
+	ERR_CODE_HCI_CONN_REJ_CHANNEL:    "conn rej channel",
+	ERR_CODE_HCI_CTLR_BUSY:           "ctlr busy",
+	ERR_CODE_HCI_CONN_PARMS:          "conn parms",
+	ERR_CODE_HCI_DIR_ADV_TMO:         "dir adv tmo",
+	ERR_CODE_HCI_CONN_TERM_MIC:       "conn term mic",
+	ERR_CODE_HCI_CONN_ESTABLISHMENT:  "conn establishment",
+	ERR_CODE_HCI_MAC_CONN_FAIL:       "mac conn fail",
+	ERR_CODE_HCI_COARSE_CLK_ADJ:      "coarse clk adj",
+}
+
+const (
+	MSG_OP_REQ MsgOp = 0
+	MSG_OP_RSP       = 1
+	MSG_OP_EVT       = 2
+)
+
+const (
+	MSG_TYPE_ERR           MsgType = 1
+	MSG_TYPE_SYNC                  = 2
+	MSG_TYPE_CONNECT               = 3
+	MSG_TYPE_TERMINATE             = 4
+	MSG_TYPE_DISC_ALL_SVCS         = 5
+	MSG_TYPE_DISC_SVC_UUID         = 6
+	MSG_TYPE_DISC_ALL_CHRS         = 7
+	MSG_TYPE_DISC_CHR_UUID         = 8
+	MSG_TYPE_WRITE                 = 9
+	MSG_TYPE_WRITE_CMD             = 10
+	MSG_TYPE_EXCHANGE_MTU          = 11
+	MSG_TYPE_GEN_RAND_ADDR         = 12
+	MSG_TYPE_SET_RAND_ADDR         = 13
+	MSG_TYPE_CONN_CANCEL           = 14
+	MSG_TYPE_SCAN                  = 15
+	MSG_TYPE_SCAN_CANCEL           = 16
+
+	MSG_TYPE_SYNC_EVT       = 2049
+	MSG_TYPE_CONNECT_EVT    = 2050
+	MSG_TYPE_DISCONNECT_EVT = 2051
+	MSG_TYPE_DISC_SVC_EVT   = 2052
+	MSG_TYPE_DISC_CHR_EVT   = 2053
+	MSG_TYPE_WRITE_ACK_EVT  = 2054
+	MSG_TYPE_NOTIFY_RX_EVT  = 2055
+	MSG_TYPE_MTU_CHANGE_EVT = 2056
+	MSG_TYPE_SCAN_EVT       = 2057
+)
+
+var MsgOpStringMap = map[MsgOp]string{
+	MSG_OP_REQ: "request",
+	MSG_OP_RSP: "response",
+	MSG_OP_EVT: "event",
+}
+
+var MsgTypeStringMap = map[MsgType]string{
+	MSG_TYPE_ERR:           "error",
+	MSG_TYPE_SYNC:          "sync",
+	MSG_TYPE_CONNECT:       "connect",
+	MSG_TYPE_TERMINATE:     "terminate",
+	MSG_TYPE_DISC_SVC_UUID: "disc_svc_uuid",
+	MSG_TYPE_DISC_CHR_UUID: "disc_chr_uuid",
+	MSG_TYPE_DISC_ALL_CHRS: "disc_all_chrs",
+	MSG_TYPE_WRITE_CMD:     "write_cmd",
+	MSG_TYPE_EXCHANGE_MTU:  "exchange_mtu",
+	MSG_TYPE_CONN_CANCEL:   "conn_cancel",
+	MSG_TYPE_SCAN:          "scan",
+	MSG_TYPE_SCAN_CANCEL:   "scan_cancel",
+
+	MSG_TYPE_SYNC_EVT:       "sync_evt",
+	MSG_TYPE_CONNECT_EVT:    "connect_evt",
+	MSG_TYPE_DISCONNECT_EVT: "disconnect_evt",
+	MSG_TYPE_DISC_SVC_EVT:   "disc_svc_evt",
+	MSG_TYPE_DISC_CHR_EVT:   "disc_chr_evt",
+	MSG_TYPE_NOTIFY_RX_EVT:  "notify_rx_evt",
+	MSG_TYPE_MTU_CHANGE_EVT: "mtu_change_evt",
+	MSG_TYPE_SCAN_EVT:       "scan_evt",
+}
+
+type BleHdr struct {
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+}
+
+type BleMsg interface{}
+
+type BleSvc struct {
+	StartHandle int     `json:"start_handle"`
+	EndHandle   int     `json:"end_handle"`
+	Uuid        BleUuid `json:"uuid"`
+}
+
+type BleChr struct {
+	DefHandle  int     `json:"def_handle"`
+	ValHandle  int     `json:"val_handle"`
+	Properties int     `json:"properties"`
+	Uuid       BleUuid `json:"uuid"`
+}
+
+type BleSyncReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+}
+
+type BleConnectReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	OwnAddrType  BleAddrType `json:"own_addr_type"`
+	PeerAddrType BleAddrType `json:"peer_addr_type"`
+	PeerAddr     BleAddr     `json:"peer_addr"`
+
+	// Optional
+	DurationMs         int `json:"duration_ms"`
+	ScanItvl           int `json:"scan_itvl"`
+	ScanWindow         int `json:"scan_window"`
+	ItvlMin            int `json:"itvl_min"`
+	ItvlMax            int `json:"itvl_max"`
+	Latency            int `json:"latency"`
+	SupervisionTimeout int `json:"supervision_timeout"`
+	MinCeLen           int `json:"min_ce_len"`
+	MaxCeLen           int `json:"max_ce_len"`
+}
+
+type BleConnectRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleConnectEvt struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status          int         `json:"status"`
+	ConnHandle      int         `json:"conn_handle"`
+	OwnIdAddrType   BleAddrType `json:"own_id_addr_type"`
+	OwnIdAddr       BleAddr     `json:"own_id_addr"`
+	OwnOtaAddrType  BleAddrType `json:"own_ota_addr_type"`
+	OwnOtaAddr      BleAddr     `json:"own_ota_addr"`
+	PeerIdAddrType  BleAddrType `json:"peer_id_addr_type"`
+	PeerIdAddr      BleAddr     `json:"peer_id_addr"`
+	PeerOtaAddrType BleAddrType `json:"peer_ota_addr_type"`
+	PeerOtaAddr     BleAddr     `json:"peer_ota_addr"`
+}
+
+type BleTerminateReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	ConnHandle int `json:"conn_handle"`
+	HciReason  int `json:"hci_reason"`
+}
+
+type BleTerminateRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleConnCancelReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+}
+
+type BleConnCancelRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleDisconnectEvt struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Reason     int `json:"reason"`
+	ConnHandle int `json:"conn_handle"`
+}
+
+type BleDiscSvcUuidReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	ConnHandle int     `json:"conn_handle"`
+	Uuid       BleUuid `json:"svc_uuid"`
+}
+
+type BleDiscSvcUuidRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleDiscSvcEvt struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int    `json:"status"`
+	Svc    BleSvc `json:"service"`
+}
+
+type BleDiscChrUuidReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	ConnHandle  int     `json:"conn_handle"`
+	StartHandle int     `json:"start_handle"`
+	EndHandle   int     `json:"end_handle"`
+	Uuid        BleUuid `json:"chr_uuid"`
+}
+
+type BleDiscAllChrsReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	ConnHandle  int `json:"conn_handle"`
+	StartHandle int `json:"start_handle"`
+	EndHandle   int `json:"end_handle"`
+}
+
+type BleDiscAllChrsRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleErrRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int    `json:"status"`
+	Msg    string `json:"msg"`
+}
+
+type BleSyncRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Synced bool `json:"synced"`
+}
+
+type BleDiscChrUuidRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleDiscChrEvt struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int    `json:"status"`
+	Chr    BleChr `json:"characteristic"`
+}
+
+type BleWriteCmdReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	ConnHandle int      `json:"conn_handle"`
+	AttrHandle int      `json:"attr_handle"`
+	Data       BleBytes `json:"data"`
+}
+
+type BleWriteCmdRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleSyncEvt struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Synced bool `json:"synced"`
+}
+
+type BleNotifyRxEvt struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	ConnHandle int      `json:"conn_handle"`
+	AttrHandle int      `json:"attr_handle"`
+	Indication bool     `json:"indication"`
+	Data       BleBytes `json:"data"`
+}
+
+type BleExchangeMtuReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	ConnHandle int `json:"conn_handle"`
+}
+
+type BleExchangeMtuRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleMtuChangeEvt struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status     int `json:"status"`
+	ConnHandle int `json:"conn_handle"`
+	Mtu        int `json:"mtu"`
+}
+
+type BleScanReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	OwnAddrType      BleAddrType         `json:"own_addr_type"`
+	DurationMs       int                 `json:"duration_ms"`
+	Itvl             int                 `json:"itvl"`
+	Window           int                 `json:"window"`
+	FilterPolicy     BleScanFilterPolicy `json:"filter_policy"`
+	Limited          bool                `json:"limited"`
+	Passive          bool                `json:"passive"`
+	FilterDuplicates bool                `json:"filter_duplicates"`
+}
+
+type BleScanRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleScanEvt struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	EventType BleAdvEventType `json:"event_type"`
+	AddrType  BleAddrType     `json:"addr_type"`
+	Addr      BleAddr         `json:"addr"`
+	Rssi      int8            `json:"rssi"`
+	Data      BleBytes        `json:"data"`
+
+	// Optional
+	DataFlags          uint8  `json:"data_flags"`
+	DataName           string `json:"data_name"`
+	DataNameIsComplete bool   `json:"data_name_is_complete"`
+}
+
+type BleScanCancelReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+}
+
+type BleScanCancelRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+func ErrCodeToString(e int) string {
+	var s string
+
+	switch {
+	case e >= ERR_CODE_SM_PEER_BASE:
+	case e >= ERR_CODE_SM_US_BASE:
+	case e >= ERR_CODE_L2C_BASE:
+	case e >= ERR_CODE_HCI_BASE:
+		s = HciErrCodeStringMap[e-ERR_CODE_HCI_BASE]
+
+	case e >= ERR_CODE_ATT_BASE:
+	default:
+		s = ErrCodeStringMap[e]
+	}
+
+	if s == "" {
+		s = "unknown"
+	}
+
+	return s
+}
+
+func MsgOpToString(op MsgOp) string {
+	s := MsgOpStringMap[op]
+	if s == "" {
+		panic(fmt.Sprintf("Invalid MsgOp: %d", int(op)))
+	}
+
+	return s
+}
+
+func MsgOpFromString(s string) (MsgOp, error) {
+	for op, name := range MsgOpStringMap {
+		if s == name {
+			return op, nil
+		}
+	}
+
+	return MsgOp(0), errors.New("Invalid MsgOp string: " + s)
+}
+
+func MsgTypeToString(msgType MsgType) string {
+	s := MsgTypeStringMap[msgType]
+	if s == "" {
+		panic(fmt.Sprintf("Invalid MsgType: %d", int(msgType)))
+	}
+
+	return s
+}
+
+func MsgTypeFromString(s string) (MsgType, error) {
+	for addrType, name := range MsgTypeStringMap {
+		if s == name {
+			return addrType, nil
+		}
+	}
+
+	return MsgType(0), errors.New("Invalid MsgType string: " + s)
+}
+
+func (o MsgOp) MarshalJSON() ([]byte, error) {
+	return json.Marshal(MsgOpToString(o))
+}
+
+func (o *MsgOp) UnmarshalJSON(data []byte) error {
+	var err error
+
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	*o, err = MsgOpFromString(s)
+	return err
+}
+
+func (t MsgType) MarshalJSON() ([]byte, error) {
+	return json.Marshal(MsgTypeToString(t))
+}
+
+func (t *MsgType) UnmarshalJSON(data []byte) error {
+	var err error
+
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	*t, err = MsgTypeFromString(s)
+	return err
+}
+
+func (bb *BleBytes) MarshalJSON() ([]byte, error) {
+	var buf bytes.Buffer
+	buf.Grow(len(bb.Bytes) * 5)
+
+	for i, b := range bb.Bytes {
+		if i != 0 {
+			buf.WriteString(":")
+		}
+		fmt.Fprintf(&buf, "0x%02x", b)
+	}
+
+	s := buf.String()
+	return json.Marshal(s)
+
+	return buf.Bytes(), nil
+}
+
+func (bb *BleBytes) UnmarshalJSON(data []byte) error {
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	// strings.Split() appears to return { nil } when passed an empty string.
+	if len(s) == 0 {
+		return nil
+	}
+
+	toks := strings.Split(strings.ToLower(s), ":")
+	bb.Bytes = make([]byte, len(toks))
+
+	for i, t := range toks {
+		if !strings.HasPrefix(t, "0x") {
+			return fmt.Errorf(
+				"Byte stream contains invalid token; token=%s stream=%s", t, s)
+		}
+
+		u64, err := strconv.ParseUint(t, 0, 8)
+		if err != nil {
+			return err
+		}
+		bb.Bytes[i] = byte(u64)
+	}
+
+	return nil
+}
+
+func (bu *BleUuid) String() string {
+	var buf bytes.Buffer
+	buf.Grow(len(bu.Bytes)*2 + 3)
+
+	// XXX: For now, only support 128-bit UUIDs.
+
+	for i, b := range bu.Bytes {
+		switch i {
+		case 4, 6, 8, 10:
+			buf.WriteString("-")
+		}
+
+		fmt.Fprintf(&buf, "%02x", b)
+	}
+
+	return buf.String()
+}
+
+func (bu *BleUuid) MarshalJSON() ([]byte, error) {
+	return json.Marshal(bu.String())
+}
+
+func (bu *BleUuid) UnmarshalJSON(data []byte) error {
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	var err error
+	*bu, err = ParseUuid(s)
+	if err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func CompareUuids(a BleUuid, b BleUuid) int {
+	return bytes.Compare(a.Bytes[:], b.Bytes[:])
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_util.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_util.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_util.go
new file mode 100644
index 0000000..31f0e62
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_util.go
@@ -0,0 +1,174 @@
+package nmble
+
+import (
+	"fmt"
+	"strconv"
+	"sync/atomic"
+
+	log "github.com/Sirupsen/logrus"
+
+	. "mynewt.apache.org/newtmgr/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+)
+
+const NmpPlainSvcUuid = "8D53DC1D-1DB7-4CD3-868B-8A527460AA84"
+const NmpPlainChrUuid = "DA2E7828-FBCE-4E01-AE9E-261174997C48"
+const NmpOicSvcUuid = "ADE3D529-C784-4F63-A987-EB69F70EE816"
+const NmpOicReqChrUuid = "AD7B334F-4637-4B86-90B6-9D787F03D218"
+const NmpOicRspChrUuid = "E9241982-4580-42C4-8831-95048216B256"
+
+const WRITE_CMD_BASE_SZ = 3
+const NOTIFY_CMD_BASE_SZ = 3
+
+var nextSeq uint32
+
+func NextSeq() int {
+	return int(atomic.AddUint32(&nextSeq, 1))
+}
+
+func ParseUuid(uuidStr string) (BleUuid, error) {
+	bu := BleUuid{}
+
+	if len(uuidStr) != 36 {
+		return bu, fmt.Errorf("Invalid UUID: %s", uuidStr)
+	}
+
+	boff := 0
+	for i := 0; i < 36; {
+		switch i {
+		case 8, 13, 18, 23:
+			if uuidStr[i] != '-' {
+				return bu, fmt.Errorf("Invalid UUID: %s", uuidStr)
+			}
+			i++
+
+		default:
+			u64, err := strconv.ParseUint(uuidStr[i:i+2], 16, 8)
+			if err != nil {
+				return bu, fmt.Errorf("Invalid UUID: %s", uuidStr)
+			}
+			bu.Bytes[boff] = byte(u64)
+			i += 2
+			boff++
+		}
+	}
+
+	return bu, nil
+}
+
+func BhdTimeoutError(rspType MsgType) error {
+	str := fmt.Sprintf("Timeout waiting for blehostd to send %s response",
+		MsgTypeToString(rspType))
+
+	log.Debug(str)
+	return nmxutil.NewXportTimeoutError(str)
+}
+
+func StatusError(op MsgOp, msgType MsgType, status int) error {
+	str := fmt.Sprintf("%s %s indicates error: %s (%d)",
+		MsgOpToString(op),
+		MsgTypeToString(msgType),
+		ErrCodeToString(status),
+		status)
+
+	log.Debug(str)
+	return nmxutil.NewBleHostError(status, str)
+}
+
+func NewBleConnectReq() *BleConnectReq {
+	return &BleConnectReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_CONNECT,
+		Seq:  NextSeq(),
+
+		OwnAddrType:  BLE_ADDR_TYPE_PUBLIC,
+		PeerAddrType: BLE_ADDR_TYPE_PUBLIC,
+		PeerAddr:     BleAddr{},
+
+		DurationMs:         30000,
+		ScanItvl:           0x0010,
+		ScanWindow:         0x0010,
+		ItvlMin:            24,
+		ItvlMax:            40,
+		Latency:            0,
+		SupervisionTimeout: 0x0200,
+		MinCeLen:           0x0010,
+		MaxCeLen:           0x0300,
+	}
+}
+
+func NewBleTerminateReq() *BleTerminateReq {
+	return &BleTerminateReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_TERMINATE,
+		Seq:  NextSeq(),
+
+		ConnHandle: 0,
+		HciReason:  0,
+	}
+}
+
+func NewBleConnCancelReq() *BleConnCancelReq {
+	return &BleConnCancelReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_CONN_CANCEL,
+		Seq:  NextSeq(),
+	}
+}
+
+func NewBleDiscSvcUuidReq() *BleDiscSvcUuidReq {
+	return &BleDiscSvcUuidReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_DISC_SVC_UUID,
+		Seq:  NextSeq(),
+
+		ConnHandle: 0,
+		Uuid:       BleUuid{},
+	}
+}
+
+func NewBleDiscAllChrsReq() *BleDiscAllChrsReq {
+	return &BleDiscAllChrsReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_DISC_ALL_CHRS,
+		Seq:  NextSeq(),
+	}
+}
+
+func NewBleExchangeMtuReq() *BleExchangeMtuReq {
+	return &BleExchangeMtuReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_EXCHANGE_MTU,
+		Seq:  NextSeq(),
+
+		ConnHandle: 0,
+	}
+}
+
+func NewBleWriteCmdReq() *BleWriteCmdReq {
+	return &BleWriteCmdReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_WRITE_CMD,
+		Seq:  NextSeq(),
+
+		ConnHandle: 0,
+		AttrHandle: 0,
+		Data:       BleBytes{},
+	}
+}
+
+func NewBleScanReq() *BleScanReq {
+	return &BleScanReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_SCAN,
+		Seq:  NextSeq(),
+	}
+}
+
+func NewBleScanCancelReq() *BleScanCancelReq {
+	return &BleScanCancelReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_SCAN_CANCEL,
+		Seq:  NextSeq(),
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_xport.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_xport.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_xport.go
new file mode 100644
index 0000000..ba38b9d
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_xport.go
@@ -0,0 +1,319 @@
+package nmble
+
+import (
+	"encoding/hex"
+	"encoding/json"
+	"fmt"
+	"sync/atomic"
+	"time"
+
+	log "github.com/Sirupsen/logrus"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+	"mynewt.apache.org/newt/util/unixchild"
+)
+
+type XportCfg struct {
+	// Path of Unix domain socket to create and listen on.
+	SockPath string
+
+	// Path of the blehostd executable.
+	BlehostdPath string
+
+	// How long to wait for the blehostd process to connect to the Unix domain
+	// socket.
+	BlehostdAcceptTimeout time.Duration
+
+	// Whether to restart the blehostd process if it terminates.
+	BlehostdRestart bool
+
+	// How long to wait for a JSON response from the blehostd process.
+	BlehostdRspTimeout time.Duration
+
+	// Path of the BLE controller device (e.g., /dev/ttyUSB0).
+	DevPath string
+}
+
+func NewXportCfg() XportCfg {
+	return XportCfg{
+		BlehostdAcceptTimeout: time.Second,
+		BlehostdRestart:       true,
+		BlehostdRspTimeout:    time.Second,
+	}
+}
+
+type BleXportState uint32
+
+const (
+	BLE_XPORT_STATE_STOPPED BleXportState = iota
+	BLE_XPORT_STATE_STARTING
+	BLE_XPORT_STATE_STARTED
+)
+
+// Implements xport.Xport.
+type BleXport struct {
+	Bd     *BleDispatcher
+	client *unixchild.Client
+	state  BleXportState
+
+	syncTimeout time.Duration
+	rspTimeout  time.Duration
+}
+
+func NewBleXport(cfg XportCfg) (*BleXport, error) {
+	config := unixchild.Config{
+		SockPath:      cfg.SockPath,
+		ChildPath:     cfg.BlehostdPath,
+		ChildArgs:     []string{cfg.DevPath, cfg.SockPath},
+		Depth:         10,
+		MaxMsgSz:      10240,
+		AcceptTimeout: cfg.BlehostdAcceptTimeout,
+		Restart:       cfg.BlehostdRestart,
+	}
+
+	c := unixchild.New(config)
+
+	bx := &BleXport{
+		client:      c,
+		Bd:          NewBleDispatcher(),
+		syncTimeout: 10 * time.Second,
+		rspTimeout:  cfg.BlehostdRspTimeout,
+	}
+
+	return bx, nil
+}
+
+func (bx *BleXport) BuildSesn(cfg sesn.SesnCfg) (sesn.Sesn, error) {
+	switch cfg.MgmtProto {
+	case sesn.MGMT_PROTO_NMP:
+		return NewBlePlainSesn(bx, cfg), nil
+	case sesn.MGMT_PROTO_OMP:
+		return NewBleOicSesn(bx, cfg), nil
+	default:
+		return nil, fmt.Errorf(
+			"Invalid management protocol: %d; expected NMP or OMP",
+			cfg.MgmtProto)
+	}
+}
+
+func (bx *BleXport) addSyncListener() (*BleListener, error) {
+	bl := NewBleListener()
+	base := BleMsgBase{
+		Op:         MSG_OP_EVT,
+		Type:       MSG_TYPE_SYNC_EVT,
+		Seq:        -1,
+		ConnHandle: -1,
+	}
+	if err := bx.Bd.AddListener(base, bl); err != nil {
+		return nil, err
+	}
+
+	return bl, nil
+}
+
+func (bx *BleXport) removeSyncListener() {
+	base := BleMsgBase{
+		Op:         MSG_OP_EVT,
+		Type:       MSG_TYPE_SYNC_EVT,
+		Seq:        -1,
+		ConnHandle: -1,
+	}
+	bx.Bd.RemoveListener(base)
+}
+
+func (bx *BleXport) querySyncStatus() (bool, error) {
+	req := &BleSyncReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_SYNC,
+		Seq:  NextSeq(),
+	}
+
+	j, err := json.Marshal(req)
+	if err != nil {
+		return false, err
+	}
+
+	bl := NewBleListener()
+	base := BleMsgBase{
+		Op:         -1,
+		Type:       -1,
+		Seq:        req.Seq,
+		ConnHandle: -1,
+	}
+	if err := bx.Bd.AddListener(base, bl); err != nil {
+		return false, err
+	}
+	defer bx.Bd.RemoveListener(base)
+
+	bx.txNoSync(j)
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return false, err
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleSyncRsp:
+				return msg.Synced, nil
+			}
+		}
+	}
+}
+
+func (bx *BleXport) initialSyncCheck() (bool, *BleListener, error) {
+	bl, err := bx.addSyncListener()
+	if err != nil {
+		return false, nil, err
+	}
+
+	synced, err := bx.querySyncStatus()
+	if err != nil {
+		bx.removeSyncListener()
+		return false, nil, err
+	}
+
+	return synced, bl, nil
+}
+
+func (bx *BleXport) onError(err error) {
+	if !bx.setStateFrom(BLE_XPORT_STATE_STARTED, BLE_XPORT_STATE_STOPPED) &&
+		!bx.setStateFrom(BLE_XPORT_STATE_STARTING, BLE_XPORT_STATE_STOPPED) {
+
+		// Stop already in progress.
+		return
+	}
+	bx.Bd.ErrorAll(err)
+	if bx.client != nil {
+		bx.client.Stop()
+		bx.client.FromChild <- nil
+	}
+}
+
+func (bx *BleXport) setStateFrom(from BleXportState, to BleXportState) bool {
+	return atomic.CompareAndSwapUint32(
+		(*uint32)(&bx.state), uint32(from), uint32(to))
+}
+
+func (bx *BleXport) getState() BleXportState {
+	u32 := atomic.LoadUint32((*uint32)(&bx.state))
+	return BleXportState(u32)
+}
+
+func (bx *BleXport) Stop() error {
+	bx.onError(nil)
+	return nil
+}
+
+func (bx *BleXport) Start() error {
+	if !bx.setStateFrom(BLE_XPORT_STATE_STOPPED, BLE_XPORT_STATE_STARTING) {
+		return nmxutil.NewXportError("BLE xport started twice")
+	}
+
+	if err := bx.client.Start(); err != nil {
+		return nmxutil.NewXportError(
+			"Failed to start child child process: " + err.Error())
+	}
+
+	go func() {
+		err := <-bx.client.ErrChild
+		if unixchild.IsUcAcceptError(err) {
+			err = fmt.Errorf("blehostd did not connect to socket; " +
+				"controller not attached?")
+		}
+		bx.onError(err)
+		return
+	}()
+
+	go func() {
+		for {
+			if _, err := bx.rx(); err != nil {
+				// The error should have been reported to everyone interested.
+				break
+			}
+		}
+	}()
+
+	synced, bl, err := bx.initialSyncCheck()
+	if err != nil {
+		bx.Stop()
+		return err
+	}
+
+	if !synced {
+		// Not synced yet.  Wait for sync event.
+
+	SyncLoop:
+		for {
+			select {
+			case err := <-bl.ErrChan:
+				return err
+			case bm := <-bl.BleChan:
+				switch msg := bm.(type) {
+				case *BleSyncEvt:
+					if msg.Synced {
+						break SyncLoop
+					}
+				}
+			case <-time.After(bx.syncTimeout):
+				bx.Stop()
+				return nmxutil.NewXportError(
+					"Timeout waiting for host <-> controller sync")
+			}
+		}
+	}
+
+	// Host and controller are synced.  Listen for sync loss in the background.
+	go func() {
+		for {
+			select {
+			case err := <-bl.ErrChan:
+				bx.onError(err)
+				return
+			case bm := <-bl.BleChan:
+				switch msg := bm.(type) {
+				case *BleSyncEvt:
+					if !msg.Synced {
+						bx.onError(nmxutil.NewXportError(
+							"BLE host <-> controller sync lost"))
+						return
+					}
+				}
+			}
+		}
+	}()
+
+	if !bx.setStateFrom(BLE_XPORT_STATE_STARTING, BLE_XPORT_STATE_STARTED) {
+		return nmxutil.NewXportError(
+			"Internal error; BLE transport in unexpected state")
+	}
+
+	return nil
+}
+
+func (bx *BleXport) txNoSync(data []byte) {
+	log.Debugf("Tx to blehostd:\n%s", hex.Dump(data))
+	bx.client.ToChild <- data
+}
+
+func (bx *BleXport) Tx(data []byte) error {
+	if bx.getState() != BLE_XPORT_STATE_STARTED {
+		return nmxutil.NewXportError("Attempt to transmit before BLE xport " +
+			"fully started")
+	}
+
+	bx.txNoSync(data)
+	return nil
+}
+
+func (bx *BleXport) rx() ([]byte, error) {
+	select {
+	case err := <-bx.client.ErrChild:
+		return nil, err
+	case buf := <-bx.client.FromChild:
+		if len(buf) != 0 {
+			log.Debugf("Receive from blehostd:\n%s", hex.Dump(buf))
+			bx.Bd.Dispatch(buf)
+		}
+		return buf, nil
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/dispatch.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/dispatch.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/dispatch.go
new file mode 100644
index 0000000..546fc11
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/dispatch.go
@@ -0,0 +1,297 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmble
+
+import (
+	"encoding/json"
+	"fmt"
+	"sync"
+	"time"
+
+	log "github.com/Sirupsen/logrus"
+)
+
+type OpTypePair struct {
+	Op   MsgOp
+	Type MsgType
+}
+
+type BleMsgBase struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Optional
+	ConnHandle int `json:"conn_handle" json:",omitempty"`
+}
+
+type BleListener struct {
+	BleChan chan BleMsg
+	ErrChan chan error
+	TmoChan chan time.Time
+	Acked   bool
+
+	timer *time.Timer
+}
+
+func NewBleListener() *BleListener {
+	return &BleListener{
+		BleChan: make(chan BleMsg, 16),
+		ErrChan: make(chan error, 4),
+		TmoChan: make(chan time.Time, 1),
+	}
+}
+
+func (bl *BleListener) AfterTimeout(tmo time.Duration) <-chan time.Time {
+	fn := func() {
+		if !bl.Acked {
+			bl.TmoChan <- time.Now()
+		}
+	}
+	bl.timer = time.AfterFunc(tmo, fn)
+	return bl.TmoChan
+}
+
+func (bl *BleListener) Stop() {
+	if bl.timer != nil {
+		bl.timer.Stop()
+	}
+}
+
+type BleDispatcher struct {
+	seqMap  map[int]*BleListener
+	baseMap map[BleMsgBase]*BleListener
+	mutex   sync.Mutex
+}
+
+type msgCtor func() BleMsg
+
+func errRspCtor() BleMsg         { return &BleErrRsp{} }
+func syncRspCtor() BleMsg        { return &BleSyncRsp{} }
+func connectRspCtor() BleMsg     { return &BleConnectRsp{} }
+func terminateRspCtor() BleMsg   { return &BleTerminateRsp{} }
+func discSvcUuidRspCtor() BleMsg { return &BleDiscSvcUuidRsp{} }
+func discAllChrsRspCtor() BleMsg { return &BleDiscAllChrsRsp{} }
+func discChrUuidRspCtor() BleMsg { return &BleDiscChrUuidRsp{} }
+func writeCmdRspCtor() BleMsg    { return &BleWriteCmdRsp{} }
+func exchangeMtuRspCtor() BleMsg { return &BleExchangeMtuRsp{} }
+func connCancelRspCtor() BleMsg  { return &BleConnCancelRsp{} }
+func scanRspCtor() BleMsg        { return &BleScanRsp{} }
+func scanCancelRspCtor() BleMsg  { return &BleScanCancelRsp{} }
+
+func syncEvtCtor() BleMsg       { return &BleSyncEvt{} }
+func connectEvtCtor() BleMsg    { return &BleConnectEvt{} }
+func disconnectEvtCtor() BleMsg { return &BleDisconnectEvt{} }
+func discSvcEvtCtor() BleMsg    { return &BleDiscSvcEvt{} }
+func discChrEvtCtor() BleMsg    { return &BleDiscChrEvt{} }
+func notifyRxEvtCtor() BleMsg   { return &BleNotifyRxEvt{} }
+func mtuChangeEvtCtor() BleMsg  { return &BleMtuChangeEvt{} }
+func scanEvtCtor() BleMsg       { return &BleScanEvt{} }
+
+var msgCtorMap = map[OpTypePair]msgCtor{
+	{MSG_OP_RSP, MSG_TYPE_ERR}:           errRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_SYNC}:          syncRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_CONNECT}:       connectRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_TERMINATE}:     terminateRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_DISC_SVC_UUID}: discSvcUuidRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_DISC_CHR_UUID}: discChrUuidRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_DISC_ALL_CHRS}: discAllChrsRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_WRITE_CMD}:     writeCmdRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_EXCHANGE_MTU}:  exchangeMtuRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_CONN_CANCEL}:   connCancelRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_SCAN}:          scanRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_SCAN_CANCEL}:   scanCancelRspCtor,
+
+	{MSG_OP_EVT, MSG_TYPE_SYNC_EVT}:       syncEvtCtor,
+	{MSG_OP_EVT, MSG_TYPE_CONNECT_EVT}:    connectEvtCtor,
+	{MSG_OP_EVT, MSG_TYPE_DISCONNECT_EVT}: disconnectEvtCtor,
+	{MSG_OP_EVT, MSG_TYPE_DISC_SVC_EVT}:   discSvcEvtCtor,
+	{MSG_OP_EVT, MSG_TYPE_DISC_CHR_EVT}:   discChrEvtCtor,
+	{MSG_OP_EVT, MSG_TYPE_NOTIFY_RX_EVT}:  notifyRxEvtCtor,
+	{MSG_OP_EVT, MSG_TYPE_MTU_CHANGE_EVT}: mtuChangeEvtCtor,
+	{MSG_OP_EVT, MSG_TYPE_SCAN_EVT}:       scanEvtCtor,
+}
+
+func NewBleDispatcher() *BleDispatcher {
+	return &BleDispatcher{
+		seqMap:  map[int]*BleListener{},
+		baseMap: map[BleMsgBase]*BleListener{},
+	}
+}
+
+func (bd *BleDispatcher) findBaseListener(base BleMsgBase) (
+	BleMsgBase, *BleListener) {
+
+	for k, v := range bd.baseMap {
+		if k.Op != -1 && base.Op != -1 && k.Op != base.Op {
+			continue
+		}
+		if k.Type != -1 && base.Type != -1 && k.Type != base.Type {
+			continue
+		}
+		if k.ConnHandle != -1 && base.ConnHandle != -1 &&
+			k.ConnHandle != base.ConnHandle {
+
+			continue
+		}
+
+		return k, v
+	}
+
+	return base, nil
+}
+
+func (bd *BleDispatcher) findDupListener(base BleMsgBase) (
+	BleMsgBase, *BleListener) {
+
+	if base.Seq != -1 {
+		return base, bd.seqMap[base.Seq]
+	}
+
+	return bd.findBaseListener(base)
+}
+
+func (bd *BleDispatcher) findListener(base BleMsgBase) (
+	BleMsgBase, *BleListener) {
+
+	if base.Seq != -1 {
+		if bl := bd.seqMap[base.Seq]; bl != nil {
+			return base, bl
+		}
+	}
+
+	return bd.findBaseListener(base)
+}
+
+func (bd *BleDispatcher) AddListener(base BleMsgBase,
+	listener *BleListener) error {
+
+	bd.mutex.Lock()
+	defer bd.mutex.Unlock()
+
+	if ob, old := bd.findDupListener(base); old != nil {
+		return fmt.Errorf(
+			"Duplicate BLE listener;\n"+
+				"    old=op=%d type=%d seq=%d connHandle=%d\n"+
+				"    new=op=%d type=%d seq=%d connHandle=%d",
+			ob.Op, ob.Type, ob.Seq, ob.ConnHandle,
+			base.Op, base.Type, base.Seq, base.ConnHandle)
+	}
+
+	if base.Seq != -1 {
+		if base.Op != -1 ||
+			base.Type != -1 ||
+			base.ConnHandle != -1 {
+			return fmt.Errorf(
+				"Invalid listener base; non-wild seq with wild fields")
+		}
+
+		bd.seqMap[base.Seq] = listener
+	} else {
+		bd.baseMap[base] = listener
+	}
+
+	return nil
+}
+
+func (bd *BleDispatcher) RemoveListener(base BleMsgBase) *BleListener {
+	bd.mutex.Lock()
+	defer bd.mutex.Unlock()
+
+	base, bl := bd.findListener(base)
+	if bl != nil {
+		bl.Stop()
+		if base.Seq != -1 {
+			delete(bd.seqMap, base.Seq)
+		} else {
+			delete(bd.baseMap, base)
+		}
+	}
+
+	return bl
+}
+
+func decodeBleBase(data []byte) (BleMsgBase, error) {
+	base := BleMsgBase{}
+	if err := json.Unmarshal(data, &base); err != nil {
+		return base, err
+	}
+
+	return base, nil
+}
+
+func decodeBleMsg(data []byte) (BleMsgBase, BleMsg, error) {
+	base, err := decodeBleBase(data)
+	if err != nil {
+		return base, nil, err
+	}
+
+	opTypePair := OpTypePair{base.Op, base.Type}
+	cb := msgCtorMap[opTypePair]
+	if cb == nil {
+		return base, nil, fmt.Errorf(
+			"Unrecognized op+type pair: %s, %s",
+			MsgOpToString(base.Op), MsgTypeToString(base.Type))
+	}
+
+	msg := cb()
+	if err := json.Unmarshal(data, msg); err != nil {
+		return base, nil, err
+	}
+
+	return base, msg, nil
+}
+
+func (bd *BleDispatcher) Dispatch(data []byte) {
+	base, msg, err := decodeBleMsg(data)
+	if err != nil {
+		log.Warnf("BLE dispatch error: %s", err.Error())
+		return
+	}
+
+	_, listener := bd.findListener(base)
+	if listener == nil {
+		log.Debugf(
+			"No BLE listener for op=%d type=%d seq=%d connHandle=%d",
+			base.Op, base.Type, base.Seq, base.ConnHandle)
+		return
+	}
+
+	listener.BleChan <- msg
+}
+
+func (bd *BleDispatcher) ErrorAll(err error) {
+	bd.mutex.Lock()
+
+	listeners := make([]*BleListener, 0, len(bd.seqMap)+len(bd.baseMap))
+	for _, v := range bd.seqMap {
+		listeners = append(listeners, v)
+	}
+	for _, v := range bd.baseMap {
+		listeners = append(listeners, v)
+	}
+
+	bd.mutex.Unlock()
+
+	for _, listener := range listeners {
+		listener.ErrChan <- err
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/config.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/config.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/config.go
new file mode 100644
index 0000000..dc00df5
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/config.go
@@ -0,0 +1,80 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+//////////////////////////////////////////////////////////////////////////////
+// $read                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type ConfigReadReq struct {
+	NmpBase `structs:"-"`
+	Name    string `codec:"name"`
+}
+
+type ConfigReadRsp struct {
+	NmpBase
+	Rc  int    `codec:"rc" codec:",omitempty"`
+	Val string `codec:"val"`
+}
+
+func NewConfigReadReq() *ConfigReadReq {
+	r := &ConfigReadReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_CONFIG, NMP_ID_CONFIG_VAL)
+	return r
+}
+
+func (r *ConfigReadReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewConfigReadRsp() *ConfigReadRsp {
+	return &ConfigReadRsp{}
+}
+
+func (r *ConfigReadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $write                                                                   //
+//////////////////////////////////////////////////////////////////////////////
+
+type ConfigWriteReq struct {
+	NmpBase
+	Name string `codec:"name"`
+	Val  string `codec:"val"`
+}
+
+type ConfigWriteRsp struct {
+	NmpBase
+	Rc int `codec:"rc" codec:",omitempty"`
+}
+
+func NewConfigWriteReq() *ConfigWriteReq {
+	r := &ConfigWriteReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_CONFIG, NMP_ID_CONFIG_VAL)
+	return r
+}
+
+func (r *ConfigWriteReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewConfigWriteRsp() *ConfigWriteRsp {
+	return &ConfigWriteRsp{}
+}
+
+func (r *ConfigWriteRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/crash.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/crash.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/crash.go
new file mode 100644
index 0000000..5711d7f
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/crash.go
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+type CrashReq struct {
+	NmpBase
+	CrashType string `codec:"t"`
+}
+
+type CrashRsp struct {
+	NmpBase
+	Rc int `codec:"rc" codec:",omitempty"`
+}
+
+func NewCrashReq() *CrashReq {
+	r := &CrashReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_CRASH, NMP_ID_CRASH_TRIGGER)
+	return r
+}
+
+func (r *CrashReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewCrashRsp() *CrashRsp {
+	return &CrashRsp{}
+}
+
+func (r *CrashRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/datetime.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/datetime.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/datetime.go
new file mode 100644
index 0000000..ce52d8b
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/datetime.go
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+///////////////////////////////////////////////////////////////////////////////
+// $read                                                                     //
+///////////////////////////////////////////////////////////////////////////////
+
+type DateTimeReadReq struct {
+	NmpBase
+}
+
+type DateTimeReadRsp struct {
+	NmpBase
+	DateTime string `codec:"datetime"`
+	Rc       int    `codec:"rc" codec:",omitempty"`
+}
+
+func NewDateTimeReadReq() *DateTimeReadReq {
+	r := &DateTimeReadReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_DEFAULT, NMP_ID_DEF_DATETIME_STR)
+	return r
+}
+
+func (r *DateTimeReadReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewDateTimeReadRsp() *DateTimeReadRsp {
+	return &DateTimeReadRsp{}
+}
+
+func (r *DateTimeReadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+///////////////////////////////////////////////////////////////////////////////
+// $write                                                                    //
+///////////////////////////////////////////////////////////////////////////////
+
+type DateTimeWriteReq struct {
+	NmpBase
+	DateTime string `codec:"datetime"`
+}
+
+type DateTimeWriteRsp struct {
+	NmpBase
+	Rc int `codec:"rc" codec:",omitempty"`
+}
+
+func NewDateTimeWriteReq() *DateTimeWriteReq {
+	r := &DateTimeWriteReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_DEFAULT, NMP_ID_DEF_DATETIME_STR)
+	return r
+}
+
+func (r *DateTimeWriteReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewDateTimeWriteRsp() *DateTimeWriteRsp {
+	return &DateTimeWriteRsp{}
+}
+
+func (r *DateTimeWriteRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/decode.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/decode.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/decode.go
new file mode 100644
index 0000000..748d13d
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/decode.go
@@ -0,0 +1,121 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import (
+	"fmt"
+
+	"github.com/ugorji/go/codec"
+)
+
+// These aliases just allow the ctor map to fit within 79 columns.
+const op_wr = NMP_OP_WRITE_RSP
+const op_rr = NMP_OP_READ_RSP
+const gr_def = NMP_GROUP_DEFAULT
+const gr_img = NMP_GROUP_IMAGE
+const gr_sta = NMP_GROUP_STAT
+const gr_cfg = NMP_GROUP_CONFIG
+const gr_log = NMP_GROUP_LOG
+const gr_cra = NMP_GROUP_CRASH
+const gr_run = NMP_GROUP_RUN
+const gr_fil = NMP_GROUP_FS
+
+// Op-Group-Id
+type Ogi struct {
+	Op    uint8
+	Group uint16
+	Id    uint8
+}
+
+type rspCtor func() NmpRsp
+
+func echoRspCtor() NmpRsp          { return NewEchoRsp() }
+func taskStatRspCtor() NmpRsp      { return NewTaskStatRsp() }
+func mpStatRspCtor() NmpRsp        { return NewMempoolStatRsp() }
+func dateTimeReadRspCtor() NmpRsp  { return NewDateTimeReadRsp() }
+func dateTimeWriteRspCtor() NmpRsp { return NewDateTimeWriteRsp() }
+func resetRspCtor() NmpRsp         { return NewResetRsp() }
+func imageUploadRspCtor() NmpRsp   { return NewImageUploadRsp() }
+func imageStateRspCtor() NmpRsp    { return NewImageStateRsp() }
+func coreListRspCtor() NmpRsp      { return NewCoreListRsp() }
+func coreLoadRspCtor() NmpRsp      { return NewCoreLoadRsp() }
+func coreEraseRspCtor() NmpRsp     { return NewCoreEraseRsp() }
+func statReadRspCtor() NmpRsp      { return NewStatReadRsp() }
+func statListRspCtor() NmpRsp      { return NewStatListRsp() }
+func logReadRspCtor() NmpRsp       { return NewLogShowRsp() }
+func logListRspCtor() NmpRsp       { return NewLogListRsp() }
+func logModuleListRspCtor() NmpRsp { return NewLogModuleListRsp() }
+func logLevelListRspCtor() NmpRsp  { return NewLogLevelListRsp() }
+func logClearRspCtor() NmpRsp      { return NewLogClearRsp() }
+func crashRspCtor() NmpRsp         { return NewCrashRsp() }
+func runTestRspCtor() NmpRsp       { return NewRunTestRsp() }
+func runListRspCtor() NmpRsp       { return NewRunListRsp() }
+func fsDownloadRspCtor() NmpRsp    { return NewFsDownloadRsp() }
+func fsUploadRspCtor() NmpRsp      { return NewFsUploadRsp() }
+func configReadRspCtor() NmpRsp    { return NewConfigReadRsp() }
+func configWriteRspCtor() NmpRsp   { return NewConfigWriteRsp() }
+
+var rspCtorMap = map[Ogi]rspCtor{
+	{op_wr, gr_def, NMP_ID_DEF_ECHO}:         echoRspCtor,
+	{op_rr, gr_def, NMP_ID_DEF_TASKSTAT}:     taskStatRspCtor,
+	{op_rr, gr_def, NMP_ID_DEF_MPSTAT}:       mpStatRspCtor,
+	{op_rr, gr_def, NMP_ID_DEF_DATETIME_STR}: dateTimeReadRspCtor,
+	{op_wr, gr_def, NMP_ID_DEF_DATETIME_STR}: dateTimeWriteRspCtor,
+	{op_wr, gr_def, NMP_ID_DEF_RESET}:        resetRspCtor,
+	{op_wr, gr_img, NMP_ID_IMAGE_UPLOAD}:     imageUploadRspCtor,
+	{op_rr, gr_img, NMP_ID_IMAGE_STATE}:      imageStateRspCtor,
+	{op_wr, gr_img, NMP_ID_IMAGE_STATE}:      imageStateRspCtor,
+	{op_rr, gr_img, NMP_ID_IMAGE_CORELIST}:   coreListRspCtor,
+	{op_rr, gr_img, NMP_ID_IMAGE_CORELOAD}:   coreLoadRspCtor,
+	{op_wr, gr_img, NMP_ID_IMAGE_CORELOAD}:   coreEraseRspCtor,
+	{op_rr, gr_sta, NMP_ID_STAT_READ}:        statReadRspCtor,
+	{op_rr, gr_sta, NMP_ID_STAT_LIST}:        statListRspCtor,
+	{op_rr, gr_log, NMP_ID_LOG_SHOW}:         logReadRspCtor,
+	{op_rr, gr_log, NMP_ID_LOG_LIST}:         logListRspCtor,
+	{op_rr, gr_log, NMP_ID_LOG_MODULE_LIST}:  logModuleListRspCtor,
+	{op_rr, gr_log, NMP_ID_LOG_LEVEL_LIST}:   logLevelListRspCtor,
+	{op_wr, gr_log, NMP_ID_LOG_CLEAR}:        logClearRspCtor,
+	{op_wr, gr_cra, NMP_ID_CRASH_TRIGGER}:    crashRspCtor,
+	{op_wr, gr_run, NMP_ID_RUN_TEST}:         runTestRspCtor,
+	{op_rr, gr_run, NMP_ID_RUN_LIST}:         runListRspCtor,
+	{op_rr, gr_fil, NMP_ID_FS_FILE}:          fsDownloadRspCtor,
+	{op_wr, gr_fil, NMP_ID_FS_FILE}:          fsUploadRspCtor,
+	{op_rr, gr_cfg, NMP_ID_CONFIG_VAL}:       configReadRspCtor,
+	{op_wr, gr_cfg, NMP_ID_CONFIG_VAL}:       configWriteRspCtor,
+}
+
+func DecodeRspBody(hdr *NmpHdr, body []byte) (NmpRsp, error) {
+	cb := rspCtorMap[Ogi{hdr.Op, hdr.Group, hdr.Id}]
+	if cb == nil {
+		return nil, fmt.Errorf("Unrecognized NMP op+group+id: %d, %d, %d",
+			hdr.Op, hdr.Group, hdr.Id)
+	}
+
+	r := cb()
+	cborCodec := new(codec.CborHandle)
+	dec := codec.NewDecoderBytes(body, cborCodec)
+
+	if err := dec.Decode(r); err != nil {
+		return nil, fmt.Errorf("Invalid response: %s", err.Error())
+	}
+
+	r.SetHdr(hdr)
+	return r, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/defs.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/defs.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/defs.go
new file mode 100644
index 0000000..d10ffe5
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/defs.go
@@ -0,0 +1,88 @@
+package nmp
+
+const (
+	NMP_OP_READ      = 0
+	NMP_OP_READ_RSP  = 1
+	NMP_OP_WRITE     = 2
+	NMP_OP_WRITE_RSP = 3
+)
+
+const (
+	NMP_ERR_OK       = 0
+	NMP_ERR_EUNKNOWN = 1
+	NMP_ERR_ENOMEM   = 2
+	NMP_ERR_EINVAL   = 3
+	NMP_ERR_ETIMEOUT = 4
+	NMP_ERR_ENOENT   = 5
+)
+
+// First 64 groups are reserved for system level newtmgr commands.
+// Per-user commands are then defined after group 64.
+
+const (
+	NMP_GROUP_DEFAULT = 0
+	NMP_GROUP_IMAGE   = 1
+	NMP_GROUP_STAT    = 2
+	NMP_GROUP_CONFIG  = 3
+	NMP_GROUP_LOG     = 4
+	NMP_GROUP_CRASH   = 5
+	NMP_GROUP_SPLIT   = 6
+	NMP_GROUP_RUN     = 7
+	NMP_GROUP_FS      = 8
+	NMP_GROUP_PERUSER = 64
+)
+
+// Default group (0).
+const (
+	NMP_ID_DEF_ECHO           = 0
+	NMP_ID_DEF_CONS_ECHO_CTRL = 1
+	NMP_ID_DEF_TASKSTAT       = 2
+	NMP_ID_DEF_MPSTAT         = 3
+	NMP_ID_DEF_DATETIME_STR   = 4
+	NMP_ID_DEF_RESET          = 5
+)
+
+// Image group (1).
+const (
+	NMP_ID_IMAGE_STATE    = 0
+	NMP_ID_IMAGE_UPLOAD   = 1
+	NMP_ID_IMAGE_CORELIST = 3
+	NMP_ID_IMAGE_CORELOAD = 4
+)
+
+// Stat group (2).
+const (
+	NMP_ID_STAT_READ = 0
+	NMP_ID_STAT_LIST = 1
+)
+
+// Config group (3).
+const (
+	NMP_ID_CONFIG_VAL = 0
+)
+
+// Log group (4).
+const (
+	NMP_ID_LOG_SHOW        = 0
+	NMP_ID_LOG_CLEAR       = 1
+	NMP_ID_LOG_APPEND      = 2
+	NMP_ID_LOG_MODULE_LIST = 3
+	NMP_ID_LOG_LEVEL_LIST  = 4
+	NMP_ID_LOG_LIST        = 5
+)
+
+// Crash group (5).
+const (
+	NMP_ID_CRASH_TRIGGER = 0
+)
+
+// Run group (7).
+const (
+	NMP_ID_RUN_TEST = 0
+	NMP_ID_RUN_LIST = 1
+)
+
+// File system group (8).
+const (
+	NMP_ID_FS_FILE = 0
+)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/dispatch.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/dispatch.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/dispatch.go
new file mode 100644
index 0000000..7b1ad11
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/dispatch.go
@@ -0,0 +1,167 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import (
+	"encoding/hex"
+	"fmt"
+	"sync"
+	"time"
+
+	log "github.com/Sirupsen/logrus"
+)
+
+type NmpListener struct {
+	RspChan chan NmpRsp
+	ErrChan chan error
+	tmoChan chan time.Time
+	timer   *time.Timer
+}
+
+func NewNmpListener() *NmpListener {
+	return &NmpListener{
+		RspChan: make(chan NmpRsp, 1),
+		ErrChan: make(chan error, 1),
+	}
+}
+
+func (nl *NmpListener) AfterTimeout(tmo time.Duration) <-chan time.Time {
+	fn := func() {
+		nl.tmoChan <- time.Now()
+	}
+	nl.timer = time.AfterFunc(tmo, fn)
+	return nl.tmoChan
+}
+
+func (nl *NmpListener) Stop() {
+	if nl.timer != nil {
+		nl.timer.Stop()
+	}
+}
+
+type NmpDispatcher struct {
+	seqListenerMap map[uint8]*NmpListener
+	reassembler    *Reassembler
+	mutex          sync.Mutex
+}
+
+func NewNmpDispatcher() *NmpDispatcher {
+	return &NmpDispatcher{
+		seqListenerMap: map[uint8]*NmpListener{},
+		reassembler:    NewReassembler(),
+	}
+}
+
+func (nd *NmpDispatcher) AddListener(seq uint8, nl *NmpListener) error {
+	nd.mutex.Lock()
+	defer nd.mutex.Unlock()
+
+	if _, ok := nd.seqListenerMap[seq]; ok {
+		return fmt.Errorf("Duplicate NMP listener; seq=%d", seq)
+	}
+
+	nd.seqListenerMap[seq] = nl
+	return nil
+}
+
+func (nd *NmpDispatcher) removeListenerNoLock(seq uint8) *NmpListener {
+	nl := nd.seqListenerMap[seq]
+	if nl != nil {
+		nl.Stop()
+		delete(nd.seqListenerMap, seq)
+	}
+	return nl
+}
+
+func (nd *NmpDispatcher) RemoveListener(seq uint8) *NmpListener {
+	nd.mutex.Lock()
+	defer nd.mutex.Unlock()
+
+	return nd.removeListenerNoLock(seq)
+}
+
+func (nd *NmpDispatcher) FakeRxError(seq uint8, err error) error {
+	nd.mutex.Lock()
+	defer nd.mutex.Unlock()
+
+	nl := nd.seqListenerMap[seq]
+	if nl == nil {
+		return fmt.Errorf("No NMP listener for seq %d", seq)
+	}
+
+	nl.ErrChan <- err
+
+	return nil
+}
+
+func decodeRsp(pkt []byte) (NmpRsp, error) {
+	hdr, err := DecodeNmpHdr(pkt)
+	if err != nil {
+		return nil, err
+	}
+
+	// Ignore incoming non-responses.  This is necessary for devices that echo
+	// received requests over serial.
+	if hdr.Op != NMP_OP_READ_RSP && hdr.Op != NMP_OP_WRITE_RSP {
+		return nil, nil
+	}
+
+	body := pkt[NMP_HDR_SIZE:]
+	return DecodeRspBody(hdr, body)
+}
+
+// Returns true if the response was dispatched.
+func (nd *NmpDispatcher) DispatchRsp(r NmpRsp) bool {
+	log.Debugf("Received nmp rsp: %+v", r)
+
+	nl := nd.seqListenerMap[r.Hdr().Seq]
+	if nl == nil {
+		return false
+	}
+
+	nl.RspChan <- r
+
+	return true
+}
+
+// Returns true if the response was dispatched.
+func (nd *NmpDispatcher) Dispatch(data []byte) bool {
+	nd.mutex.Lock()
+	defer nd.mutex.Unlock()
+
+	pkt := nd.reassembler.RxFrag(data)
+	if pkt == nil {
+		return false
+	}
+
+	rsp, err := decodeRsp(pkt)
+	if err != nil {
+		log.Printf("Failure decoding NMP rsp: %s\npacket=\n%s", err.Error(),
+			hex.Dump(data))
+		return false
+	}
+
+	if rsp == nil {
+		// Packet wasn't a response.
+		return false
+	}
+
+	return nd.DispatchRsp(rsp)
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/echo.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/echo.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/echo.go
new file mode 100644
index 0000000..e8e334b
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/echo.go
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+type EchoReq struct {
+	NmpBase
+	Payload string `codec:"d"`
+}
+
+type EchoRsp struct {
+	NmpBase
+	Payload string `codec:"r"`
+	Rc      int    `codec:"rc" codec:",omitempty"`
+}
+
+func NewEchoReq() *EchoReq {
+	r := &EchoReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_DEFAULT, NMP_ID_DEF_ECHO)
+	return r
+}
+
+func (r *EchoReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewEchoRsp() *EchoRsp {
+	return &EchoRsp{}
+}
+
+func (r *EchoRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/frag.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/frag.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/frag.go
new file mode 100644
index 0000000..31ee392
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/frag.go
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import (
+	log "github.com/Sirupsen/logrus"
+)
+
+type Reassembler struct {
+	cur []byte
+}
+
+func NewReassembler() *Reassembler {
+	return &Reassembler{}
+}
+
+func (r *Reassembler) RxFrag(frag []byte) []byte {
+	r.cur = append(r.cur, frag...)
+
+	hdr, err := DecodeNmpHdr(r.cur)
+	if err != nil {
+		// Incomplete header.
+		return nil
+	}
+
+	actualLen := len(r.cur) - NMP_HDR_SIZE
+	if actualLen > int(hdr.Len) {
+		// More data than expected.  Discard packet.
+		log.Debugf("received invalid nmp packet; hdr.len=%d actualLen=%d",
+			hdr.Len, actualLen)
+		r.cur = nil
+		return nil
+	}
+
+	if actualLen < int(hdr.Len) {
+		// More fragments to come.
+		return nil
+	}
+
+	// Packet complete
+	pkt := r.cur
+	r.cur = nil
+	return pkt
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/fs.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/fs.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/fs.go
new file mode 100644
index 0000000..91083de
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/fs.go
@@ -0,0 +1,86 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+//////////////////////////////////////////////////////////////////////////////
+// $download                                                                //
+//////////////////////////////////////////////////////////////////////////////
+
+type FsDownloadReq struct {
+	NmpBase
+	Name string `codec:"name"`
+	Off  uint32 `codec:"off"`
+}
+
+type FsDownloadRsp struct {
+	NmpBase
+	Rc   int    `codec:"rc" codec:",omitempty"`
+	Off  uint32 `codec:"off"`
+	Len  uint32 `codec:"len"`
+	Data []byte `codec:"data"`
+}
+
+func NewFsDownloadReq() *FsDownloadReq {
+	r := &FsDownloadReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_FS, NMP_ID_FS_FILE)
+	return r
+}
+
+func (r *FsDownloadReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewFsDownloadRsp() *FsDownloadRsp {
+	return &FsDownloadRsp{}
+}
+
+func (r *FsDownloadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $upload                                                                  //
+//////////////////////////////////////////////////////////////////////////////
+
+type FsUploadReq struct {
+	NmpBase
+	Name string `codec:"name" codec:",omitempty"`
+	Len  uint32 `codec:"len" codec:",omitempty"`
+	Off  uint32 `codec:"off"`
+	Data []byte `codec:"data"`
+}
+
+type FsUploadRsp struct {
+	NmpBase
+	Rc  int    `codec:"rc" codec:",omitempty"`
+	Off uint32 `codec:"off"`
+}
+
+func NewFsUploadReq() *FsUploadReq {
+	r := &FsUploadReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_FS, NMP_ID_FS_FILE)
+	return r
+}
+
+func (r *FsUploadReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewFsUploadRsp() *FsUploadRsp {
+	return &FsUploadRsp{}
+}
+
+func (r *FsUploadRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/image.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/image.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/image.go
new file mode 100644
index 0000000..ac2d9a0
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/image.go
@@ -0,0 +1,215 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+//////////////////////////////////////////////////////////////////////////////
+// $upload                                                                  //
+//////////////////////////////////////////////////////////////////////////////
+
+type ImageUploadReq struct {
+	NmpBase
+	Off  uint32 `codec:"off"`
+	Len  uint32 `codec:"len" codec:",omitempty"`
+	Data []byte `codec:"data"`
+}
+
+type ImageUploadRsp struct {
+	NmpBase
+	Rc  int    `codec:"rc" codec:",omitempty"`
+	Off uint32 `codec:"off"`
+}
+
+func NewImageUploadReq() *ImageUploadReq {
+	r := &ImageUploadReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_IMAGE, NMP_ID_IMAGE_UPLOAD)
+	return r
+}
+
+func (r *ImageUploadReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewImageUploadRsp() *ImageUploadRsp {
+	return &ImageUploadRsp{}
+}
+
+func (r *ImageUploadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $state                                                                   //
+//////////////////////////////////////////////////////////////////////////////
+
+type SplitStatus int
+
+const (
+	NOT_APPLICABLE SplitStatus = iota
+	NOT_MATCHING
+	MATCHING
+)
+
+/* returns the enum as a string */
+func (sm SplitStatus) String() string {
+	names := map[SplitStatus]string{
+		NOT_APPLICABLE: "N/A",
+		NOT_MATCHING:   "non-matching",
+		MATCHING:       "matching",
+	}
+
+	str := names[sm]
+	if str == "" {
+		return "Unknown!"
+	}
+	return str
+}
+
+type ImageStateEntry struct {
+	NmpBase
+	Slot      int    `codec:"slot"`
+	Version   string `codec:"version"`
+	Hash      []byte `codec:"hash"`
+	Bootable  bool   `codec:"bootable"`
+	Pending   bool   `codec:"pending"`
+	Confirmed bool   `codec:"confirmed"`
+	Active    bool   `codec:"active"`
+	Permanent bool   `codec:"permanent"`
+}
+
+type ImageStateReadReq struct {
+	NmpBase
+}
+
+type ImageStateWriteReq struct {
+	NmpBase
+	Hash    []byte `codec:"hash"`
+	Confirm bool   `codec:"confirm"`
+}
+
+type ImageStateRsp struct {
+	NmpBase
+	Rc          int               `codec:"rc"`
+	Images      []ImageStateEntry `codec:"images"`
+	SplitStatus SplitStatus       `codec:"splitStatus"`
+}
+
+func NewImageStateReadReq() *ImageStateReadReq {
+	r := &ImageStateReadReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_IMAGE, NMP_ID_IMAGE_STATE)
+	return r
+}
+
+func (r *ImageStateReadReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewImageStateWriteReq() *ImageStateWriteReq {
+	r := &ImageStateWriteReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_IMAGE, NMP_ID_IMAGE_STATE)
+	return r
+}
+
+func (r *ImageStateWriteReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewImageStateRsp() *ImageStateRsp {
+	return &ImageStateRsp{}
+}
+
+func (r *ImageStateRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $corelist                                                                //
+//////////////////////////////////////////////////////////////////////////////
+
+type CoreListReq struct {
+	NmpBase
+}
+
+type CoreListRsp struct {
+	NmpBase
+	Rc int `codec:"rc"`
+}
+
+func NewCoreListReq() *CoreListReq {
+	r := &CoreListReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_IMAGE, NMP_ID_IMAGE_CORELIST)
+	return r
+}
+
+func (r *CoreListReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewCoreListRsp() *CoreListRsp {
+	return &CoreListRsp{}
+}
+
+func (r *CoreListRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $coreload                                                                //
+//////////////////////////////////////////////////////////////////////////////
+
+type CoreLoadReq struct {
+	NmpBase
+	Off uint32 `codec:"off"`
+}
+
+type CoreLoadRsp struct {
+	NmpBase
+	Rc   int    `codec:"rc"`
+	Off  uint32 `codec:"off"`
+	Data []byte `codec:"data"`
+}
+
+func NewCoreLoadReq() *CoreLoadReq {
+	r := &CoreLoadReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_IMAGE, NMP_ID_IMAGE_CORELOAD)
+	return r
+}
+
+func (r *CoreLoadReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewCoreLoadRsp() *CoreLoadRsp {
+	return &CoreLoadRsp{}
+}
+
+func (r *CoreLoadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $coreerase                                                               //
+//////////////////////////////////////////////////////////////////////////////
+
+type CoreEraseReq struct {
+	NmpBase
+}
+
+type CoreEraseRsp struct {
+	NmpBase
+	Rc int `codec:"rc"`
+}
+
+func NewCoreEraseReq() *CoreEraseReq {
+	r := &CoreEraseReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_IMAGE, NMP_ID_IMAGE_CORELOAD)
+	return r
+}
+
+func (r *CoreEraseReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewCoreEraseRsp() *CoreEraseRsp {
+	return &CoreEraseRsp{}
+}
+
+func (r *CoreEraseRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/log.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/log.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/log.go
new file mode 100644
index 0000000..e03376f
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/log.go
@@ -0,0 +1,260 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+//////////////////////////////////////////////////////////////////////////////
+// $defs                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+const (
+	LEVEL_DEBUG    int = 0
+	LEVEL_INFO         = 1
+	LEVEL_WARN         = 2
+	LEVEL_ERROR        = 3
+	LEVEL_CRITICAL     = 4
+	/* Upto 7 custom loglevels */
+	LEVEL_MAX = 255
+)
+
+const (
+	STREAM_LOG  int = 0
+	MEMORY_LOG      = 1
+	STORAGE_LOG     = 2
+)
+
+const (
+	MODULE_DEFAULT     int = 0
+	MODULE_OS              = 1
+	MODULE_NEWTMGR         = 2
+	MODULE_NIMBLE_CTLR     = 3
+	MODULE_NIMBLE_HOST     = 4
+	MODULE_NFFS            = 5
+	MODULE_REBOOT          = 6
+	MODULE_TEST            = 8
+	MODULE_MAX             = 255
+)
+
+var LogModuleNameMap = map[int]string{
+	MODULE_DEFAULT:     "DEFAULT",
+	MODULE_OS:          "OS",
+	MODULE_NEWTMGR:     "NEWTMGR",
+	MODULE_NIMBLE_CTLR: "NIMBLE_CTLR",
+	MODULE_NIMBLE_HOST: "NIMBLE_HOST",
+	MODULE_NFFS:        "NFFS",
+	MODULE_REBOOT:      "REBOOT",
+	MODULE_TEST:        "TEST",
+}
+
+var LogLevelNameMap = map[int]string{
+	LEVEL_DEBUG:    "DEBUG",
+	LEVEL_INFO:     "INFO",
+	LEVEL_WARN:     "WARN",
+	LEVEL_ERROR:    "ERROR",
+	LEVEL_CRITICAL: "CRITICAL",
+}
+
+var LogTypeNameMap = map[int]string{
+	STREAM_LOG:  "STREAM",
+	MEMORY_LOG:  "MEMORY",
+	STORAGE_LOG: "STORAGE",
+}
+
+func LogModuleToString(lm int) string {
+	name := LogModuleNameMap[lm]
+	if name == "" {
+		name = "CUSTOM"
+	}
+	return name
+}
+
+func LogLevelToString(lm int) string {
+	name := LogLevelNameMap[lm]
+	if name == "" {
+		name = "CUSTOM"
+	}
+	return name
+}
+
+func LogTypeToString(lm int) string {
+	name := LogTypeNameMap[lm]
+	if name == "" {
+		name = "UNDEFINED"
+	}
+	return name
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $show                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type LogShowReq struct {
+	NmpBase
+	Name      string `codec:"log_name"`
+	Timestamp int64  `codec:"ts"`
+	Index     uint32 `codec:"index"`
+}
+
+type LogEntry struct {
+	Index     uint32 `codec:"index"`
+	Timestamp int64  `codec:"ts"`
+	Module    uint8  `codec:"module"`
+	Level     uint8  `codec:"level"`
+	Msg       string `codec:"msg"`
+}
+
+type LogShowLog struct {
+	Name    string     `codec:"name"`
+	Type    int        `codec:"type"`
+	Entries []LogEntry `codec:"entries"`
+}
+
+type LogShowRsp struct {
+	NmpBase
+	Rc        int          `codec:"rc" codec:",omitempty"`
+	NextIndex uint32       `codec:"next_index"`
+	Logs      []LogShowLog `codec:"logs"`
+}
+
+func NewLogShowReq() *LogShowReq {
+	r := &LogShowReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_LOG, NMP_ID_LOG_SHOW)
+	return r
+}
+
+func (r *LogShowReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewLogShowRsp() *LogShowRsp {
+	return &LogShowRsp{}
+}
+
+func (r *LogShowRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $list                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type LogListReq struct {
+	NmpBase
+}
+
+type LogListRsp struct {
+	NmpBase
+	Rc   int      `codec:"rc" codec:",omitempty"`
+	List []string `codec:"log_list"`
+}
+
+func NewLogListReq() *LogListReq {
+	r := &LogListReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_LOG, NMP_ID_LOG_LIST)
+	return r
+}
+
+func (r *LogListReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewLogListRsp() *LogListRsp {
+	return &LogListRsp{}
+}
+
+func (r *LogListRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $module list                                                             //
+//////////////////////////////////////////////////////////////////////////////
+
+type LogModuleListReq struct {
+	NmpBase
+}
+
+type LogModuleListRsp struct {
+	NmpBase
+	Rc  int            `codec:"rc" codec:",omitempty"`
+	Map map[string]int `codec:"module_map"`
+}
+
+func NewLogModuleListReq() *LogModuleListReq {
+	r := &LogModuleListReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_LOG, NMP_ID_LOG_MODULE_LIST)
+	return r
+}
+
+func (r *LogModuleListReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewLogModuleListRsp() *LogModuleListRsp {
+	return &LogModuleListRsp{}
+}
+
+func (r *LogModuleListRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $level list                                                              //
+//////////////////////////////////////////////////////////////////////////////
+
+type LogLevelListReq struct {
+	NmpBase
+}
+
+type LogLevelListRsp struct {
+	NmpBase
+	Rc  int            `codec:"rc" codec:",omitempty"`
+	Map map[string]int `codec:"module_map"`
+}
+
+func NewLogLevelListReq() *LogLevelListReq {
+	r := &LogLevelListReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_LOG, NMP_ID_LOG_LEVEL_LIST)
+	return r
+}
+
+func (r *LogLevelListReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewLogLevelListRsp() *LogLevelListRsp {
+	return &LogLevelListRsp{}
+}
+
+func (r *LogLevelListRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $clear                                                                   //
+//////////////////////////////////////////////////////////////////////////////
+
+type LogClearReq struct {
+	NmpBase
+}
+
+type LogClearRsp struct {
+	NmpBase
+	Rc int `codec:"rc" codec:",omitempty"`
+}
+
+func NewLogClearReq() *LogClearReq {
+	r := &LogClearReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_LOG, NMP_ID_LOG_CLEAR)
+	return r
+}
+
+func (r *LogClearReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewLogClearRsp() *LogClearRsp {
+	return &LogClearRsp{}
+}
+
+func (r *LogClearRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/mpstat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/mpstat.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/mpstat.go
new file mode 100644
index 0000000..f2313e9
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/mpstat.go
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+type MempoolStatReq struct {
+	NmpBase
+}
+
+type MempoolStatRsp struct {
+	NmpBase
+	Rc     int                       `codec:"rc"`
+	Mpools map[string]map[string]int `codec:"mpools"`
+}
+
+func NewMempoolStatReq() *MempoolStatReq {
+	r := &MempoolStatReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_DEFAULT, NMP_ID_DEF_MPSTAT)
+	return r
+}
+
+func (r *MempoolStatReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewMempoolStatRsp() *MempoolStatRsp {
+	return &MempoolStatRsp{}
+}
+
+func (r *MempoolStatRsp) Msg() *NmpMsg { return MsgFromReq(r) }



[50/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/paths.go
----------------------------------------------------------------------
diff --git a/newt/builder/paths.go b/newt/builder/paths.go
deleted file mode 100644
index 5beb6b3..0000000
--- a/newt/builder/paths.go
+++ /dev/null
@@ -1,185 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"path/filepath"
-
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/util"
-)
-
-const BUILD_NAME_APP = "app"
-const BUILD_NAME_LOADER = "loader"
-
-func BinRoot() string {
-	return project.GetProject().Path() + "/bin"
-}
-
-func TargetBinDir(targetName string) string {
-	return BinRoot() + "/" + targetName
-}
-
-func GeneratedBaseDir(targetName string) string {
-	return BinRoot() + "/" + targetName + "/generated"
-}
-
-func GeneratedSrcDir(targetName string) string {
-	return GeneratedBaseDir(targetName) + "/src"
-}
-
-func GeneratedIncludeDir(targetName string) string {
-	return GeneratedBaseDir(targetName) + "/include"
-}
-
-func GeneratedBinDir(targetName string) string {
-	return GeneratedBaseDir(targetName) + "/bin"
-}
-
-func SysinitArchivePath(targetName string) string {
-	return GeneratedBinDir(targetName) + "/sysinit.a"
-}
-
-func PkgSyscfgPath(pkgPath string) string {
-	return pkgPath + "/" + pkg.SYSCFG_YAML_FILENAME
-}
-
-func BinDir(targetName string, buildName string) string {
-	return BinRoot() + "/" + targetName + "/" + buildName
-}
-
-func FileBinDir(targetName string, buildName string, pkgName string) string {
-	return BinDir(targetName, buildName) + "/" + pkgName
-}
-
-func PkgBinDir(targetName string, buildName string, pkgName string,
-	pkgType interfaces.PackageType) string {
-
-	switch pkgType {
-	case pkg.PACKAGE_TYPE_GENERATED:
-		return GeneratedBinDir(targetName)
-	default:
-		return FileBinDir(targetName, buildName, pkgName)
-	}
-}
-
-func ArchivePath(targetName string, buildName string, pkgName string,
-	pkgType interfaces.PackageType) string {
-
-	filename := util.FilenameFromPath(pkgName) + ".a"
-	return PkgBinDir(targetName, buildName, pkgName, pkgType) + "/" + filename
-}
-
-func AppElfPath(targetName string, buildName string, appName string) string {
-	return FileBinDir(targetName, buildName, appName) + "/" +
-		filepath.Base(appName) + ".elf"
-}
-
-func AppBinPath(targetName string, buildName string, appName string) string {
-	return AppElfPath(targetName, buildName, appName) + ".bin"
-}
-
-func TestExePath(targetName string, buildName string, pkgName string,
-	pkgType interfaces.PackageType) string {
-
-	return PkgBinDir(targetName, buildName, pkgName, pkgType) + "/" +
-		TestTargetName(pkgName) + ".elf"
-}
-
-func ManifestPath(targetName string, buildName string, pkgName string) string {
-	return FileBinDir(targetName, buildName, pkgName) + "/manifest.json"
-}
-
-func AppImgPath(targetName string, buildName string, appName string) string {
-	return FileBinDir(targetName, buildName, appName) + "/" +
-		filepath.Base(appName) + ".img"
-}
-
-func MfgBinDir(mfgPkgName string) string {
-	return BinRoot() + "/" + mfgPkgName
-}
-
-func MfgBootDir(mfgPkgName string) string {
-	return MfgBinDir(mfgPkgName) + "/bootloader"
-}
-
-func (b *Builder) BinDir() string {
-	return BinDir(b.targetPkg.rpkg.Lpkg.Name(), b.buildName)
-}
-
-func (b *Builder) FileBinDir(pkgName string) string {
-	return FileBinDir(b.targetPkg.rpkg.Lpkg.Name(), b.buildName, pkgName)
-}
-
-func (b *Builder) PkgBinDir(bpkg *BuildPackage) string {
-	return PkgBinDir(b.targetPkg.rpkg.Lpkg.Name(), b.buildName, bpkg.rpkg.Lpkg.Name(),
-		bpkg.rpkg.Lpkg.Type())
-}
-
-// Generates the path+filename of the specified package's .a file.
-func (b *Builder) ArchivePath(bpkg *BuildPackage) string {
-	return ArchivePath(b.targetPkg.rpkg.Lpkg.Name(), b.buildName, bpkg.rpkg.Lpkg.Name(),
-		bpkg.rpkg.Lpkg.Type())
-}
-
-func (b *Builder) AppTentativeElfPath() string {
-	return b.PkgBinDir(b.appPkg) + "/" + filepath.Base(b.appPkg.rpkg.Lpkg.Name()) +
-		"_tmp.elf"
-}
-
-func (b *Builder) AppElfPath() string {
-	return AppElfPath(b.targetPkg.rpkg.Lpkg.Name(), b.buildName,
-		b.appPkg.rpkg.Lpkg.Name())
-}
-
-func (b *Builder) AppLinkerElfPath() string {
-	return b.PkgBinDir(b.appPkg) + "/" + filepath.Base(b.appPkg.rpkg.Lpkg.Name()) +
-		"linker.elf"
-}
-
-func (b *Builder) AppImgPath() string {
-	return b.PkgBinDir(b.appPkg) + "/" + filepath.Base(b.appPkg.rpkg.Lpkg.Name()) +
-		".img"
-}
-
-func (b *Builder) AppBinPath() string {
-	return b.AppElfPath() + ".bin"
-}
-
-func (b *Builder) AppPath() string {
-	return b.PkgBinDir(b.appPkg) + "/"
-}
-
-func (b *Builder) TestExePath(bpkg *BuildPackage) string {
-	return TestExePath(b.targetPkg.rpkg.Lpkg.Name(), b.buildName,
-		bpkg.rpkg.Lpkg.Name(), bpkg.rpkg.Lpkg.Type())
-}
-
-func (b *Builder) ManifestPath() string {
-	return ManifestPath(b.targetPkg.rpkg.Lpkg.Name(), b.buildName,
-		b.appPkg.rpkg.Lpkg.Name())
-}
-
-func (b *Builder) AppBinBasePath() string {
-	return b.PkgBinDir(b.appPkg) + "/" +
-		filepath.Base(b.appPkg.rpkg.Lpkg.Name())
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/selftest.go
----------------------------------------------------------------------
diff --git a/newt/builder/selftest.go b/newt/builder/selftest.go
deleted file mode 100644
index fc7268c..0000000
--- a/newt/builder/selftest.go
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"fmt"
-	"os"
-	"path/filepath"
-	"strings"
-
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/newt/resolve"
-	"mynewt.apache.org/newt/util"
-)
-
-func (b *Builder) getTestBpkg(rpkg *resolve.ResolvePackage) (
-	*BuildPackage, error) {
-
-	testBpkg := b.PkgMap[rpkg]
-	if testBpkg == nil {
-		return nil, util.FmtNewtError("builder missing test package: %s",
-			rpkg.Lpkg.FullName())
-	}
-
-	return testBpkg, nil
-}
-
-func (b *Builder) SelfTestLink(rpkg *resolve.ResolvePackage) error {
-	testBpkg, err := b.getTestBpkg(rpkg)
-	if err != nil {
-		return err
-	}
-
-	testPath := b.TestExePath(testBpkg)
-	if err := b.link(testPath, nil, nil); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (t *TargetBuilder) getTestRpkg() (*resolve.ResolvePackage, error) {
-	testRpkg := t.res.LpkgRpkgMap[t.testPkg]
-	if testRpkg == nil {
-		return nil, util.FmtNewtError("resolution missing test package: %s",
-			t.testPkg.FullName())
-	}
-
-	return testRpkg, nil
-}
-
-func (t *TargetBuilder) SelfTestCreateExe() error {
-	if err := t.PrepBuild(); err != nil {
-		return err
-	}
-
-	if err := t.AppBuilder.Build(); err != nil {
-		return err
-	}
-
-	testRpkg, err := t.getTestRpkg()
-	if err != nil {
-		return err
-	}
-
-	if err := t.AppBuilder.SelfTestLink(testRpkg); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (t *TargetBuilder) SelfTestExecute() error {
-	if err := t.SelfTestCreateExe(); err != nil {
-		return err
-	}
-
-	testRpkg, err := t.getTestRpkg()
-	if err != nil {
-		return err
-	}
-
-	if err := t.AppBuilder.SelfTestExecute(testRpkg); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (t *TargetBuilder) SelfTestDebug() error {
-	if err := t.PrepBuild(); err != nil {
-		return err
-	}
-
-	testRpkg, err := t.getTestRpkg()
-	if err != nil {
-		return err
-	}
-
-	testBpkg, err := t.AppBuilder.getTestBpkg(testRpkg)
-	if err != nil {
-		return err
-	}
-
-	return t.AppBuilder.debugBin(
-		strings.TrimSuffix(t.AppBuilder.TestExePath(testBpkg), ".elf"),
-		"", false, false)
-}
-
-func (b *Builder) testOwner(bpkg *BuildPackage) *BuildPackage {
-	if bpkg.rpkg.Lpkg.Type() != pkg.PACKAGE_TYPE_UNITTEST {
-		panic("Expected unittest package; got: " + bpkg.rpkg.Lpkg.Name())
-	}
-
-	curPath := bpkg.rpkg.Lpkg.BasePath()
-
-	for {
-		parentPath := filepath.Dir(curPath)
-		if parentPath == project.GetProject().BasePath || parentPath == "." {
-			return nil
-		}
-
-		parentPkg := b.pkgWithPath(parentPath)
-		if parentPkg != nil &&
-			parentPkg.rpkg.Lpkg.Type() != pkg.PACKAGE_TYPE_UNITTEST {
-
-			return parentPkg
-		}
-
-		curPath = parentPath
-	}
-}
-
-func (b *Builder) SelfTestExecute(testRpkg *resolve.ResolvePackage) error {
-	testBpkg, err := b.getTestBpkg(testRpkg)
-	if err != nil {
-		return err
-	}
-
-	testPath := b.TestExePath(testBpkg)
-	if err := os.Chdir(filepath.Dir(testPath)); err != nil {
-		return err
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "Executing test: %s\n",
-		testPath)
-	cmd := []string{testPath}
-	if _, err := util.ShellCommand(cmd, nil); err != nil {
-		newtError := err.(*util.NewtError)
-		newtError.Text = fmt.Sprintf("Test failure (%s):\n%s",
-			testRpkg.Lpkg.Name(), newtError.Text)
-		return newtError
-	}
-
-	return nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/size.go
----------------------------------------------------------------------
diff --git a/newt/builder/size.go b/newt/builder/size.go
deleted file mode 100644
index 7cdcc45..0000000
--- a/newt/builder/size.go
+++ /dev/null
@@ -1,534 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"bufio"
-	"fmt"
-	"os"
-	"path/filepath"
-	"sort"
-	"strconv"
-	"strings"
-
-	"mynewt.apache.org/newt/newt/image"
-	"mynewt.apache.org/newt/util"
-)
-
-/*
- * These are different memory regions as specified in linker script.
- */
-type MemSection struct {
-	Name   string
-	Offset uint64
-	EndOff uint64
-}
-type MemSectionArray []*MemSection
-
-var globalMemSections map[string]*MemSection
-
-func (array MemSectionArray) Len() int {
-	return len(array)
-}
-
-func (array MemSectionArray) Less(i, j int) bool {
-	return array[i].Offset < array[j].Offset
-}
-
-func (array MemSectionArray) Swap(i, j int) {
-	array[i], array[j] = array[j], array[i]
-}
-
-func MakeMemSection(name string, off uint64, size uint64) *MemSection {
-	memsection := &MemSection{
-		Name:   name,
-		Offset: off,
-		EndOff: off + size,
-	}
-	return memsection
-}
-
-func (m *MemSection) PartOf(addr uint64) bool {
-	if addr >= m.Offset && addr < m.EndOff {
-		return true
-	} else {
-		return false
-	}
-}
-
-/*
- * Info about specific symbol size
- */
-type SymbolData struct {
-	Name    string
-	ObjName string            /* Which object file it came from */
-	Sizes   map[string]uint32 /* Sizes indexed by mem section name */
-}
-
-type SymbolDataArray []*SymbolData
-
-/*
- * We accumulate the size of libraries to elements in this.
- */
-type PkgSize struct {
-	Name  string
-	Sizes map[string]uint32      /* Sizes indexed by mem section name */
-	Syms  map[string]*SymbolData /* Symbols indexed by symbol name */
-}
-
-type PkgSizeArray []*PkgSize
-
-func (array PkgSizeArray) Len() int {
-	return len(array)
-}
-
-func (array PkgSizeArray) Less(i, j int) bool {
-	return array[i].Name < array[j].Name
-}
-
-func (array PkgSizeArray) Swap(i, j int) {
-	array[i], array[j] = array[j], array[i]
-}
-
-func (array SymbolDataArray) Len() int {
-	return len(array)
-}
-
-func (array SymbolDataArray) Less(i, j int) bool {
-	return array[i].Name < array[j].Name
-}
-
-func (array SymbolDataArray) Swap(i, j int) {
-	array[i], array[j] = array[j], array[i]
-}
-
-func MakeSymbolData(name string, objName string) *SymbolData {
-	sym := &SymbolData{
-		Name:    name,
-		ObjName: objName,
-	}
-	sym.Sizes = make(map[string]uint32)
-	for _, sec := range globalMemSections {
-		sym.Sizes[sec.Name] = 0
-	}
-	return sym
-}
-
-func MakePkgSize(name string) *PkgSize {
-	pkgSize := &PkgSize{
-		Name: name,
-	}
-	pkgSize.Sizes = make(map[string]uint32)
-	for _, sec := range globalMemSections {
-		pkgSize.Sizes[sec.Name] = 0
-	}
-	pkgSize.Syms = make(map[string]*SymbolData)
-	return pkgSize
-}
-
-func (ps *PkgSize) addSymSize(symName string, objName string, size uint32, addr uint64) {
-	for _, section := range globalMemSections {
-		if section.PartOf(addr) {
-			name := section.Name
-			size32 := uint32(size)
-			if size32 > 0 {
-				sym := ps.Syms[symName]
-				if sym == nil {
-					sym = MakeSymbolData(symName, objName)
-					ps.Syms[symName] = sym
-				}
-				ps.Sizes[name] += size32
-				sym.Sizes[name] += size32
-			}
-			break
-		}
-	}
-}
-
-/*
- * Go through GCC generated mapfile, and collect info about symbol sizes
- */
-func ParseMapFileSizes(fileName string) (map[string]*PkgSize, error) {
-	var state int = 0
-
-	file, err := os.Open(fileName)
-	if err != nil {
-		return nil, util.NewNewtError("Mapfile failed: " + err.Error())
-	}
-
-	var symName string = ""
-
-	globalMemSections = make(map[string]*MemSection)
-	pkgSizes := make(map[string]*PkgSize)
-	scanner := bufio.NewScanner(file)
-	for scanner.Scan() {
-		switch state {
-		case 0:
-			if strings.Contains(scanner.Text(), "Memory Configuration") {
-				state = 1
-			}
-		case 1:
-			if strings.Contains(scanner.Text(), "Origin") {
-				state = 2
-			}
-		case 2:
-			if strings.Contains(scanner.Text(), "*default*") {
-				state = 3
-				continue
-			}
-			array := strings.Fields(scanner.Text())
-			offset, err := strconv.ParseUint(array[1], 0, 64)
-			if err != nil {
-				return nil, util.NewNewtError("Can't parse mem info")
-			}
-			size, err := strconv.ParseUint(array[2], 0, 64)
-			if err != nil {
-				return nil, util.NewNewtError("Can't parse mem info")
-			}
-			globalMemSections[array[0]] = MakeMemSection(array[0], offset,
-				size)
-		case 3:
-			if strings.Contains(scanner.Text(),
-				"Linker script and memory map") {
-				state = 4
-			}
-		case 4:
-			var addrStr string = ""
-			var sizeStr string = ""
-			var srcFile string = ""
-
-			if strings.Contains(scanner.Text(), "/DISCARD/") ||
-				strings.HasPrefix(scanner.Text(), "OUTPUT(") {
-				/*
-				 * After this there is only discarded symbols
-				 */
-				state = 5
-				continue
-			}
-
-			array := strings.Fields(scanner.Text())
-			switch len(array) {
-			case 1:
-				/*
-				 * section name on it's own, e.g.
-				 * *(.text*)
-				 *
-				 * section name + symbol name, e.g.
-				 * .text.Reset_Handler
-				 *
-				 * ignore these for now
-				 */
-				symName = array[0]
-				continue
-			case 2:
-				/*
-				 * Either stuff from beginning to first useful data e.g.
-				 * END GROUP
-				 *
-				 * or address of symbol + symbol name, e.g.
-				 * 0x00000000080002c8                SystemInit
-				 *
-				 * or section names with multiple input things, e.g.
-				 * *(.ARM.extab* .gnu.linkonce.armextab.*)
-				 *
-				 * or space set aside in linker script e.g.
-				 * 0x0000000020002e80      0x400
-				 * (that's the initial stack)
-				 *
-				 * ignore these for now
-				 */
-				continue
-			case 3:
-				/*
-				 * address, size, and name of file, e.g.
-				 * 0x000000000800bb04     0x1050 /Users/marko/foo/tadpole/hw//mcu/stm/stm32f3xx/bin/blinky_f3/libstm32f3xx.a(stm32f30x_syscfg.o)
-				 *
-				 * padding, or empty areas defined in linker script:
-				 * *fill*         0x000000000800cb71        0x3
-				 *
-				 * output section name, location, size, e.g.:
-				 * .bss            0x0000000020000ab0     0x23d0
-				 */
-				/*
-				 * Record addr, size and name to find library.
-				 */
-				if array[0] == "*fill*" {
-					addrStr = array[1]
-					sizeStr = array[2]
-					srcFile = array[0]
-					symName = array[0]
-				} else {
-					addrStr = array[0]
-					sizeStr = array[1]
-					srcFile = array[2]
-				}
-			case 4:
-				/*
-				 * section, address, size, name of file, e.g.
-				 * COMMON         0x0000000020002d28        0x8 /Users/marko/foo/tadpole/libs//os/bin/blinky_f3/libos.a(os_arch_arm.o)
-				 *
-				 * linker script symbol definitions:
-				 * 0x0000000020002e80                _ebss = .
-				 *
-				 * crud, e.g.:
-				 * 0x8 (size before relaxing)
-				 */
-				symName = array[0]
-				addrStr = array[1]
-				sizeStr = array[2]
-				srcFile = array[3]
-			default:
-				continue
-			}
-			addr, err := strconv.ParseUint(addrStr, 0, 64)
-			if err != nil {
-				continue
-			}
-			size, err := strconv.ParseUint(sizeStr, 0, 64)
-			if err != nil {
-				continue
-			}
-			if size == 0 {
-				continue
-			}
-			tmpStrArr := strings.Split(srcFile, "(")
-			srcLib := tmpStrArr[0]
-			objName := ""
-			if srcLib != "*fill*" {
-				tmpStrArr = strings.Split(tmpStrArr[1], ")")
-				objName = tmpStrArr[0]
-			}
-			tmpStrArr = strings.Split(symName, ".")
-			if len(tmpStrArr) > 2 {
-				if tmpStrArr[1] == "rodata" && tmpStrArr[2] == "str1" {
-					symName = ".rodata.str1"
-				} else {
-					symName = tmpStrArr[2]
-				}
-			}
-			pkgSize := pkgSizes[srcLib]
-			if pkgSize == nil {
-				pkgSize = MakePkgSize(srcLib)
-				pkgSizes[srcLib] = pkgSize
-			}
-			pkgSize.addSymSize(symName, objName, uint32(size), addr)
-			symName = ".unknown"
-		default:
-		}
-	}
-	file.Close()
-	for name, section := range globalMemSections {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "Mem %s: 0x%x-0x%x\n",
-			name, section.Offset, section.EndOff)
-	}
-
-	return pkgSizes, nil
-}
-
-/*
- * Return a printable string containing size data for the libraries
- */
-func PrintSizes(libs map[string]*PkgSize) error {
-	/*
-	 * Order sections by offset, and display lib sizes in that order.
-	 */
-	memSections := make(MemSectionArray, len(globalMemSections))
-	var i int = 0
-	for _, sec := range globalMemSections {
-		memSections[i] = sec
-		i++
-	}
-	sort.Sort(memSections)
-
-	/*
-	 * Order libraries by name, and display them in that order.
-	 */
-	pkgSizes := make(PkgSizeArray, len(libs))
-	i = 0
-	for _, es := range libs {
-		pkgSizes[i] = es
-		i++
-	}
-	sort.Sort(pkgSizes)
-
-	for _, sec := range memSections {
-		fmt.Printf("%7s ", sec.Name)
-	}
-	fmt.Printf("\n")
-	for _, es := range pkgSizes {
-		for i := 0; i < len(memSections); i++ {
-			fmt.Printf("%7d ", es.Sizes[memSections[i].Name])
-		}
-		fmt.Printf("%s\n", filepath.Base(es.Name))
-	}
-
-	return nil
-}
-
-func (t *TargetBuilder) Size() error {
-
-	err := t.PrepBuild()
-
-	if err != nil {
-		return err
-	}
-
-	fmt.Printf("Size of Application Image: %s\n", t.AppBuilder.buildName)
-	err = t.AppBuilder.Size()
-
-	if err == nil {
-		if t.LoaderBuilder != nil {
-			fmt.Printf("Size of Loader Image: %s\n", t.LoaderBuilder.buildName)
-			err = t.LoaderBuilder.Size()
-		}
-	}
-
-	return err
-}
-
-func (b *Builder) FindPkgNameByArName(arName string) string {
-	for rpkg, bpkg := range b.PkgMap {
-		if b.ArchivePath(bpkg) == arName {
-			return rpkg.Lpkg.FullName()
-		}
-	}
-	return filepath.Base(arName)
-}
-
-func (b *Builder) PkgSizes() (*image.ImageManifestSizeCollector, error) {
-	if b.appPkg == nil {
-		return nil, util.NewNewtError("app package not specified for this target")
-	}
-
-	if b.targetBuilder.bspPkg.Arch == "sim" {
-		return nil, util.NewNewtError("'newt size' not supported for sim targets")
-	}
-	mapFile := b.AppElfPath() + ".map"
-
-	libs, err := ParseMapFileSizes(mapFile)
-	if err != nil {
-		return nil, err
-	}
-
-	/*
-	 * Order libraries by name.
-	 */
-	pkgSizes := make(PkgSizeArray, len(libs))
-	i := 0
-	for _, es := range libs {
-		pkgSizes[i] = es
-		i++
-	}
-	sort.Sort(pkgSizes)
-
-	c := image.NewImageManifestSizeCollector()
-	for _, es := range pkgSizes {
-		p := c.AddPkg(b.FindPkgNameByArName(es.Name))
-
-		/*
-		 * Order symbols by name.
-		 */
-		symbols := make(SymbolDataArray, len(es.Syms))
-		i := 0
-		for _, sym := range es.Syms {
-			symbols[i] = sym
-			i++
-		}
-		sort.Sort(symbols)
-		for _, sym := range symbols {
-			for area, areaSz := range sym.Sizes {
-				if areaSz != 0 {
-					p.AddSymbol(sym.ObjName, sym.Name, area, areaSz)
-				}
-			}
-		}
-	}
-
-	return c, nil
-}
-
-func (b *Builder) Size() error {
-	if b.appPkg == nil {
-		return util.NewNewtError("app package not specified for this target")
-	}
-
-	err := b.targetBuilder.PrepBuild()
-	if err != nil {
-		return err
-	}
-	if b.targetBuilder.bspPkg.Arch == "sim" {
-		fmt.Println("'newt size' not supported for sim targets.")
-		return nil
-	}
-	mapFile := b.AppElfPath() + ".map"
-
-	pkgSizes, err := ParseMapFileSizes(mapFile)
-	if err != nil {
-		return err
-	}
-	err = PrintSizes(pkgSizes)
-	if err != nil {
-		return err
-	}
-
-	c, err := b.newCompiler(b.appPkg, b.FileBinDir(b.AppElfPath()))
-	if err != nil {
-		return err
-	}
-
-	fmt.Printf("\nobjsize\n")
-	output, err := c.PrintSize(b.AppElfPath())
-	if err != nil {
-		return err
-	}
-	fmt.Printf("%s", output)
-
-	return nil
-}
-
-func (t *TargetBuilder) SizeReport(ram, flash bool) error {
-
-	err := t.PrepBuild()
-
-	if err != nil {
-		return err
-	}
-
-	fmt.Printf("Size of Application Image: %s\n", t.AppBuilder.buildName)
-	err = t.AppBuilder.SizeReport(ram, flash)
-
-	if err == nil {
-		if t.LoaderBuilder != nil {
-			fmt.Printf("Size of Loader Image: %s\n", t.LoaderBuilder.buildName)
-			err = t.LoaderBuilder.SizeReport(ram, flash)
-		}
-	}
-
-	return err
-}
-
-func (b *Builder) SizeReport(ram, flash bool) error {
-	srcBase := b.targetBuilder.GetTarget().App().Repo().Path() + "/"
-	err := SizeReport(b.AppElfPath(), srcBase, ram, flash)
-	if err != nil {
-		return util.NewNewtError(err.Error())
-	}
-	return nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/size_report.go
----------------------------------------------------------------------
diff --git a/newt/builder/size_report.go b/newt/builder/size_report.go
deleted file mode 100644
index 5c9fa02..0000000
--- a/newt/builder/size_report.go
+++ /dev/null
@@ -1,332 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"bufio"
-	"fmt"
-	"mynewt.apache.org/newt/util"
-	"os"
-	"os/exec"
-	"strconv"
-	"strings"
-)
-
-func runNmCommand(elfFilePath string) ([]byte, error) {
-	var (
-		cmdOut []byte
-		err    error
-	)
-	cmdName := "arm-none-eabi-nm"
-	cmdArgs := []string{elfFilePath, "-S", "-l", "--size-sort", "--radix=d"}
-
-	if cmdOut, err = exec.Command(cmdName, cmdArgs...).Output(); err != nil {
-		fmt.Fprintln(os.Stderr, "There was an error running nm command: ", err)
-		os.Exit(1)
-	}
-
-	return cmdOut, err
-}
-
-func runObjdumpCommand(elfFilePath string, params string) ([]byte, error) {
-	var (
-		cmdOut []byte
-		err    error
-	)
-	cmdName := "arm-none-eabi-objdump"
-	cmdArgs := []string{params, elfFilePath}
-	if cmdOut, err = exec.Command(cmdName, cmdArgs...).Output(); err != nil {
-		fmt.Fprintln(os.Stderr, "There was an error running objdump command: ",
-			err)
-		os.Exit(1)
-	}
-
-	return cmdOut, err
-}
-
-func loadSymbolsAndPaths(elfFilePath, pathToStrip string) (map[string]string,
-	error) {
-	symbolsPath := make(map[string]string)
-
-	nmOut, err := runNmCommand(elfFilePath)
-	if err != nil {
-		return nil, err
-	}
-
-	lines := strings.Split(string(nmOut), "\n")
-
-	for _, line := range lines {
-		fields := strings.Fields(strings.Replace(line, "\t", " ", -1))
-		if len(fields) < 4 {
-			continue
-		}
-		var path string
-
-		if len(fields) < 5 {
-			path = "(other)"
-		} else {
-			path = strings.Split(fields[4], ":")[0]
-		}
-		if pathToStrip != "" {
-			if strings.Contains(path, pathToStrip) {
-				path = strings.Replace(path, pathToStrip, "", -1)
-			} else {
-				path = "(other)"
-			}
-		}
-		symbolsPath[fields[3]] = path
-	}
-	return symbolsPath, nil
-}
-
-func MakeSymbol(name string, section string, size uint64) *Symbol {
-	symbol := &Symbol{
-		name,
-		section,
-		size,
-	}
-	return symbol
-}
-
-type MemoryRegion struct {
-	Name         string
-	Offset       uint64
-	EndOff       uint64
-	TotalSize    uint64
-	SectionNames map[string]struct{}
-	NamesSizes   map[string]uint64
-}
-
-func MakeMemoryRegion() *MemoryRegion {
-	section := &MemoryRegion{
-		"", 0, 0, 0,
-		make(map[string]struct{}),
-		make(map[string]uint64),
-	}
-	return section
-}
-
-func (m *MemoryRegion) PartOf(addr uint64) bool {
-	return addr >= m.Offset && addr < m.EndOff
-}
-
-func loadSymbolsAndSections(elfFilePath string) (map[string]*Symbol, error) {
-	objdumpOut, err := runObjdumpCommand(elfFilePath, "-tw")
-	if err != nil {
-		return nil, err
-	}
-
-	lines := strings.Split(string(objdumpOut), "\n")
-	symbols := make(map[string]*Symbol)
-	for _, line := range lines {
-		fields := strings.Fields(strings.Replace(line, "\t", " ", -1))
-
-		if len(fields) == 5 {
-			size, err := strconv.ParseUint(fields[3], 16, 64)
-			if err != nil {
-				continue
-			}
-			symbols[fields[4]] = MakeSymbol(fields[4], fields[2], size)
-		} else if len(fields) == 6 {
-			size, err := strconv.ParseUint(fields[4], 16, 64)
-			if err != nil {
-				continue
-			}
-			symbols[fields[5]] = MakeSymbol(fields[5], fields[3], size)
-		}
-
-	}
-
-	return symbols, nil
-}
-
-func generateMemoryRegions(elfFilePath string) (*MemoryRegion, *MemoryRegion,
-	error) {
-
-	mapFile := elfFilePath + ".map"
-	flashRegion, ramRegion, err := parseMapFileRegions(mapFile)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	objdumpOut, err := runObjdumpCommand(elfFilePath, "-hw")
-	if err != nil {
-		return nil, nil, err
-	}
-
-	lines := strings.Split(string(objdumpOut), "\n")
-	for _, line := range lines {
-		fields := strings.Fields(line)
-		if len(fields) < 7 {
-			continue
-		}
-		size, err := strconv.ParseUint(fields[2], 16, 64)
-		if err != nil {
-			continue
-		}
-		address, err := strconv.ParseUint(fields[3], 16, 64)
-		if err != nil {
-			continue
-		}
-
-		if flashRegion.PartOf(address) {
-			flashRegion.TotalSize += size
-			flashRegion.SectionNames[fields[1]] = struct{}{}
-			flashRegion.NamesSizes[fields[1]] = size
-			continue
-		}
-
-		if ramRegion.PartOf(address) {
-			ramRegion.TotalSize += size
-			ramRegion.SectionNames[fields[1]] = struct{}{}
-			ramRegion.NamesSizes[fields[1]] = size
-			continue
-		}
-	}
-
-	return flashRegion, ramRegion, nil
-}
-
-/*
- * Go through GCC generated mapfile, and collect info about symbol sizes
- */
-func parseMapFileRegions(fileName string) (*MemoryRegion, *MemoryRegion,
-	error) {
-	var state int = 0
-
-	file, err := os.Open(fileName)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	flashRegion := MakeMemoryRegion()
-	ramRegion := MakeMemoryRegion()
-
-	scanner := bufio.NewScanner(file)
-	for scanner.Scan() {
-		switch state {
-		case 0:
-			if strings.Contains(scanner.Text(), "Memory Configuration") {
-				state = 1
-			}
-		case 1:
-			if strings.Contains(scanner.Text(), "Origin") {
-				state = 2
-			}
-		case 2:
-			if strings.Contains(scanner.Text(), "*default*") {
-				state = 3
-				continue
-			}
-			array := strings.Fields(scanner.Text())
-			offset, err := strconv.ParseUint(array[1], 0, 64)
-			if err != nil {
-				continue
-			}
-			size, err := strconv.ParseUint(array[2], 0, 64)
-			if err != nil {
-				continue
-			}
-			if strings.EqualFold(array[0], "flash") {
-				flashRegion.Name = array[0]
-				flashRegion.Offset = offset
-				flashRegion.EndOff = offset + size
-			} else if strings.EqualFold(array[0], "ram") {
-				ramRegion.Name = array[0]
-				ramRegion.Offset = offset
-				ramRegion.EndOff = offset + size
-			}
-		case 3:
-			fallthrough
-		default:
-			return flashRegion, ramRegion, nil
-		}
-
-	}
-	return flashRegion, flashRegion, nil
-}
-
-func logMemoryRegionStats(flashRegion, ramRegion *MemoryRegion) {
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "%-10s 0x%08x-0x%08x\n",
-		"Mem FLASH:", flashRegion.Offset, flashRegion.EndOff)
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "%-10s 0x%08x-0x%08x\n",
-		"Mem RAM:", ramRegion.Offset, ramRegion.EndOff)
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "\n")
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Mem: FLASH\n")
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "%-20s %10s\n", "Name", "Size")
-	for sectionName, size := range flashRegion.NamesSizes {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "%-20s %10d\n",
-			sectionName, size)
-	}
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "%-20s %10d\n", "Total",
-		flashRegion.TotalSize)
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "\n")
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Mem: RAM\n")
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "%-20s %10s\n", "Name", "Size")
-	for sectionName, size := range ramRegion.NamesSizes {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "%-20s %10d\n",
-			sectionName, size)
-	}
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "%-20s %10d\n", "Total",
-		ramRegion.TotalSize)
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "\n")
-}
-
-func SizeReport(elfFilePath, srcBase string, ram bool, flash bool) error {
-	symbolsPath, err := loadSymbolsAndPaths(elfFilePath, srcBase)
-	if err != nil {
-		return err
-	}
-	loadedSectionSizes, err := loadSymbolsAndSections(elfFilePath)
-	if err != nil {
-		return err
-	}
-	flashRegion, ramRegion, err := generateMemoryRegions(elfFilePath)
-	if err != nil {
-		return err
-	}
-
-	logMemoryRegionStats(flashRegion, ramRegion)
-
-	startPath := "."
-
-	if flash {
-		flashNodes := newFolder(startPath)
-		for _, symbol := range loadedSectionSizes {
-			if _, ok := flashRegion.SectionNames[symbol.Section]; ok {
-				flashNodes.addSymbol(symbol, symbolsPath[symbol.Name])
-			}
-		}
-		fmt.Println("FLASH report:")
-		fmt.Printf("%v", flashNodes.ToString(flashRegion.TotalSize))
-	}
-
-	if ram {
-		ramNodes := newFolder(startPath)
-		for _, symbol := range loadedSectionSizes {
-			if _, ok := ramRegion.SectionNames[symbol.Section]; ok {
-				ramNodes.addSymbol(symbol, symbolsPath[symbol.Name])
-			}
-		}
-		fmt.Println("RAM report:")
-		fmt.Printf("%v", ramNodes.ToString(ramRegion.TotalSize))
-	}
-	return nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/symbol_tree.go
----------------------------------------------------------------------
diff --git a/newt/builder/symbol_tree.go b/newt/builder/symbol_tree.go
deleted file mode 100644
index 2318da1..0000000
--- a/newt/builder/symbol_tree.go
+++ /dev/null
@@ -1,195 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"fmt"
-	"sort"
-	"strings"
-)
-
-type Symbol struct {
-	Name    string
-	Section string
-	Size    uint64
-}
-
-type File struct {
-	Name    string
-	Symbols map[string]*Symbol
-}
-
-type Folder struct {
-	Name    string
-	Files   map[string]*File
-	Folders map[string]*Folder
-}
-
-func newFolder(name string) *Folder {
-	return &Folder{name, make(map[string]*File), make(map[string]*Folder)}
-}
-
-func newFile(name string) *File {
-	return &File{name, make(map[string]*Symbol)}
-}
-
-func (f *File) sumSize() uint64 {
-	var sum uint64
-	for _, symbol := range f.Symbols {
-		sum += symbol.Size
-	}
-	return sum
-}
-
-func (f *Folder) sumSize() uint64 {
-	var sum uint64
-	for _, folder := range f.Folders {
-		sum += folder.sumSize()
-	}
-
-	for _, file := range f.Files {
-		sum += file.sumSize()
-	}
-	return sum
-}
-
-func (f *Folder) getFolder(name string) *Folder {
-	if nextF, ok := f.Folders[name]; ok {
-		return nextF
-	} else {
-		f.Folders[name] = newFolder(name)
-		return f.Folders[name]
-	}
-	return &Folder{} // cannot happen
-}
-
-func (f *Folder) getFile(name string) *File {
-	if nextF, ok := f.Files[name]; ok {
-		return nextF
-	} else {
-		f.Files[name] = newFile(name)
-		return f.Files[name]
-	}
-	return &File{} // cannot happen
-}
-
-func (f *File) getSymbol(name string) *Symbol {
-	if nextF, ok := f.Symbols[name]; ok {
-		return nextF
-	} else {
-		f.Symbols[name] = &Symbol{name, "", 0}
-		return f.Symbols[name]
-	}
-	return &Symbol{} // cannot happen
-}
-
-func (f *Folder) addFolder(path []string) *Folder {
-	if len(path) == 1 {
-		// last segment == new folder
-		return f.getFolder(path[0])
-	} else {
-		return f.getFolder(path[0]).addFolder(path[1:])
-	}
-}
-
-func (f *Folder) addFile(path []string) *File {
-	if len(path) == 1 {
-		// last segment == file
-		return f.getFile(path[0])
-	} else {
-		return f.getFolder(path[0]).addFile(path[1:])
-	}
-}
-
-func (f *Folder) addSymbol(symbol *Symbol, path string) *Symbol {
-	segments := strings.Split(path, "/")
-	file := f.addFile(segments)
-	sym := file.getSymbol(symbol.Name)
-	sym.Section = symbol.Section
-	sym.Size += symbol.Size
-	return sym
-}
-
-var outputFormatting string = "%-59s %9d %8.2f%%\n"
-
-func (f *File) String(indent string, level int, total uint64) string {
-	var str string
-	if f.sumSize() <= 0 {
-		return ""
-	}
-	size := f.sumSize()
-	percent := 100 * float64(size) / float64(total)
-	str += fmt.Sprintf(outputFormatting, strings.Repeat(indent, level)+
-		f.Name, size, percent)
-
-	var sorted []string
-	for symName := range f.Symbols {
-		sorted = append(sorted, symName)
-	}
-	sort.Strings(sorted)
-	for _, sym := range sorted {
-		size := f.Symbols[sym].Size
-		percent := 100 * float64(size) / float64(total)
-		if f.Symbols[sym].Size > 0 {
-			str += fmt.Sprintf(outputFormatting,
-				strings.Repeat(indent, level+1)+ f.Symbols[sym].Name,
-				size, percent)
-		}
-	}
-	return str
-}
-
-func (f *Folder) StringRec(indent string, level int, total uint64) string {
-	var str string
-
-	var sorted []string
-	for folderName := range f.Folders {
-		sorted = append(sorted, folderName)
-	}
-	for fileName := range f.Files {
-		sorted = append(sorted, fileName)
-	}
-	sort.Strings(sorted)
-
-	for _, name := range sorted {
-		if folder, ok := f.Folders[name]; ok {
-			size := folder.sumSize()
-			percent := 100 * float64(size) / float64(total)
-			str += fmt.Sprintf(outputFormatting,
-				strings.Repeat(indent, level)+folder.Name, size, percent)
-			str += folder.StringRec(indent, level+1, total)
-		} else {
-			str += f.Files[name].String(indent, level, total)
-		}
-	}
-	return str
-}
-
-func (f *Folder) ToString(total uint64) string {
-	indent := "  "
-	var str string
-	str += fmt.Sprintf("%-59s %9s %9s\n", "Path", "Size", "%")
-	str += strings.Repeat("=", 79) + "\n"
-	str += f.StringRec(indent, 0, total)
-	str += strings.Repeat("=", 79) + "\n"
-	str += fmt.Sprintf("%-59s %9d %9s\n",
-		"Total symbol size (i.e. excluding padding, etc.)", f.sumSize(), "")
-	return str
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/builder/targetbuild.go
----------------------------------------------------------------------
diff --git a/newt/builder/targetbuild.go b/newt/builder/targetbuild.go
deleted file mode 100644
index 9c5dc1e..0000000
--- a/newt/builder/targetbuild.go
+++ /dev/null
@@ -1,818 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package builder
-
-import (
-	"encoding/json"
-	"fmt"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"sort"
-	"strings"
-	"time"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/newt/flash"
-	"mynewt.apache.org/newt/newt/image"
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/newt/resolve"
-	"mynewt.apache.org/newt/newt/symbol"
-	"mynewt.apache.org/newt/newt/syscfg"
-	"mynewt.apache.org/newt/newt/sysinit"
-	"mynewt.apache.org/newt/newt/target"
-	"mynewt.apache.org/newt/newt/toolchain"
-	"mynewt.apache.org/newt/util"
-)
-
-type TargetBuilder struct {
-	target      *target.Target
-	bspPkg      *pkg.BspPackage
-	compilerPkg *pkg.LocalPackage
-	appPkg      *pkg.LocalPackage
-	loaderPkg   *pkg.LocalPackage
-	testPkg     *pkg.LocalPackage
-
-	AppBuilder *Builder
-	AppList    interfaces.PackageList
-
-	LoaderBuilder *Builder
-	LoaderList    interfaces.PackageList
-
-	injectedSettings map[string]string
-
-	res *resolve.Resolution
-}
-
-func NewTargetTester(target *target.Target,
-	testPkg *pkg.LocalPackage) (*TargetBuilder, error) {
-
-	if err := target.Validate(testPkg == nil); err != nil {
-		return nil, err
-	}
-
-	bspPkg, err := pkg.NewBspPackage(target.Bsp())
-	if err != nil {
-		return nil, err
-	}
-
-	compilerPkg, err := project.GetProject().ResolvePackage(
-		bspPkg.Repo(), bspPkg.CompilerName)
-	if err != nil {
-		return nil, err
-	}
-
-	t := &TargetBuilder{
-		target:           target,
-		bspPkg:           bspPkg,
-		compilerPkg:      compilerPkg,
-		appPkg:           target.App(),
-		loaderPkg:        target.Loader(),
-		testPkg:          testPkg,
-		injectedSettings: map[string]string{},
-	}
-
-	return t, nil
-}
-
-func NewTargetBuilder(target *target.Target) (*TargetBuilder, error) {
-	return NewTargetTester(target, nil)
-}
-
-func (t *TargetBuilder) NewCompiler(dstDir string) (
-	*toolchain.Compiler, error) {
-
-	c, err := toolchain.NewCompiler(
-		t.compilerPkg.BasePath(),
-		dstDir,
-		t.target.BuildProfile)
-
-	return c, err
-}
-
-func (t *TargetBuilder) ensureResolved() error {
-	if t.res != nil {
-		return nil
-	}
-
-	var loaderSeeds []*pkg.LocalPackage
-	if t.loaderPkg != nil {
-		loaderSeeds = []*pkg.LocalPackage{
-			t.loaderPkg,
-			t.bspPkg.LocalPackage,
-			t.compilerPkg,
-			t.target.Package(),
-		}
-
-		// For split images, inject the SPLIT_[...] settings into the
-		// corresponding app packages.  This ensures that:
-		//     * The app packages know they are part of a split image during
-		//       dependency resolution.
-		//     * The app source files receive "-DSPLIT_[...]=1" command line
-		//       arguments during compilation.
-		t.loaderPkg.InjectedSettings()["SPLIT_LOADER"] = "1"
-		if t.appPkg != nil {
-			t.appPkg.InjectedSettings()["SPLIT_APPLICATION"] = "1"
-		}
-
-		// Inject the SPLIT_IMAGE setting into the entire target.  All packages
-		// now know that they are part of a split image build.
-		t.injectedSettings["SPLIT_IMAGE"] = "1"
-	}
-
-	appSeeds := []*pkg.LocalPackage{
-		t.bspPkg.LocalPackage,
-		t.compilerPkg,
-		t.target.Package(),
-	}
-
-	if t.appPkg != nil {
-		appSeeds = append(appSeeds, t.appPkg)
-	}
-
-	if t.testPkg != nil {
-		// A few features are automatically supported when the test command is
-		// used:
-		//     * TEST:      lets packages know that this is a test app
-		//     * SELFTEST:  indicates that the "newt test" command is used;
-		//                  causes a package to define a main() function.
-		t.injectedSettings["TEST"] = "1"
-		t.injectedSettings["SELFTEST"] = "1"
-
-		appSeeds = append(appSeeds, t.testPkg)
-	}
-
-	var err error
-	t.res, err = resolve.ResolveFull(
-		loaderSeeds, appSeeds, t.injectedSettings, t.bspPkg.FlashMap)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (t *TargetBuilder) Resolve() (*resolve.Resolution, error) {
-	if err := t.ensureResolved(); err != nil {
-		return nil, err
-	}
-
-	return t.res, nil
-}
-
-func (t *TargetBuilder) validateAndWriteCfg() error {
-	if err := t.ensureResolved(); err != nil {
-		return err
-	}
-
-	if errText := t.res.ErrorText(); errText != "" {
-		return util.NewNewtError(errText)
-	}
-
-	warningText := strings.TrimSpace(t.res.WarningText())
-	if warningText != "" {
-		for _, line := range strings.Split(warningText, "\n") {
-			log.Debugf(line)
-		}
-	}
-
-	if err := syscfg.EnsureWritten(t.res.Cfg,
-		GeneratedIncludeDir(t.target.Name())); err != nil {
-
-		return err
-	}
-
-	return nil
-}
-
-func (t *TargetBuilder) generateSysinit() error {
-	if err := t.ensureResolved(); err != nil {
-		return err
-	}
-
-	srcDir := GeneratedSrcDir(t.target.Name())
-
-	if t.res.LoaderSet != nil {
-		lpkgs := resolve.RpkgSliceToLpkgSlice(t.res.LoaderSet.Rpkgs)
-		sysinit.EnsureWritten(lpkgs, srcDir,
-			pkg.ShortName(t.target.Package()), true)
-	}
-
-	lpkgs := resolve.RpkgSliceToLpkgSlice(t.res.AppSet.Rpkgs)
-	sysinit.EnsureWritten(lpkgs, srcDir,
-		pkg.ShortName(t.target.Package()), false)
-
-	return nil
-}
-
-func (t *TargetBuilder) generateFlashMap() error {
-	return t.bspPkg.FlashMap.EnsureWritten(
-		GeneratedSrcDir(t.target.Name()),
-		GeneratedIncludeDir(t.target.Name()),
-		pkg.ShortName(t.target.Package()))
-}
-
-func (t *TargetBuilder) generateCode() error {
-	if err := t.generateSysinit(); err != nil {
-		return err
-	}
-
-	if err := t.generateFlashMap(); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (t *TargetBuilder) PrepBuild() error {
-	if err := t.ensureResolved(); err != nil {
-		return err
-	}
-
-	flashErrText := t.bspPkg.FlashMap.ErrorText()
-	if flashErrText != "" {
-		return util.NewNewtError(flashErrText)
-	}
-
-	if err := t.validateAndWriteCfg(); err != nil {
-		return err
-	}
-
-	var err error
-	if t.res.LoaderSet != nil {
-		t.LoaderBuilder, err = NewBuilder(t, BUILD_NAME_LOADER,
-			t.res.LoaderSet.Rpkgs, t.res.ApiMap, t.res.Cfg)
-		if err != nil {
-			return err
-		}
-		if err := t.LoaderBuilder.PrepBuild(); err != nil {
-			return err
-		}
-
-		loaderFlags := toolchain.NewCompilerInfo()
-		loaderFlags.Cflags = append(loaderFlags.Cflags, "-DSPLIT_LOADER")
-		t.LoaderBuilder.AddCompilerInfo(loaderFlags)
-
-		t.LoaderList = project.ResetDeps(nil)
-	}
-
-	t.AppBuilder, err = NewBuilder(t, BUILD_NAME_APP, t.res.AppSet.Rpkgs,
-		t.res.ApiMap, t.res.Cfg)
-	if err != nil {
-		return err
-	}
-	if err := t.AppBuilder.PrepBuild(); err != nil {
-		return err
-	}
-
-	if t.res.LoaderSet != nil {
-		appFlags := toolchain.NewCompilerInfo()
-		appFlags.Cflags = append(appFlags.Cflags, "-DSPLIT_APPLICATION")
-		t.AppBuilder.AddCompilerInfo(appFlags)
-	}
-
-	t.AppList = project.ResetDeps(nil)
-
-	logDepInfo(t.res)
-
-	if err := t.generateCode(); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (t *TargetBuilder) buildLoader() error {
-	/* Tentatively link the app (using the normal single image linker script) */
-	if err := t.AppBuilder.TentativeLink(t.bspPkg.LinkerScripts); err != nil {
-		return err
-	}
-
-	/* rebuild the loader */
-	project.ResetDeps(t.LoaderList)
-
-	if err := t.bspPkg.Reload(t.LoaderBuilder.cfg.Features()); err != nil {
-		return err
-	}
-
-	if err := t.LoaderBuilder.Build(); err != nil {
-		return err
-	}
-
-	/* Tentatively link the loader */
-	if err := t.LoaderBuilder.TentativeLink(t.bspPkg.LinkerScripts); err != nil {
-		return err
-	}
-
-	/* re-link the loader with app dependencies */
-	err, commonPkgs, commonSyms := t.RelinkLoader()
-	if err != nil {
-		return err
-	}
-
-	/* The app can ignore these packages next time */
-	delete(commonPkgs, t.bspPkg.Name())
-	t.AppBuilder.RemovePackages(commonPkgs)
-
-	/* create the special elf to link the app against */
-	/* its just the elf with a set of symbols removed and renamed */
-	err = t.LoaderBuilder.buildRomElf(commonSyms)
-	if err != nil {
-		return err
-	}
-
-	/* set up the linker elf and linker script for the app */
-	t.AppBuilder.linkElf = t.LoaderBuilder.AppLinkerElfPath()
-
-	return nil
-
-}
-
-func (t *TargetBuilder) Build() error {
-	if err := t.PrepBuild(); err != nil {
-		return err
-	}
-
-	/* Build the Apps */
-	project.ResetDeps(t.AppList)
-
-	if err := t.bspPkg.Reload(t.AppBuilder.cfg.Features()); err != nil {
-		return err
-	}
-
-	if err := t.AppBuilder.Build(); err != nil {
-		return err
-	}
-
-	var linkerScripts []string
-	if t.LoaderBuilder == nil {
-		linkerScripts = t.bspPkg.LinkerScripts
-	} else {
-		if err := t.buildLoader(); err != nil {
-			return err
-		}
-		linkerScripts = t.bspPkg.Part2LinkerScripts
-	}
-
-	/* Link the app. */
-	if err := t.AppBuilder.Link(linkerScripts); err != nil {
-		return err
-	}
-
-	/* Create manifest. */
-	if err := t.createManifest(); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-/*
- * This function re-links the loader adding symbols from libraries
- * shared with the app. Returns a list of the common packages shared
- * by the app and loader
- */
-func (t *TargetBuilder) RelinkLoader() (error, map[string]bool,
-	*symbol.SymbolMap) {
-
-	/* fetch symbols from the elf and from the libraries themselves */
-	log.Debugf("Loader packages:")
-	for _, rpkg := range t.LoaderBuilder.sortedRpkgs() {
-		log.Debugf("    * %s", rpkg.Lpkg.Name())
-	}
-	log.Debugf("App packages:")
-	for _, rpkg := range t.AppBuilder.sortedRpkgs() {
-		log.Debugf("    * %s", rpkg.Lpkg.Name())
-	}
-	err, appLibSym := t.AppBuilder.ExtractSymbolInfo()
-	if err != nil {
-		return err, nil, nil
-	}
-
-	/* fetch the symbol list from the app temporary elf */
-	err, appElfSym := t.AppBuilder.ParseObjectElf(t.AppBuilder.AppTentativeElfPath())
-	if err != nil {
-		return err, nil, nil
-	}
-
-	/* extract the library symbols and elf symbols from the loader */
-	err, loaderLibSym := t.LoaderBuilder.ExtractSymbolInfo()
-	if err != nil {
-		return err, nil, nil
-	}
-
-	err, loaderElfSym := t.LoaderBuilder.ParseObjectElf(
-		t.LoaderBuilder.AppTentativeElfPath())
-	if err != nil {
-		return err, nil, nil
-	}
-
-	/* create the set of matching and non-matching symbols */
-	err, smMatch, smNomatch := symbol.IdenticalUnion(appLibSym,
-		loaderLibSym, true, false)
-
-	/* which packages are shared between the two */
-	commonPkgs := smMatch.Packages()
-	uncommonPkgs := smNomatch.Packages()
-
-	/* ensure that the loader and app packages are never shared */
-	delete(commonPkgs, t.AppBuilder.appPkg.rpkg.Lpkg.Name())
-	uncommonPkgs[t.AppBuilder.appPkg.rpkg.Lpkg.Name()] = true
-	ma := smMatch.FilterPkg(t.AppBuilder.appPkg.rpkg.Lpkg.Name())
-	smMatch.RemoveMap(ma)
-
-	delete(commonPkgs, t.LoaderBuilder.appPkg.rpkg.Lpkg.Name())
-	uncommonPkgs[t.LoaderBuilder.appPkg.rpkg.Lpkg.Name()] = true
-	ml := smMatch.FilterPkg(t.LoaderBuilder.appPkg.rpkg.Lpkg.Name())
-	smMatch.RemoveMap(ml)
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE,
-		"Putting %d symbols from %d packages into loader\n",
-		len(*smMatch), len(commonPkgs))
-
-	var badpkgs []string
-	var symbolStr string
-	for v, _ := range uncommonPkgs {
-		if t.AppBuilder.appPkg != nil &&
-			t.AppBuilder.appPkg.rpkg.Lpkg.Name() != v &&
-			t.LoaderBuilder.appPkg != nil &&
-			t.LoaderBuilder.appPkg.rpkg.Lpkg.Name() != v {
-
-			trouble := smNomatch.FilterPkg(v)
-
-			var found bool
-			for _, sym := range *trouble {
-				if !sym.IsLocal() {
-					found = true
-				}
-			}
-
-			if found {
-				symbolStr = (*trouble).String("Non Matching Symbols")
-				badpkgs = append(badpkgs, v)
-				delete(commonPkgs, v)
-			}
-		}
-	}
-
-	if len(badpkgs) > 0 {
-		errStr := fmt.Sprintf(
-			"Common packages with different implementation\n %s\n",
-			strings.Join(badpkgs, "\n "))
-		errStr += symbolStr
-		return util.NewNewtError(errStr), nil, nil
-	}
-
-	/* for each symbol in the elf of the app, if that symbol is in
-	 * a common package, keep that symbol in the loader */
-	preserveElf := symbol.NewSymbolMap()
-
-	/* go through each symbol in the app */
-	for _, elfsym := range *appElfSym {
-		name := elfsym.Name
-		if libsym, ok := (*appLibSym)[name]; ok {
-			if _, ok := commonPkgs[libsym.Bpkg]; ok {
-				/* if its not in the loader elf, add it as undefined */
-				if _, ok := (*loaderElfSym)[name]; !ok {
-					preserveElf.Add(elfsym)
-				}
-			}
-		}
-	}
-
-	/* re-link loader */
-	project.ResetDeps(t.LoaderList)
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE,
-		"Migrating %d unused symbols into Loader\n", len(*preserveElf))
-
-	err = t.LoaderBuilder.KeepLink(t.bspPkg.LinkerScripts, preserveElf)
-
-	if err != nil {
-		return err, nil, nil
-	}
-	return err, commonPkgs, smMatch
-}
-
-func (t *TargetBuilder) GetTarget() *target.Target {
-	return t.target
-}
-
-func (t *TargetBuilder) GetTestPkg() *pkg.LocalPackage {
-	return t.testPkg
-}
-
-func (t *TargetBuilder) InjectSetting(key string, value string) {
-	t.injectedSettings[key] = value
-}
-
-func readManifest(path string) (*image.ImageManifest, error) {
-	content, err := ioutil.ReadFile(path)
-	if err != nil {
-		return nil, util.ChildNewtError(err)
-	}
-
-	manifest := &image.ImageManifest{}
-	if err := json.Unmarshal(content, &manifest); err != nil {
-		return nil, util.FmtNewtError(
-			"Failure decoding manifest with path \"%s\": %s", err.Error())
-	}
-
-	return manifest, nil
-}
-
-func (t *TargetBuilder) createManifest() error {
-	manifest := &image.ImageManifest{
-		Date: time.Now().Format(time.RFC3339),
-		Name: t.GetTarget().FullName(),
-	}
-
-	rm := image.NewRepoManager()
-	for _, rpkg := range t.AppBuilder.sortedRpkgs() {
-		manifest.Pkgs = append(manifest.Pkgs,
-			rm.GetImageManifestPkg(rpkg.Lpkg))
-	}
-
-	if t.LoaderBuilder != nil {
-		for _, rpkg := range t.LoaderBuilder.sortedRpkgs() {
-			manifest.LoaderPkgs = append(manifest.LoaderPkgs,
-				rm.GetImageManifestPkg(rpkg.Lpkg))
-		}
-	}
-
-	manifest.Repos = rm.AllRepos()
-
-	vars := t.GetTarget().Vars
-	keys := make([]string, 0, len(vars))
-	for k := range vars {
-		keys = append(keys, k)
-	}
-	sort.Strings(keys)
-	for _, k := range keys {
-		manifest.TgtVars = append(manifest.TgtVars, k+"="+vars[k])
-	}
-	syscfgKV := t.GetTarget().Package().SyscfgV.GetStringMapString("syscfg.vals")
-	if len(syscfgKV) > 0 {
-		tgtSyscfg := fmt.Sprintf("target.syscfg=%s",
-			syscfg.KeyValueToStr(syscfgKV))
-		manifest.TgtVars = append(manifest.TgtVars, tgtSyscfg)
-	}
-
-	c, err := t.AppBuilder.PkgSizes()
-	if err == nil {
-		manifest.PkgSizes = c.Pkgs
-	}
-	if t.LoaderBuilder != nil {
-		c, err = t.LoaderBuilder.PkgSizes()
-		if err == nil {
-			manifest.LoaderPkgSizes = c.Pkgs
-		}
-	}
-	file, err := os.Create(t.AppBuilder.ManifestPath())
-	if err != nil {
-		return util.FmtNewtError("Cannot create manifest file %s: %s",
-			t.AppBuilder.ManifestPath(), err.Error())
-	}
-	defer file.Close()
-
-	buffer, err := json.MarshalIndent(manifest, "", "  ")
-	if err != nil {
-		return util.FmtNewtError("Cannot encode manifest: %s", err.Error())
-	}
-	_, err = file.Write(buffer)
-	if err != nil {
-		return util.FmtNewtError("Cannot write manifest file: %s",
-			err.Error())
-	}
-
-	return nil
-}
-
-// Reads an existing manifest file and augments it with image fields:
-//     * Image version
-//     * App image path
-//     * App image hash
-//     * Loader image path
-//     * Loader image hash
-//     * Build ID
-func (t *TargetBuilder) augmentManifest(
-	appImg *image.Image,
-	loaderImg *image.Image,
-	buildId []byte) error {
-
-	manifest, err := readManifest(t.AppBuilder.ManifestPath())
-	if err != nil {
-		return err
-	}
-
-	manifest.Version = appImg.Version.String()
-	manifest.ImageHash = fmt.Sprintf("%x", appImg.Hash)
-	manifest.Image = filepath.Base(appImg.TargetImg)
-
-	if loaderImg != nil {
-		manifest.Loader = filepath.Base(loaderImg.TargetImg)
-		manifest.LoaderHash = fmt.Sprintf("%x", loaderImg.Hash)
-	}
-
-	manifest.BuildID = fmt.Sprintf("%x", buildId)
-
-	file, err := os.Create(t.AppBuilder.ManifestPath())
-	if err != nil {
-		return util.FmtNewtError("Cannot create manifest file %s: %s",
-			t.AppBuilder.ManifestPath(), err.Error())
-	}
-	defer file.Close()
-
-	buffer, err := json.MarshalIndent(manifest, "", "  ")
-	if err != nil {
-		return util.FmtNewtError("Cannot encode manifest: %s", err.Error())
-	}
-	_, err = file.Write(buffer)
-	if err != nil {
-		return util.FmtNewtError("Cannot write manifest file: %s",
-			err.Error())
-	}
-
-	return nil
-}
-
-// Calculates the size of a single boot trailer.  This is the amount of flash
-// that must be reserved at the end of each image slot.
-func (t *TargetBuilder) bootTrailerSize() int {
-	var minWriteSz int
-
-	entry, ok := t.res.Cfg.Settings["MCU_FLASH_MIN_WRITE_SIZE"]
-	if !ok {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"* Warning: target does not define MCU_FLASH_MIN_WRITE_SIZE "+
-				"setting; assuming a value of 1.\n")
-		minWriteSz = 1
-	} else {
-		val, err := util.AtoiNoOct(entry.Value)
-		if err != nil {
-			util.StatusMessage(util.VERBOSITY_DEFAULT,
-				"* Warning: target specifies invalid non-integer "+
-					"MCU_FLASH_MIN_WRITE_SIZE setting; assuming a "+
-					"value of 1.\n")
-			minWriteSz = 1
-		} else {
-			minWriteSz = val
-		}
-	}
-
-	/* Mynewt boot trailer format:
-	 *
-	 *  0                   1                   2                   3
-	 *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-	 * ~                       MAGIC (16 octets)                       ~
-	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-	 * ~                                                               ~
-	 * ~             Swap status (128 * min-write-size * 3)            ~
-	 * ~                                                               ~
-	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-	 * |   Copy done   |     0xff padding (up to min-write-sz - 1)     |
-	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-	 * |   Image OK    |     0xff padding (up to min-write-sz - 1)     |
-	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-	 */
-
-	tsize := 16 + // Magic.
-		128*minWriteSz*3 + // Swap status.
-		minWriteSz + // Copy done.
-		minWriteSz // Image Ok.
-
-	log.Debugf("Min-write-size=%d; boot-trailer-size=%d", minWriteSz, tsize)
-
-	return tsize
-}
-
-// Calculates the size of the largest image that can be written to each image
-// slot.
-func (t *TargetBuilder) maxImgSizes() []int {
-	sz0 := t.bspPkg.FlashMap.Areas[flash.FLASH_AREA_NAME_IMAGE_0].Size
-	sz1 := t.bspPkg.FlashMap.Areas[flash.FLASH_AREA_NAME_IMAGE_1].Size
-	trailerSz := t.bootTrailerSize()
-
-	return []int{
-		sz0 - trailerSz,
-		sz1 - trailerSz,
-	}
-}
-
-// Verifies that each already-built image leaves enough room for a boot trailer
-// a the end of its slot.
-func (t *TargetBuilder) verifyImgSizes(li *image.Image, ai *image.Image) error {
-	maxSizes := t.maxImgSizes()
-
-	errLines := []string{}
-	if li != nil {
-		if overflow := int(li.TotalSize) - maxSizes[0]; overflow > 0 {
-			errLines = append(errLines,
-				fmt.Sprintf("loader overflows slot-0 by %d bytes "+
-					"(image=%d max=%d)",
-					overflow, li.TotalSize, maxSizes[0]))
-		}
-		if overflow := int(ai.TotalSize) - maxSizes[1]; overflow > 0 {
-			errLines = append(errLines,
-				fmt.Sprintf("app overflows slot-1 by %d bytes "+
-					"(image=%d max=%d)",
-					overflow, ai.TotalSize, maxSizes[1]))
-
-		}
-	} else {
-		if overflow := int(ai.TotalSize) - maxSizes[0]; overflow > 0 {
-			errLines = append(errLines,
-				fmt.Sprintf("app overflows slot-0 by %d bytes "+
-					"(image=%d max=%d)",
-					overflow, ai.TotalSize, maxSizes[0]))
-		}
-	}
-
-	if len(errLines) > 0 {
-		if !newtutil.NewtForce {
-			return util.NewNewtError(strings.Join(errLines, "; "))
-		} else {
-			for _, e := range errLines {
-				util.StatusMessage(util.VERBOSITY_QUIET,
-					"* Warning: %s (ignoring due to force flag)\n", e)
-			}
-		}
-	}
-
-	return nil
-}
-
-// @return                      app-image, loader-image, error
-func (t *TargetBuilder) CreateImages(version string,
-	keystr string, keyId uint8) (*image.Image, *image.Image, error) {
-
-	if err := t.Build(); err != nil {
-		return nil, nil, err
-	}
-
-	var err error
-	var appImg *image.Image
-	var loaderImg *image.Image
-
-	if t.LoaderBuilder != nil {
-		loaderImg, err = t.LoaderBuilder.CreateImage(version, keystr, keyId,
-			nil)
-		if err != nil {
-			return nil, nil, err
-		}
-	}
-
-	appImg, err = t.AppBuilder.CreateImage(version, keystr, keyId, loaderImg)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	buildId := image.CreateBuildId(appImg, loaderImg)
-	if err := t.augmentManifest(appImg, loaderImg, buildId); err != nil {
-		return nil, nil, err
-	}
-
-	if err := t.verifyImgSizes(loaderImg, appImg); err != nil {
-		return nil, nil, err
-	}
-
-	return appImg, loaderImg, nil
-}
-
-func (t *TargetBuilder) CreateDepGraph() (DepGraph, error) {
-	if err := t.ensureResolved(); err != nil {
-		return nil, err
-	}
-
-	return depGraph(t.res.MasterSet)
-}
-
-func (t *TargetBuilder) CreateRevdepGraph() (DepGraph, error) {
-	if err := t.ensureResolved(); err != nil {
-		return nil, err
-	}
-
-	return revdepGraph(t.res.MasterSet)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/build_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/build_cmds.go b/newt/cli/build_cmds.go
deleted file mode 100644
index 5fb7944..0000000
--- a/newt/cli/build_cmds.go
+++ /dev/null
@@ -1,478 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"fmt"
-	"os"
-	"path/filepath"
-	"strings"
-
-	"github.com/spf13/cobra"
-	"mynewt.apache.org/newt/newt/builder"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/newt/target"
-	"mynewt.apache.org/newt/util"
-)
-
-const TARGET_TEST_NAME = "unittest"
-
-var testablePkgMap map[*pkg.LocalPackage]struct{}
-
-func testablePkgs() map[*pkg.LocalPackage]struct{} {
-	if testablePkgMap != nil {
-		return testablePkgMap
-	}
-
-	testablePkgMap := map[*pkg.LocalPackage]struct{}{}
-
-	// Create a map of path => lclPkg.
-	proj, err := project.TryGetProject()
-	if err != nil {
-		return nil
-	}
-
-	allPkgs := proj.PackagesOfType(-1)
-	pathLpkgMap := make(map[string]*pkg.LocalPackage, len(allPkgs))
-	for _, p := range allPkgs {
-		lpkg := p.(*pkg.LocalPackage)
-		pathLpkgMap[lpkg.BasePath()] = lpkg
-	}
-
-	// Add all unit test packages to the testable package map.
-	testPkgs := proj.PackagesOfType(pkg.PACKAGE_TYPE_UNITTEST)
-	for _, p := range testPkgs {
-		lclPack := p.(*pkg.LocalPackage)
-		testablePkgMap[lclPack] = struct{}{}
-	}
-
-	// Next add first ancestor of each test package.
-	for _, testPkgItf := range testPkgs {
-		testPkg := testPkgItf.(*pkg.LocalPackage)
-		for cur := filepath.Dir(testPkg.BasePath()); cur != proj.BasePath; cur = filepath.Dir(cur) {
-			lpkg := pathLpkgMap[cur]
-			if lpkg != nil && lpkg.Type() != pkg.PACKAGE_TYPE_UNITTEST {
-				testablePkgMap[lpkg] = struct{}{}
-				break
-			}
-		}
-	}
-
-	return testablePkgMap
-}
-
-func pkgToUnitTests(pack *pkg.LocalPackage) []*pkg.LocalPackage {
-	// If the user specified a unittest package, just test that one.
-	if pack.Type() == pkg.PACKAGE_TYPE_UNITTEST {
-		return []*pkg.LocalPackage{pack}
-	}
-
-	// Otherwise, return all the package's direct descendants that are unit
-	// test packages.
-	result := []*pkg.LocalPackage{}
-	srcPath := pack.BasePath()
-	for p, _ := range testablePkgs() {
-		if p.Type() == pkg.PACKAGE_TYPE_UNITTEST &&
-			filepath.Dir(p.BasePath()) == srcPath {
-
-			result = append(result, p)
-		}
-	}
-
-	return result
-}
-
-var extraJtagCmd string
-var noGDB_flag bool
-
-func buildRunCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, nil)
-	}
-
-	TryGetProject()
-
-	// Verify and resolve each specified package.
-	targets, all, err := ResolveTargetsOrAll(args...)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	if all {
-		// Collect all targets that specify an app package.
-		targets = []*target.Target{}
-		for _, name := range targetList() {
-			t := ResolveTarget(name)
-			if t != nil && t.AppName != "" {
-				targets = append(targets, t)
-			}
-		}
-	}
-
-	for i, _ := range targets {
-		// Reset the global state for the next build.
-		// XXX: It is not good that this is necessary.  This is certainly going
-		// to bite us...
-		if i > 0 {
-			if err := ResetGlobalState(); err != nil {
-				NewtUsage(nil, err)
-			}
-		}
-
-		// Look up the target by name.  This has to be done a second time here
-		// now that the project has been reset.
-		t := ResolveTarget(targets[i].Name())
-		if t == nil {
-			NewtUsage(nil, util.NewNewtError("Failed to resolve target: "+
-				targets[i].Name()))
-		}
-
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "Building target %s\n",
-			t.FullName())
-
-		b, err := builder.NewTargetBuilder(t)
-		if err != nil {
-			NewtUsage(nil, err)
-		}
-
-		if err := b.Build(); err != nil {
-			NewtUsage(nil, err)
-		}
-
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Target successfully built: %s\n", t.Name())
-	}
-}
-
-func cleanDir(path string) {
-	util.StatusMessage(util.VERBOSITY_VERBOSE,
-		"Cleaning directory %s\n", path)
-
-	err := os.RemoveAll(path)
-	if err != nil {
-		NewtUsage(nil, util.NewNewtError(err.Error()))
-	}
-}
-
-func cleanRunCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify target"))
-	}
-
-	TryGetProject()
-
-	cleanAll := false
-	targets := []*target.Target{}
-	for _, arg := range args {
-		if arg == TARGET_KEYWORD_ALL {
-			cleanAll = true
-		} else {
-			t, _, err := ResolveTargetOrUnittest(arg)
-			if err != nil {
-				NewtUsage(cmd, err)
-			}
-			targets = append(targets, t)
-		}
-	}
-
-	if cleanAll {
-		cleanDir(builder.BinRoot())
-	} else {
-		for _, t := range targets {
-			cleanDir(builder.TargetBinDir(t.Name()))
-		}
-	}
-}
-
-func pkgnames(pkgs []*pkg.LocalPackage) string {
-	s := ""
-
-	for _, p := range pkgs {
-		s += p.Name() + " "
-	}
-
-	return s
-}
-
-func testRunCmd(cmd *cobra.Command, args []string, exclude string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, nil)
-	}
-
-	proj := TryGetProject()
-
-	// Verify and resolve each specified package.
-	testAll := false
-	packs := []*pkg.LocalPackage{}
-	for _, pkgName := range args {
-		if pkgName == "all" {
-			testAll = true
-		} else {
-			pack, err := proj.ResolvePackage(proj.LocalRepo(), pkgName)
-			if err != nil {
-				NewtUsage(cmd, err)
-			}
-
-			testPkgs := pkgToUnitTests(pack)
-			if len(testPkgs) == 0 {
-				NewtUsage(nil, util.FmtNewtError("Package %s contains no "+
-					"unit tests", pack.FullName()))
-			}
-
-			packs = append(packs, testPkgs...)
-		}
-	}
-
-	if testAll {
-		packItfs := proj.PackagesOfType(pkg.PACKAGE_TYPE_UNITTEST)
-		packs = make([]*pkg.LocalPackage, len(packItfs))
-		for i, p := range packItfs {
-			packs[i] = p.(*pkg.LocalPackage)
-		}
-
-		packs = pkg.SortLclPkgs(packs)
-	}
-
-	if len(exclude) > 0 {
-		// filter out excluded tests
-		orig := packs
-		packs = packs[:0]
-		excls := strings.Split(exclude, ",")
-	packLoop:
-		for _, pack := range orig {
-			for _, excl := range excls {
-				if pack.Name() == excl || strings.HasPrefix(pack.Name(), excl+"/") {
-					continue packLoop
-				}
-			}
-			packs = append(packs, pack)
-		}
-	}
-
-	if len(packs) == 0 {
-		NewtUsage(nil, util.NewNewtError("No testable packages found"))
-	}
-
-	passedPkgs := []*pkg.LocalPackage{}
-	failedPkgs := []*pkg.LocalPackage{}
-	for _, pack := range packs {
-		// Reset the global state for the next test.
-		if err := ResetGlobalState(); err != nil {
-			NewtUsage(nil, err)
-		}
-
-		t, err := ResolveUnittest(pack.Name())
-		if err != nil {
-			NewtUsage(nil, err)
-		}
-
-		b, err := builder.NewTargetTester(t, pack)
-		if err != nil {
-			NewtUsage(nil, err)
-		}
-
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "Testing package %s\n",
-			pack.FullName())
-
-		err = b.SelfTestExecute()
-		if err == nil {
-			passedPkgs = append(passedPkgs, pack)
-		} else {
-			newtError := err.(*util.NewtError)
-			util.StatusMessage(util.VERBOSITY_QUIET, newtError.Text)
-			failedPkgs = append(failedPkgs, pack)
-		}
-	}
-
-	passStr := fmt.Sprintf("Passed tests: [%s]", PackageNameList(passedPkgs))
-	failStr := fmt.Sprintf("Failed tests: [%s]", PackageNameList(failedPkgs))
-
-	if len(failedPkgs) > 0 {
-		NewtUsage(nil, util.FmtNewtError("Test failure(s):\n%s\n%s", passStr,
-			failStr))
-	} else {
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "%s\n", passStr)
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "All tests passed\n")
-	}
-}
-
-func loadRunCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify target"))
-	}
-
-	TryGetProject()
-
-	t := ResolveTarget(args[0])
-	if t == nil {
-		NewtUsage(cmd, util.NewNewtError("Invalid target name: "+args[0]))
-	}
-
-	b, err := builder.NewTargetBuilder(t)
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	if err := b.Load(extraJtagCmd); err != nil {
-		NewtUsage(cmd, err)
-	}
-}
-
-func debugRunCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify target"))
-	}
-
-	TryGetProject()
-
-	t := ResolveTarget(args[0])
-	if t == nil {
-		NewtUsage(cmd, util.NewNewtError("Invalid target name: "+args[0]))
-	}
-
-	b, err := builder.NewTargetBuilder(t)
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	if err := b.Debug(extraJtagCmd, false, noGDB_flag); err != nil {
-		NewtUsage(cmd, err)
-	}
-}
-
-func sizeRunCmd(cmd *cobra.Command, args []string, ram bool, flash bool) {
-	if len(args) < 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify target"))
-	}
-
-	TryGetProject()
-
-	t := ResolveTarget(args[0])
-	if t == nil {
-		NewtUsage(cmd, util.NewNewtError("Invalid target name: "+args[0]))
-	}
-
-	b, err := builder.NewTargetBuilder(t)
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	if ram || flash {
-		if err := b.SizeReport(ram, flash); err != nil {
-			NewtUsage(cmd, err)
-		}
-		return
-	}
-
-	if err := b.Size(); err != nil {
-		NewtUsage(cmd, err)
-	}
-}
-
-func AddBuildCommands(cmd *cobra.Command) {
-	buildCmd := &cobra.Command{
-		Use:   "build <target-name> [target-names...]",
-		Short: "Build one or more targets",
-		Run:   buildRunCmd,
-	}
-
-	cmd.AddCommand(buildCmd)
-	AddTabCompleteFn(buildCmd, func() []string {
-		return append(targetList(), "all")
-	})
-
-	cleanCmd := &cobra.Command{
-		Use:   "clean <target-name> [target-names...] | all",
-		Short: "Delete build artifacts for one or more targets",
-		Run:   cleanRunCmd,
-	}
-
-	cmd.AddCommand(cleanCmd)
-	AddTabCompleteFn(cleanCmd, func() []string {
-		return append(append(targetList(), unittestList()...), "all")
-	})
-
-	var exclude string
-	testCmd := &cobra.Command{
-		Use:   "test <package-name> [package-names...] | all",
-		Short: "Executes unit tests for one or more packages",
-		Run: func(cmd *cobra.Command, args []string) {
-			testRunCmd(cmd, args, exclude)
-		},
-	}
-	testCmd.Flags().StringVarP(&exclude, "exclude", "e", "", "Comma separated list of packages to exclude")
-	cmd.AddCommand(testCmd)
-	AddTabCompleteFn(testCmd, func() []string {
-		return append(testablePkgList(), "all", "allexcept")
-	})
-
-	loadHelpText := "Load application image on to the board for <target-name>"
-
-	loadCmd := &cobra.Command{
-		Use:   "load <target-name>",
-		Short: "Load built target to board",
-		Long:  loadHelpText,
-		Run:   loadRunCmd,
-	}
-
-	cmd.AddCommand(loadCmd)
-	AddTabCompleteFn(loadCmd, targetList)
-
-	loadCmd.PersistentFlags().StringVarP(&extraJtagCmd, "extrajtagcmd", "", "",
-		"Extra commands to send to JTAG software")
-
-	debugHelpText := "Open a debugger session for <target-name>"
-
-	debugCmd := &cobra.Command{
-		Use:   "debug <target-name>",
-		Short: "Open debugger session to target",
-		Long:  debugHelpText,
-		Run:   debugRunCmd,
-	}
-
-	debugCmd.PersistentFlags().StringVarP(&extraJtagCmd, "extrajtagcmd", "",
-		"", "Extra commands to send to JTAG software")
-	debugCmd.PersistentFlags().BoolVarP(&noGDB_flag, "noGDB", "n", false,
-		"Do not start GDB from command line")
-
-	cmd.AddCommand(debugCmd)
-	AddTabCompleteFn(debugCmd, targetList)
-
-	sizeHelpText := "Calculate the size of target components specified by " +
-		"<target-name>."
-
-	var ram, flash bool
-	sizeCmd := &cobra.Command{
-		Use:   "size <target-name>",
-		Short: "Size of target components",
-		Long:  sizeHelpText,
-		Run: func(cmd *cobra.Command, args []string) {
-			sizeRunCmd(cmd, args, ram, flash)
-		},
-	}
-
-	sizeCmd.Flags().BoolVarP(&ram, "ram", "R", false, "Print RAM statistics")
-	sizeCmd.Flags().BoolVarP(&flash, "flash", "F", false,
-		"Print FLASH statistics")
-
-	cmd.AddCommand(sizeCmd)
-	AddTabCompleteFn(sizeCmd, targetList)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/complete_cmd.go
----------------------------------------------------------------------
diff --git a/newt/cli/complete_cmd.go b/newt/cli/complete_cmd.go
deleted file mode 100644
index ae3d39e..0000000
--- a/newt/cli/complete_cmd.go
+++ /dev/null
@@ -1,252 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"fmt"
-	"os"
-	"regexp"
-	"sort"
-	"strings"
-
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-
-	"github.com/spf13/cobra"
-	"github.com/spf13/pflag"
-)
-
-type TabCompleteFn func() []string
-
-var tabCompleteEntries = map[*cobra.Command]TabCompleteFn{}
-
-func AddTabCompleteFn(cmd *cobra.Command, cb TabCompleteFn) {
-	if cmd.ValidArgs != nil || tabCompleteEntries[cmd] != nil {
-		panic("tab completion values generated twice for command " +
-			cmd.Name())
-	}
-
-	tabCompleteEntries[cmd] = cb
-}
-
-func GenerateTabCompleteValues() {
-	for cmd, cb := range tabCompleteEntries {
-		cmd.ValidArgs = cb()
-	}
-}
-
-func pkgNameList(filterCb func(*pkg.LocalPackage) bool) []string {
-	names := []string{}
-
-	proj, err := project.TryGetProject()
-	if err != nil {
-		return names
-	}
-
-	for _, pack := range proj.PackagesOfType(-1) {
-		if filterCb(pack.(*pkg.LocalPackage)) {
-			names = append(names, pack.FullName())
-		}
-	}
-
-	sort.Strings(names)
-	return names
-}
-
-func targetList() []string {
-	targetNames := pkgNameList(func(pack *pkg.LocalPackage) bool {
-		return pack.Type() == pkg.PACKAGE_TYPE_TARGET &&
-			!strings.HasSuffix(pack.Name(), "/unittest")
-	})
-
-	// Remove "targets/" prefix.
-	for i, _ := range targetNames {
-		targetNames[i] = strings.TrimPrefix(
-			targetNames[i], TARGET_DEFAULT_DIR+"/")
-	}
-
-	return targetNames
-}
-
-/* @return                      A slice of all testable package names. */
-func testablePkgList() []string {
-	packs := testablePkgs()
-	names := make([]string, 0, len(packs))
-	for pack, _ := range packs {
-		if pack.Type() != pkg.PACKAGE_TYPE_UNITTEST {
-			names = append(names, pack.FullName())
-		}
-	}
-
-	return names
-}
-
-func unittestList() []string {
-	return pkgNameList(func(pack *pkg.LocalPackage) bool {
-		return pack.Type() == pkg.PACKAGE_TYPE_UNITTEST
-	})
-}
-
-func mfgList() []string {
-	targetNames := pkgNameList(func(pack *pkg.LocalPackage) bool {
-		return pack.Type() == pkg.PACKAGE_TYPE_MFG
-	})
-
-	// Remove "targets/" prefix.
-	for i, _ := range targetNames {
-		targetNames[i] = strings.TrimPrefix(
-			targetNames[i], MFG_DEFAULT_DIR+"/")
-	}
-
-	return targetNames
-}
-
-func completeRunCmd(cmd *cobra.Command, args []string) {
-	cmd_line := os.Getenv("COMP_LINE")
-
-	if cmd_line == "" {
-		fmt.Println("This command is intended to be used as part of " +
-			" bash autocomplete.  Its not intended to be called directly from " +
-			" the command line ")
-		return
-	}
-
-	root_cmd := cmd.Root()
-
-	args = strings.Split(cmd_line, " ")
-	found_cmd, _, _ := root_cmd.Find(args[1:])
-	if found_cmd == nil {
-		return
-	}
-
-	/* this is worth a long comment.  We have to find a command line
-	 * with the flags removed.  To do this, I look at the command
-	 * path for the command without flags, and remove anything that
-	 * doesn't match */
-	found_args := strings.Split(found_cmd.CommandPath(), " ")
-	last_arg := found_args[len(found_args)-1]
-
-	/* what is remaining after the last parsed argument */
-	ind := strings.Index(cmd_line, last_arg)
-	ind += len(last_arg)
-	extra_str := cmd_line[ind:]
-
-	if len(extra_str) == 0 {
-		/* this matched an exact command with no space afterwards.  There
-		 * is no autocomplete except this command (to add a space) */
-		fmt.Println(found_cmd.Name())
-		return
-	}
-
-	/* skip flags for now. This just removes them */
-	/* skip over complete flags. So the current bash autocomplete will
-	 * not complete flags */
-	cmd.Flags().VisitAll(func(flag *pflag.Flag) {
-		flg := fmt.Sprintf("--%s", flag.Name)
-		if flag.Value.Type() == "bool" {
-			/* skip the flag */
-			r := regexp.MustCompile(flg + "[\\W]+")
-			extra_str = r.ReplaceAllString(extra_str, "")
-		} else if flag.Value.Type() == "string" {
-			/* skip the string and the next word */
-			r := regexp.MustCompile(flg + "[\\W]+[^\\W]+[\\W]+")
-			extra_str = r.ReplaceAllString(extra_str, "")
-		}
-
-		sflg := fmt.Sprintf("-%s", flag.Shorthand)
-		if flag.Value.Type() == "bool" {
-			/* skip the flag */
-			r := regexp.MustCompile(sflg + "[\\W]+")
-			extra_str = r.ReplaceAllString(extra_str, "")
-		} else if flag.Value.Type() == "string" {
-			/* skip the string and the next word */
-			r := regexp.MustCompile(sflg + "[\\W]+[^\\W]+[\\W]+")
-			extra_str = r.ReplaceAllString(extra_str, "")
-		}
-	})
-
-	if len(extra_str) == 0 {
-		/* this matched an exact command with no space afterwards.  There
-		 * is no autocomplete except this command (to add a space) */
-		return
-	}
-
-	extra_str = strings.TrimLeft(extra_str, " ")
-
-	/* give flag hints if the person asks for them */
-	showShort := strings.HasPrefix(extra_str, "-") &&
-		!strings.HasPrefix(extra_str, "--")
-
-	showLong := strings.HasPrefix(extra_str, "--") ||
-		extra_str == "-"
-
-	if showLong {
-		r := regexp.MustCompile("^--[^\\W]+")
-		partial_flag := r.FindString(extra_str)
-		cmd.Flags().VisitAll(func(flag *pflag.Flag) {
-			flg := fmt.Sprintf("--%s", flag.Name)
-			if strings.HasPrefix(flg, partial_flag) {
-				fmt.Println(flg)
-			}
-		})
-	}
-
-	if showShort {
-		r := regexp.MustCompile("^-[^\\W]+")
-		partial_flag := r.FindString(extra_str)
-		cmd.Flags().VisitAll(func(flag *pflag.Flag) {
-			if len(flag.Shorthand) > 0 {
-				flg := fmt.Sprintf("-%s", flag.Shorthand)
-				if strings.HasPrefix(flg, partial_flag) {
-					fmt.Println(flg)
-				}
-			}
-		})
-	}
-
-	/* dump out valid arguments */
-	for _, c := range found_cmd.ValidArgs {
-		if strings.HasPrefix(c, extra_str) {
-			fmt.Printf("%s\n", c)
-		}
-	}
-
-	/* dump out possible sub commands */
-	for _, child_cmd := range found_cmd.Commands() {
-		if strings.HasPrefix(child_cmd.Name(), extra_str) {
-			fmt.Printf("%s\n", child_cmd.Name())
-		}
-	}
-}
-
-func AddCompleteCommands(cmd *cobra.Command) {
-
-	completeCmd := &cobra.Command{
-		Use:    "complete",
-		Short:  "",
-		Long:   "",
-		Run:    completeRunCmd,
-		Hidden: true,
-	}
-
-	/* silence errors on the complete command because we have partial flags */
-	completeCmd.SilenceErrors = true
-	cmd.AddCommand(completeCmd)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/image_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/image_cmds.go b/newt/cli/image_cmds.go
deleted file mode 100644
index 5a19c63..0000000
--- a/newt/cli/image_cmds.go
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"strconv"
-
-	"github.com/spf13/cobra"
-	"mynewt.apache.org/newt/newt/builder"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/util"
-)
-
-func createImageRunCmd(cmd *cobra.Command, args []string) {
-	var keyId uint8
-	var keystr string
-
-	if len(args) < 2 {
-		NewtUsage(cmd, util.NewNewtError("Must specify target and version"))
-	}
-
-	TryGetProject()
-
-	targetName := args[0]
-	t := ResolveTarget(targetName)
-	if t == nil {
-		NewtUsage(cmd, util.NewNewtError("Invalid target name: "+targetName))
-	}
-
-	version := args[1]
-
-	if len(args) > 2 {
-		if len(args) > 3 {
-			keyId64, err := strconv.ParseUint(args[3], 10, 8)
-			if err != nil {
-				NewtUsage(cmd,
-					util.NewNewtError("Key ID must be between 0-255"))
-			}
-			keyId = uint8(keyId64)
-		}
-		keystr = args[2]
-	}
-
-	b, err := builder.NewTargetBuilder(t)
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	if _, _, err := b.CreateImages(version, keystr, keyId); err != nil {
-		NewtUsage(nil, err)
-		return
-	}
-}
-
-func AddImageCommands(cmd *cobra.Command) {
-	createImageHelpText := "Create an image by adding an image header to the " +
-		"binary file created for <target-name>. Version number in the header is set " +
-		"to be <version>.\n\nTo sign the image give private key as <signing-key> and an optional key-id."
-	createImageHelpEx := "  newt create-image my_target1 1.2.0\n"
-	createImageHelpEx += "  newt create-image my_target1 1.2.0.3\n"
-	createImageHelpEx += "  newt create-image my_target1 1.2.0.3 private.pem\n"
-	createImageHelpEx += "  newt create-image my_target1 1.2.0.3 private.pem 5\n"
-
-	createImageCmd := &cobra.Command{
-		Use:     "create-image <target-name> <version> [signing-key [key-id]]",
-		Short:   "Add image header to target binary",
-		Long:    createImageHelpText,
-		Example: createImageHelpEx,
-		Run:     createImageRunCmd,
-	}
-
-	createImageCmd.PersistentFlags().BoolVarP(&newtutil.NewtForce,
-		"force", "f", false,
-		"Ignore flash overflow errors during image creation")
-
-	cmd.AddCommand(createImageCmd)
-	AddTabCompleteFn(createImageCmd, targetList)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/mfg_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/mfg_cmds.go b/newt/cli/mfg_cmds.go
deleted file mode 100644
index 1e35d4e..0000000
--- a/newt/cli/mfg_cmds.go
+++ /dev/null
@@ -1,201 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"github.com/spf13/cobra"
-
-	"mynewt.apache.org/newt/newt/image"
-	"mynewt.apache.org/newt/newt/mfg"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/util"
-)
-
-func ResolveMfgPkg(pkgName string) (*pkg.LocalPackage, error) {
-	proj := TryGetProject()
-
-	lpkg, err := proj.ResolvePackage(proj.LocalRepo(), pkgName)
-	if err != nil {
-		var err2 error
-		lpkg, err2 = proj.ResolvePackage(proj.LocalRepo(),
-			MFG_DEFAULT_DIR+"/"+pkgName)
-		if err2 != nil {
-			return nil, err
-		}
-	}
-
-	if lpkg.Type() != pkg.PACKAGE_TYPE_MFG {
-		return nil, util.FmtNewtError(
-			"Package \"%s\" has incorrect type; expected mfg, got %s",
-			pkgName, pkg.PackageTypeNames[lpkg.Type()])
-	}
-
-	return lpkg, nil
-}
-
-func mfgCreate(mi *mfg.MfgImage) {
-	pathStr := ""
-	for _, path := range mi.FromPaths() {
-		pathStr += "    * " + path + "\n"
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"Creating a manufacturing image from the following files:\n%s\n",
-		pathStr)
-
-	outputPaths, err := mi.CreateMfgImage()
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	pathStr = ""
-	for _, path := range outputPaths {
-		pathStr += "    * " + path + "\n"
-	}
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"Generated the following files:\n%s", pathStr)
-}
-
-func mfgLoad(mi *mfg.MfgImage) {
-	binPath, err := mi.Upload()
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"Uploaded manufacturing image: %s\n", binPath)
-}
-
-func mfgCreateRunCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 2 {
-		NewtUsage(cmd, util.NewNewtError(
-			"Must specify mfg package name and version number"))
-	}
-
-	pkgName := args[0]
-	lpkg, err := ResolveMfgPkg(pkgName)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	versStr := args[1]
-	ver, err := image.ParseVersion(versStr)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	mi, err := mfg.Load(lpkg)
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	mi.SetVersion(ver)
-	mfgCreate(mi)
-}
-
-func mfgLoadRunCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify mfg package name"))
-	}
-
-	pkgName := args[0]
-	lpkg, err := ResolveMfgPkg(pkgName)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	mi, err := mfg.Load(lpkg)
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	mfgLoad(mi)
-}
-
-func mfgDeployRunCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify mfg package name"))
-	}
-
-	pkgName := args[0]
-	lpkg, err := ResolveMfgPkg(pkgName)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	ver := image.ImageVersion{}
-	if len(args) >= 2 {
-		versStr := args[1]
-		ver, err = image.ParseVersion(versStr)
-		if err != nil {
-			NewtUsage(cmd, err)
-		}
-	}
-
-	mi, err := mfg.Load(lpkg)
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	mi.SetVersion(ver)
-	mfgCreate(mi)
-
-	mfgLoad(mi)
-}
-
-func AddMfgCommands(cmd *cobra.Command) {
-	mfgHelpText := ""
-	mfgHelpEx := ""
-	mfgCmd := &cobra.Command{
-		Use:     "mfg",
-		Short:   "Manufacturing flash image commands",
-		Long:    mfgHelpText,
-		Example: mfgHelpEx,
-		Run: func(cmd *cobra.Command, args []string) {
-			cmd.Usage()
-		},
-	}
-
-	cmd.AddCommand(mfgCmd)
-
-	mfgCreateCmd := &cobra.Command{
-		Use:   "create <mfg-package-name> <version #.#.#.#>",
-		Short: "Create a manufacturing flash image",
-		Run:   mfgCreateRunCmd,
-	}
-	mfgCmd.AddCommand(mfgCreateCmd)
-	AddTabCompleteFn(mfgCreateCmd, mfgList)
-
-	mfgLoadCmd := &cobra.Command{
-		Use:   "load <mfg-package-name>",
-		Short: "Load a manufacturing flash image onto a device",
-		Run:   mfgLoadRunCmd,
-	}
-	mfgCmd.AddCommand(mfgLoadCmd)
-	AddTabCompleteFn(mfgLoadCmd, mfgList)
-
-	mfgDeployCmd := &cobra.Command{
-		Use:   "deploy <mfg-package-name> [version #.#.#.#]",
-		Short: "Build and upload a manufacturing image (create + load)",
-		Run:   mfgDeployRunCmd,
-	}
-	mfgCmd.AddCommand(mfgDeployCmd)
-	AddTabCompleteFn(mfgDeployCmd, mfgList)
-}



[24/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
deleted file mode 100644
index 16dcbc9..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ /dev/null
@@ -1,1897 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm64,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x29
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_VSOCK                         = 0x28
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_MONITOR        = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IP6GRE                    = 0x337
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETLINK                   = 0x338
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x1008
-	B110                             = 0x3
-	B115200                          = 0x1002
-	B1152000                         = 0x1009
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x100a
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x100b
-	B230400                          = 0x1003
-	B2400                            = 0xb
-	B2500000                         = 0x100c
-	B300                             = 0x7
-	B3000000                         = 0x100d
-	B3500000                         = 0x100e
-	B38400                           = 0xf
-	B4000000                         = 0x100f
-	B460800                          = 0x1004
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x1005
-	B57600                           = 0x1001
-	B576000                          = 0x1006
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x1007
-	B9600                            = 0xd
-	BOTHER                           = 0x1000
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MOD                          = 0x90
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BPF_XOR                          = 0xa0
-	BRKINT                           = 0x2
-	BS0                              = 0x0
-	BS1                              = 0x2000
-	BSDLY                            = 0x2000
-	CBAUD                            = 0x100f
-	CBAUDEX                          = 0x1000
-	CFLUSH                           = 0xf
-	CIBAUD                           = 0x100f0000
-	CLOCAL                           = 0x800
-	CLOCK_BOOTTIME                   = 0x7
-	CLOCK_BOOTTIME_ALARM             = 0x9
-	CLOCK_DEFAULT                    = 0x0
-	CLOCK_EXT                        = 0x1
-	CLOCK_INT                        = 0x2
-	CLOCK_MONOTONIC                  = 0x1
-	CLOCK_MONOTONIC_COARSE           = 0x6
-	CLOCK_MONOTONIC_RAW              = 0x4
-	CLOCK_PROCESS_CPUTIME_ID         = 0x2
-	CLOCK_REALTIME                   = 0x0
-	CLOCK_REALTIME_ALARM             = 0x8
-	CLOCK_REALTIME_COARSE            = 0x5
-	CLOCK_THREAD_CPUTIME_ID          = 0x3
-	CLOCK_TXFROMRX                   = 0x4
-	CLOCK_TXINT                      = 0x3
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWCGROUP                  = 0x2000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CMSPAR                           = 0x40000000
-	CR0                              = 0x0
-	CR1                              = 0x200
-	CR2                              = 0x400
-	CR3                              = 0x600
-	CRDLY                            = 0x600
-	CREAD                            = 0x80
-	CRTSCTS                          = 0x80000000
-	CS5                              = 0x0
-	CS6                              = 0x10
-	CS7                              = 0x20
-	CS8                              = 0x30
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x30
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x40
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x200
-	ECHOE                            = 0x10
-	ECHOK                            = 0x20
-	ECHOKE                           = 0x800
-	ECHONL                           = 0x40
-	ECHOPRT                          = 0x400
-	ELF_NGREG                        = 0x22
-	ELF_PRARGSZ                      = 0x50
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWAKEUP                      = 0x20000000
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_802_3_MIN                  = 0x600
-	ETH_P_802_EX1                    = 0x88b5
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BATMAN                     = 0x4305
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CANFD                      = 0xd
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_MVRP                       = 0x88f5
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PRP                        = 0x88fb
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FF0                              = 0x0
-	FF1                              = 0x8000
-	FFDLY                            = 0x8000
-	FLUSHO                           = 0x1000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0x5
-	F_GETLK64                        = 0x5
-	F_GETOWN                         = 0x9
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x6
-	F_SETLK64                        = 0x6
-	F_SETLKW                         = 0x7
-	F_SETLKW64                       = 0x7
-	F_SETOWN                         = 0x8
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x400
-	IBSHIFT                          = 0x10
-	ICANON                           = 0x2
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x8000
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_NODAD                      = 0x2
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x7
-	IFF_802_1Q_VLAN                  = 0x1
-	IFF_ALLMULTI                     = 0x200
-	IFF_ATTACH_QUEUE                 = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BONDING                      = 0x20
-	IFF_BRIDGE_PORT                  = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DETACH_QUEUE                 = 0x400
-	IFF_DISABLE_NETPOLL              = 0x1000
-	IFF_DONT_BRIDGE                  = 0x800
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_EBRIDGE                      = 0x2
-	IFF_ECHO                         = 0x40000
-	IFF_ISATAP                       = 0x80
-	IFF_LIVE_ADDR_CHANGE             = 0x100000
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MACVLAN                      = 0x200000
-	IFF_MACVLAN_PORT                 = 0x2000
-	IFF_MASTER                       = 0x400
-	IFF_MASTER_8023AD                = 0x8
-	IFF_MASTER_ALB                   = 0x10
-	IFF_MASTER_ARPMON                = 0x100
-	IFF_MULTICAST                    = 0x1000
-	IFF_MULTI_QUEUE                  = 0x100
-	IFF_NOARP                        = 0x80
-	IFF_NOFILTER                     = 0x1000
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_OVS_DATAPATH                 = 0x8000
-	IFF_PERSIST                      = 0x800
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_SLAVE_INACTIVE               = 0x4
-	IFF_SLAVE_NEEDARP                = 0x40
-	IFF_SUPP_NOFCS                   = 0x80000
-	IFF_TAP                          = 0x2
-	IFF_TEAM_PORT                    = 0x40000
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_TX_SKB_SHARING               = 0x10000
-	IFF_UNICAST_FLT                  = 0x20000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFF_WAN_HDLC                     = 0x200
-	IFF_XMIT_DST_RELEASE             = 0x400
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x800
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_BEETPH                   = 0x5e
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MH                       = 0x87
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_UNICAST_IF                    = 0x32
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x1
-	ISTRIP                           = 0x20
-	IUCLC                            = 0x200
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x1000
-	IXON                             = 0x400
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DODUMP                      = 0x11
-	MADV_DOFORK                      = 0xb
-	MADV_DONTDUMP                    = 0x10
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x100
-	MAP_HUGETLB                      = 0x40000
-	MAP_HUGE_MASK                    = 0x3f
-	MAP_HUGE_SHIFT                   = 0x1a
-	MAP_LOCKED                       = 0x2000
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x4000
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x20000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x1
-	MCL_FUTURE                       = 0x2
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_RX_RING                  = 0x6
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_SOCK_DIAG                = 0x4
-	NETLINK_TX_RING                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NL0                              = 0x0
-	NL1                              = 0x100
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLDLY                            = 0x100
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	OLCUC                            = 0x2
-	ONLCR                            = 0x4
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x400
-	O_ASYNC                          = 0x2000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x40
-	O_DIRECT                         = 0x10000
-	O_DIRECTORY                      = 0x4000
-	O_DSYNC                          = 0x1000
-	O_EXCL                           = 0x80
-	O_FSYNC                          = 0x101000
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x800
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x100
-	O_NOFOLLOW                       = 0x8000
-	O_NONBLOCK                       = 0x800
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x101000
-	O_SYNC                           = 0x101000
-	O_TMPFILE                        = 0x410000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_FLAG_ROLLOVER      = 0x1000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FANOUT_RND                = 0x4
-	PACKET_FANOUT_ROLLOVER           = 0x3
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_HAS_OFF                = 0x13
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x100
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x200
-	PENDIN                           = 0x4000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_GET_CHILD_SUBREAPER           = 0x25
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_TID_ADDRESS               = 0x28
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_SET_CHILD_SUBREAPER           = 0x24
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_ARG_END                = 0x9
-	PR_SET_MM_ARG_START              = 0x8
-	PR_SET_MM_AUXV                   = 0xc
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_ENV_END                = 0xb
-	PR_SET_MM_ENV_START              = 0xa
-	PR_SET_MM_EXE_FILE               = 0xd
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETSIGMASK                = 0x420a
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_O_EXITKILL                = 0x100000
-	PTRACE_O_MASK                    = 0x1000ff
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKSIGINFO               = 0x4209
-	PTRACE_PEEKSIGINFO_SHARED        = 0x1
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETSIGMASK                = 0x420b
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TRACEME                   = 0x0
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x7
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0xf
-	RTAX_MTU                         = 0x2
-	RTAX_QUICKACK                    = 0xf
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x11
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELMDB                       = 0x55
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMDB                       = 0x56
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETNETCONF                   = 0x52
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x57
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWMDB                       = 0x54
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWNETCONF                   = 0x50
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x12
-	RTM_NR_MSGTYPES                  = 0x48
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MROUTED                   = 0x11
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SCM_WIFI_STATUS                  = 0x29
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x800
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0x1
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1e
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BROADCAST                     = 0x6
-	SO_BSDCOMPAT                     = 0xe
-	SO_BUSY_POLL                     = 0x2e
-	SO_DEBUG                         = 0x1
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x27
-	SO_DONTROUTE                     = 0x5
-	SO_ERROR                         = 0x4
-	SO_GET_FILTER                    = 0x1a
-	SO_KEEPALIVE                     = 0x9
-	SO_LINGER                        = 0xd
-	SO_LOCK_FILTER                   = 0x2c
-	SO_MARK                          = 0x24
-	SO_MAX_PACING_RATE               = 0x2f
-	SO_NOFCS                         = 0x2b
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0xa
-	SO_PASSCRED                      = 0x10
-	SO_PASSSEC                       = 0x22
-	SO_PEEK_OFF                      = 0x2a
-	SO_PEERCRED                      = 0x11
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1f
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x26
-	SO_RCVBUF                        = 0x8
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x12
-	SO_RCVTIMEO                      = 0x14
-	SO_REUSEADDR                     = 0x2
-	SO_REUSEPORT                     = 0xf
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SELECT_ERR_QUEUE              = 0x2d
-	SO_SNDBUF                        = 0x7
-	SO_SNDBUFFORCE                   = 0x20
-	SO_SNDLOWAT                      = 0x13
-	SO_SNDTIMEO                      = 0x15
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x3
-	SO_WIFI_STATUS                   = 0x29
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TAB0                             = 0x0
-	TAB1                             = 0x800
-	TAB2                             = 0x1000
-	TAB3                             = 0x1800
-	TABDLY                           = 0x1800
-	TCFLSH                           = 0x540b
-	TCGETA                           = 0x5405
-	TCGETS                           = 0x5401
-	TCGETS2                          = 0x802c542a
-	TCGETX                           = 0x5432
-	TCIFLUSH                         = 0x0
-	TCIOFF                           = 0x2
-	TCIOFLUSH                        = 0x2
-	TCION                            = 0x3
-	TCOFLUSH                         = 0x1
-	TCOOFF                           = 0x0
-	TCOON                            = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_COOKIE_IN_ALWAYS             = 0x1
-	TCP_COOKIE_MAX                   = 0x10
-	TCP_COOKIE_MIN                   = 0x8
-	TCP_COOKIE_OUT_NEVER             = 0x2
-	TCP_COOKIE_PAIR_SIZE             = 0x20
-	TCP_COOKIE_TRANSACTIONS          = 0xf
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_FASTOPEN                     = 0x17
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_MSS_DEFAULT                  = 0x218
-	TCP_MSS_DESIRED                  = 0x4c4
-	TCP_NODELAY                      = 0x1
-	TCP_QUEUE_SEQ                    = 0x15
-	TCP_QUICKACK                     = 0xc
-	TCP_REPAIR                       = 0x13
-	TCP_REPAIR_OPTIONS               = 0x16
-	TCP_REPAIR_QUEUE                 = 0x14
-	TCP_SYNCNT                       = 0x7
-	TCP_S_DATA_IN                    = 0x4
-	TCP_S_DATA_OUT                   = 0x8
-	TCP_THIN_DUPACK                  = 0x11
-	TCP_THIN_LINEAR_TIMEOUTS         = 0x10
-	TCP_TIMESTAMP                    = 0x18
-	TCP_USER_TIMEOUT                 = 0x12
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TCSBRK                           = 0x5409
-	TCSBRKP                          = 0x5425
-	TCSETA                           = 0x5406
-	TCSETAF                          = 0x5408
-	TCSETAW                          = 0x5407
-	TCSETS                           = 0x5402
-	TCSETS2                          = 0x402c542b
-	TCSETSF                          = 0x5404
-	TCSETSF2                         = 0x402c542d
-	TCSETSW                          = 0x5403
-	TCSETSW2                         = 0x402c542c
-	TCSETX                           = 0x5433
-	TCSETXF                          = 0x5434
-	TCSETXW                          = 0x5435
-	TCXONC                           = 0x540a
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x541d
-	TIOCEXCL                         = 0x540c
-	TIOCGDEV                         = 0x80045432
-	TIOCGETD                         = 0x5424
-	TIOCGEXCL                        = 0x80045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGPGRP                        = 0x540f
-	TIOCGPKT                         = 0x80045438
-	TIOCGPTLCK                       = 0x80045439
-	TIOCGPTN                         = 0x80045430
-	TIOCGRS485                       = 0x542e
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x5429
-	TIOCGSOFTCAR                     = 0x5419
-	TIOCGWINSZ                       = 0x5413
-	TIOCINQ                          = 0x541b
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x5417
-	TIOCMBIS                         = 0x5416
-	TIOCMGET                         = 0x5415
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x5418
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x5422
-	TIOCNXCL                         = 0x540d
-	TIOCOUTQ                         = 0x5411
-	TIOCPKT                          = 0x5420
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x540e
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETD                         = 0x5423
-	TIOCSIG                          = 0x40045436
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSPGRP                        = 0x5410
-	TIOCSPTLCK                       = 0x40045431
-	TIOCSRS485                       = 0x542f
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x541a
-	TIOCSTI                          = 0x5412
-	TIOCSWINSZ                       = 0x5414
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x100
-	TUNATTACHFILTER                  = 0x401054d5
-	TUNDETACHFILTER                  = 0x401054d6
-	TUNGETFEATURES                   = 0x800454cf
-	TUNGETFILTER                     = 0x801054db
-	TUNGETIFF                        = 0x800454d2
-	TUNGETSNDBUF                     = 0x800454d3
-	TUNGETVNETHDRSZ                  = 0x800454d7
-	TUNSETDEBUG                      = 0x400454c9
-	TUNSETGROUP                      = 0x400454ce
-	TUNSETIFF                        = 0x400454ca
-	TUNSETIFINDEX                    = 0x400454da
-	TUNSETLINK                       = 0x400454cd
-	TUNSETNOCSUM                     = 0x400454c8
-	TUNSETOFFLOAD                    = 0x400454d0
-	TUNSETOWNER                      = 0x400454cc
-	TUNSETPERSIST                    = 0x400454cb
-	TUNSETQUEUE                      = 0x400454d9
-	TUNSETSNDBUF                     = 0x400454d4
-	TUNSETTXFILTER                   = 0x400454d1
-	TUNSETVNETHDRSZ                  = 0x400454d8
-	VDISCARD                         = 0xd
-	VEOF                             = 0x4
-	VEOL                             = 0xb
-	VEOL2                            = 0x10
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x6
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xc
-	VSTART                           = 0x8
-	VSTOP                            = 0x9
-	VSUSP                            = 0xa
-	VSWTC                            = 0x7
-	VT0                              = 0x0
-	VT1                              = 0x4000
-	VTDLY                            = 0x4000
-	VTIME                            = 0x5
-	VWERASE                          = 0xe
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-	XCASE                            = 0x4
-	XTABS                            = 0x1800
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x62)
-	EADDRNOTAVAIL   = syscall.Errno(0x63)
-	EADV            = syscall.Errno(0x44)
-	EAFNOSUPPORT    = syscall.Errno(0x61)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x72)
-	EBADE           = syscall.Errno(0x34)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x4d)
-	EBADMSG         = syscall.Errno(0x4a)
-	EBADR           = syscall.Errno(0x35)
-	EBADRQC         = syscall.Errno(0x38)
-	EBADSLT         = syscall.Errno(0x39)
-	EBFONT          = syscall.Errno(0x3b)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x7d)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x2c)
-	ECOMM           = syscall.Errno(0x46)
-	ECONNABORTED    = syscall.Errno(0x67)
-	ECONNREFUSED    = syscall.Errno(0x6f)
-	ECONNRESET      = syscall.Errno(0x68)
-	EDEADLK         = syscall.Errno(0x23)
-	EDEADLOCK       = syscall.Errno(0x23)
-	EDESTADDRREQ    = syscall.Errno(0x59)
-	EDOM            = syscall.Errno(0x21)
-	EDOTDOT         = syscall.Errno(0x49)
-	EDQUOT          = syscall.Errno(0x7a)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x70)
-	EHOSTUNREACH    = syscall.Errno(0x71)
-	EHWPOISON       = syscall.Errno(0x85)
-	EIDRM           = syscall.Errno(0x2b)
-	EILSEQ          = syscall.Errno(0x54)
-	EINPROGRESS     = syscall.Errno(0x73)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x6a)
-	EISDIR          = syscall.Errno(0x15)
-	EISNAM          = syscall.Errno(0x78)
-	EKEYEXPIRED     = syscall.Errno(0x7f)
-	EKEYREJECTED    = syscall.Errno(0x81)
-	EKEYREVOKED     = syscall.Errno(0x80)
-	EL2HLT          = syscall.Errno(0x33)
-	EL2NSYNC        = syscall.Errno(0x2d)
-	EL3HLT          = syscall.Errno(0x2e)
-	EL3RST          = syscall.Errno(0x2f)
-	ELIBACC         = syscall.Errno(0x4f)
-	ELIBBAD         = syscall.Errno(0x50)
-	ELIBEXEC        = syscall.Errno(0x53)
-	ELIBMAX         = syscall.Errno(0x52)
-	ELIBSCN         = syscall.Errno(0x51)
-	ELNRNG          = syscall.Errno(0x30)
-	ELOOP           = syscall.Errno(0x28)
-	EMEDIUMTYPE     = syscall.Errno(0x7c)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x5a)
-	EMULTIHOP       = syscall.Errno(0x48)
-	ENAMETOOLONG    = syscall.Errno(0x24)
-	ENAVAIL         = syscall.Errno(0x77)
-	ENETDOWN        = syscall.Errno(0x64)
-	ENETRESET       = syscall.Errno(0x66)
-	ENETUNREACH     = syscall.Errno(0x65)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x37)
-	ENOBUFS         = syscall.Errno(0x69)
-	ENOCSI          = syscall.Errno(0x32)
-	ENODATA         = syscall.Errno(0x3d)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOKEY          = syscall.Errno(0x7e)
-	ENOLCK          = syscall.Errno(0x25)
-	ENOLINK         = syscall.Errno(0x43)
-	ENOMEDIUM       = syscall.Errno(0x7b)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x2a)
-	ENONET          = syscall.Errno(0x40)
-	ENOPKG          = syscall.Errno(0x41)
-	ENOPROTOOPT     = syscall.Errno(0x5c)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x3f)
-	ENOSTR          = syscall.Errno(0x3c)
-	ENOSYS          = syscall.Errno(0x26)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x6b)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x27)
-	ENOTNAM         = syscall.Errno(0x76)
-	ENOTRECOVERABLE = syscall.Errno(0x83)
-	ENOTSOCK        = syscall.Errno(0x58)
-	ENOTSUP         = syscall.Errno(0x5f)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x4c)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x5f)
-	EOVERFLOW       = syscall.Errno(0x4b)
-	EOWNERDEAD      = syscall.Errno(0x82)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x60)
-	EPIPE           = syscall.Errno(0x20)
-	EPROTO          = syscall.Errno(0x47)
-	EPROTONOSUPPORT = syscall.Errno(0x5d)
-	EPROTOTYPE      = syscall.Errno(0x5b)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x4e)
-	EREMOTE         = syscall.Errno(0x42)
-	EREMOTEIO       = syscall.Errno(0x79)
-	ERESTART        = syscall.Errno(0x55)
-	ERFKILL         = syscall.Errno(0x84)
-	EROFS           = syscall.Errno(0x1e)
-	ESHUTDOWN       = syscall.Errno(0x6c)
-	ESOCKTNOSUPPORT = syscall.Errno(0x5e)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x45)
-	ESTALE          = syscall.Errno(0x74)
-	ESTRPIPE        = syscall.Errno(0x56)
-	ETIME           = syscall.Errno(0x3e)
-	ETIMEDOUT       = syscall.Errno(0x6e)
-	ETOOMANYREFS    = syscall.Errno(0x6d)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUCLEAN         = syscall.Errno(0x75)
-	EUNATCH         = syscall.Errno(0x31)
-	EUSERS          = syscall.Errno(0x57)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x36)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0x7)
-	SIGCHLD   = syscall.Signal(0x11)
-	SIGCLD    = syscall.Signal(0x11)
-	SIGCONT   = syscall.Signal(0x12)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x1d)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPOLL   = syscall.Signal(0x1d)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x1e)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTKFLT = syscall.Signal(0x10)
-	SIGSTOP   = syscall.Signal(0x13)
-	SIGSYS    = syscall.Signal(0x1f)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x14)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGUNUSED = syscall.Signal(0x1f)
-	SIGURG    = syscall.Signal(0x17)
-	SIGUSR1   = syscall.Signal(0xa)
-	SIGUSR2   = syscall.Signal(0xc)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	35:  "resource deadlock avoided",
-	36:  "file name too long",
-	37:  "no locks available",
-	38:  "function not implemented",
-	39:  "directory not empty",
-	40:  "too many levels of symbolic links",
-	42:  "no message of desired type",
-	43:  "identifier removed",
-	44:  "channel number out of range",
-	45:  "level 2 not synchronized",
-	46:  "level 3 halted",
-	47:  "level 3 reset",
-	48:  "link number out of range",
-	49:  "protocol driver not attached",
-	50:  "no CSI structure available",
-	51:  "level 2 halted",
-	52:  "invalid exchange",
-	53:  "invalid request descriptor",
-	54:  "exchange full",
-	55:  "no anode",
-	56:  "invalid request code",
-	57:  "invalid slot",
-	59:  "bad font file format",
-	60:  "device not a stream",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of streams resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "multihop attempted",
-	73:  "RFS specific error",
-	74:  "bad message",
-	75:  "value too large for defined data type",
-	76:  "name not unique on network",
-	77:  "file descriptor in bad state",
-	78:  "remote address changed",
-	79:  "can not access a needed shared library",
-	80:  "accessing a corrupted shared library",
-	81:  ".lib section in a.out corrupted",
-	82:  "attempting to link in too many shared libraries",
-	83:  "cannot exec a shared library directly",
-	84:  "invalid or incomplete multibyte or wide character",
-	85:  "interrupted system call should be restarted",
-	86:  "streams pipe error",
-	87:  "too many users",
-	88:  "socket operation on non-socket",
-	89:  "destination address required",
-	90:  "message too long",
-	91:  "protocol wrong type for socket",
-	92:  "protocol not available",
-	93:  "protocol not supported",
-	94:  "socket type not supported",
-	95:  "operation not supported",
-	96:  "protocol family not supported",
-	97:  "address family not supported by protocol",
-	98:  "address already in use",
-	99:  "cannot assign requested address",
-	100: "network is down",
-	101: "network is unreachable",
-	102: "network dropped connection on reset",
-	103: "software caused connection abort",
-	104: "connection reset by peer",
-	105: "no buffer space available",
-	106: "transport endpoint is already connected",
-	107: "transport endpoint is not connected",
-	108: "cannot send after transport endpoint shutdown",
-	109: "too many references: cannot splice",
-	110: "connection timed out",
-	111: "connection refused",
-	112: "host is down",
-	113: "no route to host",
-	114: "operation already in progress",
-	115: "operation now in progress",
-	116: "stale file handle",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "disk quota exceeded",
-	123: "no medium found",
-	124: "wrong medium type",
-	125: "operation canceled",
-	126: "required key not available",
-	127: "key has expired",
-	128: "key has been revoked",
-	129: "key was rejected by service",
-	130: "owner died",
-	131: "state not recoverable",
-	132: "operation not possible due to RF-kill",
-	133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "bus error",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "user defined signal 1",
-	11: "segmentation fault",
-	12: "user defined signal 2",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "stack fault",
-	17: "child exited",
-	18: "continued",
-	19: "stopped (signal)",
-	20: "stopped",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "urgent I/O condition",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "I/O possible",
-	30: "power failure",
-	31: "bad system call",
-}


[07/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
deleted file mode 100644
index fa92387..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ /dev/null
@@ -1,1671 +0,0 @@
-// mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,linux
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(arg)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(source)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	var _p2 *byte
-	_p2, err = BytePtrFromString(fstype)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	use(unsafe.Pointer(_p2))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
-	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
-	state = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
-	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
-	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
-	tid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(dest) > 0 {
-		_p2 = unsafe.Pointer(&dest[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(pathname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
-	use(unsafe.Pointer(_p0))
-	watchdesc = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
-	success = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(dest) > 0 {
-		_p1 = unsafe.Pointer(&dest[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
-	use(unsafe.Pointer(_p0))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(newroot)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(putold)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
-	_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(data) > 0 {
-		_p2 = unsafe.Pointer(&data[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
-	Syscall(SYS_SYNC, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
-	r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
-	n = int64(int64(r1)<<32 | int64(r0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
-	ticks = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
-	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
-	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
-	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
-	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
-	_, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
-	euid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
-	_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
-	_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
-	written = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
-	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	nn = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(events) > 0 {
-		_p0 = unsafe.Pointer(&events[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
-	_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getrlimit(resource int, rlim *rlimit32) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setrlimit(resource int, rlim *rlimit32) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Time(t *Time_t) (tt Time_t, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
-	tt = Time_t(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}



[41/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/flag.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/flag.go b/newt/vendor/github.com/spf13/pflag/flag.go
deleted file mode 100644
index fa81564..0000000
--- a/newt/vendor/github.com/spf13/pflag/flag.go
+++ /dev/null
@@ -1,947 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-Package pflag is a drop-in replacement for Go's flag package, implementing
-POSIX/GNU-style --flags.
-
-pflag is compatible with the GNU extensions to the POSIX recommendations
-for command-line options. See
-http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
-
-Usage:
-
-pflag is a drop-in replacement of Go's native flag package. If you import
-pflag under the name "flag" then all code should continue to function
-with no changes.
-
-	import flag "github.com/ogier/pflag"
-
-	There is one exception to this: if you directly instantiate the Flag struct
-there is one more field "Shorthand" that you will need to set.
-Most code never instantiates this struct directly, and instead uses
-functions such as String(), BoolVar(), and Var(), and is therefore
-unaffected.
-
-Define flags using flag.String(), Bool(), Int(), etc.
-
-This declares an integer flag, -flagname, stored in the pointer ip, with type *int.
-	var ip = flag.Int("flagname", 1234, "help message for flagname")
-If you like, you can bind the flag to a variable using the Var() functions.
-	var flagvar int
-	func init() {
-		flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname")
-	}
-Or you can create custom flags that satisfy the Value interface (with
-pointer receivers) and couple them to flag parsing by
-	flag.Var(&flagVal, "name", "help message for flagname")
-For such flags, the default value is just the initial value of the variable.
-
-After all flags are defined, call
-	flag.Parse()
-to parse the command line into the defined flags.
-
-Flags may then be used directly. If you're using the flags themselves,
-they are all pointers; if you bind to variables, they're values.
-	fmt.Println("ip has value ", *ip)
-	fmt.Println("flagvar has value ", flagvar)
-
-After parsing, the arguments after the flag are available as the
-slice flag.Args() or individually as flag.Arg(i).
-The arguments are indexed from 0 through flag.NArg()-1.
-
-The pflag package also defines some new functions that are not in flag,
-that give one-letter shorthands for flags. You can use these by appending
-'P' to the name of any function that defines a flag.
-	var ip = flag.IntP("flagname", "f", 1234, "help message")
-	var flagvar bool
-	func init() {
-		flag.BoolVarP("boolname", "b", true, "help message")
-	}
-	flag.VarP(&flagVar, "varname", "v", 1234, "help message")
-Shorthand letters can be used with single dashes on the command line.
-Boolean shorthand flags can be combined with other shorthand flags.
-
-Command line flag syntax:
-	--flag    // boolean flags only
-	--flag=x
-
-Unlike the flag package, a single dash before an option means something
-different than a double dash. Single dashes signify a series of shorthand
-letters for flags. All but the last shorthand letter must be boolean flags.
-	// boolean flags
-	-f
-	-abc
-	// non-boolean flags
-	-n 1234
-	-Ifile
-	// mixed
-	-abcs "hello"
-	-abcn1234
-
-Flag parsing stops after the terminator "--". Unlike the flag package,
-flags can be interspersed with arguments anywhere on the command line
-before this terminator.
-
-Integer flags accept 1234, 0664, 0x1234 and may be negative.
-Boolean flags (in their long form) accept 1, 0, t, f, true, false,
-TRUE, FALSE, True, False.
-Duration flags accept any input valid for time.ParseDuration.
-
-The default set of command-line flags is controlled by
-top-level functions.  The FlagSet type allows one to define
-independent sets of flags, such as to implement subcommands
-in a command-line interface. The methods of FlagSet are
-analogous to the top-level functions for the command-line
-flag set.
-*/
-package pflag
-
-import (
-	"bytes"
-	"errors"
-	"fmt"
-	"io"
-	"os"
-	"sort"
-	"strings"
-)
-
-// ErrHelp is the error returned if the flag -help is invoked but no such flag is defined.
-var ErrHelp = errors.New("pflag: help requested")
-
-// ErrorHandling defines how to handle flag parsing errors.
-type ErrorHandling int
-
-const (
-	// ContinueOnError will return an err from Parse() if an error is found
-	ContinueOnError ErrorHandling = iota
-	// ExitOnError will call os.Exit(2) if an error is found when parsing
-	ExitOnError
-	// PanicOnError will panic() if an error is found when parsing flags
-	PanicOnError
-)
-
-// NormalizedName is a flag name that has been normalized according to rules
-// for the FlagSet (e.g. making '-' and '_' equivalent).
-type NormalizedName string
-
-// A FlagSet represents a set of defined flags.
-type FlagSet struct {
-	// Usage is the function called when an error occurs while parsing flags.
-	// The field is a function (not a method) that may be changed to point to
-	// a custom error handler.
-	Usage func()
-
-	name              string
-	parsed            bool
-	actual            map[NormalizedName]*Flag
-	formal            map[NormalizedName]*Flag
-	shorthands        map[byte]*Flag
-	args              []string // arguments after flags
-	argsLenAtDash     int      // len(args) when a '--' was located when parsing, or -1 if no --
-	exitOnError       bool     // does the program exit if there's an error?
-	errorHandling     ErrorHandling
-	output            io.Writer // nil means stderr; use out() accessor
-	interspersed      bool      // allow interspersed option/non-option args
-	normalizeNameFunc func(f *FlagSet, name string) NormalizedName
-}
-
-// A Flag represents the state of a flag.
-type Flag struct {
-	Name                string              // name as it appears on command line
-	Shorthand           string              // one-letter abbreviated flag
-	Usage               string              // help message
-	Value               Value               // value as set
-	DefValue            string              // default value (as text); for usage message
-	Changed             bool                // If the user set the value (or if left to default)
-	NoOptDefVal         string              //default value (as text); if the flag is on the command line without any options
-	Deprecated          string              // If this flag is deprecated, this string is the new or now thing to use
-	Hidden              bool                // used by cobra.Command to allow flags to be hidden from help/usage text
-	ShorthandDeprecated string              // If the shorthand of this flag is deprecated, this string is the new or now thing to use
-	Annotations         map[string][]string // used by cobra.Command bash autocomple code
-}
-
-// Value is the interface to the dynamic value stored in a flag.
-// (The default value is represented as a string.)
-type Value interface {
-	String() string
-	Set(string) error
-	Type() string
-}
-
-// sortFlags returns the flags as a slice in lexicographical sorted order.
-func sortFlags(flags map[NormalizedName]*Flag) []*Flag {
-	list := make(sort.StringSlice, len(flags))
-	i := 0
-	for k := range flags {
-		list[i] = string(k)
-		i++
-	}
-	list.Sort()
-	result := make([]*Flag, len(list))
-	for i, name := range list {
-		result[i] = flags[NormalizedName(name)]
-	}
-	return result
-}
-
-// SetNormalizeFunc allows you to add a function which can translate flag names.
-// Flags added to the FlagSet will be translated and then when anything tries to
-// look up the flag that will also be translated. So it would be possible to create
-// a flag named "getURL" and have it translated to "geturl".  A user could then pass
-// "--getUrl" which may also be translated to "geturl" and everything will work.
-func (f *FlagSet) SetNormalizeFunc(n func(f *FlagSet, name string) NormalizedName) {
-	f.normalizeNameFunc = n
-	for k, v := range f.formal {
-		delete(f.formal, k)
-		nname := f.normalizeFlagName(string(k))
-		f.formal[nname] = v
-		v.Name = string(nname)
-	}
-}
-
-// GetNormalizeFunc returns the previously set NormalizeFunc of a function which
-// does no translation, if not set previously.
-func (f *FlagSet) GetNormalizeFunc() func(f *FlagSet, name string) NormalizedName {
-	if f.normalizeNameFunc != nil {
-		return f.normalizeNameFunc
-	}
-	return func(f *FlagSet, name string) NormalizedName { return NormalizedName(name) }
-}
-
-func (f *FlagSet) normalizeFlagName(name string) NormalizedName {
-	n := f.GetNormalizeFunc()
-	return n(f, name)
-}
-
-func (f *FlagSet) out() io.Writer {
-	if f.output == nil {
-		return os.Stderr
-	}
-	return f.output
-}
-
-// SetOutput sets the destination for usage and error messages.
-// If output is nil, os.Stderr is used.
-func (f *FlagSet) SetOutput(output io.Writer) {
-	f.output = output
-}
-
-// VisitAll visits the flags in lexicographical order, calling fn for each.
-// It visits all flags, even those not set.
-func (f *FlagSet) VisitAll(fn func(*Flag)) {
-	for _, flag := range sortFlags(f.formal) {
-		fn(flag)
-	}
-}
-
-// HasFlags returns a bool to indicate if the FlagSet has any flags definied.
-func (f *FlagSet) HasFlags() bool {
-	return len(f.formal) > 0
-}
-
-// HasAvailableFlags returns a bool to indicate if the FlagSet has any flags
-// definied that are not hidden or deprecated.
-func (f *FlagSet) HasAvailableFlags() bool {
-	for _, flag := range f.formal {
-		if !flag.Hidden && len(flag.Deprecated) == 0 {
-			return true
-		}
-	}
-	return false
-}
-
-// VisitAll visits the command-line flags in lexicographical order, calling
-// fn for each.  It visits all flags, even those not set.
-func VisitAll(fn func(*Flag)) {
-	CommandLine.VisitAll(fn)
-}
-
-// Visit visits the flags in lexicographical order, calling fn for each.
-// It visits only those flags that have been set.
-func (f *FlagSet) Visit(fn func(*Flag)) {
-	for _, flag := range sortFlags(f.actual) {
-		fn(flag)
-	}
-}
-
-// Visit visits the command-line flags in lexicographical order, calling fn
-// for each.  It visits only those flags that have been set.
-func Visit(fn func(*Flag)) {
-	CommandLine.Visit(fn)
-}
-
-// Lookup returns the Flag structure of the named flag, returning nil if none exists.
-func (f *FlagSet) Lookup(name string) *Flag {
-	return f.lookup(f.normalizeFlagName(name))
-}
-
-// lookup returns the Flag structure of the named flag, returning nil if none exists.
-func (f *FlagSet) lookup(name NormalizedName) *Flag {
-	return f.formal[name]
-}
-
-// func to return a given type for a given flag name
-func (f *FlagSet) getFlagType(name string, ftype string, convFunc func(sval string) (interface{}, error)) (interface{}, error) {
-	flag := f.Lookup(name)
-	if flag == nil {
-		err := fmt.Errorf("flag accessed but not defined: %s", name)
-		return nil, err
-	}
-
-	if flag.Value.Type() != ftype {
-		err := fmt.Errorf("trying to get %s value of flag of type %s", ftype, flag.Value.Type())
-		return nil, err
-	}
-
-	sval := flag.Value.String()
-	result, err := convFunc(sval)
-	if err != nil {
-		return nil, err
-	}
-	return result, nil
-}
-
-// ArgsLenAtDash will return the length of f.Args at the moment when a -- was
-// found during arg parsing. This allows your program to know which args were
-// before the -- and which came after.
-func (f *FlagSet) ArgsLenAtDash() int {
-	return f.argsLenAtDash
-}
-
-// MarkDeprecated indicated that a flag is deprecated in your program. It will
-// continue to function but will not show up in help or usage messages. Using
-// this flag will also print the given usageMessage.
-func (f *FlagSet) MarkDeprecated(name string, usageMessage string) error {
-	flag := f.Lookup(name)
-	if flag == nil {
-		return fmt.Errorf("flag %q does not exist", name)
-	}
-	if len(usageMessage) == 0 {
-		return fmt.Errorf("deprecated message for flag %q must be set", name)
-	}
-	flag.Deprecated = usageMessage
-	return nil
-}
-
-// MarkShorthandDeprecated will mark the shorthand of a flag deprecated in your
-// program. It will continue to function but will not show up in help or usage
-// messages. Using this flag will also print the given usageMessage.
-func (f *FlagSet) MarkShorthandDeprecated(name string, usageMessage string) error {
-	flag := f.Lookup(name)
-	if flag == nil {
-		return fmt.Errorf("flag %q does not exist", name)
-	}
-	if len(usageMessage) == 0 {
-		return fmt.Errorf("deprecated message for flag %q must be set", name)
-	}
-	flag.ShorthandDeprecated = usageMessage
-	return nil
-}
-
-// MarkHidden sets a flag to 'hidden' in your program. It will continue to
-// function but will not show up in help or usage messages.
-func (f *FlagSet) MarkHidden(name string) error {
-	flag := f.Lookup(name)
-	if flag == nil {
-		return fmt.Errorf("flag %q does not exist", name)
-	}
-	flag.Hidden = true
-	return nil
-}
-
-// Lookup returns the Flag structure of the named command-line flag,
-// returning nil if none exists.
-func Lookup(name string) *Flag {
-	return CommandLine.Lookup(name)
-}
-
-// Set sets the value of the named flag.
-func (f *FlagSet) Set(name, value string) error {
-	normalName := f.normalizeFlagName(name)
-	flag, ok := f.formal[normalName]
-	if !ok {
-		return fmt.Errorf("no such flag -%v", name)
-	}
-	err := flag.Value.Set(value)
-	if err != nil {
-		return err
-	}
-	if f.actual == nil {
-		f.actual = make(map[NormalizedName]*Flag)
-	}
-	f.actual[normalName] = flag
-	flag.Changed = true
-	if len(flag.Deprecated) > 0 {
-		fmt.Fprintf(os.Stderr, "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated)
-	}
-	return nil
-}
-
-// SetAnnotation allows one to set arbitrary annotations on a flag in the FlagSet.
-// This is sometimes used by spf13/cobra programs which want to generate additional
-// bash completion information.
-func (f *FlagSet) SetAnnotation(name, key string, values []string) error {
-	normalName := f.normalizeFlagName(name)
-	flag, ok := f.formal[normalName]
-	if !ok {
-		return fmt.Errorf("no such flag -%v", name)
-	}
-	if flag.Annotations == nil {
-		flag.Annotations = map[string][]string{}
-	}
-	flag.Annotations[key] = values
-	return nil
-}
-
-// Changed returns true if the flag was explicitly set during Parse() and false
-// otherwise
-func (f *FlagSet) Changed(name string) bool {
-	flag := f.Lookup(name)
-	// If a flag doesn't exist, it wasn't changed....
-	if flag == nil {
-		return false
-	}
-	return flag.Changed
-}
-
-// Set sets the value of the named command-line flag.
-func Set(name, value string) error {
-	return CommandLine.Set(name, value)
-}
-
-// PrintDefaults prints, to standard error unless configured
-// otherwise, the default values of all defined flags in the set.
-func (f *FlagSet) PrintDefaults() {
-	usages := f.FlagUsages()
-	fmt.Fprint(f.out(), usages)
-}
-
-// defaultIsZeroValue returns true if the default value for this flag represents
-// a zero value.
-func (f *Flag) defaultIsZeroValue() bool {
-	switch f.Value.(type) {
-	case boolFlag:
-		return f.DefValue == "false"
-	case *durationValue:
-		// Beginning in Go 1.7, duration zero values are "0s"
-		return f.DefValue == "0" || f.DefValue == "0s"
-	case *intValue, *int8Value, *int32Value, *int64Value, *uintValue, *uint8Value, *uint16Value, *uint32Value, *uint64Value, *countValue, *float32Value, *float64Value:
-		return f.DefValue == "0"
-	case *stringValue:
-		return f.DefValue == ""
-	case *ipValue, *ipMaskValue, *ipNetValue:
-		return f.DefValue == "<nil>"
-	case *intSliceValue, *stringSliceValue, *stringArrayValue:
-		return f.DefValue == "[]"
-	default:
-		switch f.Value.String() {
-		case "false":
-			return true
-		case "<nil>":
-			return true
-		case "":
-			return true
-		case "0":
-			return true
-		}
-		return false
-	}
-}
-
-// UnquoteUsage extracts a back-quoted name from the usage
-// string for a flag and returns it and the un-quoted usage.
-// Given "a `name` to show" it returns ("name", "a name to show").
-// If there are no back quotes, the name is an educated guess of the
-// type of the flag's value, or the empty string if the flag is boolean.
-func UnquoteUsage(flag *Flag) (name string, usage string) {
-	// Look for a back-quoted name, but avoid the strings package.
-	usage = flag.Usage
-	for i := 0; i < len(usage); i++ {
-		if usage[i] == '`' {
-			for j := i + 1; j < len(usage); j++ {
-				if usage[j] == '`' {
-					name = usage[i+1 : j]
-					usage = usage[:i] + name + usage[j+1:]
-					return name, usage
-				}
-			}
-			break // Only one back quote; use type name.
-		}
-	}
-
-	name = flag.Value.Type()
-	switch name {
-	case "bool":
-		name = ""
-	case "float64":
-		name = "float"
-	case "int64":
-		name = "int"
-	case "uint64":
-		name = "uint"
-	}
-
-	return
-}
-
-// FlagUsages Returns a string containing the usage information for all flags in
-// the FlagSet
-func (f *FlagSet) FlagUsages() string {
-	x := new(bytes.Buffer)
-
-	lines := make([]string, 0, len(f.formal))
-
-	maxlen := 0
-	f.VisitAll(func(flag *Flag) {
-		if len(flag.Deprecated) > 0 || flag.Hidden {
-			return
-		}
-
-		line := ""
-		if len(flag.Shorthand) > 0 && len(flag.ShorthandDeprecated) == 0 {
-			line = fmt.Sprintf("  -%s, --%s", flag.Shorthand, flag.Name)
-		} else {
-			line = fmt.Sprintf("      --%s", flag.Name)
-		}
-
-		varname, usage := UnquoteUsage(flag)
-		if len(varname) > 0 {
-			line += " " + varname
-		}
-		if len(flag.NoOptDefVal) > 0 {
-			switch flag.Value.Type() {
-			case "string":
-				line += fmt.Sprintf("[=\"%s\"]", flag.NoOptDefVal)
-			case "bool":
-				if flag.NoOptDefVal != "true" {
-					line += fmt.Sprintf("[=%s]", flag.NoOptDefVal)
-				}
-			default:
-				line += fmt.Sprintf("[=%s]", flag.NoOptDefVal)
-			}
-		}
-
-		// This special character will be replaced with spacing once the
-		// correct alignment is calculated
-		line += "\x00"
-		if len(line) > maxlen {
-			maxlen = len(line)
-		}
-
-		line += usage
-		if !flag.defaultIsZeroValue() {
-			if flag.Value.Type() == "string" {
-				line += fmt.Sprintf(" (default \"%s\")", flag.DefValue)
-			} else {
-				line += fmt.Sprintf(" (default %s)", flag.DefValue)
-			}
-		}
-
-		lines = append(lines, line)
-	})
-
-	for _, line := range lines {
-		sidx := strings.Index(line, "\x00")
-		spacing := strings.Repeat(" ", maxlen-sidx)
-		fmt.Fprintln(x, line[:sidx], spacing, line[sidx+1:])
-	}
-
-	return x.String()
-}
-
-// PrintDefaults prints to standard error the default values of all defined command-line flags.
-func PrintDefaults() {
-	CommandLine.PrintDefaults()
-}
-
-// defaultUsage is the default function to print a usage message.
-func defaultUsage(f *FlagSet) {
-	fmt.Fprintf(f.out(), "Usage of %s:\n", f.name)
-	f.PrintDefaults()
-}
-
-// NOTE: Usage is not just defaultUsage(CommandLine)
-// because it serves (via godoc flag Usage) as the example
-// for how to write your own usage function.
-
-// Usage prints to standard error a usage message documenting all defined command-line flags.
-// The function is a variable that may be changed to point to a custom function.
-// By default it prints a simple header and calls PrintDefaults; for details about the
-// format of the output and how to control it, see the documentation for PrintDefaults.
-var Usage = func() {
-	fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
-	PrintDefaults()
-}
-
-// NFlag returns the number of flags that have been set.
-func (f *FlagSet) NFlag() int { return len(f.actual) }
-
-// NFlag returns the number of command-line flags that have been set.
-func NFlag() int { return len(CommandLine.actual) }
-
-// Arg returns the i'th argument.  Arg(0) is the first remaining argument
-// after flags have been processed.
-func (f *FlagSet) Arg(i int) string {
-	if i < 0 || i >= len(f.args) {
-		return ""
-	}
-	return f.args[i]
-}
-
-// Arg returns the i'th command-line argument.  Arg(0) is the first remaining argument
-// after flags have been processed.
-func Arg(i int) string {
-	return CommandLine.Arg(i)
-}
-
-// NArg is the number of arguments remaining after flags have been processed.
-func (f *FlagSet) NArg() int { return len(f.args) }
-
-// NArg is the number of arguments remaining after flags have been processed.
-func NArg() int { return len(CommandLine.args) }
-
-// Args returns the non-flag arguments.
-func (f *FlagSet) Args() []string { return f.args }
-
-// Args returns the non-flag command-line arguments.
-func Args() []string { return CommandLine.args }
-
-// Var defines a flag with the specified name and usage string. The type and
-// value of the flag are represented by the first argument, of type Value, which
-// typically holds a user-defined implementation of Value. For instance, the
-// caller could create a flag that turns a comma-separated string into a slice
-// of strings by giving the slice the methods of Value; in particular, Set would
-// decompose the comma-separated string into the slice.
-func (f *FlagSet) Var(value Value, name string, usage string) {
-	f.VarP(value, name, "", usage)
-}
-
-// VarPF is like VarP, but returns the flag created
-func (f *FlagSet) VarPF(value Value, name, shorthand, usage string) *Flag {
-	// Remember the default value as a string; it won't change.
-	flag := &Flag{
-		Name:      name,
-		Shorthand: shorthand,
-		Usage:     usage,
-		Value:     value,
-		DefValue:  value.String(),
-	}
-	f.AddFlag(flag)
-	return flag
-}
-
-// VarP is like Var, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) VarP(value Value, name, shorthand, usage string) {
-	_ = f.VarPF(value, name, shorthand, usage)
-}
-
-// AddFlag will add the flag to the FlagSet
-func (f *FlagSet) AddFlag(flag *Flag) {
-	// Call normalizeFlagName function only once
-	normalizedFlagName := f.normalizeFlagName(flag.Name)
-
-	_, alreadythere := f.formal[normalizedFlagName]
-	if alreadythere {
-		msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name)
-		fmt.Fprintln(f.out(), msg)
-		panic(msg) // Happens only if flags are declared with identical names
-	}
-	if f.formal == nil {
-		f.formal = make(map[NormalizedName]*Flag)
-	}
-
-	flag.Name = string(normalizedFlagName)
-	f.formal[normalizedFlagName] = flag
-
-	if len(flag.Shorthand) == 0 {
-		return
-	}
-	if len(flag.Shorthand) > 1 {
-		fmt.Fprintf(f.out(), "%s shorthand more than ASCII character: %s\n", f.name, flag.Shorthand)
-		panic("shorthand is more than one character")
-	}
-	if f.shorthands == nil {
-		f.shorthands = make(map[byte]*Flag)
-	}
-	c := flag.Shorthand[0]
-	old, alreadythere := f.shorthands[c]
-	if alreadythere {
-		fmt.Fprintf(f.out(), "%s shorthand reused: %q for %s already used for %s\n", f.name, c, flag.Name, old.Name)
-		panic("shorthand redefinition")
-	}
-	f.shorthands[c] = flag
-}
-
-// AddFlagSet adds one FlagSet to another. If a flag is already present in f
-// the flag from newSet will be ignored
-func (f *FlagSet) AddFlagSet(newSet *FlagSet) {
-	if newSet == nil {
-		return
-	}
-	newSet.VisitAll(func(flag *Flag) {
-		if f.Lookup(flag.Name) == nil {
-			f.AddFlag(flag)
-		}
-	})
-}
-
-// Var defines a flag with the specified name and usage string. The type and
-// value of the flag are represented by the first argument, of type Value, which
-// typically holds a user-defined implementation of Value. For instance, the
-// caller could create a flag that turns a comma-separated string into a slice
-// of strings by giving the slice the methods of Value; in particular, Set would
-// decompose the comma-separated string into the slice.
-func Var(value Value, name string, usage string) {
-	CommandLine.VarP(value, name, "", usage)
-}
-
-// VarP is like Var, but accepts a shorthand letter that can be used after a single dash.
-func VarP(value Value, name, shorthand, usage string) {
-	CommandLine.VarP(value, name, shorthand, usage)
-}
-
-// failf prints to standard error a formatted error and usage message and
-// returns the error.
-func (f *FlagSet) failf(format string, a ...interface{}) error {
-	err := fmt.Errorf(format, a...)
-	fmt.Fprintln(f.out(), err)
-	f.usage()
-	return err
-}
-
-// usage calls the Usage method for the flag set, or the usage function if
-// the flag set is CommandLine.
-func (f *FlagSet) usage() {
-	if f == CommandLine {
-		Usage()
-	} else if f.Usage == nil {
-		defaultUsage(f)
-	} else {
-		f.Usage()
-	}
-}
-
-func (f *FlagSet) setFlag(flag *Flag, value string, origArg string) error {
-	if err := flag.Value.Set(value); err != nil {
-		return f.failf("invalid argument %q for %s: %v", value, origArg, err)
-	}
-	// mark as visited for Visit()
-	if f.actual == nil {
-		f.actual = make(map[NormalizedName]*Flag)
-	}
-	f.actual[f.normalizeFlagName(flag.Name)] = flag
-	flag.Changed = true
-	if len(flag.Deprecated) > 0 {
-		fmt.Fprintf(os.Stderr, "Flag --%s has been deprecated, %s\n", flag.Name, flag.Deprecated)
-	}
-	if len(flag.ShorthandDeprecated) > 0 && containsShorthand(origArg, flag.Shorthand) {
-		fmt.Fprintf(os.Stderr, "Flag shorthand -%s has been deprecated, %s\n", flag.Shorthand, flag.ShorthandDeprecated)
-	}
-	return nil
-}
-
-func containsShorthand(arg, shorthand string) bool {
-	// filter out flags --<flag_name>
-	if strings.HasPrefix(arg, "-") {
-		return false
-	}
-	arg = strings.SplitN(arg, "=", 2)[0]
-	return strings.Contains(arg, shorthand)
-}
-
-func (f *FlagSet) parseLongArg(s string, args []string) (a []string, err error) {
-	a = args
-	name := s[2:]
-	if len(name) == 0 || name[0] == '-' || name[0] == '=' {
-		err = f.failf("bad flag syntax: %s", s)
-		return
-	}
-	split := strings.SplitN(name, "=", 2)
-	name = split[0]
-	flag, alreadythere := f.formal[f.normalizeFlagName(name)]
-	if !alreadythere {
-		if name == "help" { // special case for nice help message.
-			f.usage()
-			return a, ErrHelp
-		}
-		err = f.failf("unknown flag: --%s", name)
-		return
-	}
-	var value string
-	if len(split) == 2 {
-		// '--flag=arg'
-		value = split[1]
-	} else if len(flag.NoOptDefVal) > 0 {
-		// '--flag' (arg was optional)
-		value = flag.NoOptDefVal
-	} else if len(a) > 0 {
-		// '--flag arg'
-		value = a[0]
-		a = a[1:]
-	} else {
-		// '--flag' (arg was required)
-		err = f.failf("flag needs an argument: %s", s)
-		return
-	}
-	err = f.setFlag(flag, value, s)
-	return
-}
-
-func (f *FlagSet) parseSingleShortArg(shorthands string, args []string) (outShorts string, outArgs []string, err error) {
-	if strings.HasPrefix(shorthands, "test.") {
-		return
-	}
-	outArgs = args
-	outShorts = shorthands[1:]
-	c := shorthands[0]
-
-	flag, alreadythere := f.shorthands[c]
-	if !alreadythere {
-		if c == 'h' { // special case for nice help message.
-			f.usage()
-			err = ErrHelp
-			return
-		}
-		//TODO continue on error
-		err = f.failf("unknown shorthand flag: %q in -%s", c, shorthands)
-		return
-	}
-	var value string
-	if len(shorthands) > 2 && shorthands[1] == '=' {
-		value = shorthands[2:]
-		outShorts = ""
-	} else if len(flag.NoOptDefVal) > 0 {
-		value = flag.NoOptDefVal
-	} else if len(shorthands) > 1 {
-		value = shorthands[1:]
-		outShorts = ""
-	} else if len(args) > 0 {
-		value = args[0]
-		outArgs = args[1:]
-	} else {
-		err = f.failf("flag needs an argument: %q in -%s", c, shorthands)
-		return
-	}
-	err = f.setFlag(flag, value, shorthands)
-	return
-}
-
-func (f *FlagSet) parseShortArg(s string, args []string) (a []string, err error) {
-	a = args
-	shorthands := s[1:]
-
-	for len(shorthands) > 0 {
-		shorthands, a, err = f.parseSingleShortArg(shorthands, args)
-		if err != nil {
-			return
-		}
-	}
-
-	return
-}
-
-func (f *FlagSet) parseArgs(args []string) (err error) {
-	for len(args) > 0 {
-		s := args[0]
-		args = args[1:]
-		if len(s) == 0 || s[0] != '-' || len(s) == 1 {
-			if !f.interspersed {
-				f.args = append(f.args, s)
-				f.args = append(f.args, args...)
-				return nil
-			}
-			f.args = append(f.args, s)
-			continue
-		}
-
-		if s[1] == '-' {
-			if len(s) == 2 { // "--" terminates the flags
-				f.argsLenAtDash = len(f.args)
-				f.args = append(f.args, args...)
-				break
-			}
-			args, err = f.parseLongArg(s, args)
-		} else {
-			args, err = f.parseShortArg(s, args)
-		}
-		if err != nil {
-			return
-		}
-	}
-	return
-}
-
-// Parse parses flag definitions from the argument list, which should not
-// include the command name.  Must be called after all flags in the FlagSet
-// are defined and before flags are accessed by the program.
-// The return value will be ErrHelp if -help was set but not defined.
-func (f *FlagSet) Parse(arguments []string) error {
-	f.parsed = true
-	f.args = make([]string, 0, len(arguments))
-	err := f.parseArgs(arguments)
-	if err != nil {
-		switch f.errorHandling {
-		case ContinueOnError:
-			return err
-		case ExitOnError:
-			os.Exit(2)
-		case PanicOnError:
-			panic(err)
-		}
-	}
-	return nil
-}
-
-// Parsed reports whether f.Parse has been called.
-func (f *FlagSet) Parsed() bool {
-	return f.parsed
-}
-
-// Parse parses the command-line flags from os.Args[1:].  Must be called
-// after all flags are defined and before flags are accessed by the program.
-func Parse() {
-	// Ignore errors; CommandLine is set for ExitOnError.
-	CommandLine.Parse(os.Args[1:])
-}
-
-// SetInterspersed sets whether to support interspersed option/non-option arguments.
-func SetInterspersed(interspersed bool) {
-	CommandLine.SetInterspersed(interspersed)
-}
-
-// Parsed returns true if the command-line flags have been parsed.
-func Parsed() bool {
-	return CommandLine.Parsed()
-}
-
-// CommandLine is the default set of command-line flags, parsed from os.Args.
-var CommandLine = NewFlagSet(os.Args[0], ExitOnError)
-
-// NewFlagSet returns a new, empty flag set with the specified name and
-// error handling property.
-func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet {
-	f := &FlagSet{
-		name:          name,
-		errorHandling: errorHandling,
-		argsLenAtDash: -1,
-		interspersed:  true,
-	}
-	return f
-}
-
-// SetInterspersed sets whether to support interspersed option/non-option arguments.
-func (f *FlagSet) SetInterspersed(interspersed bool) {
-	f.interspersed = interspersed
-}
-
-// Init sets the name and error handling property for a flag set.
-// By default, the zero FlagSet uses an empty name and the
-// ContinueOnError error handling policy.
-func (f *FlagSet) Init(name string, errorHandling ErrorHandling) {
-	f.name = name
-	f.errorHandling = errorHandling
-	f.argsLenAtDash = -1
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/float32.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/float32.go b/newt/vendor/github.com/spf13/pflag/float32.go
deleted file mode 100644
index a243f81..0000000
--- a/newt/vendor/github.com/spf13/pflag/float32.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- float32 Value
-type float32Value float32
-
-func newFloat32Value(val float32, p *float32) *float32Value {
-	*p = val
-	return (*float32Value)(p)
-}
-
-func (f *float32Value) Set(s string) error {
-	v, err := strconv.ParseFloat(s, 32)
-	*f = float32Value(v)
-	return err
-}
-
-func (f *float32Value) Type() string {
-	return "float32"
-}
-
-func (f *float32Value) String() string { return strconv.FormatFloat(float64(*f), 'g', -1, 32) }
-
-func float32Conv(sval string) (interface{}, error) {
-	v, err := strconv.ParseFloat(sval, 32)
-	if err != nil {
-		return 0, err
-	}
-	return float32(v), nil
-}
-
-// GetFloat32 return the float32 value of a flag with the given name
-func (f *FlagSet) GetFloat32(name string) (float32, error) {
-	val, err := f.getFlagType(name, "float32", float32Conv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(float32), nil
-}
-
-// Float32Var defines a float32 flag with specified name, default value, and usage string.
-// The argument p points to a float32 variable in which to store the value of the flag.
-func (f *FlagSet) Float32Var(p *float32, name string, value float32, usage string) {
-	f.VarP(newFloat32Value(value, p), name, "", usage)
-}
-
-// Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Float32VarP(p *float32, name, shorthand string, value float32, usage string) {
-	f.VarP(newFloat32Value(value, p), name, shorthand, usage)
-}
-
-// Float32Var defines a float32 flag with specified name, default value, and usage string.
-// The argument p points to a float32 variable in which to store the value of the flag.
-func Float32Var(p *float32, name string, value float32, usage string) {
-	CommandLine.VarP(newFloat32Value(value, p), name, "", usage)
-}
-
-// Float32VarP is like Float32Var, but accepts a shorthand letter that can be used after a single dash.
-func Float32VarP(p *float32, name, shorthand string, value float32, usage string) {
-	CommandLine.VarP(newFloat32Value(value, p), name, shorthand, usage)
-}
-
-// Float32 defines a float32 flag with specified name, default value, and usage string.
-// The return value is the address of a float32 variable that stores the value of the flag.
-func (f *FlagSet) Float32(name string, value float32, usage string) *float32 {
-	p := new(float32)
-	f.Float32VarP(p, name, "", value, usage)
-	return p
-}
-
-// Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Float32P(name, shorthand string, value float32, usage string) *float32 {
-	p := new(float32)
-	f.Float32VarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Float32 defines a float32 flag with specified name, default value, and usage string.
-// The return value is the address of a float32 variable that stores the value of the flag.
-func Float32(name string, value float32, usage string) *float32 {
-	return CommandLine.Float32P(name, "", value, usage)
-}
-
-// Float32P is like Float32, but accepts a shorthand letter that can be used after a single dash.
-func Float32P(name, shorthand string, value float32, usage string) *float32 {
-	return CommandLine.Float32P(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/float64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/float64.go b/newt/vendor/github.com/spf13/pflag/float64.go
deleted file mode 100644
index 04b5492..0000000
--- a/newt/vendor/github.com/spf13/pflag/float64.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- float64 Value
-type float64Value float64
-
-func newFloat64Value(val float64, p *float64) *float64Value {
-	*p = val
-	return (*float64Value)(p)
-}
-
-func (f *float64Value) Set(s string) error {
-	v, err := strconv.ParseFloat(s, 64)
-	*f = float64Value(v)
-	return err
-}
-
-func (f *float64Value) Type() string {
-	return "float64"
-}
-
-func (f *float64Value) String() string { return strconv.FormatFloat(float64(*f), 'g', -1, 64) }
-
-func float64Conv(sval string) (interface{}, error) {
-	return strconv.ParseFloat(sval, 64)
-}
-
-// GetFloat64 return the float64 value of a flag with the given name
-func (f *FlagSet) GetFloat64(name string) (float64, error) {
-	val, err := f.getFlagType(name, "float64", float64Conv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(float64), nil
-}
-
-// Float64Var defines a float64 flag with specified name, default value, and usage string.
-// The argument p points to a float64 variable in which to store the value of the flag.
-func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string) {
-	f.VarP(newFloat64Value(value, p), name, "", usage)
-}
-
-// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string) {
-	f.VarP(newFloat64Value(value, p), name, shorthand, usage)
-}
-
-// Float64Var defines a float64 flag with specified name, default value, and usage string.
-// The argument p points to a float64 variable in which to store the value of the flag.
-func Float64Var(p *float64, name string, value float64, usage string) {
-	CommandLine.VarP(newFloat64Value(value, p), name, "", usage)
-}
-
-// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash.
-func Float64VarP(p *float64, name, shorthand string, value float64, usage string) {
-	CommandLine.VarP(newFloat64Value(value, p), name, shorthand, usage)
-}
-
-// Float64 defines a float64 flag with specified name, default value, and usage string.
-// The return value is the address of a float64 variable that stores the value of the flag.
-func (f *FlagSet) Float64(name string, value float64, usage string) *float64 {
-	p := new(float64)
-	f.Float64VarP(p, name, "", value, usage)
-	return p
-}
-
-// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64 {
-	p := new(float64)
-	f.Float64VarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Float64 defines a float64 flag with specified name, default value, and usage string.
-// The return value is the address of a float64 variable that stores the value of the flag.
-func Float64(name string, value float64, usage string) *float64 {
-	return CommandLine.Float64P(name, "", value, usage)
-}
-
-// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash.
-func Float64P(name, shorthand string, value float64, usage string) *float64 {
-	return CommandLine.Float64P(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/golangflag.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/golangflag.go b/newt/vendor/github.com/spf13/pflag/golangflag.go
deleted file mode 100644
index b056147..0000000
--- a/newt/vendor/github.com/spf13/pflag/golangflag.go
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package pflag
-
-import (
-	goflag "flag"
-	"fmt"
-	"reflect"
-	"strings"
-)
-
-var _ = fmt.Print
-
-// flagValueWrapper implements pflag.Value around a flag.Value.  The main
-// difference here is the addition of the Type method that returns a string
-// name of the type.  As this is generally unknown, we approximate that with
-// reflection.
-type flagValueWrapper struct {
-	inner    goflag.Value
-	flagType string
-}
-
-// We are just copying the boolFlag interface out of goflag as that is what
-// they use to decide if a flag should get "true" when no arg is given.
-type goBoolFlag interface {
-	goflag.Value
-	IsBoolFlag() bool
-}
-
-func wrapFlagValue(v goflag.Value) Value {
-	// If the flag.Value happens to also be a pflag.Value, just use it directly.
-	if pv, ok := v.(Value); ok {
-		return pv
-	}
-
-	pv := &flagValueWrapper{
-		inner: v,
-	}
-
-	t := reflect.TypeOf(v)
-	if t.Kind() == reflect.Interface || t.Kind() == reflect.Ptr {
-		t = t.Elem()
-	}
-
-	pv.flagType = strings.TrimSuffix(t.Name(), "Value")
-	return pv
-}
-
-func (v *flagValueWrapper) String() string {
-	return v.inner.String()
-}
-
-func (v *flagValueWrapper) Set(s string) error {
-	return v.inner.Set(s)
-}
-
-func (v *flagValueWrapper) Type() string {
-	return v.flagType
-}
-
-// PFlagFromGoFlag will return a *pflag.Flag given a *flag.Flag
-// If the *flag.Flag.Name was a single character (ex: `v`) it will be accessiblei
-// with both `-v` and `--v` in flags. If the golang flag was more than a single
-// character (ex: `verbose`) it will only be accessible via `--verbose`
-func PFlagFromGoFlag(goflag *goflag.Flag) *Flag {
-	// Remember the default value as a string; it won't change.
-	flag := &Flag{
-		Name:  goflag.Name,
-		Usage: goflag.Usage,
-		Value: wrapFlagValue(goflag.Value),
-		// Looks like golang flags don't set DefValue correctly  :-(
-		//DefValue: goflag.DefValue,
-		DefValue: goflag.Value.String(),
-	}
-	// Ex: if the golang flag was -v, allow both -v and --v to work
-	if len(flag.Name) == 1 {
-		flag.Shorthand = flag.Name
-	}
-	if fv, ok := goflag.Value.(goBoolFlag); ok && fv.IsBoolFlag() {
-		flag.NoOptDefVal = "true"
-	}
-	return flag
-}
-
-// AddGoFlag will add the given *flag.Flag to the pflag.FlagSet
-func (f *FlagSet) AddGoFlag(goflag *goflag.Flag) {
-	if f.Lookup(goflag.Name) != nil {
-		return
-	}
-	newflag := PFlagFromGoFlag(goflag)
-	f.AddFlag(newflag)
-}
-
-// AddGoFlagSet will add the given *flag.FlagSet to the pflag.FlagSet
-func (f *FlagSet) AddGoFlagSet(newSet *goflag.FlagSet) {
-	if newSet == nil {
-		return
-	}
-	newSet.VisitAll(func(goflag *goflag.Flag) {
-		f.AddGoFlag(goflag)
-	})
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/int.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/int.go b/newt/vendor/github.com/spf13/pflag/int.go
deleted file mode 100644
index 1474b89..0000000
--- a/newt/vendor/github.com/spf13/pflag/int.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- int Value
-type intValue int
-
-func newIntValue(val int, p *int) *intValue {
-	*p = val
-	return (*intValue)(p)
-}
-
-func (i *intValue) Set(s string) error {
-	v, err := strconv.ParseInt(s, 0, 64)
-	*i = intValue(v)
-	return err
-}
-
-func (i *intValue) Type() string {
-	return "int"
-}
-
-func (i *intValue) String() string { return strconv.Itoa(int(*i)) }
-
-func intConv(sval string) (interface{}, error) {
-	return strconv.Atoi(sval)
-}
-
-// GetInt return the int value of a flag with the given name
-func (f *FlagSet) GetInt(name string) (int, error) {
-	val, err := f.getFlagType(name, "int", intConv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(int), nil
-}
-
-// IntVar defines an int flag with specified name, default value, and usage string.
-// The argument p points to an int variable in which to store the value of the flag.
-func (f *FlagSet) IntVar(p *int, name string, value int, usage string) {
-	f.VarP(newIntValue(value, p), name, "", usage)
-}
-
-// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string) {
-	f.VarP(newIntValue(value, p), name, shorthand, usage)
-}
-
-// IntVar defines an int flag with specified name, default value, and usage string.
-// The argument p points to an int variable in which to store the value of the flag.
-func IntVar(p *int, name string, value int, usage string) {
-	CommandLine.VarP(newIntValue(value, p), name, "", usage)
-}
-
-// IntVarP is like IntVar, but accepts a shorthand letter that can be used after a single dash.
-func IntVarP(p *int, name, shorthand string, value int, usage string) {
-	CommandLine.VarP(newIntValue(value, p), name, shorthand, usage)
-}
-
-// Int defines an int flag with specified name, default value, and usage string.
-// The return value is the address of an int variable that stores the value of the flag.
-func (f *FlagSet) Int(name string, value int, usage string) *int {
-	p := new(int)
-	f.IntVarP(p, name, "", value, usage)
-	return p
-}
-
-// IntP is like Int, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) IntP(name, shorthand string, value int, usage string) *int {
-	p := new(int)
-	f.IntVarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Int defines an int flag with specified name, default value, and usage string.
-// The return value is the address of an int variable that stores the value of the flag.
-func Int(name string, value int, usage string) *int {
-	return CommandLine.IntP(name, "", value, usage)
-}
-
-// IntP is like Int, but accepts a shorthand letter that can be used after a single dash.
-func IntP(name, shorthand string, value int, usage string) *int {
-	return CommandLine.IntP(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/int32.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/int32.go b/newt/vendor/github.com/spf13/pflag/int32.go
deleted file mode 100644
index 9b95944..0000000
--- a/newt/vendor/github.com/spf13/pflag/int32.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- int32 Value
-type int32Value int32
-
-func newInt32Value(val int32, p *int32) *int32Value {
-	*p = val
-	return (*int32Value)(p)
-}
-
-func (i *int32Value) Set(s string) error {
-	v, err := strconv.ParseInt(s, 0, 32)
-	*i = int32Value(v)
-	return err
-}
-
-func (i *int32Value) Type() string {
-	return "int32"
-}
-
-func (i *int32Value) String() string { return strconv.FormatInt(int64(*i), 10) }
-
-func int32Conv(sval string) (interface{}, error) {
-	v, err := strconv.ParseInt(sval, 0, 32)
-	if err != nil {
-		return 0, err
-	}
-	return int32(v), nil
-}
-
-// GetInt32 return the int32 value of a flag with the given name
-func (f *FlagSet) GetInt32(name string) (int32, error) {
-	val, err := f.getFlagType(name, "int32", int32Conv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(int32), nil
-}
-
-// Int32Var defines an int32 flag with specified name, default value, and usage string.
-// The argument p points to an int32 variable in which to store the value of the flag.
-func (f *FlagSet) Int32Var(p *int32, name string, value int32, usage string) {
-	f.VarP(newInt32Value(value, p), name, "", usage)
-}
-
-// Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Int32VarP(p *int32, name, shorthand string, value int32, usage string) {
-	f.VarP(newInt32Value(value, p), name, shorthand, usage)
-}
-
-// Int32Var defines an int32 flag with specified name, default value, and usage string.
-// The argument p points to an int32 variable in which to store the value of the flag.
-func Int32Var(p *int32, name string, value int32, usage string) {
-	CommandLine.VarP(newInt32Value(value, p), name, "", usage)
-}
-
-// Int32VarP is like Int32Var, but accepts a shorthand letter that can be used after a single dash.
-func Int32VarP(p *int32, name, shorthand string, value int32, usage string) {
-	CommandLine.VarP(newInt32Value(value, p), name, shorthand, usage)
-}
-
-// Int32 defines an int32 flag with specified name, default value, and usage string.
-// The return value is the address of an int32 variable that stores the value of the flag.
-func (f *FlagSet) Int32(name string, value int32, usage string) *int32 {
-	p := new(int32)
-	f.Int32VarP(p, name, "", value, usage)
-	return p
-}
-
-// Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Int32P(name, shorthand string, value int32, usage string) *int32 {
-	p := new(int32)
-	f.Int32VarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Int32 defines an int32 flag with specified name, default value, and usage string.
-// The return value is the address of an int32 variable that stores the value of the flag.
-func Int32(name string, value int32, usage string) *int32 {
-	return CommandLine.Int32P(name, "", value, usage)
-}
-
-// Int32P is like Int32, but accepts a shorthand letter that can be used after a single dash.
-func Int32P(name, shorthand string, value int32, usage string) *int32 {
-	return CommandLine.Int32P(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/int64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/int64.go b/newt/vendor/github.com/spf13/pflag/int64.go
deleted file mode 100644
index 0026d78..0000000
--- a/newt/vendor/github.com/spf13/pflag/int64.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- int64 Value
-type int64Value int64
-
-func newInt64Value(val int64, p *int64) *int64Value {
-	*p = val
-	return (*int64Value)(p)
-}
-
-func (i *int64Value) Set(s string) error {
-	v, err := strconv.ParseInt(s, 0, 64)
-	*i = int64Value(v)
-	return err
-}
-
-func (i *int64Value) Type() string {
-	return "int64"
-}
-
-func (i *int64Value) String() string { return strconv.FormatInt(int64(*i), 10) }
-
-func int64Conv(sval string) (interface{}, error) {
-	return strconv.ParseInt(sval, 0, 64)
-}
-
-// GetInt64 return the int64 value of a flag with the given name
-func (f *FlagSet) GetInt64(name string) (int64, error) {
-	val, err := f.getFlagType(name, "int64", int64Conv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(int64), nil
-}
-
-// Int64Var defines an int64 flag with specified name, default value, and usage string.
-// The argument p points to an int64 variable in which to store the value of the flag.
-func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) {
-	f.VarP(newInt64Value(value, p), name, "", usage)
-}
-
-// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Int64VarP(p *int64, name, shorthand string, value int64, usage string) {
-	f.VarP(newInt64Value(value, p), name, shorthand, usage)
-}
-
-// Int64Var defines an int64 flag with specified name, default value, and usage string.
-// The argument p points to an int64 variable in which to store the value of the flag.
-func Int64Var(p *int64, name string, value int64, usage string) {
-	CommandLine.VarP(newInt64Value(value, p), name, "", usage)
-}
-
-// Int64VarP is like Int64Var, but accepts a shorthand letter that can be used after a single dash.
-func Int64VarP(p *int64, name, shorthand string, value int64, usage string) {
-	CommandLine.VarP(newInt64Value(value, p), name, shorthand, usage)
-}
-
-// Int64 defines an int64 flag with specified name, default value, and usage string.
-// The return value is the address of an int64 variable that stores the value of the flag.
-func (f *FlagSet) Int64(name string, value int64, usage string) *int64 {
-	p := new(int64)
-	f.Int64VarP(p, name, "", value, usage)
-	return p
-}
-
-// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Int64P(name, shorthand string, value int64, usage string) *int64 {
-	p := new(int64)
-	f.Int64VarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Int64 defines an int64 flag with specified name, default value, and usage string.
-// The return value is the address of an int64 variable that stores the value of the flag.
-func Int64(name string, value int64, usage string) *int64 {
-	return CommandLine.Int64P(name, "", value, usage)
-}
-
-// Int64P is like Int64, but accepts a shorthand letter that can be used after a single dash.
-func Int64P(name, shorthand string, value int64, usage string) *int64 {
-	return CommandLine.Int64P(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/int8.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/int8.go b/newt/vendor/github.com/spf13/pflag/int8.go
deleted file mode 100644
index 4da9222..0000000
--- a/newt/vendor/github.com/spf13/pflag/int8.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- int8 Value
-type int8Value int8
-
-func newInt8Value(val int8, p *int8) *int8Value {
-	*p = val
-	return (*int8Value)(p)
-}
-
-func (i *int8Value) Set(s string) error {
-	v, err := strconv.ParseInt(s, 0, 8)
-	*i = int8Value(v)
-	return err
-}
-
-func (i *int8Value) Type() string {
-	return "int8"
-}
-
-func (i *int8Value) String() string { return strconv.FormatInt(int64(*i), 10) }
-
-func int8Conv(sval string) (interface{}, error) {
-	v, err := strconv.ParseInt(sval, 0, 8)
-	if err != nil {
-		return 0, err
-	}
-	return int8(v), nil
-}
-
-// GetInt8 return the int8 value of a flag with the given name
-func (f *FlagSet) GetInt8(name string) (int8, error) {
-	val, err := f.getFlagType(name, "int8", int8Conv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(int8), nil
-}
-
-// Int8Var defines an int8 flag with specified name, default value, and usage string.
-// The argument p points to an int8 variable in which to store the value of the flag.
-func (f *FlagSet) Int8Var(p *int8, name string, value int8, usage string) {
-	f.VarP(newInt8Value(value, p), name, "", usage)
-}
-
-// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Int8VarP(p *int8, name, shorthand string, value int8, usage string) {
-	f.VarP(newInt8Value(value, p), name, shorthand, usage)
-}
-
-// Int8Var defines an int8 flag with specified name, default value, and usage string.
-// The argument p points to an int8 variable in which to store the value of the flag.
-func Int8Var(p *int8, name string, value int8, usage string) {
-	CommandLine.VarP(newInt8Value(value, p), name, "", usage)
-}
-
-// Int8VarP is like Int8Var, but accepts a shorthand letter that can be used after a single dash.
-func Int8VarP(p *int8, name, shorthand string, value int8, usage string) {
-	CommandLine.VarP(newInt8Value(value, p), name, shorthand, usage)
-}
-
-// Int8 defines an int8 flag with specified name, default value, and usage string.
-// The return value is the address of an int8 variable that stores the value of the flag.
-func (f *FlagSet) Int8(name string, value int8, usage string) *int8 {
-	p := new(int8)
-	f.Int8VarP(p, name, "", value, usage)
-	return p
-}
-
-// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Int8P(name, shorthand string, value int8, usage string) *int8 {
-	p := new(int8)
-	f.Int8VarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Int8 defines an int8 flag with specified name, default value, and usage string.
-// The return value is the address of an int8 variable that stores the value of the flag.
-func Int8(name string, value int8, usage string) *int8 {
-	return CommandLine.Int8P(name, "", value, usage)
-}
-
-// Int8P is like Int8, but accepts a shorthand letter that can be used after a single dash.
-func Int8P(name, shorthand string, value int8, usage string) *int8 {
-	return CommandLine.Int8P(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/int_slice.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/int_slice.go b/newt/vendor/github.com/spf13/pflag/int_slice.go
deleted file mode 100644
index 1e7c9ed..0000000
--- a/newt/vendor/github.com/spf13/pflag/int_slice.go
+++ /dev/null
@@ -1,128 +0,0 @@
-package pflag
-
-import (
-	"fmt"
-	"strconv"
-	"strings"
-)
-
-// -- intSlice Value
-type intSliceValue struct {
-	value   *[]int
-	changed bool
-}
-
-func newIntSliceValue(val []int, p *[]int) *intSliceValue {
-	isv := new(intSliceValue)
-	isv.value = p
-	*isv.value = val
-	return isv
-}
-
-func (s *intSliceValue) Set(val string) error {
-	ss := strings.Split(val, ",")
-	out := make([]int, len(ss))
-	for i, d := range ss {
-		var err error
-		out[i], err = strconv.Atoi(d)
-		if err != nil {
-			return err
-		}
-
-	}
-	if !s.changed {
-		*s.value = out
-	} else {
-		*s.value = append(*s.value, out...)
-	}
-	s.changed = true
-	return nil
-}
-
-func (s *intSliceValue) Type() string {
-	return "intSlice"
-}
-
-func (s *intSliceValue) String() string {
-	out := make([]string, len(*s.value))
-	for i, d := range *s.value {
-		out[i] = fmt.Sprintf("%d", d)
-	}
-	return "[" + strings.Join(out, ",") + "]"
-}
-
-func intSliceConv(val string) (interface{}, error) {
-	val = strings.Trim(val, "[]")
-	// Empty string would cause a slice with one (empty) entry
-	if len(val) == 0 {
-		return []int{}, nil
-	}
-	ss := strings.Split(val, ",")
-	out := make([]int, len(ss))
-	for i, d := range ss {
-		var err error
-		out[i], err = strconv.Atoi(d)
-		if err != nil {
-			return nil, err
-		}
-
-	}
-	return out, nil
-}
-
-// GetIntSlice return the []int value of a flag with the given name
-func (f *FlagSet) GetIntSlice(name string) ([]int, error) {
-	val, err := f.getFlagType(name, "intSlice", intSliceConv)
-	if err != nil {
-		return []int{}, err
-	}
-	return val.([]int), nil
-}
-
-// IntSliceVar defines a intSlice flag with specified name, default value, and usage string.
-// The argument p points to a []int variable in which to store the value of the flag.
-func (f *FlagSet) IntSliceVar(p *[]int, name string, value []int, usage string) {
-	f.VarP(newIntSliceValue(value, p), name, "", usage)
-}
-
-// IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string) {
-	f.VarP(newIntSliceValue(value, p), name, shorthand, usage)
-}
-
-// IntSliceVar defines a int[] flag with specified name, default value, and usage string.
-// The argument p points to a int[] variable in which to store the value of the flag.
-func IntSliceVar(p *[]int, name string, value []int, usage string) {
-	CommandLine.VarP(newIntSliceValue(value, p), name, "", usage)
-}
-
-// IntSliceVarP is like IntSliceVar, but accepts a shorthand letter that can be used after a single dash.
-func IntSliceVarP(p *[]int, name, shorthand string, value []int, usage string) {
-	CommandLine.VarP(newIntSliceValue(value, p), name, shorthand, usage)
-}
-
-// IntSlice defines a []int flag with specified name, default value, and usage string.
-// The return value is the address of a []int variable that stores the value of the flag.
-func (f *FlagSet) IntSlice(name string, value []int, usage string) *[]int {
-	p := []int{}
-	f.IntSliceVarP(&p, name, "", value, usage)
-	return &p
-}
-
-// IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) IntSliceP(name, shorthand string, value []int, usage string) *[]int {
-	p := []int{}
-	f.IntSliceVarP(&p, name, shorthand, value, usage)
-	return &p
-}
-
-// IntSlice defines a []int flag with specified name, default value, and usage string.
-// The return value is the address of a []int variable that stores the value of the flag.
-func IntSlice(name string, value []int, usage string) *[]int {
-	return CommandLine.IntSliceP(name, "", value, usage)
-}
-
-// IntSliceP is like IntSlice, but accepts a shorthand letter that can be used after a single dash.
-func IntSliceP(name, shorthand string, value []int, usage string) *[]int {
-	return CommandLine.IntSliceP(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/ip.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/ip.go b/newt/vendor/github.com/spf13/pflag/ip.go
deleted file mode 100644
index 88a1743..0000000
--- a/newt/vendor/github.com/spf13/pflag/ip.go
+++ /dev/null
@@ -1,96 +0,0 @@
-package pflag
-
-import (
-	"fmt"
-	"net"
-	"strings"
-)
-
-var _ = strings.TrimSpace
-
-// -- net.IP value
-type ipValue net.IP
-
-func newIPValue(val net.IP, p *net.IP) *ipValue {
-	*p = val
-	return (*ipValue)(p)
-}
-
-func (i *ipValue) String() string { return net.IP(*i).String() }
-func (i *ipValue) Set(s string) error {
-	ip := net.ParseIP(strings.TrimSpace(s))
-	if ip == nil {
-		return fmt.Errorf("failed to parse IP: %q", s)
-	}
-	*i = ipValue(ip)
-	return nil
-}
-
-func (i *ipValue) Type() string {
-	return "ip"
-}
-
-func ipConv(sval string) (interface{}, error) {
-	ip := net.ParseIP(sval)
-	if ip != nil {
-		return ip, nil
-	}
-	return nil, fmt.Errorf("invalid string being converted to IP address: %s", sval)
-}
-
-// GetIP return the net.IP value of a flag with the given name
-func (f *FlagSet) GetIP(name string) (net.IP, error) {
-	val, err := f.getFlagType(name, "ip", ipConv)
-	if err != nil {
-		return nil, err
-	}
-	return val.(net.IP), nil
-}
-
-// IPVar defines an net.IP flag with specified name, default value, and usage string.
-// The argument p points to an net.IP variable in which to store the value of the flag.
-func (f *FlagSet) IPVar(p *net.IP, name string, value net.IP, usage string) {
-	f.VarP(newIPValue(value, p), name, "", usage)
-}
-
-// IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) {
-	f.VarP(newIPValue(value, p), name, shorthand, usage)
-}
-
-// IPVar defines an net.IP flag with specified name, default value, and usage string.
-// The argument p points to an net.IP variable in which to store the value of the flag.
-func IPVar(p *net.IP, name string, value net.IP, usage string) {
-	CommandLine.VarP(newIPValue(value, p), name, "", usage)
-}
-
-// IPVarP is like IPVar, but accepts a shorthand letter that can be used after a single dash.
-func IPVarP(p *net.IP, name, shorthand string, value net.IP, usage string) {
-	CommandLine.VarP(newIPValue(value, p), name, shorthand, usage)
-}
-
-// IP defines an net.IP flag with specified name, default value, and usage string.
-// The return value is the address of an net.IP variable that stores the value of the flag.
-func (f *FlagSet) IP(name string, value net.IP, usage string) *net.IP {
-	p := new(net.IP)
-	f.IPVarP(p, name, "", value, usage)
-	return p
-}
-
-// IPP is like IP, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) IPP(name, shorthand string, value net.IP, usage string) *net.IP {
-	p := new(net.IP)
-	f.IPVarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// IP defines an net.IP flag with specified name, default value, and usage string.
-// The return value is the address of an net.IP variable that stores the value of the flag.
-func IP(name string, value net.IP, usage string) *net.IP {
-	return CommandLine.IPP(name, "", value, usage)
-}
-
-// IPP is like IP, but accepts a shorthand letter that can be used after a single dash.
-func IPP(name, shorthand string, value net.IP, usage string) *net.IP {
-	return CommandLine.IPP(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/ipmask.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/ipmask.go b/newt/vendor/github.com/spf13/pflag/ipmask.go
deleted file mode 100644
index 5bd44bd..0000000
--- a/newt/vendor/github.com/spf13/pflag/ipmask.go
+++ /dev/null
@@ -1,122 +0,0 @@
-package pflag
-
-import (
-	"fmt"
-	"net"
-	"strconv"
-)
-
-// -- net.IPMask value
-type ipMaskValue net.IPMask
-
-func newIPMaskValue(val net.IPMask, p *net.IPMask) *ipMaskValue {
-	*p = val
-	return (*ipMaskValue)(p)
-}
-
-func (i *ipMaskValue) String() string { return net.IPMask(*i).String() }
-func (i *ipMaskValue) Set(s string) error {
-	ip := ParseIPv4Mask(s)
-	if ip == nil {
-		return fmt.Errorf("failed to parse IP mask: %q", s)
-	}
-	*i = ipMaskValue(ip)
-	return nil
-}
-
-func (i *ipMaskValue) Type() string {
-	return "ipMask"
-}
-
-// ParseIPv4Mask written in IP form (e.g. 255.255.255.0).
-// This function should really belong to the net package.
-func ParseIPv4Mask(s string) net.IPMask {
-	mask := net.ParseIP(s)
-	if mask == nil {
-		if len(s) != 8 {
-			return nil
-		}
-		// net.IPMask.String() actually outputs things like ffffff00
-		// so write a horrible parser for that as well  :-(
-		m := []int{}
-		for i := 0; i < 4; i++ {
-			b := "0x" + s[2*i:2*i+2]
-			d, err := strconv.ParseInt(b, 0, 0)
-			if err != nil {
-				return nil
-			}
-			m = append(m, int(d))
-		}
-		s := fmt.Sprintf("%d.%d.%d.%d", m[0], m[1], m[2], m[3])
-		mask = net.ParseIP(s)
-		if mask == nil {
-			return nil
-		}
-	}
-	return net.IPv4Mask(mask[12], mask[13], mask[14], mask[15])
-}
-
-func parseIPv4Mask(sval string) (interface{}, error) {
-	mask := ParseIPv4Mask(sval)
-	if mask == nil {
-		return nil, fmt.Errorf("unable to parse %s as net.IPMask", sval)
-	}
-	return mask, nil
-}
-
-// GetIPv4Mask return the net.IPv4Mask value of a flag with the given name
-func (f *FlagSet) GetIPv4Mask(name string) (net.IPMask, error) {
-	val, err := f.getFlagType(name, "ipMask", parseIPv4Mask)
-	if err != nil {
-		return nil, err
-	}
-	return val.(net.IPMask), nil
-}
-
-// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string.
-// The argument p points to an net.IPMask variable in which to store the value of the flag.
-func (f *FlagSet) IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) {
-	f.VarP(newIPMaskValue(value, p), name, "", usage)
-}
-
-// IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) {
-	f.VarP(newIPMaskValue(value, p), name, shorthand, usage)
-}
-
-// IPMaskVar defines an net.IPMask flag with specified name, default value, and usage string.
-// The argument p points to an net.IPMask variable in which to store the value of the flag.
-func IPMaskVar(p *net.IPMask, name string, value net.IPMask, usage string) {
-	CommandLine.VarP(newIPMaskValue(value, p), name, "", usage)
-}
-
-// IPMaskVarP is like IPMaskVar, but accepts a shorthand letter that can be used after a single dash.
-func IPMaskVarP(p *net.IPMask, name, shorthand string, value net.IPMask, usage string) {
-	CommandLine.VarP(newIPMaskValue(value, p), name, shorthand, usage)
-}
-
-// IPMask defines an net.IPMask flag with specified name, default value, and usage string.
-// The return value is the address of an net.IPMask variable that stores the value of the flag.
-func (f *FlagSet) IPMask(name string, value net.IPMask, usage string) *net.IPMask {
-	p := new(net.IPMask)
-	f.IPMaskVarP(p, name, "", value, usage)
-	return p
-}
-
-// IPMaskP is like IPMask, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask {
-	p := new(net.IPMask)
-	f.IPMaskVarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// IPMask defines an net.IPMask flag with specified name, default value, and usage string.
-// The return value is the address of an net.IPMask variable that stores the value of the flag.
-func IPMask(name string, value net.IPMask, usage string) *net.IPMask {
-	return CommandLine.IPMaskP(name, "", value, usage)
-}
-
-// IPMaskP is like IP, but accepts a shorthand letter that can be used after a single dash.
-func IPMaskP(name, shorthand string, value net.IPMask, usage string) *net.IPMask {
-	return CommandLine.IPMaskP(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/ipnet.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/ipnet.go b/newt/vendor/github.com/spf13/pflag/ipnet.go
deleted file mode 100644
index 149b764..0000000
--- a/newt/vendor/github.com/spf13/pflag/ipnet.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package pflag
-
-import (
-	"fmt"
-	"net"
-	"strings"
-)
-
-// IPNet adapts net.IPNet for use as a flag.
-type ipNetValue net.IPNet
-
-func (ipnet ipNetValue) String() string {
-	n := net.IPNet(ipnet)
-	return n.String()
-}
-
-func (ipnet *ipNetValue) Set(value string) error {
-	_, n, err := net.ParseCIDR(strings.TrimSpace(value))
-	if err != nil {
-		return err
-	}
-	*ipnet = ipNetValue(*n)
-	return nil
-}
-
-func (*ipNetValue) Type() string {
-	return "ipNet"
-}
-
-var _ = strings.TrimSpace
-
-func newIPNetValue(val net.IPNet, p *net.IPNet) *ipNetValue {
-	*p = val
-	return (*ipNetValue)(p)
-}
-
-func ipNetConv(sval string) (interface{}, error) {
-	_, n, err := net.ParseCIDR(strings.TrimSpace(sval))
-	if err == nil {
-		return *n, nil
-	}
-	return nil, fmt.Errorf("invalid string being converted to IPNet: %s", sval)
-}
-
-// GetIPNet return the net.IPNet value of a flag with the given name
-func (f *FlagSet) GetIPNet(name string) (net.IPNet, error) {
-	val, err := f.getFlagType(name, "ipNet", ipNetConv)
-	if err != nil {
-		return net.IPNet{}, err
-	}
-	return val.(net.IPNet), nil
-}
-
-// IPNetVar defines an net.IPNet flag with specified name, default value, and usage string.
-// The argument p points to an net.IPNet variable in which to store the value of the flag.
-func (f *FlagSet) IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string) {
-	f.VarP(newIPNetValue(value, p), name, "", usage)
-}
-
-// IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string) {
-	f.VarP(newIPNetValue(value, p), name, shorthand, usage)
-}
-
-// IPNetVar defines an net.IPNet flag with specified name, default value, and usage string.
-// The argument p points to an net.IPNet variable in which to store the value of the flag.
-func IPNetVar(p *net.IPNet, name string, value net.IPNet, usage string) {
-	CommandLine.VarP(newIPNetValue(value, p), name, "", usage)
-}
-
-// IPNetVarP is like IPNetVar, but accepts a shorthand letter that can be used after a single dash.
-func IPNetVarP(p *net.IPNet, name, shorthand string, value net.IPNet, usage string) {
-	CommandLine.VarP(newIPNetValue(value, p), name, shorthand, usage)
-}
-
-// IPNet defines an net.IPNet flag with specified name, default value, and usage string.
-// The return value is the address of an net.IPNet variable that stores the value of the flag.
-func (f *FlagSet) IPNet(name string, value net.IPNet, usage string) *net.IPNet {
-	p := new(net.IPNet)
-	f.IPNetVarP(p, name, "", value, usage)
-	return p
-}
-
-// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet {
-	p := new(net.IPNet)
-	f.IPNetVarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// IPNet defines an net.IPNet flag with specified name, default value, and usage string.
-// The return value is the address of an net.IPNet variable that stores the value of the flag.
-func IPNet(name string, value net.IPNet, usage string) *net.IPNet {
-	return CommandLine.IPNetP(name, "", value, usage)
-}
-
-// IPNetP is like IPNet, but accepts a shorthand letter that can be used after a single dash.
-func IPNetP(name, shorthand string, value net.IPNet, usage string) *net.IPNet {
-	return CommandLine.IPNetP(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/string.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/string.go b/newt/vendor/github.com/spf13/pflag/string.go
deleted file mode 100644
index 04e0a26..0000000
--- a/newt/vendor/github.com/spf13/pflag/string.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package pflag
-
-// -- string Value
-type stringValue string
-
-func newStringValue(val string, p *string) *stringValue {
-	*p = val
-	return (*stringValue)(p)
-}
-
-func (s *stringValue) Set(val string) error {
-	*s = stringValue(val)
-	return nil
-}
-func (s *stringValue) Type() string {
-	return "string"
-}
-
-func (s *stringValue) String() string { return string(*s) }
-
-func stringConv(sval string) (interface{}, error) {
-	return sval, nil
-}
-
-// GetString return the string value of a flag with the given name
-func (f *FlagSet) GetString(name string) (string, error) {
-	val, err := f.getFlagType(name, "string", stringConv)
-	if err != nil {
-		return "", err
-	}
-	return val.(string), nil
-}
-
-// StringVar defines a string flag with specified name, default value, and usage string.
-// The argument p points to a string variable in which to store the value of the flag.
-func (f *FlagSet) StringVar(p *string, name string, value string, usage string) {
-	f.VarP(newStringValue(value, p), name, "", usage)
-}
-
-// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string) {
-	f.VarP(newStringValue(value, p), name, shorthand, usage)
-}
-
-// StringVar defines a string flag with specified name, default value, and usage string.
-// The argument p points to a string variable in which to store the value of the flag.
-func StringVar(p *string, name string, value string, usage string) {
-	CommandLine.VarP(newStringValue(value, p), name, "", usage)
-}
-
-// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash.
-func StringVarP(p *string, name, shorthand string, value string, usage string) {
-	CommandLine.VarP(newStringValue(value, p), name, shorthand, usage)
-}
-
-// String defines a string flag with specified name, default value, and usage string.
-// The return value is the address of a string variable that stores the value of the flag.
-func (f *FlagSet) String(name string, value string, usage string) *string {
-	p := new(string)
-	f.StringVarP(p, name, "", value, usage)
-	return p
-}
-
-// StringP is like String, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string {
-	p := new(string)
-	f.StringVarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// String defines a string flag with specified name, default value, and usage string.
-// The return value is the address of a string variable that stores the value of the flag.
-func String(name string, value string, usage string) *string {
-	return CommandLine.StringP(name, "", value, usage)
-}
-
-// StringP is like String, but accepts a shorthand letter that can be used after a single dash.
-func StringP(name, shorthand string, value string, usage string) *string {
-	return CommandLine.StringP(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/string_array.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/string_array.go b/newt/vendor/github.com/spf13/pflag/string_array.go
deleted file mode 100644
index 93b4e43..0000000
--- a/newt/vendor/github.com/spf13/pflag/string_array.go
+++ /dev/null
@@ -1,109 +0,0 @@
-package pflag
-
-import (
-	"fmt"
-)
-
-var _ = fmt.Fprint
-
-// -- stringArray Value
-type stringArrayValue struct {
-	value   *[]string
-	changed bool
-}
-
-func newStringArrayValue(val []string, p *[]string) *stringArrayValue {
-	ssv := new(stringArrayValue)
-	ssv.value = p
-	*ssv.value = val
-	return ssv
-}
-
-func (s *stringArrayValue) Set(val string) error {
-	if !s.changed {
-		*s.value = []string{val}
-		s.changed = true
-	} else {
-		*s.value = append(*s.value, val)
-	}
-	return nil
-}
-
-func (s *stringArrayValue) Type() string {
-	return "stringArray"
-}
-
-func (s *stringArrayValue) String() string {
-	str, _ := writeAsCSV(*s.value)
-	return "[" + str + "]"
-}
-
-func stringArrayConv(sval string) (interface{}, error) {
-	sval = sval[1 : len(sval)-1]
-	// An empty string would cause a array with one (empty) string
-	if len(sval) == 0 {
-		return []string{}, nil
-	}
-	return readAsCSV(sval)
-}
-
-// GetStringArray return the []string value of a flag with the given name
-func (f *FlagSet) GetStringArray(name string) ([]string, error) {
-	val, err := f.getFlagType(name, "stringArray", stringArrayConv)
-	if err != nil {
-		return []string{}, err
-	}
-	return val.([]string), nil
-}
-
-// StringArrayVar defines a string flag with specified name, default value, and usage string.
-// The argument p points to a []string variable in which to store the values of the multiple flags.
-// The value of each argument will not try to be separated by comma
-func (f *FlagSet) StringArrayVar(p *[]string, name string, value []string, usage string) {
-	f.VarP(newStringArrayValue(value, p), name, "", usage)
-}
-
-// StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string) {
-	f.VarP(newStringArrayValue(value, p), name, shorthand, usage)
-}
-
-// StringArrayVar defines a string flag with specified name, default value, and usage string.
-// The argument p points to a []string variable in which to store the value of the flag.
-// The value of each argument will not try to be separated by comma
-func StringArrayVar(p *[]string, name string, value []string, usage string) {
-	CommandLine.VarP(newStringArrayValue(value, p), name, "", usage)
-}
-
-// StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash.
-func StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string) {
-	CommandLine.VarP(newStringArrayValue(value, p), name, shorthand, usage)
-}
-
-// StringArray defines a string flag with specified name, default value, and usage string.
-// The return value is the address of a []string variable that stores the value of the flag.
-// The value of each argument will not try to be separated by comma
-func (f *FlagSet) StringArray(name string, value []string, usage string) *[]string {
-	p := []string{}
-	f.StringArrayVarP(&p, name, "", value, usage)
-	return &p
-}
-
-// StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) StringArrayP(name, shorthand string, value []string, usage string) *[]string {
-	p := []string{}
-	f.StringArrayVarP(&p, name, shorthand, value, usage)
-	return &p
-}
-
-// StringArray defines a string flag with specified name, default value, and usage string.
-// The return value is the address of a []string variable that stores the value of the flag.
-// The value of each argument will not try to be separated by comma
-func StringArray(name string, value []string, usage string) *[]string {
-	return CommandLine.StringArrayP(name, "", value, usage)
-}
-
-// StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash.
-func StringArrayP(name, shorthand string, value []string, usage string) *[]string {
-	return CommandLine.StringArrayP(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/string_slice.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/string_slice.go b/newt/vendor/github.com/spf13/pflag/string_slice.go
deleted file mode 100644
index 7829cfa..0000000
--- a/newt/vendor/github.com/spf13/pflag/string_slice.go
+++ /dev/null
@@ -1,132 +0,0 @@
-package pflag
-
-import (
-	"bytes"
-	"encoding/csv"
-	"fmt"
-	"strings"
-)
-
-var _ = fmt.Fprint
-
-// -- stringSlice Value
-type stringSliceValue struct {
-	value   *[]string
-	changed bool
-}
-
-func newStringSliceValue(val []string, p *[]string) *stringSliceValue {
-	ssv := new(stringSliceValue)
-	ssv.value = p
-	*ssv.value = val
-	return ssv
-}
-
-func readAsCSV(val string) ([]string, error) {
-	if val == "" {
-		return []string{}, nil
-	}
-	stringReader := strings.NewReader(val)
-	csvReader := csv.NewReader(stringReader)
-	return csvReader.Read()
-}
-
-func writeAsCSV(vals []string) (string, error) {
-	b := &bytes.Buffer{}
-	w := csv.NewWriter(b)
-	err := w.Write(vals)
-	if err != nil {
-		return "", err
-	}
-	w.Flush()
-	return strings.TrimSuffix(b.String(), fmt.Sprintln()), nil
-}
-
-func (s *stringSliceValue) Set(val string) error {
-	v, err := readAsCSV(val)
-	if err != nil {
-		return err
-	}
-	if !s.changed {
-		*s.value = v
-	} else {
-		*s.value = append(*s.value, v...)
-	}
-	s.changed = true
-	return nil
-}
-
-func (s *stringSliceValue) Type() string {
-	return "stringSlice"
-}
-
-func (s *stringSliceValue) String() string {
-	str, _ := writeAsCSV(*s.value)
-	return "[" + str + "]"
-}
-
-func stringSliceConv(sval string) (interface{}, error) {
-	sval = sval[1 : len(sval)-1]
-	// An empty string would cause a slice with one (empty) string
-	if len(sval) == 0 {
-		return []string{}, nil
-	}
-	return readAsCSV(sval)
-}
-
-// GetStringSlice return the []string value of a flag with the given name
-func (f *FlagSet) GetStringSlice(name string) ([]string, error) {
-	val, err := f.getFlagType(name, "stringSlice", stringSliceConv)
-	if err != nil {
-		return []string{}, err
-	}
-	return val.([]string), nil
-}
-
-// StringSliceVar defines a string flag with specified name, default value, and usage string.
-// The argument p points to a []string variable in which to store the value of the flag.
-func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) {
-	f.VarP(newStringSliceValue(value, p), name, "", usage)
-}
-
-// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) {
-	f.VarP(newStringSliceValue(value, p), name, shorthand, usage)
-}
-
-// StringSliceVar defines a string flag with specified name, default value, and usage string.
-// The argument p points to a []string variable in which to store the value of the flag.
-func StringSliceVar(p *[]string, name string, value []string, usage string) {
-	CommandLine.VarP(newStringSliceValue(value, p), name, "", usage)
-}
-
-// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash.
-func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) {
-	CommandLine.VarP(newStringSliceValue(value, p), name, shorthand, usage)
-}
-
-// StringSlice defines a string flag with specified name, default value, and usage string.
-// The return value is the address of a []string variable that stores the value of the flag.
-func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string {
-	p := []string{}
-	f.StringSliceVarP(&p, name, "", value, usage)
-	return &p
-}
-
-// StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage string) *[]string {
-	p := []string{}
-	f.StringSliceVarP(&p, name, shorthand, value, usage)
-	return &p
-}
-
-// StringSlice defines a string flag with specified name, default value, and usage string.
-// The return value is the address of a []string variable that stores the value of the flag.
-func StringSlice(name string, value []string, usage string) *[]string {
-	return CommandLine.StringSliceP(name, "", value, usage)
-}
-
-// StringSliceP is like StringSlice, but accepts a shorthand letter that can be used after a single dash.
-func StringSliceP(name, shorthand string, value []string, usage string) *[]string {
-	return CommandLine.StringSliceP(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/uint.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/uint.go b/newt/vendor/github.com/spf13/pflag/uint.go
deleted file mode 100644
index dcbc2b7..0000000
--- a/newt/vendor/github.com/spf13/pflag/uint.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- uint Value
-type uintValue uint
-
-func newUintValue(val uint, p *uint) *uintValue {
-	*p = val
-	return (*uintValue)(p)
-}
-
-func (i *uintValue) Set(s string) error {
-	v, err := strconv.ParseUint(s, 0, 64)
-	*i = uintValue(v)
-	return err
-}
-
-func (i *uintValue) Type() string {
-	return "uint"
-}
-
-func (i *uintValue) String() string { return strconv.FormatUint(uint64(*i), 10) }
-
-func uintConv(sval string) (interface{}, error) {
-	v, err := strconv.ParseUint(sval, 0, 0)
-	if err != nil {
-		return 0, err
-	}
-	return uint(v), nil
-}
-
-// GetUint return the uint value of a flag with the given name
-func (f *FlagSet) GetUint(name string) (uint, error) {
-	val, err := f.getFlagType(name, "uint", uintConv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(uint), nil
-}
-
-// UintVar defines a uint flag with specified name, default value, and usage string.
-// The argument p points to a uint variable in which to store the value of the flag.
-func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) {
-	f.VarP(newUintValue(value, p), name, "", usage)
-}
-
-// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string) {
-	f.VarP(newUintValue(value, p), name, shorthand, usage)
-}
-
-// UintVar defines a uint flag with specified name, default value, and usage string.
-// The argument p points to a uint  variable in which to store the value of the flag.
-func UintVar(p *uint, name string, value uint, usage string) {
-	CommandLine.VarP(newUintValue(value, p), name, "", usage)
-}
-
-// UintVarP is like UintVar, but accepts a shorthand letter that can be used after a single dash.
-func UintVarP(p *uint, name, shorthand string, value uint, usage string) {
-	CommandLine.VarP(newUintValue(value, p), name, shorthand, usage)
-}
-
-// Uint defines a uint flag with specified name, default value, and usage string.
-// The return value is the address of a uint  variable that stores the value of the flag.
-func (f *FlagSet) Uint(name string, value uint, usage string) *uint {
-	p := new(uint)
-	f.UintVarP(p, name, "", value, usage)
-	return p
-}
-
-// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint {
-	p := new(uint)
-	f.UintVarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Uint defines a uint flag with specified name, default value, and usage string.
-// The return value is the address of a uint  variable that stores the value of the flag.
-func Uint(name string, value uint, usage string) *uint {
-	return CommandLine.UintP(name, "", value, usage)
-}
-
-// UintP is like Uint, but accepts a shorthand letter that can be used after a single dash.
-func UintP(name, shorthand string, value uint, usage string) *uint {
-	return CommandLine.UintP(name, shorthand, value, usage)
-}


[65/67] [abbrv] incubator-mynewt-newtmgr git commit: newtmgr - use newtmgr repo, not newt repo.

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/dispatch.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/dispatch.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/dispatch.go
deleted file mode 100644
index fb25f98..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/dispatch.go
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package omp
-
-import (
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/nmxact/nmp"
-)
-
-type OmpDispatcher struct {
-	nd          *nmp.NmpDispatcher
-	reassembler *Reassembler
-}
-
-func NewOmpDispatcher() *OmpDispatcher {
-	return &OmpDispatcher{
-		nd:          nmp.NewNmpDispatcher(),
-		reassembler: NewReassembler(),
-	}
-}
-
-func (od *OmpDispatcher) AddListener(seq uint8, rl *nmp.NmpListener) error {
-	return od.nd.AddListener(seq, rl)
-}
-
-func (od *OmpDispatcher) RemoveListener(seq uint8) *nmp.NmpListener {
-	return od.nd.RemoveListener(seq)
-}
-
-func (od *OmpDispatcher) FakeRxError(seq uint8, err error) error {
-	return od.nd.FakeRxError(seq, err)
-}
-
-// Returns true if the response was dispatched.
-func (om *OmpDispatcher) Dispatch(data []byte) bool {
-	tm := om.reassembler.RxFrag(data)
-	if tm == nil {
-		return false
-	}
-
-	r, err := DecodeOmpTcp(tm)
-	if err != nil {
-		log.Printf("OMP decode failure: %s", err.Error())
-		return false
-	}
-
-	return om.nd.DispatchRsp(r)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/frag.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/frag.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/frag.go
deleted file mode 100644
index caf7f48..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/frag.go
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package omp
-
-import (
-	log "github.com/Sirupsen/logrus"
-	"github.com/runtimeco/go-coap"
-)
-
-type Reassembler struct {
-	cur []byte
-}
-
-func NewReassembler() *Reassembler {
-	return &Reassembler{}
-}
-
-func (r *Reassembler) RxFrag(frag []byte) *coap.TcpMessage {
-	r.cur = append(r.cur, frag...)
-
-	var tm *coap.TcpMessage
-	var err error
-	tm, r.cur, err = coap.PullTcp(r.cur)
-	if err != nil {
-		log.Debugf("received invalid CoAP-TCP packet: %s", err.Error())
-		return nil
-	}
-
-	return tm
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/omp.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/omp.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/omp.go
deleted file mode 100644
index 5bed071..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/omp/omp.go
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package omp
-
-import (
-	"encoding/hex"
-	"fmt"
-
-	log "github.com/Sirupsen/logrus"
-	"github.com/fatih/structs"
-	"github.com/runtimeco/go-coap"
-	"github.com/ugorji/go/codec"
-
-	"mynewt.apache.org/newt/nmxact/nmp"
-)
-
-// OIC wrapping adds this many bytes to an NMP message.
-const OMP_MSG_OVERHEAD = 13
-
-type OicMsg struct {
-	Hdr []byte `codec:"_h"`
-}
-
-/*
- * Not able to install custom decoder for indefite length objects with the
- * codec.  So we need to decode the whole response, and then re-encode the
- * newtmgr response part.
- */
-func DecodeOmpTcp(tm *coap.TcpMessage) (nmp.NmpRsp, error) {
-	// Ignore non-responses.
-	if tm.Code == coap.GET || tm.Code == coap.PUT {
-		return nil, nil
-	}
-
-	if tm.Code != coap.Created && tm.Code != coap.Deleted &&
-		tm.Code != coap.Valid && tm.Code != coap.Changed &&
-		tm.Code != coap.Content {
-		return nil, fmt.Errorf(
-			"OMP response specifies unexpected code: %d (%s)", int(tm.Code),
-			tm.Code.String())
-	}
-
-	var om OicMsg
-	err := codec.NewDecoderBytes(tm.Payload, new(codec.CborHandle)).Decode(&om)
-	if err != nil {
-		return nil, fmt.Errorf("Invalid incoming cbor: %s", err.Error())
-	}
-	if om.Hdr == nil {
-		return nil, fmt.Errorf("Invalid incoming OMP response; NMP header" +
-			"missing")
-	}
-
-	hdr, err := nmp.DecodeNmpHdr(om.Hdr)
-	if err != nil {
-		return nil, err
-	}
-
-	rsp, err := nmp.DecodeRspBody(hdr, tm.Payload)
-	if err != nil {
-		return nil, fmt.Errorf("Error decoding OMP response: %s", err.Error())
-	}
-	if rsp == nil {
-		return nil, nil
-	}
-
-	return rsp, nil
-}
-
-func EncodeOmpTcp(nmr *nmp.NmpMsg) ([]byte, error) {
-	req := coap.TcpMessage{
-		Message: coap.Message{
-			Type: coap.Confirmable,
-			Code: coap.PUT,
-		},
-	}
-	req.SetPathString("/omgr")
-
-	payload := []byte{}
-	enc := codec.NewEncoderBytes(&payload, new(codec.CborHandle))
-
-	fields := structs.Fields(nmr.Body)
-	m := make(map[string]interface{}, len(fields))
-	for _, f := range fields {
-		if cname := f.Tag("codec"); cname != "" {
-			m[cname] = f.Value()
-		}
-	}
-
-	// Add the NMP heder to the OMP response map.
-	hbytes := nmr.Hdr.Bytes()
-	m["_h"] = hbytes
-
-	if err := enc.Encode(m); err != nil {
-		return nil, err
-	}
-	req.Payload = payload
-
-	data, err := req.MarshalBinary()
-	if err != nil {
-		return nil, fmt.Errorf("Failed to encode: %s\n", err.Error())
-	}
-
-	log.Debugf("Serialized OMP request:\n"+
-		"Hdr %+v:\n%s\nPayload:%s\nData:\n%s",
-		nmr.Hdr, hex.Dump(hbytes), hex.Dump(req.Payload), hex.Dump(data))
-
-	return data, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn.go
deleted file mode 100644
index f5bbd3c..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn.go
+++ /dev/null
@@ -1,79 +0,0 @@
-package sesn
-
-import (
-	"time"
-
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-)
-
-type TxOptions struct {
-	Timeout time.Duration
-	Tries   int
-}
-
-func (opt *TxOptions) AfterTimeout() <-chan time.Time {
-	if opt.Timeout == 0 {
-		return nil
-	} else {
-		return time.After(opt.Timeout)
-	}
-}
-
-// Represents a communication session with a specific peer.  The particulars
-// vary according to protocol and transport. Several Sesn instances can use the
-// same Xport.
-type Sesn interface {
-	// Initiates communication with the peer.  For connection-oriented
-	// transports, this creates a connection.
-	// Returns:
-	//     * nil: success.
-	//     * nmxutil.SesnAlreadyOpenError: session already open.
-	//     * other error
-	Open() error
-
-	// Ends communication with the peer.  For connection-oriented transports,
-	// this closes the connection.
-	//     * nil: success.
-	//     * nmxutil.SesnClosedError: session not open.
-	//     * other error
-	Close() error
-
-	// Indicates whether the session is currently open.
-	IsOpen() bool
-
-	// Retrieves the maximum data payload for outgoing NMP requests.
-	MtuOut() int
-
-	// Retrieves the maximum data payload for incoming NMP responses.
-	MtuIn() int
-
-	EncodeNmpMsg(msg *nmp.NmpMsg) ([]byte, error)
-
-	// Performs a blocking transmit a single NMP message and listens for the
-	// response.
-	//     * nil: success.
-	//     * nmxutil.SesnClosedError: session not open.
-	//     * other error
-	TxNmpOnce(m *nmp.NmpMsg, opt TxOptions) (nmp.NmpRsp, error)
-
-	// Stops a receive operation in progress.  This must be called from a
-	// separate thread, as sesn receive operations are blocking.
-	AbortRx(nmpSeq uint8) error
-}
-
-func TxNmp(s Sesn, m *nmp.NmpMsg, o TxOptions) (nmp.NmpRsp, error) {
-	retries := o.Tries - 1
-	for i := 0; ; i++ {
-		r, err := s.TxNmpOnce(m, o)
-		if err == nil {
-			return r, nil
-		}
-
-		if (!nmxutil.IsNmpTimeout(err) && !nmxutil.IsXportTimeout(err)) ||
-			i >= retries {
-
-			return nil, err
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn_cfg.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn_cfg.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn_cfg.go
deleted file mode 100644
index 9e07c71..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn_cfg.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package sesn
-
-import (
-	"time"
-
-	"mynewt.apache.org/newt/nmxact/bledefs"
-)
-
-type MgmtProto int
-
-const (
-	MGMT_PROTO_NMP MgmtProto = iota
-	MGMT_PROTO_OMP
-)
-
-type BleOnCloseFn func(s Sesn, peer bledefs.BleDev, err error)
-
-// Specifies the BLE peer to connect to.
-type BlePeerSpec struct {
-	// This is filled in if you know the address of the peer to connect to.
-	Dev bledefs.BleDev
-
-	// Otherwise, we must scan for a peer to connect to.  This points to a
-	// function that indicates whether we should connect to the sender of the
-	// specified advertisement.  This function gets called each time an
-	// incoming advertisement is received.  If it returns true, the session
-	// will connect to the sender of the corresponding advertisement.  Set this
-	// to nil if you populate the Dev field.
-	ScanPred bledefs.BleAdvPredicate
-}
-
-func BlePeerSpecDev(dev bledefs.BleDev) BlePeerSpec {
-	return BlePeerSpec{Dev: dev}
-}
-
-func BlePeerSpecName(name string) BlePeerSpec {
-	return BlePeerSpec{
-		ScanPred: func(r bledefs.BleAdvReport) bool {
-			return r.Name == name
-		},
-	}
-}
-
-type SesnCfgBle struct {
-	OwnAddrType  bledefs.BleAddrType
-	PeerSpec     BlePeerSpec
-	CloseTimeout time.Duration
-	OnCloseCb    BleOnCloseFn
-}
-
-type SesnCfg struct {
-	// Used with all transport types.
-	MgmtProto MgmtProto
-
-	// Only used with BLE transports.
-	Ble SesnCfgBle
-}
-
-func NewSesnCfg() SesnCfg {
-	return SesnCfg{
-		Ble: SesnCfgBle{
-			CloseTimeout: 5 * time.Second,
-		},
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/cmd.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/cmd.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/cmd.go
deleted file mode 100644
index f42b2df..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/cmd.go
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package xact
-
-import (
-	"fmt"
-
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-type Result interface {
-	Status() int
-}
-
-type Cmd interface {
-	// Transmits request and listens for response; blocking.
-	Run(s sesn.Sesn) (Result, error)
-	Abort() error
-
-	TxOptions() sesn.TxOptions
-	SetTxOptions(opt sesn.TxOptions)
-}
-
-type CmdBase struct {
-	txOptions sesn.TxOptions
-	curNmpSeq uint8
-	curSesn   sesn.Sesn
-	abortErr  error
-}
-
-func (c *CmdBase) TxOptions() sesn.TxOptions {
-	return c.txOptions
-}
-
-func (c *CmdBase) SetTxOptions(opt sesn.TxOptions) {
-	c.txOptions = opt
-}
-
-func (c *CmdBase) Abort() error {
-	if c.curSesn != nil {
-		if err := c.curSesn.AbortRx(c.curNmpSeq); err != nil {
-			return err
-		}
-	}
-
-	c.abortErr = fmt.Errorf("Command aborted")
-	return nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/config.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/config.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/config.go
deleted file mode 100644
index a0d2f70..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/config.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package xact
-
-import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-//////////////////////////////////////////////////////////////////////////////
-// $read                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type ConfigReadCmd struct {
-	CmdBase
-	Name string
-}
-
-func NewConfigReadCmd() *ConfigReadCmd {
-	return &ConfigReadCmd{}
-}
-
-type ConfigReadResult struct {
-	Rsp *nmp.ConfigReadRsp
-}
-
-func newConfigReadResult() *ConfigReadResult {
-	return &ConfigReadResult{}
-}
-
-func (r *ConfigReadResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *ConfigReadCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewConfigReadReq()
-	r.Name = c.Name
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.ConfigReadRsp)
-
-	res := newConfigReadResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $write                                                                   //
-//////////////////////////////////////////////////////////////////////////////
-
-type ConfigWriteCmd struct {
-	CmdBase
-	Name string
-	Val  string
-}
-
-func NewConfigWriteCmd() *ConfigWriteCmd {
-	return &ConfigWriteCmd{}
-}
-
-type ConfigWriteResult struct {
-	Rsp *nmp.ConfigWriteRsp
-}
-
-func newConfigWriteResult() *ConfigWriteResult {
-	return &ConfigWriteResult{}
-}
-
-func (r *ConfigWriteResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *ConfigWriteCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewConfigWriteReq()
-	r.Name = c.Name
-	r.Val = c.Val
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.ConfigWriteRsp)
-
-	res := newConfigWriteResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/crash.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/crash.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/crash.go
deleted file mode 100644
index 002e277..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/crash.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package xact
-
-import (
-	"fmt"
-	"sort"
-
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-type CrashType int
-
-const (
-	CRASH_TYPE_DIV0 CrashType = iota
-	CRASH_TYPE_JUMP0
-	CRASH_TYPE_REF0
-	CRASH_TYPE_ASSERT
-	CRASH_TYPE_WDOG
-)
-
-var CrashTypeNameMap = map[CrashType]string{
-	CRASH_TYPE_DIV0:   "div0",
-	CRASH_TYPE_JUMP0:  "jump0",
-	CRASH_TYPE_REF0:   "ref0",
-	CRASH_TYPE_ASSERT: "assert",
-	CRASH_TYPE_WDOG:   "wdog",
-}
-
-func CrashTypeToString(ct CrashType) string {
-	return CrashTypeNameMap[ct]
-}
-
-func CrashTypeFromString(s string) (CrashType, error) {
-	for k, v := range CrashTypeNameMap {
-		if s == v {
-			return k, nil
-		}
-	}
-
-	return CrashType(0), fmt.Errorf("invalid crash type: %s", s)
-}
-
-func CrashTypeNames() []string {
-	names := make([]string, 0, len(CrashTypeNameMap))
-	for _, v := range CrashTypeNameMap {
-		names = append(names, v)
-	}
-
-	sort.Strings(names)
-	return names
-}
-
-type CrashCmd struct {
-	CmdBase
-	CrashType CrashType
-}
-
-func NewCrashCmd() *CrashCmd {
-	return &CrashCmd{}
-}
-
-type CrashResult struct {
-	Rsp *nmp.CrashRsp
-}
-
-func newCrashResult() *CrashResult {
-	return &CrashResult{}
-}
-
-func (r *CrashResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *CrashCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewCrashReq()
-	r.CrashType = CrashTypeToString(c.CrashType)
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.CrashRsp)
-
-	res := newCrashResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/datetime.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/datetime.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/datetime.go
deleted file mode 100644
index 09738f5..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/datetime.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package xact
-
-import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-///////////////////////////////////////////////////////////////////////////////
-// $read                                                                     //
-///////////////////////////////////////////////////////////////////////////////
-
-type DateTimeReadCmd struct {
-	CmdBase
-}
-
-func NewDateTimeReadCmd() *DateTimeReadCmd {
-	return &DateTimeReadCmd{}
-}
-
-type DateTimeReadResult struct {
-	Rsp *nmp.DateTimeReadRsp
-}
-
-func newDateTimeReadResult() *DateTimeReadResult {
-	return &DateTimeReadResult{}
-}
-
-func (r *DateTimeReadResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *DateTimeReadCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewDateTimeReadReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.DateTimeReadRsp)
-
-	res := newDateTimeReadResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// $write                                                                    //
-///////////////////////////////////////////////////////////////////////////////
-
-type DateTimeWriteCmd struct {
-	CmdBase
-	DateTime string
-}
-
-func NewDateTimeWriteCmd() *DateTimeWriteCmd {
-	return &DateTimeWriteCmd{}
-}
-
-type DateTimeWriteResult struct {
-	Rsp *nmp.DateTimeWriteRsp
-}
-
-func newDateTimeWriteResult() *DateTimeWriteResult {
-	return &DateTimeWriteResult{}
-}
-
-func (r *DateTimeWriteResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *DateTimeWriteCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewDateTimeWriteReq()
-	r.DateTime = c.DateTime
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.DateTimeWriteRsp)
-
-	res := newDateTimeWriteResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/echo.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/echo.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/echo.go
deleted file mode 100644
index 0be55b4..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/echo.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package xact
-
-import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-type EchoCmd struct {
-	CmdBase
-	Payload string
-}
-
-func NewEchoCmd() *EchoCmd {
-	return &EchoCmd{}
-}
-
-type EchoResult struct {
-	Rsp *nmp.EchoRsp
-}
-
-func newEchoResult() *EchoResult {
-	return &EchoResult{}
-}
-
-func (r *EchoResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *EchoCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewEchoReq()
-	r.Payload = c.Payload
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.EchoRsp)
-
-	res := newEchoResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/fs.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/fs.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/fs.go
deleted file mode 100644
index 9f150fa..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/fs.go
+++ /dev/null
@@ -1,178 +0,0 @@
-package xact
-
-import (
-	"fmt"
-
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-//////////////////////////////////////////////////////////////////////////////
-// $download                                                                //
-//////////////////////////////////////////////////////////////////////////////
-
-type FsDownloadProgressCb func(c *FsDownloadCmd, r *nmp.FsDownloadRsp)
-type FsDownloadCmd struct {
-	CmdBase
-	Name       string
-	ProgressCb FsDownloadProgressCb
-}
-
-func NewFsDownloadCmd() *FsDownloadCmd {
-	return &FsDownloadCmd{}
-}
-
-type FsDownloadResult struct {
-	Rsps []*nmp.FsDownloadRsp
-}
-
-func newFsDownloadResult() *FsDownloadResult {
-	return &FsDownloadResult{}
-}
-
-func (r *FsDownloadResult) Status() int {
-	rsp := r.Rsps[len(r.Rsps)-1]
-	return rsp.Rc
-}
-
-func (c *FsDownloadCmd) Run(s sesn.Sesn) (Result, error) {
-	res := newFsDownloadResult()
-	off := 0
-
-	for {
-		r := nmp.NewFsDownloadReq()
-		r.Name = c.Name
-		r.Off = uint32(off)
-
-		rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-		if err != nil {
-			return nil, err
-		}
-		frsp := rsp.(*nmp.FsDownloadRsp)
-		res.Rsps = append(res.Rsps, frsp)
-
-		if frsp.Rc != 0 {
-			break
-		}
-
-		if c.ProgressCb != nil {
-			c.ProgressCb(c, frsp)
-		}
-
-		off = int(frsp.Off) + len(frsp.Data)
-		if off >= int(frsp.Len) {
-			break
-		}
-	}
-
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $upload                                                                  //
-//////////////////////////////////////////////////////////////////////////////
-
-type FsUploadProgressCb func(c *FsUploadCmd, r *nmp.FsUploadRsp)
-type FsUploadCmd struct {
-	CmdBase
-	Name       string
-	Data       []byte
-	ProgressCb FsUploadProgressCb
-}
-
-func NewFsUploadCmd() *FsUploadCmd {
-	return &FsUploadCmd{}
-}
-
-type FsUploadResult struct {
-	Rsps []*nmp.FsUploadRsp
-}
-
-func newFsUploadResult() *FsUploadResult {
-	return &FsUploadResult{}
-}
-
-func (r *FsUploadResult) Status() int {
-	rsp := r.Rsps[len(r.Rsps)-1]
-	return rsp.Rc
-}
-
-func buildFsUploadReq(name string, fileSz int, chunk []byte,
-	off int) *nmp.FsUploadReq {
-
-	r := nmp.NewFsUploadReq()
-
-	if r.Off == 0 {
-		r.Len = uint32(fileSz)
-	}
-	r.Name = name
-	r.Off = uint32(off)
-	r.Data = chunk
-
-	return r
-}
-
-func nextFsUploadReq(s sesn.Sesn, name string, data []byte, off int) (
-	*nmp.FsUploadReq, error) {
-
-	// First, build a request without data to determine how much data could
-	// fit.
-	empty := buildFsUploadReq(name, len(data), nil, off)
-	emptyEnc, err := s.EncodeNmpMsg(empty.Msg())
-	if err != nil {
-		return nil, err
-	}
-
-	room := s.MtuOut() - len(emptyEnc)
-	if room <= 0 {
-		return nil, fmt.Errorf("Cannot create image upload request; " +
-			"MTU too low to fit any image data")
-	}
-
-	// Assume all the unused space can hold image data.  This assumption may
-	// not be valid for some encodings (e.g., CBOR uses variable length fields
-	// to encodes byte string lengths).
-	r := buildFsUploadReq(name, len(data), data[off:off+room], off)
-	enc, err := s.EncodeNmpMsg(r.Msg())
-	if err != nil {
-		return nil, err
-	}
-
-	oversize := len(enc) - s.MtuOut()
-	if oversize > 0 {
-		// Request too big.  Reduce the amount of image data.
-		r = buildFsUploadReq(name, len(data), data[off:off+room-oversize], off)
-	}
-
-	return r, nil
-}
-
-func (c *FsUploadCmd) Run(s sesn.Sesn) (Result, error) {
-	res := newFsUploadResult()
-
-	for off := 0; off < len(c.Data); {
-		r, err := nextFsUploadReq(s, c.Name, c.Data, off)
-		if err != nil {
-			return nil, err
-		}
-
-		rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-		if err != nil {
-			return nil, err
-		}
-		crsp := rsp.(*nmp.FsUploadRsp)
-
-		off = int(crsp.Off)
-
-		if c.ProgressCb != nil {
-			c.ProgressCb(c, crsp)
-		}
-
-		res.Rsps = append(res.Rsps, crsp)
-		if crsp.Rc != 0 {
-			break
-		}
-	}
-
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/image.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/image.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/image.go
deleted file mode 100644
index 1f236a4..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/image.go
+++ /dev/null
@@ -1,332 +0,0 @@
-package xact
-
-import (
-	"fmt"
-
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-//////////////////////////////////////////////////////////////////////////////
-// $upload                                                                  //
-//////////////////////////////////////////////////////////////////////////////
-
-type ImageUploadProgressFn func(c *ImageUploadCmd, r *nmp.ImageUploadRsp)
-type ImageUploadCmd struct {
-	CmdBase
-	Data       []byte
-	ProgressCb ImageUploadProgressFn
-}
-
-type ImageUploadResult struct {
-	Rsps []*nmp.ImageUploadRsp
-}
-
-func NewImageUploadCmd() *ImageUploadCmd {
-	return &ImageUploadCmd{}
-}
-
-func newImageUploadResult() *ImageUploadResult {
-	return &ImageUploadResult{}
-}
-
-func (r *ImageUploadResult) Status() int {
-	rsp := r.Rsps[len(r.Rsps)-1]
-	return rsp.Rc
-}
-
-func buildImageUploadReq(imageSz int, chunk []byte,
-	off int) *nmp.ImageUploadReq {
-
-	r := nmp.NewImageUploadReq()
-
-	if r.Off == 0 {
-		r.Len = uint32(imageSz)
-	}
-	r.Off = uint32(off)
-	r.Data = chunk
-
-	return r
-}
-
-func nextImageUploadReq(s sesn.Sesn, data []byte, off int) (
-	*nmp.ImageUploadReq, error) {
-
-	// First, build a request without data to determine how much data could
-	// fit.
-	empty := buildImageUploadReq(len(data), nil, off)
-	emptyEnc, err := s.EncodeNmpMsg(empty.Msg())
-	if err != nil {
-		return nil, err
-	}
-
-	room := s.MtuOut() - len(emptyEnc)
-	if room <= 0 {
-		return nil, fmt.Errorf("Cannot create image upload request; " +
-			"MTU too low to fit any image data")
-	}
-
-	// Assume all the unused space can hold image data.  This assumption may
-	// not be valid for some encodings (e.g., CBOR uses variable length fields
-	// to encodes byte string lengths).
-	r := buildImageUploadReq(len(data), data[off:off+room], off)
-	enc, err := s.EncodeNmpMsg(r.Msg())
-	if err != nil {
-		return nil, err
-	}
-
-	oversize := len(enc) - s.MtuOut()
-	if oversize > 0 {
-		// Request too big.  Reduce the amount of image data.
-		r = buildImageUploadReq(len(data), data[off:off+room-oversize], off)
-	}
-
-	return r, nil
-}
-
-func (c *ImageUploadCmd) Run(s sesn.Sesn) (Result, error) {
-	res := newImageUploadResult()
-
-	for off := 0; off < len(c.Data); {
-		r, err := nextImageUploadReq(s, c.Data, off)
-		if err != nil {
-			return nil, err
-		}
-
-		rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-		if err != nil {
-			return nil, err
-		}
-		irsp := rsp.(*nmp.ImageUploadRsp)
-
-		off = int(irsp.Off)
-
-		if c.ProgressCb != nil {
-			c.ProgressCb(c, irsp)
-		}
-
-		res.Rsps = append(res.Rsps, irsp)
-		if irsp.Rc != 0 {
-			break
-		}
-	}
-
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $state read                                                              //
-//////////////////////////////////////////////////////////////////////////////
-
-type ImageStateReadCmd struct {
-	CmdBase
-}
-
-type ImageStateReadResult struct {
-	Rsp *nmp.ImageStateRsp
-}
-
-func NewImageStateReadCmd() *ImageStateReadCmd {
-	return &ImageStateReadCmd{}
-}
-
-func newImageStateReadResult() *ImageStateReadResult {
-	return &ImageStateReadResult{}
-}
-
-func (r *ImageStateReadResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *ImageStateReadCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewImageStateReadReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.ImageStateRsp)
-
-	res := newImageStateReadResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $state write                                                             //
-//////////////////////////////////////////////////////////////////////////////
-
-type ImageStateWriteCmd struct {
-	CmdBase
-	Hash    []byte
-	Confirm bool
-}
-
-type ImageStateWriteResult struct {
-	Rsp *nmp.ImageStateRsp
-}
-
-func NewImageStateWriteCmd() *ImageStateWriteCmd {
-	return &ImageStateWriteCmd{}
-}
-
-func newImageStateWriteResult() *ImageStateWriteResult {
-	return &ImageStateWriteResult{}
-}
-
-func (r *ImageStateWriteResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *ImageStateWriteCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewImageStateWriteReq()
-	r.Hash = c.Hash
-	r.Confirm = c.Confirm
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.ImageStateRsp)
-
-	res := newImageStateWriteResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $corelist                                                                //
-//////////////////////////////////////////////////////////////////////////////
-
-type CoreListCmd struct {
-	CmdBase
-}
-
-type CoreListResult struct {
-	Rsp *nmp.CoreListRsp
-}
-
-func NewCoreListCmd() *CoreListCmd {
-	return &CoreListCmd{}
-}
-
-func newCoreListResult() *CoreListResult {
-	return &CoreListResult{}
-}
-
-func (r *CoreListResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *CoreListCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewCoreListReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.CoreListRsp)
-
-	res := newCoreListResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $coreload                                                                //
-//////////////////////////////////////////////////////////////////////////////
-
-type CoreLoadProgressFn func(c *CoreLoadCmd, r *nmp.CoreLoadRsp)
-type CoreLoadCmd struct {
-	CmdBase
-	ProgressCb CoreLoadProgressFn
-}
-
-type CoreLoadResult struct {
-	Rsps []*nmp.CoreLoadRsp
-}
-
-func NewCoreLoadCmd() *CoreLoadCmd {
-	return &CoreLoadCmd{}
-}
-
-func newCoreLoadResult() *CoreLoadResult {
-	return &CoreLoadResult{}
-}
-
-func (r *CoreLoadResult) Status() int {
-	rsp := r.Rsps[len(r.Rsps)-1]
-	return rsp.Rc
-}
-
-func (c *CoreLoadCmd) Run(s sesn.Sesn) (Result, error) {
-	res := newCoreLoadResult()
-	off := 0
-
-	for {
-		r := nmp.NewCoreLoadReq()
-		r.Off = uint32(off)
-
-		rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-		if err != nil {
-			return nil, err
-		}
-		irsp := rsp.(*nmp.CoreLoadRsp)
-
-		if c.ProgressCb != nil {
-			c.ProgressCb(c, irsp)
-		}
-
-		res.Rsps = append(res.Rsps, irsp)
-		if irsp.Rc != 0 {
-			break
-		}
-
-		if len(irsp.Data) == 0 {
-			// Download complete.
-			break
-		}
-
-		off = int(irsp.Off) + len(irsp.Data)
-	}
-
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $coreerase                                                               //
-//////////////////////////////////////////////////////////////////////////////
-
-type CoreEraseCmd struct {
-	CmdBase
-}
-
-type CoreEraseResult struct {
-	Rsp *nmp.CoreEraseRsp
-}
-
-func NewCoreEraseCmd() *CoreEraseCmd {
-	return &CoreEraseCmd{}
-}
-
-func newCoreEraseResult() *CoreEraseResult {
-	return &CoreEraseResult{}
-}
-
-func (r *CoreEraseResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *CoreEraseCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewCoreEraseReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.CoreEraseRsp)
-
-	res := newCoreEraseResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/log.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/log.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/log.go
deleted file mode 100644
index d40d523..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/log.go
+++ /dev/null
@@ -1,202 +0,0 @@
-package xact
-
-import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-//////////////////////////////////////////////////////////////////////////////
-// $read                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type LogShowCmd struct {
-	CmdBase
-	Name      string
-	Timestamp int64
-	Index     uint32
-}
-
-func NewLogShowCmd() *LogShowCmd {
-	return &LogShowCmd{}
-}
-
-type LogShowResult struct {
-	Rsp *nmp.LogShowRsp
-}
-
-func newLogShowResult() *LogShowResult {
-	return &LogShowResult{}
-}
-
-func (r *LogShowResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *LogShowCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewLogShowReq()
-	r.Name = c.Name
-	r.Timestamp = c.Timestamp
-	r.Index = c.Index
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.LogShowRsp)
-
-	res := newLogShowResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $list                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type LogListCmd struct {
-	CmdBase
-}
-
-func NewLogListCmd() *LogListCmd {
-	return &LogListCmd{}
-}
-
-type LogListResult struct {
-	Rsp *nmp.LogListRsp
-}
-
-func newLogListResult() *LogListResult {
-	return &LogListResult{}
-}
-
-func (r *LogListResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *LogListCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewLogListReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.LogListRsp)
-
-	res := newLogListResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $module list                                                             //
-//////////////////////////////////////////////////////////////////////////////
-
-type LogModuleListCmd struct {
-	CmdBase
-}
-
-func NewLogModuleListCmd() *LogModuleListCmd {
-	return &LogModuleListCmd{}
-}
-
-type LogModuleListResult struct {
-	Rsp *nmp.LogModuleListRsp
-}
-
-func newLogModuleListResult() *LogModuleListResult {
-	return &LogModuleListResult{}
-}
-
-func (r *LogModuleListResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *LogModuleListCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewLogModuleListReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.LogModuleListRsp)
-
-	res := newLogModuleListResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $level list                                                              //
-//////////////////////////////////////////////////////////////////////////////
-
-type LogLevelListCmd struct {
-	CmdBase
-}
-
-func NewLogLevelListCmd() *LogLevelListCmd {
-	return &LogLevelListCmd{}
-}
-
-type LogLevelListResult struct {
-	Rsp *nmp.LogLevelListRsp
-}
-
-func newLogLevelListResult() *LogLevelListResult {
-	return &LogLevelListResult{}
-}
-
-func (r *LogLevelListResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *LogLevelListCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewLogLevelListReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.LogLevelListRsp)
-
-	res := newLogLevelListResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $clear                                                                   //
-//////////////////////////////////////////////////////////////////////////////
-
-type LogClearCmd struct {
-	CmdBase
-}
-
-func NewLogClearCmd() *LogClearCmd {
-	return &LogClearCmd{}
-}
-
-type LogClearResult struct {
-	Rsp *nmp.LogClearRsp
-}
-
-func newLogClearResult() *LogClearResult {
-	return &LogClearResult{}
-}
-
-func (r *LogClearResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *LogClearCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewLogClearReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.LogClearRsp)
-
-	res := newLogClearResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/mpstat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/mpstat.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/mpstat.go
deleted file mode 100644
index cc2784c..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/mpstat.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package xact
-
-import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-type MempoolStatCmd struct {
-	CmdBase
-}
-
-func NewMempoolStatCmd() *MempoolStatCmd {
-	return &MempoolStatCmd{}
-}
-
-type MempoolStatResult struct {
-	Rsp *nmp.MempoolStatRsp
-}
-
-func newMempoolStatResult() *MempoolStatResult {
-	return &MempoolStatResult{}
-}
-
-func (r *MempoolStatResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *MempoolStatCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewMempoolStatReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.MempoolStatRsp)
-
-	res := newMempoolStatResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/reset.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/reset.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/reset.go
deleted file mode 100644
index c7adf83..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/reset.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package xact
-
-import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-type ResetCmd struct {
-	CmdBase
-	Payload string
-}
-
-func NewResetCmd() *ResetCmd {
-	return &ResetCmd{}
-}
-
-type ResetResult struct {
-	Rsp *nmp.ResetRsp
-}
-
-func newResetResult() *ResetResult {
-	return &ResetResult{}
-}
-
-func (r *ResetResult) Status() int {
-	return 0
-}
-
-func (c *ResetCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewResetReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.ResetRsp)
-
-	res := newResetResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/run.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/run.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/run.go
deleted file mode 100644
index ff1e1e9..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/run.go
+++ /dev/null
@@ -1,86 +0,0 @@
-package xact
-
-import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-//////////////////////////////////////////////////////////////////////////////
-// $test                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type RunTestCmd struct {
-	CmdBase
-	Testname string
-	Token    string
-}
-
-func NewRunTestCmd() *RunTestCmd {
-	return &RunTestCmd{}
-}
-
-type RunTestResult struct {
-	Rsp *nmp.RunTestRsp
-}
-
-func newRunTestResult() *RunTestResult {
-	return &RunTestResult{}
-}
-
-func (r *RunTestResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *RunTestCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewRunTestReq()
-	r.Testname = c.Testname
-	r.Token = c.Token
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.RunTestRsp)
-
-	res := newRunTestResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $list                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type RunListCmd struct {
-	CmdBase
-}
-
-func NewRunListCmd() *RunListCmd {
-	return &RunListCmd{}
-}
-
-type RunListResult struct {
-	Rsp *nmp.RunListRsp
-}
-
-func newRunListResult() *RunListResult {
-	return &RunListResult{}
-}
-
-func (r *RunListResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *RunListCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewRunListReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.RunListRsp)
-
-	res := newRunListResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/stat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/stat.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/stat.go
deleted file mode 100644
index 6aa4dc3..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/stat.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package xact
-
-import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-//////////////////////////////////////////////////////////////////////////////
-// $read                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type StatReadCmd struct {
-	CmdBase
-	Name string
-}
-
-func NewStatReadCmd() *StatReadCmd {
-	return &StatReadCmd{}
-}
-
-type StatReadResult struct {
-	Rsp *nmp.StatReadRsp
-}
-
-func newStatReadResult() *StatReadResult {
-	return &StatReadResult{}
-}
-
-func (r *StatReadResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *StatReadCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewStatReadReq()
-	r.Name = c.Name
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.StatReadRsp)
-
-	res := newStatReadResult()
-	res.Rsp = srsp
-	return res, nil
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $list                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type StatListCmd struct {
-	CmdBase
-}
-
-func NewStatListCmd() *StatListCmd {
-	return &StatListCmd{}
-}
-
-type StatListResult struct {
-	Rsp *nmp.StatListRsp
-}
-
-func newStatListResult() *StatListResult {
-	return &StatListResult{}
-}
-
-func (r *StatListResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *StatListCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewStatListReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.StatListRsp)
-
-	res := newStatListResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/taskstat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/taskstat.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/taskstat.go
deleted file mode 100644
index 9ec7774..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/taskstat.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package xact
-
-import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-type TaskStatCmd struct {
-	CmdBase
-}
-
-func NewTaskStatCmd() *TaskStatCmd {
-	return &TaskStatCmd{}
-}
-
-type TaskStatResult struct {
-	Rsp *nmp.TaskStatRsp
-}
-
-func newTaskStatResult() *TaskStatResult {
-	return &TaskStatResult{}
-}
-
-func (r *TaskStatResult) Status() int {
-	return r.Rsp.Rc
-}
-
-func (c *TaskStatCmd) Run(s sesn.Sesn) (Result, error) {
-	r := nmp.NewTaskStatReq()
-
-	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
-	if err != nil {
-		return nil, err
-	}
-	srsp := rsp.(*nmp.TaskStatRsp)
-
-	res := newTaskStatResult()
-	res.Rsp = srsp
-	return res, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/xact.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/xact.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/xact.go
deleted file mode 100644
index 2cdf150..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xact/xact.go
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package xact
-
-import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-func txReq(s sesn.Sesn, m *nmp.NmpMsg, c *CmdBase) (
-	nmp.NmpRsp, error) {
-
-	if c.abortErr != nil {
-		return nil, c.abortErr
-	}
-
-	c.curNmpSeq = m.Hdr.Seq
-	c.curSesn = s
-	defer func() {
-		c.curNmpSeq = 0
-		c.curSesn = nil
-	}()
-
-	rsp, err := sesn.TxNmp(s, m, c.TxOptions())
-	if err != nil {
-		return nil, err
-	}
-
-	return rsp, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xport/xport.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xport/xport.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xport/xport.go
deleted file mode 100644
index 3cdf8b5..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/xport/xport.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package xport
-
-import (
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-type RxFn func(data []byte)
-
-type Xport interface {
-	Start() error
-	Stop() error
-	BuildSesn(cfg sesn.SesnCfg) (sesn.Sesn, error)
-
-	Tx(data []byte) error
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/bledefs/bledefs.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/bledefs/bledefs.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/bledefs/bledefs.go
new file mode 100644
index 0000000..3bb2772
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/bledefs/bledefs.go
@@ -0,0 +1,270 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package bledefs
+
+import (
+	"bytes"
+	"encoding/json"
+	"fmt"
+	"strconv"
+	"strings"
+)
+
+const BLE_ATT_ATTR_MAX_LEN = 512
+
+type BleAddrType int
+
+const (
+	BLE_ADDR_TYPE_PUBLIC  BleAddrType = 0
+	BLE_ADDR_TYPE_RANDOM              = 1
+	BLE_ADDR_TYPE_RPA_PUB             = 2
+	BLE_ADDR_TYPE_RPA_RND             = 3
+)
+
+var BleAddrTypeStringMap = map[BleAddrType]string{
+	BLE_ADDR_TYPE_PUBLIC:  "public",
+	BLE_ADDR_TYPE_RANDOM:  "random",
+	BLE_ADDR_TYPE_RPA_PUB: "rpa_pub",
+	BLE_ADDR_TYPE_RPA_RND: "rpa_rnd",
+}
+
+func BleAddrTypeToString(addrType BleAddrType) string {
+	s := BleAddrTypeStringMap[addrType]
+	if s == "" {
+		panic(fmt.Sprintf("Invalid BleAddrType: %d", int(addrType)))
+	}
+
+	return s
+}
+
+func BleAddrTypeFromString(s string) (BleAddrType, error) {
+	for addrType, name := range BleAddrTypeStringMap {
+		if s == name {
+			return addrType, nil
+		}
+	}
+
+	return BleAddrType(0), fmt.Errorf("Invalid BleAddrType string: %s", s)
+}
+
+func (a BleAddrType) MarshalJSON() ([]byte, error) {
+	return json.Marshal(BleAddrTypeToString(a))
+}
+
+func (a *BleAddrType) UnmarshalJSON(data []byte) error {
+	var err error
+
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	*a, err = BleAddrTypeFromString(s)
+	return err
+}
+
+type BleAddr struct {
+	Bytes [6]byte
+}
+
+func ParseBleAddr(s string) (BleAddr, error) {
+	ba := BleAddr{}
+
+	toks := strings.Split(strings.ToLower(s), ":")
+	if len(toks) != 6 {
+		return ba, fmt.Errorf("invalid BLE addr string: %s", s)
+	}
+
+	for i, t := range toks {
+		u64, err := strconv.ParseUint(t, 16, 8)
+		if err != nil {
+			return ba, err
+		}
+		ba.Bytes[i] = byte(u64)
+	}
+
+	return ba, nil
+}
+
+func (ba *BleAddr) String() string {
+	var buf bytes.Buffer
+	buf.Grow(len(ba.Bytes) * 3)
+
+	for i, b := range ba.Bytes {
+		if i != 0 {
+			buf.WriteString(":")
+		}
+		fmt.Fprintf(&buf, "%02x", b)
+	}
+
+	return buf.String()
+}
+
+func (ba *BleAddr) MarshalJSON() ([]byte, error) {
+	return json.Marshal(ba.String())
+}
+
+func (ba *BleAddr) UnmarshalJSON(data []byte) error {
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	var err error
+	*ba, err = ParseBleAddr(s)
+	if err != nil {
+		return err
+	}
+
+	return nil
+}
+
+type BleDev struct {
+	AddrType BleAddrType
+	Addr     BleAddr
+}
+
+func (bd *BleDev) String() string {
+	return fmt.Sprintf("%s,%s",
+		BleAddrTypeToString(bd.AddrType),
+		bd.Addr.String())
+}
+
+type BleScanFilterPolicy int
+
+const (
+	BLE_SCAN_FILT_NO_WL        BleScanFilterPolicy = 0
+	BLE_SCAN_FILT_USE_WL                           = 1
+	BLE_SCAN_FILT_NO_WL_INITA                      = 2
+	BLE_SCAN_FILT_USE_WL_INITA                     = 3
+)
+
+var BleScanFilterPolicyStringMap = map[BleScanFilterPolicy]string{
+	BLE_SCAN_FILT_NO_WL:        "no_wl",
+	BLE_SCAN_FILT_USE_WL:       "use_wl",
+	BLE_SCAN_FILT_NO_WL_INITA:  "no_wl_inita",
+	BLE_SCAN_FILT_USE_WL_INITA: "use_wl_inita",
+}
+
+func BleScanFilterPolicyToString(filtPolicy BleScanFilterPolicy) string {
+	s := BleScanFilterPolicyStringMap[filtPolicy]
+	if s == "" {
+		panic(fmt.Sprintf("Invalid BleScanFilterPolicy: %d", int(filtPolicy)))
+	}
+
+	return s
+}
+
+func BleScanFilterPolicyFromString(s string) (BleScanFilterPolicy, error) {
+	for filtPolicy, name := range BleScanFilterPolicyStringMap {
+		if s == name {
+			return filtPolicy, nil
+		}
+	}
+
+	return BleScanFilterPolicy(0),
+		fmt.Errorf("Invalid BleScanFilterPolicy string: %s", s)
+}
+
+func (a BleScanFilterPolicy) MarshalJSON() ([]byte, error) {
+	return json.Marshal(BleScanFilterPolicyToString(a))
+}
+
+func (a *BleScanFilterPolicy) UnmarshalJSON(data []byte) error {
+	var err error
+
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	*a, err = BleScanFilterPolicyFromString(s)
+	return err
+}
+
+type BleAdvEventType int
+
+const (
+	BLE_ADV_EVENT_IND           BleAdvEventType = 0
+	BLE_ADV_EVENT_DIRECT_IND_HD                 = 1
+	BLE_ADV_EVENT_SCAN_IND                      = 2
+	BLE_ADV_EVENT_NONCONN_IND                   = 3
+	BLE_ADV_EVENT_DIRECT_IND_LD                 = 4
+)
+
+var BleAdvEventTypeStringMap = map[BleAdvEventType]string{
+	BLE_ADV_EVENT_IND:           "ind",
+	BLE_ADV_EVENT_DIRECT_IND_HD: "direct_ind_hd",
+	BLE_ADV_EVENT_SCAN_IND:      "scan_ind",
+	BLE_ADV_EVENT_NONCONN_IND:   "nonconn_ind",
+	BLE_ADV_EVENT_DIRECT_IND_LD: "direct_ind_ld",
+}
+
+func BleAdvEventTypeToString(advEventType BleAdvEventType) string {
+	s := BleAdvEventTypeStringMap[advEventType]
+	if s == "" {
+		panic(fmt.Sprintf("Invalid BleAdvEventType: %d", int(advEventType)))
+	}
+
+	return s
+}
+
+func BleAdvEventTypeFromString(s string) (BleAdvEventType, error) {
+	for advEventType, name := range BleAdvEventTypeStringMap {
+		if s == name {
+			return advEventType, nil
+		}
+	}
+
+	return BleAdvEventType(0),
+		fmt.Errorf("Invalid BleAdvEventType string: %s", s)
+}
+
+func (a BleAdvEventType) MarshalJSON() ([]byte, error) {
+	return json.Marshal(BleAdvEventTypeToString(a))
+}
+
+func (a *BleAdvEventType) UnmarshalJSON(data []byte) error {
+	var err error
+
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	*a, err = BleAdvEventTypeFromString(s)
+	return err
+}
+
+type BleAdvReport struct {
+	// These fields are always present.
+	EventType BleAdvEventType
+	Sender    BleDev
+	Rssi      int8
+	Data      []byte
+
+	// These fields are only present if the sender included them in its
+	// advertisement.
+	Flags          uint8  // 0 if not present.
+	Name           string // "" if not present.
+	NameIsComplete bool   // false if not present.
+}
+
+type BleAdvPredicate func(adv BleAdvReport) bool

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_act.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_act.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_act.go
new file mode 100644
index 0000000..2aa6678
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_act.go
@@ -0,0 +1,363 @@
+package nmble
+
+import (
+	"encoding/json"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+)
+
+// Blocking
+func connect(x *BleXport, connChan chan error, r *BleConnectReq) error {
+	j, err := json.Marshal(r)
+	if err != nil {
+		return err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return err
+	}
+
+	err = <-connChan
+	if err != nil {
+		return err
+	}
+
+	return nil
+}
+
+// Blocking
+func terminate(x *BleXport, bl *BleListener, r *BleTerminateReq) error {
+	j, err := json.Marshal(r)
+	if err != nil {
+		return err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return err
+	}
+
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleTerminateRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return StatusError(MSG_OP_RSP,
+						MSG_TYPE_TERMINATE,
+						msg.Status)
+				} else {
+					return nil
+				}
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return BhdTimeoutError(MSG_TYPE_TERMINATE)
+		}
+	}
+}
+
+func connCancel(x *BleXport, bl *BleListener, r *BleConnCancelReq) error {
+	j, err := json.Marshal(r)
+	if err != nil {
+		return err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return err
+	}
+
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleConnCancelRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return StatusError(MSG_OP_RSP,
+						MSG_TYPE_CONN_CANCEL,
+						msg.Status)
+				} else {
+					return nil
+				}
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return BhdTimeoutError(MSG_TYPE_TERMINATE)
+		}
+	}
+}
+
+// Blocking.
+func discSvcUuid(x *BleXport, bl *BleListener, r *BleDiscSvcUuidReq) (
+	*BleSvc, error) {
+
+	j, err := json.Marshal(r)
+	if err != nil {
+		return nil, err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return nil, err
+	}
+
+	var svc *BleSvc
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return nil, err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleDiscSvcUuidRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return nil, StatusError(MSG_OP_RSP,
+						MSG_TYPE_DISC_SVC_UUID,
+						msg.Status)
+				}
+
+			case *BleDiscSvcEvt:
+				switch msg.Status {
+				case 0:
+					svc = &msg.Svc
+				case ERR_CODE_EDONE:
+					if svc == nil {
+						return nil, nmxutil.FmtBleHostError(
+							msg.Status,
+							"Peer doesn't support required service: %s",
+							r.Uuid.String())
+					}
+					return svc, nil
+				default:
+					return nil, StatusError(MSG_OP_EVT,
+						MSG_TYPE_DISC_SVC_EVT,
+						msg.Status)
+				}
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return nil, BhdTimeoutError(MSG_TYPE_DISC_SVC_UUID)
+		}
+	}
+}
+
+// Blocking.
+func discAllChrs(x *BleXport, bl *BleListener, r *BleDiscAllChrsReq) (
+	[]*BleChr, error) {
+
+	j, err := json.Marshal(r)
+	if err != nil {
+		return nil, err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return nil, err
+	}
+
+	chrs := []*BleChr{}
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return nil, err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleDiscAllChrsRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return nil, StatusError(MSG_OP_RSP,
+						MSG_TYPE_DISC_ALL_CHRS,
+						msg.Status)
+				}
+
+			case *BleDiscChrEvt:
+				switch msg.Status {
+				case 0:
+					chrs = append(chrs, &msg.Chr)
+				case ERR_CODE_EDONE:
+					return chrs, nil
+				default:
+					return nil, StatusError(MSG_OP_EVT,
+						MSG_TYPE_DISC_CHR_EVT,
+						msg.Status)
+				}
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return nil, BhdTimeoutError(MSG_TYPE_DISC_ALL_CHRS)
+		}
+	}
+}
+
+// Blocking.
+func writeCmd(x *BleXport, bl *BleListener, r *BleWriteCmdReq) error {
+	j, err := json.Marshal(r)
+	if err != nil {
+		return err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return err
+	}
+
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleWriteCmdRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return StatusError(MSG_OP_RSP,
+						MSG_TYPE_WRITE_CMD,
+						msg.Status)
+				} else {
+					return nil
+				}
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return BhdTimeoutError(MSG_TYPE_WRITE_CMD)
+		}
+	}
+}
+
+// Blocking.
+func exchangeMtu(x *BleXport, bl *BleListener, r *BleExchangeMtuReq) (
+	int, error) {
+
+	j, err := json.Marshal(r)
+	if err != nil {
+		return 0, err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return 0, err
+	}
+
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return 0, err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleExchangeMtuRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return 0, StatusError(MSG_OP_RSP,
+						MSG_TYPE_EXCHANGE_MTU,
+						msg.Status)
+				}
+
+			case *BleMtuChangeEvt:
+				if msg.Status != 0 {
+					return 0, StatusError(MSG_OP_EVT,
+						MSG_TYPE_MTU_CHANGE_EVT,
+						msg.Status)
+				} else {
+					return msg.Mtu, nil
+				}
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return 0, BhdTimeoutError(MSG_TYPE_EXCHANGE_MTU)
+		}
+	}
+}
+
+type scanFn func(evt *BleScanEvt)
+
+func scan(x *BleXport, bl *BleListener, r *BleScanReq,
+	abortChan chan struct{}, scanCb scanFn) error {
+
+	j, err := json.Marshal(r)
+	if err != nil {
+		return err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return err
+	}
+
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleScanRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return StatusError(MSG_OP_RSP, MSG_TYPE_SCAN, msg.Status)
+				}
+
+			case *BleScanEvt:
+				scanCb(msg)
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return BhdTimeoutError(MSG_TYPE_EXCHANGE_MTU)
+
+		case <-abortChan:
+			return nil
+		}
+	}
+}
+
+func scanCancel(x *BleXport, bl *BleListener, r *BleScanCancelReq) error {
+	j, err := json.Marshal(r)
+	if err != nil {
+		return err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return err
+	}
+
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleScanCancelRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return StatusError(MSG_OP_RSP, MSG_TYPE_SCAN, msg.Status)
+				}
+				return nil
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return BhdTimeoutError(MSG_TYPE_EXCHANGE_MTU)
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_fsm.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_fsm.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_fsm.go
new file mode 100644
index 0000000..9c96526
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_fsm.go
@@ -0,0 +1,766 @@
+package nmble
+
+import (
+	"encoding/hex"
+	"fmt"
+	"sync"
+	"time"
+
+	log "github.com/Sirupsen/logrus"
+
+	. "mynewt.apache.org/newtmgr/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+type BleSesnState int32
+
+const DFLT_ATT_MTU = 23
+
+const (
+	SESN_STATE_UNCONNECTED     BleSesnState = 0
+	SESN_STATE_SCANNING                     = 1
+	SESN_STATE_CONNECTING                   = 2
+	SESN_STATE_CONNECTED                    = 3
+	SESN_STATE_EXCHANGING_MTU               = 4
+	SESN_STATE_EXCHANGED_MTU                = 5
+	SESN_STATE_DISCOVERING_SVC              = 6
+	SESN_STATE_DISCOVERED_SVC               = 7
+	SESN_STATE_DISCOVERING_CHR              = 8
+	SESN_STATE_DISCOVERED_CHR               = 9
+	SESN_STATE_TERMINATING                  = 10
+	SESN_STATE_CONN_CANCELLING              = 11
+)
+
+type BleRxNmpFn func(data []byte)
+type BleDisconnectFn func(peer BleDev, err error)
+
+type BleFsmParams struct {
+	Bx           *BleXport
+	OwnAddrType  BleAddrType
+	PeerSpec     sesn.BlePeerSpec
+	SvcUuid      BleUuid
+	ReqChrUuid   BleUuid
+	RspChrUuid   BleUuid
+	RxNmpCb      BleRxNmpFn
+	DisconnectCb BleDisconnectFn
+}
+
+type BleFsm struct {
+	bx           *BleXport
+	ownAddrType  BleAddrType
+	peerSpec     sesn.BlePeerSpec
+	peerDev      *BleDev
+	svcUuid      BleUuid
+	reqChrUuid   BleUuid
+	rspChrUuid   BleUuid
+	rxNmpCb      BleRxNmpFn
+	disconnectCb BleDisconnectFn
+
+	connHandle int
+	nmpSvc     *BleSvc
+	nmpReqChr  *BleChr
+	nmpRspChr  *BleChr
+	attMtu     int
+	connChan   chan error
+
+	mtx             sync.Mutex
+	lastStateChange time.Time
+
+	// These variables must be protected by the mutex.
+	bls   map[*BleListener]struct{}
+	state BleSesnState
+}
+
+func NewBleFsm(p BleFsmParams) *BleFsm {
+	bf := &BleFsm{
+		bx:           p.Bx,
+		peerSpec:     p.PeerSpec,
+		ownAddrType:  p.OwnAddrType,
+		svcUuid:      p.SvcUuid,
+		reqChrUuid:   p.ReqChrUuid,
+		rspChrUuid:   p.RspChrUuid,
+		rxNmpCb:      p.RxNmpCb,
+		disconnectCb: p.DisconnectCb,
+
+		bls:    map[*BleListener]struct{}{},
+		attMtu: DFLT_ATT_MTU,
+	}
+
+	return bf
+}
+
+func (bf *BleFsm) disconnectError(reason int) error {
+	str := fmt.Sprintf("BLE peer disconnected; "+
+		"reason=\"%s\" (%d) peer=%s handle=%d",
+		ErrCodeToString(reason), reason, bf.peerDev.String(), bf.connHandle)
+	return nmxutil.NewBleSesnDisconnectError(reason, str)
+}
+
+func (bf *BleFsm) closedError(msg string) error {
+	return nmxutil.NewSesnClosedError(fmt.Sprintf(
+		"%s; state=%d last-state-change=%s",
+		msg, bf.getState(), bf.lastStateChange))
+}
+
+func (bf *BleFsm) getState() BleSesnState {
+	bf.mtx.Lock()
+	defer bf.mtx.Unlock()
+
+	return bf.state
+}
+
+func (bf *BleFsm) setState(toState BleSesnState) {
+	bf.mtx.Lock()
+	defer bf.mtx.Unlock()
+
+	bf.state = toState
+	bf.lastStateChange = time.Now()
+}
+
+func (bf *BleFsm) transitionState(fromState BleSesnState,
+	toState BleSesnState) error {
+
+	bf.mtx.Lock()
+	defer bf.mtx.Unlock()
+
+	if bf.state != fromState {
+		return fmt.Errorf(
+			"Can't set BleFsm state to %d; current state != required "+
+				"value: %d",
+			toState, fromState)
+	}
+
+	bf.state = toState
+	return nil
+}
+
+func (bf *BleFsm) addBleListener(base BleMsgBase) (*BleListener, error) {
+	bl := NewBleListener()
+
+	bf.mtx.Lock()
+	bf.bls[bl] = struct{}{}
+	bf.mtx.Unlock()
+
+	if err := bf.bx.Bd.AddListener(base, bl); err != nil {
+		delete(bf.bls, bl)
+		return nil, err
+	}
+
+	return bl, nil
+}
+
+func (bf *BleFsm) addBleSeqListener(seq int) (*BleListener, error) {
+	base := BleMsgBase{
+		Op:         -1,
+		Type:       -1,
+		Seq:        seq,
+		ConnHandle: -1,
+	}
+	bl, err := bf.addBleListener(base)
+	if err != nil {
+		return nil, err
+	}
+
+	return bl, nil
+}
+
+func (bf *BleFsm) removeBleListener(base BleMsgBase) {
+	bl := bf.bx.Bd.RemoveListener(base)
+	if bl != nil {
+		bf.mtx.Lock()
+		delete(bf.bls, bl)
+		bf.mtx.Unlock()
+	}
+}
+
+func (bf *BleFsm) removeBleSeqListener(seq int) {
+	base := BleMsgBase{
+		Op:         -1,
+		Type:       -1,
+		Seq:        seq,
+		ConnHandle: -1,
+	}
+
+	bf.removeBleListener(base)
+}
+
+func (bf *BleFsm) action(
+	preState BleSesnState,
+	inState BleSesnState,
+	postState BleSesnState,
+	cb func() error) error {
+
+	if err := bf.transitionState(preState, inState); err != nil {
+		return err
+	}
+
+	if err := cb(); err != nil {
+		bf.setState(preState)
+		return err
+	}
+
+	bf.setState(postState)
+	return nil
+}
+
+func (bf *BleFsm) connectListen(seq int) error {
+	bf.connChan = make(chan error, 1)
+
+	bl, err := bf.addBleSeqListener(seq)
+	if err != nil {
+		return err
+	}
+
+	go func() {
+		defer bf.removeBleSeqListener(seq)
+		for {
+			select {
+			case <-bl.ErrChan:
+				return
+
+			case bm := <-bl.BleChan:
+				switch msg := bm.(type) {
+				case *BleConnectRsp:
+					bl.Acked = true
+					if msg.Status != 0 {
+						str := fmt.Sprintf("BLE connection attempt failed; "+
+							"status=%s (%d) peer=%s",
+							ErrCodeToString(msg.Status), msg.Status,
+							bf.peerDev.String())
+						log.Debugf(str)
+						bf.connChan <- nmxutil.NewBleHostError(msg.Status, str)
+						return
+					}
+
+				case *BleConnectEvt:
+					if msg.Status == 0 {
+						bl.Acked = true
+						log.Debugf("BLE connection attempt succeeded; "+
+							"peer=%d handle=%d", bf.peerDev.String(),
+							msg.ConnHandle)
+						bf.connHandle = msg.ConnHandle
+						if err := bf.nmpRspListen(); err != nil {
+							bf.connChan <- err
+							return
+						}
+						bf.connChan <- nil
+					} else {
+						str := fmt.Sprintf("BLE connection attempt failed; "+
+							"status=%s (%d) peer=%s",
+							ErrCodeToString(msg.Status), msg.Status,
+							bf.peerDev.String())
+						log.Debugf(str)
+						bf.connChan <- nmxutil.NewBleHostError(msg.Status, str)
+						return
+					}
+
+				case *BleMtuChangeEvt:
+					if msg.Status != 0 {
+						err := StatusError(MSG_OP_EVT,
+							MSG_TYPE_MTU_CHANGE_EVT,
+							msg.Status)
+						log.Debugf(err.Error())
+					} else {
+						log.Debugf("BLE ATT MTU updated; from=%d to=%d",
+							bf.attMtu, msg.Mtu)
+						bf.attMtu = msg.Mtu
+					}
+
+				case *BleDisconnectEvt:
+					err := bf.disconnectError(msg.Reason)
+					log.Debugf(err.Error())
+
+					bf.mtx.Lock()
+					bls := make([]*BleListener, 0, len(bf.bls))
+					for bl, _ := range bf.bls {
+						bls = append(bls, bl)
+					}
+					bf.mtx.Unlock()
+
+					for _, bl := range bls {
+						bl.ErrChan <- err
+					}
+
+					bf.setState(SESN_STATE_UNCONNECTED)
+					peer := *bf.peerDev
+					bf.peerDev = nil
+					bf.disconnectCb(peer, err)
+					return
+
+				default:
+				}
+
+			case <-bl.AfterTimeout(bf.bx.rspTimeout):
+				bf.connChan <- BhdTimeoutError(MSG_TYPE_CONNECT)
+			}
+		}
+	}()
+	return nil
+}
+
+func (bf *BleFsm) nmpRspListen() error {
+	base := BleMsgBase{
+		Op:         MSG_OP_EVT,
+		Type:       MSG_TYPE_NOTIFY_RX_EVT,
+		Seq:        -1,
+		ConnHandle: bf.connHandle,
+	}
+
+	bl, err := bf.addBleListener(base)
+	if err != nil {
+		return err
+	}
+
+	go func() {
+		defer bf.removeBleListener(base)
+		for {
+			select {
+			case <-bl.ErrChan:
+				// The session encountered an error; stop listening.
+				return
+			case bm := <-bl.BleChan:
+				switch msg := bm.(type) {
+				case *BleNotifyRxEvt:
+					if bf.nmpRspChr != nil &&
+						msg.AttrHandle == bf.nmpRspChr.ValHandle {
+
+						bf.rxNmpCb(msg.Data.Bytes)
+					}
+
+				default:
+				}
+			}
+		}
+	}()
+	return nil
+}
+
+func (bf *BleFsm) connect() error {
+	r := NewBleConnectReq()
+	r.OwnAddrType = bf.ownAddrType
+	r.PeerAddrType = bf.peerDev.AddrType
+	r.PeerAddr = bf.peerDev.Addr
+
+	if err := bf.connectListen(r.Seq); err != nil {
+		return err
+	}
+
+	if err := connect(bf.bx, bf.connChan, r); err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func (bf *BleFsm) scan() error {
+	r := NewBleScanReq()
+	r.OwnAddrType = bf.ownAddrType
+	r.DurationMs = 15000
+	r.FilterPolicy = BLE_SCAN_FILT_NO_WL
+	r.Limited = false
+	r.Passive = false
+	r.FilterDuplicates = true
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	abortChan := make(chan struct{}, 1)
+
+	// This function gets called for each incoming advertisement.
+	scanCb := func(evt *BleScanEvt) {
+		r := BleAdvReport{
+			EventType: evt.EventType,
+			Sender: BleDev{
+				AddrType: evt.AddrType,
+				Addr:     evt.Addr,
+			},
+			Rssi: evt.Rssi,
+			Data: evt.Data.Bytes,
+
+			Flags:          evt.DataFlags,
+			Name:           evt.DataName,
+			NameIsComplete: evt.DataNameIsComplete,
+		}
+
+		// Ask client if we should connect to this advertiser.
+		if bf.peerSpec.ScanPred(r) {
+			bf.peerDev = &r.Sender
+			abortChan <- struct{}{}
+		}
+	}
+
+	if err := scan(bf.bx, bl, r, abortChan, scanCb); err != nil {
+		return err
+	}
+
+	// Scanning still in progress; cancel the operation.
+	return bf.scanCancel()
+}
+
+func (bf *BleFsm) scanCancel() error {
+	r := NewBleScanCancelReq()
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	if err := scanCancel(bf.bx, bl, r); err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func (bf *BleFsm) terminateSetState() error {
+	bf.mtx.Lock()
+	defer bf.mtx.Unlock()
+
+	switch bf.state {
+	case SESN_STATE_UNCONNECTED,
+		SESN_STATE_CONNECTING,
+		SESN_STATE_CONN_CANCELLING:
+		return fmt.Errorf("BLE terminate failed; not connected")
+	case SESN_STATE_TERMINATING:
+		return fmt.Errorf(
+			"BLE terminate failed; session already being closed")
+	default:
+		bf.state = SESN_STATE_TERMINATING
+	}
+
+	return nil
+}
+
+func (bf *BleFsm) terminate() error {
+	if err := bf.terminateSetState(); err != nil {
+		return err
+	}
+
+	r := NewBleTerminateReq()
+	r.ConnHandle = bf.connHandle
+	r.HciReason = ERR_CODE_HCI_REM_USER_CONN_TERM
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	if err := terminate(bf.bx, bl, r); err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func (bf *BleFsm) connCancel() error {
+	if err := bf.transitionState(
+		SESN_STATE_CONNECTING,
+		SESN_STATE_CONN_CANCELLING); err != nil {
+
+		return fmt.Errorf("BLE connect cancel failed; not connecting")
+	}
+
+	r := NewBleConnCancelReq()
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	if err := connCancel(bf.bx, bl, r); err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func (bf *BleFsm) discSvcUuid() error {
+	r := NewBleDiscSvcUuidReq()
+	r.ConnHandle = bf.connHandle
+	r.Uuid = bf.svcUuid
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	bf.nmpSvc, err = discSvcUuid(bf.bx, bl, r)
+	if err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func (bf *BleFsm) discAllChrs() error {
+	r := NewBleDiscAllChrsReq()
+	r.ConnHandle = bf.connHandle
+	r.StartHandle = bf.nmpSvc.StartHandle
+	r.EndHandle = bf.nmpSvc.EndHandle
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	chrs, err := discAllChrs(bf.bx, bl, r)
+	if err != nil {
+		return err
+	}
+
+	for _, c := range chrs {
+		if CompareUuids(bf.reqChrUuid, c.Uuid) == 0 {
+			bf.nmpReqChr = c
+		}
+		if CompareUuids(bf.rspChrUuid, c.Uuid) == 0 {
+			bf.nmpRspChr = c
+		}
+	}
+
+	if bf.nmpReqChr == nil {
+		return fmt.Errorf(
+			"Peer doesn't support required characteristic: %s",
+			bf.reqChrUuid.String())
+	}
+
+	if bf.nmpRspChr == nil {
+		return fmt.Errorf(
+			"Peer doesn't support required characteristic: %s",
+			bf.rspChrUuid.String())
+	}
+
+	return nil
+}
+
+func (bf *BleFsm) exchangeMtu() error {
+	r := NewBleExchangeMtuReq()
+	r.ConnHandle = bf.connHandle
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	mtu, err := exchangeMtu(bf.bx, bl, r)
+	if err != nil {
+		return err
+	}
+
+	bf.attMtu = mtu
+	return nil
+}
+
+func (bf *BleFsm) writeCmd(data []byte) error {
+	r := NewBleWriteCmdReq()
+	r.ConnHandle = bf.connHandle
+	r.AttrHandle = bf.nmpReqChr.ValHandle
+	r.Data.Bytes = data
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	if err := writeCmd(bf.bx, bl, r); err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func (bf *BleFsm) subscribe() error {
+	r := NewBleWriteCmdReq()
+	r.ConnHandle = bf.connHandle
+	r.AttrHandle = bf.nmpRspChr.ValHandle + 1
+	r.Data.Bytes = []byte{1, 0}
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	if err := writeCmd(bf.bx, bl, r); err != nil {
+		return err
+	}
+
+	return nil
+}
+
+// Tries to populate the FSM's peerDev field.  This function succeeds if the
+// client specified the address of the peer to connect to.
+func (bf *BleFsm) tryFillPeerDev() bool {
+	// The peer spec contains one of:
+	//     * Peer address;
+	//     * Predicate function to call during scanning.
+	// If a peer address is specified, fill in the peer field now so the
+	// scanning step can be skipped.  Otherwise, the peer field gets populated
+	// during scanning.
+	if bf.peerSpec.ScanPred == nil {
+		bf.peerDev = &bf.peerSpec.Dev
+		return true
+	}
+
+	return false
+}
+
+func (bf *BleFsm) Start() error {
+	if bf.getState() != SESN_STATE_UNCONNECTED {
+		return nmxutil.NewSesnAlreadyOpenError(
+			"Attempt to open an already-open BLE session")
+	}
+
+	for {
+		state := bf.getState()
+		switch state {
+		case SESN_STATE_UNCONNECTED:
+			var err error
+
+			// Determine if we can immediately initiate a connection, or if we
+			// need to scan for a peer first.  If the client specified a peer
+			// address, or if we have already successfully scanned, we initiate
+			// a connection now.  Otherwise, we need to scan to determine which
+			// peer meets the specified scan criteria.
+			bf.tryFillPeerDev()
+			if bf.peerDev == nil {
+				// Peer not inferred yet.  Initiate scan.
+				cb := func() error { return bf.scan() }
+				err = bf.action(
+					SESN_STATE_UNCONNECTED,
+					SESN_STATE_SCANNING,
+					SESN_STATE_UNCONNECTED,
+					cb)
+			} else {
+				// We already know the address we want to connect to.  Initiate
+				// a connection.
+				cb := func() error { return bf.connect() }
+				err = bf.action(
+					SESN_STATE_UNCONNECTED,
+					SESN_STATE_CONNECTING,
+					SESN_STATE_CONNECTED,
+					cb)
+			}
+
+			if err != nil {
+				return err
+			}
+
+		case SESN_STATE_CONNECTED:
+			cb := func() error { return bf.exchangeMtu() }
+			err := bf.action(
+				SESN_STATE_CONNECTED,
+				SESN_STATE_EXCHANGING_MTU,
+				SESN_STATE_EXCHANGED_MTU,
+				cb)
+			if err != nil {
+				return err
+			}
+
+		case SESN_STATE_EXCHANGED_MTU:
+			cb := func() error { return bf.discSvcUuid() }
+			err := bf.action(
+				SESN_STATE_EXCHANGED_MTU,
+				SESN_STATE_DISCOVERING_SVC,
+				SESN_STATE_DISCOVERED_SVC,
+				cb)
+			if err != nil {
+				return err
+			}
+
+		case SESN_STATE_DISCOVERED_SVC:
+			cb := func() error {
+				return bf.discAllChrs()
+			}
+
+			err := bf.action(
+				SESN_STATE_DISCOVERED_SVC,
+				SESN_STATE_DISCOVERING_CHR,
+				SESN_STATE_DISCOVERED_CHR,
+				cb)
+			if err != nil {
+				return err
+			}
+
+			if err := bf.subscribe(); err != nil {
+				return err
+			}
+
+		case SESN_STATE_DISCOVERED_CHR:
+			/* Open complete. */
+			return nil
+
+		case SESN_STATE_CONNECTING,
+			SESN_STATE_DISCOVERING_SVC,
+			SESN_STATE_DISCOVERING_CHR,
+			SESN_STATE_TERMINATING:
+			return fmt.Errorf("BleFsm already being opened")
+		}
+	}
+}
+
+// @return bool                 true if stop complete;
+//                              false if disconnect is now pending.
+func (bf *BleFsm) Stop() (bool, error) {
+	state := bf.getState()
+
+	switch state {
+	case SESN_STATE_UNCONNECTED,
+		SESN_STATE_TERMINATING,
+		SESN_STATE_CONN_CANCELLING:
+
+		return false,
+			bf.closedError("Attempt to close an unopened BLE session")
+
+	case SESN_STATE_CONNECTING:
+		if err := bf.connCancel(); err != nil {
+			return false, err
+		}
+		return true, nil
+
+	default:
+		if err := bf.terminate(); err != nil {
+			return false, err
+		}
+		return false, nil
+	}
+}
+
+func (bf *BleFsm) IsOpen() bool {
+	return bf.getState() == SESN_STATE_DISCOVERED_CHR
+}
+
+func (bf *BleFsm) TxNmp(payload []byte, nl *nmp.NmpListener,
+	timeout time.Duration) (nmp.NmpRsp, error) {
+
+	log.Debugf("Tx NMP request: %s", hex.Dump(payload))
+	if err := bf.writeCmd(payload); err != nil {
+		return nil, err
+	}
+
+	// Now wait for NMP response.
+	for {
+		select {
+		case err := <-nl.ErrChan:
+			return nil, err
+		case rsp := <-nl.RspChan:
+			// Only accept NMP responses if the session is still open.  This is
+			// to help prevent race conditions in client code.
+			if bf.IsOpen() {
+				return rsp, nil
+			}
+		case <-nl.AfterTimeout(timeout):
+			return nil, nmxutil.NewNmpTimeoutError("NMP timeout")
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_oic_sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_oic_sesn.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_oic_sesn.go
new file mode 100644
index 0000000..365efc6
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmble/ble_oic_sesn.go
@@ -0,0 +1,198 @@
+package nmble
+
+import (
+	"fmt"
+	"sync"
+	"time"
+
+	. "mynewt.apache.org/newtmgr/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/omp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+	"mynewt.apache.org/newt/util"
+)
+
+type BleOicSesn struct {
+	bf           *BleFsm
+	nls          map[*nmp.NmpListener]struct{}
+	od           *omp.OmpDispatcher
+	closeTimeout time.Duration
+	onCloseCb    sesn.BleOnCloseFn
+
+	closeChan chan error
+	mx        sync.Mutex
+}
+
+func NewBleOicSesn(bx *BleXport, cfg sesn.SesnCfg) *BleOicSesn {
+	bos := &BleOicSesn{
+		nls:          map[*nmp.NmpListener]struct{}{},
+		od:           omp.NewOmpDispatcher(),
+		closeTimeout: cfg.Ble.CloseTimeout,
+		onCloseCb:    cfg.Ble.OnCloseCb,
+	}
+
+	svcUuid, err := ParseUuid(NmpOicSvcUuid)
+	if err != nil {
+		panic(err.Error())
+	}
+
+	reqChrUuid, err := ParseUuid(NmpOicReqChrUuid)
+	if err != nil {
+		panic(err.Error())
+	}
+
+	rspChrUuid, err := ParseUuid(NmpOicRspChrUuid)
+	if err != nil {
+		panic(err.Error())
+	}
+
+	bos.bf = NewBleFsm(BleFsmParams{
+		Bx:           bx,
+		OwnAddrType:  cfg.Ble.OwnAddrType,
+		PeerSpec:     cfg.Ble.PeerSpec,
+		SvcUuid:      svcUuid,
+		ReqChrUuid:   reqChrUuid,
+		RspChrUuid:   rspChrUuid,
+		RxNmpCb:      func(d []byte) { bos.onRxNmp(d) },
+		DisconnectCb: func(p BleDev, e error) { bos.onDisconnect(p, e) },
+	})
+
+	return bos
+}
+
+func (bos *BleOicSesn) addNmpListener(seq uint8) (*nmp.NmpListener, error) {
+	nl := nmp.NewNmpListener()
+	bos.nls[nl] = struct{}{}
+
+	if err := bos.od.AddListener(seq, nl); err != nil {
+		delete(bos.nls, nl)
+		return nil, err
+	}
+
+	return nl, nil
+}
+
+func (bos *BleOicSesn) removeNmpListener(seq uint8) {
+	listener := bos.od.RemoveListener(seq)
+	if listener != nil {
+		delete(bos.nls, listener)
+	}
+}
+
+// Returns true if a new channel was assigned.
+func (bos *BleOicSesn) setCloseChan() bool {
+	bos.mx.Lock()
+	defer bos.mx.Unlock()
+
+	if bos.closeChan != nil {
+		return false
+	}
+
+	bos.closeChan = make(chan error, 1)
+	return true
+}
+
+func (bos *BleOicSesn) clearCloseChan() {
+	bos.mx.Lock()
+	defer bos.mx.Unlock()
+
+	bos.closeChan = nil
+}
+
+func (bos *BleOicSesn) AbortRx(seq uint8) error {
+	return bos.od.FakeRxError(seq, fmt.Errorf("Rx aborted"))
+}
+
+func (bos *BleOicSesn) Open() error {
+	return bos.bf.Start()
+}
+
+func (bos *BleOicSesn) Close() error {
+	if !bos.setCloseChan() {
+		return bos.bf.closedError(
+			"Attempt to close an unopened BLE session")
+	}
+	defer bos.clearCloseChan()
+
+	done, err := bos.bf.Stop()
+	if err != nil {
+		return err
+	}
+
+	if done {
+		// Close complete.
+		return nil
+	}
+
+	// Block until close completes or timeout.
+	select {
+	case <-bos.closeChan:
+	case <-time.After(bos.closeTimeout):
+	}
+
+	return nil
+}
+
+func (bos *BleOicSesn) IsOpen() bool {
+	return bos.bf.IsOpen()
+}
+
+func (bos *BleOicSesn) onRxNmp(data []byte) {
+	bos.od.Dispatch(data)
+}
+
+func (bos *BleOicSesn) onDisconnect(peer BleDev, err error) {
+	for nl, _ := range bos.nls {
+		nl.ErrChan <- err
+	}
+
+	// If the session is being closed, unblock the close() call.
+	if bos.closeChan != nil {
+		bos.closeChan <- err
+	}
+	if bos.onCloseCb != nil {
+		bos.onCloseCb(bos, peer, err)
+	}
+}
+
+func (bos *BleOicSesn) EncodeNmpMsg(m *nmp.NmpMsg) ([]byte, error) {
+	return omp.EncodeOmpTcp(m)
+}
+
+// Blocking.
+func (bos *BleOicSesn) TxNmpOnce(m *nmp.NmpMsg, opt sesn.TxOptions) (
+	nmp.NmpRsp, error) {
+
+	if !bos.IsOpen() {
+		return nil, bos.bf.closedError(
+			"Attempt to transmit over closed BLE session")
+	}
+
+	nl, err := bos.addNmpListener(m.Hdr.Seq)
+	if err != nil {
+		return nil, err
+	}
+	defer bos.removeNmpListener(m.Hdr.Seq)
+
+	b, err := bos.EncodeNmpMsg(m)
+	if err != nil {
+		return nil, err
+	}
+
+	return bos.bf.TxNmp(b, nl, opt.Timeout)
+}
+
+func (bos *BleOicSesn) MtuIn() int {
+	return bos.bf.attMtu -
+		NOTIFY_CMD_BASE_SZ -
+		omp.OMP_MSG_OVERHEAD -
+		nmp.NMP_HDR_SIZE
+}
+
+func (bos *BleOicSesn) MtuOut() int {
+	mtu := bos.bf.attMtu -
+		WRITE_CMD_BASE_SZ -
+		omp.OMP_MSG_OVERHEAD -
+		nmp.NMP_HDR_SIZE
+	return util.IntMin(mtu, BLE_ATT_ATTR_MAX_LEN)
+}


[63/67] [abbrv] incubator-mynewt-newtmgr git commit: newtmgr - use newtmgr repo, not newt repo.

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/nmp.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/nmp.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/nmp.go
new file mode 100644
index 0000000..bb35743
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/nmp.go
@@ -0,0 +1,165 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import (
+	"encoding/binary"
+	"encoding/hex"
+	"fmt"
+
+	log "github.com/Sirupsen/logrus"
+	"github.com/ugorji/go/codec"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+	"mynewt.apache.org/newt/util"
+)
+
+const NMP_HDR_SIZE = 8
+
+type NmpHdr struct {
+	Op    uint8 /* 3 bits of opcode */
+	Flags uint8
+	Len   uint16
+	Group uint16
+	Seq   uint8
+	Id    uint8
+}
+
+type NmpMsg struct {
+	Hdr  NmpHdr
+	Body interface{}
+}
+
+// Combine req + rsp.
+type NmpReq interface {
+	Hdr() *NmpHdr
+	SetHdr(hdr *NmpHdr)
+
+	Msg() *NmpMsg
+}
+
+type NmpRsp interface {
+	Hdr() *NmpHdr
+	SetHdr(msg *NmpHdr)
+
+	Msg() *NmpMsg
+}
+
+type NmpBase struct {
+	hdr NmpHdr `codec:"-"`
+}
+
+func (b *NmpBase) Hdr() *NmpHdr {
+	return &b.hdr
+}
+
+func (b *NmpBase) SetHdr(h *NmpHdr) {
+	b.hdr = *h
+}
+
+func MsgFromReq(r NmpReq) *NmpMsg {
+	return &NmpMsg{
+		*r.Hdr(),
+		r,
+	}
+}
+
+func NewNmpMsg() *NmpMsg {
+	return &NmpMsg{}
+}
+
+func DecodeNmpHdr(data []byte) (*NmpHdr, error) {
+	if len(data) < NMP_HDR_SIZE {
+		return nil, util.NewNewtError(fmt.Sprintf(
+			"Newtmgr request buffer too small %d bytes", len(data)))
+	}
+
+	hdr := &NmpHdr{}
+
+	hdr.Op = uint8(data[0])
+	hdr.Flags = uint8(data[1])
+	hdr.Len = binary.BigEndian.Uint16(data[2:4])
+	hdr.Group = binary.BigEndian.Uint16(data[4:6])
+	hdr.Seq = uint8(data[6])
+	hdr.Id = uint8(data[7])
+
+	return hdr, nil
+}
+
+func (hdr *NmpHdr) Bytes() []byte {
+	buf := make([]byte, 0, NMP_HDR_SIZE)
+
+	buf = append(buf, byte(hdr.Op))
+	buf = append(buf, byte(hdr.Flags))
+
+	u16b := make([]byte, 2)
+	binary.BigEndian.PutUint16(u16b, hdr.Len)
+	buf = append(buf, u16b...)
+
+	binary.BigEndian.PutUint16(u16b, hdr.Group)
+	buf = append(buf, u16b...)
+
+	buf = append(buf, byte(hdr.Seq))
+	buf = append(buf, byte(hdr.Id))
+
+	return buf
+}
+
+func BodyBytes(body interface{}) ([]byte, error) {
+	data := make([]byte, 0)
+
+	enc := codec.NewEncoderBytes(&data, new(codec.CborHandle))
+	if err := enc.Encode(body); err != nil {
+		return nil, fmt.Errorf("Failed to encode message %s", err.Error())
+	}
+
+	log.Debugf("Encoded %+v to:\n%s", body, hex.Dump(data))
+
+	return data, nil
+}
+
+func EncodeNmpPlain(nmr *NmpMsg) ([]byte, error) {
+	bb, err := BodyBytes(nmr.Body)
+	if err != nil {
+		return nil, err
+	}
+
+	nmr.Hdr.Len = uint16(len(bb))
+
+	hb := nmr.Hdr.Bytes()
+	data := append(hb, bb...)
+
+	log.Debugf("Encoded:\n%s", hex.Dump(data))
+
+	return data, nil
+}
+
+func fillNmpReq(req NmpReq, op uint8, group uint16, id uint8) {
+	hdr := NmpHdr{
+		Op:    op,
+		Flags: 0,
+		Len:   0,
+		Group: group,
+		Seq:   nmxutil.NextNmpSeq(),
+		Id:    id,
+	}
+
+	req.SetHdr(&hdr)
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/reset.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/reset.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/reset.go
new file mode 100644
index 0000000..9b8cbad
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/reset.go
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+type ResetReq struct {
+	NmpBase
+}
+
+type ResetRsp struct {
+	NmpBase
+}
+
+func NewResetReq() *ResetReq {
+	r := &ResetReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_DEFAULT, NMP_ID_DEF_RESET)
+	return r
+}
+
+func (r *ResetReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewResetRsp() *ResetRsp {
+	return &ResetRsp{}
+}
+
+func (r *ResetRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/run.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/run.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/run.go
new file mode 100644
index 0000000..3672b0f
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/run.go
@@ -0,0 +1,79 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+//////////////////////////////////////////////////////////////////////////////
+// $test                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type RunTestReq struct {
+	NmpBase
+	Testname string `codec:"testname"`
+	Token    string `codec:"token"`
+}
+
+type RunTestRsp struct {
+	NmpBase
+	Rc int `codec:"rc" codec:",omitempty"`
+}
+
+func NewRunTestReq() *RunTestReq {
+	r := &RunTestReq{}
+	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_RUN, NMP_ID_RUN_TEST)
+	return r
+}
+
+func (r *RunTestReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewRunTestRsp() *RunTestRsp {
+	return &RunTestRsp{}
+}
+
+func (r *RunTestRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $list                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type RunListReq struct {
+	NmpBase
+}
+
+type RunListRsp struct {
+	NmpBase
+	Rc   int      `codec:"rc" codec:",omitempty"`
+	List []string `codec:"run_list"`
+}
+
+func NewRunListReq() *RunListReq {
+	r := &RunListReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_RUN, NMP_ID_RUN_LIST)
+	return r
+}
+
+func (r *RunListReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewRunListRsp() *RunListRsp {
+	return &RunListRsp{}
+}
+
+func (r *RunListRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/stat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/stat.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/stat.go
new file mode 100644
index 0000000..2839c02
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/stat.go
@@ -0,0 +1,81 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+//////////////////////////////////////////////////////////////////////////////
+// $read                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type StatReadReq struct {
+	NmpBase
+	Name string `codec:"name"`
+}
+
+type StatReadRsp struct {
+	NmpBase
+	Rc     int                    `codec:"rc"`
+	Name   string                 `codec:"name"`
+	Group  string                 `codec:"group"`
+	Fields map[string]interface{} `codec:"fields"`
+}
+
+func NewStatReadReq() *StatReadReq {
+	r := &StatReadReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_STAT, NMP_ID_STAT_READ)
+	return r
+}
+
+func (r *StatReadReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewStatReadRsp() *StatReadRsp {
+	return &StatReadRsp{}
+}
+
+func (r *StatReadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
+
+//////////////////////////////////////////////////////////////////////////////
+// $list                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type StatListReq struct {
+	NmpBase
+}
+
+type StatListRsp struct {
+	NmpBase
+	Rc   int      `codec:"rc"`
+	List []string `codec:"stat_list"`
+}
+
+func NewStatListReq() *StatListReq {
+	r := &StatListReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_STAT, NMP_ID_STAT_LIST)
+	return r
+}
+
+func (r *StatListReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewStatListRsp() *StatListRsp {
+	return &StatListRsp{}
+}
+
+func (r *StatListRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/taskstat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/taskstat.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/taskstat.go
new file mode 100644
index 0000000..6dda49d
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmp/taskstat.go
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package nmp
+
+import ()
+
+type TaskStatReq struct {
+	NmpBase
+}
+
+type TaskStatRsp struct {
+	NmpBase
+	Rc    int                       `codec:"rc" codec:",omitempty"`
+	Tasks map[string]map[string]int `codec:"tasks"`
+}
+
+func NewTaskStatReq() *TaskStatReq {
+	r := &TaskStatReq{}
+	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_DEFAULT, NMP_ID_DEF_TASKSTAT)
+	return r
+}
+
+func (r *TaskStatReq) Msg() *NmpMsg { return MsgFromReq(r) }
+
+func NewTaskStatRsp() *TaskStatRsp {
+	return &TaskStatRsp{}
+}
+
+func (r *TaskStatRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/packet.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/packet.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/packet.go
new file mode 100644
index 0000000..e25bc2e
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/packet.go
@@ -0,0 +1,40 @@
+package nmserial
+
+import (
+	"bytes"
+)
+
+type Packet struct {
+	expectedLen uint16
+	buffer      *bytes.Buffer
+}
+
+func NewPacket(expectedLen uint16) (*Packet, error) {
+	pkt := &Packet{
+		expectedLen: expectedLen,
+		buffer:      bytes.NewBuffer([]byte{}),
+	}
+
+	return pkt, nil
+}
+
+func (pkt *Packet) AddBytes(bytes []byte) bool {
+	pkt.buffer.Write(bytes)
+	if pkt.buffer.Len() >= int(pkt.expectedLen) {
+		return true
+	} else {
+		return false
+	}
+}
+
+func (pkt *Packet) GetBytes() []byte {
+	return pkt.buffer.Bytes()
+}
+
+func (pkt *Packet) TrimEnd(count int) {
+
+	if pkt.buffer.Len() < count {
+		count = pkt.buffer.Len()
+	}
+	pkt.buffer.Truncate(pkt.buffer.Len() - count)
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_plain_sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_plain_sesn.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_plain_sesn.go
new file mode 100644
index 0000000..fe7173e
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_plain_sesn.go
@@ -0,0 +1,137 @@
+package nmserial
+
+import (
+	"fmt"
+	"sync"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+type SerialPlainSesn struct {
+	sx     *SerialXport
+	nd     *nmp.NmpDispatcher
+	isOpen bool
+
+	// This mutex ensures:
+	//     * each response get matched up with its corresponding request.
+	//     * accesses to isOpen are protected.
+	m sync.Mutex
+}
+
+func NewSerialPlainSesn(sx *SerialXport) *SerialPlainSesn {
+	return &SerialPlainSesn{
+		sx: sx,
+		nd: nmp.NewNmpDispatcher(),
+	}
+}
+
+func (sps *SerialPlainSesn) Open() error {
+	sps.m.Lock()
+	defer sps.m.Unlock()
+
+	if sps.isOpen {
+		return nmxutil.NewSesnAlreadyOpenError(
+			"Attempt to open an already-open serial session")
+	}
+
+	sps.isOpen = true
+	return nil
+}
+
+func (sps *SerialPlainSesn) Close() error {
+	sps.m.Lock()
+	defer sps.m.Unlock()
+
+	if !sps.isOpen {
+		return nmxutil.NewSesnClosedError(
+			"Attempt to close an unopened serial session")
+	}
+	sps.isOpen = false
+	return nil
+}
+
+func (sps *SerialPlainSesn) IsOpen() bool {
+	sps.m.Lock()
+	defer sps.m.Unlock()
+
+	return sps.isOpen
+}
+
+func (sps *SerialPlainSesn) MtuIn() int {
+	return 1024
+}
+
+func (sps *SerialPlainSesn) MtuOut() int {
+	// Mynewt commands have a default chunk buffer size of 512.  Account for
+	// base64 encoding.
+	return 512 * 3 / 4
+}
+
+func (sps *SerialPlainSesn) AbortRx(seq uint8) error {
+	return sps.nd.FakeRxError(seq, fmt.Errorf("Rx aborted"))
+}
+
+func (sps *SerialPlainSesn) addNmpListener(seq uint8) (
+	*nmp.NmpListener, error) {
+
+	nl := nmp.NewNmpListener()
+	if err := sps.nd.AddListener(seq, nl); err != nil {
+		return nil, err
+	}
+
+	return nl, nil
+}
+
+func (sps *SerialPlainSesn) removeNmpListener(seq uint8) {
+	sps.nd.RemoveListener(seq)
+}
+
+func (sps *SerialPlainSesn) EncodeNmpMsg(m *nmp.NmpMsg) ([]byte, error) {
+	return nmp.EncodeNmpPlain(m)
+}
+
+func (sps *SerialPlainSesn) TxNmpOnce(m *nmp.NmpMsg, opt sesn.TxOptions) (
+	nmp.NmpRsp, error) {
+
+	sps.m.Lock()
+	defer sps.m.Unlock()
+
+	if !sps.isOpen {
+		return nil, nmxutil.NewSesnClosedError(
+			"Attempt to transmit over closed serial session")
+	}
+
+	nl, err := sps.addNmpListener(m.Hdr.Seq)
+	if err != nil {
+		return nil, err
+	}
+	defer sps.removeNmpListener(m.Hdr.Seq)
+
+	reqb, err := sps.EncodeNmpMsg(m)
+	if err != nil {
+		return nil, err
+	}
+
+	if err := sps.sx.Tx(reqb); err != nil {
+		return nil, err
+	}
+
+	for {
+		rspb, err := sps.sx.Rx()
+		if err != nil {
+			return nil, err
+		}
+
+		// Now wait for newtmgr response.
+		if sps.nd.Dispatch(rspb) {
+			select {
+			case err := <-nl.ErrChan:
+				return nil, err
+			case rsp := <-nl.RspChan:
+				return rsp, nil
+			}
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_xport.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_xport.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_xport.go
new file mode 100644
index 0000000..7dbb5ca
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmserial/serial_xport.go
@@ -0,0 +1,217 @@
+package nmserial
+
+import (
+	"bufio"
+	"encoding/base64"
+	"encoding/binary"
+	"encoding/hex"
+	"fmt"
+	"time"
+
+	log "github.com/Sirupsen/logrus"
+	"github.com/joaojeronimo/go-crc16"
+	"github.com/tarm/serial"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+	"mynewt.apache.org/newt/util"
+)
+
+type XportCfg struct {
+	DevPath     string
+	Baud        int
+	ReadTimeout time.Duration
+}
+
+func NewXportCfg() *XportCfg {
+	return &XportCfg{
+		ReadTimeout: 10 * time.Second,
+	}
+}
+
+type SerialXport struct {
+	cfg     *XportCfg
+	port    *serial.Port
+	scanner *bufio.Scanner
+
+	pkt *Packet
+}
+
+func NewSerialXport(cfg *XportCfg) *SerialXport {
+	return &SerialXport{
+		cfg: cfg,
+	}
+}
+
+func (sx *SerialXport) BuildSesn(cfg sesn.SesnCfg) (sesn.Sesn, error) {
+	switch cfg.MgmtProto {
+	case sesn.MGMT_PROTO_NMP:
+		return NewSerialPlainSesn(sx), nil
+	case sesn.MGMT_PROTO_OMP:
+		return nil, fmt.Errorf("OMP over serial currently unsupported")
+	default:
+		return nil, fmt.Errorf(
+			"Invalid management protocol: %d; expected NMP or OMP",
+			cfg.MgmtProto)
+	}
+}
+
+func (sx *SerialXport) Start() error {
+	c := &serial.Config{
+		Name:        sx.cfg.DevPath,
+		Baud:        sx.cfg.Baud,
+		ReadTimeout: sx.cfg.ReadTimeout,
+	}
+
+	var err error
+	sx.port, err = serial.OpenPort(c)
+	if err != nil {
+		return err
+	}
+
+	// Most of the reading will be done line by line, use the
+	// bufio.Scanner to do this
+	sx.scanner = bufio.NewScanner(sx.port)
+
+	return nil
+}
+
+func (sx *SerialXport) Stop() error {
+	return sx.port.Close()
+}
+
+func (sx *SerialXport) txRaw(bytes []byte) error {
+	log.Debugf("Tx serial\n%s", hex.Dump(bytes))
+
+	_, err := sx.port.Write(bytes)
+	if err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func (sx *SerialXport) Tx(bytes []byte) error {
+	log.Debugf("Base64 encoding request:\n%s", hex.Dump(bytes))
+
+	pktData := make([]byte, 2)
+
+	crc := crc16.Crc16(bytes)
+	binary.BigEndian.PutUint16(pktData, crc)
+	bytes = append(bytes, pktData...)
+
+	dLen := uint16(len(bytes))
+	binary.BigEndian.PutUint16(pktData, dLen)
+	pktData = append(pktData, bytes...)
+
+	base64Data := make([]byte, base64.StdEncoding.EncodedLen(len(pktData)))
+
+	base64.StdEncoding.Encode(base64Data, pktData)
+
+	written := 0
+	totlen := len(base64Data)
+
+	for written < totlen {
+		/* write the packet stat designators. They are
+		 * different whether we are starting a new packet or continuing one */
+		if written == 0 {
+			sx.txRaw([]byte{6, 9})
+		} else {
+			/* slower platforms take some time to process each segment
+			 * and have very small receive buffers.  Give them a bit of
+			 * time here */
+			time.Sleep(20 * time.Millisecond)
+			sx.txRaw([]byte{4, 20})
+		}
+
+		/* ensure that the total frame fits into 128 bytes.
+		 * base 64 is 3 ascii to 4 base 64 byte encoding.  so
+		 * the number below should be a multiple of 4.  Also,
+		 * we need to save room for the header (2 byte) and
+		 * carriage return (and possibly LF 2 bytes), */
+
+		/* all totaled, 124 bytes should work */
+		writeLen := util.Min(124, totlen-written)
+
+		writeBytes := base64Data[written : written+writeLen]
+		sx.txRaw(writeBytes)
+		sx.txRaw([]byte{'\n'})
+
+		written += writeLen
+	}
+
+	return nil
+}
+
+// Blocking receive.
+func (sx *SerialXport) Rx() ([]byte, error) {
+	for sx.scanner.Scan() {
+		line := []byte(sx.scanner.Text())
+
+		for {
+			if len(line) > 1 && line[0] == '\r' {
+				line = line[1:]
+			} else {
+				break
+			}
+		}
+		log.Debugf("Rx serial:\n%s", hex.Dump(line))
+		if len(line) < 2 || ((line[0] != 4 || line[1] != 20) &&
+			(line[0] != 6 || line[1] != 9)) {
+			continue
+		}
+
+		base64Data := string(line[2:])
+
+		data, err := base64.StdEncoding.DecodeString(base64Data)
+		if err != nil {
+			return nil, fmt.Errorf("Couldn't decode base64 string:"+
+				" %s\nPacket hex dump:\n%s",
+				base64Data, hex.Dump(line))
+		}
+
+		if line[0] == 6 && line[1] == 9 {
+			if len(data) < 2 {
+				continue
+			}
+
+			pktLen := binary.BigEndian.Uint16(data[0:2])
+			sx.pkt, err = NewPacket(pktLen)
+			if err != nil {
+				return nil, err
+			}
+			data = data[2:]
+		}
+
+		if sx.pkt == nil {
+			continue
+		}
+
+		full := sx.pkt.AddBytes(data)
+		if full {
+			if crc16.Crc16(sx.pkt.GetBytes()) != 0 {
+				return nil, fmt.Errorf("CRC error")
+			}
+
+			/*
+			 * Trim away the 2 bytes of CRC
+			 */
+			sx.pkt.TrimEnd(2)
+			b := sx.pkt.GetBytes()
+			sx.pkt = nil
+
+			log.Debugf("Decoded input:\n%s", hex.Dump(b))
+			return b, nil
+		}
+	}
+
+	err := sx.scanner.Err()
+	if err == nil {
+		// Scanner hit EOF, so we'll need to create a new one.  This only
+		// happens on timeouts.
+		err = nmxutil.NewXportTimeoutError(
+			"Timeout reading from serial connection")
+		sx.scanner = bufio.NewScanner(sx.port)
+	}
+	return nil, err
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmxutil/nmxerr.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmxutil/nmxerr.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmxutil/nmxerr.go
new file mode 100644
index 0000000..aa9da23
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmxutil/nmxerr.go
@@ -0,0 +1,160 @@
+package nmxutil
+
+import (
+	"fmt"
+)
+
+// Represents an NMP timeout; request sent, but no response received.
+type NmpTimeoutError struct {
+	Text string
+}
+
+func NewNmpTimeoutError(text string) *NmpTimeoutError {
+	return &NmpTimeoutError{
+		Text: text,
+	}
+}
+
+func FmtNmpTimeoutError(format string, args ...interface{}) *NmpTimeoutError {
+	return NewNmpTimeoutError(fmt.Sprintf(format, args...))
+}
+
+func (e *NmpTimeoutError) Error() string {
+	return e.Text
+}
+
+func IsNmpTimeout(err error) bool {
+	_, ok := err.(*NmpTimeoutError)
+	return ok
+}
+
+type BleSesnDisconnectError struct {
+	Text   string
+	Reason int
+}
+
+func NewBleSesnDisconnectError(reason int,
+	text string) *BleSesnDisconnectError {
+
+	return &BleSesnDisconnectError{
+		Reason: reason,
+		Text:   text,
+	}
+}
+
+func (e *BleSesnDisconnectError) Error() string {
+	return e.Text
+}
+
+func IsBleSesnDisconnect(err error) bool {
+	_, ok := err.(*BleSesnDisconnectError)
+	return ok
+}
+
+type SesnAlreadyOpenError struct {
+	Text string
+}
+
+func NewSesnAlreadyOpenError(text string) *SesnAlreadyOpenError {
+	return &SesnAlreadyOpenError{
+		Text: text,
+	}
+}
+
+func (e *SesnAlreadyOpenError) Error() string {
+	return e.Text
+}
+
+func IsSesnAlreadyOpen(err error) bool {
+	_, ok := err.(*SesnAlreadyOpenError)
+	return ok
+}
+
+type SesnClosedError struct {
+	Text string
+}
+
+func NewSesnClosedError(text string) *SesnClosedError {
+	return &SesnClosedError{
+		Text: text,
+	}
+}
+
+func (e *SesnClosedError) Error() string {
+	return e.Text
+}
+
+func IsSesnClosed(err error) bool {
+	_, ok := err.(*SesnClosedError)
+	return ok
+}
+
+// Represents a low-level transport error.
+type XportError struct {
+	Text string
+}
+
+func NewXportError(text string) *XportError {
+	return &XportError{text}
+}
+
+func (e *XportError) Error() string {
+	return e.Text
+}
+
+func IsXport(err error) bool {
+	_, ok := err.(*XportError)
+	return ok
+}
+
+type XportTimeoutError struct {
+	Text string
+}
+
+func NewXportTimeoutError(text string) *XportTimeoutError {
+	return &XportTimeoutError{text}
+}
+
+func (e *XportTimeoutError) Error() string {
+	return e.Text
+}
+
+func IsXportTimeout(err error) bool {
+	_, ok := err.(*XportTimeoutError)
+	return ok
+}
+
+type BleHostError struct {
+	Text   string
+	Status int
+}
+
+func NewBleHostError(status int, text string) *BleHostError {
+	return &BleHostError{
+		Status: status,
+		Text:   text,
+	}
+}
+
+func FmtBleHostError(status int, format string,
+	args ...interface{}) *BleHostError {
+
+	return NewBleHostError(status, fmt.Sprintf(format, args...))
+}
+
+func (e *BleHostError) Error() string {
+	return e.Text
+}
+
+func IsBleHost(err error) bool {
+	_, ok := err.(*BleHostError)
+	return ok
+}
+
+func ToBleHost(err error) *BleHostError {
+	if berr, ok := err.(*BleHostError); ok {
+		return berr
+	} else {
+		return nil
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmxutil/nmxutil.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmxutil/nmxutil.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmxutil/nmxutil.go
new file mode 100644
index 0000000..ef1ecd4
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/nmxutil/nmxutil.go
@@ -0,0 +1,25 @@
+package nmxutil
+
+import (
+	"math/rand"
+	"sync"
+)
+
+var nextNmpSeq uint8
+var beenRead bool
+var seqMutex sync.Mutex
+
+func NextNmpSeq() uint8 {
+	seqMutex.Lock()
+	defer seqMutex.Unlock()
+
+	if !beenRead {
+		nextNmpSeq = uint8(rand.Uint32())
+		beenRead = true
+	}
+
+	val := nextNmpSeq
+	nextNmpSeq++
+
+	return val
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/dispatch.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/dispatch.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/dispatch.go
new file mode 100644
index 0000000..44d1022
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/dispatch.go
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package omp
+
+import (
+	log "github.com/Sirupsen/logrus"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+)
+
+type OmpDispatcher struct {
+	nd          *nmp.NmpDispatcher
+	reassembler *Reassembler
+}
+
+func NewOmpDispatcher() *OmpDispatcher {
+	return &OmpDispatcher{
+		nd:          nmp.NewNmpDispatcher(),
+		reassembler: NewReassembler(),
+	}
+}
+
+func (od *OmpDispatcher) AddListener(seq uint8, rl *nmp.NmpListener) error {
+	return od.nd.AddListener(seq, rl)
+}
+
+func (od *OmpDispatcher) RemoveListener(seq uint8) *nmp.NmpListener {
+	return od.nd.RemoveListener(seq)
+}
+
+func (od *OmpDispatcher) FakeRxError(seq uint8, err error) error {
+	return od.nd.FakeRxError(seq, err)
+}
+
+// Returns true if the response was dispatched.
+func (om *OmpDispatcher) Dispatch(data []byte) bool {
+	tm := om.reassembler.RxFrag(data)
+	if tm == nil {
+		return false
+	}
+
+	r, err := DecodeOmpTcp(tm)
+	if err != nil {
+		log.Printf("OMP decode failure: %s", err.Error())
+		return false
+	}
+
+	return om.nd.DispatchRsp(r)
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/frag.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/frag.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/frag.go
new file mode 100644
index 0000000..caf7f48
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/frag.go
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package omp
+
+import (
+	log "github.com/Sirupsen/logrus"
+	"github.com/runtimeco/go-coap"
+)
+
+type Reassembler struct {
+	cur []byte
+}
+
+func NewReassembler() *Reassembler {
+	return &Reassembler{}
+}
+
+func (r *Reassembler) RxFrag(frag []byte) *coap.TcpMessage {
+	r.cur = append(r.cur, frag...)
+
+	var tm *coap.TcpMessage
+	var err error
+	tm, r.cur, err = coap.PullTcp(r.cur)
+	if err != nil {
+		log.Debugf("received invalid CoAP-TCP packet: %s", err.Error())
+		return nil
+	}
+
+	return tm
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/omp.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/omp.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/omp.go
new file mode 100644
index 0000000..77dbd1b
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/omp/omp.go
@@ -0,0 +1,125 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package omp
+
+import (
+	"encoding/hex"
+	"fmt"
+
+	log "github.com/Sirupsen/logrus"
+	"github.com/fatih/structs"
+	"github.com/runtimeco/go-coap"
+	"github.com/ugorji/go/codec"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+)
+
+// OIC wrapping adds this many bytes to an NMP message.
+const OMP_MSG_OVERHEAD = 13
+
+type OicMsg struct {
+	Hdr []byte `codec:"_h"`
+}
+
+/*
+ * Not able to install custom decoder for indefite length objects with the
+ * codec.  So we need to decode the whole response, and then re-encode the
+ * newtmgr response part.
+ */
+func DecodeOmpTcp(tm *coap.TcpMessage) (nmp.NmpRsp, error) {
+	// Ignore non-responses.
+	if tm.Code == coap.GET || tm.Code == coap.PUT {
+		return nil, nil
+	}
+
+	if tm.Code != coap.Created && tm.Code != coap.Deleted &&
+		tm.Code != coap.Valid && tm.Code != coap.Changed &&
+		tm.Code != coap.Content {
+		return nil, fmt.Errorf(
+			"OMP response specifies unexpected code: %d (%s)", int(tm.Code),
+			tm.Code.String())
+	}
+
+	var om OicMsg
+	err := codec.NewDecoderBytes(tm.Payload, new(codec.CborHandle)).Decode(&om)
+	if err != nil {
+		return nil, fmt.Errorf("Invalid incoming cbor: %s", err.Error())
+	}
+	if om.Hdr == nil {
+		return nil, fmt.Errorf("Invalid incoming OMP response; NMP header" +
+			"missing")
+	}
+
+	hdr, err := nmp.DecodeNmpHdr(om.Hdr)
+	if err != nil {
+		return nil, err
+	}
+
+	rsp, err := nmp.DecodeRspBody(hdr, tm.Payload)
+	if err != nil {
+		return nil, fmt.Errorf("Error decoding OMP response: %s", err.Error())
+	}
+	if rsp == nil {
+		return nil, nil
+	}
+
+	return rsp, nil
+}
+
+func EncodeOmpTcp(nmr *nmp.NmpMsg) ([]byte, error) {
+	req := coap.TcpMessage{
+		Message: coap.Message{
+			Type: coap.Confirmable,
+			Code: coap.PUT,
+		},
+	}
+	req.SetPathString("/omgr")
+
+	payload := []byte{}
+	enc := codec.NewEncoderBytes(&payload, new(codec.CborHandle))
+
+	fields := structs.Fields(nmr.Body)
+	m := make(map[string]interface{}, len(fields))
+	for _, f := range fields {
+		if cname := f.Tag("codec"); cname != "" {
+			m[cname] = f.Value()
+		}
+	}
+
+	// Add the NMP heder to the OMP response map.
+	hbytes := nmr.Hdr.Bytes()
+	m["_h"] = hbytes
+
+	if err := enc.Encode(m); err != nil {
+		return nil, err
+	}
+	req.Payload = payload
+
+	data, err := req.MarshalBinary()
+	if err != nil {
+		return nil, fmt.Errorf("Failed to encode: %s\n", err.Error())
+	}
+
+	log.Debugf("Serialized OMP request:\n"+
+		"Hdr %+v:\n%s\nPayload:%s\nData:\n%s",
+		nmr.Hdr, hex.Dump(hbytes), hex.Dump(req.Payload), hex.Dump(data))
+
+	return data, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/sesn/sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/sesn/sesn.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/sesn/sesn.go
new file mode 100644
index 0000000..8ef8934
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/sesn/sesn.go
@@ -0,0 +1,79 @@
+package sesn
+
+import (
+	"time"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+)
+
+type TxOptions struct {
+	Timeout time.Duration
+	Tries   int
+}
+
+func (opt *TxOptions) AfterTimeout() <-chan time.Time {
+	if opt.Timeout == 0 {
+		return nil
+	} else {
+		return time.After(opt.Timeout)
+	}
+}
+
+// Represents a communication session with a specific peer.  The particulars
+// vary according to protocol and transport. Several Sesn instances can use the
+// same Xport.
+type Sesn interface {
+	// Initiates communication with the peer.  For connection-oriented
+	// transports, this creates a connection.
+	// Returns:
+	//     * nil: success.
+	//     * nmxutil.SesnAlreadyOpenError: session already open.
+	//     * other error
+	Open() error
+
+	// Ends communication with the peer.  For connection-oriented transports,
+	// this closes the connection.
+	//     * nil: success.
+	//     * nmxutil.SesnClosedError: session not open.
+	//     * other error
+	Close() error
+
+	// Indicates whether the session is currently open.
+	IsOpen() bool
+
+	// Retrieves the maximum data payload for outgoing NMP requests.
+	MtuOut() int
+
+	// Retrieves the maximum data payload for incoming NMP responses.
+	MtuIn() int
+
+	EncodeNmpMsg(msg *nmp.NmpMsg) ([]byte, error)
+
+	// Performs a blocking transmit a single NMP message and listens for the
+	// response.
+	//     * nil: success.
+	//     * nmxutil.SesnClosedError: session not open.
+	//     * other error
+	TxNmpOnce(m *nmp.NmpMsg, opt TxOptions) (nmp.NmpRsp, error)
+
+	// Stops a receive operation in progress.  This must be called from a
+	// separate thread, as sesn receive operations are blocking.
+	AbortRx(nmpSeq uint8) error
+}
+
+func TxNmp(s Sesn, m *nmp.NmpMsg, o TxOptions) (nmp.NmpRsp, error) {
+	retries := o.Tries - 1
+	for i := 0; ; i++ {
+		r, err := s.TxNmpOnce(m, o)
+		if err == nil {
+			return r, nil
+		}
+
+		if (!nmxutil.IsNmpTimeout(err) && !nmxutil.IsXportTimeout(err)) ||
+			i >= retries {
+
+			return nil, err
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/sesn/sesn_cfg.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/sesn/sesn_cfg.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/sesn/sesn_cfg.go
new file mode 100644
index 0000000..e18711d
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/sesn/sesn_cfg.go
@@ -0,0 +1,65 @@
+package sesn
+
+import (
+	"time"
+
+	"mynewt.apache.org/newtmgr/nmxact/bledefs"
+)
+
+type MgmtProto int
+
+const (
+	MGMT_PROTO_NMP MgmtProto = iota
+	MGMT_PROTO_OMP
+)
+
+type BleOnCloseFn func(s Sesn, peer bledefs.BleDev, err error)
+
+// Specifies the BLE peer to connect to.
+type BlePeerSpec struct {
+	// This is filled in if you know the address of the peer to connect to.
+	Dev bledefs.BleDev
+
+	// Otherwise, we must scan for a peer to connect to.  This points to a
+	// function that indicates whether we should connect to the sender of the
+	// specified advertisement.  This function gets called each time an
+	// incoming advertisement is received.  If it returns true, the session
+	// will connect to the sender of the corresponding advertisement.  Set this
+	// to nil if you populate the Dev field.
+	ScanPred bledefs.BleAdvPredicate
+}
+
+func BlePeerSpecDev(dev bledefs.BleDev) BlePeerSpec {
+	return BlePeerSpec{Dev: dev}
+}
+
+func BlePeerSpecName(name string) BlePeerSpec {
+	return BlePeerSpec{
+		ScanPred: func(r bledefs.BleAdvReport) bool {
+			return r.Name == name
+		},
+	}
+}
+
+type SesnCfgBle struct {
+	OwnAddrType  bledefs.BleAddrType
+	PeerSpec     BlePeerSpec
+	CloseTimeout time.Duration
+	OnCloseCb    BleOnCloseFn
+}
+
+type SesnCfg struct {
+	// Used with all transport types.
+	MgmtProto MgmtProto
+
+	// Only used with BLE transports.
+	Ble SesnCfgBle
+}
+
+func NewSesnCfg() SesnCfg {
+	return SesnCfg{
+		Ble: SesnCfgBle{
+			CloseTimeout: 5 * time.Second,
+		},
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/cmd.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/cmd.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/cmd.go
new file mode 100644
index 0000000..d5d7a23
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/cmd.go
@@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package xact
+
+import (
+	"fmt"
+
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+type Result interface {
+	Status() int
+}
+
+type Cmd interface {
+	// Transmits request and listens for response; blocking.
+	Run(s sesn.Sesn) (Result, error)
+	Abort() error
+
+	TxOptions() sesn.TxOptions
+	SetTxOptions(opt sesn.TxOptions)
+}
+
+type CmdBase struct {
+	txOptions sesn.TxOptions
+	curNmpSeq uint8
+	curSesn   sesn.Sesn
+	abortErr  error
+}
+
+func (c *CmdBase) TxOptions() sesn.TxOptions {
+	return c.txOptions
+}
+
+func (c *CmdBase) SetTxOptions(opt sesn.TxOptions) {
+	c.txOptions = opt
+}
+
+func (c *CmdBase) Abort() error {
+	if c.curSesn != nil {
+		if err := c.curSesn.AbortRx(c.curNmpSeq); err != nil {
+			return err
+		}
+	}
+
+	c.abortErr = fmt.Errorf("Command aborted")
+	return nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/config.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/config.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/config.go
new file mode 100644
index 0000000..ddc893b
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/config.go
@@ -0,0 +1,88 @@
+package xact
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+//////////////////////////////////////////////////////////////////////////////
+// $read                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type ConfigReadCmd struct {
+	CmdBase
+	Name string
+}
+
+func NewConfigReadCmd() *ConfigReadCmd {
+	return &ConfigReadCmd{}
+}
+
+type ConfigReadResult struct {
+	Rsp *nmp.ConfigReadRsp
+}
+
+func newConfigReadResult() *ConfigReadResult {
+	return &ConfigReadResult{}
+}
+
+func (r *ConfigReadResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *ConfigReadCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewConfigReadReq()
+	r.Name = c.Name
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.ConfigReadRsp)
+
+	res := newConfigReadResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $write                                                                   //
+//////////////////////////////////////////////////////////////////////////////
+
+type ConfigWriteCmd struct {
+	CmdBase
+	Name string
+	Val  string
+}
+
+func NewConfigWriteCmd() *ConfigWriteCmd {
+	return &ConfigWriteCmd{}
+}
+
+type ConfigWriteResult struct {
+	Rsp *nmp.ConfigWriteRsp
+}
+
+func newConfigWriteResult() *ConfigWriteResult {
+	return &ConfigWriteResult{}
+}
+
+func (r *ConfigWriteResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *ConfigWriteCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewConfigWriteReq()
+	r.Name = c.Name
+	r.Val = c.Val
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.ConfigWriteRsp)
+
+	res := newConfigWriteResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/crash.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/crash.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/crash.go
new file mode 100644
index 0000000..ebb94c7
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/crash.go
@@ -0,0 +1,87 @@
+package xact
+
+import (
+	"fmt"
+	"sort"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+type CrashType int
+
+const (
+	CRASH_TYPE_DIV0 CrashType = iota
+	CRASH_TYPE_JUMP0
+	CRASH_TYPE_REF0
+	CRASH_TYPE_ASSERT
+	CRASH_TYPE_WDOG
+)
+
+var CrashTypeNameMap = map[CrashType]string{
+	CRASH_TYPE_DIV0:   "div0",
+	CRASH_TYPE_JUMP0:  "jump0",
+	CRASH_TYPE_REF0:   "ref0",
+	CRASH_TYPE_ASSERT: "assert",
+	CRASH_TYPE_WDOG:   "wdog",
+}
+
+func CrashTypeToString(ct CrashType) string {
+	return CrashTypeNameMap[ct]
+}
+
+func CrashTypeFromString(s string) (CrashType, error) {
+	for k, v := range CrashTypeNameMap {
+		if s == v {
+			return k, nil
+		}
+	}
+
+	return CrashType(0), fmt.Errorf("invalid crash type: %s", s)
+}
+
+func CrashTypeNames() []string {
+	names := make([]string, 0, len(CrashTypeNameMap))
+	for _, v := range CrashTypeNameMap {
+		names = append(names, v)
+	}
+
+	sort.Strings(names)
+	return names
+}
+
+type CrashCmd struct {
+	CmdBase
+	CrashType CrashType
+}
+
+func NewCrashCmd() *CrashCmd {
+	return &CrashCmd{}
+}
+
+type CrashResult struct {
+	Rsp *nmp.CrashRsp
+}
+
+func newCrashResult() *CrashResult {
+	return &CrashResult{}
+}
+
+func (r *CrashResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *CrashCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewCrashReq()
+	r.CrashType = CrashTypeToString(c.CrashType)
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.CrashRsp)
+
+	res := newCrashResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/datetime.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/datetime.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/datetime.go
new file mode 100644
index 0000000..27bd089
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/datetime.go
@@ -0,0 +1,84 @@
+package xact
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+///////////////////////////////////////////////////////////////////////////////
+// $read                                                                     //
+///////////////////////////////////////////////////////////////////////////////
+
+type DateTimeReadCmd struct {
+	CmdBase
+}
+
+func NewDateTimeReadCmd() *DateTimeReadCmd {
+	return &DateTimeReadCmd{}
+}
+
+type DateTimeReadResult struct {
+	Rsp *nmp.DateTimeReadRsp
+}
+
+func newDateTimeReadResult() *DateTimeReadResult {
+	return &DateTimeReadResult{}
+}
+
+func (r *DateTimeReadResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *DateTimeReadCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewDateTimeReadReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.DateTimeReadRsp)
+
+	res := newDateTimeReadResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// $write                                                                    //
+///////////////////////////////////////////////////////////////////////////////
+
+type DateTimeWriteCmd struct {
+	CmdBase
+	DateTime string
+}
+
+func NewDateTimeWriteCmd() *DateTimeWriteCmd {
+	return &DateTimeWriteCmd{}
+}
+
+type DateTimeWriteResult struct {
+	Rsp *nmp.DateTimeWriteRsp
+}
+
+func newDateTimeWriteResult() *DateTimeWriteResult {
+	return &DateTimeWriteResult{}
+}
+
+func (r *DateTimeWriteResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *DateTimeWriteCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewDateTimeWriteReq()
+	r.DateTime = c.DateTime
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.DateTimeWriteRsp)
+
+	res := newDateTimeWriteResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/echo.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/echo.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/echo.go
new file mode 100644
index 0000000..09622b2
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/echo.go
@@ -0,0 +1,42 @@
+package xact
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+type EchoCmd struct {
+	CmdBase
+	Payload string
+}
+
+func NewEchoCmd() *EchoCmd {
+	return &EchoCmd{}
+}
+
+type EchoResult struct {
+	Rsp *nmp.EchoRsp
+}
+
+func newEchoResult() *EchoResult {
+	return &EchoResult{}
+}
+
+func (r *EchoResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *EchoCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewEchoReq()
+	r.Payload = c.Payload
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.EchoRsp)
+
+	res := newEchoResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/fs.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/fs.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/fs.go
new file mode 100644
index 0000000..0fe32c6
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/fs.go
@@ -0,0 +1,178 @@
+package xact
+
+import (
+	"fmt"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+//////////////////////////////////////////////////////////////////////////////
+// $download                                                                //
+//////////////////////////////////////////////////////////////////////////////
+
+type FsDownloadProgressCb func(c *FsDownloadCmd, r *nmp.FsDownloadRsp)
+type FsDownloadCmd struct {
+	CmdBase
+	Name       string
+	ProgressCb FsDownloadProgressCb
+}
+
+func NewFsDownloadCmd() *FsDownloadCmd {
+	return &FsDownloadCmd{}
+}
+
+type FsDownloadResult struct {
+	Rsps []*nmp.FsDownloadRsp
+}
+
+func newFsDownloadResult() *FsDownloadResult {
+	return &FsDownloadResult{}
+}
+
+func (r *FsDownloadResult) Status() int {
+	rsp := r.Rsps[len(r.Rsps)-1]
+	return rsp.Rc
+}
+
+func (c *FsDownloadCmd) Run(s sesn.Sesn) (Result, error) {
+	res := newFsDownloadResult()
+	off := 0
+
+	for {
+		r := nmp.NewFsDownloadReq()
+		r.Name = c.Name
+		r.Off = uint32(off)
+
+		rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+		if err != nil {
+			return nil, err
+		}
+		frsp := rsp.(*nmp.FsDownloadRsp)
+		res.Rsps = append(res.Rsps, frsp)
+
+		if frsp.Rc != 0 {
+			break
+		}
+
+		if c.ProgressCb != nil {
+			c.ProgressCb(c, frsp)
+		}
+
+		off = int(frsp.Off) + len(frsp.Data)
+		if off >= int(frsp.Len) {
+			break
+		}
+	}
+
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $upload                                                                  //
+//////////////////////////////////////////////////////////////////////////////
+
+type FsUploadProgressCb func(c *FsUploadCmd, r *nmp.FsUploadRsp)
+type FsUploadCmd struct {
+	CmdBase
+	Name       string
+	Data       []byte
+	ProgressCb FsUploadProgressCb
+}
+
+func NewFsUploadCmd() *FsUploadCmd {
+	return &FsUploadCmd{}
+}
+
+type FsUploadResult struct {
+	Rsps []*nmp.FsUploadRsp
+}
+
+func newFsUploadResult() *FsUploadResult {
+	return &FsUploadResult{}
+}
+
+func (r *FsUploadResult) Status() int {
+	rsp := r.Rsps[len(r.Rsps)-1]
+	return rsp.Rc
+}
+
+func buildFsUploadReq(name string, fileSz int, chunk []byte,
+	off int) *nmp.FsUploadReq {
+
+	r := nmp.NewFsUploadReq()
+
+	if r.Off == 0 {
+		r.Len = uint32(fileSz)
+	}
+	r.Name = name
+	r.Off = uint32(off)
+	r.Data = chunk
+
+	return r
+}
+
+func nextFsUploadReq(s sesn.Sesn, name string, data []byte, off int) (
+	*nmp.FsUploadReq, error) {
+
+	// First, build a request without data to determine how much data could
+	// fit.
+	empty := buildFsUploadReq(name, len(data), nil, off)
+	emptyEnc, err := s.EncodeNmpMsg(empty.Msg())
+	if err != nil {
+		return nil, err
+	}
+
+	room := s.MtuOut() - len(emptyEnc)
+	if room <= 0 {
+		return nil, fmt.Errorf("Cannot create image upload request; " +
+			"MTU too low to fit any image data")
+	}
+
+	// Assume all the unused space can hold image data.  This assumption may
+	// not be valid for some encodings (e.g., CBOR uses variable length fields
+	// to encodes byte string lengths).
+	r := buildFsUploadReq(name, len(data), data[off:off+room], off)
+	enc, err := s.EncodeNmpMsg(r.Msg())
+	if err != nil {
+		return nil, err
+	}
+
+	oversize := len(enc) - s.MtuOut()
+	if oversize > 0 {
+		// Request too big.  Reduce the amount of image data.
+		r = buildFsUploadReq(name, len(data), data[off:off+room-oversize], off)
+	}
+
+	return r, nil
+}
+
+func (c *FsUploadCmd) Run(s sesn.Sesn) (Result, error) {
+	res := newFsUploadResult()
+
+	for off := 0; off < len(c.Data); {
+		r, err := nextFsUploadReq(s, c.Name, c.Data, off)
+		if err != nil {
+			return nil, err
+		}
+
+		rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+		if err != nil {
+			return nil, err
+		}
+		crsp := rsp.(*nmp.FsUploadRsp)
+
+		off = int(crsp.Off)
+
+		if c.ProgressCb != nil {
+			c.ProgressCb(c, crsp)
+		}
+
+		res.Rsps = append(res.Rsps, crsp)
+		if crsp.Rc != 0 {
+			break
+		}
+	}
+
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/image.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/image.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/image.go
new file mode 100644
index 0000000..615dd74
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/image.go
@@ -0,0 +1,332 @@
+package xact
+
+import (
+	"fmt"
+
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+//////////////////////////////////////////////////////////////////////////////
+// $upload                                                                  //
+//////////////////////////////////////////////////////////////////////////////
+
+type ImageUploadProgressFn func(c *ImageUploadCmd, r *nmp.ImageUploadRsp)
+type ImageUploadCmd struct {
+	CmdBase
+	Data       []byte
+	ProgressCb ImageUploadProgressFn
+}
+
+type ImageUploadResult struct {
+	Rsps []*nmp.ImageUploadRsp
+}
+
+func NewImageUploadCmd() *ImageUploadCmd {
+	return &ImageUploadCmd{}
+}
+
+func newImageUploadResult() *ImageUploadResult {
+	return &ImageUploadResult{}
+}
+
+func (r *ImageUploadResult) Status() int {
+	rsp := r.Rsps[len(r.Rsps)-1]
+	return rsp.Rc
+}
+
+func buildImageUploadReq(imageSz int, chunk []byte,
+	off int) *nmp.ImageUploadReq {
+
+	r := nmp.NewImageUploadReq()
+
+	if r.Off == 0 {
+		r.Len = uint32(imageSz)
+	}
+	r.Off = uint32(off)
+	r.Data = chunk
+
+	return r
+}
+
+func nextImageUploadReq(s sesn.Sesn, data []byte, off int) (
+	*nmp.ImageUploadReq, error) {
+
+	// First, build a request without data to determine how much data could
+	// fit.
+	empty := buildImageUploadReq(len(data), nil, off)
+	emptyEnc, err := s.EncodeNmpMsg(empty.Msg())
+	if err != nil {
+		return nil, err
+	}
+
+	room := s.MtuOut() - len(emptyEnc)
+	if room <= 0 {
+		return nil, fmt.Errorf("Cannot create image upload request; " +
+			"MTU too low to fit any image data")
+	}
+
+	// Assume all the unused space can hold image data.  This assumption may
+	// not be valid for some encodings (e.g., CBOR uses variable length fields
+	// to encodes byte string lengths).
+	r := buildImageUploadReq(len(data), data[off:off+room], off)
+	enc, err := s.EncodeNmpMsg(r.Msg())
+	if err != nil {
+		return nil, err
+	}
+
+	oversize := len(enc) - s.MtuOut()
+	if oversize > 0 {
+		// Request too big.  Reduce the amount of image data.
+		r = buildImageUploadReq(len(data), data[off:off+room-oversize], off)
+	}
+
+	return r, nil
+}
+
+func (c *ImageUploadCmd) Run(s sesn.Sesn) (Result, error) {
+	res := newImageUploadResult()
+
+	for off := 0; off < len(c.Data); {
+		r, err := nextImageUploadReq(s, c.Data, off)
+		if err != nil {
+			return nil, err
+		}
+
+		rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+		if err != nil {
+			return nil, err
+		}
+		irsp := rsp.(*nmp.ImageUploadRsp)
+
+		off = int(irsp.Off)
+
+		if c.ProgressCb != nil {
+			c.ProgressCb(c, irsp)
+		}
+
+		res.Rsps = append(res.Rsps, irsp)
+		if irsp.Rc != 0 {
+			break
+		}
+	}
+
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $state read                                                              //
+//////////////////////////////////////////////////////////////////////////////
+
+type ImageStateReadCmd struct {
+	CmdBase
+}
+
+type ImageStateReadResult struct {
+	Rsp *nmp.ImageStateRsp
+}
+
+func NewImageStateReadCmd() *ImageStateReadCmd {
+	return &ImageStateReadCmd{}
+}
+
+func newImageStateReadResult() *ImageStateReadResult {
+	return &ImageStateReadResult{}
+}
+
+func (r *ImageStateReadResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *ImageStateReadCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewImageStateReadReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.ImageStateRsp)
+
+	res := newImageStateReadResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $state write                                                             //
+//////////////////////////////////////////////////////////////////////////////
+
+type ImageStateWriteCmd struct {
+	CmdBase
+	Hash    []byte
+	Confirm bool
+}
+
+type ImageStateWriteResult struct {
+	Rsp *nmp.ImageStateRsp
+}
+
+func NewImageStateWriteCmd() *ImageStateWriteCmd {
+	return &ImageStateWriteCmd{}
+}
+
+func newImageStateWriteResult() *ImageStateWriteResult {
+	return &ImageStateWriteResult{}
+}
+
+func (r *ImageStateWriteResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *ImageStateWriteCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewImageStateWriteReq()
+	r.Hash = c.Hash
+	r.Confirm = c.Confirm
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.ImageStateRsp)
+
+	res := newImageStateWriteResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $corelist                                                                //
+//////////////////////////////////////////////////////////////////////////////
+
+type CoreListCmd struct {
+	CmdBase
+}
+
+type CoreListResult struct {
+	Rsp *nmp.CoreListRsp
+}
+
+func NewCoreListCmd() *CoreListCmd {
+	return &CoreListCmd{}
+}
+
+func newCoreListResult() *CoreListResult {
+	return &CoreListResult{}
+}
+
+func (r *CoreListResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *CoreListCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewCoreListReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.CoreListRsp)
+
+	res := newCoreListResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $coreload                                                                //
+//////////////////////////////////////////////////////////////////////////////
+
+type CoreLoadProgressFn func(c *CoreLoadCmd, r *nmp.CoreLoadRsp)
+type CoreLoadCmd struct {
+	CmdBase
+	ProgressCb CoreLoadProgressFn
+}
+
+type CoreLoadResult struct {
+	Rsps []*nmp.CoreLoadRsp
+}
+
+func NewCoreLoadCmd() *CoreLoadCmd {
+	return &CoreLoadCmd{}
+}
+
+func newCoreLoadResult() *CoreLoadResult {
+	return &CoreLoadResult{}
+}
+
+func (r *CoreLoadResult) Status() int {
+	rsp := r.Rsps[len(r.Rsps)-1]
+	return rsp.Rc
+}
+
+func (c *CoreLoadCmd) Run(s sesn.Sesn) (Result, error) {
+	res := newCoreLoadResult()
+	off := 0
+
+	for {
+		r := nmp.NewCoreLoadReq()
+		r.Off = uint32(off)
+
+		rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+		if err != nil {
+			return nil, err
+		}
+		irsp := rsp.(*nmp.CoreLoadRsp)
+
+		if c.ProgressCb != nil {
+			c.ProgressCb(c, irsp)
+		}
+
+		res.Rsps = append(res.Rsps, irsp)
+		if irsp.Rc != 0 {
+			break
+		}
+
+		if len(irsp.Data) == 0 {
+			// Download complete.
+			break
+		}
+
+		off = int(irsp.Off) + len(irsp.Data)
+	}
+
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $coreerase                                                               //
+//////////////////////////////////////////////////////////////////////////////
+
+type CoreEraseCmd struct {
+	CmdBase
+}
+
+type CoreEraseResult struct {
+	Rsp *nmp.CoreEraseRsp
+}
+
+func NewCoreEraseCmd() *CoreEraseCmd {
+	return &CoreEraseCmd{}
+}
+
+func newCoreEraseResult() *CoreEraseResult {
+	return &CoreEraseResult{}
+}
+
+func (r *CoreEraseResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *CoreEraseCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewCoreEraseReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.CoreEraseRsp)
+
+	res := newCoreEraseResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/log.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/log.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/log.go
new file mode 100644
index 0000000..86b348f
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/log.go
@@ -0,0 +1,202 @@
+package xact
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+//////////////////////////////////////////////////////////////////////////////
+// $read                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type LogShowCmd struct {
+	CmdBase
+	Name      string
+	Timestamp int64
+	Index     uint32
+}
+
+func NewLogShowCmd() *LogShowCmd {
+	return &LogShowCmd{}
+}
+
+type LogShowResult struct {
+	Rsp *nmp.LogShowRsp
+}
+
+func newLogShowResult() *LogShowResult {
+	return &LogShowResult{}
+}
+
+func (r *LogShowResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *LogShowCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewLogShowReq()
+	r.Name = c.Name
+	r.Timestamp = c.Timestamp
+	r.Index = c.Index
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.LogShowRsp)
+
+	res := newLogShowResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $list                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type LogListCmd struct {
+	CmdBase
+}
+
+func NewLogListCmd() *LogListCmd {
+	return &LogListCmd{}
+}
+
+type LogListResult struct {
+	Rsp *nmp.LogListRsp
+}
+
+func newLogListResult() *LogListResult {
+	return &LogListResult{}
+}
+
+func (r *LogListResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *LogListCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewLogListReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.LogListRsp)
+
+	res := newLogListResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $module list                                                             //
+//////////////////////////////////////////////////////////////////////////////
+
+type LogModuleListCmd struct {
+	CmdBase
+}
+
+func NewLogModuleListCmd() *LogModuleListCmd {
+	return &LogModuleListCmd{}
+}
+
+type LogModuleListResult struct {
+	Rsp *nmp.LogModuleListRsp
+}
+
+func newLogModuleListResult() *LogModuleListResult {
+	return &LogModuleListResult{}
+}
+
+func (r *LogModuleListResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *LogModuleListCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewLogModuleListReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.LogModuleListRsp)
+
+	res := newLogModuleListResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $level list                                                              //
+//////////////////////////////////////////////////////////////////////////////
+
+type LogLevelListCmd struct {
+	CmdBase
+}
+
+func NewLogLevelListCmd() *LogLevelListCmd {
+	return &LogLevelListCmd{}
+}
+
+type LogLevelListResult struct {
+	Rsp *nmp.LogLevelListRsp
+}
+
+func newLogLevelListResult() *LogLevelListResult {
+	return &LogLevelListResult{}
+}
+
+func (r *LogLevelListResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *LogLevelListCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewLogLevelListReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.LogLevelListRsp)
+
+	res := newLogLevelListResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $clear                                                                   //
+//////////////////////////////////////////////////////////////////////////////
+
+type LogClearCmd struct {
+	CmdBase
+}
+
+func NewLogClearCmd() *LogClearCmd {
+	return &LogClearCmd{}
+}
+
+type LogClearResult struct {
+	Rsp *nmp.LogClearRsp
+}
+
+func newLogClearResult() *LogClearResult {
+	return &LogClearResult{}
+}
+
+func (r *LogClearResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *LogClearCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewLogClearReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.LogClearRsp)
+
+	res := newLogClearResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/mpstat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/mpstat.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/mpstat.go
new file mode 100644
index 0000000..acff3e2
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/mpstat.go
@@ -0,0 +1,40 @@
+package xact
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+type MempoolStatCmd struct {
+	CmdBase
+}
+
+func NewMempoolStatCmd() *MempoolStatCmd {
+	return &MempoolStatCmd{}
+}
+
+type MempoolStatResult struct {
+	Rsp *nmp.MempoolStatRsp
+}
+
+func newMempoolStatResult() *MempoolStatResult {
+	return &MempoolStatResult{}
+}
+
+func (r *MempoolStatResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *MempoolStatCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewMempoolStatReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.MempoolStatRsp)
+
+	res := newMempoolStatResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/reset.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/reset.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/reset.go
new file mode 100644
index 0000000..397ad60
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/reset.go
@@ -0,0 +1,41 @@
+package xact
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+type ResetCmd struct {
+	CmdBase
+	Payload string
+}
+
+func NewResetCmd() *ResetCmd {
+	return &ResetCmd{}
+}
+
+type ResetResult struct {
+	Rsp *nmp.ResetRsp
+}
+
+func newResetResult() *ResetResult {
+	return &ResetResult{}
+}
+
+func (r *ResetResult) Status() int {
+	return 0
+}
+
+func (c *ResetCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewResetReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.ResetRsp)
+
+	res := newResetResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/run.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/run.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/run.go
new file mode 100644
index 0000000..28d71a9
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/run.go
@@ -0,0 +1,86 @@
+package xact
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+//////////////////////////////////////////////////////////////////////////////
+// $test                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type RunTestCmd struct {
+	CmdBase
+	Testname string
+	Token    string
+}
+
+func NewRunTestCmd() *RunTestCmd {
+	return &RunTestCmd{}
+}
+
+type RunTestResult struct {
+	Rsp *nmp.RunTestRsp
+}
+
+func newRunTestResult() *RunTestResult {
+	return &RunTestResult{}
+}
+
+func (r *RunTestResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *RunTestCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewRunTestReq()
+	r.Testname = c.Testname
+	r.Token = c.Token
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.RunTestRsp)
+
+	res := newRunTestResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $list                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type RunListCmd struct {
+	CmdBase
+}
+
+func NewRunListCmd() *RunListCmd {
+	return &RunListCmd{}
+}
+
+type RunListResult struct {
+	Rsp *nmp.RunListRsp
+}
+
+func newRunListResult() *RunListResult {
+	return &RunListResult{}
+}
+
+func (r *RunListResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *RunListCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewRunListReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.RunListRsp)
+
+	res := newRunListResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/stat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/stat.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/stat.go
new file mode 100644
index 0000000..a38eba9
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/stat.go
@@ -0,0 +1,84 @@
+package xact
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+//////////////////////////////////////////////////////////////////////////////
+// $read                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type StatReadCmd struct {
+	CmdBase
+	Name string
+}
+
+func NewStatReadCmd() *StatReadCmd {
+	return &StatReadCmd{}
+}
+
+type StatReadResult struct {
+	Rsp *nmp.StatReadRsp
+}
+
+func newStatReadResult() *StatReadResult {
+	return &StatReadResult{}
+}
+
+func (r *StatReadResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *StatReadCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewStatReadReq()
+	r.Name = c.Name
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.StatReadRsp)
+
+	res := newStatReadResult()
+	res.Rsp = srsp
+	return res, nil
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// $list                                                                    //
+//////////////////////////////////////////////////////////////////////////////
+
+type StatListCmd struct {
+	CmdBase
+}
+
+func NewStatListCmd() *StatListCmd {
+	return &StatListCmd{}
+}
+
+type StatListResult struct {
+	Rsp *nmp.StatListRsp
+}
+
+func newStatListResult() *StatListResult {
+	return &StatListResult{}
+}
+
+func (r *StatListResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *StatListCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewStatListReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.StatListRsp)
+
+	res := newStatListResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/taskstat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/taskstat.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/taskstat.go
new file mode 100644
index 0000000..bb03357
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/taskstat.go
@@ -0,0 +1,40 @@
+package xact
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+type TaskStatCmd struct {
+	CmdBase
+}
+
+func NewTaskStatCmd() *TaskStatCmd {
+	return &TaskStatCmd{}
+}
+
+type TaskStatResult struct {
+	Rsp *nmp.TaskStatRsp
+}
+
+func newTaskStatResult() *TaskStatResult {
+	return &TaskStatResult{}
+}
+
+func (r *TaskStatResult) Status() int {
+	return r.Rsp.Rc
+}
+
+func (c *TaskStatCmd) Run(s sesn.Sesn) (Result, error) {
+	r := nmp.NewTaskStatReq()
+
+	rsp, err := txReq(s, r.Msg(), &c.CmdBase)
+	if err != nil {
+		return nil, err
+	}
+	srsp := rsp.(*nmp.TaskStatRsp)
+
+	res := newTaskStatResult()
+	res.Rsp = srsp
+	return res, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/xact.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/xact.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/xact.go
new file mode 100644
index 0000000..00c177f
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xact/xact.go
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package xact
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+func txReq(s sesn.Sesn, m *nmp.NmpMsg, c *CmdBase) (
+	nmp.NmpRsp, error) {
+
+	if c.abortErr != nil {
+		return nil, c.abortErr
+	}
+
+	c.curNmpSeq = m.Hdr.Seq
+	c.curSesn = s
+	defer func() {
+		c.curNmpSeq = 0
+		c.curSesn = nil
+	}()
+
+	rsp, err := sesn.TxNmp(s, m, c.TxOptions())
+	if err != nil {
+		return nil, err
+	}
+
+	return rsp, nil
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xport/xport.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xport/xport.go b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xport/xport.go
new file mode 100644
index 0000000..85ef2b2
--- /dev/null
+++ b/newtmgr/vendor/mynewt.apache.org/newtmgr/nmxact/xport/xport.go
@@ -0,0 +1,15 @@
+package xport
+
+import (
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+)
+
+type RxFn func(data []byte)
+
+type Xport interface {
+	Start() error
+	Stop() error
+	BuildSesn(cfg sesn.SesnCfg) (sesn.Sesn, error)
+
+	Tx(data []byte) error
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/example/ble_plain/ble_plain.go
----------------------------------------------------------------------
diff --git a/nmxact/example/ble_plain/ble_plain.go b/nmxact/example/ble_plain/ble_plain.go
index 98c8f9f..44d0566 100644
--- a/nmxact/example/ble_plain/ble_plain.go
+++ b/nmxact/example/ble_plain/ble_plain.go
@@ -23,10 +23,10 @@ import (
 	"fmt"
 	"os"
 
-	"mynewt.apache.org/newt/nmxact/bledefs"
-	"mynewt.apache.org/newt/nmxact/nmble"
-	"mynewt.apache.org/newt/nmxact/sesn"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/nmble"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 )
 
 func main() {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/example/serial_plain/serial_plain.go
----------------------------------------------------------------------
diff --git a/nmxact/example/serial_plain/serial_plain.go b/nmxact/example/serial_plain/serial_plain.go
index 05fab27..5b0c3b1 100644
--- a/nmxact/example/serial_plain/serial_plain.go
+++ b/nmxact/example/serial_plain/serial_plain.go
@@ -24,9 +24,9 @@ import (
 	"os"
 	"time"
 
-	"mynewt.apache.org/newt/nmxact/nmserial"
-	"mynewt.apache.org/newt/nmxact/sesn"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/nmxact/nmserial"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 )
 
 func main() {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/nmble/ble_act.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_act.go b/nmxact/nmble/ble_act.go
index 08c396f..2aa6678 100644
--- a/nmxact/nmble/ble_act.go
+++ b/nmxact/nmble/ble_act.go
@@ -3,7 +3,7 @@ package nmble
 import (
 	"encoding/json"
 
-	"mynewt.apache.org/newt/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
 )
 
 // Blocking

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/nmble/ble_fsm.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_fsm.go b/nmxact/nmble/ble_fsm.go
index daa930b..9c96526 100644
--- a/nmxact/nmble/ble_fsm.go
+++ b/nmxact/nmble/ble_fsm.go
@@ -8,10 +8,10 @@ import (
 
 	log "github.com/Sirupsen/logrus"
 
-	. "mynewt.apache.org/newt/nmxact/bledefs"
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	. "mynewt.apache.org/newtmgr/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 type BleSesnState int32

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/nmble/ble_oic_sesn.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_oic_sesn.go b/nmxact/nmble/ble_oic_sesn.go
index 949d7aa..365efc6 100644
--- a/nmxact/nmble/ble_oic_sesn.go
+++ b/nmxact/nmble/ble_oic_sesn.go
@@ -5,10 +5,10 @@ import (
 	"sync"
 	"time"
 
-	. "mynewt.apache.org/newt/nmxact/bledefs"
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/omp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	. "mynewt.apache.org/newtmgr/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/omp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/nmble/ble_plain_sesn.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_plain_sesn.go b/nmxact/nmble/ble_plain_sesn.go
index 71133e7..a8a46d6 100644
--- a/nmxact/nmble/ble_plain_sesn.go
+++ b/nmxact/nmble/ble_plain_sesn.go
@@ -5,9 +5,9 @@ import (
 	"sync"
 	"time"
 
-	. "mynewt.apache.org/newt/nmxact/bledefs"
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	. "mynewt.apache.org/newtmgr/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/nmble/ble_proto.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_proto.go b/nmxact/nmble/ble_proto.go
index 85a26f8..fe9112d 100644
--- a/nmxact/nmble/ble_proto.go
+++ b/nmxact/nmble/ble_proto.go
@@ -8,7 +8,7 @@ import (
 	"strconv"
 	"strings"
 
-	. "mynewt.apache.org/newt/nmxact/bledefs"
+	. "mynewt.apache.org/newtmgr/nmxact/bledefs"
 )
 
 type MsgOp int

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/nmble/ble_util.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_util.go b/nmxact/nmble/ble_util.go
index 08eb8d9..31f0e62 100644
--- a/nmxact/nmble/ble_util.go
+++ b/nmxact/nmble/ble_util.go
@@ -7,8 +7,8 @@ import (
 
 	log "github.com/Sirupsen/logrus"
 
-	. "mynewt.apache.org/newt/nmxact/bledefs"
-	"mynewt.apache.org/newt/nmxact/nmxutil"
+	. "mynewt.apache.org/newtmgr/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
 )
 
 const NmpPlainSvcUuid = "8D53DC1D-1DB7-4CD3-868B-8A527460AA84"

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/nmble/ble_xport.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_xport.go b/nmxact/nmble/ble_xport.go
index 483bfd1..ba38b9d 100644
--- a/nmxact/nmble/ble_xport.go
+++ b/nmxact/nmble/ble_xport.go
@@ -9,8 +9,8 @@ import (
 
 	log "github.com/Sirupsen/logrus"
 
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 	"mynewt.apache.org/newt/util/unixchild"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/nmp/nmp.go
----------------------------------------------------------------------
diff --git a/nmxact/nmp/nmp.go b/nmxact/nmp/nmp.go
index b868e25..bb35743 100644
--- a/nmxact/nmp/nmp.go
+++ b/nmxact/nmp/nmp.go
@@ -27,7 +27,7 @@ import (
 	log "github.com/Sirupsen/logrus"
 	"github.com/ugorji/go/codec"
 
-	"mynewt.apache.org/newt/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/nmserial/serial_plain_sesn.go
----------------------------------------------------------------------
diff --git a/nmxact/nmserial/serial_plain_sesn.go b/nmxact/nmserial/serial_plain_sesn.go
index a407a98..fe7173e 100644
--- a/nmxact/nmserial/serial_plain_sesn.go
+++ b/nmxact/nmserial/serial_plain_sesn.go
@@ -4,9 +4,9 @@ import (
 	"fmt"
 	"sync"
 
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 type SerialPlainSesn struct {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/nmserial/serial_xport.go
----------------------------------------------------------------------
diff --git a/nmxact/nmserial/serial_xport.go b/nmxact/nmserial/serial_xport.go
index 6f5aa7c..7dbb5ca 100644
--- a/nmxact/nmserial/serial_xport.go
+++ b/nmxact/nmserial/serial_xport.go
@@ -12,8 +12,8 @@ import (
 	"github.com/joaojeronimo/go-crc16"
 	"github.com/tarm/serial"
 
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/omp/dispatch.go
----------------------------------------------------------------------
diff --git a/nmxact/omp/dispatch.go b/nmxact/omp/dispatch.go
index fb25f98..44d1022 100644
--- a/nmxact/omp/dispatch.go
+++ b/nmxact/omp/dispatch.go
@@ -22,7 +22,7 @@ package omp
 import (
 	log "github.com/Sirupsen/logrus"
 
-	"mynewt.apache.org/newt/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
 )
 
 type OmpDispatcher struct {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/omp/omp.go
----------------------------------------------------------------------
diff --git a/nmxact/omp/omp.go b/nmxact/omp/omp.go
index 5bed071..77dbd1b 100644
--- a/nmxact/omp/omp.go
+++ b/nmxact/omp/omp.go
@@ -28,7 +28,7 @@ import (
 	"github.com/runtimeco/go-coap"
 	"github.com/ugorji/go/codec"
 
-	"mynewt.apache.org/newt/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
 )
 
 // OIC wrapping adds this many bytes to an NMP message.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/sesn/sesn.go
----------------------------------------------------------------------
diff --git a/nmxact/sesn/sesn.go b/nmxact/sesn/sesn.go
index f5bbd3c..8ef8934 100644
--- a/nmxact/sesn/sesn.go
+++ b/nmxact/sesn/sesn.go
@@ -3,8 +3,8 @@ package sesn
 import (
 	"time"
 
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/nmxutil"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/nmxutil"
 )
 
 type TxOptions struct {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/sesn/sesn_cfg.go
----------------------------------------------------------------------
diff --git a/nmxact/sesn/sesn_cfg.go b/nmxact/sesn/sesn_cfg.go
index 9e07c71..e18711d 100644
--- a/nmxact/sesn/sesn_cfg.go
+++ b/nmxact/sesn/sesn_cfg.go
@@ -3,7 +3,7 @@ package sesn
 import (
 	"time"
 
-	"mynewt.apache.org/newt/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/bledefs"
 )
 
 type MgmtProto int

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/cmd.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/cmd.go b/nmxact/xact/cmd.go
index f42b2df..d5d7a23 100644
--- a/nmxact/xact/cmd.go
+++ b/nmxact/xact/cmd.go
@@ -22,7 +22,7 @@ package xact
 import (
 	"fmt"
 
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 type Result interface {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/config.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/config.go b/nmxact/xact/config.go
index a0d2f70..ddc893b 100644
--- a/nmxact/xact/config.go
+++ b/nmxact/xact/config.go
@@ -1,8 +1,8 @@
 package xact
 
 import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 //////////////////////////////////////////////////////////////////////////////



[31/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
deleted file mode 100644
index 0feceee..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go
+++ /dev/null
@@ -1,1530 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,dragonfly
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_ATM                            = 0x1e
-	AF_BLUETOOTH                      = 0x21
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1a
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x23
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x1c
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1a
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x24
-	AF_MPLS                           = 0x22
-	AF_NATM                           = 0x1d
-	AF_NETGRAPH                       = 0x20
-	AF_NS                             = 0x6
-	AF_OSI                            = 0x7
-	AF_PUP                            = 0x4
-	AF_ROUTE                          = 0x11
-	AF_SIP                            = 0x18
-	AF_SNA                            = 0xb
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B9600                             = 0x2580
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc0104279
-	BIOCGETIF                         = 0x4020426b
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044272
-	BIOCGRTIMEOUT                     = 0x4010426e
-	BIOCGSEESENT                      = 0x40044276
-	BIOCGSTATS                        = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCLOCK                          = 0x2000427a
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDLT                          = 0x80044278
-	BIOCSETF                          = 0x80104267
-	BIOCSETIF                         = 0x8020426c
-	BIOCSETWF                         = 0x8010427b
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044273
-	BIOCSRTIMEOUT                     = 0x8010426d
-	BIOCSSEESENT                      = 0x80044277
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x8
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DEFAULTBUFSIZE                = 0x1000
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x80000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MAX_CLONES                    = 0x80
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	DLT_A429                          = 0xb8
-	DLT_A653_ICM                      = 0xb9
-	DLT_AIRONET_HEADER                = 0x78
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ARCNET_LINUX                  = 0x81
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AURORA                        = 0x7e
-	DLT_AX25                          = 0x3
-	DLT_AX25_KISS                     = 0xca
-	DLT_BACNET_MS_TP                  = 0xa5
-	DLT_BLUETOOTH_HCI_H4              = 0xbb
-	DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-	DLT_CAN20B                        = 0xbe
-	DLT_CHAOS                         = 0x5
-	DLT_CHDLC                         = 0x68
-	DLT_CISCO_IOS                     = 0x76
-	DLT_C_HDLC                        = 0x68
-	DLT_C_HDLC_WITH_DIR               = 0xcd
-	DLT_DOCSIS                        = 0x8f
-	DLT_ECONET                        = 0x73
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0x6d
-	DLT_ERF                           = 0xc5
-	DLT_ERF_ETH                       = 0xaf
-	DLT_ERF_POS                       = 0xb0
-	DLT_FDDI                          = 0xa
-	DLT_FLEXRAY                       = 0xd2
-	DLT_FRELAY                        = 0x6b
-	DLT_FRELAY_WITH_DIR               = 0xce
-	DLT_GCOM_SERIAL                   = 0xad
-	DLT_GCOM_T1E1                     = 0xac
-	DLT_GPF_F                         = 0xab
-	DLT_GPF_T                         = 0xaa
-	DLT_GPRS_LLC                      = 0xa9
-	DLT_HHDLC                         = 0x79
-	DLT_IBM_SN                        = 0x92
-	DLT_IBM_SP                        = 0x91
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_IEEE802_15_4                  = 0xc3
-	DLT_IEEE802_15_4_LINUX            = 0xbf
-	DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-	DLT_IEEE802_16_MAC_CPS            = 0xbc
-	DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-	DLT_IPFILTER                      = 0x74
-	DLT_IPMB                          = 0xc7
-	DLT_IPMB_LINUX                    = 0xd1
-	DLT_IP_OVER_FC                    = 0x7a
-	DLT_JUNIPER_ATM1                  = 0x89
-	DLT_JUNIPER_ATM2                  = 0x87
-	DLT_JUNIPER_CHDLC                 = 0xb5
-	DLT_JUNIPER_ES                    = 0x84
-	DLT_JUNIPER_ETHER                 = 0xb2
-	DLT_JUNIPER_FRELAY                = 0xb4
-	DLT_JUNIPER_GGSN                  = 0x85
-	DLT_JUNIPER_ISM                   = 0xc2
-	DLT_JUNIPER_MFR                   = 0x86
-	DLT_JUNIPER_MLFR                  = 0x83
-	DLT_JUNIPER_MLPPP                 = 0x82
-	DLT_JUNIPER_MONITOR               = 0xa4
-	DLT_JUNIPER_PIC_PEER              = 0xae
-	DLT_JUNIPER_PPP                   = 0xb3
-	DLT_JUNIPER_PPPOE                 = 0xa7
-	DLT_JUNIPER_PPPOE_ATM             = 0xa8
-	DLT_JUNIPER_SERVICES              = 0x88
-	DLT_JUNIPER_ST                    = 0xc8
-	DLT_JUNIPER_VP                    = 0xb7
-	DLT_LAPB_WITH_DIR                 = 0xcf
-	DLT_LAPD                          = 0xcb
-	DLT_LIN                           = 0xd4
-	DLT_LINUX_IRDA                    = 0x90
-	DLT_LINUX_LAPD                    = 0xb1
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_LTALK                         = 0x72
-	DLT_MFR                           = 0xb6
-	DLT_MOST                          = 0xd3
-	DLT_MTP2                          = 0x8c
-	DLT_MTP2_WITH_PHDR                = 0x8b
-	DLT_MTP3                          = 0x8d
-	DLT_NULL                          = 0x0
-	DLT_PCI_EXP                       = 0x7d
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPI                           = 0xc0
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_PPPD                      = 0xa6
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PPP_WITH_DIR                  = 0xcc
-	DLT_PRISM_HEADER                  = 0x77
-	DLT_PRONET                        = 0x4
-	DLT_RAIF1                         = 0xc6
-	DLT_RAW                           = 0xc
-	DLT_REDBACK_SMARTEDGE             = 0x20
-	DLT_RIO                           = 0x7c
-	DLT_SCCP                          = 0x8e
-	DLT_SITA                          = 0xc4
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DLT_SUNATM                        = 0x7b
-	DLT_SYMANTEC_FIREWALL             = 0x63
-	DLT_TZSP                          = 0x80
-	DLT_USB                           = 0xba
-	DLT_USB_LINUX                     = 0xbd
-	DLT_X2E_SERIAL                    = 0xd5
-	DLT_X2E_XORAYA                    = 0xd6
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DBF                            = 0xf
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EVFILT_AIO                        = -0x3
-	EVFILT_EXCEPT                     = -0x8
-	EVFILT_MARKER                     = 0xf
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0x8
-	EVFILT_TIMER                      = -0x7
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG1                          = 0x2000
-	EV_NODATA                         = 0x1000
-	EV_ONESHOT                        = 0x10
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTEXIT_LWP                       = 0x10000
-	EXTEXIT_PROC                      = 0x0
-	EXTEXIT_SETINT                    = 0x1
-	EXTEXIT_SIMPLE                    = 0x0
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_DUP2FD                          = 0xa
-	F_DUP2FD_CLOEXEC                  = 0x12
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0x11
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETOWN                          = 0x5
-	F_OK                              = 0x0
-	F_RDLCK                           = 0x1
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETOWN                          = 0x6
-	F_UNLCK                           = 0x2
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFAN_ARRIVAL                      = 0x0
-	IFAN_DEPARTURE                    = 0x1
-	IFF_ALLMULTI                      = 0x200
-	IFF_ALTPHYS                       = 0x4000
-	IFF_BROADCAST                     = 0x2
-	IFF_CANTCHANGE                    = 0x118e72
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MONITOR                       = 0x40000
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NPOLLING                      = 0x100000
-	IFF_OACTIVE                       = 0x400
-	IFF_OACTIVE_COMPAT                = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_POLLING                       = 0x10000
-	IFF_POLLING_COMPAT                = 0x10000
-	IFF_PPROMISC                      = 0x20000
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_SMART                         = 0x20
-	IFF_STATICARP                     = 0x80000
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_A12MPPSWITCH                  = 0x82
-	IFT_AAL2                          = 0xbb
-	IFT_AAL5                          = 0x31
-	IFT_ADSL                          = 0x5e
-	IFT_AFLANE8023                    = 0x3b
-	IFT_AFLANE8025                    = 0x3c
-	IFT_ARAP                          = 0x58
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ASYNC                         = 0x54
-	IFT_ATM                           = 0x25
-	IFT_ATMDXI                        = 0x69
-	IFT_ATMFUNI                       = 0x6a
-	IFT_ATMIMA                        = 0x6b
-	IFT_ATMLOGICAL                    = 0x50
-	IFT_ATMRADIO                      = 0xbd
-	IFT_ATMSUBINTERFACE               = 0x86
-	IFT_ATMVCIENDPT                   = 0xc2
-	IFT_ATMVIRTUAL                    = 0x95
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
-	IFT_BRIDGE                        = 0xd1
-	IFT_BSC                           = 0x53
-	IFT_CARP                          = 0xf8
-	IFT_CCTEMUL                       = 0x3d
-	IFT_CEPT                          = 0x13
-	IFT_CES                           = 0x85
-	IFT_CHANNEL                       = 0x46
-	IFT_CNR                           = 0x55
-	IFT_COFFEE                        = 0x84
-	IFT_COMPOSITELINK                 = 0x9b
-	IFT_DCN                           = 0x8d
-	IFT_DIGITALPOWERLINE              = 0x8a
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-	IFT_DLSW                          = 0x4a
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
-	IFT_DOCSCABLEMACLAYER             = 0x7f
-	IFT_DOCSCABLEUPSTREAM             = 0x81
-	IFT_DS0                           = 0x51
-	IFT_DS0BUNDLE                     = 0x52
-	IFT_DS1FDL                        = 0xaa
-	IFT_DS3                           = 0x1e
-	IFT_DTM                           = 0x8c
-	IFT_DVBASILN                      = 0xac
-	IFT_DVBASIOUT                     = 0xad
-	IFT_DVBRCCDOWNSTREAM              = 0x93
-	IFT_DVBRCCMACLAYER                = 0x92
-	IFT_DVBRCCUPSTREAM                = 0x94
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_EPLRS                         = 0x57
-	IFT_ESCON                         = 0x49
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0xf2
-	IFT_FAST                          = 0x7d
-	IFT_FASTETHER                     = 0x3e
-	IFT_FASTETHERFX                   = 0x45
-	IFT_FDDI                          = 0xf
-	IFT_FIBRECHANNEL                  = 0x38
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
-	IFT_FRAMERELAYMPI                 = 0x5c
-	IFT_FRDLCIENDPT                   = 0xc1
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_FRF16MFRBUNDLE                = 0xa3
-	IFT_FRFORWARD                     = 0x9e
-	IFT_G703AT2MB                     = 0x43
-	IFT_G703AT64K                     = 0x42
-	IFT_GIF                           = 0xf0
-	IFT_GIGABITETHERNET               = 0x75
-	IFT_GR303IDT                      = 0xb2
-	IFT_GR303RDT                      = 0xb1
-	IFT_H323GATEKEEPER                = 0xa4
-	IFT_H323PROXY                     = 0xa5
-	IFT_HDH1822                       = 0x3
-	IFT_HDLC                          = 0x76
-	IFT_HDSL2                         = 0xa8
-	IFT_HIPERLAN2                     = 0xb7
-	IFT_HIPPI                         = 0x2f
-	IFT_HIPPIINTERFACE                = 0x39
-	IFT_HOSTPAD                       = 0x5a
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IBM370PARCHAN                 = 0x48
-	IFT_IDSL                          = 0x9a
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE80211                     = 0x47
-	IFT_IEEE80212                     = 0x37
-	IFT_IEEE8023ADLAG                 = 0xa1
-	IFT_IFGSN                         = 0x91
-	IFT_IMT                           = 0xbe
-	IFT_INTERLEAVE                    = 0x7c
-	IFT_IP                            = 0x7e
-	IFT_IPFORWARD                     = 0x8e
-	IFT_IPOVERATM                     = 0x72
-	IFT_IPOVERCDLC                    = 0x6d
-	IFT_IPOVERCLAW                    = 0x6e
-	IFT_IPSWITCH                      = 0x4e
-	IFT_ISDN                          = 0x3f
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISDNS                         = 0x4b
-	IFT_ISDNU                         = 0x4c
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88025CRFPINT               = 0x62
-	IFT_ISO88025DTR                   = 0x56
-	IFT_ISO88025FIBER                 = 0x73
-	IFT_ISO88026                      = 0xa
-	IFT_ISUP                          = 0xb3
-	IFT_L2VLAN                        = 0x87
-	IFT_L3IPVLAN                      = 0x88
-	IFT_L3IPXVLAN                     = 0x89
-	IFT_LAPB                          = 0x10
-	IFT_LAPD                          = 0x4d
-	IFT_LAPF                          = 0x77
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MEDIAMAILOVERIP               = 0x8b
-	IFT_MFSIGLINK                     = 0xa7
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_MPC                           = 0x71
-	IFT_MPLS                          = 0xa6
-	IFT_MPLSTUNNEL                    = 0x96
-	IFT_MSDSL                         = 0x8f
-	IFT_MVL                           = 0xbf
-	IFT_MYRINET                       = 0x63
-	IFT_NFAS                          = 0xaf
-	IFT_NSIP                          = 0x1b
-	IFT_OPTICALCHANNEL                = 0xc3
-	IFT_OPTICALTRANSPORT              = 0xc4
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PFLOG                         = 0xf5
-	IFT_PFSYNC                        = 0xf6
-	IFT_PLC                           = 0xae
-	IFT_POS                           = 0xab
-	IFT_PPP                           = 0x17
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
-	IFT_PROPBWAP2MP                   = 0xb8
-	IFT_PROPCNLS                      = 0x59
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PROPWIRELESSP2P               = 0x9d
-	IFT_PTPSERIAL                     = 0x16
-	IFT_PVC                           = 0xf1
-	IFT_QLLC                          = 0x44
-	IFT_RADIOMAC                      = 0xbc
-	IFT_RADSL                         = 0x5f
-	IFT_REACHDSL                      = 0xc0
-	IFT_RFC1483                       = 0x9f
-	IFT_RS232                         = 0x21
-	IFT_RSRB                          = 0x4f
-	IFT_SDLC                          = 0x11
-	IFT_SDSL                          = 0x60
-	IFT_SHDSL                         = 0xa9
-	IFT_SIP                           = 0x1f
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_SRP                           = 0x97
-	IFT_SS7SIGLINK                    = 0x9c
-	IFT_STACKTOSTACK                  = 0x6f
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0xf3
-	IFT_T1                            = 0x12
-	IFT_TDLC                          = 0x74
-	IFT_TERMPAD                       = 0x5b
-	IFT_TR008                         = 0xb0
-	IFT_TRANSPHDLC                    = 0x7b
-	IFT_TUNNEL                        = 0x83
-	IFT_ULTRA                         = 0x1d
-	IFT_USB                           = 0xa0
-	IFT_V11                           = 0x40
-	IFT_V35                           = 0x2d
-	IFT_V36                           = 0x41
-	IFT_V37                           = 0x78
-	IFT_VDSL                          = 0x61
-	IFT_VIRTUALIPADDRESS              = 0x70
-	IFT_VOICEEM                       = 0x64
-	IFT_VOICEENCAP                    = 0x67
-	IFT_VOICEFXO                      = 0x65
-	IFT_VOICEFXS                      = 0x66
-	IFT_VOICEOVERATM                  = 0x98
-	IFT_VOICEOVERFRAMERELAY           = 0x99
-	IFT_VOICEOVERIP                   = 0x68
-	IFT_X213                          = 0x5d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25HUNTGROUP                  = 0x7a
-	IFT_X25MLP                        = 0x79
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LOOPBACKNET                    = 0x7f
-	IPPROTO_3PC                       = 0x22
-	IPPROTO_ADFS                      = 0x44
-	IPPROTO_AH                        = 0x33
-	IPPROTO_AHIP                      = 0x3d
-	IPPROTO_APES                      = 0x63
-	IPPROTO_ARGUS                     = 0xd
-	IPPROTO_AX25                      = 0x5d
-	IPPROTO_BHA                       = 0x31
-	IPPROTO_BLT                       = 0x1e
-	IPPROTO_BRSATMON                  = 0x4c
-	IPPROTO_CARP                      = 0x70
-	IPPROTO_CFTP                      = 0x3e
-	IPPROTO_CHAOS                     = 0x10
-	IPPROTO_CMTP                      = 0x26
-	IPPROTO_CPHB                      = 0x49
-	IPPROTO_CPNX                      = 0x48
-	IPPROTO_DDP                       = 0x25
-	IPPROTO_DGP                       = 0x56
-	IPPROTO_DIVERT                    = 0xfe
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_EMCON                     = 0xe
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GMTP                      = 0x64
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HELLO                     = 0x3f
-	IPPROTO_HMP                       = 0x14
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IDPR                      = 0x23
-	IPPROTO_IDRP                      = 0x2d
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IGP                       = 0x55
-	IPPROTO_IGRP                      = 0x58
-	IPPROTO_IL                        = 0x28
-	IPPROTO_INLSP                     = 0x34
-	IPPROTO_INP                       = 0x20
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPCV                      = 0x47
-	IPPROTO_IPEIP                     = 0x5e
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPPC                      = 0x43
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IRTP                      = 0x1c
-	IPPROTO_KRYPTOLAN                 = 0x41
-	IPPROTO_LARP                      = 0x5b
-	IPPROTO_LEAF1                     = 0x19
-	IPPROTO_LEAF2                     = 0x1a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MEAS                      = 0x13
-	IPPROTO_MHRP                      = 0x30
-	IPPROTO_MICP                      = 0x5f
-	IPPROTO_MOBILE                    = 0x37
-	IPPROTO_MTP                       = 0x5c
-	IPPROTO_MUX                       = 0x12
-	IPPROTO_ND                        = 0x4d
-	IPPROTO_NHRP                      = 0x36
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_NSP                       = 0x1f
-	IPPROTO_NVPII                     = 0xb
-	IPPROTO_OSPFIGP                   = 0x59
-	IPPROTO_PFSYNC                    = 0xf0
-	IPPROTO_PGM                       = 0x71
-	IPPROTO_PIGP                      = 0x9
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PRM                       = 0x15
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_PVP                       = 0x4b
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_RCCMON                    = 0xa
-	IPPROTO_RDP                       = 0x1b
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_RVD                       = 0x42
-	IPPROTO_SATEXPAK                  = 0x40
-	IPPROTO_SATMON                    = 0x45
-	IPPROTO_SCCSP                     = 0x60
-	IPPROTO_SCTP                      = 0x84
-	IPPROTO_SDRP                      = 0x2a
-	IPPROTO_SEP                       = 0x21
-	IPPROTO_SKIP                      = 0x39
-	IPPROTO_SRPC                      = 0x5a
-	IPPROTO_ST                        = 0x7
-	IPPROTO_SVMTP                     = 0x52
-	IPPROTO_SWIPE                     = 0x35
-	IPPROTO_TCF                       = 0x57
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TLSP                      = 0x38
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_TPXX                      = 0x27
-	IPPROTO_TRUNK1                    = 0x17
-	IPPROTO_TRUNK2                    = 0x18
-	IPPROTO_TTP                       = 0x54
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_UNKNOWN                   = 0x102
-	IPPROTO_VINES                     = 0x53
-	IPPROTO_VISA                      = 0x46
-	IPPROTO_VMTP                      = 0x51
-	IPPROTO_WBEXPAK                   = 0x4f
-	IPPROTO_WBMON                     = 0x4e
-	IPPROTO_WSN                       = 0x4a
-	IPPROTO_XNET                      = 0xf
-	IPPROTO_XTP                       = 0x24
-	IPV6_AUTOFLOWLABEL                = 0x3b
-	IPV6_BINDV6ONLY                   = 0x1b
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_DONTFRAG                     = 0x3e
-	IPV6_DSTOPTS                      = 0x32
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_FW_ADD                       = 0x1e
-	IPV6_FW_DEL                       = 0x1f
-	IPV6_FW_FLUSH                     = 0x20
-	IPV6_FW_GET                       = 0x22
-	IPV6_FW_ZERO                      = 0x21
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_HOPLIMIT                     = 0x2f
-	IPV6_HOPOPTS                      = 0x31
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MMTU                         = 0x500
-	IPV6_MSFILTER                     = 0x4a
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_NEXTHOP                      = 0x30
-	IPV6_PATHMTU                      = 0x2c
-	IPV6_PKTINFO                      = 0x2e
-	IPV6_PKTOPTIONS                   = 0x34
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_PREFER_TEMPADDR              = 0x3f
-	IPV6_RECVDSTOPTS                  = 0x28
-	IPV6_RECVHOPLIMIT                 = 0x25
-	IPV6_RECVHOPOPTS                  = 0x27
-	IPV6_RECVPATHMTU                  = 0x2b
-	IPV6_RECVPKTINFO                  = 0x24
-	IPV6_RECVRTHDR                    = 0x26
-	IPV6_RECVTCLASS                   = 0x39
-	IPV6_RTHDR                        = 0x33
-	IPV6_RTHDRDSTOPTS                 = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x3d
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_USE_MIN_MTU                  = 0x2a
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_DUMMYNET_CONFIGURE             = 0x3c
-	IP_DUMMYNET_DEL                   = 0x3d
-	IP_DUMMYNET_FLUSH                 = 0x3e
-	IP_DUMMYNET_GET                   = 0x40
-	IP_FAITH                          = 0x16
-	IP_FW_ADD                         = 0x32
-	IP_FW_DEL                         = 0x33
-	IP_FW_FLUSH                       = 0x34
-	IP_FW_GET                         = 0x36
-	IP_FW_RESETLOG                    = 0x37
-	IP_FW_ZERO                        = 0x35
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x15
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_MEMBERSHIPS                = 0x14
-	IP_MF                             = 0x2000
-	IP_MINTTL                         = 0x42
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_MULTICAST_VIF                  = 0xe
-	IP_OFFMASK                        = 0x1fff
-	IP_OPTIONS                        = 0x1
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTTL                        = 0x41
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RSVP_OFF                       = 0x10
-	IP_RSVP_ON                        = 0xf
-	IP_RSVP_VIF_OFF                   = 0x12
-	IP_RSVP_VIF_ON                    = 0x11
-	IP_TOS                            = 0x3
-	IP_TTL                            = 0x4
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_AUTOSYNC                     = 0x7
-	MADV_CONTROL_END                  = 0xb
-	MADV_CONTROL_START                = 0xa
-	MADV_CORE                         = 0x9
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x5
-	MADV_INVAL                        = 0xa
-	MADV_NOCORE                       = 0x8
-	MADV_NORMAL                       = 0x0
-	MADV_NOSYNC                       = 0x6
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_SETMAP                       = 0xb
-	MADV_WILLNEED                     = 0x3
-	MAP_ANON                          = 0x1000
-	MAP_COPY                          = 0x2
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_INHERIT                       = 0x80
-	MAP_NOCORE                        = 0x20000
-	MAP_NOEXTEND                      = 0x100
-	MAP_NORESERVE                     = 0x40
-	MAP_NOSYNC                        = 0x800
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_SHARED                        = 0x1
-	MAP_SIZEALIGN                     = 0x40000
-	MAP_STACK                         = 0x400
-	MAP_TRYFIXED                      = 0x10000
-	MAP_VPAGETABLE                    = 0x2000
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOF                           = 0x100
-	MSG_EOR                           = 0x8
-	MSG_FBLOCKING                     = 0x10000
-	MSG_FMASK                         = 0xffff0000
-	MSG_FNONBLOCKING                  = 0x20000
-	MSG_NOSIGNAL                      = 0x400
-	MSG_NOTIFICATION                  = 0x200
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_SYNC                          = 0x800
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MS_ASYNC                          = 0x1
-	MS_INVALIDATE                     = 0x2
-	MS_SYNC                           = 0x0
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_MAXID                      = 0x4
-	NOFLSH                            = 0x80000000
-	NOTE_ATTRIB                       = 0x8
-	NOTE_CHILD                        = 0x4
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FORK                         = 0x40000000
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_OOB                          = 0x2
-	NOTE_PCTRLMASK                    = 0xf0000000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x20000
-	O_CREAT                           = 0x200
-	O_DIRECT                          = 0x10000
-	O_DIRECTORY                       = 0x8000000
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FAPPEND                         = 0x100000
-	O_FASYNCWRITE                     = 0x800000
-	O_FBLOCKING                       = 0x40000
-	O_FBUFFERED                       = 0x2000000
-	O_FMASK                           = 0x7fc0000
-	O_FNONBLOCKING                    = 0x80000
-	O_FOFFSET                         = 0x200000
-	O_FSYNC                           = 0x80
-	O_FSYNCWRITE                      = 0x400000
-	O_FUNBUFFERED                     = 0x1000000
-	O_MAPONREAD                       = 0x4000000
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x8000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_SHLOCK                          = 0x10
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	RLIMIT_AS                         = 0xa
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0xb
-	RTAX_MPLS1                        = 0x8
-	RTAX_MPLS2                        = 0x9
-	RTAX_MPLS3                        = 0xa
-	RTAX_NETMASK                      = 0x2
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_MPLS1                         = 0x100
-	RTA_MPLS2                         = 0x200
-	RTA_MPLS3                         = 0x400
-	RTA_NETMASK                       = 0x4
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_BROADCAST                     = 0x400000
-	RTF_CLONING                       = 0x100
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_LLINFO                        = 0x400
-	RTF_LOCAL                         = 0x200000
-	RTF_MODIFIED                      = 0x20
-	RTF_MPLSOPS                       = 0x1000000
-	RTF_MULTICAST                     = 0x800000
-	RTF_PINNED                        = 0x100000
-	RTF_PRCLONING                     = 0x10000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x40000
-	RTF_REJECT                        = 0x8
-	RTF_STATIC                        = 0x800
-	RTF_UP                            = 0x1
-	RTF_WASCLONED                     = 0x20000
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DELMADDR                      = 0x10
-	RTM_GET                           = 0x4
-	RTM_IEEE80211                     = 0x12
-	RTM_IFANNOUNCE                    = 0x11
-	RTM_IFINFO                        = 0xe
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_NEWMADDR                      = 0xf
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x6
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_IWCAPSEGS                     = 0x400
-	RTV_IWMAXSEGS                     = 0x200
-	RTV_MSL                           = 0x100
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	SCM_CREDS                         = 0x3
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x2
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCADDRT                         = 0x8040720a
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCALIFADDR                      = 0x8118691b
-	SIOCATMARK                        = 0x40047307
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDELRT                         = 0x8040720b
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFPHYADDR                    = 0x80206949
-	SIOCDLIFADDR                      = 0x8118691d
-	SIOCGDRVSPEC                      = 0xc028697b
-	SIOCGETSGCNT                      = 0xc0207210
-	SIOCGETVIFCNT                     = 0xc028720f
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCAP                        = 0xc020691f
-	SIOCGIFCONF                       = 0xc0106924
-	SIOCGIFDATA                       = 0xc0206926
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFGMEMB                      = 0xc028698a
-	SIOCGIFINDEX                      = 0xc0206920
-	SIOCGIFMEDIA                      = 0xc0306938
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc0206933
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206948
-	SIOCGIFPHYS                       = 0xc0206935
-	SIOCGIFPOLLCPU                    = 0xc020697e
-	SIOCGIFPSRCADDR                   = 0xc0206947
-	SIOCGIFSTATUS                     = 0xc331693b
-	SIOCGIFTSOLEN                     = 0xc0206980
-	SIOCGLIFADDR                      = 0xc118691c
-	SIOCGLIFPHYADDR                   = 0xc118694b
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCGPRIVATE_0                    = 0xc0206950
-	SIOCGPRIVATE_1                    = 0xc0206951
-	SIOCIFCREATE                      = 0xc020697a
-	SIOCIFCREATE2                     = 0xc020697c
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc0106978
-	SIOCSDRVSPEC                      = 0x8028697b
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFCAP                        = 0x8020691e
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFLLADDR                     = 0x8020693c
-	SIOCSIFMEDIA                      = 0xc0206937
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x80206934
-	SIOCSIFNAME                       = 0x80206928
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x80406946
-	SIOCSIFPHYS                       = 0x80206936
-	SIOCSIFPOLLCPU                    = 0x8020697d
-	SIOCSIFTSOLEN                     = 0x8020697f
-	SIOCSLIFPHYADDR                   = 0x8118694a
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SOCK_DGRAM                        = 0x2
-	SOCK_MAXADDRLEN                   = 0xff
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_ACCEPTFILTER                   = 0x1000
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LINGER                         = 0x80
-	SO_NOSIGPIPE                      = 0x800
-	SO_OOBINLINE                      = 0x100
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDSPACE                       = 0x100a
-	SO_SNDTIMEO                       = 0x1005
-	SO_TIMESTAMP                      = 0x400
-	SO_TYPE                           = 0x1008
-	SO_USELOOPBACK                    = 0x40
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_FASTKEEP                      = 0x80
-	TCP_KEEPCNT                       = 0x400
-	TCP_KEEPIDLE                      = 0x100
-	TCP_KEEPINIT                      = 0x20
-	TCP_KEEPINTVL                     = 0x200
-	TCP_MAXBURST                      = 0x4
-	TCP_MAXHLEN                       = 0x3c
-	TCP_MAXOLEN                       = 0x28
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MINMSS                        = 0x100
-	TCP_MIN_WINSHIFT                  = 0x5
-	TCP_MSS                           = 0x200
-	TCP_NODELAY                       = 0x1
-	TCP_NOOPT                         = 0x8
-	TCP_NOPUSH                        = 0x4
-	TCP_SIGNATURE_ENABLE              = 0x10
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDCDTIMESTAMP                  = 0x40107458
-	TIOCDRAIN                         = 0x2000745e
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLUSH                         = 0x80047410
-	TIOCGDRAINWAIT                    = 0x40047456
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGPGRP                         = 0x40047477
-	TIOCGSID                          = 0x40047463
-	TIOCGSIZE                         = 0x40087468
-	TIOCGWINSZ                        = 0x40087468
-	TIOCISPTMASTER                    = 0x20007455
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGDTRWAIT                     = 0x4004745a
-	TIOCMGET                          = 0x4004746a
-	TIOCMODG                          = 0x40047403
-	TIOCMODS                          = 0x80047404
-	TIOCMSDTRWAIT                     = 0x8004745b
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDRAINWAIT                    = 0x80047457
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSIG                           = 0x2000745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSSIZE                         = 0x80087467
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x20007465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCTIMESTAMP                     = 0x40107459
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VCHECKPT                          = 0x13
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VERASE2                           = 0x7
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WCONTINUED                        = 0x4
-	WCOREFLAG                         = 0x80
-	WLINUXCLONE                       = 0x80000000
-	WNOHANG                           = 0x1
-	WSTOPPED                          = 0x7f
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EASYNC          = syscall.Errno(0x63)
-	EAUTH           = syscall.Errno(0x50)
-	EBADF           = syscall.Errno(0x9)
-	EBADMSG         = syscall.Errno(0x59)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x55)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDOM            = syscall.Errno(0x21)
-	EDOOFUS         = syscall.Errno(0x58)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x52)
-	EILSEQ          = syscall.Errno(0x56)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x63)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5a)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x57)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x5b)
-	ENOMEDIUM       = syscall.Errno(0x5d)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x53)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x2d)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x2d)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x5c)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUNUSED94       = syscall.Errno(0x5e)
-	EUNUSED95       = syscall.Errno(0x5f)
-	EUNUSED96       = syscall.Errno(0x60)
-	EUNUSED97       = syscall.Errno(0x61)
-	EUNUSED98       = syscall.Errno(0x62)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT     = syscall.Signal(0x6)
-	SIGALRM     = syscall.Signal(0xe)
-	SIGBUS      = syscall.Signal(0xa)
-	SIGCHLD     = syscall.Signal(0x14)
-	SIGCKPT     = syscall.Signal(0x21)
-	SIGCKPTEXIT = syscall.Signal(0x22)
-	SIGCONT     = syscall.Signal(0x13)
-	SIGEMT      = syscall.Signal(0x7)
-	SIGFPE      = syscall.Signal(0x8)
-	SIGHUP      = syscall.Signal(0x1)
-	SIGILL      = syscall.Signal(0x4)
-	SIGINFO     = syscall.Signal(0x1d)
-	SIGINT      = syscall.Signal(0x2)
-	SIGIO       = syscall.Signal(0x17)
-	SIGIOT      = syscall.Signal(0x6)
-	SIGKILL     = syscall.Signal(0x9)
-	SIGPIPE     = syscall.Signal(0xd)
-	SIGPROF     = syscall.Signal(0x1b)
-	SIGQUIT     = syscall.Signal(0x3)
-	SIGSEGV     = syscall.Signal(0xb)
-	SIGSTOP     = syscall.Signal(0x11)
-	SIGSYS      = syscall.Signal(0xc)
-	SIGTERM     = syscall.Signal(0xf)
-	SIGTHR      = syscall.Signal(0x20)
-	SIGTRAP     = syscall.Signal(0x5)
-	SIGTSTP     = syscall.Signal(0x12)
-	SIGTTIN     = syscall.Signal(0x15)
-	SIGTTOU     = syscall.Signal(0x16)
-	SIGURG      = syscall.Signal(0x10)
-	SIGUSR1     = syscall.Signal(0x1e)
-	SIGUSR2     = syscall.Signal(0x1f)
-	SIGVTALRM   = syscall.Signal(0x1a)
-	SIGWINCH    = syscall.Signal(0x1c)
-	SIGXCPU     = syscall.Signal(0x18)
-	SIGXFSZ     = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:  "operation not permitted",
-	2:  "no such file or directory",
-	3:  "no such process",
-	4:  "interrupted system call",
-	5:  "input/output error",
-	6:  "device not configured",
-	7:  "argument list too long",
-	8:  "exec format error",
-	9:  "bad file descriptor",
-	10: "no child processes",
-	11: "resource deadlock avoided",
-	12: "cannot allocate memory",
-	13: "permission denied",
-	14: "bad address",
-	15: "block device required",
-	16: "device busy",
-	17: "file exists",
-	18: "cross-device link",
-	19: "operation not supported by device",
-	20: "not a directory",
-	21: "is a directory",
-	22: "invalid argument",
-	23: "too many open files in system",
-	24: "too many open files",
-	25: "inappropriate ioctl for device",
-	26: "text file busy",
-	27: "file too large",
-	28: "no space left on device",
-	29: "illegal seek",
-	30: "read-only file system",
-	31: "too many links",
-	32: "broken pipe",
-	33: "numerical argument out of domain",
-	34: "result too large",
-	35: "resource temporarily unavailable",
-	36: "operation now in progress",
-	37: "operation already in progress",
-	38: "socket operation on non-socket",
-	39: "destination address required",
-	40: "message too long",
-	41: "protocol wrong type for socket",
-	42: "protocol not available",
-	43: "protocol not supported",
-	44: "socket type not supported",
-	45: "operation not supported",
-	46: "protocol family not supported",
-	47: "address family not supported by protocol family",
-	48: "address already in use",
-	49: "can't assign requested address",
-	50: "network is down",
-	51: "network is unreachable",
-	52: "network dropped connection on reset",
-	53: "software caused connection abort",
-	54: "connection reset by peer",
-	55: "no buffer space available",
-	56: "socket is already connected",
-	57: "socket is not connected",
-	58: "can't send after socket shutdown",
-	59: "too many references: can't splice",
-	60: "operation timed out",
-	61: "connection refused",
-	62: "too many levels of symbolic links",
-	63: "file name too long",
-	64: "host is down",
-	65: "no route to host",
-	66: "directory not empty",
-	67: "too many processes",
-	68: "too many users",
-	69: "disc quota exceeded",
-	70: "stale NFS file handle",
-	71: "too many levels of remote in path",
-	72: "RPC struct is bad",
-	73: "RPC version wrong",
-	74: "RPC prog. not avail",
-	75: "program version wrong",
-	76: "bad procedure for program",
-	77: "no locks available",
-	78: "function not implemented",
-	79: "inappropriate file type or format",
-	80: "authentication error",
-	81: "need authenticator",
-	82: "identifier removed",
-	83: "no message of desired type",
-	84: "value too large to be stored in data type",
-	85: "operation canceled",
-	86: "illegal byte sequence",
-	87: "attribute not found",
-	88: "programming error",
-	89: "bad message",
-	90: "multihop attempted",
-	91: "link has been severed",
-	92: "protocol error",
-	93: "no medium found",
-	94: "unknown error: 94",
-	95: "unknown error: 95",
-	96: "unknown error: 96",
-	97: "unknown error: 97",
-	98: "unknown error: 98",
-	99: "unknown error: 99",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "suspended (signal)",
-	18: "suspended",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-	32: "thread Scheduler",
-	33: "checkPoint",
-	34: "checkPointExit",
-}


[30/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
deleted file mode 100644
index 7b95751..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go
+++ /dev/null
@@ -1,1743 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,freebsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_ARP                            = 0x23
-	AF_ATM                            = 0x1e
-	AF_BLUETOOTH                      = 0x24
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1a
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x25
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x1c
-	AF_INET6_SDP                      = 0x2a
-	AF_INET_SDP                       = 0x28
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1a
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x2a
-	AF_NATM                           = 0x1d
-	AF_NETBIOS                        = 0x6
-	AF_NETGRAPH                       = 0x20
-	AF_OSI                            = 0x7
-	AF_PUP                            = 0x4
-	AF_ROUTE                          = 0x11
-	AF_SCLUSTER                       = 0x22
-	AF_SIP                            = 0x18
-	AF_SLOW                           = 0x21
-	AF_SNA                            = 0xb
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	AF_VENDOR00                       = 0x27
-	AF_VENDOR01                       = 0x29
-	AF_VENDOR02                       = 0x2b
-	AF_VENDOR03                       = 0x2d
-	AF_VENDOR04                       = 0x2f
-	AF_VENDOR05                       = 0x31
-	AF_VENDOR06                       = 0x33
-	AF_VENDOR07                       = 0x35
-	AF_VENDOR08                       = 0x37
-	AF_VENDOR09                       = 0x39
-	AF_VENDOR10                       = 0x3b
-	AF_VENDOR11                       = 0x3d
-	AF_VENDOR12                       = 0x3f
-	AF_VENDOR13                       = 0x41
-	AF_VENDOR14                       = 0x43
-	AF_VENDOR15                       = 0x45
-	AF_VENDOR16                       = 0x47
-	AF_VENDOR17                       = 0x49
-	AF_VENDOR18                       = 0x4b
-	AF_VENDOR19                       = 0x4d
-	AF_VENDOR20                       = 0x4f
-	AF_VENDOR21                       = 0x51
-	AF_VENDOR22                       = 0x53
-	AF_VENDOR23                       = 0x55
-	AF_VENDOR24                       = 0x57
-	AF_VENDOR25                       = 0x59
-	AF_VENDOR26                       = 0x5b
-	AF_VENDOR27                       = 0x5d
-	AF_VENDOR28                       = 0x5f
-	AF_VENDOR29                       = 0x61
-	AF_VENDOR30                       = 0x63
-	AF_VENDOR31                       = 0x65
-	AF_VENDOR32                       = 0x67
-	AF_VENDOR33                       = 0x69
-	AF_VENDOR34                       = 0x6b
-	AF_VENDOR35                       = 0x6d
-	AF_VENDOR36                       = 0x6f
-	AF_VENDOR37                       = 0x71
-	AF_VENDOR38                       = 0x73
-	AF_VENDOR39                       = 0x75
-	AF_VENDOR40                       = 0x77
-	AF_VENDOR41                       = 0x79
-	AF_VENDOR42                       = 0x7b
-	AF_VENDOR43                       = 0x7d
-	AF_VENDOR44                       = 0x7f
-	AF_VENDOR45                       = 0x81
-	AF_VENDOR46                       = 0x83
-	AF_VENDOR47                       = 0x85
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B460800                           = 0x70800
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B921600                           = 0xe1000
-	B9600                             = 0x2580
-	BIOCFEEDBACK                      = 0x8004427c
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDIRECTION                    = 0x40044276
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc0084279
-	BIOCGETBUFMODE                    = 0x4004427d
-	BIOCGETIF                         = 0x4020426b
-	BIOCGETZMAX                       = 0x4004427f
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044272
-	BIOCGRTIMEOUT                     = 0x4008426e
-	BIOCGSEESENT                      = 0x40044276
-	BIOCGSTATS                        = 0x4008426f
-	BIOCGTSTAMP                       = 0x40044283
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCLOCK                          = 0x2000427a
-	BIOCPROMISC                       = 0x20004269
-	BIOCROTZBUF                       = 0x400c4280
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDIRECTION                    = 0x80044277
-	BIOCSDLT                          = 0x80044278
-	BIOCSETBUFMODE                    = 0x8004427e
-	BIOCSETF                          = 0x80084267
-	BIOCSETFNR                        = 0x80084282
-	BIOCSETIF                         = 0x8020426c
-	BIOCSETWF                         = 0x8008427b
-	BIOCSETZBUF                       = 0x800c4281
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044273
-	BIOCSRTIMEOUT                     = 0x8008426d
-	BIOCSSEESENT                      = 0x80044277
-	BIOCSTSTAMP                       = 0x80044284
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_BUFMODE_BUFFER                = 0x1
-	BPF_BUFMODE_ZBUF                  = 0x2
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x80000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_T_BINTIME                     = 0x2
-	BPF_T_BINTIME_FAST                = 0x102
-	BPF_T_BINTIME_MONOTONIC           = 0x202
-	BPF_T_BINTIME_MONOTONIC_FAST      = 0x302
-	BPF_T_FAST                        = 0x100
-	BPF_T_FLAG_MASK                   = 0x300
-	BPF_T_FORMAT_MASK                 = 0x3
-	BPF_T_MICROTIME                   = 0x0
-	BPF_T_MICROTIME_FAST              = 0x100
-	BPF_T_MICROTIME_MONOTONIC         = 0x200
-	BPF_T_MICROTIME_MONOTONIC_FAST    = 0x300
-	BPF_T_MONOTONIC                   = 0x200
-	BPF_T_MONOTONIC_FAST              = 0x300
-	BPF_T_NANOTIME                    = 0x1
-	BPF_T_NANOTIME_FAST               = 0x101
-	BPF_T_NANOTIME_MONOTONIC          = 0x201
-	BPF_T_NANOTIME_MONOTONIC_FAST     = 0x301
-	BPF_T_NONE                        = 0x3
-	BPF_T_NORMAL                      = 0x0
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CLOCK_MONOTONIC                   = 0x4
-	CLOCK_MONOTONIC_FAST              = 0xc
-	CLOCK_MONOTONIC_PRECISE           = 0xb
-	CLOCK_PROCESS_CPUTIME_ID          = 0xf
-	CLOCK_PROF                        = 0x2
-	CLOCK_REALTIME                    = 0x0
-	CLOCK_REALTIME_FAST               = 0xa
-	CLOCK_REALTIME_PRECISE            = 0x9
-	CLOCK_SECOND                      = 0xd
-	CLOCK_THREAD_CPUTIME_ID           = 0xe
-	CLOCK_UPTIME                      = 0x5
-	CLOCK_UPTIME_FAST                 = 0x8
-	CLOCK_UPTIME_PRECISE              = 0x7
-	CLOCK_VIRTUAL                     = 0x1
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0x18
-	CTL_NET                           = 0x4
-	DLT_A429                          = 0xb8
-	DLT_A653_ICM                      = 0xb9
-	DLT_AIRONET_HEADER                = 0x78
-	DLT_AOS                           = 0xde
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ARCNET_LINUX                  = 0x81
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AURORA                        = 0x7e
-	DLT_AX25                          = 0x3
-	DLT_AX25_KISS                     = 0xca
-	DLT_BACNET_MS_TP                  = 0xa5
-	DLT_BLUETOOTH_HCI_H4              = 0xbb
-	DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-	DLT_CAN20B                        = 0xbe
-	DLT_CAN_SOCKETCAN                 = 0xe3
-	DLT_CHAOS                         = 0x5
-	DLT_CHDLC                         = 0x68
-	DLT_CISCO_IOS                     = 0x76
-	DLT_C_HDLC                        = 0x68
-	DLT_C_HDLC_WITH_DIR               = 0xcd
-	DLT_DBUS                          = 0xe7
-	DLT_DECT                          = 0xdd
-	DLT_DOCSIS                        = 0x8f
-	DLT_DVB_CI                        = 0xeb
-	DLT_ECONET                        = 0x73
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0x6d
-	DLT_ERF                           = 0xc5
-	DLT_ERF_ETH                       = 0xaf
-	DLT_ERF_POS                       = 0xb0
-	DLT_FC_2                          = 0xe0
-	DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-	DLT_FDDI                          = 0xa
-	DLT_FLEXRAY                       = 0xd2
-	DLT_FRELAY                        = 0x6b
-	DLT_FRELAY_WITH_DIR               = 0xce
-	DLT_GCOM_SERIAL                   = 0xad
-	DLT_GCOM_T1E1                     = 0xac
-	DLT_GPF_F                         = 0xab
-	DLT_GPF_T                         = 0xaa
-	DLT_GPRS_LLC                      = 0xa9
-	DLT_GSMTAP_ABIS                   = 0xda
-	DLT_GSMTAP_UM                     = 0xd9
-	DLT_HHDLC                         = 0x79
-	DLT_IBM_SN                        = 0x92
-	DLT_IBM_SP                        = 0x91
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_IEEE802_15_4                  = 0xc3
-	DLT_IEEE802_15_4_LINUX            = 0xbf
-	DLT_IEEE802_15_4_NOFCS            = 0xe6
-	DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-	DLT_IEEE802_16_MAC_CPS            = 0xbc
-	DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-	DLT_IPFILTER                      = 0x74
-	DLT_IPMB                          = 0xc7
-	DLT_IPMB_LINUX                    = 0xd1
-	DLT_IPNET                         = 0xe2
-	DLT_IPOIB                         = 0xf2
-	DLT_IPV4                          = 0xe4
-	DLT_IPV6                          = 0xe5
-	DLT_IP_OVER_FC                    = 0x7a
-	DLT_JUNIPER_ATM1                  = 0x89
-	DLT_JUNIPER_ATM2                  = 0x87
-	DLT_JUNIPER_ATM_CEMIC             = 0xee
-	DLT_JUNIPER_CHDLC                 = 0xb5
-	DLT_JUNIPER_ES                    = 0x84
-	DLT_JUNIPER_ETHER                 = 0xb2
-	DLT_JUNIPER_FIBRECHANNEL          = 0xea
-	DLT_JUNIPER_FRELAY                = 0xb4
-	DLT_JUNIPER_GGSN                  = 0x85
-	DLT_JUNIPER_ISM                   = 0xc2
-	DLT_JUNIPER_MFR                   = 0x86
-	DLT_JUNIPER_MLFR                  = 0x83
-	DLT_JUNIPER_MLPPP                 = 0x82
-	DLT_JUNIPER_MONITOR               = 0xa4
-	DLT_JUNIPER_PIC_PEER              = 0xae
-	DLT_JUNIPER_PPP                   = 0xb3
-	DLT_JUNIPER_PPPOE                 = 0xa7
-	DLT_JUNIPER_PPPOE_ATM             = 0xa8
-	DLT_JUNIPER_SERVICES              = 0x88
-	DLT_JUNIPER_SRX_E2E               = 0xe9
-	DLT_JUNIPER_ST                    = 0xc8
-	DLT_JUNIPER_VP                    = 0xb7
-	DLT_JUNIPER_VS                    = 0xe8
-	DLT_LAPB_WITH_DIR                 = 0xcf
-	DLT_LAPD                          = 0xcb
-	DLT_LIN                           = 0xd4
-	DLT_LINUX_EVDEV                   = 0xd8
-	DLT_LINUX_IRDA                    = 0x90
-	DLT_LINUX_LAPD                    = 0xb1
-	DLT_LINUX_PPP_WITHDIRECTION       = 0xa6
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_LTALK                         = 0x72
-	DLT_MATCHING_MAX                  = 0xf6
-	DLT_MATCHING_MIN                  = 0x68
-	DLT_MFR                           = 0xb6
-	DLT_MOST                          = 0xd3
-	DLT_MPEG_2_TS                     = 0xf3
-	DLT_MPLS                          = 0xdb
-	DLT_MTP2                          = 0x8c
-	DLT_MTP2_WITH_PHDR                = 0x8b
-	DLT_MTP3                          = 0x8d
-	DLT_MUX27010                      = 0xec
-	DLT_NETANALYZER                   = 0xf0
-	DLT_NETANALYZER_TRANSPARENT       = 0xf1
-	DLT_NFC_LLCP                      = 0xf5
-	DLT_NFLOG                         = 0xef
-	DLT_NG40                          = 0xf4
-	DLT_NULL                          = 0x0
-	DLT_PCI_EXP                       = 0x7d
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x79
-	DLT_PPI                           = 0xc0
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_PPPD                      = 0xa6
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PPP_WITH_DIR                  = 0xcc
-	DLT_PPP_WITH_DIRECTION            = 0xa6
-	DLT_PRISM_HEADER                  = 0x77
-	DLT_PRONET                        = 0x4
-	DLT_RAIF1                         = 0xc6
-	DLT_RAW                           = 0xc
-	DLT_RIO                           = 0x7c
-	DLT_SCCP                          = 0x8e
-	DLT_SITA                          = 0xc4
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DLT_STANAG_5066_D_PDU             = 0xed
-	DLT_SUNATM                        = 0x7b
-	DLT_SYMANTEC_FIREWALL             = 0x63
-	DLT_TZSP                          = 0x80
-	DLT_USB                           = 0xba
-	DLT_USB_LINUX                     = 0xbd
-	DLT_USB_LINUX_MMAPPED             = 0xdc
-	DLT_USER0                         = 0x93
-	DLT_USER1                         = 0x94
-	DLT_USER10                        = 0x9d
-	DLT_USER11                        = 0x9e
-	DLT_USER12                        = 0x9f
-	DLT_USER13                        = 0xa0
-	DLT_USER14                        = 0xa1
-	DLT_USER15                        = 0xa2
-	DLT_USER2                         = 0x95
-	DLT_USER3                         = 0x96
-	DLT_USER4                         = 0x97
-	DLT_USER5                         = 0x98
-	DLT_USER6                         = 0x99
-	DLT_USER7                         = 0x9a
-	DLT_USER8                         = 0x9b
-	DLT_USER9                         = 0x9c
-	DLT_WIHART                        = 0xdf
-	DLT_X2E_SERIAL                    = 0xd5
-	DLT_X2E_XORAYA                    = 0xd6
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EVFILT_AIO                        = -0x3
-	EVFILT_FS                         = -0x9
-	EVFILT_LIO                        = -0xa
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0xb
-	EVFILT_TIMER                      = -0x7
-	EVFILT_USER                       = -0xb
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_DISPATCH                       = 0x80
-	EV_DROP                           = 0x1000
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_RECEIPT                        = 0x40
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTATTR_NAMESPACE_EMPTY           = 0x0
-	EXTATTR_NAMESPACE_SYSTEM          = 0x2
-	EXTATTR_NAMESPACE_USER            = 0x1
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_CANCEL                          = 0x5
-	F_DUP2FD                          = 0xa
-	F_DUP2FD_CLOEXEC                  = 0x12
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0x11
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0xb
-	F_GETOWN                          = 0x5
-	F_OGETLK                          = 0x7
-	F_OK                              = 0x0
-	F_OSETLK                          = 0x8
-	F_OSETLKW                         = 0x9
-	F_RDAHEAD                         = 0x10
-	F_RDLCK                           = 0x1
-	F_READAHEAD                       = 0xf
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0xc
-	F_SETLKW                          = 0xd
-	F_SETLK_REMOTE                    = 0xe
-	F_SETOWN                          = 0x6
-	F_UNLCK                           = 0x2
-	F_UNLCKSYS                        = 0x4
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFAN_ARRIVAL                      = 0x0
-	IFAN_DEPARTURE                    = 0x1
-	IFF_ALLMULTI                      = 0x200
-	IFF_ALTPHYS                       = 0x4000
-	IFF_BROADCAST                     = 0x2
-	IFF_CANTCHANGE                    = 0x218f72
-	IFF_CANTCONFIG                    = 0x10000
-	IFF_DEBUG                         = 0x4
-	IFF_DRV_OACTIVE                   = 0x400
-	IFF_DRV_RUNNING                   = 0x40
-	IFF_DYING                         = 0x200000
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MONITOR                       = 0x40000
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PPROMISC                      = 0x20000
-	IFF_PROMISC                       = 0x100
-	IFF_RENAMING                      = 0x400000
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_SMART                         = 0x20
-	IFF_STATICARP                     = 0x80000
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_A12MPPSWITCH                  = 0x82
-	IFT_AAL2                          = 0xbb
-	IFT_AAL5                          = 0x31
-	IFT_ADSL                          = 0x5e
-	IFT_AFLANE8023                    = 0x3b
-	IFT_AFLANE8025                    = 0x3c
-	IFT_ARAP                          = 0x58
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ASYNC                         = 0x54
-	IFT_ATM                           = 0x25
-	IFT_ATMDXI                        = 0x69
-	IFT_ATMFUNI                       = 0x6a
-	IFT_ATMIMA                        = 0x6b
-	IFT_ATMLOGICAL                    = 0x50
-	IFT_ATMRADIO                      = 0xbd
-	IFT_ATMSUBINTERFACE               = 0x86
-	IFT_ATMVCIENDPT                   = 0xc2
-	IFT_ATMVIRTUAL                    = 0x95
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
-	IFT_BRIDGE                        = 0xd1
-	IFT_BSC                           = 0x53
-	IFT_CARP                          = 0xf8
-	IFT_CCTEMUL                       = 0x3d
-	IFT_CEPT                          = 0x13
-	IFT_CES                           = 0x85
-	IFT_CHANNEL                       = 0x46
-	IFT_CNR                           = 0x55
-	IFT_COFFEE                        = 0x84
-	IFT_COMPOSITELINK                 = 0x9b
-	IFT_DCN                           = 0x8d
-	IFT_DIGITALPOWERLINE              = 0x8a
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-	IFT_DLSW                          = 0x4a
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
-	IFT_DOCSCABLEMACLAYER             = 0x7f
-	IFT_DOCSCABLEUPSTREAM             = 0x81
-	IFT_DS0                           = 0x51
-	IFT_DS0BUNDLE                     = 0x52
-	IFT_DS1FDL                        = 0xaa
-	IFT_DS3                           = 0x1e
-	IFT_DTM                           = 0x8c
-	IFT_DVBASILN                      = 0xac
-	IFT_DVBASIOUT                     = 0xad
-	IFT_DVBRCCDOWNSTREAM              = 0x93
-	IFT_DVBRCCMACLAYER                = 0x92
-	IFT_DVBRCCUPSTREAM                = 0x94
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_EPLRS                         = 0x57
-	IFT_ESCON                         = 0x49
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0xf2
-	IFT_FAST                          = 0x7d
-	IFT_FASTETHER                     = 0x3e
-	IFT_FASTETHERFX                   = 0x45
-	IFT_FDDI                          = 0xf
-	IFT_FIBRECHANNEL                  = 0x38
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
-	IFT_FRAMERELAYMPI                 = 0x5c
-	IFT_FRDLCIENDPT                   = 0xc1
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_FRF16MFRBUNDLE                = 0xa3
-	IFT_FRFORWARD                     = 0x9e
-	IFT_G703AT2MB                     = 0x43
-	IFT_G703AT64K                     = 0x42
-	IFT_GIF                           = 0xf0
-	IFT_GIGABITETHERNET               = 0x75
-	IFT_GR303IDT                      = 0xb2
-	IFT_GR303RDT                      = 0xb1
-	IFT_H323GATEKEEPER                = 0xa4
-	IFT_H323PROXY                     = 0xa5
-	IFT_HDH1822                       = 0x3
-	IFT_HDLC                          = 0x76
-	IFT_HDSL2                         = 0xa8
-	IFT_HIPERLAN2                     = 0xb7
-	IFT_HIPPI                         = 0x2f
-	IFT_HIPPIINTERFACE                = 0x39
-	IFT_HOSTPAD                       = 0x5a
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IBM370PARCHAN                 = 0x48
-	IFT_IDSL                          = 0x9a
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE80211                     = 0x47
-	IFT_IEEE80212                     = 0x37
-	IFT_IEEE8023ADLAG                 = 0xa1
-	IFT_IFGSN                         = 0x91
-	IFT_IMT                           = 0xbe
-	IFT_INFINIBAND                    = 0xc7
-	IFT_INTERLEAVE                    = 0x7c
-	IFT_IP                            = 0x7e
-	IFT_IPFORWARD                     = 0x8e
-	IFT_IPOVERATM                     = 0x72
-	IFT_IPOVERCDLC                    = 0x6d
-	IFT_IPOVERCLAW                    = 0x6e
-	IFT_IPSWITCH                      = 0x4e
-	IFT_IPXIP                         = 0xf9
-	IFT_ISDN                          = 0x3f
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISDNS                         = 0x4b
-	IFT_ISDNU                         = 0x4c
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88025CRFPINT               = 0x62
-	IFT_ISO88025DTR                   = 0x56
-	IFT_ISO88025FIBER                 = 0x73
-	IFT_ISO88026                      = 0xa
-	IFT_ISUP                          = 0xb3
-	IFT_L2VLAN                        = 0x87
-	IFT_L3IPVLAN                      = 0x88
-	IFT_L3IPXVLAN                     = 0x89
-	IFT_LAPB                          = 0x10
-	IFT_LAPD                          = 0x4d
-	IFT_LAPF                          = 0x77
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MEDIAMAILOVERIP               = 0x8b
-	IFT_MFSIGLINK                     = 0xa7
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_MPC                           = 0x71
-	IFT_MPLS                          = 0xa6
-	IFT_MPLSTUNNEL                    = 0x96
-	IFT_MSDSL                         = 0x8f
-	IFT_MVL                           = 0xbf
-	IFT_MYRINET                       = 0x63
-	IFT_NFAS                          = 0xaf
-	IFT_NSIP                          = 0x1b
-	IFT_OPTICALCHANNEL                = 0xc3
-	IFT_OPTICALTRANSPORT              = 0xc4
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PFLOG                         = 0xf6
-	IFT_PFSYNC                        = 0xf7
-	IFT_PLC                           = 0xae
-	IFT_POS                           = 0xab
-	IFT_PPP                           = 0x17
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
-	IFT_PROPBWAP2MP                   = 0xb8
-	IFT_PROPCNLS                      = 0x59
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PROPWIRELESSP2P               = 0x9d
-	IFT_PTPSERIAL                     = 0x16
-	IFT_PVC                           = 0xf1
-	IFT_QLLC                          = 0x44
-	IFT_RADIOMAC                      = 0xbc
-	IFT_RADSL                         = 0x5f
-	IFT_REACHDSL                      = 0xc0
-	IFT_RFC1483                       = 0x9f
-	IFT_RS232                         = 0x21
-	IFT_RSRB                          = 0x4f
-	IFT_SDLC                          = 0x11
-	IFT_SDSL                          = 0x60
-	IFT_SHDSL                         = 0xa9
-	IFT_SIP                           = 0x1f
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_SRP                           = 0x97
-	IFT_SS7SIGLINK                    = 0x9c
-	IFT_STACKTOSTACK                  = 0x6f
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0xd7
-	IFT_T1                            = 0x12
-	IFT_TDLC                          = 0x74
-	IFT_TERMPAD                       = 0x5b
-	IFT_TR008                         = 0xb0
-	IFT_TRANSPHDLC                    = 0x7b
-	IFT_TUNNEL                        = 0x83
-	IFT_ULTRA                         = 0x1d
-	IFT_USB                           = 0xa0
-	IFT_V11                           = 0x40
-	IFT_V35                           = 0x2d
-	IFT_V36                           = 0x41
-	IFT_V37                           = 0x78
-	IFT_VDSL                          = 0x61
-	IFT_VIRTUALIPADDRESS              = 0x70
-	IFT_VOICEEM                       = 0x64
-	IFT_VOICEENCAP                    = 0x67
-	IFT_VOICEFXO                      = 0x65
-	IFT_VOICEFXS                      = 0x66
-	IFT_VOICEOVERATM                  = 0x98
-	IFT_VOICEOVERFRAMERELAY           = 0x99
-	IFT_VOICEOVERIP                   = 0x68
-	IFT_X213                          = 0x5d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25HUNTGROUP                  = 0x7a
-	IFT_X25MLP                        = 0x79
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LOOPBACKNET                    = 0x7f
-	IN_RFC3021_MASK                   = 0xfffffffe
-	IPPROTO_3PC                       = 0x22
-	IPPROTO_ADFS                      = 0x44
-	IPPROTO_AH                        = 0x33
-	IPPROTO_AHIP                      = 0x3d
-	IPPROTO_APES                      = 0x63
-	IPPROTO_ARGUS                     = 0xd
-	IPPROTO_AX25                      = 0x5d
-	IPPROTO_BHA                       = 0x31
-	IPPROTO_BLT                       = 0x1e
-	IPPROTO_BRSATMON                  = 0x4c
-	IPPROTO_CARP                      = 0x70
-	IPPROTO_CFTP                      = 0x3e
-	IPPROTO_CHAOS                     = 0x10
-	IPPROTO_CMTP                      = 0x26
-	IPPROTO_CPHB                      = 0x49
-	IPPROTO_CPNX                      = 0x48
-	IPPROTO_DDP                       = 0x25
-	IPPROTO_DGP                       = 0x56
-	IPPROTO_DIVERT                    = 0x102
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_EMCON                     = 0xe
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GMTP                      = 0x64
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HELLO                     = 0x3f
-	IPPROTO_HIP                       = 0x8b
-	IPPROTO_HMP                       = 0x14
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IDPR                      = 0x23
-	IPPROTO_IDRP                      = 0x2d
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IGP                       = 0x55
-	IPPROTO_IGRP                      = 0x58
-	IPPROTO_IL                        = 0x28
-	IPPROTO_INLSP                     = 0x34
-	IPPROTO_INP                       = 0x20
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPCV                      = 0x47
-	IPPROTO_IPEIP                     = 0x5e
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPPC                      = 0x43
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IRTP                      = 0x1c
-	IPPROTO_KRYPTOLAN                 = 0x41
-	IPPROTO_LARP                      = 0x5b
-	IPPROTO_LEAF1                     = 0x19
-	IPPROTO_LEAF2                     = 0x1a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MEAS                      = 0x13
-	IPPROTO_MH                        = 0x87
-	IPPROTO_MHRP                      = 0x30
-	IPPROTO_MICP                      = 0x5f
-	IPPROTO_MOBILE                    = 0x37
-	IPPROTO_MPLS                      = 0x89
-	IPPROTO_MTP                       = 0x5c
-	IPPROTO_MUX                       = 0x12
-	IPPROTO_ND                        = 0x4d
-	IPPROTO_NHRP                      = 0x36
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_NSP                       = 0x1f
-	IPPROTO_NVPII                     = 0xb
-	IPPROTO_OLD_DIVERT                = 0xfe
-	IPPROTO_OSPFIGP                   = 0x59
-	IPPROTO_PFSYNC                    = 0xf0
-	IPPROTO_PGM                       = 0x71
-	IPPROTO_PIGP                      = 0x9
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PRM                       = 0x15
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_PVP                       = 0x4b
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_RCCMON                    = 0xa
-	IPPROTO_RDP                       = 0x1b
-	IPPROTO_RESERVED_253              = 0xfd
-	IPPROTO_RESERVED_254              = 0xfe
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_RVD                       = 0x42
-	IPPROTO_SATEXPAK                  = 0x40
-	IPPROTO_SATMON                    = 0x45
-	IPPROTO_SCCSP                     = 0x60
-	IPPROTO_SCTP                      = 0x84
-	IPPROTO_SDRP                      = 0x2a
-	IPPROTO_SEND                      = 0x103
-	IPPROTO_SEP                       = 0x21
-	IPPROTO_SHIM6                     = 0x8c
-	IPPROTO_SKIP                      = 0x39
-	IPPROTO_SPACER                    = 0x7fff
-	IPPROTO_SRPC                      = 0x5a
-	IPPROTO_ST                        = 0x7
-	IPPROTO_SVMTP                     = 0x52
-	IPPROTO_SWIPE                     = 0x35
-	IPPROTO_TCF                       = 0x57
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TLSP                      = 0x38
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_TPXX                      = 0x27
-	IPPROTO_TRUNK1                    = 0x17
-	IPPROTO_TRUNK2                    = 0x18
-	IPPROTO_TTP                       = 0x54
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_UDPLITE                   = 0x88
-	IPPROTO_VINES                     = 0x53
-	IPPROTO_VISA                      = 0x46
-	IPPROTO_VMTP                      = 0x51
-	IPPROTO_WBEXPAK                   = 0x4f
-	IPPROTO_WBMON                     = 0x4e
-	IPPROTO_WSN                       = 0x4a
-	IPPROTO_XNET                      = 0xf
-	IPPROTO_XTP                       = 0x24
-	IPV6_AUTOFLOWLABEL                = 0x3b
-	IPV6_BINDANY                      = 0x40
-	IPV6_BINDV6ONLY                   = 0x1b
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_DONTFRAG                     = 0x3e
-	IPV6_DSTOPTS                      = 0x32
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_FW_ADD                       = 0x1e
-	IPV6_FW_DEL                       = 0x1f
-	IPV6_FW_FLUSH                     = 0x20
-	IPV6_FW_GET                       = 0x22
-	IPV6_FW_ZERO                      = 0x21
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_HOPLIMIT                     = 0x2f
-	IPV6_HOPOPTS                      = 0x31
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXOPTHDR                    = 0x800
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MAX_GROUP_SRC_FILTER         = 0x200
-	IPV6_MAX_MEMBERSHIPS              = 0xfff
-	IPV6_MAX_SOCK_SRC_FILTER          = 0x80
-	IPV6_MIN_MEMBERSHIPS              = 0x1f
-	IPV6_MMTU                         = 0x500
-	IPV6_MSFILTER                     = 0x4a
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_NEXTHOP                      = 0x30
-	IPV6_PATHMTU                      = 0x2c
-	IPV6_PKTINFO                      = 0x2e
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_PREFER_TEMPADDR              = 0x3f
-	IPV6_RECVDSTOPTS                  = 0x28
-	IPV6_RECVHOPLIMIT                 = 0x25
-	IPV6_RECVHOPOPTS                  = 0x27
-	IPV6_RECVPATHMTU                  = 0x2b
-	IPV6_RECVPKTINFO                  = 0x24
-	IPV6_RECVRTHDR                    = 0x26
-	IPV6_RECVTCLASS                   = 0x39
-	IPV6_RTHDR                        = 0x33
-	IPV6_RTHDRDSTOPTS                 = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x3d
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_USE_MIN_MTU                  = 0x2a
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_ADD_SOURCE_MEMBERSHIP          = 0x46
-	IP_BINDANY                        = 0x18
-	IP_BLOCK_SOURCE                   = 0x48
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DONTFRAG                       = 0x43
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_DROP_SOURCE_MEMBERSHIP         = 0x47
-	IP_DUMMYNET3                      = 0x31
-	IP_DUMMYNET_CONFIGURE             = 0x3c
-	IP_DUMMYNET_DEL                   = 0x3d
-	IP_DUMMYNET_FLUSH                 = 0x3e
-	IP_DUMMYNET_GET                   = 0x40
-	IP_FAITH                          = 0x16
-	IP_FW3                            = 0x30
-	IP_FW_ADD                         = 0x32
-	IP_FW_DEL                         = 0x33
-	IP_FW_FLUSH                       = 0x34
-	IP_FW_GET                         = 0x36
-	IP_FW_NAT_CFG                     = 0x38
-	IP_FW_NAT_DEL                     = 0x39
-	IP_FW_NAT_GET_CONFIG              = 0x3a
-	IP_FW_NAT_GET_LOG                 = 0x3b
-	IP_FW_RESETLOG                    = 0x37
-	IP_FW_TABLE_ADD                   = 0x28
-	IP_FW_TABLE_DEL                   = 0x29
-	IP_FW_TABLE_FLUSH                 = 0x2a
-	IP_FW_TABLE_GETSIZE               = 0x2b
-	IP_FW_TABLE_LIST                  = 0x2c
-	IP_FW_ZERO                        = 0x35
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x15
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_GROUP_SRC_FILTER           = 0x200
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MAX_SOCK_MUTE_FILTER           = 0x80
-	IP_MAX_SOCK_SRC_FILTER            = 0x80
-	IP_MAX_SOURCE_FILTER              = 0x400
-	IP_MF                             = 0x2000
-	IP_MINTTL                         = 0x42
-	IP_MIN_MEMBERSHIPS                = 0x1f
-	IP_MSFILTER                       = 0x4a
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_MULTICAST_VIF                  = 0xe
-	IP_OFFMASK                        = 0x1fff
-	IP_ONESBCAST                      = 0x17
-	IP_OPTIONS                        = 0x1
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTOS                        = 0x44
-	IP_RECVTTL                        = 0x41
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RSVP_OFF                       = 0x10
-	IP_RSVP_ON                        = 0xf
-	IP_RSVP_VIF_OFF                   = 0x12
-	IP_RSVP_VIF_ON                    = 0x11
-	IP_SENDSRCADDR                    = 0x7
-	IP_TOS                            = 0x3
-	IP_TTL                            = 0x4
-	IP_UNBLOCK_SOURCE                 = 0x49
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_AUTOSYNC                     = 0x7
-	MADV_CORE                         = 0x9
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x5
-	MADV_NOCORE                       = 0x8
-	MADV_NORMAL                       = 0x0
-	MADV_NOSYNC                       = 0x6
-	MADV_PROTECT                      = 0xa
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_WILLNEED                     = 0x3
-	MAP_ALIGNED_SUPER                 = 0x1000000
-	MAP_ALIGNMENT_MASK                = -0x1000000
-	MAP_ALIGNMENT_SHIFT               = 0x18
-	MAP_ANON                          = 0x1000
-	MAP_ANONYMOUS                     = 0x1000
-	MAP_COPY                          = 0x2
-	MAP_EXCL                          = 0x4000
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_NOCORE                        = 0x20000
-	MAP_NORESERVE                     = 0x40
-	MAP_NOSYNC                        = 0x800
-	MAP_PREFAULT_READ                 = 0x40000
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_RESERVED0080                  = 0x80
-	MAP_RESERVED0100                  = 0x100
-	MAP_SHARED                        = 0x1
-	MAP_STACK                         = 0x400
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_CMSG_CLOEXEC                  = 0x40000
-	MSG_COMPAT                        = 0x8000
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOF                           = 0x100
-	MSG_EOR                           = 0x8
-	MSG_NBIO                          = 0x4000
-	MSG_NOSIGNAL                      = 0x20000
-	MSG_NOTIFICATION                  = 0x2000
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MS_ASYNC                          = 0x1
-	MS_INVALIDATE                     = 0x2
-	MS_SYNC                           = 0x0
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_IFLISTL                    = 0x5
-	NET_RT_IFMALIST                   = 0x4
-	NET_RT_MAXID                      = 0x6
-	NOFLSH                            = 0x80000000
-	NOTE_ATTRIB                       = 0x8
-	NOTE_CHILD                        = 0x4
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FFAND                        = 0x40000000
-	NOTE_FFCOPY                       = 0xc0000000
-	NOTE_FFCTRLMASK                   = 0xc0000000
-	NOTE_FFLAGSMASK                   = 0xffffff
-	NOTE_FFNOP                        = 0x0
-	NOTE_FFOR                         = 0x80000000
-	NOTE_FORK                         = 0x40000000
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_PCTRLMASK                    = 0xf0000000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRIGGER                      = 0x1000000
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x100000
-	O_CREAT                           = 0x200
-	O_DIRECT                          = 0x10000
-	O_DIRECTORY                       = 0x20000
-	O_EXCL                            = 0x800
-	O_EXEC                            = 0x40000
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x8000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_SHLOCK                          = 0x10
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_TTY_INIT                        = 0x80000
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	RLIMIT_AS                         = 0xa
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x8
-	RTAX_NETMASK                      = 0x2
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_BROADCAST                     = 0x400000
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_FMASK                         = 0x1004d808
-	RTF_GATEWAY                       = 0x2
-	RTF_GWFLAG_COMPAT                 = 0x80000000
-	RTF_HOST                          = 0x4
-	RTF_LLDATA                        = 0x400
-	RTF_LLINFO                        = 0x400
-	RTF_LOCAL                         = 0x200000
-	RTF_MODIFIED                      = 0x20
-	RTF_MULTICAST                     = 0x800000
-	RTF_PINNED                        = 0x100000
-	RTF_PRCLONING                     = 0x10000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x40000
-	RTF_REJECT                        = 0x8
-	RTF_RNH_LOCKED                    = 0x40000000
-	RTF_STATIC                        = 0x800
-	RTF_STICKY                        = 0x10000000
-	RTF_UP                            = 0x1
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DELMADDR                      = 0x10
-	RTM_GET                           = 0x4
-	RTM_IEEE80211                     = 0x12
-	RTM_IFANNOUNCE                    = 0x11
-	RTM_IFINFO                        = 0xe
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_NEWMADDR                      = 0xf
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RTV_WEIGHT                        = 0x100
-	RT_ALL_FIBS                       = -0x1
-	RT_CACHING_CONTEXT                = 0x1
-	RT_DEFAULT_FIB                    = 0x0
-	RT_NORTREF                        = 0x2
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	RUSAGE_THREAD                     = 0x1
-	SCM_BINTIME                       = 0x4
-	SCM_CREDS                         = 0x3
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x2
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCADDRT                         = 0x8030720a
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCAIFGROUP                      = 0x80246987
-	SIOCALIFADDR                      = 0x8118691b
-	SIOCATMARK                        = 0x40047307
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDELRT                         = 0x8030720b
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFGROUP                      = 0x80246989
-	SIOCDIFPHYADDR                    = 0x80206949
-	SIOCDLIFADDR                      = 0x8118691d
-	SIOCGDRVSPEC                      = 0xc01c697b
-	SIOCGETSGCNT                      = 0xc0147210
-	SIOCGETVIFCNT                     = 0xc014720f
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCAP                        = 0xc020691f
-	SIOCGIFCONF                       = 0xc0086924
-	SIOCGIFDESCR                      = 0xc020692a
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFIB                        = 0xc020695c
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFGMEMB                      = 0xc024698a
-	SIOCGIFGROUP                      = 0xc0246988
-	SIOCGIFINDEX                      = 0xc0206920
-	SIOCGIFMAC                        = 0xc0206926
-	SIOCGIFMEDIA                      = 0xc0286938
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc0206933
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206948
-	SIOCGIFPHYS                       = 0xc0206935
-	SIOCGIFPSRCADDR                   = 0xc0206947
-	SIOCGIFSTATUS                     = 0xc331693b
-	SIOCGLIFADDR                      = 0xc118691c
-	SIOCGLIFPHYADDR                   = 0xc118694b
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCGPRIVATE_0                    = 0xc0206950
-	SIOCGPRIVATE_1                    = 0xc0206951
-	SIOCIFCREATE                      = 0xc020697a
-	SIOCIFCREATE2                     = 0xc020697c
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc00c6978
-	SIOCSDRVSPEC                      = 0x801c697b
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFCAP                        = 0x8020691e
-	SIOCSIFDESCR                      = 0x80206929
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFIB                        = 0x8020695d
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFLLADDR                     = 0x8020693c
-	SIOCSIFMAC                        = 0x80206927
-	SIOCSIFMEDIA                      = 0xc0206937
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x80206934
-	SIOCSIFNAME                       = 0x80206928
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x80406946
-	SIOCSIFPHYS                       = 0x80206936
-	SIOCSIFRVNET                      = 0xc020695b
-	SIOCSIFVNET                       = 0xc020695a
-	SIOCSLIFPHYADDR                   = 0x8118694a
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SOCK_CLOEXEC                      = 0x10000000
-	SOCK_DGRAM                        = 0x2
-	SOCK_MAXADDRLEN                   = 0xff
-	SOCK_NONBLOCK                     = 0x20000000
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_ACCEPTFILTER                   = 0x1000
-	SO_BINTIME                        = 0x2000
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LABEL                          = 0x1009
-	SO_LINGER                         = 0x80
-	SO_LISTENINCQLEN                  = 0x1013
-	SO_LISTENQLEN                     = 0x1012
-	SO_LISTENQLIMIT                   = 0x1011
-	SO_NOSIGPIPE                      = 0x800
-	SO_NO_DDP                         = 0x8000
-	SO_NO_OFFLOAD                     = 0x4000
-	SO_OOBINLINE                      = 0x100
-	SO_PEERLABEL                      = 0x1010
-	SO_PROTOCOL                       = 0x1016
-	SO_PROTOTYPE                      = 0x1016
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_SETFIB                         = 0x1014
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_TIMESTAMP                      = 0x400
-	SO_TYPE                           = 0x1008
-	SO_USELOOPBACK                    = 0x40
-	SO_USER_COOKIE                    = 0x1015
-	SO_VENDOR                         = 0x80000000
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CA_NAME_MAX                   = 0x10
-	TCP_CONGESTION                    = 0x40
-	TCP_INFO                          = 0x20
-	TCP_KEEPCNT                       = 0x400
-	TCP_KEEPIDLE                      = 0x100
-	TCP_KEEPINIT                      = 0x80
-	TCP_KEEPINTVL                     = 0x200
-	TCP_MAXBURST                      = 0x4
-	TCP_MAXHLEN                       = 0x3c
-	TCP_MAXOLEN                       = 0x28
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x4
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MD5SIG                        = 0x10
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x218
-	TCP_NODELAY                       = 0x1
-	TCP_NOOPT                         = 0x8
-	TCP_NOPUSH                        = 0x4
-	TCP_VENDOR                        = 0x80000000
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDRAIN                         = 0x2000745e
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLUSH                         = 0x80047410
-	TIOCGDRAINWAIT                    = 0x40047456
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGPGRP                         = 0x40047477
-	TIOCGPTN                          = 0x4004740f
-	TIOCGSID                          = 0x40047463
-	TIOCGWINSZ                        = 0x40087468
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGDTRWAIT                     = 0x4004745a
-	TIOCMGET                          = 0x4004746a
-	TIOCMSDTRWAIT                     = 0x8004745b
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DCD                         = 0x40
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTMASTER                      = 0x2000741c
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDRAINWAIT                    = 0x80047457
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSIG                           = 0x2004745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x20007465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCTIMESTAMP                     = 0x40087459
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VERASE2                           = 0x7
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WCONTINUED                        = 0x4
-	WCOREFLAG                         = 0x80
-	WEXITED                           = 0x10
-	WLINUXCLONE                       = 0x80000000
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x8
-	WSTOPPED                          = 0x2
-	WTRAPPED                          = 0x20
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADF           = syscall.Errno(0x9)
-	EBADMSG         = syscall.Errno(0x59)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x55)
-	ECAPMODE        = syscall.Errno(0x5e)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDOM            = syscall.Errno(0x21)
-	EDOOFUS         = syscall.Errno(0x58)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x52)
-	EILSEQ          = syscall.Errno(0x56)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x60)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5a)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x57)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x5b)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x53)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCAPABLE     = syscall.Errno(0x5d)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTRECOVERABLE = syscall.Errno(0x5f)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x2d)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x2d)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EOWNERDEAD      = syscall.Errno(0x60)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x5c)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGLIBRT  = syscall.Signal(0x21)
-	SIGLWP    = syscall.Signal(0x20)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTHR    = syscall.Signal(0x20)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:  "operation not permitted",
-	2:  "no such file or directory",
-	3:  "no such process",
-	4:  "interrupted system call",
-	5:  "input/output error",
-	6:  "device not configured",
-	7:  "argument list too long",
-	8:  "exec format error",
-	9:  "bad file descriptor",
-	10: "no child processes",
-	11: "resource deadlock avoided",
-	12: "cannot allocate memory",
-	13: "permission denied",
-	14: "bad address",
-	15: "block device required",
-	16: "device busy",
-	17: "file exists",
-	18: "cross-device link",
-	19: "operation not supported by device",
-	20: "not a directory",
-	21: "is a directory",
-	22: "invalid argument",
-	23: "too many open files in system",
-	24: "too many open files",
-	25: "inappropriate ioctl for device",
-	26: "text file busy",
-	27: "file too large",
-	28: "no space left on device",
-	29: "illegal seek",
-	30: "read-only file system",
-	31: "too many links",
-	32: "broken pipe",
-	33: "numerical argument out of domain",
-	34: "result too large",
-	35: "resource temporarily unavailable",
-	36: "operation now in progress",
-	37: "operation already in progress",
-	38: "socket operation on non-socket",
-	39: "destination address required",
-	40: "message too long",
-	41: "protocol wrong type for socket",
-	42: "protocol not available",
-	43: "protocol not supported",
-	44: "socket type not supported",
-	45: "operation not supported",
-	46: "protocol family not supported",
-	47: "address family not supported by protocol family",
-	48: "address already in use",
-	49: "can't assign requested address",
-	50: "network is down",
-	51: "network is unreachable",
-	52: "network dropped connection on reset",
-	53: "software caused connection abort",
-	54: "connection reset by peer",
-	55: "no buffer space available",
-	56: "socket is already connected",
-	57: "socket is not connected",
-	58: "can't send after socket shutdown",
-	59: "too many references: can't splice",
-	60: "operation timed out",
-	61: "connection refused",
-	62: "too many levels of symbolic links",
-	63: "file name too long",
-	64: "host is down",
-	65: "no route to host",
-	66: "directory not empty",
-	67: "too many processes",
-	68: "too many users",
-	69: "disc quota exceeded",
-	70: "stale NFS file handle",
-	71: "too many levels of remote in path",
-	72: "RPC struct is bad",
-	73: "RPC version wrong",
-	74: "RPC prog. not avail",
-	75: "program version wrong",
-	76: "bad procedure for program",
-	77: "no locks available",
-	78: "function not implemented",
-	79: "inappropriate file type or format",
-	80: "authentication error",
-	81: "need authenticator",
-	82: "identifier removed",
-	83: "no message of desired type",
-	84: "value too large to be stored in data type",
-	85: "operation canceled",
-	86: "illegal byte sequence",
-	87: "attribute not found",
-	88: "programming error",
-	89: "bad message",
-	90: "multihop attempted",
-	91: "link has been severed",
-	92: "protocol error",
-	93: "capabilities insufficient",
-	94: "not permitted in capability mode",
-	95: "state not recoverable",
-	96: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "suspended (signal)",
-	18: "suspended",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-	32: "unknown signal",
-	33: "unknown signal",
-}


[40/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/uint16.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/uint16.go b/newt/vendor/github.com/spf13/pflag/uint16.go
deleted file mode 100644
index 7e9914e..0000000
--- a/newt/vendor/github.com/spf13/pflag/uint16.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- uint16 value
-type uint16Value uint16
-
-func newUint16Value(val uint16, p *uint16) *uint16Value {
-	*p = val
-	return (*uint16Value)(p)
-}
-
-func (i *uint16Value) Set(s string) error {
-	v, err := strconv.ParseUint(s, 0, 16)
-	*i = uint16Value(v)
-	return err
-}
-
-func (i *uint16Value) Type() string {
-	return "uint16"
-}
-
-func (i *uint16Value) String() string { return strconv.FormatUint(uint64(*i), 10) }
-
-func uint16Conv(sval string) (interface{}, error) {
-	v, err := strconv.ParseUint(sval, 0, 16)
-	if err != nil {
-		return 0, err
-	}
-	return uint16(v), nil
-}
-
-// GetUint16 return the uint16 value of a flag with the given name
-func (f *FlagSet) GetUint16(name string) (uint16, error) {
-	val, err := f.getFlagType(name, "uint16", uint16Conv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(uint16), nil
-}
-
-// Uint16Var defines a uint flag with specified name, default value, and usage string.
-// The argument p points to a uint variable in which to store the value of the flag.
-func (f *FlagSet) Uint16Var(p *uint16, name string, value uint16, usage string) {
-	f.VarP(newUint16Value(value, p), name, "", usage)
-}
-
-// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) {
-	f.VarP(newUint16Value(value, p), name, shorthand, usage)
-}
-
-// Uint16Var defines a uint flag with specified name, default value, and usage string.
-// The argument p points to a uint  variable in which to store the value of the flag.
-func Uint16Var(p *uint16, name string, value uint16, usage string) {
-	CommandLine.VarP(newUint16Value(value, p), name, "", usage)
-}
-
-// Uint16VarP is like Uint16Var, but accepts a shorthand letter that can be used after a single dash.
-func Uint16VarP(p *uint16, name, shorthand string, value uint16, usage string) {
-	CommandLine.VarP(newUint16Value(value, p), name, shorthand, usage)
-}
-
-// Uint16 defines a uint flag with specified name, default value, and usage string.
-// The return value is the address of a uint  variable that stores the value of the flag.
-func (f *FlagSet) Uint16(name string, value uint16, usage string) *uint16 {
-	p := new(uint16)
-	f.Uint16VarP(p, name, "", value, usage)
-	return p
-}
-
-// Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Uint16P(name, shorthand string, value uint16, usage string) *uint16 {
-	p := new(uint16)
-	f.Uint16VarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Uint16 defines a uint flag with specified name, default value, and usage string.
-// The return value is the address of a uint  variable that stores the value of the flag.
-func Uint16(name string, value uint16, usage string) *uint16 {
-	return CommandLine.Uint16P(name, "", value, usage)
-}
-
-// Uint16P is like Uint16, but accepts a shorthand letter that can be used after a single dash.
-func Uint16P(name, shorthand string, value uint16, usage string) *uint16 {
-	return CommandLine.Uint16P(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/uint32.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/uint32.go b/newt/vendor/github.com/spf13/pflag/uint32.go
deleted file mode 100644
index d802453..0000000
--- a/newt/vendor/github.com/spf13/pflag/uint32.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- uint32 value
-type uint32Value uint32
-
-func newUint32Value(val uint32, p *uint32) *uint32Value {
-	*p = val
-	return (*uint32Value)(p)
-}
-
-func (i *uint32Value) Set(s string) error {
-	v, err := strconv.ParseUint(s, 0, 32)
-	*i = uint32Value(v)
-	return err
-}
-
-func (i *uint32Value) Type() string {
-	return "uint32"
-}
-
-func (i *uint32Value) String() string { return strconv.FormatUint(uint64(*i), 10) }
-
-func uint32Conv(sval string) (interface{}, error) {
-	v, err := strconv.ParseUint(sval, 0, 32)
-	if err != nil {
-		return 0, err
-	}
-	return uint32(v), nil
-}
-
-// GetUint32 return the uint32 value of a flag with the given name
-func (f *FlagSet) GetUint32(name string) (uint32, error) {
-	val, err := f.getFlagType(name, "uint32", uint32Conv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(uint32), nil
-}
-
-// Uint32Var defines a uint32 flag with specified name, default value, and usage string.
-// The argument p points to a uint32 variable in which to store the value of the flag.
-func (f *FlagSet) Uint32Var(p *uint32, name string, value uint32, usage string) {
-	f.VarP(newUint32Value(value, p), name, "", usage)
-}
-
-// Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) {
-	f.VarP(newUint32Value(value, p), name, shorthand, usage)
-}
-
-// Uint32Var defines a uint32 flag with specified name, default value, and usage string.
-// The argument p points to a uint32  variable in which to store the value of the flag.
-func Uint32Var(p *uint32, name string, value uint32, usage string) {
-	CommandLine.VarP(newUint32Value(value, p), name, "", usage)
-}
-
-// Uint32VarP is like Uint32Var, but accepts a shorthand letter that can be used after a single dash.
-func Uint32VarP(p *uint32, name, shorthand string, value uint32, usage string) {
-	CommandLine.VarP(newUint32Value(value, p), name, shorthand, usage)
-}
-
-// Uint32 defines a uint32 flag with specified name, default value, and usage string.
-// The return value is the address of a uint32  variable that stores the value of the flag.
-func (f *FlagSet) Uint32(name string, value uint32, usage string) *uint32 {
-	p := new(uint32)
-	f.Uint32VarP(p, name, "", value, usage)
-	return p
-}
-
-// Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Uint32P(name, shorthand string, value uint32, usage string) *uint32 {
-	p := new(uint32)
-	f.Uint32VarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Uint32 defines a uint32 flag with specified name, default value, and usage string.
-// The return value is the address of a uint32  variable that stores the value of the flag.
-func Uint32(name string, value uint32, usage string) *uint32 {
-	return CommandLine.Uint32P(name, "", value, usage)
-}
-
-// Uint32P is like Uint32, but accepts a shorthand letter that can be used after a single dash.
-func Uint32P(name, shorthand string, value uint32, usage string) *uint32 {
-	return CommandLine.Uint32P(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/uint64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/uint64.go b/newt/vendor/github.com/spf13/pflag/uint64.go
deleted file mode 100644
index f62240f..0000000
--- a/newt/vendor/github.com/spf13/pflag/uint64.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- uint64 Value
-type uint64Value uint64
-
-func newUint64Value(val uint64, p *uint64) *uint64Value {
-	*p = val
-	return (*uint64Value)(p)
-}
-
-func (i *uint64Value) Set(s string) error {
-	v, err := strconv.ParseUint(s, 0, 64)
-	*i = uint64Value(v)
-	return err
-}
-
-func (i *uint64Value) Type() string {
-	return "uint64"
-}
-
-func (i *uint64Value) String() string { return strconv.FormatUint(uint64(*i), 10) }
-
-func uint64Conv(sval string) (interface{}, error) {
-	v, err := strconv.ParseUint(sval, 0, 64)
-	if err != nil {
-		return 0, err
-	}
-	return uint64(v), nil
-}
-
-// GetUint64 return the uint64 value of a flag with the given name
-func (f *FlagSet) GetUint64(name string) (uint64, error) {
-	val, err := f.getFlagType(name, "uint64", uint64Conv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(uint64), nil
-}
-
-// Uint64Var defines a uint64 flag with specified name, default value, and usage string.
-// The argument p points to a uint64 variable in which to store the value of the flag.
-func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string) {
-	f.VarP(newUint64Value(value, p), name, "", usage)
-}
-
-// Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) {
-	f.VarP(newUint64Value(value, p), name, shorthand, usage)
-}
-
-// Uint64Var defines a uint64 flag with specified name, default value, and usage string.
-// The argument p points to a uint64 variable in which to store the value of the flag.
-func Uint64Var(p *uint64, name string, value uint64, usage string) {
-	CommandLine.VarP(newUint64Value(value, p), name, "", usage)
-}
-
-// Uint64VarP is like Uint64Var, but accepts a shorthand letter that can be used after a single dash.
-func Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) {
-	CommandLine.VarP(newUint64Value(value, p), name, shorthand, usage)
-}
-
-// Uint64 defines a uint64 flag with specified name, default value, and usage string.
-// The return value is the address of a uint64 variable that stores the value of the flag.
-func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64 {
-	p := new(uint64)
-	f.Uint64VarP(p, name, "", value, usage)
-	return p
-}
-
-// Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Uint64P(name, shorthand string, value uint64, usage string) *uint64 {
-	p := new(uint64)
-	f.Uint64VarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Uint64 defines a uint64 flag with specified name, default value, and usage string.
-// The return value is the address of a uint64 variable that stores the value of the flag.
-func Uint64(name string, value uint64, usage string) *uint64 {
-	return CommandLine.Uint64P(name, "", value, usage)
-}
-
-// Uint64P is like Uint64, but accepts a shorthand letter that can be used after a single dash.
-func Uint64P(name, shorthand string, value uint64, usage string) *uint64 {
-	return CommandLine.Uint64P(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/uint8.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/uint8.go b/newt/vendor/github.com/spf13/pflag/uint8.go
deleted file mode 100644
index bb0e83c..0000000
--- a/newt/vendor/github.com/spf13/pflag/uint8.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- uint8 Value
-type uint8Value uint8
-
-func newUint8Value(val uint8, p *uint8) *uint8Value {
-	*p = val
-	return (*uint8Value)(p)
-}
-
-func (i *uint8Value) Set(s string) error {
-	v, err := strconv.ParseUint(s, 0, 8)
-	*i = uint8Value(v)
-	return err
-}
-
-func (i *uint8Value) Type() string {
-	return "uint8"
-}
-
-func (i *uint8Value) String() string { return strconv.FormatUint(uint64(*i), 10) }
-
-func uint8Conv(sval string) (interface{}, error) {
-	v, err := strconv.ParseUint(sval, 0, 8)
-	if err != nil {
-		return 0, err
-	}
-	return uint8(v), nil
-}
-
-// GetUint8 return the uint8 value of a flag with the given name
-func (f *FlagSet) GetUint8(name string) (uint8, error) {
-	val, err := f.getFlagType(name, "uint8", uint8Conv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(uint8), nil
-}
-
-// Uint8Var defines a uint8 flag with specified name, default value, and usage string.
-// The argument p points to a uint8 variable in which to store the value of the flag.
-func (f *FlagSet) Uint8Var(p *uint8, name string, value uint8, usage string) {
-	f.VarP(newUint8Value(value, p), name, "", usage)
-}
-
-// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) {
-	f.VarP(newUint8Value(value, p), name, shorthand, usage)
-}
-
-// Uint8Var defines a uint8 flag with specified name, default value, and usage string.
-// The argument p points to a uint8 variable in which to store the value of the flag.
-func Uint8Var(p *uint8, name string, value uint8, usage string) {
-	CommandLine.VarP(newUint8Value(value, p), name, "", usage)
-}
-
-// Uint8VarP is like Uint8Var, but accepts a shorthand letter that can be used after a single dash.
-func Uint8VarP(p *uint8, name, shorthand string, value uint8, usage string) {
-	CommandLine.VarP(newUint8Value(value, p), name, shorthand, usage)
-}
-
-// Uint8 defines a uint8 flag with specified name, default value, and usage string.
-// The return value is the address of a uint8 variable that stores the value of the flag.
-func (f *FlagSet) Uint8(name string, value uint8, usage string) *uint8 {
-	p := new(uint8)
-	f.Uint8VarP(p, name, "", value, usage)
-	return p
-}
-
-// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) Uint8P(name, shorthand string, value uint8, usage string) *uint8 {
-	p := new(uint8)
-	f.Uint8VarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Uint8 defines a uint8 flag with specified name, default value, and usage string.
-// The return value is the address of a uint8 variable that stores the value of the flag.
-func Uint8(name string, value uint8, usage string) *uint8 {
-	return CommandLine.Uint8P(name, "", value, usage)
-}
-
-// Uint8P is like Uint8, but accepts a shorthand letter that can be used after a single dash.
-func Uint8P(name, shorthand string, value uint8, usage string) *uint8 {
-	return CommandLine.Uint8P(name, shorthand, value, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/LICENSE
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/LICENSE b/newt/vendor/golang.org/x/sys/LICENSE
deleted file mode 100644
index 6a66aea..0000000
--- a/newt/vendor/golang.org/x/sys/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-   * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/PATENTS
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/PATENTS b/newt/vendor/golang.org/x/sys/PATENTS
deleted file mode 100644
index 7330990..0000000
--- a/newt/vendor/golang.org/x/sys/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go.  This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation.  If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/.gitignore
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/.gitignore b/newt/vendor/golang.org/x/sys/unix/.gitignore
deleted file mode 100644
index e482715..0000000
--- a/newt/vendor/golang.org/x/sys/unix/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-_obj/

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm.s b/newt/vendor/golang.org/x/sys/unix/asm.s
deleted file mode 100644
index 8ed2fdb..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm.s
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-TEXT �use(SB),NOSPLIT,$0
-	RET

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_darwin_386.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_darwin_386.s b/newt/vendor/golang.org/x/sys/unix/asm_darwin_386.s
deleted file mode 100644
index 8a72783..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_darwin_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-28
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-40
-	JMP	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-52
-	JMP	syscall�Syscall9(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-28
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-40
-	JMP	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s b/newt/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
deleted file mode 100644
index 6321421..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-56
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-104
-	JMP	syscall�Syscall9(SB)
-
-TEXT	�RawSyscall(SB),NOSPLIT,$0-56
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_darwin_arm.s b/newt/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
deleted file mode 100644
index 333242d..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-// +build arm,darwin
-
-#include "textflag.h"
-
-//
-// System call support for ARM, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-28
-	B	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-40
-	B	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-52
-	B	syscall�Syscall9(SB)
-
-TEXT	�RawSyscall(SB),NOSPLIT,$0-28
-	B	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-40
-	B	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s b/newt/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
deleted file mode 100644
index 97e0174..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-// +build arm64,darwin
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-56
-	B	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-80
-	B	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-104
-	B	syscall�Syscall9(SB)
-
-TEXT	�RawSyscall(SB),NOSPLIT,$0-56
-	B	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-80
-	B	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/newt/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
deleted file mode 100644
index d5ed672..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, DragonFly
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-64
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-88
-	JMP	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-112
-	JMP	syscall�Syscall9(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-64
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-88
-	JMP	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_freebsd_386.s b/newt/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
deleted file mode 100644
index c9a0a26..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-28
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-40
-	JMP	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-52
-	JMP	syscall�Syscall9(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-28
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-40
-	JMP	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s b/newt/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
deleted file mode 100644
index 3517247..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-56
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-104
-	JMP	syscall�Syscall9(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-56
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s b/newt/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
deleted file mode 100644
index 9227c87..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-28
-	B	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-40
-	B	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-52
-	B	syscall�Syscall9(SB)
-
-TEXT	�RawSyscall(SB),NOSPLIT,$0-28
-	B	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-40
-	B	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_linux_386.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_linux_386.s b/newt/vendor/golang.org/x/sys/unix/asm_linux_386.s
deleted file mode 100644
index 4db2909..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_linux_386.s
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for 386, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-28
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-40
-	JMP	syscall�Syscall6(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-28
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-40
-	JMP	syscall�RawSyscall6(SB)
-
-TEXT �socketcall(SB),NOSPLIT,$0-36
-	JMP	syscall�socketcall(SB)
-
-TEXT �rawsocketcall(SB),NOSPLIT,$0-36
-	JMP	syscall�rawsocketcall(SB)
-
-TEXT �seek(SB),NOSPLIT,$0-28
-	JMP	syscall�seek(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/newt/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
deleted file mode 100644
index 44e25c6..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for AMD64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-56
-	JMP	syscall�Syscall(SB)
-
-TEXT �Syscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�Syscall6(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-56
-	JMP	syscall�RawSyscall(SB)
-
-TEXT �RawSyscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�RawSyscall6(SB)
-
-TEXT �gettimeofday(SB),NOSPLIT,$0-16
-	JMP	syscall�gettimeofday(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_linux_arm.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/newt/vendor/golang.org/x/sys/unix/asm_linux_arm.s
deleted file mode 100644
index cf0b574..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_linux_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for arm, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-28
-	B	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-40
-	B	syscall�Syscall6(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-28
-	B	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-40
-	B	syscall�RawSyscall6(SB)
-
-TEXT �seek(SB),NOSPLIT,$0-32
-	B	syscall�seek(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/newt/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
deleted file mode 100644
index 4be9bfe..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build arm64
-// +build !gccgo
-
-#include "textflag.h"
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-56
-	B	syscall�Syscall(SB)
-
-TEXT �Syscall6(SB),NOSPLIT,$0-80
-	B	syscall�Syscall6(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-56
-	B	syscall�RawSyscall(SB)
-
-TEXT �RawSyscall6(SB),NOSPLIT,$0-80
-	B	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/newt/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
deleted file mode 100644
index 724e580..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build mips64 mips64le
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for mips64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-56
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�Syscall6(SB)
-
-TEXT	�RawSyscall(SB),NOSPLIT,$0-56
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/newt/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
deleted file mode 100644
index 8d231fe..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for ppc64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-56
-	BR	syscall�Syscall(SB)
-
-TEXT �Syscall6(SB),NOSPLIT,$0-80
-	BR	syscall�Syscall6(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-56
-	BR	syscall�RawSyscall(SB)
-
-TEXT �RawSyscall6(SB),NOSPLIT,$0-80
-	BR	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/newt/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
deleted file mode 100644
index 1188985..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build s390x
-// +build linux
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for s390x, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT �Syscall(SB),NOSPLIT,$0-56
-	BR	syscall�Syscall(SB)
-
-TEXT �Syscall6(SB),NOSPLIT,$0-80
-	BR	syscall�Syscall6(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-56
-	BR	syscall�RawSyscall(SB)
-
-TEXT �RawSyscall6(SB),NOSPLIT,$0-80
-	BR	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_netbsd_386.s b/newt/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
deleted file mode 100644
index 48bdcd7..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-28
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-40
-	JMP	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-52
-	JMP	syscall�Syscall9(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-28
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-40
-	JMP	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s b/newt/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
deleted file mode 100644
index 2ede05c..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-56
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-104
-	JMP	syscall�Syscall9(SB)
-
-TEXT	�RawSyscall(SB),NOSPLIT,$0-56
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s b/newt/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
deleted file mode 100644
index e892857..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-28
-	B	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-40
-	B	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-52
-	B	syscall�Syscall9(SB)
-
-TEXT	�RawSyscall(SB),NOSPLIT,$0-28
-	B	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-40
-	B	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_openbsd_386.s b/newt/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
deleted file mode 100644
index 00576f3..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-28
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-40
-	JMP	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-52
-	JMP	syscall�Syscall9(SB)
-
-TEXT �RawSyscall(SB),NOSPLIT,$0-28
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-40
-	JMP	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s b/newt/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
deleted file mode 100644
index 790ef77..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT	�Syscall(SB),NOSPLIT,$0-56
-	JMP	syscall�Syscall(SB)
-
-TEXT	�Syscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�Syscall6(SB)
-
-TEXT	�Syscall9(SB),NOSPLIT,$0-104
-	JMP	syscall�Syscall9(SB)
-
-TEXT	�RawSyscall(SB),NOSPLIT,$0-56
-	JMP	syscall�RawSyscall(SB)
-
-TEXT	�RawSyscall6(SB),NOSPLIT,$0-80
-	JMP	syscall�RawSyscall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/newt/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
deleted file mode 100644
index 43ed17a..0000000
--- a/newt/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
-//
-
-TEXT �sysvicall6(SB),NOSPLIT,$0-64
-	JMP	syscall�sysvicall6(SB)
-
-TEXT �rawSysvicall6(SB),NOSPLIT,$0-64
-	JMP	syscall�rawSysvicall6(SB)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/bluetooth_linux.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/bluetooth_linux.go b/newt/vendor/golang.org/x/sys/unix/bluetooth_linux.go
deleted file mode 100644
index 6e32296..0000000
--- a/newt/vendor/golang.org/x/sys/unix/bluetooth_linux.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Bluetooth sockets and messages
-
-package unix
-
-// Bluetooth Protocols
-const (
-	BTPROTO_L2CAP  = 0
-	BTPROTO_HCI    = 1
-	BTPROTO_SCO    = 2
-	BTPROTO_RFCOMM = 3
-	BTPROTO_BNEP   = 4
-	BTPROTO_CMTP   = 5
-	BTPROTO_HIDP   = 6
-	BTPROTO_AVDTP  = 7
-)
-
-const (
-	HCI_CHANNEL_RAW     = 0
-	HCI_CHANNEL_USER    = 1
-	HCI_CHANNEL_MONITOR = 2
-	HCI_CHANNEL_CONTROL = 3
-)
-
-// Socketoption Level
-const (
-	SOL_BLUETOOTH = 0x112
-	SOL_HCI       = 0x0
-	SOL_L2CAP     = 0x6
-	SOL_RFCOMM    = 0x12
-	SOL_SCO       = 0x11
-)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/constants.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/constants.go b/newt/vendor/golang.org/x/sys/unix/constants.go
deleted file mode 100644
index a96f0eb..0000000
--- a/newt/vendor/golang.org/x/sys/unix/constants.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-const (
-	R_OK = 0x4
-	W_OK = 0x2
-	X_OK = 0x1
-)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/env_unix.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/env_unix.go b/newt/vendor/golang.org/x/sys/unix/env_unix.go
deleted file mode 100644
index 45e281a..0000000
--- a/newt/vendor/golang.org/x/sys/unix/env_unix.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2010 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Unix environment variables.
-
-package unix
-
-import "syscall"
-
-func Getenv(key string) (value string, found bool) {
-	return syscall.Getenv(key)
-}
-
-func Setenv(key, value string) error {
-	return syscall.Setenv(key, value)
-}
-
-func Clearenv() {
-	syscall.Clearenv()
-}
-
-func Environ() []string {
-	return syscall.Environ()
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/env_unset.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/env_unset.go b/newt/vendor/golang.org/x/sys/unix/env_unset.go
deleted file mode 100644
index 9222262..0000000
--- a/newt/vendor/golang.org/x/sys/unix/env_unset.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.4
-
-package unix
-
-import "syscall"
-
-func Unsetenv(key string) error {
-	// This was added in Go 1.4.
-	return syscall.Unsetenv(key)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/flock.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/flock.go b/newt/vendor/golang.org/x/sys/unix/flock.go
deleted file mode 100644
index ce67a59..0000000
--- a/newt/vendor/golang.org/x/sys/unix/flock.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// +build linux darwin freebsd openbsd netbsd dragonfly
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package unix
-
-import "unsafe"
-
-// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
-// systems by flock_linux_32bit.go to be SYS_FCNTL64.
-var fcntl64Syscall uintptr = SYS_FCNTL
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
-	_, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
-	if errno == 0 {
-		return nil
-	}
-	return errno
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/flock_linux_32bit.go b/newt/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
deleted file mode 100644
index 362831c..0000000
--- a/newt/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build linux,386 linux,arm
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package unix
-
-func init() {
-	// On 32-bit Linux systems, the fcntl syscall that matches Go's
-	// Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
-	fcntl64Syscall = SYS_FCNTL64
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/gccgo.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/gccgo.go b/newt/vendor/golang.org/x/sys/unix/gccgo.go
deleted file mode 100644
index 94c8232..0000000
--- a/newt/vendor/golang.org/x/sys/unix/gccgo.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-package unix
-
-import "syscall"
-
-// We can't use the gc-syntax .s files for gccgo.  On the plus side
-// much of the functionality can be written directly in Go.
-
-//extern gccgoRealSyscall
-func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
-	syscall.Entersyscall()
-	r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
-	syscall.Exitsyscall()
-	return r, 0, syscall.Errno(errno)
-}
-
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
-	syscall.Entersyscall()
-	r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
-	syscall.Exitsyscall()
-	return r, 0, syscall.Errno(errno)
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) {
-	syscall.Entersyscall()
-	r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9)
-	syscall.Exitsyscall()
-	return r, 0, syscall.Errno(errno)
-}
-
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
-	r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
-	return r, 0, syscall.Errno(errno)
-}
-
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
-	r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
-	return r, 0, syscall.Errno(errno)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/gccgo_c.c
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/gccgo_c.c b/newt/vendor/golang.org/x/sys/unix/gccgo_c.c
deleted file mode 100644
index 07f6be0..0000000
--- a/newt/vendor/golang.org/x/sys/unix/gccgo_c.c
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-#include <errno.h>
-#include <stdint.h>
-#include <unistd.h>
-
-#define _STRINGIFY2_(x) #x
-#define _STRINGIFY_(x) _STRINGIFY2_(x)
-#define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
-
-// Call syscall from C code because the gccgo support for calling from
-// Go to C does not support varargs functions.
-
-struct ret {
-	uintptr_t r;
-	uintptr_t err;
-};
-
-struct ret
-gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
-{
-	struct ret r;
-
-	errno = 0;
-	r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
-	r.err = errno;
-	return r;
-}
-
-// Define the use function in C so that it is not inlined.
-
-extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline));
-
-void
-use(void *p __attribute__ ((unused)))
-{
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/newt/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
deleted file mode 100644
index bffe1a7..0000000
--- a/newt/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo,linux,amd64
-
-package unix
-
-import "syscall"
-
-//extern gettimeofday
-func realGettimeofday(*Timeval, *byte) int32
-
-func gettimeofday(tv *Timeval) (err syscall.Errno) {
-	r := realGettimeofday(tv, nil)
-	if r < 0 {
-		return syscall.GetErrno()
-	}
-	return 0
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go b/newt/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
deleted file mode 100644
index 5633269..0000000
--- a/newt/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo,linux,sparc64
-
-package unix
-
-import "syscall"
-
-//extern sysconf
-func realSysconf(name int) int64
-
-func sysconf(name int) (n int64, err syscall.Errno) {
-	r := realSysconf(name)
-	if r < 0 {
-		return 0, syscall.GetErrno()
-	}
-	return r, 0
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mkall.sh
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mkall.sh b/newt/vendor/golang.org/x/sys/unix/mkall.sh
deleted file mode 100755
index 2a1473f..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mkall.sh
+++ /dev/null
@@ -1,292 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# The unix package provides access to the raw system call
-# interface of the underlying operating system.  Porting Go to
-# a new architecture/operating system combination requires
-# some manual effort, though there are tools that automate
-# much of the process.  The auto-generated files have names
-# beginning with z.
-#
-# This script runs or (given -n) prints suggested commands to generate z files
-# for the current system.  Running those commands is not automatic.
-# This script is documentation more than anything else.
-#
-# * asm_${GOOS}_${GOARCH}.s
-#
-# This hand-written assembly file implements system call dispatch.
-# There are three entry points:
-#
-# 	func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-# 	func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr);
-# 	func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr);
-#
-# The first and second are the standard ones; they differ only in
-# how many arguments can be passed to the kernel.
-# The third is for low-level use by the ForkExec wrapper;
-# unlike the first two, it does not call into the scheduler to
-# let it know that a system call is running.
-#
-# * syscall_${GOOS}.go
-#
-# This hand-written Go file implements system calls that need
-# special handling and lists "//sys" comments giving prototypes
-# for ones that can be auto-generated.  Mksyscall reads those
-# comments to generate the stubs.
-#
-# * syscall_${GOOS}_${GOARCH}.go
-#
-# Same as syscall_${GOOS}.go except that it contains code specific
-# to ${GOOS} on one particular architecture.
-#
-# * types_${GOOS}.c
-#
-# This hand-written C file includes standard C headers and then
-# creates typedef or enum names beginning with a dollar sign
-# (use of $ in variable names is a gcc extension).  The hardest
-# part about preparing this file is figuring out which headers to
-# include and which symbols need to be #defined to get the
-# actual data structures that pass through to the kernel system calls.
-# Some C libraries present alternate versions for binary compatibility
-# and translate them on the way in and out of system calls, but
-# there is almost always a #define that can get the real ones.
-# See types_darwin.c and types_linux.c for examples.
-#
-# * zerror_${GOOS}_${GOARCH}.go
-#
-# This machine-generated file defines the system's error numbers,
-# error strings, and signal numbers.  The generator is "mkerrors.sh".
-# Usually no arguments are needed, but mkerrors.sh will pass its
-# arguments on to godefs.
-#
-# * zsyscall_${GOOS}_${GOARCH}.go
-#
-# Generated by mksyscall.pl; see syscall_${GOOS}.go above.
-#
-# * zsysnum_${GOOS}_${GOARCH}.go
-#
-# Generated by mksysnum_${GOOS}.
-#
-# * ztypes_${GOOS}_${GOARCH}.go
-#
-# Generated by godefs; see types_${GOOS}.c above.
-
-GOOSARCH="${GOOS}_${GOARCH}"
-
-# defaults
-mksyscall="./mksyscall.pl"
-mkerrors="./mkerrors.sh"
-zerrors="zerrors_$GOOSARCH.go"
-mksysctl=""
-zsysctl="zsysctl_$GOOSARCH.go"
-mksysnum=
-mktypes=
-run="sh"
-
-case "$1" in
--syscalls)
-	for i in zsyscall*go
-	do
-		sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
-		rm _$i
-	done
-	exit 0
-	;;
--n)
-	run="cat"
-	shift
-esac
-
-case "$#" in
-0)
-	;;
-*)
-	echo 'usage: mkall.sh [-n]' 1>&2
-	exit 2
-esac
-
-GOOSARCH_in=syscall_$GOOSARCH.go
-case "$GOOSARCH" in
-_* | *_ | _)
-	echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
-	exit 1
-	;;
-darwin_386)
-	mkerrors="$mkerrors -m32"
-	mksyscall="./mksyscall.pl -l32"
-	mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-darwin_amd64)
-	mkerrors="$mkerrors -m64"
-	mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-darwin_arm)
-	mkerrors="$mkerrors"
-	mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-darwin_arm64)
-	mkerrors="$mkerrors -m64"
-	mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-dragonfly_386)
-	mkerrors="$mkerrors -m32"
-	mksyscall="./mksyscall.pl -l32 -dragonfly"
-	mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-dragonfly_amd64)
-	mkerrors="$mkerrors -m64"
-	mksyscall="./mksyscall.pl -dragonfly"
-	mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-freebsd_386)
-	mkerrors="$mkerrors -m32"
-	mksyscall="./mksyscall.pl -l32"
-	mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-freebsd_amd64)
-	mkerrors="$mkerrors -m64"
-	mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-freebsd_arm)
-	mkerrors="$mkerrors"
-	mksyscall="./mksyscall.pl -l32 -arm"
-	mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
-	# Let the type of C char be signed for making the bare syscall
-	# API consistent across over platforms.
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
-	;;
-linux_386)
-	mkerrors="$mkerrors -m32"
-	mksyscall="./mksyscall.pl -l32"
-	mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd_32.h"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-linux_amd64)
-	unistd_h=$(ls -1 /usr/include/asm/unistd_64.h /usr/include/x86_64-linux-gnu/asm/unistd_64.h 2>/dev/null | head -1)
-	if [ "$unistd_h" = "" ]; then
-		echo >&2 cannot find unistd_64.h
-		exit 1
-	fi
-	mkerrors="$mkerrors -m64"
-	mksysnum="./mksysnum_linux.pl $unistd_h"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-linux_arm)
-	mkerrors="$mkerrors"
-	mksyscall="./mksyscall.pl -l32 -arm"
-	mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl -"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-linux_arm64)
-	unistd_h=$(ls -1 /usr/include/asm/unistd.h /usr/include/asm-generic/unistd.h 2>/dev/null | head -1)
-	if [ "$unistd_h" = "" ]; then
-		echo >&2 cannot find unistd_64.h
-		exit 1
-	fi
-	mksysnum="./mksysnum_linux.pl $unistd_h"
-	# Let the type of C char be signed for making the bare syscall
-	# API consistent across over platforms.
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
-	;;
-linux_ppc64)
-	GOOSARCH_in=syscall_linux_ppc64x.go
-	unistd_h=/usr/include/asm/unistd.h
-	mkerrors="$mkerrors -m64"
-	mksysnum="./mksysnum_linux.pl $unistd_h"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-linux_ppc64le)
-	GOOSARCH_in=syscall_linux_ppc64x.go
-	unistd_h=/usr/include/powerpc64le-linux-gnu/asm/unistd.h
-	mkerrors="$mkerrors -m64"
-	mksysnum="./mksysnum_linux.pl $unistd_h"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-linux_s390x)
-	GOOSARCH_in=syscall_linux_s390x.go
-	unistd_h=/usr/include/asm/unistd.h
-	mkerrors="$mkerrors -m64"
-	mksysnum="./mksysnum_linux.pl $unistd_h"
-	# Let the type of C char be signed to make the bare sys
-	# API more consistent between platforms.
-	# This is a deliberate departure from the way the syscall
-	# package generates its version of the types file.
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
-	;;
-linux_sparc64)
-	GOOSARCH_in=syscall_linux_sparc64.go
-	unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h
-	mkerrors="$mkerrors -m64"
-	mksysnum="./mksysnum_linux.pl $unistd_h"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-netbsd_386)
-	mkerrors="$mkerrors -m32"
-	mksyscall="./mksyscall.pl -l32 -netbsd"
-	mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-netbsd_amd64)
-	mkerrors="$mkerrors -m64"
-	mksyscall="./mksyscall.pl -netbsd"
-	mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-openbsd_386)
-	mkerrors="$mkerrors -m32"
-	mksyscall="./mksyscall.pl -l32 -openbsd"
-	mksysctl="./mksysctl_openbsd.pl"
-	zsysctl="zsysctl_openbsd.go"
-	mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-openbsd_amd64)
-	mkerrors="$mkerrors -m64"
-	mksyscall="./mksyscall.pl -openbsd"
-	mksysctl="./mksysctl_openbsd.pl"
-	zsysctl="zsysctl_openbsd.go"
-	mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-solaris_amd64)
-	mksyscall="./mksyscall_solaris.pl"
-	mkerrors="$mkerrors -m64"
-	mksysnum=
-	mktypes="GOARCH=$GOARCH go tool cgo -godefs"
-	;;
-*)
-	echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
-	exit 1
-	;;
-esac
-
-(
-	if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
-	case "$GOOS" in
-	*)
-		syscall_goos="syscall_$GOOS.go"
-		case "$GOOS" in
-		darwin | dragonfly | freebsd | netbsd | openbsd)
-			syscall_goos="syscall_bsd.go $syscall_goos"
-			;;
-		esac
-		if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi
-		;;
-	esac
-	if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
-	if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
-	if [ -n "$mktypes" ]; then
-		echo "echo // +build $GOARCH,$GOOS > ztypes_$GOOSARCH.go";
-		echo "$mktypes types_$GOOS.go | go run mkpost.go >>ztypes_$GOOSARCH.go";
-	fi
-) | $run

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mkerrors.sh
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mkerrors.sh b/newt/vendor/golang.org/x/sys/unix/mkerrors.sh
deleted file mode 100755
index 33b7922..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ /dev/null
@@ -1,483 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# Generate Go code listing errors and other #defined constant
-# values (ENAMETOOLONG etc.), by asking the preprocessor
-# about the definitions.
-
-unset LANG
-export LC_ALL=C
-export LC_CTYPE=C
-
-if test -z "$GOARCH" -o -z "$GOOS"; then
-	echo 1>&2 "GOARCH or GOOS not defined in environment"
-	exit 1
-fi
-
-CC=${CC:-cc}
-
-if [[ "$GOOS" -eq "solaris" ]]; then
-	# Assumes GNU versions of utilities in PATH.
-	export PATH=/usr/gnu/bin:$PATH
-fi
-
-uname=$(uname)
-
-includes_Darwin='
-#define _DARWIN_C_SOURCE
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/ptrace.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <termios.h>
-'
-
-includes_DragonFly='
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <net/ip_mroute/ip_mroute.h>
-'
-
-includes_FreeBSD='
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-#include <sys/extattr.h>
-
-#if __FreeBSD__ >= 10
-#define IFT_CARP	0xf8	// IFT_CARP is deprecated in FreeBSD 10
-#undef SIOCAIFADDR
-#define SIOCAIFADDR	_IOW(105, 26, struct oifaliasreq)	// ifaliasreq contains if_data
-#undef SIOCSIFPHYADDR
-#define SIOCSIFPHYADDR	_IOW(105, 70, struct oifaliasreq)	// ifaliasreq contains if_data
-#endif
-'
-
-includes_Linux='
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#ifndef __LP64__
-#define _FILE_OFFSET_BITS 64
-#endif
-#define _GNU_SOURCE
-
-#include <bits/sockaddr.h>
-#include <sys/epoll.h>
-#include <sys/inotify.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/prctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <linux/if.h>
-#include <linux/if_arp.h>
-#include <linux/if_ether.h>
-#include <linux/if_tun.h>
-#include <linux/if_packet.h>
-#include <linux/if_addr.h>
-#include <linux/filter.h>
-#include <linux/netlink.h>
-#include <linux/reboot.h>
-#include <linux/rtnetlink.h>
-#include <linux/ptrace.h>
-#include <linux/sched.h>
-#include <linux/wait.h>
-#include <linux/icmpv6.h>
-#include <linux/serial.h>
-#include <net/route.h>
-#include <asm/termbits.h>
-
-#ifndef MSG_FASTOPEN
-#define MSG_FASTOPEN    0x20000000
-#endif
-
-#ifndef PTRACE_GETREGS
-#define PTRACE_GETREGS	0xc
-#endif
-
-#ifndef PTRACE_SETREGS
-#define PTRACE_SETREGS	0xd
-#endif
-
-#ifdef SOL_BLUETOOTH
-// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
-// but it is already in bluetooth_linux.go
-#undef SOL_BLUETOOTH
-#endif
-'
-
-includes_NetBSD='
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/termios.h>
-#include <sys/ttycom.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-#include <netinet/if_ether.h>
-
-// Needed since <sys/param.h> refers to it...
-#define schedppq 1
-'
-
-includes_OpenBSD='
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <sys/termios.h>
-#include <sys/ttycom.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_types.h>
-#include <net/if_var.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-#include <netinet/if_ether.h>
-#include <net/if_bridge.h>
-
-// We keep some constants not supported in OpenBSD 5.5 and beyond for
-// the promise of compatibility.
-#define EMUL_ENABLED		0x1
-#define EMUL_NATIVE		0x2
-#define IPV6_FAITH		0x1d
-#define IPV6_OPTIONS		0x1
-#define IPV6_RTHDR_STRICT	0x1
-#define IPV6_SOCKOPT_RESERVED1	0x3
-#define SIOCGIFGENERIC		0xc020693a
-#define SIOCSIFGENERIC		0x80206939
-#define WALTSIG			0x4
-'
-
-includes_SunOS='
-#include <limits.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/mman.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <net/if_types.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <termios.h>
-#include <netinet/ip.h>
-#include <netinet/ip_mroute.h>
-'
-
-
-includes='
-#include <sys/types.h>
-#include <sys/file.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip6.h>
-#include <netinet/tcp.h>
-#include <errno.h>
-#include <sys/signal.h>
-#include <signal.h>
-#include <sys/resource.h>
-#include <time.h>
-'
-ccflags="$@"
-
-# Write go tool cgo -godefs input.
-(
-	echo package unix
-	echo
-	echo '/*'
-	indirect="includes_$(uname)"
-	echo "${!indirect} $includes"
-	echo '*/'
-	echo 'import "C"'
-	echo 'import "syscall"'
-	echo
-	echo 'const ('
-
-	# The gcc command line prints all the #defines
-	# it encounters while processing the input
-	echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags |
-	awk '
-		$1 != "#define" || $2 ~ /\(/ || $3 == "" {next}
-
-		$2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next}  # 386 registers
-		$2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
-		$2 ~ /^(SCM_SRCRT)$/ {next}
-		$2 ~ /^(MAP_FAILED)$/ {next}
-		$2 ~ /^ELF_.*$/ {next}# <asm/elf.h> contains ELF_ARCH, etc.
-
-		$2 ~ /^EXTATTR_NAMESPACE_NAMES/ ||
-		$2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next}
-
-		$2 !~ /^ETH_/ &&
-		$2 !~ /^EPROC_/ &&
-		$2 !~ /^EQUIV_/ &&
-		$2 !~ /^EXPR_/ &&
-		$2 ~ /^E[A-Z0-9_]+$/ ||
-		$2 ~ /^B[0-9_]+$/ ||
-		$2 == "BOTHER" ||
-		$2 ~ /^CI?BAUD(EX)?$/ ||
-		$2 == "IBSHIFT" ||
-		$2 ~ /^V[A-Z0-9]+$/ ||
-		$2 ~ /^CS[A-Z0-9]/ ||
-		$2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ ||
-		$2 ~ /^IGN/ ||
-		$2 ~ /^IX(ON|ANY|OFF)$/ ||
-		$2 ~ /^IN(LCR|PCK)$/ ||
-		$2 ~ /(^FLU?SH)|(FLU?SH$)/ ||
-		$2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ ||
-		$2 == "BRKINT" ||
-		$2 == "HUPCL" ||
-		$2 == "PENDIN" ||
-		$2 == "TOSTOP" ||
-		$2 == "XCASE" ||
-		$2 == "ALTWERASE" ||
-		$2 == "NOKERNINFO" ||
-		$2 ~ /^PAR/ ||
-		$2 ~ /^SIG[^_]/ ||
-		$2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
-		$2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
-		$2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
-		$2 ~ /^O?XTABS$/ ||
-		$2 ~ /^TC[IO](ON|OFF)$/ ||
-		$2 ~ /^IN_/ ||
-		$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
-		$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
-		$2 == "ICMPV6_FILTER" ||
-		$2 == "SOMAXCONN" ||
-		$2 == "NAME_MAX" ||
-		$2 == "IFNAMSIZ" ||
-		$2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
-		$2 ~ /^SYSCTL_VERS/ ||
-		$2 ~ /^(MS|MNT)_/ ||
-		$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
-		$2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ ||
-		$2 ~ /^LINUX_REBOOT_CMD_/ ||
-		$2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
-		$2 !~ "NLA_TYPE_MASK" &&
-		$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
-		$2 ~ /^SIOC/ ||
-		$2 ~ /^TIOC/ ||
-		$2 ~ /^TCGET/ ||
-		$2 ~ /^TCSET/ ||
-		$2 ~ /^TC(FLSH|SBRKP?|XONC)$/ ||
-		$2 !~ "RTF_BITS" &&
-		$2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
-		$2 ~ /^BIOC/ ||
-		$2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
-		$2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ ||
-		$2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
-		$2 ~ /^CLONE_[A-Z_]+/ ||
-		$2 !~ /^(BPF_TIMEVAL)$/ &&
-		$2 ~ /^(BPF|DLT)_/ ||
-		$2 ~ /^CLOCK_/ ||
-		$2 !~ "WMESGLEN" &&
-		$2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
-		$2 ~ /^__WCOREFLAG$/ {next}
-		$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
-
-		{next}
-	' | sort
-
-	echo ')'
-) >_const.go
-
-# Pull out the error names for later.
-errors=$(
-	echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
-	awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |
-	sort
-)
-
-# Pull out the signal names for later.
-signals=$(
-	echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
-	awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
-	egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
-	sort
-)
-
-# Again, writing regexps to a file.
-echo '#include <errno.h>' | $CC -x c - -E -dM $ccflags |
-	awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' |
-	sort >_error.grep
-echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
-	awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
-	egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
-	sort >_signal.grep
-
-echo '// mkerrors.sh' "$@"
-echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT'
-echo
-echo "// +build ${GOARCH},${GOOS}"
-echo
-go tool cgo -godefs -- "$@" _const.go >_error.out
-cat _error.out | grep -vf _error.grep | grep -vf _signal.grep
-echo
-echo '// Errors'
-echo 'const ('
-cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= syscall.Errno(\1)/'
-echo ')'
-
-echo
-echo '// Signals'
-echo 'const ('
-cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= syscall.Signal(\1)/'
-echo ')'
-
-# Run C program to print error and syscall strings.
-(
-	echo -E "
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <ctype.h>
-#include <string.h>
-#include <signal.h>
-
-#define nelem(x) (sizeof(x)/sizeof((x)[0]))
-
-enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below
-
-int errors[] = {
-"
-	for i in $errors
-	do
-		echo -E '	'$i,
-	done
-
-	echo -E "
-};
-
-int signals[] = {
-"
-	for i in $signals
-	do
-		echo -E '	'$i,
-	done
-
-	# Use -E because on some systems bash builtin interprets \n itself.
-	echo -E '
-};
-
-static int
-intcmp(const void *a, const void *b)
-{
-	return *(int*)a - *(int*)b;
-}
-
-int
-main(void)
-{
-	int i, j, e;
-	char buf[1024], *p;
-
-	printf("\n\n// Error table\n");
-	printf("var errors = [...]string {\n");
-	qsort(errors, nelem(errors), sizeof errors[0], intcmp);
-	for(i=0; i<nelem(errors); i++) {
-		e = errors[i];
-		if(i > 0 && errors[i-1] == e)
-			continue;
-		strcpy(buf, strerror(e));
-		// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
-		if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
-			buf[0] += a - A;
-		printf("\t%d: \"%s\",\n", e, buf);
-	}
-	printf("}\n\n");
-	
-	printf("\n\n// Signal table\n");
-	printf("var signals = [...]string {\n");
-	qsort(signals, nelem(signals), sizeof signals[0], intcmp);
-	for(i=0; i<nelem(signals); i++) {
-		e = signals[i];
-		if(i > 0 && signals[i-1] == e)
-			continue;
-		strcpy(buf, strsignal(e));
-		// lowercase first letter: Bad -> bad, but STREAM -> STREAM.
-		if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
-			buf[0] += a - A;
-		// cut trailing : number.
-		p = strrchr(buf, ":"[0]);
-		if(p)
-			*p = '\0';
-		printf("\t%d: \"%s\",\n", e, buf);
-	}
-	printf("}\n\n");
-
-	return 0;
-}
-
-'
-) >_errors.c
-
-$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mkpost.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mkpost.go b/newt/vendor/golang.org/x/sys/unix/mkpost.go
deleted file mode 100644
index ed50d90..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mkpost.go
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-// mkpost processes the output of cgo -godefs to
-// modify the generated types. It is used to clean up
-// the sys API in an architecture specific manner.
-//
-// mkpost is run after cgo -godefs by mkall.sh.
-package main
-
-import (
-	"fmt"
-	"go/format"
-	"io/ioutil"
-	"log"
-	"os"
-	"regexp"
-)
-
-func main() {
-	b, err := ioutil.ReadAll(os.Stdin)
-	if err != nil {
-		log.Fatal(err)
-	}
-	s := string(b)
-
-	goarch := os.Getenv("GOARCH")
-	goos := os.Getenv("GOOS")
-	if goarch == "s390x" && goos == "linux" {
-		// Export the types of PtraceRegs fields.
-		re := regexp.MustCompile("ptrace(Psw|Fpregs|Per)")
-		s = re.ReplaceAllString(s, "Ptrace$1")
-
-		// Replace padding fields inserted by cgo with blank identifiers.
-		re = regexp.MustCompile("Pad_cgo[A-Za-z0-9_]*")
-		s = re.ReplaceAllString(s, "_")
-
-		// Replace other unwanted fields with blank identifiers.
-		re = regexp.MustCompile("X_[A-Za-z0-9_]*")
-		s = re.ReplaceAllString(s, "_")
-
-		// Replace the control_regs union with a blank identifier for now.
-		re = regexp.MustCompile("(Control_regs)\\s+\\[0\\]uint64")
-		s = re.ReplaceAllString(s, "_ [0]uint64")
-	}
-
-	// gofmt
-	b, err = format.Source([]byte(s))
-	if err != nil {
-		log.Fatal(err)
-	}
-
-	// Append this command to the header to show where the new file
-	// came from.
-	re := regexp.MustCompile("(cgo -godefs [a-zA-Z0-9_]+\\.go.*)")
-	b = re.ReplaceAll(b, []byte("$1 | go run mkpost.go"))
-
-	fmt.Printf("%s", b)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mksyscall.pl
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mksyscall.pl b/newt/vendor/golang.org/x/sys/unix/mksyscall.pl
deleted file mode 100755
index b1e7766..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mksyscall.pl
+++ /dev/null
@@ -1,323 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# This program reads a file containing function prototypes
-# (like syscall_darwin.go) and generates system call bodies.
-# The prototypes are marked by lines beginning with "//sys"
-# and read like func declarations if //sys is replaced by func, but:
-#	* The parameter lists must give a name for each argument.
-#	  This includes return parameters.
-#	* The parameter lists must give a type for each argument:
-#	  the (x, y, z int) shorthand is not allowed.
-#	* If the return parameter is an error number, it must be named errno.
-
-# A line beginning with //sysnb is like //sys, except that the
-# goroutine will not be suspended during the execution of the system
-# call.  This must only be used for system calls which can never
-# block, as otherwise the system call could cause all goroutines to
-# hang.
-
-use strict;
-
-my $cmdline = "mksyscall.pl " . join(' ', @ARGV);
-my $errors = 0;
-my $_32bit = "";
-my $plan9 = 0;
-my $openbsd = 0;
-my $netbsd = 0;
-my $dragonfly = 0;
-my $arm = 0; # 64-bit value should use (even, odd)-pair
-
-if($ARGV[0] eq "-b32") {
-	$_32bit = "big-endian";
-	shift;
-} elsif($ARGV[0] eq "-l32") {
-	$_32bit = "little-endian";
-	shift;
-}
-if($ARGV[0] eq "-plan9") {
-	$plan9 = 1;
-	shift;
-}
-if($ARGV[0] eq "-openbsd") {
-	$openbsd = 1;
-	shift;
-}
-if($ARGV[0] eq "-netbsd") {
-	$netbsd = 1;
-	shift;
-}
-if($ARGV[0] eq "-dragonfly") {
-	$dragonfly = 1;
-	shift;
-}
-if($ARGV[0] eq "-arm") {
-	$arm = 1;
-	shift;
-}
-
-if($ARGV[0] =~ /^-/) {
-	print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n";
-	exit 1;
-}
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
-	print STDERR "GOARCH or GOOS not defined in environment\n";
-	exit 1;
-}
-
-sub parseparamlist($) {
-	my ($list) = @_;
-	$list =~ s/^\s*//;
-	$list =~ s/\s*$//;
-	if($list eq "") {
-		return ();
-	}
-	return split(/\s*,\s*/, $list);
-}
-
-sub parseparam($) {
-	my ($p) = @_;
-	if($p !~ /^(\S*) (\S*)$/) {
-		print STDERR "$ARGV:$.: malformed parameter: $p\n";
-		$errors = 1;
-		return ("xx", "int");
-	}
-	return ($1, $2);
-}
-
-my $text = "";
-while(<>) {
-	chomp;
-	s/\s+/ /g;
-	s/^\s+//;
-	s/\s+$//;
-	my $nonblock = /^\/\/sysnb /;
-	next if !/^\/\/sys / && !$nonblock;
-
-	# Line must be of the form
-	#	func Open(path string, mode int, perm int) (fd int, errno error)
-	# Split into name, in params, out params.
-	if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) {
-		print STDERR "$ARGV:$.: malformed //sys declaration\n";
-		$errors = 1;
-		next;
-	}
-	my ($func, $in, $out, $sysname) = ($2, $3, $4, $5);
-
-	# Split argument lists on comma.
-	my @in = parseparamlist($in);
-	my @out = parseparamlist($out);
-
-	# Try in vain to keep people from editing this file.
-	# The theory is that they jump into the middle of the file
-	# without reading the header.
-	$text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
-
-	# Go function header.
-	my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : "";
-	$text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl;
-
-	# Check if err return available
-	my $errvar = "";
-	foreach my $p (@out) {
-		my ($name, $type) = parseparam($p);
-		if($type eq "error") {
-			$errvar = $name;
-			last;
-		}
-	}
-
-	# Prepare arguments to Syscall.
-	my @args = ();
-	my @uses = ();
-	my $n = 0;
-	foreach my $p (@in) {
-		my ($name, $type) = parseparam($p);
-		if($type =~ /^\*/) {
-			push @args, "uintptr(unsafe.Pointer($name))";
-		} elsif($type eq "string" && $errvar ne "") {
-			$text .= "\tvar _p$n *byte\n";
-			$text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
-			$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
-			push @args, "uintptr(unsafe.Pointer(_p$n))";
-			push @uses, "use(unsafe.Pointer(_p$n))";
-			$n++;
-		} elsif($type eq "string") {
-			print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
-			$text .= "\tvar _p$n *byte\n";
-			$text .= "\t_p$n, _ = BytePtrFromString($name)\n";
-			push @args, "uintptr(unsafe.Pointer(_p$n))";
-			push @uses, "use(unsafe.Pointer(_p$n))";
-			$n++;
-		} elsif($type =~ /^\[\](.*)/) {
-			# Convert slice into pointer, length.
-			# Have to be careful not to take address of &a[0] if len == 0:
-			# pass dummy pointer in that case.
-			# Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
-			$text .= "\tvar _p$n unsafe.Pointer\n";
-			$text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}";
-			$text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}";
-			$text .= "\n";
-			push @args, "uintptr(_p$n)", "uintptr(len($name))";
-			$n++;
-		} elsif($type eq "int64" && ($openbsd || $netbsd)) {
-			push @args, "0";
-			if($_32bit eq "big-endian") {
-				push @args, "uintptr($name>>32)", "uintptr($name)";
-			} elsif($_32bit eq "little-endian") {
-				push @args, "uintptr($name)", "uintptr($name>>32)";
-			} else {
-				push @args, "uintptr($name)";
-			}
-		} elsif($type eq "int64" && $dragonfly) {
-			if ($func !~ /^extp(read|write)/i) {
-				push @args, "0";
-			}
-			if($_32bit eq "big-endian") {
-				push @args, "uintptr($name>>32)", "uintptr($name)";
-			} elsif($_32bit eq "little-endian") {
-				push @args, "uintptr($name)", "uintptr($name>>32)";
-			} else {
-				push @args, "uintptr($name)";
-			}
-		} elsif($type eq "int64" && $_32bit ne "") {
-			if(@args % 2 && $arm) {
-				# arm abi specifies 64-bit argument uses 
-				# (even, odd) pair
-				push @args, "0"
-			}
-			if($_32bit eq "big-endian") {
-				push @args, "uintptr($name>>32)", "uintptr($name)";
-			} else {
-				push @args, "uintptr($name)", "uintptr($name>>32)";
-			}
-		} else {
-			push @args, "uintptr($name)";
-		}
-	}
-
-	# Determine which form to use; pad args with zeros.
-	my $asm = "Syscall";
-	if ($nonblock) {
-		$asm = "RawSyscall";
-	}
-	if(@args <= 3) {
-		while(@args < 3) {
-			push @args, "0";
-		}
-	} elsif(@args <= 6) {
-		$asm .= "6";
-		while(@args < 6) {
-			push @args, "0";
-		}
-	} elsif(@args <= 9) {
-		$asm .= "9";
-		while(@args < 9) {
-			push @args, "0";
-		}
-	} else {
-		print STDERR "$ARGV:$.: too many arguments to system call\n";
-	}
-
-	# System call number.
-	if($sysname eq "") {
-		$sysname = "SYS_$func";
-		$sysname =~ s/([a-z])([A-Z])/${1}_$2/g;	# turn FooBar into Foo_Bar
-		$sysname =~ y/a-z/A-Z/;
-	}
-
-	# Actual call.
-	my $args = join(', ', @args);
-	my $call = "$asm($sysname, $args)";
-
-	# Assign return values.
-	my $body = "";
-	my @ret = ("_", "_", "_");
-	my $do_errno = 0;
-	for(my $i=0; $i<@out; $i++) {
-		my $p = $out[$i];
-		my ($name, $type) = parseparam($p);
-		my $reg = "";
-		if($name eq "err" && !$plan9) {
-			$reg = "e1";
-			$ret[2] = $reg;
-			$do_errno = 1;
-		} elsif($name eq "err" && $plan9) {
-			$ret[0] = "r0";
-			$ret[2] = "e1";
-			next;
-		} else {
-			$reg = sprintf("r%d", $i);
-			$ret[$i] = $reg;
-		}
-		if($type eq "bool") {
-			$reg = "$reg != 0";
-		}
-		if($type eq "int64" && $_32bit ne "") {
-			# 64-bit number in r1:r0 or r0:r1.
-			if($i+2 > @out) {
-				print STDERR "$ARGV:$.: not enough registers for int64 return\n";
-			}
-			if($_32bit eq "big-endian") {
-				$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
-			} else {
-				$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
-			}
-			$ret[$i] = sprintf("r%d", $i);
-			$ret[$i+1] = sprintf("r%d", $i+1);
-		}
-		if($reg ne "e1" || $plan9) {
-			$body .= "\t$name = $type($reg)\n";
-		}
-	}
-	if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
-		$text .= "\t$call\n";
-	} else {
-		$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
-	}
-	foreach my $use (@uses) {
-		$text .= "\t$use\n";
-	}
-	$text .= $body;
-	
-	if ($plan9 && $ret[2] eq "e1") {
-		$text .= "\tif int32(r0) == -1 {\n";
-		$text .= "\t\terr = e1\n";
-		$text .= "\t}\n";
-	} elsif ($do_errno) {
-		$text .= "\tif e1 != 0 {\n";
-		$text .= "\t\terr = errnoErr(e1)\n";
-		$text .= "\t}\n";
-	}
-	$text .= "\treturn\n";
-	$text .= "}\n\n";
-}
-
-chomp $text;
-chomp $text;
-
-if($errors) {
-	exit 1;
-}
-
-print <<EOF;
-// $cmdline
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-var _ syscall.Errno
-
-$text
-EOF
-exit 0;



[48/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/image/image.go
----------------------------------------------------------------------
diff --git a/newt/image/image.go b/newt/image/image.go
deleted file mode 100644
index dd09b16..0000000
--- a/newt/image/image.go
+++ /dev/null
@@ -1,777 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package image
-
-import (
-	"bytes"
-	"crypto"
-	"crypto/ecdsa"
-	"crypto/rand"
-	"crypto/rsa"
-	"crypto/sha256"
-	"crypto/x509"
-	"encoding/asn1"
-	"encoding/binary"
-	"encoding/hex"
-	"encoding/pem"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"math/big"
-	"os"
-	"sort"
-	"strconv"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/util"
-)
-
-type ImageVersion struct {
-	Major    uint8
-	Minor    uint8
-	Rev      uint16
-	BuildNum uint32
-}
-
-type Image struct {
-	SourceBin  string
-	TargetImg  string
-	Version    ImageVersion
-	SigningRSA *rsa.PrivateKey
-	SigningEC  *ecdsa.PrivateKey
-	KeyId      uint8
-	Hash       []byte
-	SrcSkip    uint // Number of bytes to skip from the source image.
-	HeaderSize uint // If non-zero pad out the header to this size.
-	TotalSize  uint // Total size, in bytes, of the generated .img file.
-}
-
-type ImageHdr struct {
-	Magic uint32
-	TlvSz uint16
-	KeyId uint8
-	Pad1  uint8
-	HdrSz uint16
-	Pad2  uint16
-	ImgSz uint32
-	Flags uint32
-	Vers  ImageVersion
-	Pad3  uint32
-}
-
-type ImageTrailerTlv struct {
-	Type uint8
-	Pad  uint8
-	Len  uint16
-}
-
-const (
-	IMAGE_MAGIC = 0x96f3b83c /* Image header magic */
-)
-
-const (
-	IMAGE_HEADER_SIZE = 32
-)
-
-/*
- * Image header flags.
- */
-const (
-	IMAGE_F_PIC                   = 0x00000001
-	IMAGE_F_SHA256                = 0x00000002 /* Image contains hash TLV */
-	IMAGE_F_PKCS15_RSA2048_SHA256 = 0x00000004 /* PKCS15 w/RSA2048 and SHA256 */
-	IMAGE_F_ECDSA224_SHA256       = 0x00000008 /* ECDSA224 over SHA256 */
-	IMAGE_F_NON_BOOTABLE          = 0x00000010 /* non bootable image */
-	IMAGE_F_ECDSA256_SHA256       = 0x00000020 /* ECDSA256 over SHA256 */
-)
-
-/*
- * Image trailer TLV types.
- */
-const (
-	IMAGE_TLV_SHA256   = 1
-	IMAGE_TLV_RSA2048  = 2
-	IMAGE_TLV_ECDSA224 = 3
-	IMAGE_TLV_ECDSA256 = 4
-)
-
-/*
- * Data that's going to go to build manifest file
- */
-type ImageManifestSizeArea struct {
-	Name string `json:"name"`
-	Size uint32 `json:"size"`
-}
-
-type ImageManifestSizeSym struct {
-	Name  string                   `json:"name"`
-	Areas []*ImageManifestSizeArea `json:"areas"`
-}
-
-type ImageManifestSizeFile struct {
-	Name string                  `json:"name"`
-	Syms []*ImageManifestSizeSym `json:"sym"`
-}
-
-type ImageManifestSizePkg struct {
-	Name  string                   `json:"name"`
-	Files []*ImageManifestSizeFile `json:"files"`
-}
-
-type ImageManifestSizeCollector struct {
-	Pkgs []*ImageManifestSizePkg
-}
-
-type ImageManifest struct {
-	Name       string              `json:"name"`
-	Date       string              `json:"build_time"`
-	Version    string              `json:"build_version"`
-	BuildID    string              `json:"id"`
-	Image      string              `json:"image"`
-	ImageHash  string              `json:"image_hash"`
-	Loader     string              `json:"loader"`
-	LoaderHash string              `json:"loader_hash"`
-	Pkgs       []*ImageManifestPkg `json:"pkgs"`
-	LoaderPkgs []*ImageManifestPkg `json:"loader_pkgs,omitempty"`
-	TgtVars    []string            `json:"target"`
-	Repos      []ImageManifestRepo `json:"repos"`
-
-	PkgSizes       []*ImageManifestSizePkg `json:"pkgsz"`
-	LoaderPkgSizes []*ImageManifestSizePkg `json:"loader_pkgsz,omitempty"`
-}
-
-type ImageManifestPkg struct {
-	Name string `json:"name"`
-	Repo string `json:"repo"`
-}
-
-type ImageManifestRepo struct {
-	Name   string `json:"name"`
-	Commit string `json:"commit"`
-	Dirty  bool   `json:"dirty,omitempty"`
-	URL    string `json:"url,omitempty"`
-}
-
-type RepoManager struct {
-	repos map[string]ImageManifestRepo
-}
-
-type ECDSASig struct {
-	R *big.Int
-	S *big.Int
-}
-
-func ParseVersion(versStr string) (ImageVersion, error) {
-	var err error
-	var major uint64
-	var minor uint64
-	var rev uint64
-	var buildNum uint64
-	var ver ImageVersion
-
-	components := strings.Split(versStr, ".")
-	major, err = strconv.ParseUint(components[0], 10, 8)
-	if err != nil {
-		return ver, util.FmtNewtError("Invalid version string %s", versStr)
-	}
-	if len(components) > 1 {
-		minor, err = strconv.ParseUint(components[1], 10, 8)
-		if err != nil {
-			return ver, util.FmtNewtError("Invalid version string %s", versStr)
-		}
-	}
-	if len(components) > 2 {
-		rev, err = strconv.ParseUint(components[2], 10, 16)
-		if err != nil {
-			return ver, util.FmtNewtError("Invalid version string %s", versStr)
-		}
-	}
-	if len(components) > 3 {
-		buildNum, err = strconv.ParseUint(components[3], 10, 32)
-		if err != nil {
-			return ver, util.FmtNewtError("Invalid version string %s", versStr)
-		}
-	}
-
-	ver.Major = uint8(major)
-	ver.Minor = uint8(minor)
-	ver.Rev = uint16(rev)
-	ver.BuildNum = uint32(buildNum)
-	return ver, nil
-}
-
-func (ver ImageVersion) String() string {
-	return fmt.Sprintf("%d.%d.%d.%d",
-		ver.Major, ver.Minor, ver.Rev, ver.BuildNum)
-}
-
-func NewImage(srcBinPath string, dstImgPath string) (*Image, error) {
-	image := &Image{}
-
-	image.SourceBin = srcBinPath
-	image.TargetImg = dstImgPath
-	return image, nil
-}
-
-func (image *Image) SetVersion(versStr string) error {
-	ver, err := ParseVersion(versStr)
-	if err != nil {
-		return err
-	}
-
-	log.Debugf("Assigning version number %d.%d.%d.%d\n",
-		ver.Major, ver.Minor, ver.Rev, ver.BuildNum)
-
-	image.Version = ver
-
-	buf := new(bytes.Buffer)
-	err = binary.Write(buf, binary.LittleEndian, image.Version)
-	if err != nil {
-		fmt.Printf("Bombing out\n")
-		return nil
-	}
-
-	return nil
-}
-
-func (image *Image) SetSigningKey(fileName string, keyId uint8) error {
-	data, err := ioutil.ReadFile(fileName)
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Error reading key file: %s", err))
-	}
-
-	block, data := pem.Decode(data)
-	if block != nil && block.Type == "EC PARAMETERS" {
-		/*
-		 * Openssl prepends an EC PARAMETERS block before the
-		 * key itself.  If we see this first, just skip it,
-		 * and go on to the data block.
-		 */
-		block, _ = pem.Decode(data)
-	}
-	if block != nil && block.Type == "RSA PRIVATE KEY" {
-		/*
-		 * ParsePKCS1PrivateKey returns an RSA private key from its ASN.1
-		 * PKCS#1 DER encoded form.
-		 */
-		privateKey, err := x509.ParsePKCS1PrivateKey(block.Bytes)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Private key parsing "+
-				"failed: %s", err))
-		}
-		image.SigningRSA = privateKey
-	}
-	if block != nil && block.Type == "EC PRIVATE KEY" {
-		/*
-		 * ParseECPrivateKey returns a EC private key
-		 */
-		privateKey, err := x509.ParseECPrivateKey(block.Bytes)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Private key parsing "+
-				"failed: %s", err))
-		}
-		image.SigningEC = privateKey
-	}
-	if image.SigningEC == nil && image.SigningRSA == nil {
-		return util.NewNewtError("Unknown private key format, EC/RSA private " +
-			"key in PEM format only.")
-	}
-	image.KeyId = keyId
-
-	return nil
-}
-
-func (image *Image) sigHdrType() (uint32, error) {
-	if image.SigningRSA != nil {
-		return IMAGE_F_PKCS15_RSA2048_SHA256, nil
-	} else if image.SigningEC != nil {
-		switch image.SigningEC.Curve.Params().Name {
-		case "P-224":
-			return IMAGE_F_ECDSA224_SHA256, nil
-		case "P-256":
-			return IMAGE_F_ECDSA256_SHA256, nil
-		default:
-			return 0, util.NewNewtError("Unsupported ECC curve")
-		}
-	} else {
-		return 0, nil
-	}
-}
-
-func (image *Image) sigLen() uint16 {
-	if image.SigningRSA != nil {
-		return 256
-	} else if image.SigningEC != nil {
-		switch image.SigningEC.Curve.Params().Name {
-		case "P-224":
-			return 68
-		case "P-256":
-			return 72
-		default:
-			return 0
-		}
-	} else {
-		return 0
-	}
-}
-
-func (image *Image) sigTlvType() uint8 {
-	if image.SigningRSA != nil {
-		return IMAGE_TLV_RSA2048
-	} else if image.SigningEC != nil {
-		switch image.SigningEC.Curve.Params().Name {
-		case "P-224":
-			return IMAGE_TLV_ECDSA224
-		case "P-256":
-			return IMAGE_TLV_ECDSA256
-		default:
-			return 0
-		}
-	} else {
-		return 0
-	}
-}
-
-func (image *Image) Generate(loader *Image) error {
-	binFile, err := os.Open(image.SourceBin)
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Can't open app binary: %s",
-			err.Error()))
-	}
-	defer binFile.Close()
-
-	binInfo, err := binFile.Stat()
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Can't stat app binary %s: %s",
-			image.SourceBin, err.Error()))
-	}
-
-	imgFile, err := os.OpenFile(image.TargetImg,
-		os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0777)
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Can't open target image %s: %s",
-			image.TargetImg, err.Error()))
-	}
-	defer imgFile.Close()
-
-	/*
-	 * Compute hash while updating the file.
-	 */
-	hash := sha256.New()
-
-	if loader != nil {
-		err = binary.Write(hash, binary.LittleEndian, loader.Hash)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to seed hash: %s",
-				err.Error()))
-		}
-	}
-
-	/*
-	 * First the header
-	 */
-	hdr := &ImageHdr{
-		Magic: IMAGE_MAGIC,
-		TlvSz: 0,
-		KeyId: 0,
-		Pad1:  0,
-		HdrSz: IMAGE_HEADER_SIZE,
-		Pad2:  0,
-		ImgSz: uint32(binInfo.Size()) - uint32(image.SrcSkip),
-		Flags: 0,
-		Vers:  image.Version,
-		Pad3:  0,
-	}
-
-	hdr.Flags, err = image.sigHdrType()
-	if err != nil {
-		return err
-	}
-	if hdr.Flags != 0 {
-		/*
-		 * Signature present
-		 */
-		hdr.TlvSz = 4 + image.sigLen()
-		hdr.KeyId = image.KeyId
-	}
-
-	hdr.TlvSz += 4 + 32
-	hdr.Flags |= IMAGE_F_SHA256
-
-	if loader != nil {
-		hdr.Flags |= IMAGE_F_NON_BOOTABLE
-	}
-
-	if image.HeaderSize != 0 {
-		/*
-		 * Pad the header out to the given size.  There will
-		 * just be zeros between the header and the start of
-		 * the image when it is padded.
-		 */
-		if image.HeaderSize < IMAGE_HEADER_SIZE {
-			return util.NewNewtError(fmt.Sprintf("Image header must be at least %d bytes", IMAGE_HEADER_SIZE))
-		}
-
-		hdr.HdrSz = uint16(image.HeaderSize)
-	}
-
-	err = binary.Write(imgFile, binary.LittleEndian, hdr)
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Failed to serialize image hdr: %s",
-			err.Error()))
-	}
-	err = binary.Write(hash, binary.LittleEndian, hdr)
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Failed to hash data: %s",
-			err.Error()))
-	}
-
-	if image.HeaderSize > IMAGE_HEADER_SIZE {
-		/*
-		 * Pad the image (and hash) with zero bytes to fill
-		 * out the buffer.
-		 */
-		buf := make([]byte, image.HeaderSize-IMAGE_HEADER_SIZE)
-
-		_, err = imgFile.Write(buf)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to write padding: %s",
-				err.Error()))
-		}
-
-		_, err = hash.Write(buf)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to hash padding: %s",
-				err.Error()))
-		}
-	}
-
-	/*
-	 * Skip requested initial part of image.
-	 */
-	if image.SrcSkip > 0 {
-		buf := make([]byte, image.SrcSkip)
-		_, err = binFile.Read(buf)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to read from %s: %s",
-				image.SourceBin, err.Error()))
-		}
-
-		nonZero := false
-		for _, b := range buf {
-			if b != 0 {
-				nonZero = true
-				break
-			}
-		}
-		if nonZero {
-			log.Warnf("Skip requested of iamge %s, but image not preceeded by %d bytes of all zeros",
-				image.SourceBin, image.SrcSkip)
-		}
-	}
-
-	/*
-	 * Followed by data.
-	 */
-	dataBuf := make([]byte, 1024)
-	for {
-		cnt, err := binFile.Read(dataBuf)
-		if err != nil && err != io.EOF {
-			return util.NewNewtError(fmt.Sprintf("Failed to read from %s: %s",
-				image.SourceBin, err.Error()))
-		}
-		if cnt == 0 {
-			break
-		}
-		_, err = imgFile.Write(dataBuf[0:cnt])
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to write to %s: %s",
-				image.TargetImg, err.Error()))
-		}
-		_, err = hash.Write(dataBuf[0:cnt])
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to hash data: %s",
-				err.Error()))
-		}
-	}
-
-	image.Hash = hash.Sum(nil)
-
-	/*
-	 * Trailer with hash of the data
-	 */
-	tlv := &ImageTrailerTlv{
-		Type: IMAGE_TLV_SHA256,
-		Pad:  0,
-		Len:  uint16(len(image.Hash)),
-	}
-	err = binary.Write(imgFile, binary.LittleEndian, tlv)
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Failed to serialize image "+
-			"trailer: %s", err.Error()))
-	}
-	_, err = imgFile.Write(image.Hash)
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Failed to append hash: %s",
-			err.Error()))
-	}
-
-	if image.SigningRSA != nil {
-		/*
-		 * If signing key was set, generate TLV for that.
-		 */
-		tlv := &ImageTrailerTlv{
-			Type: IMAGE_TLV_RSA2048,
-			Pad:  0,
-			Len:  256, /* 2048 bits */
-		}
-		signature, err := rsa.SignPKCS1v15(rand.Reader, image.SigningRSA,
-			crypto.SHA256, image.Hash)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf(
-				"Failed to compute signature: %s", err))
-		}
-
-		err = binary.Write(imgFile, binary.LittleEndian, tlv)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to serialize image "+
-				"trailer: %s", err.Error()))
-		}
-		_, err = imgFile.Write(signature)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to append sig: %s",
-				err.Error()))
-		}
-	}
-	if image.SigningEC != nil {
-		r, s, err := ecdsa.Sign(rand.Reader, image.SigningEC, image.Hash)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf(
-				"Failed to compute signature: %s", err))
-		}
-
-		sigLen := image.sigLen()
-
-		var ECDSA ECDSASig
-		ECDSA.R = r
-		ECDSA.S = s
-		signature, err := asn1.Marshal(ECDSA)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf(
-				"Failed to construct signature: %s", err))
-		}
-		if len(signature) > int(sigLen) {
-			return util.NewNewtError(fmt.Sprintf(
-				"Something is really wrong\n"))
-		}
-		tlv := &ImageTrailerTlv{
-			Type: image.sigTlvType(),
-			Pad:  0,
-			Len:  sigLen,
-		}
-		err = binary.Write(imgFile, binary.LittleEndian, tlv)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to serialize image "+
-				"trailer: %s", err.Error()))
-		}
-		_, err = imgFile.Write(signature)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to append sig: %s",
-				err.Error()))
-		}
-		pad := make([]byte, int(sigLen)-len(signature))
-		_, err = imgFile.Write(pad)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Failed to serialize image "+
-				"trailer: %s", err.Error()))
-		}
-	}
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE,
-		"Computed Hash for image %s as %s \n",
-		image.TargetImg, hex.EncodeToString(image.Hash))
-
-	sz, err := imgFile.Seek(0, io.SeekCurrent)
-	if err != nil {
-		return util.FmtNewtError("Failed to calculate file size of generated "+
-			"image %s: %s", image.TargetImg, err.Error())
-	}
-	image.TotalSize = uint(sz)
-
-	return nil
-}
-
-func CreateBuildId(app *Image, loader *Image) []byte {
-	return app.Hash
-}
-
-func NewRepoManager() *RepoManager {
-	return &RepoManager{
-		repos: make(map[string]ImageManifestRepo),
-	}
-}
-
-func (r *RepoManager) GetImageManifestPkg(
-	lpkg *pkg.LocalPackage) *ImageManifestPkg {
-
-	ip := &ImageManifestPkg{
-		Name: lpkg.Name(),
-	}
-
-	var path string
-	if lpkg.Repo().IsLocal() {
-		ip.Repo = lpkg.Repo().Name()
-		path = lpkg.BasePath()
-	} else {
-		ip.Repo = lpkg.Repo().Name()
-		path = lpkg.BasePath()
-	}
-
-	if _, present := r.repos[ip.Repo]; present {
-		return ip
-	}
-
-	repo := ImageManifestRepo{
-		Name: ip.Repo,
-	}
-
-	// Make sure we restore the current working dir to whatever it was when
-	// this function was called
-	cwd, err := os.Getwd()
-	if err != nil {
-		log.Debugf("Unable to determine current working directory: %v", err)
-		return ip
-	}
-	defer os.Chdir(cwd)
-
-	if err := os.Chdir(path); err != nil {
-		return ip
-	}
-
-	var res []byte
-
-	res, err = util.ShellCommand([]string{
-		"git",
-		"rev-parse",
-		"HEAD",
-	}, nil)
-	if err != nil {
-		log.Debugf("Unable to determine commit hash for %s: %v", path, err)
-		repo.Commit = "UNKNOWN"
-	} else {
-		repo.Commit = strings.TrimSpace(string(res))
-		res, err = util.ShellCommand([]string{
-			"git",
-			"status",
-			"--porcelain",
-		}, nil)
-		if err != nil {
-			log.Debugf("Unable to determine dirty state for %s: %v", path, err)
-		} else {
-			if len(res) > 0 {
-				repo.Dirty = true
-			}
-		}
-		res, err = util.ShellCommand([]string{
-			"git",
-			"config",
-			"--get",
-			"remote.origin.url",
-		}, nil)
-		if err != nil {
-			log.Debugf("Unable to determine URL for %s: %v", path, err)
-		} else {
-			repo.URL = strings.TrimSpace(string(res))
-		}
-	}
-	r.repos[ip.Repo] = repo
-
-	return ip
-}
-
-func (r *RepoManager) AllRepos() []ImageManifestRepo {
-	keys := make([]string, 0, len(r.repos))
-	for k := range r.repos {
-		keys = append(keys, k)
-	}
-
-	sort.Strings(keys)
-
-	repos := make([]ImageManifestRepo, 0, len(keys))
-	for _, key := range keys {
-		repos = append(repos, r.repos[key])
-	}
-
-	return repos
-}
-
-func NewImageManifestSizeCollector() *ImageManifestSizeCollector {
-	return &ImageManifestSizeCollector{}
-}
-
-func (c *ImageManifestSizeCollector) AddPkg(pkg string) *ImageManifestSizePkg {
-	p := &ImageManifestSizePkg{
-		Name: pkg,
-	}
-	c.Pkgs = append(c.Pkgs, p)
-
-	return p
-}
-
-func (c *ImageManifestSizePkg) AddSymbol(file string, sym string, area string,
-	symSz uint32) {
-	f := c.addFile(file)
-	s := f.addSym(sym)
-	s.addArea(area, symSz)
-}
-
-func (p *ImageManifestSizePkg) addFile(file string) *ImageManifestSizeFile {
-	for _, f := range p.Files {
-		if f.Name == file {
-			return f
-		}
-	}
-	f := &ImageManifestSizeFile{
-		Name: file,
-	}
-	p.Files = append(p.Files, f)
-
-	return f
-}
-
-func (f *ImageManifestSizeFile) addSym(sym string) *ImageManifestSizeSym {
-	s := &ImageManifestSizeSym{
-		Name: sym,
-	}
-	f.Syms = append(f.Syms, s)
-
-	return s
-}
-
-func (s *ImageManifestSizeSym) addArea(area string, areaSz uint32) {
-	a := &ImageManifestSizeArea{
-		Name: area,
-		Size: areaSz,
-	}
-	s.Areas = append(s.Areas, a)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/interfaces/interfaces.go
----------------------------------------------------------------------
diff --git a/newt/interfaces/interfaces.go b/newt/interfaces/interfaces.go
deleted file mode 100644
index c12b58b..0000000
--- a/newt/interfaces/interfaces.go
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package interfaces
-
-type PackageInterface interface {
-	Name() string
-	FullName() string
-	BasePath() string
-	Repo() RepoInterface
-	Type() PackageType
-}
-
-type PackageType int
-
-type RepoInterface interface {
-	Name() string
-	IsLocal() bool
-	Path() string
-}
-
-type VersionReqInterface interface {
-	CompareType() string
-	Version() VersionInterface
-	String() string
-}
-
-type VersionInterface interface {
-	SatisfiesVersion(versReq []VersionReqInterface) bool
-	CompareVersions(vers1 VersionInterface, vers2 VersionInterface) int64
-	Major() int64
-	Minor() int64
-	Revision() int64
-	Stability() string
-	String() string
-}
-
-type PackageList map[string]*map[string]PackageInterface
-
-type DependencyInterface interface {
-	SatisfiesDependency(pkg PackageInterface) bool
-	String() string
-}
-
-type ProjectInterface interface {
-	Name() string
-	Path() string
-	ResolveDependency(dep DependencyInterface) PackageInterface
-	ResolvePath(basePath string, name string) (string, error)
-	PackageList() PackageList
-	FindRepoPath(rname string) string
-}
-
-var globalProject ProjectInterface
-
-func GetProject() ProjectInterface {
-	return globalProject
-}
-
-func SetProject(proj ProjectInterface) {
-	globalProject = proj
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/mfg/create.go
----------------------------------------------------------------------
diff --git a/newt/mfg/create.go b/newt/mfg/create.go
deleted file mode 100644
index 08614e0..0000000
--- a/newt/mfg/create.go
+++ /dev/null
@@ -1,515 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package mfg
-
-import (
-	"encoding/json"
-	"fmt"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"sort"
-	"time"
-
-	"mynewt.apache.org/newt/newt/builder"
-	"mynewt.apache.org/newt/newt/flash"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/target"
-	"mynewt.apache.org/newt/util"
-)
-
-type mfgManifest struct {
-	BuildTime   string `json:"build_time"`
-	MfgHash     string `json:"mfg_hash"`
-	Version     string `json:"version"`
-	MetaSection int    `json:"meta_section"`
-	MetaOffset  int    `json:"meta_offset"`
-}
-
-type createState struct {
-	// {0:[section0blob], 1:[section1blob], ...}
-	dsMap      map[int][]byte
-	metaOffset int
-	hashOffset int
-	hash       []byte
-}
-
-func insertPartIntoBlob(blob []byte, part mfgPart) {
-	partEnd := part.offset + len(part.data)
-
-	if len(blob) < partEnd {
-		panic("internal error; mfg blob too small")
-	}
-
-	copy(blob[part.offset:partEnd], part.data)
-}
-
-func (mi *MfgImage) partFromImage(
-	imgPath string, flashAreaName string) (mfgPart, error) {
-
-	part := mfgPart{
-		// Boot loader and images always go in device 0.
-		device: 0,
-	}
-
-	area, ok := mi.bsp.FlashMap.Areas[flashAreaName]
-	if !ok {
-		return part, util.FmtNewtError(
-			"Image at \"%s\" requires undefined flash area \"%s\"",
-			imgPath, flashAreaName)
-	}
-
-	part.name = fmt.Sprintf("%s (%s)", flashAreaName, filepath.Base(imgPath))
-	part.offset = area.Offset
-
-	var err error
-
-	part.data, err = ioutil.ReadFile(imgPath)
-	if err != nil {
-		return part, util.ChildNewtError(err)
-	}
-
-	overflow := len(part.data) - area.Size
-	if overflow > 0 {
-		return part, util.FmtNewtError(
-			"Image \"%s\" is too large to fit in flash area \"%s\"; "+
-				"image-size=%d flash-area-size=%d overflow=%d",
-			imgPath, flashAreaName, len(part.data), area.Size, overflow)
-	}
-
-	// If an image slot is used, the entire flash area is unwritable.  This
-	// restriction comes from the boot loader's need to write status at the end
-	// of an area.  Pad out part with unwriten flash (0xff).  This probably
-	// isn't terribly efficient...
-	for i := 0; i < -overflow; i++ {
-		part.data = append(part.data, 0xff)
-	}
-
-	return part, nil
-}
-
-func partFromRawEntry(entry MfgRawEntry, entryIdx int) mfgPart {
-	return mfgPart{
-		name:   fmt.Sprintf("entry-%d (%s)", entryIdx, entry.filename),
-		offset: entry.offset,
-		data:   entry.data,
-	}
-}
-
-func (mi *MfgImage) targetParts() ([]mfgPart, error) {
-	parts := []mfgPart{}
-
-	bootPath := mi.dstBootBinPath()
-	if bootPath != "" {
-		bootPart, err := mi.partFromImage(
-			bootPath, flash.FLASH_AREA_NAME_BOOTLOADER)
-		if err != nil {
-			return nil, err
-		}
-
-		parts = append(parts, bootPart)
-	}
-
-	for i := 0; i < 2; i++ {
-		imgPath := mi.dstImgPath(i)
-		if imgPath != "" {
-			areaName, err := areaNameFromImgIdx(i)
-			if err != nil {
-				return nil, err
-			}
-
-			part, err := mi.partFromImage(imgPath, areaName)
-			if err != nil {
-				return nil, err
-			}
-			parts = append(parts, part)
-		}
-	}
-
-	return parts, nil
-}
-
-func sectionSize(parts []mfgPart) int {
-	greatest := 0
-
-	for _, part := range parts {
-		end := part.offset + len(part.data)
-		greatest = util.IntMax(greatest, end)
-	}
-
-	return greatest
-}
-
-func sectionFromParts(parts []mfgPart) []byte {
-	sectionSize := sectionSize(parts)
-	section := make([]byte, sectionSize)
-
-	// Initialize section 0's data as unwritten flash (0xff).
-	for i, _ := range section {
-		section[i] = 0xff
-	}
-
-	for _, part := range parts {
-		insertPartIntoBlob(section, part)
-	}
-
-	return section
-}
-
-func (mi *MfgImage) devicePartMap() (map[int][]mfgPart, error) {
-	dpMap := map[int][]mfgPart{}
-
-	// Create parts from the raw entries.
-	for i, entry := range mi.rawEntries {
-		part := partFromRawEntry(entry, i)
-		dpMap[entry.device] = append(dpMap[entry.device], part)
-	}
-
-	// Insert the boot loader and image parts into section 0.
-	targetParts, err := mi.targetParts()
-	if err != nil {
-		return nil, err
-	}
-	dpMap[0] = append(dpMap[0], targetParts...)
-
-	// Sort each part slice by offset.
-	for device, _ := range dpMap {
-		sortParts(dpMap[device])
-	}
-
-	return dpMap, nil
-}
-
-func (mi *MfgImage) deviceSectionMap() (map[int][]byte, error) {
-	dpMap, err := mi.devicePartMap()
-	if err != nil {
-		return nil, err
-	}
-
-	// Convert each part slice into a section (byte slice).
-	dsMap := map[int][]byte{}
-	for device, parts := range dpMap {
-		dsMap[device] = sectionFromParts(parts)
-	}
-
-	return dsMap, nil
-}
-
-func (mi *MfgImage) createSections() (createState, error) {
-	cs := createState{}
-
-	var err error
-
-	if err := mi.detectOverlaps(); err != nil {
-		return cs, err
-	}
-
-	cs.dsMap, err = mi.deviceSectionMap()
-	if err != nil {
-		return cs, err
-	}
-
-	if cs.dsMap[0] == nil {
-		panic("Invalid state; no section 0")
-	}
-
-	cs.metaOffset, cs.hashOffset, err = insertMeta(cs.dsMap[0],
-		mi.bsp.FlashMap)
-	if err != nil {
-		return cs, err
-	}
-
-	// Calculate manufacturing hash.
-	devices := make([]int, 0, len(cs.dsMap))
-	for device, _ := range cs.dsMap {
-		devices = append(devices, device)
-	}
-	sort.Ints(devices)
-
-	sections := make([][]byte, len(devices))
-	for i, device := range devices {
-		sections[i] = cs.dsMap[device]
-	}
-	cs.hash = calcMetaHash(sections)
-	copy(cs.dsMap[0][cs.hashOffset:cs.hashOffset+META_HASH_SZ], cs.hash)
-
-	return cs, nil
-}
-
-func areaNameFromImgIdx(imgIdx int) (string, error) {
-	switch imgIdx {
-	case 0:
-		return flash.FLASH_AREA_NAME_IMAGE_0, nil
-	case 1:
-		return flash.FLASH_AREA_NAME_IMAGE_1, nil
-	default:
-		return "", util.FmtNewtError("invalid image index: %d", imgIdx)
-	}
-}
-
-func bootLoaderFromPaths(t *target.Target) []string {
-	return []string{
-		/* boot.elf */
-		builder.AppElfPath(t.Name(), builder.BUILD_NAME_APP, t.App().Name()),
-
-		/* boot.elf.bin */
-		builder.AppBinPath(t.Name(), builder.BUILD_NAME_APP, t.App().Name()),
-
-		/* manifest.json */
-		builder.ManifestPath(t.Name(), builder.BUILD_NAME_APP, t.App().Name()),
-	}
-}
-
-func loaderFromPaths(t *target.Target) []string {
-	if t.LoaderName == "" {
-		return nil
-	}
-
-	return []string{
-		/* <loader>.elf */
-		builder.AppElfPath(t.Name(), builder.BUILD_NAME_LOADER,
-			t.Loader().Name()),
-
-		/* <app>.img */
-		builder.AppImgPath(t.Name(), builder.BUILD_NAME_LOADER,
-			t.Loader().Name()),
-	}
-}
-
-func appFromPaths(t *target.Target) []string {
-	return []string{
-		/* <app>.elf */
-		builder.AppElfPath(t.Name(), builder.BUILD_NAME_APP, t.App().Name()),
-
-		/* <app>.img */
-		builder.AppImgPath(t.Name(), builder.BUILD_NAME_APP, t.App().Name()),
-
-		/* manifest.json */
-		builder.ManifestPath(t.Name(), builder.BUILD_NAME_APP, t.App().Name()),
-	}
-}
-
-func imageFromPaths(t *target.Target) []string {
-	paths := loaderFromPaths(t)
-	paths = append(paths, appFromPaths(t)...)
-	return paths
-}
-
-func (mi *MfgImage) copyBinFile(srcPath string, dstDir string) error {
-	dstPath := dstDir + "/" + filepath.Base(srcPath)
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "copying file %s --> %s\n",
-		srcPath, dstPath)
-
-	if err := util.CopyFile(srcPath, dstPath); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (mi *MfgImage) copyBinFiles() error {
-	dstPath := MfgBinDir(mi.basePkg.Name())
-	if err := os.MkdirAll(filepath.Dir(dstPath), 0755); err != nil {
-		return util.ChildNewtError(err)
-	}
-
-	bootPaths := bootLoaderFromPaths(mi.boot)
-	for _, path := range bootPaths {
-		dstDir := MfgBootDir(mi.basePkg.Name())
-		if err := mi.copyBinFile(path, dstDir); err != nil {
-			return err
-		}
-	}
-
-	for i, imgTarget := range mi.images {
-		imgPaths := imageFromPaths(imgTarget)
-		dstDir := MfgImageBinDir(mi.basePkg.Name(), i)
-		for _, path := range imgPaths {
-			if err := mi.copyBinFile(path, dstDir); err != nil {
-				return err
-			}
-		}
-	}
-
-	return nil
-}
-
-func (mi *MfgImage) dstBootBinPath() string {
-	if mi.boot == nil {
-		return ""
-	}
-
-	return fmt.Sprintf("%s/%s.elf.bin",
-		MfgBootDir(mi.basePkg.Name()),
-		pkg.ShortName(mi.boot.App()))
-}
-
-func (mi *MfgImage) dstImgPath(slotIdx int) string {
-	var pack *pkg.LocalPackage
-	var imgIdx int
-
-	if len(mi.images) >= 1 {
-		switch slotIdx {
-		case 0:
-			if mi.images[0].LoaderName != "" {
-				pack = mi.images[0].Loader()
-			} else {
-				pack = mi.images[0].App()
-			}
-			imgIdx = 0
-
-		case 1:
-			if mi.images[0].LoaderName != "" {
-				pack = mi.images[0].App()
-				imgIdx = 0
-			} else {
-				if len(mi.images) >= 2 {
-					pack = mi.images[1].App()
-				}
-				imgIdx = 1
-			}
-
-		default:
-			panic(fmt.Sprintf("invalid image index: %d", imgIdx))
-		}
-	}
-
-	if pack == nil {
-		return ""
-	}
-
-	return fmt.Sprintf("%s/%s.img",
-		MfgImageBinDir(mi.basePkg.Name(), imgIdx), pkg.ShortName(pack))
-}
-
-// Returns a slice containing the path of each file required to build the
-// manufacturing image.
-func (mi *MfgImage) FromPaths() []string {
-	paths := []string{}
-
-	if mi.boot != nil {
-		paths = append(paths, bootLoaderFromPaths(mi.boot)...)
-	}
-	if len(mi.images) >= 1 {
-		paths = append(paths, imageFromPaths(mi.images[0])...)
-	}
-	if len(mi.images) >= 2 {
-		paths = append(paths, imageFromPaths(mi.images[1])...)
-	}
-
-	for _, raw := range mi.rawEntries {
-		paths = append(paths, raw.filename)
-	}
-
-	return paths
-}
-
-func (mi *MfgImage) build() (createState, error) {
-	if err := mi.copyBinFiles(); err != nil {
-		return createState{}, err
-	}
-
-	cs, err := mi.createSections()
-	if err != nil {
-		return cs, err
-	}
-
-	return cs, nil
-}
-
-func (mi *MfgImage) createManifest(cs createState) ([]byte, error) {
-	manifest := mfgManifest{
-		BuildTime:   time.Now().Format(time.RFC3339),
-		Version:     mi.version.String(),
-		MfgHash:     fmt.Sprintf("%x", cs.hash),
-		MetaSection: 0,
-		MetaOffset:  cs.metaOffset,
-	}
-	buffer, err := json.MarshalIndent(manifest, "", "  ")
-	if err != nil {
-		return nil, util.FmtNewtError("Failed to encode mfg manifest: %s",
-			err.Error())
-	}
-
-	return buffer, nil
-}
-
-func appendNonEmptyStr(dst []string, src string) []string {
-	if src != "" {
-		dst = append(dst, src)
-	}
-
-	return dst
-}
-
-func (mi *MfgImage) ToPaths() []string {
-	paths := []string{}
-
-	paths = appendNonEmptyStr(paths, mi.BootBinPath())
-	paths = appendNonEmptyStr(paths, mi.BootElfPath())
-	paths = appendNonEmptyStr(paths, mi.BootManifestPath())
-
-	for i := 0; i < len(mi.images); i++ {
-		paths = appendNonEmptyStr(paths, mi.LoaderImgPath(i))
-		paths = appendNonEmptyStr(paths, mi.LoaderElfPath(i))
-		paths = appendNonEmptyStr(paths, mi.AppImgPath(i))
-		paths = appendNonEmptyStr(paths, mi.AppElfPath(i))
-		paths = appendNonEmptyStr(paths, mi.ImageManifestPath(i))
-	}
-
-	paths = append(paths, mi.SectionBinPaths()...)
-	paths = append(paths, mi.ManifestPath())
-
-	return paths
-}
-
-// @return                      [paths-of-artifacts], error
-func (mi *MfgImage) CreateMfgImage() ([]string, error) {
-	cs, err := mi.build()
-	if err != nil {
-		return nil, err
-	}
-
-	sectionDir := MfgSectionBinDir(mi.basePkg.Name())
-	if err := os.MkdirAll(sectionDir, 0755); err != nil {
-		return nil, util.ChildNewtError(err)
-	}
-
-	for device, section := range cs.dsMap {
-		sectionPath := MfgSectionBinPath(mi.basePkg.Name(), device)
-		if err := ioutil.WriteFile(sectionPath, section, 0644); err != nil {
-			return nil, util.ChildNewtError(err)
-		}
-	}
-
-	manifest, err := mi.createManifest(cs)
-	if err != nil {
-		return nil, err
-	}
-
-	manifestPath := mi.ManifestPath()
-	if err := ioutil.WriteFile(manifestPath, manifest, 0644); err != nil {
-		return nil, util.FmtNewtError("Failed to write mfg manifest file: %s",
-			err.Error())
-	}
-
-	return mi.ToPaths(), nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/mfg/load.go
----------------------------------------------------------------------
diff --git a/newt/mfg/load.go b/newt/mfg/load.go
deleted file mode 100644
index 4370cda..0000000
--- a/newt/mfg/load.go
+++ /dev/null
@@ -1,305 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package mfg
-
-import (
-	"fmt"
-	"io/ioutil"
-	"sort"
-	"strconv"
-	"strings"
-
-	"github.com/spf13/cast"
-
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/newt/target"
-	"mynewt.apache.org/newt/util"
-)
-
-const MFG_YAML_FILENAME string = "mfg.yml"
-
-type partSorter struct {
-	parts []mfgPart
-}
-
-func (s partSorter) Len() int {
-	return len(s.parts)
-}
-func (s partSorter) Swap(i, j int) {
-	s.parts[i], s.parts[j] = s.parts[j], s.parts[i]
-}
-func (s partSorter) Less(i, j int) bool {
-	return s.parts[i].offset < s.parts[j].offset
-}
-
-func sortParts(parts []mfgPart) []mfgPart {
-	sorter := partSorter{
-		parts: parts,
-	}
-
-	sort.Sort(sorter)
-	return sorter.parts
-}
-
-func (mi *MfgImage) loadError(
-	msg string, args ...interface{}) *util.NewtError {
-
-	return util.FmtNewtError("Error in %s mfg: %s", mi.basePkg.Name(),
-		fmt.Sprintf(msg, args...))
-
-}
-
-func (mi *MfgImage) loadTarget(targetName string) (
-	*target.Target, error) {
-
-	tgt := target.GetTargets()[targetName]
-	if tgt == nil {
-		return nil, mi.loadError("cannot resolve referenced target \"%s\"",
-			targetName)
-	}
-
-	return tgt, nil
-}
-
-func (mi *MfgImage) loadRawEntry(
-	entryIdx int, rawEntry map[string]string) (MfgRawEntry, error) {
-
-	raw := MfgRawEntry{}
-
-	var err error
-
-	deviceStr := rawEntry["device"]
-	if deviceStr == "" {
-		return raw, mi.loadError(
-			"raw entry %d missing required \"device\" field", entryIdx)
-	}
-
-	raw.device, err = util.AtoiNoOct(deviceStr)
-	if err != nil {
-		return raw, mi.loadError(
-			"raw entry %d contains invalid offset: %s", entryIdx, deviceStr)
-	}
-
-	offsetStr := rawEntry["offset"]
-	if offsetStr == "" {
-		return raw, mi.loadError(
-			"raw entry %d missing required \"offset\" field", entryIdx)
-	}
-
-	raw.offset, err = util.AtoiNoOct(offsetStr)
-	if err != nil {
-		return raw, mi.loadError(
-			"raw entry %d contains invalid offset: %s", entryIdx, offsetStr)
-	}
-
-	raw.filename = rawEntry["file"]
-	if raw.filename == "" {
-		return raw, mi.loadError(
-			"raw entry %d missing required \"file\" field", entryIdx)
-	}
-
-	if !strings.HasPrefix(raw.filename, "/") {
-		raw.filename = mi.basePkg.BasePath() + "/" + raw.filename
-	}
-
-	raw.data, err = ioutil.ReadFile(raw.filename)
-	if err != nil {
-		return raw, mi.loadError(
-			"error loading file for raw entry %d; filename=%s: %s",
-			entryIdx, raw.filename, err.Error())
-	}
-
-	return raw, nil
-}
-
-func (mi *MfgImage) detectInvalidDevices() error {
-	sectionIds := mi.sectionIds()
-	deviceIds := mi.bsp.FlashMap.DeviceIds()
-
-	deviceMap := map[int]struct{}{}
-	for _, device := range deviceIds {
-		deviceMap[device] = struct{}{}
-	}
-
-	invalidIds := []int{}
-	for _, sectionId := range sectionIds {
-		if _, ok := deviceMap[sectionId]; !ok {
-			invalidIds = append(invalidIds, sectionId)
-		}
-	}
-
-	if len(invalidIds) == 0 {
-		return nil
-	}
-
-	listStr := ""
-	for i, id := range invalidIds {
-		if i != 0 {
-			listStr += ", "
-		}
-		listStr += strconv.Itoa(id)
-	}
-
-	return util.FmtNewtError(
-		"image specifies flash devices that are not present in the BSP's "+
-			"flash map: %s", listStr)
-}
-
-func (mi *MfgImage) detectOverlaps() error {
-	type overlap struct {
-		part0 mfgPart
-		part1 mfgPart
-	}
-
-	overlaps := []overlap{}
-
-	dpMap, err := mi.devicePartMap()
-	if err != nil {
-		return err
-	}
-
-	// Iterate flash devices in order.
-	devices := make([]int, 0, len(dpMap))
-	for device, _ := range dpMap {
-		devices = append(devices, device)
-	}
-	sort.Ints(devices)
-
-	for _, device := range devices {
-		parts := dpMap[device]
-		for i, part0 := range parts[:len(parts)-1] {
-			part0End := part0.offset + len(part0.data)
-			for _, part1 := range parts[i+1:] {
-				// Parts are sorted by offset, so only one comparison is
-				// necessary to detect overlap.
-				if part1.offset < part0End {
-					overlaps = append(overlaps, overlap{
-						part0: part0,
-						part1: part1,
-					})
-				}
-			}
-		}
-	}
-
-	if len(overlaps) > 0 {
-		str := "flash overlaps detected:"
-		for _, overlap := range overlaps {
-
-			part0End := overlap.part0.offset + len(overlap.part0.data)
-			part1End := overlap.part1.offset + len(overlap.part1.data)
-			str += fmt.Sprintf("\n    * s%d [%s] (%d - %d) <=> [%s] (%d - %d)",
-				overlap.part0.device,
-				overlap.part0.name, overlap.part0.offset, part0End,
-				overlap.part1.name, overlap.part1.offset, part1End)
-		}
-
-		return util.NewNewtError(str)
-	}
-
-	return nil
-}
-
-func Load(basePkg *pkg.LocalPackage) (*MfgImage, error) {
-	v, err := util.ReadConfig(basePkg.BasePath(),
-		strings.TrimSuffix(MFG_YAML_FILENAME, ".yml"))
-	if err != nil {
-		return nil, err
-	}
-
-	mi := &MfgImage{
-		basePkg: basePkg,
-	}
-
-	bootName := v.GetString("mfg.bootloader")
-	if bootName == "" {
-		return nil, mi.loadError("mfg.bootloader field required")
-	}
-	mi.boot, err = mi.loadTarget(bootName)
-	if err != nil {
-		return nil, err
-	}
-
-	imgNames := v.GetStringSlice("mfg.images")
-	if imgNames != nil {
-		for _, imgName := range imgNames {
-			imgTarget, err := mi.loadTarget(imgName)
-			if err != nil {
-				return nil, err
-			}
-
-			mi.images = append(mi.images, imgTarget)
-		}
-	}
-
-	if len(mi.images) > 2 {
-		return nil, mi.loadError("too many images (%d); maximum is 2",
-			len(mi.images))
-	}
-
-	itf := v.Get("mfg.raw")
-	slice := cast.ToSlice(itf)
-	if slice != nil {
-		for i, entryItf := range slice {
-			yamlEntry := cast.ToStringMapString(entryItf)
-			entry, err := mi.loadRawEntry(i, yamlEntry)
-			if err != nil {
-				return nil, err
-			}
-
-			mi.rawEntries = append(mi.rawEntries, entry)
-		}
-	}
-
-	proj := project.GetProject()
-
-	bspLpkg, err := proj.ResolvePackage(mi.basePkg.Repo(),
-		mi.boot.BspName)
-	if err != nil {
-		return nil, mi.loadError(
-			"could not resolve boot loader BSP package: %s",
-			mi.boot.BspName)
-	}
-	mi.bsp, err = pkg.NewBspPackage(bspLpkg)
-	if err != nil {
-		return nil, mi.loadError(err.Error())
-	}
-
-	for _, imgTarget := range mi.images {
-		if len(mi.images) > 1 && imgTarget.LoaderName != "" {
-			return nil, mi.loadError("only one image allowed in "+
-				"split image mode (%s is a split build)", imgTarget.Name())
-		}
-
-		if imgTarget.Bsp() != mi.bsp.LocalPackage {
-			return nil, mi.loadError(
-				"image target \"%s\" specified conflicting BSP; "+
-					"boot loader uses %s, image uses %s",
-				imgTarget.Name(), mi.bsp.Name(), imgTarget.BspName)
-		}
-	}
-
-	if err := mi.detectInvalidDevices(); err != nil {
-		return nil, err
-	}
-
-	return mi, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/mfg/meta.go
----------------------------------------------------------------------
diff --git a/newt/mfg/meta.go b/newt/mfg/meta.go
deleted file mode 100644
index 87aabe0..0000000
--- a/newt/mfg/meta.go
+++ /dev/null
@@ -1,247 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package mfg
-
-import (
-	"bytes"
-	"crypto/sha256"
-	"encoding/binary"
-
-	"mynewt.apache.org/newt/newt/flash"
-	"mynewt.apache.org/newt/util"
-)
-
-// The "manufacturing meta region" is located at the end of the boot loader
-// flash area.  This region has the following structure.
-//
-//  0                   1                   2                   3
-//  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// |Version (0x01) |                  0xff padding                 |
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// |   TLV type    |   TLV size    | TLV data ("TLV size" bytes)   ~
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               ~
-// ~                                                               ~
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// |   TLV type    |   TLV size    | TLV data ("TLV size" bytes)   ~
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               ~
-// ~                                                               ~
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// |   Region size                 |         0xff padding          |
-// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-// |                       Magic (0x3bb2a269)                      |
-// +-+-+-+-+-+--+-+-+-+-end of boot loader area+-+-+-+-+-+-+-+-+-+-+
-//
-// The number of TLVs is variable; two are shown above for illustrative
-// purposes.
-//
-// Fields:
-// <Header>
-// 1. Version: Manufacturing meta version number; always 0x01.
-//
-// <TLVs>
-// 2. TLV type: Indicates the type of data to follow.
-// 3. TLV size: The number of bytes of data to follow.
-// 4. TLV data: TLV-size bytes of data.
-//
-// <Footer>
-// 5. Region size: The size, in bytes, of the entire manufacturing meta region;
-//    includes header, TLVs, and footer.
-// 6. Magic: indicates the presence of the manufacturing meta region.
-
-const META_MAGIC = 0x3bb2a269
-const META_VERSION = 1
-const META_TLV_CODE_HASH = 0x01
-const META_TLV_CODE_FLASH_AREA = 0x02
-
-const META_HASH_SZ = 32
-const META_FOOTER_SZ = 8
-const META_TLV_HASH_SZ = META_HASH_SZ
-const META_TLV_FLASH_AREA_SZ = 12
-
-type metaHeader struct {
-	version uint8  // 1
-	pad8    uint8  // 0xff
-	pad16   uint16 // 0xffff
-}
-
-type metaFooter struct {
-	size  uint16 // Includes header, TLVs, and footer.
-	pad16 uint16 // 0xffff
-	magic uint32 // META_MAGIC
-}
-
-type metaTlvHeader struct {
-	typ  uint8 // Indicates the type of data to follow.
-	size uint8 // The number of bytes of data to follow.
-}
-
-type metaTlvFlashArea struct {
-	header   metaTlvHeader
-	areaId   uint8  // Unique value identifying this flash area.
-	deviceId uint8  // Indicates host flash device (aka section number).
-	pad16    uint16 // 0xffff
-	offset   uint32 // The byte offset within the flash device.
-	size     uint32 // Size, in bytes, of entire flash area.
-}
-
-type metaTlvHash struct {
-	header metaTlvHeader
-	hash   [META_HASH_SZ]byte
-}
-
-func writeElem(elem interface{}, buf *bytes.Buffer) error {
-	/* XXX: Assume target platform uses little endian. */
-	if err := binary.Write(buf, binary.LittleEndian, elem); err != nil {
-		return util.ChildNewtError(err)
-	}
-	return nil
-}
-
-func writeHeader(buf *bytes.Buffer) error {
-	hdr := metaHeader{
-		version: META_VERSION,
-		pad8:    0xff,
-		pad16:   0xffff,
-	}
-	return writeElem(hdr, buf)
-}
-
-func writeFooter(buf *bytes.Buffer) error {
-	ftr := metaFooter{
-		size:  uint16(buf.Len() + META_FOOTER_SZ),
-		pad16: 0xffff,
-		magic: META_MAGIC,
-	}
-	return writeElem(ftr, buf)
-}
-
-func writeTlvHeader(typ uint8, size uint8, buf *bytes.Buffer) error {
-	tlvHdr := metaTlvHeader{
-		typ:  typ,
-		size: size,
-	}
-	return writeElem(tlvHdr, buf)
-}
-
-// Writes a single entry of the flash map TLV.
-func writeFlashMapEntry(area flash.FlashArea, buf *bytes.Buffer) error {
-	tlv := metaTlvFlashArea{
-		header: metaTlvHeader{
-			typ:  META_TLV_CODE_FLASH_AREA,
-			size: META_TLV_FLASH_AREA_SZ,
-		},
-		areaId:   uint8(area.Id),
-		deviceId: uint8(area.Device),
-		pad16:    0xffff,
-		offset:   uint32(area.Offset),
-		size:     uint32(area.Size),
-	}
-	return writeElem(tlv, buf)
-}
-
-// Writes a zeroed-out hash TLV.  The hash's original value must be zero for
-// the actual hash to be calculated later.  After the actual value is
-// calculated, it replaces the zeros in the TLV.
-func writeZeroHash(buf *bytes.Buffer) error {
-	tlv := metaTlvHash{
-		header: metaTlvHeader{
-			typ:  META_TLV_CODE_HASH,
-			size: META_TLV_HASH_SZ,
-		},
-		hash: [META_HASH_SZ]byte{},
-	}
-	return writeElem(tlv, buf)
-}
-
-// @return						meta-offset, hash-offset, error
-func insertMeta(section0Data []byte, flashMap flash.FlashMap) (
-	int, int, error) {
-
-	buf := &bytes.Buffer{}
-
-	if err := writeHeader(buf); err != nil {
-		return 0, 0, err
-	}
-
-	for _, area := range flashMap.SortedAreas() {
-		if err := writeFlashMapEntry(area, buf); err != nil {
-			return 0, 0, err
-		}
-	}
-
-	if err := writeZeroHash(buf); err != nil {
-		return 0, 0, err
-	}
-	hashSubOff := buf.Len() - META_HASH_SZ
-
-	if err := writeFooter(buf); err != nil {
-		return 0, 0, err
-	}
-
-	// The meta region gets placed at the very end of the boot loader slot.
-	bootArea, ok := flashMap.Areas[flash.FLASH_AREA_NAME_BOOTLOADER]
-	if !ok {
-		return 0, 0,
-			util.NewNewtError("Required boot loader flash area missing")
-	}
-
-	if bootArea.Size < buf.Len() {
-		return 0, 0, util.FmtNewtError(
-			"Boot loader flash area too small to accommodate meta region; "+
-				"boot=%d meta=%d", bootArea.Size, buf.Len())
-	}
-
-	metaOff := bootArea.Offset + bootArea.Size - buf.Len()
-	for i := metaOff; i < bootArea.Size; i++ {
-		if section0Data[i] != 0xff {
-			return 0, 0, util.FmtNewtError(
-				"Boot loader extends into meta region; "+
-					"meta region starts at offset %d", metaOff)
-		}
-	}
-
-	// Copy the meta region into the manufacturing image.  The meta hash is
-	// still zeroed.
-	copy(section0Data[metaOff:], buf.Bytes())
-
-	return metaOff, metaOff + hashSubOff, nil
-}
-
-// Calculates the SHA256 hash, using the full manufacturing image as input.
-// Hash-calculation algorithm is as follows:
-// 1. Concatenate sections in ascending order of index.
-// 2. Zero out the 32 bytes that will contain the hash.
-// 3. Apply SHA256 to the result.
-//
-// This function assumes that the 32 bytes of hash data have already been
-// zeroed.
-func calcMetaHash(sections [][]byte) []byte {
-	// Concatenate all sections.
-	blob := []byte{}
-	for _, section := range sections {
-		blob = append(blob, section...)
-	}
-
-	// Calculate hash.
-	hash := sha256.Sum256(blob)
-
-	return hash[:]
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/mfg/mfg.go
----------------------------------------------------------------------
diff --git a/newt/mfg/mfg.go b/newt/mfg/mfg.go
deleted file mode 100644
index 98fbc37..0000000
--- a/newt/mfg/mfg.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package mfg
-
-import (
-	"sort"
-
-	"mynewt.apache.org/newt/newt/image"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/target"
-)
-
-type MfgRawEntry struct {
-	device   int
-	offset   int
-	filename string
-	data     []byte
-}
-
-// A chunk of data in the manufacturing image.  Can be a firmware image or a
-// raw entry (contents of a data file).
-type mfgPart struct {
-	device int
-	offset int
-	data   []byte
-	name   string
-}
-
-type MfgImage struct {
-	basePkg *pkg.LocalPackage
-
-	bsp *pkg.BspPackage
-
-	boot       *target.Target
-	images     []*target.Target
-	rawEntries []MfgRawEntry
-
-	version image.ImageVersion
-}
-
-func (mi *MfgImage) SetVersion(ver image.ImageVersion) {
-	mi.version = ver
-}
-
-func (mi *MfgImage) imgApps(imageIdx int) (
-	app *pkg.LocalPackage, loader *pkg.LocalPackage) {
-
-	if imageIdx >= len(mi.images) {
-		return
-	}
-
-	t := mi.images[imageIdx]
-	app = t.App()
-	loader = t.Loader()
-	return
-}
-
-func (mi *MfgImage) sectionIds() []int {
-	idMap := map[int]struct{}{}
-
-	// The bootloader and images always go in section 0.
-	idMap[0] = struct{}{}
-
-	for _, entry := range mi.rawEntries {
-		idMap[entry.device] = struct{}{}
-	}
-
-	ids := make([]int, 0, len(idMap))
-	for id, _ := range idMap {
-		ids = append(ids, id)
-	}
-	sort.Ints(ids)
-
-	return ids
-}
-
-func (mi *MfgImage) NumImages() int {
-	return len(mi.images)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/mfg/paths.go
----------------------------------------------------------------------
diff --git a/newt/mfg/paths.go b/newt/mfg/paths.go
deleted file mode 100644
index f05abb3..0000000
--- a/newt/mfg/paths.go
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package mfg
-
-import (
-	"fmt"
-	"path/filepath"
-	"strconv"
-
-	"mynewt.apache.org/newt/newt/builder"
-	"mynewt.apache.org/newt/newt/pkg"
-)
-
-func MfgBinDir(mfgPkgName string) string {
-	return builder.BinRoot() + "/" + mfgPkgName
-}
-
-func MfgBootDir(mfgPkgName string) string {
-	return MfgBinDir(mfgPkgName) + "/bootloader"
-}
-
-func MfgBootBinPath(mfgPkgName string, appName string) string {
-	return MfgBootDir(mfgPkgName) + "/" + appName + ".elf.bin"
-}
-
-func MfgBootElfPath(mfgPkgName string, appName string) string {
-	return MfgBootDir(mfgPkgName) + "/" + appName + ".elf"
-}
-
-func MfgBootManifestPath(mfgPkgName string, appName string) string {
-	return MfgBootDir(mfgPkgName) + "/manifest.json"
-}
-
-// Image indices start at 0.
-func MfgImageBinDir(mfgPkgName string, imageIdx int) string {
-	return MfgBinDir(mfgPkgName) + "/image" + strconv.Itoa(imageIdx)
-}
-
-func MfgImageImgPath(mfgPkgName string, imageIdx int,
-	appName string) string {
-
-	return MfgImageBinDir(mfgPkgName, imageIdx) + "/" + appName + ".img"
-}
-
-func MfgImageElfPath(mfgPkgName string, imageIdx int,
-	appName string) string {
-
-	return MfgImageBinDir(mfgPkgName, imageIdx) + "/" + appName + ".elf"
-}
-
-func MfgImageManifestPath(mfgPkgName string, imageIdx int) string {
-	return MfgImageBinDir(mfgPkgName, imageIdx) + "/manifest.json"
-}
-
-func MfgSectionBinDir(mfgPkgName string) string {
-	return MfgBinDir(mfgPkgName) + "/sections"
-}
-
-func MfgSectionBinPath(mfgPkgName string, sectionNum int) string {
-	return fmt.Sprintf("%s/%s-s%d.bin", MfgSectionBinDir(mfgPkgName),
-		filepath.Base(mfgPkgName), sectionNum)
-}
-
-func MfgManifestPath(mfgPkgName string) string {
-	return MfgBinDir(mfgPkgName) + "/manifest.json"
-}
-
-func (mi *MfgImage) ManifestPath() string {
-	return MfgManifestPath(mi.basePkg.Name())
-}
-
-func (mi *MfgImage) BootBinPath() string {
-	if mi.boot == nil {
-		return ""
-	}
-
-	return MfgBootBinPath(mi.basePkg.Name(),
-		pkg.ShortName(mi.boot.App()))
-}
-
-func (mi *MfgImage) BootElfPath() string {
-	if mi.boot == nil {
-		return ""
-	}
-
-	return MfgBootElfPath(mi.basePkg.Name(), pkg.ShortName(mi.boot.App()))
-}
-
-func (mi *MfgImage) BootManifestPath() string {
-	if mi.boot == nil {
-		return ""
-	}
-
-	return MfgBootManifestPath(mi.basePkg.Name(),
-		pkg.ShortName(mi.boot.App()))
-}
-
-func (mi *MfgImage) AppImgPath(imageIdx int) string {
-	app, _ := mi.imgApps(imageIdx)
-	if app == nil {
-		return ""
-	}
-
-	return MfgImageImgPath(mi.basePkg.Name(), imageIdx, pkg.ShortName(app))
-}
-
-func (mi *MfgImage) AppElfPath(imageIdx int) string {
-	app, _ := mi.imgApps(imageIdx)
-	if app == nil {
-		return ""
-	}
-
-	return MfgImageElfPath(mi.basePkg.Name(), imageIdx, pkg.ShortName(app))
-}
-
-func (mi *MfgImage) LoaderImgPath(imageIdx int) string {
-	_, loader := mi.imgApps(imageIdx)
-	if loader == nil {
-		return ""
-	}
-
-	return MfgImageImgPath(mi.basePkg.Name(), imageIdx, pkg.ShortName(loader))
-}
-
-func (mi *MfgImage) LoaderElfPath(imageIdx int) string {
-	_, loader := mi.imgApps(imageIdx)
-	if loader == nil {
-		return ""
-	}
-
-	return MfgImageElfPath(mi.basePkg.Name(), imageIdx, pkg.ShortName(loader))
-}
-
-func (mi *MfgImage) ImageManifestPath(imageIdx int) string {
-	if imageIdx >= len(mi.images) {
-		return ""
-	}
-
-	return MfgImageManifestPath(mi.basePkg.Name(), imageIdx)
-}
-
-func (mi *MfgImage) SectionBinPaths() []string {
-	sectionIds := mi.sectionIds()
-
-	paths := make([]string, len(sectionIds))
-	for i, sectionId := range sectionIds {
-		paths[i] = MfgSectionBinPath(mi.basePkg.Name(), sectionId)
-	}
-	return paths
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/mfg/read.go
----------------------------------------------------------------------
diff --git a/newt/mfg/read.go b/newt/mfg/read.go
deleted file mode 100644
index 04520db..0000000
--- a/newt/mfg/read.go
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package mfg
-
-import (
-	"strings"
-
-	"mynewt.apache.org/newt/newt/builder"
-)
-
-// @return						mfg-image-path, error
-func (mi *MfgImage) Upload() (string, error) {
-	// For now, we always upload section 0 only.
-	section0Path := MfgSectionBinPath(mi.basePkg.Name(), 0)
-	baseName := strings.TrimSuffix(section0Path, ".bin")
-
-	envSettings := map[string]string{"MFG_IMAGE": "1"}
-	if err := builder.Load(baseName, mi.bsp, envSettings); err != nil {
-		return "", err
-	}
-
-	return section0Path, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/newt.go
----------------------------------------------------------------------
diff --git a/newt/newt.go b/newt/newt.go
deleted file mode 100644
index 0dc8808..0000000
--- a/newt/newt.go
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package main
-
-import (
-	"fmt"
-	"os"
-	"runtime"
-
-	log "github.com/Sirupsen/logrus"
-	"github.com/spf13/cobra"
-
-	"mynewt.apache.org/newt/newt/cli"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/util"
-)
-
-var NewtLogLevel log.Level
-var newtSilent bool
-var newtQuiet bool
-var newtVerbose bool
-var newtLogFile string
-var newtNumJobs int
-var newtHelp bool
-
-func newtDfltNumJobs() int {
-	maxProcs := runtime.GOMAXPROCS(0)
-	numCpu := runtime.NumCPU()
-
-	var numJobs int
-	if maxProcs < numCpu {
-		numJobs = maxProcs
-	} else {
-		numJobs = numCpu
-	}
-
-	return numJobs
-}
-
-func newtCmd() *cobra.Command {
-	newtHelpText := cli.FormatHelp(`Newt allows you to create your own embedded 
-		application based on the Mynewt operating system.  Newt provides both 
-		build and package management in a single tool, which allows you to 
-		compose an embedded application, and set of projects, and then build
-		the necessary artifacts from those projects.  For more information 
-		on the Mynewt operating system, please visit 
-		https://mynewt.apache.org/.`)
-	newtHelpText += "\n\n" + cli.FormatHelp(`Please use the newt help command, 
-		and specify the name of the command you want help for, for help on 
-		how to use a specific command`)
-	newtHelpEx := "  newt\n"
-	newtHelpEx += "  newt help [<command-name>]\n"
-	newtHelpEx += "    For help on <command-name>.  If not specified, " +
-		"print this message."
-
-	logLevelStr := ""
-	newtCmd := &cobra.Command{
-		Use:     "newt",
-		Short:   "Newt is a tool to help you compose and build your own OS",
-		Long:    newtHelpText,
-		Example: newtHelpEx,
-		PersistentPreRun: func(cmd *cobra.Command, args []string) {
-			verbosity := util.VERBOSITY_DEFAULT
-			if newtSilent {
-				verbosity = util.VERBOSITY_SILENT
-			} else if newtQuiet {
-				verbosity = util.VERBOSITY_QUIET
-			} else if newtVerbose {
-				verbosity = util.VERBOSITY_VERBOSE
-			}
-
-			var err error
-			NewtLogLevel, err = log.ParseLevel(logLevelStr)
-			if err != nil {
-				cli.NewtUsage(nil, util.NewNewtError(err.Error()))
-			}
-
-			err = util.Init(NewtLogLevel, newtLogFile, verbosity)
-			if err != nil {
-				cli.NewtUsage(nil, err)
-			}
-
-			newtutil.NewtNumJobs = newtNumJobs
-		},
-		Run: func(cmd *cobra.Command, args []string) {
-			cmd.Help()
-		},
-	}
-
-	newtCmd.PersistentFlags().BoolVarP(&newtVerbose, "verbose", "v", false,
-		"Enable verbose output when executing commands")
-	newtCmd.PersistentFlags().BoolVarP(&newtQuiet, "quiet", "q", false,
-		"Be quiet; only display error output")
-	newtCmd.PersistentFlags().BoolVarP(&newtSilent, "silent", "s", false,
-		"Be silent; don't output anything")
-	newtCmd.PersistentFlags().StringVarP(&logLevelStr, "loglevel", "l",
-		"WARN", "Log level")
-	newtCmd.PersistentFlags().StringVarP(&newtLogFile, "outfile", "o",
-		"", "Filename to tee output to")
-	newtCmd.PersistentFlags().IntVarP(&newtNumJobs, "jobs", "j",
-		newtDfltNumJobs(), "Number of concurrent build jobs")
-	newtCmd.PersistentFlags().BoolVarP(&newtHelp, "help", "h",
-		false, "Help for newt commands")
-
-	versHelpText := cli.FormatHelp(`Display the Newt version number`)
-	versHelpEx := "  newt version"
-	versCmd := &cobra.Command{
-		Use:     "version",
-		Short:   "Display the Newt version number",
-		Long:    versHelpText,
-		Example: versHelpEx,
-		Run: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("%s\n", newtutil.NewtVersionStr)
-		},
-	}
-
-	newtCmd.AddCommand(versCmd)
-
-	return newtCmd
-}
-
-func main() {
-	cmd := newtCmd()
-
-	cli.AddBuildCommands(cmd)
-	cli.AddCompleteCommands(cmd)
-	cli.AddImageCommands(cmd)
-	cli.AddPackageCommands(cmd)
-	cli.AddProjectCommands(cmd)
-	cli.AddRunCommands(cmd)
-	cli.AddTargetCommands(cmd)
-	cli.AddValsCommands(cmd)
-	cli.AddMfgCommands(cmd)
-
-	/* only pass the first two args to check for complete command */
-	if len(os.Args) > 2 {
-		cmd.SilenceErrors = true
-		cmd.SilenceUsage = true
-		bc, _, err := cmd.Find(os.Args[1:2])
-		tmpArgs := os.Args
-		os.Args = tmpArgs[0:2]
-
-		if err == nil && bc.Name() == "complete" {
-			cli.GenerateTabCompleteValues()
-			bc.Execute()
-			return
-		}
-		os.Args = tmpArgs
-		cmd.SilenceErrors = false
-		cmd.SilenceUsage = false
-	}
-
-	cmd.Execute()
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/newtutil/newtutil.go
----------------------------------------------------------------------
diff --git a/newt/newtutil/newtutil.go b/newt/newtutil/newtutil.go
deleted file mode 100644
index ff79ffb..0000000
--- a/newt/newtutil/newtutil.go
+++ /dev/null
@@ -1,309 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package newtutil
-
-import (
-	"fmt"
-	"os/user"
-	"sort"
-	"strconv"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-	"github.com/spf13/cast"
-
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/util"
-	"mynewt.apache.org/newt/viper"
-)
-
-var NewtVersion Version = Version{1, 0, 0}
-var NewtVersionStr string = "Apache Newt (incubating) version: 1.0.0-dev"
-var NewtBlinkyTag string = "develop"
-var NewtNumJobs int
-var NewtForce bool
-
-const NEWTRC_DIR string = ".newt"
-const REPOS_FILENAME string = "repos.yml"
-
-const CORE_REPO_NAME string = "apache-mynewt-core"
-const ARDUINO_ZERO_REPO_NAME string = "mynewt_arduino_zero"
-
-type Version struct {
-	Major    int64
-	Minor    int64
-	Revision int64
-}
-
-func ParseVersion(s string) (Version, error) {
-	v := Version{}
-	parseErr := util.FmtNewtError("Invalid version string: %s", s)
-
-	parts := strings.Split(s, ".")
-	if len(parts) != 3 {
-		return v, parseErr
-	}
-
-	var err error
-
-	v.Major, err = strconv.ParseInt(parts[0], 10, 64)
-	if err != nil {
-		return v, parseErr
-	}
-
-	v.Minor, err = strconv.ParseInt(parts[1], 10, 64)
-	if err != nil {
-		return v, parseErr
-	}
-
-	v.Revision, err = strconv.ParseInt(parts[2], 10, 64)
-	if err != nil {
-		return v, parseErr
-	}
-
-	return v, nil
-}
-
-func (v *Version) String() string {
-	return fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Revision)
-}
-
-func VerCmp(v1 Version, v2 Version) int64 {
-	if r := v1.Major - v2.Major; r != 0 {
-		return r
-	}
-
-	if r := v1.Minor - v2.Minor; r != 0 {
-		return r
-	}
-
-	if r := v1.Revision - v2.Revision; r != 0 {
-		return r
-	}
-
-	return 0
-}
-
-// Contains general newt settings read from $HOME/.newt
-var newtrc *viper.Viper
-
-func readNewtrc() *viper.Viper {
-	usr, err := user.Current()
-	if err != nil {
-		log.Warn("Failed to obtain user name")
-		return viper.New()
-	}
-
-	dir := usr.HomeDir + "/" + NEWTRC_DIR
-	v, err := util.ReadConfig(dir, strings.TrimSuffix(REPOS_FILENAME, ".yml"))
-	if err != nil {
-		log.Debugf("Failed to read %s/%s file", dir, REPOS_FILENAME)
-		return viper.New()
-	}
-
-	return v
-}
-
-func Newtrc() *viper.Viper {
-	if newtrc != nil {
-		return newtrc
-	}
-
-	newtrc = readNewtrc()
-	return newtrc
-}
-
-func GetSliceFeatures(v *viper.Viper, features map[string]bool,
-	key string) []interface{} {
-
-	val := v.Get(key)
-	vals := []interface{}{val}
-
-	// Process the features in alphabetical order to ensure consistent
-	// results across repeated runs.
-	featureKeys := make([]string, 0, len(features))
-	for feature, _ := range features {
-		featureKeys = append(featureKeys, feature)
-	}
-	sort.Strings(featureKeys)
-
-	for _, feature := range featureKeys {
-		overwriteVal := v.Get(key + "." + feature + ".OVERWRITE")
-		if overwriteVal != nil {
-			return []interface{}{overwriteVal}
-		}
-
-		appendVal := v.Get(key + "." + feature)
-		if appendVal != nil {
-			vals = append(vals, appendVal)
-		}
-	}
-
-	return vals
-}
-
-func GetStringMapFeatures(v *viper.Viper, features map[string]bool,
-	key string) map[string]interface{} {
-
-	result := map[string]interface{}{}
-
-	slice := GetSliceFeatures(v, features, key)
-	for _, itf := range slice {
-		sub := cast.ToStringMap(itf)
-		for k, v := range sub {
-			result[k] = v
-		}
-	}
-
-	return result
-}
-
-func GetStringFeatures(v *viper.Viper, features map[string]bool,
-	key string) string {
-	val := v.GetString(key)
-
-	// Process the features in alphabetical order to ensure consistent
-	// results across repeated runs.
-	var featureKeys []string
-	for feature, _ := range features {
-		featureKeys = append(featureKeys, feature)
-	}
-	sort.Strings(featureKeys)
-
-	for _, feature := range featureKeys {
-		overwriteVal := v.GetString(key + "." + feature + ".OVERWRITE")
-		if overwriteVal != "" {
-			val = strings.Trim(overwriteVal, "\n")
-			break
-		}
-
-		appendVal := v.GetString(key + "." + feature)
-		if appendVal != "" {
-			val += " " + strings.Trim(appendVal, "\n")
-		}
-	}
-	return strings.TrimSpace(val)
-}
-
-func GetBoolFeaturesDflt(v *viper.Viper, features map[string]bool,
-	key string, dflt bool) (bool, error) {
-
-	s := GetStringFeatures(v, features, key)
-	if s == "" {
-		return dflt, nil
-	}
-
-	b, err := strconv.ParseBool(s)
-	if err != nil {
-		return dflt, util.FmtNewtError("invalid bool value for %s: %s",
-			key, s)
-	}
-
-	return b, nil
-}
-
-func GetBoolFeatures(v *viper.Viper, features map[string]bool,
-	key string) (bool, error) {
-
-	return GetBoolFeaturesDflt(v, features, key, false)
-}
-
-func GetStringSliceFeatures(v *viper.Viper, features map[string]bool,
-	key string) []string {
-
-	vals := GetSliceFeatures(v, features, key)
-
-	strVals := []string{}
-	for _, v := range vals {
-		subVals := cast.ToStringSlice(v)
-		strVals = append(strVals, subVals...)
-	}
-
-	return strVals
-}
-
-// Parses a string of the following form:
-//     [@repo]<path/to/package>
-//
-// @return string               repo name ("" if no repo)
-//         string               package name
-//         error                if invalid package string
-func ParsePackageString(pkgStr string) (string, string, error) {
-	// remove possible trailing '/'
-	pkgStr = strings.TrimSuffix(pkgStr, "/")
-
-	if strings.HasPrefix(pkgStr, "@") {
-		nameParts := strings.SplitN(pkgStr[1:], "/", 2)
-		if len(nameParts) == 1 {
-			return "", "", util.NewNewtError(fmt.Sprintf("Invalid package "+
-				"string; contains repo but no package name: %s", pkgStr))
-		} else {
-			return nameParts[0], nameParts[1], nil
-		}
-	} else {
-		return "", pkgStr, nil
-	}
-}
-
-func FindRepoDesignator(s string) (int, int) {
-	start := strings.Index(s, "@")
-	if start == -1 {
-		return -1, -1
-	}
-
-	len := strings.Index(s[start:], "/")
-	if len == -1 {
-		return -1, -1
-	}
-
-	return start, len
-}
-
-func ReplaceRepoDesignators(s string) (string, bool) {
-	start, len := FindRepoDesignator(s)
-	if start == -1 {
-		return s, false
-	}
-	repoName := s[start+1 : start+len]
-
-	proj := interfaces.GetProject()
-	repoPath := proj.FindRepoPath(repoName)
-	if repoPath == "" {
-		return s, false
-	}
-
-	// Trim common project base from repo path.
-	relRepoPath := strings.TrimPrefix(repoPath, proj.Path()+"/")
-
-	return s[:start] + relRepoPath + s[start+len:], true
-}
-
-func BuildPackageString(repoName string, pkgName string) string {
-	if repoName != "" {
-		return "@" + repoName + "/" + pkgName
-	} else {
-		return pkgName
-	}
-}
-
-func GeneratedPreamble() string {
-	return fmt.Sprintf("/**\n * This file was generated by %s\n */\n\n",
-		NewtVersionStr)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/pkg/bsp_package.go
----------------------------------------------------------------------
diff --git a/newt/pkg/bsp_package.go b/newt/pkg/bsp_package.go
deleted file mode 100644
index 146347f..0000000
--- a/newt/pkg/bsp_package.go
+++ /dev/null
@@ -1,183 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package pkg
-
-import (
-	"runtime"
-	"strings"
-
-	"mynewt.apache.org/newt/newt/flash"
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/util"
-	"mynewt.apache.org/newt/viper"
-)
-
-const BSP_YAML_FILENAME = "bsp.yml"
-
-type BspPackage struct {
-	*LocalPackage
-	CompilerName       string
-	Arch               string
-	LinkerScripts      []string
-	Part2LinkerScripts []string /* scripts to link app to second partition */
-	DownloadScript     string
-	DebugScript        string
-	FlashMap           flash.FlashMap
-	BspV               *viper.Viper
-}
-
-func (bsp *BspPackage) resolvePathSetting(
-	features map[string]bool, key string) (string, error) {
-
-	proj := interfaces.GetProject()
-
-	val := newtutil.GetStringFeatures(bsp.BspV, features, key)
-	if val == "" {
-		return "", nil
-	}
-	path, err := proj.ResolvePath(bsp.Repo().Path(), val)
-	if err != nil {
-		return "", util.PreNewtError(err,
-			"BSP \"%s\" specifies invalid %s setting",
-			bsp.Name(), key)
-	}
-	return path, nil
-}
-
-// Interprets a setting as either a single linker script or a list of linker
-// scripts.
-func (bsp *BspPackage) resolveLinkerScriptSetting(
-	features map[string]bool, key string) ([]string, error) {
-
-	paths := []string{}
-
-	// Assume config file specifies a list of scripts.
-	vals := newtutil.GetStringSliceFeatures(bsp.BspV, features, key)
-	if vals == nil {
-		// Couldn't read a list of scripts; try to interpret setting as a
-		// single script.
-		path, err := bsp.resolvePathSetting(features, key)
-		if err != nil {
-			return nil, err
-		}
-
-		paths = append(paths, path)
-	} else {
-		proj := interfaces.GetProject()
-
-		// Read each linker script from the list.
-		for _, val := range vals {
-			path, err := proj.ResolvePath(bsp.Repo().Path(), val)
-			if err != nil {
-				return nil, util.PreNewtError(err,
-					"BSP \"%s\" specifies invalid %s setting",
-					bsp.Name(), key)
-			}
-
-			paths = append(paths, path)
-		}
-	}
-
-	return paths, nil
-}
-
-func (bsp *BspPackage) Reload(features map[string]bool) error {
-	var err error
-
-	if features == nil {
-		features = map[string]bool{
-			strings.ToUpper(runtime.GOOS): true,
-		}
-	} else {
-		features[strings.ToUpper(runtime.GOOS)] = true
-	}
-	bsp.BspV, err = util.ReadConfig(bsp.BasePath(),
-		strings.TrimSuffix(BSP_YAML_FILENAME, ".yml"))
-	if err != nil {
-		return err
-	}
-	bsp.AddCfgFilename(bsp.BasePath() + BSP_YAML_FILENAME)
-
-	bsp.CompilerName = newtutil.GetStringFeatures(bsp.BspV,
-		features, "bsp.compiler")
-
-	bsp.Arch = newtutil.GetStringFeatures(bsp.BspV,
-		features, "bsp.arch")
-
-	bsp.LinkerScripts, err = bsp.resolveLinkerScriptSetting(
-		features, "bsp.linkerscript")
-	if err != nil {
-		return err
-	}
-
-	bsp.Part2LinkerScripts, err = bsp.resolveLinkerScriptSetting(
-		features, "bsp.part2linkerscript")
-	if err != nil {
-		return err
-	}
-
-	bsp.DownloadScript, err = bsp.resolvePathSetting(
-		features, "bsp.downloadscript")
-	if err != nil {
-		return err
-	}
-	bsp.DebugScript, err = bsp.resolvePathSetting(
-		features, "bsp.debugscript")
-	if err != nil {
-		return err
-	}
-
-	if bsp.CompilerName == "" {
-		return util.NewNewtError("BSP does not specify a compiler " +
-			"(bsp.compiler)")
-	}
-	if bsp.Arch == "" {
-		return util.NewNewtError("BSP does not specify an architecture " +
-			"(bsp.arch)")
-	}
-
-	ymlFlashMap := newtutil.GetStringMapFeatures(bsp.BspV, features,
-		"bsp.flash_map")
-	if ymlFlashMap == nil {
-		return util.NewNewtError("BSP does not specify a flash map " +
-			"(bsp.flash_map)")
-	}
-	bsp.FlashMap, err = flash.Read(ymlFlashMap)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func NewBspPackage(lpkg *LocalPackage) (*BspPackage, error) {
-	bsp := &BspPackage{
-		CompilerName:   "",
-		DownloadScript: "",
-		DebugScript:    "",
-		BspV:           viper.New(),
-	}
-	lpkg.Load()
-	bsp.LocalPackage = lpkg
-	err := bsp.Reload(nil)
-
-	return bsp, err
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/pkg/dependency.go
----------------------------------------------------------------------
diff --git a/newt/pkg/dependency.go b/newt/pkg/dependency.go
deleted file mode 100644
index 4b15682..0000000
--- a/newt/pkg/dependency.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package pkg
-
-import (
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/repo"
-)
-
-type Dependency struct {
-	Name string
-	Repo string
-}
-
-func (dep *Dependency) String() string {
-	return newtutil.BuildPackageString(dep.Repo, dep.Name)
-}
-
-func (dep *Dependency) SatisfiesDependency(pkg interfaces.PackageInterface) bool {
-	if dep.Name != pkg.Name() {
-		return false
-	}
-
-	if dep.Repo != pkg.Repo().Name() {
-		return false
-	}
-
-	return true
-}
-
-func (dep *Dependency) setRepoAndName(parentRepo interfaces.RepoInterface, str string) error {
-	// First part is always repo/dependency name combination.
-	// If repo is present, string will always begin with a @ sign
-	// representing the repo name, followed by 'n' slashes.
-	repoName, pkgName, err := newtutil.ParsePackageString(str)
-	if err != nil {
-		return err
-	}
-
-	if repoName != "" {
-		dep.Repo = repoName
-		dep.Name = pkgName
-	} else {
-		if parentRepo != nil {
-			dep.Repo = parentRepo.Name()
-		} else {
-			dep.Repo = repo.REPO_NAME_LOCAL
-		}
-		dep.Name = str
-	}
-
-	return nil
-}
-
-func (dep *Dependency) Init(parentRepo interfaces.RepoInterface, depStr string) error {
-	if err := dep.setRepoAndName(parentRepo, depStr); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func NewDependency(parentRepo interfaces.RepoInterface, depStr string) (*Dependency, error) {
-	dep := &Dependency{}
-
-	if err := dep.Init(parentRepo, depStr); err != nil {
-		return nil, err
-	}
-
-	return dep, nil
-}


[21/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
deleted file mode 100644
index 8b42ca2..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ /dev/null
@@ -1,1970 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build ppc64,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x29
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_VSOCK                         = 0x28
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_6LOWPAN                   = 0x339
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_MONITOR        = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IP6GRE                    = 0x337
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETLINK                   = 0x338
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x17
-	B110                             = 0x3
-	B115200                          = 0x11
-	B1152000                         = 0x18
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x19
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x1a
-	B230400                          = 0x12
-	B2400                            = 0xb
-	B2500000                         = 0x1b
-	B300                             = 0x7
-	B3000000                         = 0x1c
-	B3500000                         = 0x1d
-	B38400                           = 0xf
-	B4000000                         = 0x1e
-	B460800                          = 0x13
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x14
-	B57600                           = 0x10
-	B576000                          = 0x15
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x16
-	B9600                            = 0xd
-	BOTHER                           = 0x1f
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MOD                          = 0x90
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BPF_XOR                          = 0xa0
-	BRKINT                           = 0x2
-	BS0                              = 0x0
-	BS1                              = 0x8000
-	BSDLY                            = 0x8000
-	CBAUD                            = 0xff
-	CBAUDEX                          = 0x0
-	CFLUSH                           = 0xf
-	CIBAUD                           = 0xff0000
-	CLOCAL                           = 0x8000
-	CLOCK_BOOTTIME                   = 0x7
-	CLOCK_BOOTTIME_ALARM             = 0x9
-	CLOCK_DEFAULT                    = 0x0
-	CLOCK_EXT                        = 0x1
-	CLOCK_INT                        = 0x2
-	CLOCK_MONOTONIC                  = 0x1
-	CLOCK_MONOTONIC_COARSE           = 0x6
-	CLOCK_MONOTONIC_RAW              = 0x4
-	CLOCK_PROCESS_CPUTIME_ID         = 0x2
-	CLOCK_REALTIME                   = 0x0
-	CLOCK_REALTIME_ALARM             = 0x8
-	CLOCK_REALTIME_COARSE            = 0x5
-	CLOCK_THREAD_CPUTIME_ID          = 0x3
-	CLOCK_TXFROMRX                   = 0x4
-	CLOCK_TXINT                      = 0x3
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWCGROUP                  = 0x2000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CMSPAR                           = 0x40000000
-	CR0                              = 0x0
-	CR1                              = 0x1000
-	CR2                              = 0x2000
-	CR3                              = 0x3000
-	CRDLY                            = 0x3000
-	CREAD                            = 0x800
-	CRTSCTS                          = 0x80000000
-	CS5                              = 0x0
-	CS6                              = 0x100
-	CS7                              = 0x200
-	CS8                              = 0x300
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x300
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x400
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x40
-	ECHOE                            = 0x2
-	ECHOK                            = 0x4
-	ECHOKE                           = 0x1
-	ECHONL                           = 0x10
-	ECHOPRT                          = 0x20
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWAKEUP                      = 0x20000000
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_80221                      = 0x8917
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_802_3_MIN                  = 0x600
-	ETH_P_802_EX1                    = 0x88b5
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BATMAN                     = 0x4305
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CANFD                      = 0xd
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_LOOPBACK                   = 0x9000
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_MVRP                       = 0x88f5
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PRP                        = 0x88fb
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	ETH_P_XDSA                       = 0xf8
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FF0                              = 0x0
-	FF1                              = 0x4000
-	FFDLY                            = 0x4000
-	FLUSHO                           = 0x800000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0x5
-	F_GETLK64                        = 0xc
-	F_GETOWN                         = 0x9
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OFD_GETLK                      = 0x24
-	F_OFD_SETLK                      = 0x25
-	F_OFD_SETLKW                     = 0x26
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x6
-	F_SETLK64                        = 0xd
-	F_SETLKW                         = 0x7
-	F_SETLKW64                       = 0xe
-	F_SETOWN                         = 0x8
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x4000
-	IBSHIFT                          = 0x10
-	ICANON                           = 0x100
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x400
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_MANAGETEMPADDR             = 0x100
-	IFA_F_NODAD                      = 0x2
-	IFA_F_NOPREFIXROUTE              = 0x200
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x8
-	IFF_ALLMULTI                     = 0x200
-	IFF_ATTACH_QUEUE                 = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DETACH_QUEUE                 = 0x400
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_ECHO                         = 0x40000
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MASTER                       = 0x400
-	IFF_MULTICAST                    = 0x1000
-	IFF_MULTI_QUEUE                  = 0x100
-	IFF_NOARP                        = 0x80
-	IFF_NOFILTER                     = 0x1000
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_PERSIST                      = 0x800
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_TAP                          = 0x2
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x800
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_BEETPH                   = 0x5e
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MH                       = 0x87
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_INTERFACE          = 0x4
-	IPV6_PMTUDISC_OMIT               = 0x5
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_NODEFRAG                      = 0x16
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_INTERFACE            = 0x4
-	IP_PMTUDISC_OMIT                 = 0x5
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_UNICAST_IF                    = 0x32
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x80
-	ISTRIP                           = 0x20
-	IUCLC                            = 0x1000
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x400
-	IXON                             = 0x200
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DODUMP                      = 0x11
-	MADV_DOFORK                      = 0xb
-	MADV_DONTDUMP                    = 0x10
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x100
-	MAP_HUGETLB                      = 0x40000
-	MAP_HUGE_MASK                    = 0x3f
-	MAP_HUGE_SHIFT                   = 0x1a
-	MAP_LOCKED                       = 0x80
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x40
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x20000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x2000
-	MCL_FUTURE                       = 0x4000
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_RX_RING                  = 0x6
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_SOCK_DIAG                = 0x4
-	NETLINK_TX_RING                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NL0                              = 0x0
-	NL1                              = 0x100
-	NL2                              = 0x200
-	NL3                              = 0x300
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLDLY                            = 0x300
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80000000
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	OLCUC                            = 0x4
-	ONLCR                            = 0x2
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x400
-	O_ASYNC                          = 0x2000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x40
-	O_DIRECT                         = 0x20000
-	O_DIRECTORY                      = 0x4000
-	O_DSYNC                          = 0x1000
-	O_EXCL                           = 0x80
-	O_FSYNC                          = 0x101000
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x800
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x100
-	O_NOFOLLOW                       = 0x8000
-	O_NONBLOCK                       = 0x800
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x101000
-	O_SYNC                           = 0x101000
-	O_TMPFILE                        = 0x410000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_FLAG_ROLLOVER      = 0x1000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FANOUT_QM                 = 0x5
-	PACKET_FANOUT_RND                = 0x4
-	PACKET_FANOUT_ROLLOVER           = 0x3
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_KERNEL                    = 0x7
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_QDISC_BYPASS              = 0x14
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_HAS_OFF                = 0x13
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_USER                      = 0x6
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x1000
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x2000
-	PENDIN                           = 0x20000000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_SAO                         = 0x10
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_GET_CHILD_SUBREAPER           = 0x25
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_THP_DISABLE               = 0x2a
-	PR_GET_TID_ADDRESS               = 0x28
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_SET_CHILD_SUBREAPER           = 0x24
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_ARG_END                = 0x9
-	PR_SET_MM_ARG_START              = 0x8
-	PR_SET_MM_AUXV                   = 0xc
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_ENV_END                = 0xb
-	PR_SET_MM_ENV_START              = 0xa
-	PR_SET_MM_EXE_FILE               = 0xd
-	PR_SET_MM_MAP                    = 0xe
-	PR_SET_MM_MAP_SIZE               = 0xf
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_THP_DISABLE               = 0x29
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETEVRREGS                = 0x14
-	PTRACE_GETFPREGS                 = 0xe
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGS64                 = 0x16
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETSIGMASK                = 0x420a
-	PTRACE_GETVRREGS                 = 0x12
-	PTRACE_GETVSRREGS                = 0x1b
-	PTRACE_GET_DEBUGREG              = 0x19
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_O_EXITKILL                = 0x100000
-	PTRACE_O_MASK                    = 0x1000ff
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKSIGINFO               = 0x4209
-	PTRACE_PEEKSIGINFO_SHARED        = 0x1
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SETEVRREGS                = 0x15
-	PTRACE_SETFPREGS                 = 0xf
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGS64                 = 0x17
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETSIGMASK                = 0x420b
-	PTRACE_SETVRREGS                 = 0x13
-	PTRACE_SETVSRREGS                = 0x1c
-	PTRACE_SET_DEBUGREG              = 0x1a
-	PTRACE_SINGLEBLOCK               = 0x100
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TRACEME                   = 0x0
-	PT_CCR                           = 0x26
-	PT_CTR                           = 0x23
-	PT_DAR                           = 0x29
-	PT_DSCR                          = 0x2c
-	PT_DSISR                         = 0x2a
-	PT_FPR0                          = 0x30
-	PT_FPSCR                         = 0x50
-	PT_LNK                           = 0x24
-	PT_MSR                           = 0x21
-	PT_NIP                           = 0x20
-	PT_ORIG_R3                       = 0x22
-	PT_R0                            = 0x0
-	PT_R1                            = 0x1
-	PT_R10                           = 0xa
-	PT_R11                           = 0xb
-	PT_R12                           = 0xc
-	PT_R13                           = 0xd
-	PT_R14                           = 0xe
-	PT_R15                           = 0xf
-	PT_R16                           = 0x10
-	PT_R17                           = 0x11
-	PT_R18                           = 0x12
-	PT_R19                           = 0x13
-	PT_R2                            = 0x2
-	PT_R20                           = 0x14
-	PT_R21                           = 0x15
-	PT_R22                           = 0x16
-	PT_R23                           = 0x17
-	PT_R24                           = 0x18
-	PT_R25                           = 0x19
-	PT_R26                           = 0x1a
-	PT_R27                           = 0x1b
-	PT_R28                           = 0x1c
-	PT_R29                           = 0x1d
-	PT_R3                            = 0x3
-	PT_R30                           = 0x1e
-	PT_R31                           = 0x1f
-	PT_R4                            = 0x4
-	PT_R5                            = 0x5
-	PT_R6                            = 0x6
-	PT_R7                            = 0x7
-	PT_R8                            = 0x8
-	PT_R9                            = 0x9
-	PT_REGS_COUNT                    = 0x2c
-	PT_RESULT                        = 0x2b
-	PT_SOFTE                         = 0x27
-	PT_TRAP                          = 0x28
-	PT_VR0                           = 0x52
-	PT_VRSAVE                        = 0x94
-	PT_VSCR                          = 0x93
-	PT_VSR0                          = 0x96
-	PT_VSR31                         = 0xd4
-	PT_XER                           = 0x25
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x7
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0xf
-	RTAX_MTU                         = 0x2
-	RTAX_QUICKACK                    = 0xf
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x11
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELMDB                       = 0x55
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMDB                       = 0x56
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETNETCONF                   = 0x52
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x57
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWMDB                       = 0x54
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWNETCONF                   = 0x50
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x12
-	RTM_NR_MSGTYPES                  = 0x48
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MROUTED                   = 0x11
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SCM_WIFI_STATUS                  = 0x29
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x800
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0x1
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1e
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BPF_EXTENSIONS                = 0x30
-	SO_BROADCAST                     = 0x6
-	SO_BSDCOMPAT                     = 0xe
-	SO_BUSY_POLL                     = 0x2e
-	SO_DEBUG                         = 0x1
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x27
-	SO_DONTROUTE                     = 0x5
-	SO_ERROR                         = 0x4
-	SO_GET_FILTER                    = 0x1a
-	SO_KEEPALIVE                     = 0x9
-	SO_LINGER                        = 0xd
-	SO_LOCK_FILTER                   = 0x2c
-	SO_MARK                          = 0x24
-	SO_MAX_PACING_RATE               = 0x2f
-	SO_NOFCS                         = 0x2b
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0xa
-	SO_PASSCRED                      = 0x14
-	SO_PASSSEC                       = 0x22
-	SO_PEEK_OFF                      = 0x2a
-	SO_PEERCRED                      = 0x15
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1f
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x26
-	SO_RCVBUF                        = 0x8
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x10
-	SO_RCVTIMEO                      = 0x12
-	SO_REUSEADDR                     = 0x2
-	SO_REUSEPORT                     = 0xf
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SELECT_ERR_QUEUE              = 0x2d
-	SO_SNDBUF                        = 0x7
-	SO_SNDBUFFORCE                   = 0x20
-	SO_SNDLOWAT                      = 0x11
-	SO_SNDTIMEO                      = 0x13
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x3
-	SO_WIFI_STATUS                   = 0x29
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TAB0                             = 0x0
-	TAB1                             = 0x400
-	TAB2                             = 0x800
-	TAB3                             = 0xc00
-	TABDLY                           = 0xc00
-	TCFLSH                           = 0x2000741f
-	TCGETA                           = 0x40147417
-	TCGETS                           = 0x402c7413
-	TCIFLUSH                         = 0x0
-	TCIOFF                           = 0x2
-	TCIOFLUSH                        = 0x2
-	TCION                            = 0x3
-	TCOFLUSH                         = 0x1
-	TCOOFF                           = 0x0
-	TCOON                            = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_COOKIE_IN_ALWAYS             = 0x1
-	TCP_COOKIE_MAX                   = 0x10
-	TCP_COOKIE_MIN                   = 0x8
-	TCP_COOKIE_OUT_NEVER             = 0x2
-	TCP_COOKIE_PAIR_SIZE             = 0x20
-	TCP_COOKIE_TRANSACTIONS          = 0xf
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_FASTOPEN                     = 0x17
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_MSS_DEFAULT                  = 0x218
-	TCP_MSS_DESIRED                  = 0x4c4
-	TCP_NODELAY                      = 0x1
-	TCP_QUEUE_SEQ                    = 0x15
-	TCP_QUICKACK                     = 0xc
-	TCP_REPAIR                       = 0x13
-	TCP_REPAIR_OPTIONS               = 0x16
-	TCP_REPAIR_QUEUE                 = 0x14
-	TCP_SYNCNT                       = 0x7
-	TCP_S_DATA_IN                    = 0x4
-	TCP_S_DATA_OUT                   = 0x8
-	TCP_THIN_DUPACK                  = 0x11
-	TCP_THIN_LINEAR_TIMEOUTS         = 0x10
-	TCP_TIMESTAMP                    = 0x18
-	TCP_USER_TIMEOUT                 = 0x12
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TCSBRK                           = 0x2000741d
-	TCSBRKP                          = 0x5425
-	TCSETA                           = 0x80147418
-	TCSETAF                          = 0x8014741c
-	TCSETAW                          = 0x80147419
-	TCSETS                           = 0x802c7414
-	TCSETSF                          = 0x802c7416
-	TCSETSW                          = 0x802c7415
-	TCXONC                           = 0x2000741e
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x541d
-	TIOCEXCL                         = 0x540c
-	TIOCGDEV                         = 0x40045432
-	TIOCGETC                         = 0x40067412
-	TIOCGETD                         = 0x5424
-	TIOCGETP                         = 0x40067408
-	TIOCGEXCL                        = 0x40045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGLTC                         = 0x40067474
-	TIOCGPGRP                        = 0x40047477
-	TIOCGPKT                         = 0x40045438
-	TIOCGPTLCK                       = 0x40045439
-	TIOCGPTN                         = 0x40045430
-	TIOCGRS485                       = 0x542e
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x5429
-	TIOCGSOFTCAR                     = 0x5419
-	TIOCGWINSZ                       = 0x40087468
-	TIOCINQ                          = 0x4004667f
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x5417
-	TIOCMBIS                         = 0x5416
-	TIOCMGET                         = 0x5415
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x5418
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_LOOP                       = 0x8000
-	TIOCM_OUT1                       = 0x2000
-	TIOCM_OUT2                       = 0x4000
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x5422
-	TIOCNXCL                         = 0x540d
-	TIOCOUTQ                         = 0x40047473
-	TIOCPKT                          = 0x5420
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x540e
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETC                         = 0x80067411
-	TIOCSETD                         = 0x5423
-	TIOCSETN                         = 0x8006740a
-	TIOCSETP                         = 0x80067409
-	TIOCSIG                          = 0x80045436
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSLTC                         = 0x80067475
-	TIOCSPGRP                        = 0x80047476
-	TIOCSPTLCK                       = 0x80045431
-	TIOCSRS485                       = 0x542f
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x541a
-	TIOCSTART                        = 0x2000746e
-	TIOCSTI                          = 0x5412
-	TIOCSTOP                         = 0x2000746f
-	TIOCSWINSZ                       = 0x80087467
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x400000
-	TUNATTACHFILTER                  = 0x801054d5
-	TUNDETACHFILTER                  = 0x801054d6
-	TUNGETFEATURES                   = 0x400454cf
-	TUNGETFILTER                     = 0x401054db
-	TUNGETIFF                        = 0x400454d2
-	TUNGETSNDBUF                     = 0x400454d3
-	TUNGETVNETHDRSZ                  = 0x400454d7
-	TUNSETDEBUG                      = 0x800454c9
-	TUNSETGROUP                      = 0x800454ce
-	TUNSETIFF                        = 0x800454ca
-	TUNSETIFINDEX                    = 0x800454da
-	TUNSETLINK                       = 0x800454cd
-	TUNSETNOCSUM                     = 0x800454c8
-	TUNSETOFFLOAD                    = 0x800454d0
-	TUNSETOWNER                      = 0x800454cc
-	TUNSETPERSIST                    = 0x800454cb
-	TUNSETQUEUE                      = 0x800454d9
-	TUNSETSNDBUF                     = 0x800454d4
-	TUNSETTXFILTER                   = 0x800454d1
-	TUNSETVNETHDRSZ                  = 0x800454d8
-	VDISCARD                         = 0x10
-	VEOF                             = 0x4
-	VEOL                             = 0x6
-	VEOL2                            = 0x8
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x5
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xb
-	VSTART                           = 0xd
-	VSTOP                            = 0xe
-	VSUSP                            = 0xc
-	VSWTC                            = 0x9
-	VT0                              = 0x0
-	VT1                              = 0x10000
-	VTDLY                            = 0x10000
-	VTIME                            = 0x7
-	VWERASE                          = 0xa
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-	XCASE                            = 0x4000
-	XTABS                            = 0xc00
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x62)
-	EADDRNOTAVAIL   = syscall.Errno(0x63)
-	EADV            = syscall.Errno(0x44)
-	EAFNOSUPPORT    = syscall.Errno(0x61)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x72)
-	EBADE           = syscall.Errno(0x34)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x4d)
-	EBADMSG         = syscall.Errno(0x4a)
-	EBADR           = syscall.Errno(0x35)
-	EBADRQC         = syscall.Errno(0x38)
-	EBADSLT         = syscall.Errno(0x39)
-	EBFONT          = syscall.Errno(0x3b)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x7d)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x2c)
-	ECOMM           = syscall.Errno(0x46)
-	ECONNABORTED    = syscall.Errno(0x67)
-	ECONNREFUSED    = syscall.Errno(0x6f)
-	ECONNRESET      = syscall.Errno(0x68)
-	EDEADLK         = syscall.Errno(0x23)
-	EDEADLOCK       = syscall.Errno(0x3a)
-	EDESTADDRREQ    = syscall.Errno(0x59)
-	EDOM            = syscall.Errno(0x21)
-	EDOTDOT         = syscall.Errno(0x49)
-	EDQUOT          = syscall.Errno(0x7a)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x70)
-	EHOSTUNREACH    = syscall.Errno(0x71)
-	EHWPOISON       = syscall.Errno(0x85)
-	EIDRM           = syscall.Errno(0x2b)
-	EILSEQ          = syscall.Errno(0x54)
-	EINPROGRESS     = syscall.Errno(0x73)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x6a)
-	EISDIR          = syscall.Errno(0x15)
-	EISNAM          = syscall.Errno(0x78)
-	EKEYEXPIRED     = syscall.Errno(0x7f)
-	EKEYREJECTED    = syscall.Errno(0x81)
-	EKEYREVOKED     = syscall.Errno(0x80)
-	EL2HLT          = syscall.Errno(0x33)
-	EL2NSYNC        = syscall.Errno(0x2d)
-	EL3HLT          = syscall.Errno(0x2e)
-	EL3RST          = syscall.Errno(0x2f)
-	ELIBACC         = syscall.Errno(0x4f)
-	ELIBBAD         = syscall.Errno(0x50)
-	ELIBEXEC        = syscall.Errno(0x53)
-	ELIBMAX         = syscall.Errno(0x52)
-	ELIBSCN         = syscall.Errno(0x51)
-	ELNRNG          = syscall.Errno(0x30)
-	ELOOP           = syscall.Errno(0x28)
-	EMEDIUMTYPE     = syscall.Errno(0x7c)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x5a)
-	EMULTIHOP       = syscall.Errno(0x48)
-	ENAMETOOLONG    = syscall.Errno(0x24)
-	ENAVAIL         = syscall.Errno(0x77)
-	ENETDOWN        = syscall.Errno(0x64)
-	ENETRESET       = syscall.Errno(0x66)
-	ENETUNREACH     = syscall.Errno(0x65)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x37)
-	ENOBUFS         = syscall.Errno(0x69)
-	ENOCSI          = syscall.Errno(0x32)
-	ENODATA         = syscall.Errno(0x3d)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOKEY          = syscall.Errno(0x7e)
-	ENOLCK          = syscall.Errno(0x25)
-	ENOLINK         = syscall.Errno(0x43)
-	ENOMEDIUM       = syscall.Errno(0x7b)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x2a)
-	ENONET          = syscall.Errno(0x40)
-	ENOPKG          = syscall.Errno(0x41)
-	ENOPROTOOPT     = syscall.Errno(0x5c)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x3f)
-	ENOSTR          = syscall.Errno(0x3c)
-	ENOSYS          = syscall.Errno(0x26)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x6b)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x27)
-	ENOTNAM         = syscall.Errno(0x76)
-	ENOTRECOVERABLE = syscall.Errno(0x83)
-	ENOTSOCK        = syscall.Errno(0x58)
-	ENOTSUP         = syscall.Errno(0x5f)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x4c)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x5f)
-	EOVERFLOW       = syscall.Errno(0x4b)
-	EOWNERDEAD      = syscall.Errno(0x82)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x60)
-	EPIPE           = syscall.Errno(0x20)
-	EPROTO          = syscall.Errno(0x47)
-	EPROTONOSUPPORT = syscall.Errno(0x5d)
-	EPROTOTYPE      = syscall.Errno(0x5b)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x4e)
-	EREMOTE         = syscall.Errno(0x42)
-	EREMOTEIO       = syscall.Errno(0x79)
-	ERESTART        = syscall.Errno(0x55)
-	ERFKILL         = syscall.Errno(0x84)
-	EROFS           = syscall.Errno(0x1e)
-	ESHUTDOWN       = syscall.Errno(0x6c)
-	ESOCKTNOSUPPORT = syscall.Errno(0x5e)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x45)
-	ESTALE          = syscall.Errno(0x74)
-	ESTRPIPE        = syscall.Errno(0x56)
-	ETIME           = syscall.Errno(0x3e)
-	ETIMEDOUT       = syscall.Errno(0x6e)
-	ETOOMANYREFS    = syscall.Errno(0x6d)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUCLEAN         = syscall.Errno(0x75)
-	EUNATCH         = syscall.Errno(0x31)
-	EUSERS          = syscall.Errno(0x57)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x36)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0x7)
-	SIGCHLD   = syscall.Signal(0x11)
-	SIGCLD    = syscall.Signal(0x11)
-	SIGCONT   = syscall.Signal(0x12)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x1d)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPOLL   = syscall.Signal(0x1d)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x1e)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTKFLT = syscall.Signal(0x10)
-	SIGSTOP   = syscall.Signal(0x13)
-	SIGSYS    = syscall.Signal(0x1f)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x14)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGUNUSED = syscall.Signal(0x1f)
-	SIGURG    = syscall.Signal(0x17)
-	SIGUSR1   = syscall.Signal(0xa)
-	SIGUSR2   = syscall.Signal(0xc)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	35:  "resource deadlock avoided",
-	36:  "file name too long",
-	37:  "no locks available",
-	38:  "function not implemented",
-	39:  "directory not empty",
-	40:  "too many levels of symbolic links",
-	42:  "no message of desired type",
-	43:  "identifier removed",
-	44:  "channel number out of range",
-	45:  "level 2 not synchronized",
-	46:  "level 3 halted",
-	47:  "level 3 reset",
-	48:  "link number out of range",
-	49:  "protocol driver not attached",
-	50:  "no CSI structure available",
-	51:  "level 2 halted",
-	52:  "invalid exchange",
-	53:  "invalid request descriptor",
-	54:  "exchange full",
-	55:  "no anode",
-	56:  "invalid request code",
-	57:  "invalid slot",
-	58:  "file locking deadlock error",
-	59:  "bad font file format",
-	60:  "device not a stream",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of streams resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "multihop attempted",
-	73:  "RFS specific error",
-	74:  "bad message",
-	75:  "value too large for defined data type",
-	76:  "name not unique on network",
-	77:  "file descriptor in bad state",
-	78:  "remote address changed",
-	79:  "can not access a needed shared library",
-	80:  "accessing a corrupted shared library",
-	81:  ".lib section in a.out corrupted",
-	82:  "attempting to link in too many shared libraries",
-	83:  "cannot exec a shared library directly",
-	84:  "invalid or incomplete multibyte or wide character",
-	85:  "interrupted system call should be restarted",
-	86:  "streams pipe error",
-	87:  "too many users",
-	88:  "socket operation on non-socket",
-	89:  "destination address required",
-	90:  "message too long",
-	91:  "protocol wrong type for socket",
-	92:  "protocol not available",
-	93:  "protocol not supported",
-	94:  "socket type not supported",
-	95:  "operation not supported",
-	96:  "protocol family not supported",
-	97:  "address family not supported by protocol",
-	98:  "address already in use",
-	99:  "cannot assign requested address",
-	100: "network is down",
-	101: "network is unreachable",
-	102: "network dropped connection on reset",
-	103: "software caused connection abort",
-	104: "connection reset by peer",
-	105: "no buffer space available",
-	106: "transport endpoint is already connected",
-	107: "transport endpoint is not connected",
-	108: "cannot send after transport endpoint shutdown",
-	109: "too many references: cannot splice",
-	110: "connection timed out",
-	111: "connection refused",
-	112: "host is down",
-	113: "no route to host",
-	114: "operation already in progress",
-	115: "operation now in progress",
-	116: "stale file handle",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "disk quota exceeded",
-	123: "no medium found",
-	124: "wrong medium type",
-	125: "operation canceled",
-	126: "required key not available",
-	127: "key has expired",
-	128: "key has been revoked",
-	129: "key was rejected by service",
-	130: "owner died",
-	131: "state not recoverable",
-	132: "operation not possible due to RF-kill",
-	133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "bus error",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "user defined signal 1",
-	11: "segmentation fault",
-	12: "user defined signal 2",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "stack fault",
-	17: "child exited",
-	18: "continued",
-	19: "stopped (signal)",
-	20: "stopped",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "urgent I/O condition",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "I/O possible",
-	30: "power failure",
-	31: "bad system call",
-}


[55/67] [abbrv] incubator-mynewt-newtmgr git commit: newtmgr - allow blehostd 2 seconds for accept tmo.

Posted by cc...@apache.org.
newtmgr - allow blehostd 2 seconds for accept tmo.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/d24f0401
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/d24f0401
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/d24f0401

Branch: refs/heads/master
Commit: d24f04015b97cc9ed36f89b8e567c4a8f2fa262c
Parents: f58e088
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Mar 27 11:52:48 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 newtmgr/config/ble_config.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/d24f0401/newtmgr/config/ble_config.go
----------------------------------------------------------------------
diff --git a/newtmgr/config/ble_config.go b/newtmgr/config/ble_config.go
index aeb80c7..dbdf3dc 100644
--- a/newtmgr/config/ble_config.go
+++ b/newtmgr/config/ble_config.go
@@ -116,7 +116,7 @@ func BuildBleXport(bc *BleConfig) (*nmble.BleXport, error) {
 	params.SockPath = "/tmp/blehostd-uds"
 	params.BlehostdPath = bc.BlehostdPath
 	params.DevPath = bc.ControllerPath
-	params.BlehostdAcceptTimeout = time.Second / 10
+	params.BlehostdAcceptTimeout = 2 * time.Second
 	params.BlehostdRestart = false
 
 	bx, err := nmble.NewBleXport(params)


[33/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
deleted file mode 100644
index a410e88..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
+++ /dev/null
@@ -1,1293 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-// +build arm,darwin
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1c
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x25
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x1e
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1c
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x28
-	AF_NATM                           = 0x1f
-	AF_NDRV                           = 0x1b
-	AF_NETBIOS                        = 0x21
-	AF_NS                             = 0x6
-	AF_OSI                            = 0x7
-	AF_PPP                            = 0x22
-	AF_PUP                            = 0x4
-	AF_RESERVED_36                    = 0x24
-	AF_ROUTE                          = 0x11
-	AF_SIP                            = 0x18
-	AF_SNA                            = 0xb
-	AF_SYSTEM                         = 0x20
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	AF_UTUN                           = 0x26
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B9600                             = 0x2580
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc00c4279
-	BIOCGETIF                         = 0x4020426b
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044272
-	BIOCGRTIMEOUT                     = 0x4010426e
-	BIOCGSEESENT                      = 0x40044276
-	BIOCGSTATS                        = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDLT                          = 0x80044278
-	BIOCSETF                          = 0x80104267
-	BIOCSETIF                         = 0x8020426c
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044273
-	BIOCSRTIMEOUT                     = 0x8010426d
-	BIOCSSEESENT                      = 0x80044277
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x80000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AX25                          = 0x3
-	DLT_CHAOS                         = 0x5
-	DLT_CHDLC                         = 0x68
-	DLT_C_HDLC                        = 0x68
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_FDDI                          = 0xa
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_NULL                          = 0x0
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PRONET                        = 0x4
-	DLT_RAW                           = 0xc
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EVFILT_AIO                        = -0x3
-	EVFILT_FS                         = -0x9
-	EVFILT_MACHPORT                   = -0x8
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0xe
-	EVFILT_THREADMARKER               = 0xe
-	EVFILT_TIMER                      = -0x7
-	EVFILT_USER                       = -0xa
-	EVFILT_VM                         = -0xc
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_DISPATCH                       = 0x80
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG0                          = 0x1000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_OOBAND                         = 0x2000
-	EV_POLL                           = 0x1000
-	EV_RECEIPT                        = 0x40
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_ADDFILESIGS                     = 0x3d
-	F_ADDSIGS                         = 0x3b
-	F_ALLOCATEALL                     = 0x4
-	F_ALLOCATECONTIG                  = 0x2
-	F_CHKCLEAN                        = 0x29
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0x43
-	F_FINDSIGS                        = 0x4e
-	F_FLUSH_DATA                      = 0x28
-	F_FREEZE_FS                       = 0x35
-	F_FULLFSYNC                       = 0x33
-	F_GETCODEDIR                      = 0x48
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETLKPID                        = 0x42
-	F_GETNOSIGPIPE                    = 0x4a
-	F_GETOWN                          = 0x5
-	F_GETPATH                         = 0x32
-	F_GETPATH_MTMINFO                 = 0x47
-	F_GETPROTECTIONCLASS              = 0x3f
-	F_GETPROTECTIONLEVEL              = 0x4d
-	F_GLOBAL_NOCACHE                  = 0x37
-	F_LOG2PHYS                        = 0x31
-	F_LOG2PHYS_EXT                    = 0x41
-	F_NOCACHE                         = 0x30
-	F_NODIRECT                        = 0x3e
-	F_OK                              = 0x0
-	F_PATHPKG_CHECK                   = 0x34
-	F_PEOFPOSMODE                     = 0x3
-	F_PREALLOCATE                     = 0x2a
-	F_RDADVISE                        = 0x2c
-	F_RDAHEAD                         = 0x2d
-	F_RDLCK                           = 0x1
-	F_SETBACKINGSTORE                 = 0x46
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETLKWTIMEOUT                   = 0xa
-	F_SETNOSIGPIPE                    = 0x49
-	F_SETOWN                          = 0x6
-	F_SETPROTECTIONCLASS              = 0x40
-	F_SETSIZE                         = 0x2b
-	F_SINGLE_WRITER                   = 0x4c
-	F_THAW_FS                         = 0x36
-	F_TRANSCODEKEY                    = 0x4b
-	F_UNLCK                           = 0x2
-	F_VOLPOSMODE                      = 0x4
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFF_ALLMULTI                      = 0x200
-	IFF_ALTPHYS                       = 0x4000
-	IFF_BROADCAST                     = 0x2
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_AAL5                          = 0x31
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ATM                           = 0x25
-	IFT_BRIDGE                        = 0xd1
-	IFT_CARP                          = 0xf8
-	IFT_CELLULAR                      = 0xff
-	IFT_CEPT                          = 0x13
-	IFT_DS3                           = 0x1e
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0x38
-	IFT_FDDI                          = 0xf
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_GIF                           = 0x37
-	IFT_HDH1822                       = 0x3
-	IFT_HIPPI                         = 0x2f
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE8023ADLAG                 = 0x88
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88026                      = 0xa
-	IFT_L2VLAN                        = 0x87
-	IFT_LAPB                          = 0x10
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_NSIP                          = 0x1b
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PDP                           = 0xff
-	IFT_PFLOG                         = 0xf5
-	IFT_PFSYNC                        = 0xf6
-	IFT_PPP                           = 0x17
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PTPSERIAL                     = 0x16
-	IFT_RS232                         = 0x21
-	IFT_SDLC                          = 0x11
-	IFT_SIP                           = 0x1f
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0x39
-	IFT_T1                            = 0x12
-	IFT_ULTRA                         = 0x1d
-	IFT_V35                           = 0x2d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LINKLOCALNETNUM                = 0xa9fe0000
-	IN_LOOPBACKNET                    = 0x7f
-	IPPROTO_3PC                       = 0x22
-	IPPROTO_ADFS                      = 0x44
-	IPPROTO_AH                        = 0x33
-	IPPROTO_AHIP                      = 0x3d
-	IPPROTO_APES                      = 0x63
-	IPPROTO_ARGUS                     = 0xd
-	IPPROTO_AX25                      = 0x5d
-	IPPROTO_BHA                       = 0x31
-	IPPROTO_BLT                       = 0x1e
-	IPPROTO_BRSATMON                  = 0x4c
-	IPPROTO_CFTP                      = 0x3e
-	IPPROTO_CHAOS                     = 0x10
-	IPPROTO_CMTP                      = 0x26
-	IPPROTO_CPHB                      = 0x49
-	IPPROTO_CPNX                      = 0x48
-	IPPROTO_DDP                       = 0x25
-	IPPROTO_DGP                       = 0x56
-	IPPROTO_DIVERT                    = 0xfe
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_EMCON                     = 0xe
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GMTP                      = 0x64
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HELLO                     = 0x3f
-	IPPROTO_HMP                       = 0x14
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IDPR                      = 0x23
-	IPPROTO_IDRP                      = 0x2d
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IGP                       = 0x55
-	IPPROTO_IGRP                      = 0x58
-	IPPROTO_IL                        = 0x28
-	IPPROTO_INLSP                     = 0x34
-	IPPROTO_INP                       = 0x20
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPCV                      = 0x47
-	IPPROTO_IPEIP                     = 0x5e
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPPC                      = 0x43
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IRTP                      = 0x1c
-	IPPROTO_KRYPTOLAN                 = 0x41
-	IPPROTO_LARP                      = 0x5b
-	IPPROTO_LEAF1                     = 0x19
-	IPPROTO_LEAF2                     = 0x1a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MEAS                      = 0x13
-	IPPROTO_MHRP                      = 0x30
-	IPPROTO_MICP                      = 0x5f
-	IPPROTO_MTP                       = 0x5c
-	IPPROTO_MUX                       = 0x12
-	IPPROTO_ND                        = 0x4d
-	IPPROTO_NHRP                      = 0x36
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_NSP                       = 0x1f
-	IPPROTO_NVPII                     = 0xb
-	IPPROTO_OSPFIGP                   = 0x59
-	IPPROTO_PGM                       = 0x71
-	IPPROTO_PIGP                      = 0x9
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PRM                       = 0x15
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_PVP                       = 0x4b
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_RCCMON                    = 0xa
-	IPPROTO_RDP                       = 0x1b
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_RVD                       = 0x42
-	IPPROTO_SATEXPAK                  = 0x40
-	IPPROTO_SATMON                    = 0x45
-	IPPROTO_SCCSP                     = 0x60
-	IPPROTO_SCTP                      = 0x84
-	IPPROTO_SDRP                      = 0x2a
-	IPPROTO_SEP                       = 0x21
-	IPPROTO_SRPC                      = 0x5a
-	IPPROTO_ST                        = 0x7
-	IPPROTO_SVMTP                     = 0x52
-	IPPROTO_SWIPE                     = 0x35
-	IPPROTO_TCF                       = 0x57
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_TPXX                      = 0x27
-	IPPROTO_TRUNK1                    = 0x17
-	IPPROTO_TRUNK2                    = 0x18
-	IPPROTO_TTP                       = 0x54
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_VINES                     = 0x53
-	IPPROTO_VISA                      = 0x46
-	IPPROTO_VMTP                      = 0x51
-	IPPROTO_WBEXPAK                   = 0x4f
-	IPPROTO_WBMON                     = 0x4e
-	IPPROTO_WSN                       = 0x4a
-	IPPROTO_XNET                      = 0xf
-	IPPROTO_XTP                       = 0x24
-	IPV6_2292DSTOPTS                  = 0x17
-	IPV6_2292HOPLIMIT                 = 0x14
-	IPV6_2292HOPOPTS                  = 0x16
-	IPV6_2292NEXTHOP                  = 0x15
-	IPV6_2292PKTINFO                  = 0x13
-	IPV6_2292PKTOPTIONS               = 0x19
-	IPV6_2292RTHDR                    = 0x18
-	IPV6_BINDV6ONLY                   = 0x1b
-	IPV6_BOUND_IF                     = 0x7d
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_FW_ADD                       = 0x1e
-	IPV6_FW_DEL                       = 0x1f
-	IPV6_FW_FLUSH                     = 0x20
-	IPV6_FW_GET                       = 0x22
-	IPV6_FW_ZERO                      = 0x21
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXOPTHDR                    = 0x800
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MAX_GROUP_SRC_FILTER         = 0x200
-	IPV6_MAX_MEMBERSHIPS              = 0xfff
-	IPV6_MAX_SOCK_SRC_FILTER          = 0x80
-	IPV6_MIN_MEMBERSHIPS              = 0x1f
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVTCLASS                   = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x24
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_ADD_SOURCE_MEMBERSHIP          = 0x46
-	IP_BLOCK_SOURCE                   = 0x48
-	IP_BOUND_IF                       = 0x19
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_DROP_SOURCE_MEMBERSHIP         = 0x47
-	IP_DUMMYNET_CONFIGURE             = 0x3c
-	IP_DUMMYNET_DEL                   = 0x3d
-	IP_DUMMYNET_FLUSH                 = 0x3e
-	IP_DUMMYNET_GET                   = 0x40
-	IP_FAITH                          = 0x16
-	IP_FW_ADD                         = 0x28
-	IP_FW_DEL                         = 0x29
-	IP_FW_FLUSH                       = 0x2a
-	IP_FW_GET                         = 0x2c
-	IP_FW_RESETLOG                    = 0x2d
-	IP_FW_ZERO                        = 0x2b
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x15
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_GROUP_SRC_FILTER           = 0x200
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MAX_SOCK_MUTE_FILTER           = 0x80
-	IP_MAX_SOCK_SRC_FILTER            = 0x80
-	IP_MF                             = 0x2000
-	IP_MIN_MEMBERSHIPS                = 0x1f
-	IP_MSFILTER                       = 0x4a
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_IFINDEX              = 0x42
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_MULTICAST_VIF                  = 0xe
-	IP_NAT__XXX                       = 0x37
-	IP_OFFMASK                        = 0x1fff
-	IP_OLD_FW_ADD                     = 0x32
-	IP_OLD_FW_DEL                     = 0x33
-	IP_OLD_FW_FLUSH                   = 0x34
-	IP_OLD_FW_GET                     = 0x36
-	IP_OLD_FW_RESETLOG                = 0x38
-	IP_OLD_FW_ZERO                    = 0x35
-	IP_OPTIONS                        = 0x1
-	IP_PKTINFO                        = 0x1a
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVPKTINFO                    = 0x1a
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTTL                        = 0x18
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RSVP_OFF                       = 0x10
-	IP_RSVP_ON                        = 0xf
-	IP_RSVP_VIF_OFF                   = 0x12
-	IP_RSVP_VIF_ON                    = 0x11
-	IP_STRIPHDR                       = 0x17
-	IP_TOS                            = 0x3
-	IP_TRAFFIC_MGT_BACKGROUND         = 0x41
-	IP_TTL                            = 0x4
-	IP_UNBLOCK_SOURCE                 = 0x49
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IUTF8                             = 0x4000
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_CAN_REUSE                    = 0x9
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x5
-	MADV_FREE_REUSABLE                = 0x7
-	MADV_FREE_REUSE                   = 0x8
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_WILLNEED                     = 0x3
-	MADV_ZERO_WIRED_PAGES             = 0x6
-	MAP_ANON                          = 0x1000
-	MAP_COPY                          = 0x2
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_JIT                           = 0x800
-	MAP_NOCACHE                       = 0x400
-	MAP_NOEXTEND                      = 0x100
-	MAP_NORESERVE                     = 0x40
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_RESERVED0080                  = 0x80
-	MAP_SHARED                        = 0x1
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOF                           = 0x100
-	MSG_EOR                           = 0x8
-	MSG_FLUSH                         = 0x400
-	MSG_HAVEMORE                      = 0x2000
-	MSG_HOLD                          = 0x800
-	MSG_NEEDSA                        = 0x10000
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_RCVMORE                       = 0x4000
-	MSG_SEND                          = 0x1000
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MSG_WAITSTREAM                    = 0x200
-	MS_ASYNC                          = 0x1
-	MS_DEACTIVATE                     = 0x8
-	MS_INVALIDATE                     = 0x2
-	MS_KILLPAGES                      = 0x4
-	MS_SYNC                           = 0x10
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_DUMP2                      = 0x7
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_IFLIST2                    = 0x6
-	NET_RT_MAXID                      = 0xa
-	NET_RT_STAT                       = 0x4
-	NET_RT_TRASH                      = 0x5
-	NOFLSH                            = 0x80000000
-	NOTE_ABSOLUTE                     = 0x8
-	NOTE_ATTRIB                       = 0x8
-	NOTE_BACKGROUND                   = 0x40
-	NOTE_CHILD                        = 0x4
-	NOTE_CRITICAL                     = 0x20
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXITSTATUS                   = 0x4000000
-	NOTE_EXIT_CSERROR                 = 0x40000
-	NOTE_EXIT_DECRYPTFAIL             = 0x10000
-	NOTE_EXIT_DETAIL                  = 0x2000000
-	NOTE_EXIT_DETAIL_MASK             = 0x70000
-	NOTE_EXIT_MEMORY                  = 0x20000
-	NOTE_EXIT_REPARENTED              = 0x80000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FFAND                        = 0x40000000
-	NOTE_FFCOPY                       = 0xc0000000
-	NOTE_FFCTRLMASK                   = 0xc0000000
-	NOTE_FFLAGSMASK                   = 0xffffff
-	NOTE_FFNOP                        = 0x0
-	NOTE_FFOR                         = 0x80000000
-	NOTE_FORK                         = 0x40000000
-	NOTE_LEEWAY                       = 0x10
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_NONE                         = 0x80
-	NOTE_NSECONDS                     = 0x4
-	NOTE_PCTRLMASK                    = -0x100000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_REAP                         = 0x10000000
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_SECONDS                      = 0x1
-	NOTE_SIGNAL                       = 0x8000000
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRIGGER                      = 0x1000000
-	NOTE_USECONDS                     = 0x2
-	NOTE_VM_ERROR                     = 0x10000000
-	NOTE_VM_PRESSURE                  = 0x80000000
-	NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
-	NOTE_VM_PRESSURE_TERMINATE        = 0x40000000
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	OFDEL                             = 0x20000
-	OFILL                             = 0x80
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_ALERT                           = 0x20000000
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x1000000
-	O_CREAT                           = 0x200
-	O_DIRECTORY                       = 0x100000
-	O_DP_GETRAWENCRYPTED              = 0x1
-	O_DSYNC                           = 0x400000
-	O_EVTONLY                         = 0x8000
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x20000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_POPUP                           = 0x80000000
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_SHLOCK                          = 0x10
-	O_SYMLINK                         = 0x200000
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	PT_ATTACH                         = 0xa
-	PT_ATTACHEXC                      = 0xe
-	PT_CONTINUE                       = 0x7
-	PT_DENY_ATTACH                    = 0x1f
-	PT_DETACH                         = 0xb
-	PT_FIRSTMACH                      = 0x20
-	PT_FORCEQUOTA                     = 0x1e
-	PT_KILL                           = 0x8
-	PT_READ_D                         = 0x2
-	PT_READ_I                         = 0x1
-	PT_READ_U                         = 0x3
-	PT_SIGEXC                         = 0xc
-	PT_STEP                           = 0x9
-	PT_THUPDATE                       = 0xd
-	PT_TRACE_ME                       = 0x0
-	PT_WRITE_D                        = 0x5
-	PT_WRITE_I                        = 0x4
-	PT_WRITE_U                        = 0x6
-	RLIMIT_AS                         = 0x5
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_CPU_USAGE_MONITOR          = 0x2
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x8
-	RTAX_NETMASK                      = 0x2
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_BROADCAST                     = 0x400000
-	RTF_CLONING                       = 0x100
-	RTF_CONDEMNED                     = 0x2000000
-	RTF_DELCLONE                      = 0x80
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_IFREF                         = 0x4000000
-	RTF_IFSCOPE                       = 0x1000000
-	RTF_LLINFO                        = 0x400
-	RTF_LOCAL                         = 0x200000
-	RTF_MODIFIED                      = 0x20
-	RTF_MULTICAST                     = 0x800000
-	RTF_PINNED                        = 0x100000
-	RTF_PRCLONING                     = 0x10000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x40000
-	RTF_PROXY                         = 0x8000000
-	RTF_REJECT                        = 0x8
-	RTF_ROUTER                        = 0x10000000
-	RTF_STATIC                        = 0x800
-	RTF_UP                            = 0x1
-	RTF_WASCLONED                     = 0x20000
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DELMADDR                      = 0x10
-	RTM_GET                           = 0x4
-	RTM_GET2                          = 0x14
-	RTM_IFINFO                        = 0xe
-	RTM_IFINFO2                       = 0x12
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_NEWMADDR                      = 0xf
-	RTM_NEWMADDR2                     = 0x13
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	SCM_CREDS                         = 0x3
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x2
-	SCM_TIMESTAMP_MONOTONIC           = 0x4
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCARPIPLL                       = 0xc0206928
-	SIOCATMARK                        = 0x40047307
-	SIOCAUTOADDR                      = 0xc0206926
-	SIOCAUTONETMASK                   = 0x80206927
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFPHYADDR                    = 0x80206941
-	SIOCGDRVSPEC                      = 0xc028697b
-	SIOCGETVLAN                       = 0xc020697f
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFALTMTU                     = 0xc0206948
-	SIOCGIFASYNCMAP                   = 0xc020697c
-	SIOCGIFBOND                       = 0xc0206947
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCAP                        = 0xc020695b
-	SIOCGIFCONF                       = 0xc00c6924
-	SIOCGIFDEVMTU                     = 0xc0206944
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFKPI                        = 0xc0206987
-	SIOCGIFMAC                        = 0xc0206982
-	SIOCGIFMEDIA                      = 0xc02c6938
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc0206933
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206940
-	SIOCGIFPHYS                       = 0xc0206935
-	SIOCGIFPSRCADDR                   = 0xc020693f
-	SIOCGIFSTATUS                     = 0xc331693d
-	SIOCGIFVLAN                       = 0xc020697f
-	SIOCGIFWAKEFLAGS                  = 0xc0206988
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCIFCREATE                      = 0xc0206978
-	SIOCIFCREATE2                     = 0xc020697a
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc0106981
-	SIOCRSLVMULTI                     = 0xc010693b
-	SIOCSDRVSPEC                      = 0x8028697b
-	SIOCSETVLAN                       = 0x8020697e
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFALTMTU                     = 0x80206945
-	SIOCSIFASYNCMAP                   = 0x8020697d
-	SIOCSIFBOND                       = 0x80206946
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFCAP                        = 0x8020695a
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFKPI                        = 0x80206986
-	SIOCSIFLLADDR                     = 0x8020693c
-	SIOCSIFMAC                        = 0x80206983
-	SIOCSIFMEDIA                      = 0xc0206937
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x80206934
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x8040693e
-	SIOCSIFPHYS                       = 0x80206936
-	SIOCSIFVLAN                       = 0x8020697e
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SOCK_DGRAM                        = 0x2
-	SOCK_MAXADDRLEN                   = 0xff
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_DONTTRUNC                      = 0x2000
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LABEL                          = 0x1010
-	SO_LINGER                         = 0x80
-	SO_LINGER_SEC                     = 0x1080
-	SO_NKE                            = 0x1021
-	SO_NOADDRERR                      = 0x1023
-	SO_NOSIGPIPE                      = 0x1022
-	SO_NOTIFYCONFLICT                 = 0x1026
-	SO_NP_EXTENSIONS                  = 0x1083
-	SO_NREAD                          = 0x1020
-	SO_NUMRCVPKT                      = 0x1112
-	SO_NWRITE                         = 0x1024
-	SO_OOBINLINE                      = 0x100
-	SO_PEERLABEL                      = 0x1011
-	SO_RANDOMPORT                     = 0x1082
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_REUSESHAREUID                  = 0x1025
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_TIMESTAMP                      = 0x400
-	SO_TIMESTAMP_MONOTONIC            = 0x800
-	SO_TYPE                           = 0x1008
-	SO_UPCALLCLOSEWAIT                = 0x1027
-	SO_USELOOPBACK                    = 0x40
-	SO_WANTMORE                       = 0x4000
-	SO_WANTOOBFLAG                    = 0x8000
-	S_IEXEC                           = 0x40
-	S_IFBLK                           = 0x6000
-	S_IFCHR                           = 0x2000
-	S_IFDIR                           = 0x4000
-	S_IFIFO                           = 0x1000
-	S_IFLNK                           = 0xa000
-	S_IFMT                            = 0xf000
-	S_IFREG                           = 0x8000
-	S_IFSOCK                          = 0xc000
-	S_IFWHT                           = 0xe000
-	S_IREAD                           = 0x100
-	S_IRGRP                           = 0x20
-	S_IROTH                           = 0x4
-	S_IRUSR                           = 0x100
-	S_IRWXG                           = 0x38
-	S_IRWXO                           = 0x7
-	S_IRWXU                           = 0x1c0
-	S_ISGID                           = 0x400
-	S_ISTXT                           = 0x200
-	S_ISUID                           = 0x800
-	S_ISVTX                           = 0x200
-	S_IWGRP                           = 0x10
-	S_IWOTH                           = 0x2
-	S_IWRITE                          = 0x80
-	S_IWUSR                           = 0x80
-	S_IXGRP                           = 0x8
-	S_IXOTH                           = 0x1
-	S_IXUSR                           = 0x40
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CONNECTIONTIMEOUT             = 0x20
-	TCP_ENABLE_ECN                    = 0x104
-	TCP_KEEPALIVE                     = 0x10
-	TCP_KEEPCNT                       = 0x102
-	TCP_KEEPINTVL                     = 0x101
-	TCP_MAXHLEN                       = 0x3c
-	TCP_MAXOLEN                       = 0x28
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x4
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x200
-	TCP_NODELAY                       = 0x1
-	TCP_NOOPT                         = 0x8
-	TCP_NOPUSH                        = 0x4
-	TCP_NOTSENT_LOWAT                 = 0x201
-	TCP_RXT_CONNDROPTIME              = 0x80
-	TCP_RXT_FINDROP                   = 0x100
-	TCP_SENDMOREACKS                  = 0x103
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDCDTIMESTAMP                  = 0x40107458
-	TIOCDRAIN                         = 0x2000745e
-	TIOCDSIMICROCODE                  = 0x20007455
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLUSH                         = 0x80047410
-	TIOCGDRAINWAIT                    = 0x40047456
-	TIOCGETA                          = 0x40487413
-	TIOCGETD                          = 0x4004741a
-	TIOCGPGRP                         = 0x40047477
-	TIOCGWINSZ                        = 0x40087468
-	TIOCIXOFF                         = 0x20007480
-	TIOCIXON                          = 0x20007481
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGDTRWAIT                     = 0x4004745a
-	TIOCMGET                          = 0x4004746a
-	TIOCMODG                          = 0x40047403
-	TIOCMODS                          = 0x80047404
-	TIOCMSDTRWAIT                     = 0x8004745b
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTYGNAME                      = 0x40807453
-	TIOCPTYGRANT                      = 0x20007454
-	TIOCPTYUNLK                       = 0x20007452
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCONS                         = 0x20007463
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDRAINWAIT                    = 0x80047457
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x80487414
-	TIOCSETAF                         = 0x80487416
-	TIOCSETAW                         = 0x80487415
-	TIOCSETD                          = 0x8004741b
-	TIOCSIG                           = 0x2000745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x20007465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCTIMESTAMP                     = 0x40107459
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VT0                               = 0x0
-	VT1                               = 0x10000
-	VTDLY                             = 0x10000
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WCONTINUED                        = 0x10
-	WCOREFLAG                         = 0x80
-	WEXITED                           = 0x4
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x20
-	WORDSIZE                          = 0x40
-	WSTOPPED                          = 0x8
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADARCH        = syscall.Errno(0x56)
-	EBADEXEC        = syscall.Errno(0x55)
-	EBADF           = syscall.Errno(0x9)
-	EBADMACHO       = syscall.Errno(0x58)
-	EBADMSG         = syscall.Errno(0x5e)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x59)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDEVERR         = syscall.Errno(0x53)
-	EDOM            = syscall.Errno(0x21)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x5a)
-	EILSEQ          = syscall.Errno(0x5c)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x6a)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5f)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x5d)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODATA         = syscall.Errno(0x60)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x61)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x5b)
-	ENOPOLICY       = syscall.Errno(0x67)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x62)
-	ENOSTR          = syscall.Errno(0x63)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTRECOVERABLE = syscall.Errno(0x68)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x2d)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x66)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EOWNERDEAD      = syscall.Errno(0x69)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x64)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	EPWROFF         = syscall.Errno(0x52)
-	EQFULL          = syscall.Errno(0x6a)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHLIBVERS      = syscall.Errno(0x57)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIME           = syscall.Errno(0x65)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)


[44/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/inconshreveable/mousetrap/trap_windows.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/inconshreveable/mousetrap/trap_windows.go b/newt/vendor/github.com/inconshreveable/mousetrap/trap_windows.go
deleted file mode 100644
index 336142a..0000000
--- a/newt/vendor/github.com/inconshreveable/mousetrap/trap_windows.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// +build windows
-// +build !go1.4
-
-package mousetrap
-
-import (
-	"fmt"
-	"os"
-	"syscall"
-	"unsafe"
-)
-
-const (
-	// defined by the Win32 API
-	th32cs_snapprocess uintptr = 0x2
-)
-
-var (
-	kernel                   = syscall.MustLoadDLL("kernel32.dll")
-	CreateToolhelp32Snapshot = kernel.MustFindProc("CreateToolhelp32Snapshot")
-	Process32First           = kernel.MustFindProc("Process32FirstW")
-	Process32Next            = kernel.MustFindProc("Process32NextW")
-)
-
-// ProcessEntry32 structure defined by the Win32 API
-type processEntry32 struct {
-	dwSize              uint32
-	cntUsage            uint32
-	th32ProcessID       uint32
-	th32DefaultHeapID   int
-	th32ModuleID        uint32
-	cntThreads          uint32
-	th32ParentProcessID uint32
-	pcPriClassBase      int32
-	dwFlags             uint32
-	szExeFile           [syscall.MAX_PATH]uint16
-}
-
-func getProcessEntry(pid int) (pe *processEntry32, err error) {
-	snapshot, _, e1 := CreateToolhelp32Snapshot.Call(th32cs_snapprocess, uintptr(0))
-	if snapshot == uintptr(syscall.InvalidHandle) {
-		err = fmt.Errorf("CreateToolhelp32Snapshot: %v", e1)
-		return
-	}
-	defer syscall.CloseHandle(syscall.Handle(snapshot))
-
-	var processEntry processEntry32
-	processEntry.dwSize = uint32(unsafe.Sizeof(processEntry))
-	ok, _, e1 := Process32First.Call(snapshot, uintptr(unsafe.Pointer(&processEntry)))
-	if ok == 0 {
-		err = fmt.Errorf("Process32First: %v", e1)
-		return
-	}
-
-	for {
-		if processEntry.th32ProcessID == uint32(pid) {
-			pe = &processEntry
-			return
-		}
-
-		ok, _, e1 = Process32Next.Call(snapshot, uintptr(unsafe.Pointer(&processEntry)))
-		if ok == 0 {
-			err = fmt.Errorf("Process32Next: %v", e1)
-			return
-		}
-	}
-}
-
-func getppid() (pid int, err error) {
-	pe, err := getProcessEntry(os.Getpid())
-	if err != nil {
-		return
-	}
-
-	pid = int(pe.th32ParentProcessID)
-	return
-}
-
-// StartedByExplorer returns true if the program was invoked by the user double-clicking
-// on the executable from explorer.exe
-//
-// It is conservative and returns false if any of the internal calls fail.
-// It does not guarantee that the program was run from a terminal. It only can tell you
-// whether it was launched from explorer.exe
-func StartedByExplorer() bool {
-	ppid, err := getppid()
-	if err != nil {
-		return false
-	}
-
-	pe, err := getProcessEntry(ppid)
-	if err != nil {
-		return false
-	}
-
-	name := syscall.UTF16ToString(pe.szExeFile[:])
-	return name == "explorer.exe"
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go b/newt/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go
deleted file mode 100644
index 9a28e57..0000000
--- a/newt/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// +build windows
-// +build go1.4
-
-package mousetrap
-
-import (
-	"os"
-	"syscall"
-	"unsafe"
-)
-
-func getProcessEntry(pid int) (*syscall.ProcessEntry32, error) {
-	snapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPPROCESS, 0)
-	if err != nil {
-		return nil, err
-	}
-	defer syscall.CloseHandle(snapshot)
-	var procEntry syscall.ProcessEntry32
-	procEntry.Size = uint32(unsafe.Sizeof(procEntry))
-	if err = syscall.Process32First(snapshot, &procEntry); err != nil {
-		return nil, err
-	}
-	for {
-		if procEntry.ProcessID == uint32(pid) {
-			return &procEntry, nil
-		}
-		err = syscall.Process32Next(snapshot, &procEntry)
-		if err != nil {
-			return nil, err
-		}
-	}
-}
-
-// StartedByExplorer returns true if the program was invoked by the user double-clicking
-// on the executable from explorer.exe
-//
-// It is conservative and returns false if any of the internal calls fail.
-// It does not guarantee that the program was run from a terminal. It only can tell you
-// whether it was launched from explorer.exe
-func StartedByExplorer() bool {
-	pe, err := getProcessEntry(os.Getppid())
-	if err != nil {
-		return false
-	}
-	return "explorer.exe" == syscall.UTF16ToString(pe.ExeFile[:])
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/pretty/.gitignore
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/pretty/.gitignore b/newt/vendor/github.com/kr/pretty/.gitignore
deleted file mode 100644
index 1f0a99f..0000000
--- a/newt/vendor/github.com/kr/pretty/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-[568].out
-_go*
-_test*
-_obj

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/pretty/License
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/pretty/License b/newt/vendor/github.com/kr/pretty/License
deleted file mode 100644
index 05c783c..0000000
--- a/newt/vendor/github.com/kr/pretty/License
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright 2012 Keith Rarick
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/pretty/Readme
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/pretty/Readme b/newt/vendor/github.com/kr/pretty/Readme
deleted file mode 100644
index c589fc6..0000000
--- a/newt/vendor/github.com/kr/pretty/Readme
+++ /dev/null
@@ -1,9 +0,0 @@
-package pretty
-
-    import "github.com/kr/pretty"
-
-    Package pretty provides pretty-printing for Go values.
-
-Documentation
-
-    http://godoc.org/github.com/kr/pretty

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/pretty/diff.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/pretty/diff.go b/newt/vendor/github.com/kr/pretty/diff.go
deleted file mode 100644
index 6aa7f74..0000000
--- a/newt/vendor/github.com/kr/pretty/diff.go
+++ /dev/null
@@ -1,265 +0,0 @@
-package pretty
-
-import (
-	"fmt"
-	"io"
-	"reflect"
-)
-
-type sbuf []string
-
-func (p *sbuf) Printf(format string, a ...interface{}) {
-	s := fmt.Sprintf(format, a...)
-	*p = append(*p, s)
-}
-
-// Diff returns a slice where each element describes
-// a difference between a and b.
-func Diff(a, b interface{}) (desc []string) {
-	Pdiff((*sbuf)(&desc), a, b)
-	return desc
-}
-
-// wprintfer calls Fprintf on w for each Printf call
-// with a trailing newline.
-type wprintfer struct{ w io.Writer }
-
-func (p *wprintfer) Printf(format string, a ...interface{}) {
-	fmt.Fprintf(p.w, format+"\n", a...)
-}
-
-// Fdiff writes to w a description of the differences between a and b.
-func Fdiff(w io.Writer, a, b interface{}) {
-	Pdiff(&wprintfer{w}, a, b)
-}
-
-type Printfer interface {
-	Printf(format string, a ...interface{})
-}
-
-// Pdiff prints to p a description of the differences between a and b.
-// It calls Printf once for each difference, with no trailing newline.
-// The standard library log.Logger is a Printfer.
-func Pdiff(p Printfer, a, b interface{}) {
-	diffPrinter{w: p}.diff(reflect.ValueOf(a), reflect.ValueOf(b))
-}
-
-type Logfer interface {
-	Logf(format string, a ...interface{})
-}
-
-// logprintfer calls Fprintf on w for each Printf call
-// with a trailing newline.
-type logprintfer struct{ l Logfer }
-
-func (p *logprintfer) Printf(format string, a ...interface{}) {
-	p.l.Logf(format, a...)
-}
-
-// Ldiff prints to l a description of the differences between a and b.
-// It calls Logf once for each difference, with no trailing newline.
-// The standard library testing.T and testing.B are Logfers.
-func Ldiff(l Logfer, a, b interface{}) {
-	Pdiff(&logprintfer{l}, a, b)
-}
-
-type diffPrinter struct {
-	w Printfer
-	l string // label
-}
-
-func (w diffPrinter) printf(f string, a ...interface{}) {
-	var l string
-	if w.l != "" {
-		l = w.l + ": "
-	}
-	w.w.Printf(l+f, a...)
-}
-
-func (w diffPrinter) diff(av, bv reflect.Value) {
-	if !av.IsValid() && bv.IsValid() {
-		w.printf("nil != %# v", formatter{v: bv, quote: true})
-		return
-	}
-	if av.IsValid() && !bv.IsValid() {
-		w.printf("%# v != nil", formatter{v: av, quote: true})
-		return
-	}
-	if !av.IsValid() && !bv.IsValid() {
-		return
-	}
-
-	at := av.Type()
-	bt := bv.Type()
-	if at != bt {
-		w.printf("%v != %v", at, bt)
-		return
-	}
-
-	switch kind := at.Kind(); kind {
-	case reflect.Bool:
-		if a, b := av.Bool(), bv.Bool(); a != b {
-			w.printf("%v != %v", a, b)
-		}
-	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
-		if a, b := av.Int(), bv.Int(); a != b {
-			w.printf("%d != %d", a, b)
-		}
-	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
-		if a, b := av.Uint(), bv.Uint(); a != b {
-			w.printf("%d != %d", a, b)
-		}
-	case reflect.Float32, reflect.Float64:
-		if a, b := av.Float(), bv.Float(); a != b {
-			w.printf("%v != %v", a, b)
-		}
-	case reflect.Complex64, reflect.Complex128:
-		if a, b := av.Complex(), bv.Complex(); a != b {
-			w.printf("%v != %v", a, b)
-		}
-	case reflect.Array:
-		n := av.Len()
-		for i := 0; i < n; i++ {
-			w.relabel(fmt.Sprintf("[%d]", i)).diff(av.Index(i), bv.Index(i))
-		}
-	case reflect.Chan, reflect.Func, reflect.UnsafePointer:
-		if a, b := av.Pointer(), bv.Pointer(); a != b {
-			w.printf("%#x != %#x", a, b)
-		}
-	case reflect.Interface:
-		w.diff(av.Elem(), bv.Elem())
-	case reflect.Map:
-		ak, both, bk := keyDiff(av.MapKeys(), bv.MapKeys())
-		for _, k := range ak {
-			w := w.relabel(fmt.Sprintf("[%#v]", k))
-			w.printf("%q != (missing)", av.MapIndex(k))
-		}
-		for _, k := range both {
-			w := w.relabel(fmt.Sprintf("[%#v]", k))
-			w.diff(av.MapIndex(k), bv.MapIndex(k))
-		}
-		for _, k := range bk {
-			w := w.relabel(fmt.Sprintf("[%#v]", k))
-			w.printf("(missing) != %q", bv.MapIndex(k))
-		}
-	case reflect.Ptr:
-		switch {
-		case av.IsNil() && !bv.IsNil():
-			w.printf("nil != %# v", formatter{v: bv, quote: true})
-		case !av.IsNil() && bv.IsNil():
-			w.printf("%# v != nil", formatter{v: av, quote: true})
-		case !av.IsNil() && !bv.IsNil():
-			w.diff(av.Elem(), bv.Elem())
-		}
-	case reflect.Slice:
-		lenA := av.Len()
-		lenB := bv.Len()
-		if lenA != lenB {
-			w.printf("%s[%d] != %s[%d]", av.Type(), lenA, bv.Type(), lenB)
-			break
-		}
-		for i := 0; i < lenA; i++ {
-			w.relabel(fmt.Sprintf("[%d]", i)).diff(av.Index(i), bv.Index(i))
-		}
-	case reflect.String:
-		if a, b := av.String(), bv.String(); a != b {
-			w.printf("%q != %q", a, b)
-		}
-	case reflect.Struct:
-		for i := 0; i < av.NumField(); i++ {
-			w.relabel(at.Field(i).Name).diff(av.Field(i), bv.Field(i))
-		}
-	default:
-		panic("unknown reflect Kind: " + kind.String())
-	}
-}
-
-func (d diffPrinter) relabel(name string) (d1 diffPrinter) {
-	d1 = d
-	if d.l != "" && name[0] != '[' {
-		d1.l += "."
-	}
-	d1.l += name
-	return d1
-}
-
-// keyEqual compares a and b for equality.
-// Both a and b must be valid map keys.
-func keyEqual(av, bv reflect.Value) bool {
-	if !av.IsValid() && !bv.IsValid() {
-		return true
-	}
-	if !av.IsValid() || !bv.IsValid() || av.Type() != bv.Type() {
-		return false
-	}
-	switch kind := av.Kind(); kind {
-	case reflect.Bool:
-		a, b := av.Bool(), bv.Bool()
-		return a == b
-	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
-		a, b := av.Int(), bv.Int()
-		return a == b
-	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
-		a, b := av.Uint(), bv.Uint()
-		return a == b
-	case reflect.Float32, reflect.Float64:
-		a, b := av.Float(), bv.Float()
-		return a == b
-	case reflect.Complex64, reflect.Complex128:
-		a, b := av.Complex(), bv.Complex()
-		return a == b
-	case reflect.Array:
-		for i := 0; i < av.Len(); i++ {
-			if !keyEqual(av.Index(i), bv.Index(i)) {
-				return false
-			}
-		}
-		return true
-	case reflect.Chan, reflect.UnsafePointer, reflect.Ptr:
-		a, b := av.Pointer(), bv.Pointer()
-		return a == b
-	case reflect.Interface:
-		return keyEqual(av.Elem(), bv.Elem())
-	case reflect.String:
-		a, b := av.String(), bv.String()
-		return a == b
-	case reflect.Struct:
-		for i := 0; i < av.NumField(); i++ {
-			if !keyEqual(av.Field(i), bv.Field(i)) {
-				return false
-			}
-		}
-		return true
-	default:
-		panic("invalid map key type " + av.Type().String())
-	}
-}
-
-func keyDiff(a, b []reflect.Value) (ak, both, bk []reflect.Value) {
-	for _, av := range a {
-		inBoth := false
-		for _, bv := range b {
-			if keyEqual(av, bv) {
-				inBoth = true
-				both = append(both, av)
-				break
-			}
-		}
-		if !inBoth {
-			ak = append(ak, av)
-		}
-	}
-	for _, bv := range b {
-		inBoth := false
-		for _, av := range a {
-			if keyEqual(av, bv) {
-				inBoth = true
-				break
-			}
-		}
-		if !inBoth {
-			bk = append(bk, bv)
-		}
-	}
-	return
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/pretty/formatter.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/pretty/formatter.go b/newt/vendor/github.com/kr/pretty/formatter.go
deleted file mode 100644
index a317d7b..0000000
--- a/newt/vendor/github.com/kr/pretty/formatter.go
+++ /dev/null
@@ -1,328 +0,0 @@
-package pretty
-
-import (
-	"fmt"
-	"io"
-	"reflect"
-	"strconv"
-	"text/tabwriter"
-
-	"github.com/kr/text"
-)
-
-type formatter struct {
-	v     reflect.Value
-	force bool
-	quote bool
-}
-
-// Formatter makes a wrapper, f, that will format x as go source with line
-// breaks and tabs. Object f responds to the "%v" formatting verb when both the
-// "#" and " " (space) flags are set, for example:
-//
-//     fmt.Sprintf("%# v", Formatter(x))
-//
-// If one of these two flags is not set, or any other verb is used, f will
-// format x according to the usual rules of package fmt.
-// In particular, if x satisfies fmt.Formatter, then x.Format will be called.
-func Formatter(x interface{}) (f fmt.Formatter) {
-	return formatter{v: reflect.ValueOf(x), quote: true}
-}
-
-func (fo formatter) String() string {
-	return fmt.Sprint(fo.v.Interface()) // unwrap it
-}
-
-func (fo formatter) passThrough(f fmt.State, c rune) {
-	s := "%"
-	for i := 0; i < 128; i++ {
-		if f.Flag(i) {
-			s += string(i)
-		}
-	}
-	if w, ok := f.Width(); ok {
-		s += fmt.Sprintf("%d", w)
-	}
-	if p, ok := f.Precision(); ok {
-		s += fmt.Sprintf(".%d", p)
-	}
-	s += string(c)
-	fmt.Fprintf(f, s, fo.v.Interface())
-}
-
-func (fo formatter) Format(f fmt.State, c rune) {
-	if fo.force || c == 'v' && f.Flag('#') && f.Flag(' ') {
-		w := tabwriter.NewWriter(f, 4, 4, 1, ' ', 0)
-		p := &printer{tw: w, Writer: w, visited: make(map[visit]int)}
-		p.printValue(fo.v, true, fo.quote)
-		w.Flush()
-		return
-	}
-	fo.passThrough(f, c)
-}
-
-type printer struct {
-	io.Writer
-	tw      *tabwriter.Writer
-	visited map[visit]int
-	depth   int
-}
-
-func (p *printer) indent() *printer {
-	q := *p
-	q.tw = tabwriter.NewWriter(p.Writer, 4, 4, 1, ' ', 0)
-	q.Writer = text.NewIndentWriter(q.tw, []byte{'\t'})
-	return &q
-}
-
-func (p *printer) printInline(v reflect.Value, x interface{}, showType bool) {
-	if showType {
-		io.WriteString(p, v.Type().String())
-		fmt.Fprintf(p, "(%#v)", x)
-	} else {
-		fmt.Fprintf(p, "%#v", x)
-	}
-}
-
-// printValue must keep track of already-printed pointer values to avoid
-// infinite recursion.
-type visit struct {
-	v   uintptr
-	typ reflect.Type
-}
-
-func (p *printer) printValue(v reflect.Value, showType, quote bool) {
-	if p.depth > 10 {
-		io.WriteString(p, "!%v(DEPTH EXCEEDED)")
-		return
-	}
-
-	switch v.Kind() {
-	case reflect.Bool:
-		p.printInline(v, v.Bool(), showType)
-	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
-		p.printInline(v, v.Int(), showType)
-	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
-		p.printInline(v, v.Uint(), showType)
-	case reflect.Float32, reflect.Float64:
-		p.printInline(v, v.Float(), showType)
-	case reflect.Complex64, reflect.Complex128:
-		fmt.Fprintf(p, "%#v", v.Complex())
-	case reflect.String:
-		p.fmtString(v.String(), quote)
-	case reflect.Map:
-		t := v.Type()
-		if showType {
-			io.WriteString(p, t.String())
-		}
-		writeByte(p, '{')
-		if nonzero(v) {
-			expand := !canInline(v.Type())
-			pp := p
-			if expand {
-				writeByte(p, '\n')
-				pp = p.indent()
-			}
-			keys := v.MapKeys()
-			for i := 0; i < v.Len(); i++ {
-				showTypeInStruct := true
-				k := keys[i]
-				mv := v.MapIndex(k)
-				pp.printValue(k, false, true)
-				writeByte(pp, ':')
-				if expand {
-					writeByte(pp, '\t')
-				}
-				showTypeInStruct = t.Elem().Kind() == reflect.Interface
-				pp.printValue(mv, showTypeInStruct, true)
-				if expand {
-					io.WriteString(pp, ",\n")
-				} else if i < v.Len()-1 {
-					io.WriteString(pp, ", ")
-				}
-			}
-			if expand {
-				pp.tw.Flush()
-			}
-		}
-		writeByte(p, '}')
-	case reflect.Struct:
-		t := v.Type()
-		if v.CanAddr() {
-			addr := v.UnsafeAddr()
-			vis := visit{addr, t}
-			if vd, ok := p.visited[vis]; ok && vd < p.depth {
-				p.fmtString(t.String()+"{(CYCLIC REFERENCE)}", false)
-				break // don't print v again
-			}
-			p.visited[vis] = p.depth
-		}
-
-		if showType {
-			io.WriteString(p, t.String())
-		}
-		writeByte(p, '{')
-		if nonzero(v) {
-			expand := !canInline(v.Type())
-			pp := p
-			if expand {
-				writeByte(p, '\n')
-				pp = p.indent()
-			}
-			for i := 0; i < v.NumField(); i++ {
-				showTypeInStruct := true
-				if f := t.Field(i); f.Name != "" {
-					io.WriteString(pp, f.Name)
-					writeByte(pp, ':')
-					if expand {
-						writeByte(pp, '\t')
-					}
-					showTypeInStruct = labelType(f.Type)
-				}
-				pp.printValue(getField(v, i), showTypeInStruct, true)
-				if expand {
-					io.WriteString(pp, ",\n")
-				} else if i < v.NumField()-1 {
-					io.WriteString(pp, ", ")
-				}
-			}
-			if expand {
-				pp.tw.Flush()
-			}
-		}
-		writeByte(p, '}')
-	case reflect.Interface:
-		switch e := v.Elem(); {
-		case e.Kind() == reflect.Invalid:
-			io.WriteString(p, "nil")
-		case e.IsValid():
-			pp := *p
-			pp.depth++
-			pp.printValue(e, showType, true)
-		default:
-			io.WriteString(p, v.Type().String())
-			io.WriteString(p, "(nil)")
-		}
-	case reflect.Array, reflect.Slice:
-		t := v.Type()
-		if showType {
-			io.WriteString(p, t.String())
-		}
-		if v.Kind() == reflect.Slice && v.IsNil() && showType {
-			io.WriteString(p, "(nil)")
-			break
-		}
-		if v.Kind() == reflect.Slice && v.IsNil() {
-			io.WriteString(p, "nil")
-			break
-		}
-		writeByte(p, '{')
-		expand := !canInline(v.Type())
-		pp := p
-		if expand {
-			writeByte(p, '\n')
-			pp = p.indent()
-		}
-		for i := 0; i < v.Len(); i++ {
-			showTypeInSlice := t.Elem().Kind() == reflect.Interface
-			pp.printValue(v.Index(i), showTypeInSlice, true)
-			if expand {
-				io.WriteString(pp, ",\n")
-			} else if i < v.Len()-1 {
-				io.WriteString(pp, ", ")
-			}
-		}
-		if expand {
-			pp.tw.Flush()
-		}
-		writeByte(p, '}')
-	case reflect.Ptr:
-		e := v.Elem()
-		if !e.IsValid() {
-			writeByte(p, '(')
-			io.WriteString(p, v.Type().String())
-			io.WriteString(p, ")(nil)")
-		} else {
-			pp := *p
-			pp.depth++
-			writeByte(pp, '&')
-			pp.printValue(e, true, true)
-		}
-	case reflect.Chan:
-		x := v.Pointer()
-		if showType {
-			writeByte(p, '(')
-			io.WriteString(p, v.Type().String())
-			fmt.Fprintf(p, ")(%#v)", x)
-		} else {
-			fmt.Fprintf(p, "%#v", x)
-		}
-	case reflect.Func:
-		io.WriteString(p, v.Type().String())
-		io.WriteString(p, " {...}")
-	case reflect.UnsafePointer:
-		p.printInline(v, v.Pointer(), showType)
-	case reflect.Invalid:
-		io.WriteString(p, "nil")
-	}
-}
-
-func canInline(t reflect.Type) bool {
-	switch t.Kind() {
-	case reflect.Map:
-		return !canExpand(t.Elem())
-	case reflect.Struct:
-		for i := 0; i < t.NumField(); i++ {
-			if canExpand(t.Field(i).Type) {
-				return false
-			}
-		}
-		return true
-	case reflect.Interface:
-		return false
-	case reflect.Array, reflect.Slice:
-		return !canExpand(t.Elem())
-	case reflect.Ptr:
-		return false
-	case reflect.Chan, reflect.Func, reflect.UnsafePointer:
-		return false
-	}
-	return true
-}
-
-func canExpand(t reflect.Type) bool {
-	switch t.Kind() {
-	case reflect.Map, reflect.Struct,
-		reflect.Interface, reflect.Array, reflect.Slice,
-		reflect.Ptr:
-		return true
-	}
-	return false
-}
-
-func labelType(t reflect.Type) bool {
-	switch t.Kind() {
-	case reflect.Interface, reflect.Struct:
-		return true
-	}
-	return false
-}
-
-func (p *printer) fmtString(s string, quote bool) {
-	if quote {
-		s = strconv.Quote(s)
-	}
-	io.WriteString(p, s)
-}
-
-func writeByte(w io.Writer, b byte) {
-	w.Write([]byte{b})
-}
-
-func getField(v reflect.Value, i int) reflect.Value {
-	val := v.Field(i)
-	if val.Kind() == reflect.Interface && !val.IsNil() {
-		val = val.Elem()
-	}
-	return val
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/pretty/pretty.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/pretty/pretty.go b/newt/vendor/github.com/kr/pretty/pretty.go
deleted file mode 100644
index 49423ec..0000000
--- a/newt/vendor/github.com/kr/pretty/pretty.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Package pretty provides pretty-printing for Go values. This is
-// useful during debugging, to avoid wrapping long output lines in
-// the terminal.
-//
-// It provides a function, Formatter, that can be used with any
-// function that accepts a format string. It also provides
-// convenience wrappers for functions in packages fmt and log.
-package pretty
-
-import (
-	"fmt"
-	"io"
-	"log"
-	"reflect"
-)
-
-// Errorf is a convenience wrapper for fmt.Errorf.
-//
-// Calling Errorf(f, x, y) is equivalent to
-// fmt.Errorf(f, Formatter(x), Formatter(y)).
-func Errorf(format string, a ...interface{}) error {
-	return fmt.Errorf(format, wrap(a, false)...)
-}
-
-// Fprintf is a convenience wrapper for fmt.Fprintf.
-//
-// Calling Fprintf(w, f, x, y) is equivalent to
-// fmt.Fprintf(w, f, Formatter(x), Formatter(y)).
-func Fprintf(w io.Writer, format string, a ...interface{}) (n int, error error) {
-	return fmt.Fprintf(w, format, wrap(a, false)...)
-}
-
-// Log is a convenience wrapper for log.Printf.
-//
-// Calling Log(x, y) is equivalent to
-// log.Print(Formatter(x), Formatter(y)), but each operand is
-// formatted with "%# v".
-func Log(a ...interface{}) {
-	log.Print(wrap(a, true)...)
-}
-
-// Logf is a convenience wrapper for log.Printf.
-//
-// Calling Logf(f, x, y) is equivalent to
-// log.Printf(f, Formatter(x), Formatter(y)).
-func Logf(format string, a ...interface{}) {
-	log.Printf(format, wrap(a, false)...)
-}
-
-// Logln is a convenience wrapper for log.Printf.
-//
-// Calling Logln(x, y) is equivalent to
-// log.Println(Formatter(x), Formatter(y)), but each operand is
-// formatted with "%# v".
-func Logln(a ...interface{}) {
-	log.Println(wrap(a, true)...)
-}
-
-// Print pretty-prints its operands and writes to standard output.
-//
-// Calling Print(x, y) is equivalent to
-// fmt.Print(Formatter(x), Formatter(y)), but each operand is
-// formatted with "%# v".
-func Print(a ...interface{}) (n int, errno error) {
-	return fmt.Print(wrap(a, true)...)
-}
-
-// Printf is a convenience wrapper for fmt.Printf.
-//
-// Calling Printf(f, x, y) is equivalent to
-// fmt.Printf(f, Formatter(x), Formatter(y)).
-func Printf(format string, a ...interface{}) (n int, errno error) {
-	return fmt.Printf(format, wrap(a, false)...)
-}
-
-// Println pretty-prints its operands and writes to standard output.
-//
-// Calling Print(x, y) is equivalent to
-// fmt.Println(Formatter(x), Formatter(y)), but each operand is
-// formatted with "%# v".
-func Println(a ...interface{}) (n int, errno error) {
-	return fmt.Println(wrap(a, true)...)
-}
-
-// Sprint is a convenience wrapper for fmt.Sprintf.
-//
-// Calling Sprint(x, y) is equivalent to
-// fmt.Sprint(Formatter(x), Formatter(y)), but each operand is
-// formatted with "%# v".
-func Sprint(a ...interface{}) string {
-	return fmt.Sprint(wrap(a, true)...)
-}
-
-// Sprintf is a convenience wrapper for fmt.Sprintf.
-//
-// Calling Sprintf(f, x, y) is equivalent to
-// fmt.Sprintf(f, Formatter(x), Formatter(y)).
-func Sprintf(format string, a ...interface{}) string {
-	return fmt.Sprintf(format, wrap(a, false)...)
-}
-
-func wrap(a []interface{}, force bool) []interface{} {
-	w := make([]interface{}, len(a))
-	for i, x := range a {
-		w[i] = formatter{v: reflect.ValueOf(x), force: force}
-	}
-	return w
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/pretty/zero.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/pretty/zero.go b/newt/vendor/github.com/kr/pretty/zero.go
deleted file mode 100644
index abb5b6f..0000000
--- a/newt/vendor/github.com/kr/pretty/zero.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package pretty
-
-import (
-	"reflect"
-)
-
-func nonzero(v reflect.Value) bool {
-	switch v.Kind() {
-	case reflect.Bool:
-		return v.Bool()
-	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
-		return v.Int() != 0
-	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
-		return v.Uint() != 0
-	case reflect.Float32, reflect.Float64:
-		return v.Float() != 0
-	case reflect.Complex64, reflect.Complex128:
-		return v.Complex() != complex(0, 0)
-	case reflect.String:
-		return v.String() != ""
-	case reflect.Struct:
-		for i := 0; i < v.NumField(); i++ {
-			if nonzero(getField(v, i)) {
-				return true
-			}
-		}
-		return false
-	case reflect.Array:
-		for i := 0; i < v.Len(); i++ {
-			if nonzero(v.Index(i)) {
-				return true
-			}
-		}
-		return false
-	case reflect.Map, reflect.Interface, reflect.Slice, reflect.Ptr, reflect.Chan, reflect.Func:
-		return !v.IsNil()
-	case reflect.UnsafePointer:
-		return v.Pointer() != 0
-	}
-	return true
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/text/License
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/text/License b/newt/vendor/github.com/kr/text/License
deleted file mode 100644
index 480a328..0000000
--- a/newt/vendor/github.com/kr/text/License
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright 2012 Keith Rarick
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/text/Readme
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/text/Readme b/newt/vendor/github.com/kr/text/Readme
deleted file mode 100644
index 7e6e7c0..0000000
--- a/newt/vendor/github.com/kr/text/Readme
+++ /dev/null
@@ -1,3 +0,0 @@
-This is a Go package for manipulating paragraphs of text.
-
-See http://go.pkgdoc.org/github.com/kr/text for full documentation.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/text/doc.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/text/doc.go b/newt/vendor/github.com/kr/text/doc.go
deleted file mode 100644
index cf4c198..0000000
--- a/newt/vendor/github.com/kr/text/doc.go
+++ /dev/null
@@ -1,3 +0,0 @@
-// Package text provides rudimentary functions for manipulating text in
-// paragraphs.
-package text

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/text/indent.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/text/indent.go b/newt/vendor/github.com/kr/text/indent.go
deleted file mode 100644
index 4ebac45..0000000
--- a/newt/vendor/github.com/kr/text/indent.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package text
-
-import (
-	"io"
-)
-
-// Indent inserts prefix at the beginning of each non-empty line of s. The
-// end-of-line marker is NL.
-func Indent(s, prefix string) string {
-	return string(IndentBytes([]byte(s), []byte(prefix)))
-}
-
-// IndentBytes inserts prefix at the beginning of each non-empty line of b.
-// The end-of-line marker is NL.
-func IndentBytes(b, prefix []byte) []byte {
-	var res []byte
-	bol := true
-	for _, c := range b {
-		if bol && c != '\n' {
-			res = append(res, prefix...)
-		}
-		res = append(res, c)
-		bol = c == '\n'
-	}
-	return res
-}
-
-// Writer indents each line of its input.
-type indentWriter struct {
-	w   io.Writer
-	bol bool
-	pre [][]byte
-	sel int
-	off int
-}
-
-// NewIndentWriter makes a new write filter that indents the input
-// lines. Each line is prefixed in order with the corresponding
-// element of pre. If there are more lines than elements, the last
-// element of pre is repeated for each subsequent line.
-func NewIndentWriter(w io.Writer, pre ...[]byte) io.Writer {
-	return &indentWriter{
-		w:   w,
-		pre: pre,
-		bol: true,
-	}
-}
-
-// The only errors returned are from the underlying indentWriter.
-func (w *indentWriter) Write(p []byte) (n int, err error) {
-	for _, c := range p {
-		if w.bol {
-			var i int
-			i, err = w.w.Write(w.pre[w.sel][w.off:])
-			w.off += i
-			if err != nil {
-				return n, err
-			}
-		}
-		_, err = w.w.Write([]byte{c})
-		if err != nil {
-			return n, err
-		}
-		n++
-		w.bol = c == '\n'
-		if w.bol {
-			w.off = 0
-			if w.sel < len(w.pre)-1 {
-				w.sel++
-			}
-		}
-	}
-	return n, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/kr/text/wrap.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/kr/text/wrap.go b/newt/vendor/github.com/kr/text/wrap.go
deleted file mode 100644
index b09bb03..0000000
--- a/newt/vendor/github.com/kr/text/wrap.go
+++ /dev/null
@@ -1,86 +0,0 @@
-package text
-
-import (
-	"bytes"
-	"math"
-)
-
-var (
-	nl = []byte{'\n'}
-	sp = []byte{' '}
-)
-
-const defaultPenalty = 1e5
-
-// Wrap wraps s into a paragraph of lines of length lim, with minimal
-// raggedness.
-func Wrap(s string, lim int) string {
-	return string(WrapBytes([]byte(s), lim))
-}
-
-// WrapBytes wraps b into a paragraph of lines of length lim, with minimal
-// raggedness.
-func WrapBytes(b []byte, lim int) []byte {
-	words := bytes.Split(bytes.Replace(bytes.TrimSpace(b), nl, sp, -1), sp)
-	var lines [][]byte
-	for _, line := range WrapWords(words, 1, lim, defaultPenalty) {
-		lines = append(lines, bytes.Join(line, sp))
-	}
-	return bytes.Join(lines, nl)
-}
-
-// WrapWords is the low-level line-breaking algorithm, useful if you need more
-// control over the details of the text wrapping process. For most uses, either
-// Wrap or WrapBytes will be sufficient and more convenient.
-//
-// WrapWords splits a list of words into lines with minimal "raggedness",
-// treating each byte as one unit, accounting for spc units between adjacent
-// words on each line, and attempting to limit lines to lim units. Raggedness
-// is the total error over all lines, where error is the square of the
-// difference of the length of the line and lim. Too-long lines (which only
-// happen when a single word is longer than lim units) have pen penalty units
-// added to the error.
-func WrapWords(words [][]byte, spc, lim, pen int) [][][]byte {
-	n := len(words)
-
-	length := make([][]int, n)
-	for i := 0; i < n; i++ {
-		length[i] = make([]int, n)
-		length[i][i] = len(words[i])
-		for j := i + 1; j < n; j++ {
-			length[i][j] = length[i][j-1] + spc + len(words[j])
-		}
-	}
-
-	nbrk := make([]int, n)
-	cost := make([]int, n)
-	for i := range cost {
-		cost[i] = math.MaxInt32
-	}
-	for i := n - 1; i >= 0; i-- {
-		if length[i][n-1] <= lim || i == n-1 {
-			cost[i] = 0
-			nbrk[i] = n
-		} else {
-			for j := i + 1; j < n; j++ {
-				d := lim - length[i][j-1]
-				c := d*d + cost[j]
-				if length[i][j-1] > lim {
-					c += pen // too-long lines get a worse penalty
-				}
-				if c < cost[i] {
-					cost[i] = c
-					nbrk[i] = j
-				}
-			}
-		}
-	}
-
-	var lines [][][]byte
-	i := 0
-	for i < n {
-		lines = append(lines, words[i:nbrk[i]])
-		i = nbrk[i]
-	}
-	return lines
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/mitchellh/mapstructure/.travis.yml
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/mitchellh/mapstructure/.travis.yml b/newt/vendor/github.com/mitchellh/mapstructure/.travis.yml
deleted file mode 100644
index 7f3fe9a..0000000
--- a/newt/vendor/github.com/mitchellh/mapstructure/.travis.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-language: go 
-
-go: 
-  - 1.4
-  
-script:
-  - go test 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/mitchellh/mapstructure/LICENSE
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/mitchellh/mapstructure/LICENSE b/newt/vendor/github.com/mitchellh/mapstructure/LICENSE
deleted file mode 100644
index f9c841a..0000000
--- a/newt/vendor/github.com/mitchellh/mapstructure/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Mitchell Hashimoto
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/mitchellh/mapstructure/README.md
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/mitchellh/mapstructure/README.md b/newt/vendor/github.com/mitchellh/mapstructure/README.md
deleted file mode 100644
index 659d688..0000000
--- a/newt/vendor/github.com/mitchellh/mapstructure/README.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# mapstructure
-
-mapstructure is a Go library for decoding generic map values to structures
-and vice versa, while providing helpful error handling.
-
-This library is most useful when decoding values from some data stream (JSON,
-Gob, etc.) where you don't _quite_ know the structure of the underlying data
-until you read a part of it. You can therefore read a `map[string]interface{}`
-and use this library to decode it into the proper underlying native Go
-structure.
-
-## Installation
-
-Standard `go get`:
-
-```
-$ go get github.com/mitchellh/mapstructure
-```
-
-## Usage & Example
-
-For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/mapstructure).
-
-The `Decode` function has examples associated with it there.
-
-## But Why?!
-
-Go offers fantastic standard libraries for decoding formats such as JSON.
-The standard method is to have a struct pre-created, and populate that struct
-from the bytes of the encoded format. This is great, but the problem is if
-you have configuration or an encoding that changes slightly depending on
-specific fields. For example, consider this JSON:
-
-```json
-{
-  "type": "person",
-  "name": "Mitchell"
-}
-```
-
-Perhaps we can't populate a specific structure without first reading
-the "type" field from the JSON. We could always do two passes over the
-decoding of the JSON (reading the "type" first, and the rest later).
-However, it is much simpler to just decode this into a `map[string]interface{}`
-structure, read the "type" key, then use something like this library
-to decode it into the proper structure.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/mitchellh/mapstructure/decode_hooks.go b/newt/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
deleted file mode 100644
index 115ae67..0000000
--- a/newt/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
+++ /dev/null
@@ -1,154 +0,0 @@
-package mapstructure
-
-import (
-	"errors"
-	"reflect"
-	"strconv"
-	"strings"
-	"time"
-)
-
-// typedDecodeHook takes a raw DecodeHookFunc (an interface{}) and turns
-// it into the proper DecodeHookFunc type, such as DecodeHookFuncType.
-func typedDecodeHook(h DecodeHookFunc) DecodeHookFunc {
-	// Create variables here so we can reference them with the reflect pkg
-	var f1 DecodeHookFuncType
-	var f2 DecodeHookFuncKind
-
-	// Fill in the variables into this interface and the rest is done
-	// automatically using the reflect package.
-	potential := []interface{}{f1, f2}
-
-	v := reflect.ValueOf(h)
-	vt := v.Type()
-	for _, raw := range potential {
-		pt := reflect.ValueOf(raw).Type()
-		if vt.ConvertibleTo(pt) {
-			return v.Convert(pt).Interface()
-		}
-	}
-
-	return nil
-}
-
-// DecodeHookExec executes the given decode hook. This should be used
-// since it'll naturally degrade to the older backwards compatible DecodeHookFunc
-// that took reflect.Kind instead of reflect.Type.
-func DecodeHookExec(
-	raw DecodeHookFunc,
-	from reflect.Type, to reflect.Type,
-	data interface{}) (interface{}, error) {
-	// Build our arguments that reflect expects
-	argVals := make([]reflect.Value, 3)
-	argVals[0] = reflect.ValueOf(from)
-	argVals[1] = reflect.ValueOf(to)
-	argVals[2] = reflect.ValueOf(data)
-
-	switch f := typedDecodeHook(raw).(type) {
-	case DecodeHookFuncType:
-		return f(from, to, data)
-	case DecodeHookFuncKind:
-		return f(from.Kind(), to.Kind(), data)
-	default:
-		return nil, errors.New("invalid decode hook signature")
-	}
-}
-
-// ComposeDecodeHookFunc creates a single DecodeHookFunc that
-// automatically composes multiple DecodeHookFuncs.
-//
-// The composed funcs are called in order, with the result of the
-// previous transformation.
-func ComposeDecodeHookFunc(fs ...DecodeHookFunc) DecodeHookFunc {
-	return func(
-		f reflect.Type,
-		t reflect.Type,
-		data interface{}) (interface{}, error) {
-		var err error
-		for _, f1 := range fs {
-			data, err = DecodeHookExec(f1, f, t, data)
-			if err != nil {
-				return nil, err
-			}
-
-			// Modify the from kind to be correct with the new data
-			f = nil
-			if val := reflect.ValueOf(data); val.IsValid() {
-				f = val.Type()
-			}
-		}
-
-		return data, nil
-	}
-}
-
-// StringToSliceHookFunc returns a DecodeHookFunc that converts
-// string to []string by splitting on the given sep.
-func StringToSliceHookFunc(sep string) DecodeHookFunc {
-	return func(
-		f reflect.Kind,
-		t reflect.Kind,
-		data interface{}) (interface{}, error) {
-		if f != reflect.String || t != reflect.Slice {
-			return data, nil
-		}
-
-		raw := data.(string)
-		if raw == "" {
-			return []string{}, nil
-		}
-
-		return strings.Split(raw, sep), nil
-	}
-}
-
-// StringToTimeDurationHookFunc returns a DecodeHookFunc that converts
-// strings to time.Duration.
-func StringToTimeDurationHookFunc() DecodeHookFunc {
-	return func(
-		f reflect.Type,
-		t reflect.Type,
-		data interface{}) (interface{}, error) {
-		if f.Kind() != reflect.String {
-			return data, nil
-		}
-		if t != reflect.TypeOf(time.Duration(5)) {
-			return data, nil
-		}
-
-		// Convert it by parsing
-		return time.ParseDuration(data.(string))
-	}
-}
-
-func WeaklyTypedHook(
-	f reflect.Kind,
-	t reflect.Kind,
-	data interface{}) (interface{}, error) {
-	dataVal := reflect.ValueOf(data)
-	switch t {
-	case reflect.String:
-		switch f {
-		case reflect.Bool:
-			if dataVal.Bool() {
-				return "1", nil
-			} else {
-				return "0", nil
-			}
-		case reflect.Float32:
-			return strconv.FormatFloat(dataVal.Float(), 'f', -1, 64), nil
-		case reflect.Int:
-			return strconv.FormatInt(dataVal.Int(), 10), nil
-		case reflect.Slice:
-			dataType := dataVal.Type()
-			elemKind := dataType.Elem().Kind()
-			if elemKind == reflect.Uint8 {
-				return string(dataVal.Interface().([]uint8)), nil
-			}
-		case reflect.Uint:
-			return strconv.FormatUint(dataVal.Uint(), 10), nil
-		}
-	}
-
-	return data, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/mitchellh/mapstructure/error.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/mitchellh/mapstructure/error.go b/newt/vendor/github.com/mitchellh/mapstructure/error.go
deleted file mode 100644
index 47a99e5..0000000
--- a/newt/vendor/github.com/mitchellh/mapstructure/error.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package mapstructure
-
-import (
-	"errors"
-	"fmt"
-	"sort"
-	"strings"
-)
-
-// Error implements the error interface and can represents multiple
-// errors that occur in the course of a single decode.
-type Error struct {
-	Errors []string
-}
-
-func (e *Error) Error() string {
-	points := make([]string, len(e.Errors))
-	for i, err := range e.Errors {
-		points[i] = fmt.Sprintf("* %s", err)
-	}
-
-	sort.Strings(points)
-	return fmt.Sprintf(
-		"%d error(s) decoding:\n\n%s",
-		len(e.Errors), strings.Join(points, "\n"))
-}
-
-// WrappedErrors implements the errwrap.Wrapper interface to make this
-// return value more useful with the errwrap and go-multierror libraries.
-func (e *Error) WrappedErrors() []error {
-	if e == nil {
-		return nil
-	}
-
-	result := make([]error, len(e.Errors))
-	for i, e := range e.Errors {
-		result[i] = errors.New(e)
-	}
-
-	return result
-}
-
-func appendErrors(errors []string, err error) []string {
-	switch e := err.(type) {
-	case *Error:
-		return append(errors, e.Errors...)
-	default:
-		return append(errors, e.Error())
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/mitchellh/mapstructure/mapstructure.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/newt/vendor/github.com/mitchellh/mapstructure/mapstructure.go
deleted file mode 100644
index b0ab89b..0000000
--- a/newt/vendor/github.com/mitchellh/mapstructure/mapstructure.go
+++ /dev/null
@@ -1,782 +0,0 @@
-// The mapstructure package exposes functionality to convert an
-// abitrary map[string]interface{} into a native Go structure.
-//
-// The Go structure can be arbitrarily complex, containing slices,
-// other structs, etc. and the decoder will properly decode nested
-// maps and so on into the proper structures in the native Go struct.
-// See the examples to see what the decoder is capable of.
-package mapstructure
-
-import (
-	"encoding/json"
-	"errors"
-	"fmt"
-	"reflect"
-	"sort"
-	"strconv"
-	"strings"
-)
-
-// DecodeHookFunc is the callback function that can be used for
-// data transformations. See "DecodeHook" in the DecoderConfig
-// struct.
-//
-// The type should be DecodeHookFuncType or DecodeHookFuncKind.
-// Either is accepted. Types are a superset of Kinds (Types can return
-// Kinds) and are generally a richer thing to use, but Kinds are simpler
-// if you only need those.
-//
-// The reason DecodeHookFunc is multi-typed is for backwards compatibility:
-// we started with Kinds and then realized Types were the better solution,
-// but have a promise to not break backwards compat so we now support
-// both.
-type DecodeHookFunc interface{}
-
-type DecodeHookFuncType func(reflect.Type, reflect.Type, interface{}) (interface{}, error)
-type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error)
-
-// DecoderConfig is the configuration that is used to create a new decoder
-// and allows customization of various aspects of decoding.
-type DecoderConfig struct {
-	// DecodeHook, if set, will be called before any decoding and any
-	// type conversion (if WeaklyTypedInput is on). This lets you modify
-	// the values before they're set down onto the resulting struct.
-	//
-	// If an error is returned, the entire decode will fail with that
-	// error.
-	DecodeHook DecodeHookFunc
-
-	// If ErrorUnused is true, then it is an error for there to exist
-	// keys in the original map that were unused in the decoding process
-	// (extra keys).
-	ErrorUnused bool
-
-	// ZeroFields, if set to true, will zero fields before writing them.
-	// For example, a map will be emptied before decoded values are put in
-	// it. If this is false, a map will be merged.
-	ZeroFields bool
-
-	// If WeaklyTypedInput is true, the decoder will make the following
-	// "weak" conversions:
-	//
-	//   - bools to string (true = "1", false = "0")
-	//   - numbers to string (base 10)
-	//   - bools to int/uint (true = 1, false = 0)
-	//   - strings to int/uint (base implied by prefix)
-	//   - int to bool (true if value != 0)
-	//   - string to bool (accepts: 1, t, T, TRUE, true, True, 0, f, F,
-	//     FALSE, false, False. Anything else is an error)
-	//   - empty array = empty map and vice versa
-	//   - negative numbers to overflowed uint values (base 10)
-	//   - slice of maps to a merged map
-	//
-	WeaklyTypedInput bool
-
-	// Metadata is the struct that will contain extra metadata about
-	// the decoding. If this is nil, then no metadata will be tracked.
-	Metadata *Metadata
-
-	// Result is a pointer to the struct that will contain the decoded
-	// value.
-	Result interface{}
-
-	// The tag name that mapstructure reads for field names. This
-	// defaults to "mapstructure"
-	TagName string
-}
-
-// A Decoder takes a raw interface value and turns it into structured
-// data, keeping track of rich error information along the way in case
-// anything goes wrong. Unlike the basic top-level Decode method, you can
-// more finely control how the Decoder behaves using the DecoderConfig
-// structure. The top-level Decode method is just a convenience that sets
-// up the most basic Decoder.
-type Decoder struct {
-	config *DecoderConfig
-}
-
-// Metadata contains information about decoding a structure that
-// is tedious or difficult to get otherwise.
-type Metadata struct {
-	// Keys are the keys of the structure which were successfully decoded
-	Keys []string
-
-	// Unused is a slice of keys that were found in the raw value but
-	// weren't decoded since there was no matching field in the result interface
-	Unused []string
-}
-
-// Decode takes a map and uses reflection to convert it into the
-// given Go native structure. val must be a pointer to a struct.
-func Decode(m interface{}, rawVal interface{}) error {
-	config := &DecoderConfig{
-		Metadata: nil,
-		Result:   rawVal,
-	}
-
-	decoder, err := NewDecoder(config)
-	if err != nil {
-		return err
-	}
-
-	return decoder.Decode(m)
-}
-
-// WeakDecode is the same as Decode but is shorthand to enable
-// WeaklyTypedInput. See DecoderConfig for more info.
-func WeakDecode(input, output interface{}) error {
-	config := &DecoderConfig{
-		Metadata:         nil,
-		Result:           output,
-		WeaklyTypedInput: true,
-	}
-
-	decoder, err := NewDecoder(config)
-	if err != nil {
-		return err
-	}
-
-	return decoder.Decode(input)
-}
-
-// NewDecoder returns a new decoder for the given configuration. Once
-// a decoder has been returned, the same configuration must not be used
-// again.
-func NewDecoder(config *DecoderConfig) (*Decoder, error) {
-	val := reflect.ValueOf(config.Result)
-	if val.Kind() != reflect.Ptr {
-		return nil, errors.New("result must be a pointer")
-	}
-
-	val = val.Elem()
-	if !val.CanAddr() {
-		return nil, errors.New("result must be addressable (a pointer)")
-	}
-
-	if config.Metadata != nil {
-		if config.Metadata.Keys == nil {
-			config.Metadata.Keys = make([]string, 0)
-		}
-
-		if config.Metadata.Unused == nil {
-			config.Metadata.Unused = make([]string, 0)
-		}
-	}
-
-	if config.TagName == "" {
-		config.TagName = "mapstructure"
-	}
-
-	result := &Decoder{
-		config: config,
-	}
-
-	return result, nil
-}
-
-// Decode decodes the given raw interface to the target pointer specified
-// by the configuration.
-func (d *Decoder) Decode(raw interface{}) error {
-	return d.decode("", raw, reflect.ValueOf(d.config.Result).Elem())
-}
-
-// Decodes an unknown data type into a specific reflection value.
-func (d *Decoder) decode(name string, data interface{}, val reflect.Value) error {
-	if data == nil {
-		// If the data is nil, then we don't set anything.
-		return nil
-	}
-
-	dataVal := reflect.ValueOf(data)
-	if !dataVal.IsValid() {
-		// If the data value is invalid, then we just set the value
-		// to be the zero value.
-		val.Set(reflect.Zero(val.Type()))
-		return nil
-	}
-
-	if d.config.DecodeHook != nil {
-		// We have a DecodeHook, so let's pre-process the data.
-		var err error
-		data, err = DecodeHookExec(
-			d.config.DecodeHook,
-			dataVal.Type(), val.Type(), data)
-		if err != nil {
-			return err
-		}
-	}
-
-	var err error
-	dataKind := getKind(val)
-	switch dataKind {
-	case reflect.Bool:
-		err = d.decodeBool(name, data, val)
-	case reflect.Interface:
-		err = d.decodeBasic(name, data, val)
-	case reflect.String:
-		err = d.decodeString(name, data, val)
-	case reflect.Int:
-		err = d.decodeInt(name, data, val)
-	case reflect.Uint:
-		err = d.decodeUint(name, data, val)
-	case reflect.Float32:
-		err = d.decodeFloat(name, data, val)
-	case reflect.Struct:
-		err = d.decodeStruct(name, data, val)
-	case reflect.Map:
-		err = d.decodeMap(name, data, val)
-	case reflect.Ptr:
-		err = d.decodePtr(name, data, val)
-	case reflect.Slice:
-		err = d.decodeSlice(name, data, val)
-	default:
-		// If we reached this point then we weren't able to decode it
-		return fmt.Errorf("%s: unsupported type: %s", name, dataKind)
-	}
-
-	// If we reached here, then we successfully decoded SOMETHING, so
-	// mark the key as used if we're tracking metadata.
-	if d.config.Metadata != nil && name != "" {
-		d.config.Metadata.Keys = append(d.config.Metadata.Keys, name)
-	}
-
-	return err
-}
-
-// This decodes a basic type (bool, int, string, etc.) and sets the
-// value to "data" of that type.
-func (d *Decoder) decodeBasic(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.ValueOf(data)
-	if !dataVal.IsValid() {
-		dataVal = reflect.Zero(val.Type())
-	}
-
-	dataValType := dataVal.Type()
-	if !dataValType.AssignableTo(val.Type()) {
-		return fmt.Errorf(
-			"'%s' expected type '%s', got '%s'",
-			name, val.Type(), dataValType)
-	}
-
-	val.Set(dataVal)
-	return nil
-}
-
-func (d *Decoder) decodeString(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.ValueOf(data)
-	dataKind := getKind(dataVal)
-
-	converted := true
-	switch {
-	case dataKind == reflect.String:
-		val.SetString(dataVal.String())
-	case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
-		if dataVal.Bool() {
-			val.SetString("1")
-		} else {
-			val.SetString("0")
-		}
-	case dataKind == reflect.Int && d.config.WeaklyTypedInput:
-		val.SetString(strconv.FormatInt(dataVal.Int(), 10))
-	case dataKind == reflect.Uint && d.config.WeaklyTypedInput:
-		val.SetString(strconv.FormatUint(dataVal.Uint(), 10))
-	case dataKind == reflect.Float32 && d.config.WeaklyTypedInput:
-		val.SetString(strconv.FormatFloat(dataVal.Float(), 'f', -1, 64))
-	case dataKind == reflect.Slice && d.config.WeaklyTypedInput:
-		dataType := dataVal.Type()
-		elemKind := dataType.Elem().Kind()
-		switch {
-		case elemKind == reflect.Uint8:
-			val.SetString(string(dataVal.Interface().([]uint8)))
-		default:
-			converted = false
-		}
-	default:
-		converted = false
-	}
-
-	if !converted {
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.ValueOf(data)
-	dataKind := getKind(dataVal)
-	dataType := dataVal.Type()
-
-	switch {
-	case dataKind == reflect.Int:
-		val.SetInt(dataVal.Int())
-	case dataKind == reflect.Uint:
-		val.SetInt(int64(dataVal.Uint()))
-	case dataKind == reflect.Float32:
-		val.SetInt(int64(dataVal.Float()))
-	case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
-		if dataVal.Bool() {
-			val.SetInt(1)
-		} else {
-			val.SetInt(0)
-		}
-	case dataKind == reflect.String && d.config.WeaklyTypedInput:
-		i, err := strconv.ParseInt(dataVal.String(), 0, val.Type().Bits())
-		if err == nil {
-			val.SetInt(i)
-		} else {
-			return fmt.Errorf("cannot parse '%s' as int: %s", name, err)
-		}
-	case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number":
-		jn := data.(json.Number)
-		i, err := jn.Int64()
-		if err != nil {
-			return fmt.Errorf(
-				"error decoding json.Number into %s: %s", name, err)
-		}
-		val.SetInt(i)
-	default:
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.ValueOf(data)
-	dataKind := getKind(dataVal)
-
-	switch {
-	case dataKind == reflect.Int:
-		i := dataVal.Int()
-		if i < 0 && !d.config.WeaklyTypedInput {
-			return fmt.Errorf("cannot parse '%s', %d overflows uint",
-				name, i)
-		}
-		val.SetUint(uint64(i))
-	case dataKind == reflect.Uint:
-		val.SetUint(dataVal.Uint())
-	case dataKind == reflect.Float32:
-		f := dataVal.Float()
-		if f < 0 && !d.config.WeaklyTypedInput {
-			return fmt.Errorf("cannot parse '%s', %f overflows uint",
-				name, f)
-		}
-		val.SetUint(uint64(f))
-	case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
-		if dataVal.Bool() {
-			val.SetUint(1)
-		} else {
-			val.SetUint(0)
-		}
-	case dataKind == reflect.String && d.config.WeaklyTypedInput:
-		i, err := strconv.ParseUint(dataVal.String(), 0, val.Type().Bits())
-		if err == nil {
-			val.SetUint(i)
-		} else {
-			return fmt.Errorf("cannot parse '%s' as uint: %s", name, err)
-		}
-	default:
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeBool(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.ValueOf(data)
-	dataKind := getKind(dataVal)
-
-	switch {
-	case dataKind == reflect.Bool:
-		val.SetBool(dataVal.Bool())
-	case dataKind == reflect.Int && d.config.WeaklyTypedInput:
-		val.SetBool(dataVal.Int() != 0)
-	case dataKind == reflect.Uint && d.config.WeaklyTypedInput:
-		val.SetBool(dataVal.Uint() != 0)
-	case dataKind == reflect.Float32 && d.config.WeaklyTypedInput:
-		val.SetBool(dataVal.Float() != 0)
-	case dataKind == reflect.String && d.config.WeaklyTypedInput:
-		b, err := strconv.ParseBool(dataVal.String())
-		if err == nil {
-			val.SetBool(b)
-		} else if dataVal.String() == "" {
-			val.SetBool(false)
-		} else {
-			return fmt.Errorf("cannot parse '%s' as bool: %s", name, err)
-		}
-	default:
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeFloat(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.ValueOf(data)
-	dataKind := getKind(dataVal)
-	dataType := dataVal.Type()
-
-	switch {
-	case dataKind == reflect.Int:
-		val.SetFloat(float64(dataVal.Int()))
-	case dataKind == reflect.Uint:
-		val.SetFloat(float64(dataVal.Uint()))
-	case dataKind == reflect.Float32:
-		val.SetFloat(float64(dataVal.Float()))
-	case dataKind == reflect.Bool && d.config.WeaklyTypedInput:
-		if dataVal.Bool() {
-			val.SetFloat(1)
-		} else {
-			val.SetFloat(0)
-		}
-	case dataKind == reflect.String && d.config.WeaklyTypedInput:
-		f, err := strconv.ParseFloat(dataVal.String(), val.Type().Bits())
-		if err == nil {
-			val.SetFloat(f)
-		} else {
-			return fmt.Errorf("cannot parse '%s' as float: %s", name, err)
-		}
-	case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number":
-		jn := data.(json.Number)
-		i, err := jn.Float64()
-		if err != nil {
-			return fmt.Errorf(
-				"error decoding json.Number into %s: %s", name, err)
-		}
-		val.SetFloat(i)
-	default:
-		return fmt.Errorf(
-			"'%s' expected type '%s', got unconvertible type '%s'",
-			name, val.Type(), dataVal.Type())
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeMap(name string, data interface{}, val reflect.Value) error {
-	valType := val.Type()
-	valKeyType := valType.Key()
-	valElemType := valType.Elem()
-
-	// By default we overwrite keys in the current map
-	valMap := val
-
-	// If the map is nil or we're purposely zeroing fields, make a new map
-	if valMap.IsNil() || d.config.ZeroFields {
-		// Make a new map to hold our result
-		mapType := reflect.MapOf(valKeyType, valElemType)
-		valMap = reflect.MakeMap(mapType)
-	}
-
-	// Check input type
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	if dataVal.Kind() != reflect.Map {
-		// In weak mode, we accept a slice of maps as an input...
-		if d.config.WeaklyTypedInput {
-			switch dataVal.Kind() {
-			case reflect.Array, reflect.Slice:
-				// Special case for BC reasons (covered by tests)
-				if dataVal.Len() == 0 {
-					val.Set(valMap)
-					return nil
-				}
-
-				for i := 0; i < dataVal.Len(); i++ {
-					err := d.decode(
-						fmt.Sprintf("%s[%d]", name, i),
-						dataVal.Index(i).Interface(), val)
-					if err != nil {
-						return err
-					}
-				}
-
-				return nil
-			}
-		}
-
-		return fmt.Errorf("'%s' expected a map, got '%s'", name, dataVal.Kind())
-	}
-
-	// Accumulate errors
-	errors := make([]string, 0)
-
-	for _, k := range dataVal.MapKeys() {
-		fieldName := fmt.Sprintf("%s[%s]", name, k)
-
-		// First decode the key into the proper type
-		currentKey := reflect.Indirect(reflect.New(valKeyType))
-		if err := d.decode(fieldName, k.Interface(), currentKey); err != nil {
-			errors = appendErrors(errors, err)
-			continue
-		}
-
-		// Next decode the data into the proper type
-		v := dataVal.MapIndex(k).Interface()
-		currentVal := reflect.Indirect(reflect.New(valElemType))
-		if err := d.decode(fieldName, v, currentVal); err != nil {
-			errors = appendErrors(errors, err)
-			continue
-		}
-
-		valMap.SetMapIndex(currentKey, currentVal)
-	}
-
-	// Set the built up map to the value
-	val.Set(valMap)
-
-	// If we had errors, return those
-	if len(errors) > 0 {
-		return &Error{errors}
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodePtr(name string, data interface{}, val reflect.Value) error {
-	// Create an element of the concrete (non pointer) type and decode
-	// into that. Then set the value of the pointer to this type.
-	valType := val.Type()
-	valElemType := valType.Elem()
-	realVal := reflect.New(valElemType)
-	if err := d.decode(name, data, reflect.Indirect(realVal)); err != nil {
-		return err
-	}
-
-	val.Set(realVal)
-	return nil
-}
-
-func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-	dataValKind := dataVal.Kind()
-	valType := val.Type()
-	valElemType := valType.Elem()
-	sliceType := reflect.SliceOf(valElemType)
-
-	// Check input type
-	if dataValKind != reflect.Array && dataValKind != reflect.Slice {
-		// Accept empty map instead of array/slice in weakly typed mode
-		if d.config.WeaklyTypedInput && dataVal.Kind() == reflect.Map && dataVal.Len() == 0 {
-			val.Set(reflect.MakeSlice(sliceType, 0, 0))
-			return nil
-		} else {
-			return fmt.Errorf(
-				"'%s': source data must be an array or slice, got %s", name, dataValKind)
-		}
-	}
-
-	// Make a new slice to hold our result, same size as the original data.
-	valSlice := reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len())
-
-	// Accumulate any errors
-	errors := make([]string, 0)
-
-	for i := 0; i < dataVal.Len(); i++ {
-		currentData := dataVal.Index(i).Interface()
-		currentField := valSlice.Index(i)
-
-		fieldName := fmt.Sprintf("%s[%d]", name, i)
-		if err := d.decode(fieldName, currentData, currentField); err != nil {
-			errors = appendErrors(errors, err)
-		}
-	}
-
-	// Finally, set the value to the slice we built up
-	val.Set(valSlice)
-
-	// If there were errors, we return those
-	if len(errors) > 0 {
-		return &Error{errors}
-	}
-
-	return nil
-}
-
-func (d *Decoder) decodeStruct(name string, data interface{}, val reflect.Value) error {
-	dataVal := reflect.Indirect(reflect.ValueOf(data))
-
-	// If the type of the value to write to and the data match directly,
-	// then we just set it directly instead of recursing into the structure.
-	if dataVal.Type() == val.Type() {
-		val.Set(dataVal)
-		return nil
-	}
-
-	dataValKind := dataVal.Kind()
-	if dataValKind != reflect.Map {
-		return fmt.Errorf("'%s' expected a map, got '%s'", name, dataValKind)
-	}
-
-	dataValType := dataVal.Type()
-	if kind := dataValType.Key().Kind(); kind != reflect.String && kind != reflect.Interface {
-		return fmt.Errorf(
-			"'%s' needs a map with string keys, has '%s' keys",
-			name, dataValType.Key().Kind())
-	}
-
-	dataValKeys := make(map[reflect.Value]struct{})
-	dataValKeysUnused := make(map[interface{}]struct{})
-	for _, dataValKey := range dataVal.MapKeys() {
-		dataValKeys[dataValKey] = struct{}{}
-		dataValKeysUnused[dataValKey.Interface()] = struct{}{}
-	}
-
-	errors := make([]string, 0)
-
-	// This slice will keep track of all the structs we'll be decoding.
-	// There can be more than one struct if there are embedded structs
-	// that are squashed.
-	structs := make([]reflect.Value, 1, 5)
-	structs[0] = val
-
-	// Compile the list of all the fields that we're going to be decoding
-	// from all the structs.
-	fields := make(map[*reflect.StructField]reflect.Value)
-	for len(structs) > 0 {
-		structVal := structs[0]
-		structs = structs[1:]
-
-		structType := structVal.Type()
-
-		for i := 0; i < structType.NumField(); i++ {
-			fieldType := structType.Field(i)
-			fieldKind := fieldType.Type.Kind()
-
-			// If "squash" is specified in the tag, we squash the field down.
-			squash := false
-			tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",")
-			for _, tag := range tagParts[1:] {
-				if tag == "squash" {
-					squash = true
-					break
-				}
-			}
-
-			if squash {
-				if fieldKind != reflect.Struct {
-					errors = appendErrors(errors,
-						fmt.Errorf("%s: unsupported type for squash: %s", fieldType.Name, fieldKind))
-				} else {
-					structs = append(structs, val.FieldByName(fieldType.Name))
-				}
-				continue
-			}
-
-			// Normal struct field, store it away
-			fields[&fieldType] = structVal.Field(i)
-		}
-	}
-
-	for fieldType, field := range fields {
-		fieldName := fieldType.Name
-
-		tagValue := fieldType.Tag.Get(d.config.TagName)
-		tagValue = strings.SplitN(tagValue, ",", 2)[0]
-		if tagValue != "" {
-			fieldName = tagValue
-		}
-
-		rawMapKey := reflect.ValueOf(fieldName)
-		rawMapVal := dataVal.MapIndex(rawMapKey)
-		if !rawMapVal.IsValid() {
-			// Do a slower search by iterating over each key and
-			// doing case-insensitive search.
-			for dataValKey := range dataValKeys {
-				mK, ok := dataValKey.Interface().(string)
-				if !ok {
-					// Not a string key
-					continue
-				}
-
-				if strings.EqualFold(mK, fieldName) {
-					rawMapKey = dataValKey
-					rawMapVal = dataVal.MapIndex(dataValKey)
-					break
-				}
-			}
-
-			if !rawMapVal.IsValid() {
-				// There was no matching key in the map for the value in
-				// the struct. Just ignore.
-				continue
-			}
-		}
-
-		// Delete the key we're using from the unused map so we stop tracking
-		delete(dataValKeysUnused, rawMapKey.Interface())
-
-		if !field.IsValid() {
-			// This should never happen
-			panic("field is not valid")
-		}
-
-		// If we can't set the field, then it is unexported or something,
-		// and we just continue onwards.
-		if !field.CanSet() {
-			continue
-		}
-
-		// If the name is empty string, then we're at the root, and we
-		// don't dot-join the fields.
-		if name != "" {
-			fieldName = fmt.Sprintf("%s.%s", name, fieldName)
-		}
-
-		if err := d.decode(fieldName, rawMapVal.Interface(), field); err != nil {
-			errors = appendErrors(errors, err)
-		}
-	}
-
-	if d.config.ErrorUnused && len(dataValKeysUnused) > 0 {
-		keys := make([]string, 0, len(dataValKeysUnused))
-		for rawKey := range dataValKeysUnused {
-			keys = append(keys, rawKey.(string))
-		}
-		sort.Strings(keys)
-
-		err := fmt.Errorf("'%s' has invalid keys: %s", name, strings.Join(keys, ", "))
-		errors = appendErrors(errors, err)
-	}
-
-	if len(errors) > 0 {
-		return &Error{errors}
-	}
-
-	// Add the unused keys to the list of unused keys if we're tracking metadata
-	if d.config.Metadata != nil {
-		for rawKey := range dataValKeysUnused {
-			key := rawKey.(string)
-			if name != "" {
-				key = fmt.Sprintf("%s.%s", name, key)
-			}
-
-			d.config.Metadata.Unused = append(d.config.Metadata.Unused, key)
-		}
-	}
-
-	return nil
-}
-
-func getKind(val reflect.Value) reflect.Kind {
-	kind := val.Kind()
-
-	switch {
-	case kind >= reflect.Int && kind <= reflect.Int64:
-		return reflect.Int
-	case kind >= reflect.Uint && kind <= reflect.Uint64:
-		return reflect.Uint
-	case kind >= reflect.Float32 && kind <= reflect.Float64:
-		return reflect.Float32
-	default:
-		return kind
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cast/.gitignore
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cast/.gitignore b/newt/vendor/github.com/spf13/cast/.gitignore
deleted file mode 100644
index 53053a8..0000000
--- a/newt/vendor/github.com/spf13/cast/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-
-*.bench

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cast/LICENSE
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cast/LICENSE b/newt/vendor/github.com/spf13/cast/LICENSE
deleted file mode 100644
index 4527efb..0000000
--- a/newt/vendor/github.com/spf13/cast/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Steve Francia
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cast/README.md
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cast/README.md b/newt/vendor/github.com/spf13/cast/README.md
deleted file mode 100644
index af7a1fd..0000000
--- a/newt/vendor/github.com/spf13/cast/README.md
+++ /dev/null
@@ -1,72 +0,0 @@
-cast
-====
-
-Easy and safe casting from one type to another in Go
-
-Don\u2019t Panic! ... Cast
-
-## What is Cast?
-
-Cast is a library to convert between different go types in a consistent and easy way.
-
-Cast provides simple functions to easily convert a number to a string, an
-interface into a bool, etc. Cast does this intelligently when an obvious
-conversion is possible. It doesn\u2019t make any attempts to guess what you meant,
-for example you can only convert a string to an int when it is a string
-representation of an int such as \u201c8\u201d. Cast was developed for use in
-[Hugo](http://hugo.spf13.com), a website engine which uses YAML, TOML or JSON
-for meta data.
-
-## Why use Cast?
-
-When working with dynamic data in Go you often need to cast or convert the data
-from one type into another. Cast goes beyond just using type assertion (though
-it uses that when possible) to provide a very straightforward and convenient
-library.
-
-If you are working with interfaces to handle things like dynamic content
-you\u2019ll need an easy way to convert an interface into a given type. This
-is the library for you.
-
-If you are taking in data from YAML, TOML or JSON or other formats which lack
-full types, then Cast is the library for you.
-
-## Usage
-
-Cast provides a handful of To_____ methods. These methods will always return
-the desired type. **If input is provided that will not convert to that type, the
-0 or nil value for that type will be returned**.
-
-Cast also provides identical methods To_____E. These return the same result as
-the To_____ methods, plus an additional error which tells you if it successfully
-converted. Using these methods you can tell the difference between when the
-input matched the zero value or when the conversion failed and the zero value
-was returned.
-
-The following examples are merely a sample of what is available. Please review
-the code for a complete set.
-
-### Example \u2018ToString\u2019:
-
-    cast.ToString("mayonegg")         // "mayonegg"
-    cast.ToString(8)                  // "8"
-    cast.ToString(8.31)               // "8.31"
-    cast.ToString([]byte("one time")) // "one time"
-    cast.ToString(nil)                // ""
-
-	var foo interface{} = "one more time"
-    cast.ToString(foo)                // "one more time"
-
-
-### Example \u2018ToInt\u2019:
-
-    cast.ToInt(8)                  // 8
-    cast.ToInt(8.31)               // 8
-    cast.ToInt("8")                // 8
-    cast.ToInt(true)               // 1
-    cast.ToInt(false)              // 0
-
-	var eight interface{} = 8
-    cast.ToInt(eight)              // 8
-    cast.ToInt(nil)                // 0
-

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cast/cast.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cast/cast.go b/newt/vendor/github.com/spf13/cast/cast.go
deleted file mode 100644
index 6ca3e0e..0000000
--- a/newt/vendor/github.com/spf13/cast/cast.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright � 2014 Steve Francia <sp...@spf13.com>.
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-package cast
-
-import "time"
-
-func ToBool(i interface{}) bool {
-	v, _ := ToBoolE(i)
-	return v
-}
-
-func ToTime(i interface{}) time.Time {
-	v, _ := ToTimeE(i)
-	return v
-}
-
-func ToDuration(i interface{}) time.Duration {
-	v, _ := ToDurationE(i)
-	return v
-}
-
-func ToFloat64(i interface{}) float64 {
-	v, _ := ToFloat64E(i)
-	return v
-}
-
-func ToInt64(i interface{}) int64 {
-	v, _ := ToInt64E(i)
-	return v
-}
-
-func ToInt(i interface{}) int {
-	v, _ := ToIntE(i)
-	return v
-}
-
-func ToString(i interface{}) string {
-	v, _ := ToStringE(i)
-	return v
-}
-
-func ToStringMapString(i interface{}) map[string]string {
-	v, _ := ToStringMapStringE(i)
-	return v
-}
-
-func ToStringMapStringSlice(i interface{}) map[string][]string {
-	v, _ := ToStringMapStringSliceE(i)
-	return v
-}
-
-func ToStringMapBool(i interface{}) map[string]bool {
-	v, _ := ToStringMapBoolE(i)
-	return v
-}
-
-func ToStringMap(i interface{}) map[string]interface{} {
-	v, _ := ToStringMapE(i)
-	return v
-}
-
-func ToSlice(i interface{}) []interface{} {
-	v, _ := ToSliceE(i)
-	return v
-}
-
-func ToBoolSlice(i interface{}) []bool {
-	v, _ := ToBoolSliceE(i)
-	return v
-}
-
-func ToStringSlice(i interface{}) []string {
-	v, _ := ToStringSliceE(i)
-	return v
-}
-
-func ToIntSlice(i interface{}) []int {
-	v, _ := ToIntSliceE(i)
-	return v
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cast/caste.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cast/caste.go b/newt/vendor/github.com/spf13/cast/caste.go
deleted file mode 100644
index 23f0fe8..0000000
--- a/newt/vendor/github.com/spf13/cast/caste.go
+++ /dev/null
@@ -1,527 +0,0 @@
-// Copyright � 2014 Steve Francia <sp...@spf13.com>.
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-package cast
-
-import (
-	"fmt"
-	"html/template"
-	"reflect"
-	"strconv"
-	"strings"
-	"time"
-)
-
-// ToTimeE casts an empty interface to time.Time.
-func ToTimeE(i interface{}) (tim time.Time, err error) {
-	i = indirect(i)
-
-	switch s := i.(type) {
-	case time.Time:
-		return s, nil
-	case string:
-		d, e := StringToDate(s)
-		if e == nil {
-			return d, nil
-		}
-		return time.Time{}, fmt.Errorf("Could not parse Date/Time format: %v\n", e)
-	default:
-		return time.Time{}, fmt.Errorf("Unable to Cast %#v to Time\n", i)
-	}
-}
-
-// ToDurationE casts an empty interface to time.Duration.
-func ToDurationE(i interface{}) (d time.Duration, err error) {
-	i = indirect(i)
-
-	switch s := i.(type) {
-	case time.Duration:
-		return s, nil
-	case int64, int32, int16, int8, int:
-		d = time.Duration(ToInt64(s))
-		return
-	case float32, float64:
-		d = time.Duration(ToFloat64(s))
-		return
-	case string:
-		if strings.ContainsAny(s, "nsu�mh") {
-			d, err = time.ParseDuration(s)
-		} else {
-			d, err = time.ParseDuration(s + "ns")
-		}
-		return
-	default:
-		err = fmt.Errorf("Unable to Cast %#v to Duration\n", i)
-		return
-	}
-}
-
-// ToBoolE casts an empty interface to a bool.
-func ToBoolE(i interface{}) (bool, error) {
-
-	i = indirect(i)
-
-	switch b := i.(type) {
-	case bool:
-		return b, nil
-	case nil:
-		return false, nil
-	case int:
-		if i.(int) != 0 {
-			return true, nil
-		}
-		return false, nil
-	case string:
-		return strconv.ParseBool(i.(string))
-	default:
-		return false, fmt.Errorf("Unable to Cast %#v to bool", i)
-	}
-}
-
-// ToFloat64E casts an empty interface to a float64.
-func ToFloat64E(i interface{}) (float64, error) {
-	i = indirect(i)
-
-	switch s := i.(type) {
-	case float64:
-		return s, nil
-	case float32:
-		return float64(s), nil
-	case int64:
-		return float64(s), nil
-	case int32:
-		return float64(s), nil
-	case int16:
-		return float64(s), nil
-	case int8:
-		return float64(s), nil
-	case int:
-		return float64(s), nil
-	case string:
-		v, err := strconv.ParseFloat(s, 64)
-		if err == nil {
-			return float64(v), nil
-		}
-		return 0.0, fmt.Errorf("Unable to Cast %#v to float", i)
-	default:
-		return 0.0, fmt.Errorf("Unable to Cast %#v to float", i)
-	}
-}
-
-// ToInt64E casts an empty interface to an int64.
-func ToInt64E(i interface{}) (int64, error) {
-	i = indirect(i)
-
-	switch s := i.(type) {
-	case int64:
-		return s, nil
-	case int:
-		return int64(s), nil
-	case int32:
-		return int64(s), nil
-	case int16:
-		return int64(s), nil
-	case int8:
-		return int64(s), nil
-	case string:
-		v, err := strconv.ParseInt(s, 0, 0)
-		if err == nil {
-			return v, nil
-		}
-		return 0, fmt.Errorf("Unable to Cast %#v to int64", i)
-	case float64:
-		return int64(s), nil
-	case bool:
-		if bool(s) {
-			return int64(1), nil
-		}
-		return int64(0), nil
-	case nil:
-		return int64(0), nil
-	default:
-		return int64(0), fmt.Errorf("Unable to Cast %#v to int64", i)
-	}
-}
-
-// ToIntE casts an empty interface to an int.
-func ToIntE(i interface{}) (int, error) {
-	i = indirect(i)
-
-	switch s := i.(type) {
-	case int:
-		return s, nil
-	case int64:
-		return int(s), nil
-	case int32:
-		return int(s), nil
-	case int16:
-		return int(s), nil
-	case int8:
-		return int(s), nil
-	case string:
-		v, err := strconv.ParseInt(s, 0, 0)
-		if err == nil {
-			return int(v), nil
-		}
-		return 0, fmt.Errorf("Unable to Cast %#v to int", i)
-	case float64:
-		return int(s), nil
-	case bool:
-		if bool(s) {
-			return 1, nil
-		}
-		return 0, nil
-	case nil:
-		return 0, nil
-	default:
-		return 0, fmt.Errorf("Unable to Cast %#v to int", i)
-	}
-}
-
-// From html/template/content.go
-// Copyright 2011 The Go Authors. All rights reserved.
-// indirect returns the value, after dereferencing as many times
-// as necessary to reach the base type (or nil).
-func indirect(a interface{}) interface{} {
-	if a == nil {
-		return nil
-	}
-	if t := reflect.TypeOf(a); t.Kind() != reflect.Ptr {
-		// Avoid creating a reflect.Value if it's not a pointer.
-		return a
-	}
-	v := reflect.ValueOf(a)
-	for v.Kind() == reflect.Ptr && !v.IsNil() {
-		v = v.Elem()
-	}
-	return v.Interface()
-}
-
-// From html/template/content.go
-// Copyright 2011 The Go Authors. All rights reserved.
-// indirectToStringerOrError returns the value, after dereferencing as many times
-// as necessary to reach the base type (or nil) or an implementation of fmt.Stringer
-// or error,
-func indirectToStringerOrError(a interface{}) interface{} {
-	if a == nil {
-		return nil
-	}
-
-	var errorType = reflect.TypeOf((*error)(nil)).Elem()
-	var fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem()
-
-	v := reflect.ValueOf(a)
-	for !v.Type().Implements(fmtStringerType) && !v.Type().Implements(errorType) && v.Kind() == reflect.Ptr && !v.IsNil() {
-		v = v.Elem()
-	}
-	return v.Interface()
-}
-
-// ToStringE casts an empty interface to a string.
-func ToStringE(i interface{}) (string, error) {
-	i = indirectToStringerOrError(i)
-
-	switch s := i.(type) {
-	case string:
-		return s, nil
-	case bool:
-		return strconv.FormatBool(s), nil
-	case float64:
-		return strconv.FormatFloat(i.(float64), 'f', -1, 64), nil
-	case int64:
-		return strconv.FormatInt(i.(int64), 10), nil
-	case int:
-		return strconv.FormatInt(int64(i.(int)), 10), nil
-	case []byte:
-		return string(s), nil
-	case template.HTML:
-		return string(s), nil
-	case template.URL:
-		return string(s), nil
-	case template.JS:
-		return string(s), nil
-	case template.CSS:
-		return string(s), nil
-	case template.HTMLAttr:
-		return string(s), nil
-	case nil:
-		return "", nil
-	case fmt.Stringer:
-		return s.String(), nil
-	case error:
-		return s.Error(), nil
-	default:
-		return "", fmt.Errorf("Unable to Cast %#v to string", i)
-	}
-}
-
-// ToStringMapStringE casts an empty interface to a map[string]string.
-func ToStringMapStringE(i interface{}) (map[string]string, error) {
-
-	var m = map[string]string{}
-
-	switch v := i.(type) {
-	case map[string]string:
-		return v, nil
-	case map[string]interface{}:
-		for k, val := range v {
-			m[ToString(k)] = ToString(val)
-		}
-		return m, nil
-	case map[interface{}]string:
-		for k, val := range v {
-			m[ToString(k)] = ToString(val)
-		}
-		return m, nil
-	case map[interface{}]interface{}:
-		for k, val := range v {
-			m[ToString(k)] = ToString(val)
-		}
-		return m, nil
-	default:
-		return m, fmt.Errorf("Unable to Cast %#v to map[string]string", i)
-	}
-}
-
-// ToStringMapStringSliceE casts an empty interface to a map[string][]string.
-func ToStringMapStringSliceE(i interface{}) (map[string][]string, error) {
-
-	var m = map[string][]string{}
-
-	switch v := i.(type) {
-	case map[string][]string:
-		return v, nil
-	case map[string][]interface{}:
-		for k, val := range v {
-			m[ToString(k)] = ToStringSlice(val)
-		}
-		return m, nil
-	case map[string]string:
-		for k, val := range v {
-			m[ToString(k)] = []string{val}
-		}
-	case map[string]interface{}:
-		for k, val := range v {
-			switch vt := val.(type) {
-			case []interface{}:
-				m[ToString(k)] = ToStringSlice(vt)
-			case []string:
-				m[ToString(k)] = vt
-			default:
-				m[ToString(k)] = []string{ToString(val)}
-			}
-		}
-		return m, nil
-	case map[interface{}][]string:
-		for k, val := range v {
-			m[ToString(k)] = ToStringSlice(val)
-		}
-		return m, nil
-	case map[interface{}]string:
-		for k, val := range v {
-			m[ToString(k)] = ToStringSlice(val)
-		}
-		return m, nil
-	case map[interface{}][]interface{}:
-		for k, val := range v {
-			m[ToString(k)] = ToStringSlice(val)
-		}
-		return m, nil
-	case map[interface{}]interface{}:
-		for k, val := range v {
-			key, err := ToStringE(k)
-			if err != nil {
-				return m, fmt.Errorf("Unable to Cast %#v to map[string][]string", i)
-			}
-			value, err := ToStringSliceE(val)
-			if err != nil {
-				return m, fmt.Errorf("Unable to Cast %#v to map[string][]string", i)
-			}
-			m[key] = value
-		}
-	default:
-		return m, fmt.Errorf("Unable to Cast %#v to map[string][]string", i)
-	}
-	return m, nil
-}
-
-// ToStringMapBoolE casts an empty interface to a map[string]bool.
-func ToStringMapBoolE(i interface{}) (map[string]bool, error) {
-
-	var m = map[string]bool{}
-
-	switch v := i.(type) {
-	case map[interface{}]interface{}:
-		for k, val := range v {
-			m[ToString(k)] = ToBool(val)
-		}
-		return m, nil
-	case map[string]interface{}:
-		for k, val := range v {
-			m[ToString(k)] = ToBool(val)
-		}
-		return m, nil
-	case map[string]bool:
-		return v, nil
-	default:
-		return m, fmt.Errorf("Unable to Cast %#v to map[string]bool", i)
-	}
-}
-
-// ToStringMapE casts an empty interface to a map[string]interface{}.
-func ToStringMapE(i interface{}) (map[string]interface{}, error) {
-
-	var m = map[string]interface{}{}
-
-	switch v := i.(type) {
-	case map[interface{}]interface{}:
-		for k, val := range v {
-			m[ToString(k)] = val
-		}
-		return m, nil
-	case map[string]interface{}:
-		return v, nil
-	default:
-		return m, fmt.Errorf("Unable to Cast %#v to map[string]interface{}", i)
-	}
-}
-
-// ToSliceE casts an empty interface to a []interface{}.
-func ToSliceE(i interface{}) ([]interface{}, error) {
-
-	var s []interface{}
-
-	switch v := i.(type) {
-	case []interface{}:
-		for _, u := range v {
-			s = append(s, u)
-		}
-		return s, nil
-	case []map[string]interface{}:
-		for _, u := range v {
-			s = append(s, u)
-		}
-		return s, nil
-	default:
-		return s, fmt.Errorf("Unable to Cast %#v of type %v to []interface{}", i, reflect.TypeOf(i))
-	}
-}
-
-// ToBoolSliceE casts an empty interface to a []bool.
-func ToBoolSliceE(i interface{}) ([]bool, error) {
-
-	if i == nil {
-		return []bool{}, fmt.Errorf("Unable to Cast %#v to []bool", i)
-	}
-
-	switch v := i.(type) {
-	case []bool:
-		return v, nil
-	}
-
-	kind := reflect.TypeOf(i).Kind()
-	switch kind {
-	case reflect.Slice, reflect.Array:
-		s := reflect.ValueOf(i)
-		a := make([]bool, s.Len())
-		for j := 0; j < s.Len(); j++ {
-			val, err := ToBoolE(s.Index(j).Interface())
-			if err != nil {
-				return []bool{}, fmt.Errorf("Unable to Cast %#v to []bool", i)
-			}
-			a[j] = val
-		}
-		return a, nil
-	default:
-		return []bool{}, fmt.Errorf("Unable to Cast %#v to []bool", i)
-	}
-}
-
-// ToStringSliceE casts an empty interface to a []string.
-func ToStringSliceE(i interface{}) ([]string, error) {
-
-	var a []string
-
-	switch v := i.(type) {
-	case []interface{}:
-		for _, u := range v {
-			a = append(a, ToString(u))
-		}
-		return a, nil
-	case []string:
-		return v, nil
-	case string:
-		return strings.Fields(v), nil
-	case interface{}:
-		str, err := ToStringE(v)
-		if err != nil {
-			return a, fmt.Errorf("Unable to Cast %#v to []string", i)
-		}
-		return []string{str}, nil
-	default:
-		return a, fmt.Errorf("Unable to Cast %#v to []string", i)
-	}
-}
-
-// ToIntSliceE casts an empty interface to a []int.
-func ToIntSliceE(i interface{}) ([]int, error) {
-
-	if i == nil {
-		return []int{}, fmt.Errorf("Unable to Cast %#v to []int", i)
-	}
-
-	switch v := i.(type) {
-	case []int:
-		return v, nil
-	}
-
-	kind := reflect.TypeOf(i).Kind()
-	switch kind {
-	case reflect.Slice, reflect.Array:
-		s := reflect.ValueOf(i)
-		a := make([]int, s.Len())
-		for j := 0; j < s.Len(); j++ {
-			val, err := ToIntE(s.Index(j).Interface())
-			if err != nil {
-				return []int{}, fmt.Errorf("Unable to Cast %#v to []int", i)
-			}
-			a[j] = val
-		}
-		return a, nil
-	default:
-		return []int{}, fmt.Errorf("Unable to Cast %#v to []int", i)
-	}
-}
-
-// StringToDate casts an empty interface to a time.Time.
-func StringToDate(s string) (time.Time, error) {
-	return parseDateWith(s, []string{
-		time.RFC3339,
-		"2006-01-02T15:04:05", // iso8601 without timezone
-		time.RFC1123Z,
-		time.RFC1123,
-		time.RFC822Z,
-		time.RFC822,
-		time.ANSIC,
-		time.UnixDate,
-		time.RubyDate,
-		"2006-01-02 15:04:05Z07:00",
-		"02 Jan 06 15:04 MST",
-		"2006-01-02",
-		"02 Jan 2006",
-		"2006-01-02 15:04:05 -07:00",
-		"2006-01-02 15:04:05 -0700",
-		"2006-01-02 15:04:05",
-	})
-}
-
-func parseDateWith(s string, dates []string) (d time.Time, e error) {
-	for _, dateType := range dates {
-		if d, e = time.Parse(dateType, s); e == nil {
-			return
-		}
-	}
-	return d, fmt.Errorf("Unable to parse date: %s", s)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/.gitignore
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/.gitignore b/newt/vendor/github.com/spf13/cobra/.gitignore
deleted file mode 100644
index 1b8c7c2..0000000
--- a/newt/vendor/github.com/spf13/cobra/.gitignore
+++ /dev/null
@@ -1,36 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-# Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
-# swap
-[._]*.s[a-w][a-z]
-[._]s[a-w][a-z]
-# session
-Session.vim
-# temporary
-.netrwhist
-*~
-# auto-generated tag files
-tags
-
-*.exe
-
-cobra.test



[46/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/symbol/symbol.go
----------------------------------------------------------------------
diff --git a/newt/symbol/symbol.go b/newt/symbol/symbol.go
deleted file mode 100644
index 9d155ca..0000000
--- a/newt/symbol/symbol.go
+++ /dev/null
@@ -1,322 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/* this file maintains a list of all the symbols from a */
-
-package symbol
-
-import (
-	"fmt"
-	"sort"
-	"strings"
-
-	"mynewt.apache.org/newt/util"
-)
-
-type SymbolInfo struct {
-	Bpkg    string
-	Name    string
-	Code    string
-	Section string
-	Ext     string
-	Size    int
-	Loc     int
-}
-
-type SymbolMap map[string]SymbolInfo
-
-func NewSymbolMap() *SymbolMap {
-	val := &SymbolMap{}
-	return val
-}
-
-func NewSymbolInfo() *SymbolInfo {
-	val := &SymbolInfo{}
-	return val
-}
-
-func NewElfSymbol(name string) *SymbolInfo {
-	val := NewSymbolInfo()
-	val.Name = name
-	val.Ext = ".elf"
-	return val
-}
-
-func (s *SymbolMap) Add(info SymbolInfo) {
-	(*s)[info.Name] = info
-}
-
-func (s *SymbolMap) GlobalFunctionsOnly() *SymbolMap {
-	s3 := NewSymbolMap()
-
-	for _, info1 := range *s {
-		if info1.IsFunction() && !info1.IsLocal() {
-			s3.Add(info1)
-		}
-	}
-	return s3
-}
-
-func (s *SymbolMap) GlobalDataOnly() *SymbolMap {
-	s3 := NewSymbolMap()
-
-	for _, info1 := range *s {
-		if !info1.IsFunction() && !info1.IsLocal() {
-			s3.Add(info1)
-		}
-	}
-	return s3
-}
-
-func (s *SymbolMap) Packages() map[string]bool {
-	pkg := make(map[string]bool)
-	for _, info1 := range *s {
-		pkg[info1.Bpkg] = true
-	}
-	return pkg
-}
-
-func IdenticalUnion(s1 *SymbolMap, s2 *SymbolMap, comparePkg bool,
-	compareAddr bool) (error, *SymbolMap, *SymbolMap) {
-	s3 := NewSymbolMap()
-	s_no := NewSymbolMap()
-	var err_str string
-	var err error
-	/* look through all symbols in S1 and if they are in s1,
-	 * add to new map s3 */
-
-	for name, info1 := range *s1 {
-		if info2, ok := (*s2)[name]; ok {
-			var pkg bool
-			var addr bool
-
-			if comparePkg {
-				pkg = info1.Bpkg == info2.Bpkg
-			} else {
-				pkg = true
-			}
-
-			if compareAddr {
-				addr = info1.Loc == info2.Loc
-			} else {
-				addr = true
-			}
-
-			/* compare to info 1 */
-			if info1.Code == info2.Code &&
-				info1.Size == info2.Size && pkg && addr {
-				s3.Add(info1)
-			} else if !info1.IsLocal() && !info1.IsFunction() {
-				/* Here is an unusual case.  We have a global data
-				 * symbol (bss or data) with the same name that is used
-				 * in both apps.  If code is linked against both of these
-				 * the code in the loader will call one while the code in
-				 * the app will call the other.  If the intention was for
-				 * these to be the same, then things are bad.  */
-				if err_str == "" {
-					err_str = "There are global symbols with the same name that " +
-						"are access via the loader and split application.  These " +
-						"symbols are either different sizes or from different " +
-						"packages.  Reconcile this issue before buidling.  If the " +
-						"symbols are intended to be shared by both, move the " +
-						"symbol to a package that is shared by both apps. If " +
-						"the symbols are distict (not shared), then make them " +
-						"static or rename them so they do not conflict" +
-						"\nNon Matching Symbols:\n"
-				}
-
-				err_str = err_str + fmt.Sprintf("%s-%s\n", info1.Sprintf(), info2.Sprintf())
-			} else {
-				info1.Name = info1.Name + "(app)"
-				info2.Name = info2.Name + "(loader)"
-				s_no.Add(info1)
-				s_no.Add(info2)
-			}
-		}
-	}
-
-	if err_str != "" {
-		err = util.NewNewtError(err_str)
-	}
-	return err, s3, s_no
-}
-
-type SymbolMapIterator func(s *SymbolInfo)
-
-func sprintfSi(si *SymbolInfo) string {
-	str := fmt.Sprintf("  %32s(%4s) (%8s) -- (%12s) %5d (0x%08x) from %s\n",
-		(*si).Name, (*si).Ext, (*si).Code, (*si).Section,
-		(*si).Size, (*si).Loc, (*si).Bpkg)
-	return str
-}
-
-func dumpSi(si *SymbolInfo) {
-	fmt.Printf(sprintfSi(si))
-}
-
-func (si *SymbolInfo) Dump() {
-	dumpSi(si)
-}
-
-func (si *SymbolInfo) Sprintf() string {
-	return sprintfSi(si)
-}
-
-func (si *SymbolInfo) IsLocal() bool {
-	val := (*si).Code[:1]
-
-	if val == "l" {
-		return true
-	}
-	return false
-}
-
-func (si *SymbolInfo) IsWeak() bool {
-	val := (*si).Code[1:2]
-
-	if val == "w" {
-		return true
-	}
-	return false
-}
-
-func (si *SymbolInfo) IsDebug() bool {
-	val := (*si).Code[5:6]
-
-	if val == "d" {
-		return true
-	}
-	return false
-}
-
-func (si *SymbolInfo) IsSection(section string) bool {
-	val := (*si).Section
-	return strings.HasPrefix(val, section)
-}
-
-func (si *SymbolInfo) IsFile() bool {
-	val := (*si).Code[6:7]
-
-	if val == "f" {
-		return true
-	}
-	return false
-}
-
-func (si *SymbolInfo) IsFunction() bool {
-	val := (*si).Code[6:7]
-
-	if val == "F" {
-		return true
-	}
-	return false
-}
-
-func (s *SymbolMap) FilterPkg(pname string) *SymbolMap {
-	sm := NewSymbolMap()
-	for _, info1 := range *s {
-		if pname != "" && pname == info1.Bpkg {
-			sm.Add(info1)
-		}
-	}
-	return sm
-}
-
-func (s *SymbolMap) String(name string) string {
-	// To store the keys in slice in sorted order
-	var keys []string
-	for k := range *s {
-		keys = append(keys, k)
-	}
-	sort.Strings(keys)
-
-	// To perform the opertion you want
-	out := fmt.Sprintf("Dumping symbols in file: %s\n", name)
-	for _, k := range keys {
-		info1 := (*s)[k]
-		out += info1.Sprintf()
-	}
-	return out
-}
-
-func (s *SymbolMap) Dump(name string) {
-
-	// To store the keys in slice in sorted order
-	var keys []string
-	for k := range *s {
-		keys = append(keys, k)
-	}
-	sort.Strings(keys)
-
-	// To perform the opertion you want
-	fmt.Printf("Dumping symbols in file: %s\n", name)
-	for _, k := range keys {
-		info1 := (*s)[k]
-		info1.Dump()
-	}
-}
-
-// Merge - merges given maps into 1 map
-// values will be overridden by last matching key - value
-func (s1 *SymbolMap) Merge(s2 *SymbolMap) (*SymbolMap, error) {
-
-	for k, v := range *s2 {
-
-		if val, ok := (*s1)[k]; ok {
-			/* We already have this in the MAP */
-			if val.IsWeak() && !v.IsWeak() {
-				(*s1)[k] = v
-			} else if v.IsWeak() && !val.IsWeak() {
-				/* nothing to do here as this is OK not to replace */
-			} else if v.IsLocal() && val.IsLocal() {
-				/* two locals that must conflict with name */
-				/* have to have separate instances of these */
-				util.StatusMessage(util.VERBOSITY_VERBOSE,
-					"Local Symbol Conflict: %s from packages %s and %s \n",
-					v.Name, v.Bpkg, val.Bpkg)
-				(*s2).Remove(k)
-			} else {
-				util.StatusMessage(util.VERBOSITY_QUIET,
-					"Global Symbol Conflict: %s from packages %s and %s \n",
-					v.Name, v.Bpkg, val.Bpkg)
-				return nil, util.NewNewtError("Global Symbol Conflict")
-			}
-		} else {
-			(*s1)[k] = v
-		}
-
-	}
-	return s1, nil
-}
-
-func (s *SymbolMap) Remove(name string) {
-	delete(*s, name)
-}
-
-func (s *SymbolMap) RemoveMap(subset *SymbolMap) {
-	for name, _ := range *subset {
-		(*s).Remove(name)
-	}
-}
-
-/* Returns true if the symbol is present in the symbol map */
-func (s *SymbolMap) Find(name string) (*SymbolInfo, bool) {
-	val, ok := (*s)[name]
-	return &val, ok
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/syscfg/restrict.go
----------------------------------------------------------------------
diff --git a/newt/syscfg/restrict.go b/newt/syscfg/restrict.go
deleted file mode 100644
index 5f9c0f7..0000000
--- a/newt/syscfg/restrict.go
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package syscfg
-
-import (
-	"fmt"
-	"strings"
-
-	"mynewt.apache.org/newt/util"
-)
-
-type CfgRestrictionCode int
-
-const (
-	CFG_RESTRICTION_CODE_NOTNULL = iota
-	CFG_RESTRICTION_CODE_EXPR
-)
-
-var cfgRestrictionNameCodeMap = map[string]CfgRestrictionCode{
-	"$notnull": CFG_RESTRICTION_CODE_NOTNULL,
-}
-
-type CfgRestrictionExpr struct {
-	ReqSetting string
-	ReqVal     bool
-	BaseVal    bool
-}
-type CfgRestriction struct {
-	BaseSetting string
-	Code        CfgRestrictionCode
-
-	// Only used if Code is CFG_RESTRICTION_CODE_EXPR
-	Expr CfgRestrictionExpr
-}
-
-func parseRestrictionExprConsequent(field string) (string, bool) {
-	var val bool
-	var name string
-
-	if strings.HasPrefix(field, "!") {
-		val = false
-		name = strings.TrimPrefix(field, "!")
-	} else {
-		val = true
-		name = field
-	}
-
-	return name, val
-}
-
-// Parses a restriction value.
-//
-// Currently, two forms of restrictions are supported:
-// 1. "$notnull"
-// 2. expression
-//
-// The "$notnull" string indicates that the setting must be set to something
-// other than the empty string.
-//
-// An expression string indicates dependencies on other settings.  It would be
-// better to have a real expression parser.  For now, only very simple
-// expressions are supported.  A restriction expression must be of the
-// following form:
-//     [!]<req-setting> [if <base-val>]
-//
-// All setting values are interpreted as booleans.  If a setting is "0", "",
-// or undefined, it is false; otherwise it is true.
-//
-// Examples:
-//     # Can't enable this setting unless LOG_FCB is enabled.
-//	   pkg.restrictions:
-//         LOG_FCB
-//
-//     # Can't enable this setting unless LOG_FCB is disabled.
-//	   pkg.restrictions:
-//         !LOG_FCB
-//
-//     # Can't disable this setting unless LOG_FCB is enabled.
-//	   pkg.restrictions:
-//         LOG_FCB if 0
-func readRestrictionExpr(text string) (CfgRestrictionExpr, error) {
-	e := CfgRestrictionExpr{}
-
-	fields := strings.Fields(text)
-	switch len(fields) {
-	case 1:
-		e.ReqSetting, e.ReqVal = parseRestrictionExprConsequent(fields[0])
-		e.BaseVal = true
-
-	case 3:
-		if fields[1] != "if" {
-			return e, util.FmtNewtError("invalid restriction: %s", text)
-		}
-		e.ReqSetting, e.ReqVal = parseRestrictionExprConsequent(fields[0])
-		e.BaseVal = ValueIsTrue(fields[2])
-
-	default:
-		return e, util.FmtNewtError("invalid restriction: %s", text)
-	}
-
-	return e, nil
-}
-
-func readRestriction(baseSetting string, text string) (CfgRestriction, error) {
-	r := CfgRestriction{
-		BaseSetting: baseSetting,
-	}
-
-	var ok bool
-	if r.Code, ok = cfgRestrictionNameCodeMap[text]; !ok {
-		// If the restriction text isn't a defined string, parse it as an
-		// expression.
-		r.Code = CFG_RESTRICTION_CODE_EXPR
-
-		var err error
-		if r.Expr, err = readRestrictionExpr(text); err != nil {
-			return r, err
-		}
-	}
-
-	return r, nil
-}
-
-func (cfg *Cfg) violationText(entry CfgEntry, r CfgRestriction) string {
-	if r.Code == CFG_RESTRICTION_CODE_NOTNULL {
-		return entry.Name + " must not be null"
-	}
-
-	str := fmt.Sprintf("%s=%s ", entry.Name, entry.Value)
-	if r.Expr.ReqVal {
-		str += fmt.Sprintf("requires %s be set", r.Expr.ReqSetting)
-	} else {
-		str += fmt.Sprintf("requires %s not be set", r.Expr.ReqSetting)
-	}
-
-	str += fmt.Sprintf(", but %s", r.Expr.ReqSetting)
-	reqEntry, ok := cfg.Settings[r.Expr.ReqSetting]
-	if !ok {
-		str += "undefined"
-	} else {
-		str += fmt.Sprintf("=%s", reqEntry.Value)
-	}
-
-	return str
-}
-
-func (r *CfgRestriction) relevantSettingNames() []string {
-	switch r.Code {
-	case CFG_RESTRICTION_CODE_NOTNULL:
-		return []string{r.BaseSetting}
-
-	case CFG_RESTRICTION_CODE_EXPR:
-		return []string{r.BaseSetting, r.Expr.ReqSetting}
-
-	default:
-		panic("Invalid restriction code: " + string(r.Code))
-	}
-}
-
-func (cfg *Cfg) restrictionMet(r CfgRestriction) bool {
-	baseEntry := cfg.Settings[r.BaseSetting]
-	baseVal := baseEntry.IsTrue()
-
-	switch r.Code {
-	case CFG_RESTRICTION_CODE_NOTNULL:
-		return baseEntry.Value != ""
-
-	case CFG_RESTRICTION_CODE_EXPR:
-		if baseVal != r.Expr.BaseVal {
-			// Restriction does not apply.
-			return true
-		}
-
-		reqEntry, ok := cfg.Settings[r.Expr.ReqSetting]
-		reqVal := ok && reqEntry.IsTrue()
-
-		return reqVal == r.Expr.ReqVal
-
-	default:
-		panic("Invalid restriction code: " + string(r.Code))
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/syscfg/syscfg.go
----------------------------------------------------------------------
diff --git a/newt/syscfg/syscfg.go b/newt/syscfg/syscfg.go
deleted file mode 100644
index cac298e..0000000
--- a/newt/syscfg/syscfg.go
+++ /dev/null
@@ -1,1045 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package syscfg
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"sort"
-	"strconv"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-	"github.com/spf13/cast"
-
-	"mynewt.apache.org/newt/newt/flash"
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/util"
-)
-
-const HEADER_PATH = "syscfg/syscfg.h"
-
-const SYSCFG_PREFIX_SETTING = "MYNEWT_VAL_"
-
-type CfgSettingType int
-
-const (
-	CFG_SETTING_TYPE_RAW CfgSettingType = iota
-	CFG_SETTING_TYPE_TASK_PRIO
-	CFG_SETTING_TYPE_INTERRUPT_PRIO
-	CFG_SETTING_TYPE_FLASH_OWNER
-)
-
-const SYSCFG_PRIO_ANY = "any"
-
-// Reserve last 16 priorities for the system (sanity, idle).
-const SYSCFG_TASK_PRIO_MAX = 0xef
-
-// The range of interrupt priorities is hardware dependent, so don't limit
-// these here.
-const SYSCFG_INTERRUPT_PRIO_MAX = 0xffffffff
-
-var cfgSettingNameTypeMap = map[string]CfgSettingType{
-	"raw":                CFG_SETTING_TYPE_RAW,
-	"task_priority":      CFG_SETTING_TYPE_TASK_PRIO,
-	"interrupt_priority": CFG_SETTING_TYPE_INTERRUPT_PRIO,
-	"flash_owner":        CFG_SETTING_TYPE_FLASH_OWNER,
-}
-
-type CfgPoint struct {
-	Value  string
-	Source *pkg.LocalPackage
-}
-
-type CfgEntry struct {
-	Name         string
-	Value        string
-	Description  string
-	SettingType  CfgSettingType
-	Restrictions []CfgRestriction
-	PackageDef   *pkg.LocalPackage
-	History      []CfgPoint
-}
-
-type CfgPriority struct {
-	SettingName string
-	PackageDef  *pkg.LocalPackage // package that define the setting.
-	PackageSrc  *pkg.LocalPackage // package overriding setting value.
-}
-
-type CfgFlashConflictCode int
-
-const (
-	CFG_FLASH_CONFLICT_CODE_BAD_NAME CfgFlashConflictCode = iota
-	CFG_FLASH_CONFLICT_CODE_NOT_UNIQUE
-)
-
-type CfgFlashConflict struct {
-	SettingNames []string
-	Code         CfgFlashConflictCode
-}
-
-type Cfg struct {
-	Settings map[string]CfgEntry
-
-	//// Errors
-	// Overrides of undefined settings.
-	Orphans map[string][]CfgPoint
-
-	// Two packages of equal priority override a setting with different
-	// values; not overridden by higher priority package.
-	Ambiguities map[string][]CfgPoint
-
-	// Setting restrictions not met.
-	Violations map[string][]CfgRestriction
-
-	// Attempted override by bottom-priority packages (libraries).
-	PriorityViolations []CfgPriority
-
-	FlashConflicts []CfgFlashConflict
-}
-
-func NewCfg() Cfg {
-	return Cfg{
-		Settings:           map[string]CfgEntry{},
-		Orphans:            map[string][]CfgPoint{},
-		Ambiguities:        map[string][]CfgPoint{},
-		Violations:         map[string][]CfgRestriction{},
-		PriorityViolations: []CfgPriority{},
-		FlashConflicts:     []CfgFlashConflict{},
-	}
-}
-
-func ValueIsTrue(val string) bool {
-	if val == "" {
-		return false
-	}
-
-	i, err := util.AtoiNoOct(val)
-	if err == nil && i == 0 {
-		return false
-	}
-
-	return true
-}
-
-func (cfg *Cfg) Features() map[string]bool {
-	features := map[string]bool{}
-	for k, v := range cfg.Settings {
-		if v.IsTrue() {
-			features[k] = true
-		}
-	}
-
-	return features
-}
-
-func (cfg *Cfg) FeaturesForLpkg(lpkg *pkg.LocalPackage) map[string]bool {
-	features := cfg.Features()
-
-	for k, v := range lpkg.InjectedSettings() {
-		_, ok := features[k]
-		if ok {
-			log.Warnf("Attempt to override syscfg setting %s with "+
-				"injected feature from package %s", k, lpkg.Name())
-		} else {
-			if ValueIsTrue(v) {
-				features[k] = true
-			}
-		}
-	}
-
-	return features
-}
-
-func (point CfgPoint) Name() string {
-	if point.Source == nil {
-		return "newt"
-	} else {
-		return point.Source.Name()
-	}
-}
-
-func (point CfgPoint) IsInjected() bool {
-	return point.Source == nil
-}
-
-func (entry *CfgEntry) IsTrue() bool {
-	return ValueIsTrue(entry.Value)
-}
-
-func (entry *CfgEntry) appendValue(lpkg *pkg.LocalPackage, value interface{}) {
-	strval := stringValue(value)
-	point := CfgPoint{Value: strval, Source: lpkg}
-	entry.History = append(entry.History, point)
-	entry.Value = strval
-}
-
-func historyToString(history []CfgPoint) string {
-	str := "["
-	for i, _ := range history {
-		if i != 0 {
-			str += ", "
-		}
-		p := history[len(history)-i-1]
-		str += fmt.Sprintf("%s:%s", p.Name(), p.Value)
-	}
-	str += "]"
-
-	return str
-}
-
-func (entry *CfgEntry) ambiguities() []CfgPoint {
-	diffVals := false
-	var points []CfgPoint
-
-	for i := 1; i < len(entry.History)-1; i++ {
-		cur := entry.History[len(entry.History)-i-1]
-		next := entry.History[len(entry.History)-i]
-
-		// If either setting is injected, there is no ambiguity
-		if cur.Source == nil || next.Source == nil {
-			break
-		}
-
-		// If the two package have different priorities, there is no ambiguity.
-		if normalizePkgType(cur.Source.Type()) !=
-			normalizePkgType(next.Source.Type()) {
-
-			break
-		}
-
-		if cur.Value != next.Value {
-			diffVals = true
-		}
-
-		if len(points) == 0 {
-			points = append(points, cur)
-		}
-		points = append(points, next)
-	}
-
-	// If all values are identical, there is no ambiguity
-	if !diffVals {
-		points = nil
-	}
-
-	return points
-}
-
-func (entry *CfgEntry) ambiguityText() string {
-	points := entry.ambiguities()
-	if len(points) == 0 {
-		return ""
-	}
-
-	str := fmt.Sprintf("Setting: %s, Packages: [", entry.Name)
-	for i, p := range points {
-		if i > 0 {
-			str += ", "
-		}
-
-		str += p.Source.Name()
-	}
-	str += "]"
-
-	return str
-}
-
-func FeatureToCflag(featureName string) string {
-	return fmt.Sprintf("-D%s=1", settingName(featureName))
-}
-
-func stringValue(val interface{}) string {
-	return strings.TrimSpace(cast.ToString(val))
-}
-
-func readSetting(name string, lpkg *pkg.LocalPackage,
-	vals map[interface{}]interface{}) (CfgEntry, error) {
-
-	entry := CfgEntry{}
-
-	entry.Name = name
-	entry.PackageDef = lpkg
-	entry.Description = stringValue(vals["description"])
-
-	// The value field for setting definition is required.
-	valueVal, valueExist := vals["value"]
-	if valueExist {
-		entry.Value = stringValue(valueVal)
-	} else {
-		return entry, util.FmtNewtError(
-			"setting %s does not have required value field", name)
-	}
-
-	if vals["type"] == nil {
-		entry.SettingType = CFG_SETTING_TYPE_RAW
-	} else {
-		var ok bool
-		typename := stringValue(vals["type"])
-		entry.SettingType, ok = cfgSettingNameTypeMap[typename]
-		if !ok {
-			return entry, util.FmtNewtError(
-				"setting %s specifies invalid type: %s", name, typename)
-		}
-	}
-	entry.appendValue(lpkg, entry.Value)
-
-	entry.Restrictions = []CfgRestriction{}
-	restrictionStrings := cast.ToStringSlice(vals["restrictions"])
-	for _, rstring := range restrictionStrings {
-		r, err := readRestriction(name, rstring)
-		if err != nil {
-			return entry,
-				util.PreNewtError(err, "error parsing setting %s", name)
-		}
-		entry.Restrictions = append(entry.Restrictions, r)
-	}
-
-	return entry, nil
-}
-
-func (cfg *Cfg) readDefsOnce(lpkg *pkg.LocalPackage,
-	features map[string]bool) error {
-	v := lpkg.SyscfgV
-
-	lfeatures := cfg.FeaturesForLpkg(lpkg)
-	for k, _ := range features {
-		lfeatures[k] = true
-	}
-
-	settings := newtutil.GetStringMapFeatures(v, lfeatures, "syscfg.defs")
-	if settings != nil {
-		for k, v := range settings {
-			vals := v.(map[interface{}]interface{})
-			entry, err := readSetting(k, lpkg, vals)
-			if err != nil {
-				return util.FmtNewtError("Config for package %s: %s",
-					lpkg.Name(), err.Error())
-			}
-
-			if oldEntry, exists := cfg.Settings[k]; exists {
-				// Setting already defined.  Allow this only if the setting is
-				// injected, in which case the injected value takes precedence.
-				point := mostRecentPoint(oldEntry)
-				if !point.IsInjected() {
-					// XXX: Better error message.
-					return util.FmtNewtError("setting %s redefined", k)
-				}
-
-				entry.History = append(entry.History, oldEntry.History...)
-				entry.Value = oldEntry.Value
-			}
-			cfg.Settings[k] = entry
-		}
-	}
-
-	return nil
-}
-
-func (cfg *Cfg) readValsOnce(lpkg *pkg.LocalPackage,
-	features map[string]bool) error {
-	v := lpkg.SyscfgV
-
-	lfeatures := cfg.FeaturesForLpkg(lpkg)
-	for k, _ := range features {
-		lfeatures[k] = true
-	}
-
-	values := newtutil.GetStringMapFeatures(v, lfeatures, "syscfg.vals")
-	for k, v := range values {
-		entry, ok := cfg.Settings[k]
-		if ok {
-			sourcetype := normalizePkgType(lpkg.Type())
-			deftype := normalizePkgType(entry.PackageDef.Type())
-			if sourcetype <= deftype {
-				// Overrides must come from a higher priority package.
-				priority := CfgPriority{
-					PackageDef:  entry.PackageDef,
-					PackageSrc:  lpkg,
-					SettingName: k,
-				}
-				cfg.PriorityViolations = append(cfg.PriorityViolations, priority)
-			} else {
-				entry.appendValue(lpkg, v)
-				cfg.Settings[k] = entry
-			}
-		} else {
-			orphan := CfgPoint{
-				Value:  stringValue(v),
-				Source: lpkg,
-			}
-			cfg.Orphans[k] = append(cfg.Orphans[k], orphan)
-		}
-	}
-
-	return nil
-}
-
-func (cfg *Cfg) Log() {
-	keys := make([]string, len(cfg.Settings))
-	i := 0
-	for k, _ := range cfg.Settings {
-		keys[i] = k
-		i++
-	}
-	sort.Strings(keys)
-
-	log.Debugf("syscfg settings (%d entries):", len(cfg.Settings))
-	for _, k := range keys {
-		entry := cfg.Settings[k]
-
-		log.Debugf("    %s=%s %s", k, entry.Value,
-			historyToString(entry.History))
-	}
-}
-
-func (cfg *Cfg) settingsOfType(typ CfgSettingType) []CfgEntry {
-	entries := []CfgEntry{}
-
-	for _, entry := range cfg.Settings {
-		if entry.SettingType == typ {
-			entries = append(entries, entry)
-		}
-	}
-
-	return entries
-}
-
-func (cfg *Cfg) detectViolations() {
-	for _, entry := range cfg.Settings {
-		var ev []CfgRestriction
-		for _, r := range entry.Restrictions {
-			if !cfg.restrictionMet(r) {
-				ev = append(ev, r)
-			}
-		}
-
-		if ev != nil {
-			cfg.Violations[entry.Name] = ev
-		}
-	}
-}
-
-func (cfg *Cfg) detectFlashConflicts(flashMap flash.FlashMap) {
-	entries := cfg.settingsOfType(CFG_SETTING_TYPE_FLASH_OWNER)
-
-	areaEntryMap := map[string][]CfgEntry{}
-
-	for _, entry := range entries {
-		if entry.Value != "" {
-			area, ok := flashMap.Areas[entry.Value]
-			if !ok {
-				conflict := CfgFlashConflict{
-					SettingNames: []string{entry.Name},
-					Code:         CFG_FLASH_CONFLICT_CODE_BAD_NAME,
-				}
-				cfg.FlashConflicts = append(cfg.FlashConflicts, conflict)
-			} else {
-				areaEntryMap[area.Name] =
-					append(areaEntryMap[area.Name], entry)
-			}
-		}
-	}
-
-	// Settings with type flash_owner must have unique values.
-	for _, entries := range areaEntryMap {
-		if len(entries) > 1 {
-			conflict := CfgFlashConflict{
-				SettingNames: []string{},
-				Code:         CFG_FLASH_CONFLICT_CODE_NOT_UNIQUE,
-			}
-
-			for _, entry := range entries {
-				conflict.SettingNames =
-					append(conflict.SettingNames, entry.Name)
-			}
-
-			cfg.FlashConflicts = append(cfg.FlashConflicts, conflict)
-		}
-	}
-}
-
-func (cfg *Cfg) flashConflictErrorText(conflict CfgFlashConflict) string {
-	entry := cfg.Settings[conflict.SettingNames[0]]
-
-	switch conflict.Code {
-	case CFG_FLASH_CONFLICT_CODE_BAD_NAME:
-		return fmt.Sprintf("Setting %s specifies unknown flash area: %s\n",
-			entry.Name, entry.Value)
-
-	case CFG_FLASH_CONFLICT_CODE_NOT_UNIQUE:
-		return fmt.Sprintf(
-			"Multiple flash_owner settings specify the same flash area\n"+
-				"          settings: %s\n"+
-				"        flash area: %s\n",
-			strings.Join(conflict.SettingNames, ", "),
-			entry.Value)
-
-	default:
-		panic("Invalid flash conflict code: " + string(conflict.Code))
-	}
-}
-
-func historyTextOnce(settingName string, points []CfgPoint) string {
-	return fmt.Sprintf("    %s: %s\n", settingName, historyToString(points))
-}
-
-func historyText(historyMap map[string][]CfgPoint) string {
-	if len(historyMap) == 0 {
-		return ""
-	}
-
-	str := "Setting history (newest -> oldest):\n"
-	names := make([]string, 0, len(historyMap))
-	for name, _ := range historyMap {
-		names = append(names, name)
-	}
-	sort.Strings(names)
-
-	for _, name := range names {
-		points := historyMap[name]
-		str += historyTextOnce(name, points)
-	}
-
-	return str
-}
-
-func (cfg *Cfg) ErrorText() string {
-	str := ""
-
-	historyMap := map[string][]CfgPoint{}
-
-	if len(cfg.Violations) > 0 {
-		str += "Syscfg restriction violations detected:\n"
-		for settingName, rslice := range cfg.Violations {
-			baseEntry := cfg.Settings[settingName]
-			historyMap[settingName] = baseEntry.History
-			for _, r := range rslice {
-				for _, name := range r.relevantSettingNames() {
-					reqEntry := cfg.Settings[name]
-					historyMap[name] = reqEntry.History
-				}
-				str += "    " + cfg.violationText(baseEntry, r) + "\n"
-			}
-		}
-	}
-
-	if len(cfg.Ambiguities) > 0 {
-		str += "Syscfg ambiguities detected:\n"
-
-		settingNames := make([]string, 0, len(cfg.Ambiguities))
-		for k, _ := range cfg.Ambiguities {
-			settingNames = append(settingNames, k)
-		}
-		sort.Strings(settingNames)
-
-		for _, name := range settingNames {
-			entry := cfg.Settings[name]
-			historyMap[entry.Name] = entry.History
-			str += "    " + entry.ambiguityText()
-		}
-	}
-
-	if len(cfg.PriorityViolations) > 0 {
-		str += "Priority violations detected (Packages can only override " +
-			"settings defined by packages of lower priority):\n"
-		for _, priority := range cfg.PriorityViolations {
-			entry := cfg.Settings[priority.SettingName]
-			historyMap[priority.SettingName] = entry.History
-
-			str += fmt.Sprintf("    Package: %s overriding setting: %s defined by %s\n",
-				priority.PackageSrc.Name(), priority.SettingName, priority.PackageDef.Name())
-		}
-	}
-
-	if len(cfg.FlashConflicts) > 0 {
-		str += "Flash errors detected:\n"
-		for _, conflict := range cfg.FlashConflicts {
-			for _, name := range conflict.SettingNames {
-				entry := cfg.Settings[name]
-				historyMap[name] = entry.History
-			}
-
-			str += "    " + cfg.flashConflictErrorText(conflict)
-		}
-	}
-
-	if str == "" {
-		return ""
-	}
-
-	str += "\n" + historyText(historyMap)
-
-	return strings.TrimSpace(str)
-}
-
-func (cfg *Cfg) WarningText() string {
-	str := ""
-
-	historyMap := map[string][]CfgPoint{}
-
-	if len(cfg.Orphans) > 0 {
-		settingNames := make([]string, len(cfg.Orphans))
-		i := 0
-		for k, _ := range cfg.Orphans {
-			settingNames[i] = k
-			i++
-		}
-		sort.Strings(settingNames)
-
-		str += "Ignoring override of undefined settings:"
-		for _, n := range settingNames {
-			historyMap[n] = cfg.Orphans[n]
-			str += fmt.Sprintf("\n    %s", n)
-		}
-	}
-
-	if str == "" {
-		return ""
-	}
-
-	str += "\n" + historyText(historyMap)
-
-	return str
-}
-
-func escapeStr(s string) string {
-	return strings.ToUpper(util.CIdentifier(s))
-}
-
-func settingName(setting string) string {
-	return SYSCFG_PREFIX_SETTING + escapeStr(setting)
-}
-
-func normalizePkgType(typ interfaces.PackageType) interfaces.PackageType {
-	switch typ {
-	case pkg.PACKAGE_TYPE_TARGET:
-		return pkg.PACKAGE_TYPE_TARGET
-	case pkg.PACKAGE_TYPE_APP:
-		return pkg.PACKAGE_TYPE_APP
-	case pkg.PACKAGE_TYPE_UNITTEST:
-		return pkg.PACKAGE_TYPE_UNITTEST
-	case pkg.PACKAGE_TYPE_BSP:
-		return pkg.PACKAGE_TYPE_BSP
-	default:
-		return pkg.PACKAGE_TYPE_LIB
-	}
-}
-
-func categorizePkgs(
-	lpkgs []*pkg.LocalPackage) map[interfaces.PackageType][]*pkg.LocalPackage {
-
-	pmap := map[interfaces.PackageType][]*pkg.LocalPackage{
-		pkg.PACKAGE_TYPE_TARGET:   []*pkg.LocalPackage{},
-		pkg.PACKAGE_TYPE_APP:      []*pkg.LocalPackage{},
-		pkg.PACKAGE_TYPE_UNITTEST: []*pkg.LocalPackage{},
-		pkg.PACKAGE_TYPE_BSP:      []*pkg.LocalPackage{},
-		pkg.PACKAGE_TYPE_LIB:      []*pkg.LocalPackage{},
-	}
-
-	for _, lpkg := range lpkgs {
-		typ := normalizePkgType(lpkg.Type())
-		pmap[typ] = append(pmap[typ], lpkg)
-	}
-
-	for k, v := range pmap {
-		pmap[k] = pkg.SortLclPkgs(v)
-	}
-
-	return pmap
-}
-
-func (cfg *Cfg) readDefsForPkgType(lpkgs []*pkg.LocalPackage,
-	features map[string]bool) error {
-
-	for _, lpkg := range lpkgs {
-		if err := cfg.readDefsOnce(lpkg, features); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-func (cfg *Cfg) readValsForPkgType(lpkgs []*pkg.LocalPackage,
-	features map[string]bool) error {
-
-	for _, lpkg := range lpkgs {
-		if err := cfg.readValsOnce(lpkg, features); err != nil {
-			return err
-		}
-	}
-
-	return nil
-}
-
-func (cfg *Cfg) detectAmbiguities() {
-	for _, entry := range cfg.Settings {
-		if points := entry.ambiguities(); len(points) > 0 {
-			cfg.Ambiguities[entry.Name] = points
-		}
-	}
-}
-
-func Read(lpkgs []*pkg.LocalPackage, apis []string,
-	injectedSettings map[string]string, features map[string]bool,
-	flashMap flash.FlashMap) (Cfg, error) {
-
-	cfg := NewCfg()
-	for k, v := range injectedSettings {
-		cfg.Settings[k] = CfgEntry{
-			Name:        k,
-			Description: "Injected setting",
-			Value:       v,
-			History: []CfgPoint{{
-				Value:  v,
-				Source: nil,
-			}},
-		}
-
-		if ValueIsTrue(v) {
-			features[k] = true
-		}
-	}
-
-	// Read system configuration files.  In case of conflicting settings, the
-	// higher priority pacakge's setting wins.  Package priorities are assigned
-	// as follows (highest priority first):
-	//     * target
-	//     * app (if present)
-	//     * unittest (if no app)
-	//     * bsp
-	//     * everything else (lib, sdk, compiler)
-
-	lpkgMap := categorizePkgs(lpkgs)
-
-	for _, ptype := range []interfaces.PackageType{
-		pkg.PACKAGE_TYPE_LIB,
-		pkg.PACKAGE_TYPE_BSP,
-		pkg.PACKAGE_TYPE_UNITTEST,
-		pkg.PACKAGE_TYPE_APP,
-		pkg.PACKAGE_TYPE_TARGET,
-	} {
-		if err := cfg.readDefsForPkgType(lpkgMap[ptype], features); err != nil {
-			return cfg, err
-		}
-	}
-
-	for _, ptype := range []interfaces.PackageType{
-		pkg.PACKAGE_TYPE_LIB,
-		pkg.PACKAGE_TYPE_BSP,
-		pkg.PACKAGE_TYPE_UNITTEST,
-		pkg.PACKAGE_TYPE_APP,
-		pkg.PACKAGE_TYPE_TARGET,
-	} {
-		if err := cfg.readValsForPkgType(lpkgMap[ptype], features); err != nil {
-			return cfg, err
-		}
-	}
-
-	cfg.detectAmbiguities()
-	cfg.detectViolations()
-	cfg.detectFlashConflicts(flashMap)
-
-	return cfg, nil
-}
-
-func mostRecentPoint(entry CfgEntry) CfgPoint {
-	if len(entry.History) == 0 {
-		panic("invalid cfg entry; len(history) == 0")
-	}
-
-	return entry.History[len(entry.History)-1]
-}
-
-func calcPriorities(cfg Cfg, settingType CfgSettingType, max int,
-	allowDups bool) error {
-
-	// setting-name => entry
-	anyEntries := map[string]CfgEntry{}
-
-	// priority-value => entry
-	valEntries := map[int]CfgEntry{}
-
-	for name, entry := range cfg.Settings {
-		if entry.SettingType == settingType {
-			if entry.Value == SYSCFG_PRIO_ANY {
-				anyEntries[name] = entry
-			} else {
-				prio, err := util.AtoiNoOct(entry.Value)
-				if err != nil {
-					return util.FmtNewtError(
-						"invalid priority value: setting=%s value=%s pkg=%s",
-						name, entry.Value, entry.History[0].Name())
-				}
-
-				if prio > max {
-					return util.FmtNewtError(
-						"invalid priority value: value too great (> %d); "+
-							"setting=%s value=%s pkg=%s",
-						max, entry.Name, entry.Value,
-						mostRecentPoint(entry).Name())
-				}
-
-				if !allowDups {
-					if oldEntry, ok := valEntries[prio]; ok {
-						return util.FmtNewtError(
-							"duplicate priority value: setting1=%s "+
-								"setting2=%s pkg1=%s pkg2=%s value=%s",
-							oldEntry.Name, entry.Name, entry.Value,
-							oldEntry.History[0].Name(),
-							entry.History[0].Name())
-					}
-				}
-
-				valEntries[prio] = entry
-			}
-		}
-	}
-
-	greatest := 0
-	for prio, _ := range valEntries {
-		if prio > greatest {
-			greatest = prio
-		}
-	}
-
-	anyNames := make([]string, 0, len(anyEntries))
-	for name, _ := range anyEntries {
-		anyNames = append(anyNames, name)
-	}
-	sort.Strings(anyNames)
-
-	for _, name := range anyNames {
-		entry := anyEntries[name]
-
-		greatest++
-		if greatest > max {
-			return util.FmtNewtError("could not assign 'any' priority: "+
-				"value too great (> %d); setting=%s value=%s pkg=%s",
-				max, name, greatest,
-				mostRecentPoint(entry).Name())
-		}
-
-		entry.Value = strconv.Itoa(greatest)
-		cfg.Settings[name] = entry
-	}
-
-	return nil
-}
-
-func writeCheckMacros(w io.Writer) {
-	s := `/**
- * This macro exists to ensure code includes this header when needed.  If code
- * checks the existence of a setting directly via ifdef without including this
- * header, the setting macro will silently evaluate to 0.  In contrast, an
- * attempt to use these macros without including this header will result in a
- * compiler error.
- */
-#define MYNEWT_VAL(x)                           MYNEWT_VAL_ ## x
-`
-	fmt.Fprintf(w, "%s\n", s)
-}
-
-func writeComment(entry CfgEntry, w io.Writer) {
-	if len(entry.History) > 1 {
-		fmt.Fprintf(w, "/* Overridden by %s (defined by %s) */\n",
-			mostRecentPoint(entry).Name(),
-			entry.History[0].Name())
-	}
-}
-
-func writeDefine(key string, value string, w io.Writer) {
-	if value == "" {
-		fmt.Fprintf(w, "#undef %s\n", key)
-	} else {
-		fmt.Fprintf(w, "#ifndef %s\n", key)
-		fmt.Fprintf(w, "#define %s (%s)\n", key, value)
-		fmt.Fprintf(w, "#endif\n")
-	}
-}
-
-func EntriesByPkg(cfg Cfg) map[string][]CfgEntry {
-	pkgEntries := map[string][]CfgEntry{}
-	for _, v := range cfg.Settings {
-		name := v.History[0].Name()
-		pkgEntries[name] = append(pkgEntries[name], v)
-	}
-	return pkgEntries
-}
-
-func writeSettingsOnePkg(cfg Cfg, pkgName string, pkgEntries []CfgEntry,
-	w io.Writer) {
-
-	names := make([]string, len(pkgEntries), len(pkgEntries))
-	for i, entry := range pkgEntries {
-		names[i] = entry.Name
-	}
-
-	if len(names) == 0 {
-		return
-	}
-	sort.Strings(names)
-
-	fmt.Fprintf(w, "/*** %s */\n", pkgName)
-
-	first := true
-	for _, n := range names {
-		entry := cfg.Settings[n]
-		if first {
-			first = false
-		} else {
-			fmt.Fprintf(w, "\n")
-		}
-
-		writeComment(entry, w)
-		writeDefine(settingName(n), entry.Value, w)
-	}
-}
-
-func writeSettings(cfg Cfg, w io.Writer) {
-	// Group settings by package name so that the generated header file is
-	// easier to read.
-	pkgEntries := EntriesByPkg(cfg)
-
-	pkgNames := make([]string, 0, len(pkgEntries))
-	for name, _ := range pkgEntries {
-		pkgNames = append(pkgNames, name)
-	}
-	sort.Strings(pkgNames)
-
-	for _, name := range pkgNames {
-		fmt.Fprintf(w, "\n")
-		entries := pkgEntries[name]
-		writeSettingsOnePkg(cfg, name, entries, w)
-	}
-}
-
-func write(cfg Cfg, w io.Writer) {
-	fmt.Fprintf(w, newtutil.GeneratedPreamble())
-
-	fmt.Fprintf(w, "#ifndef H_MYNEWT_SYSCFG_\n")
-	fmt.Fprintf(w, "#define H_MYNEWT_SYSCFG_\n\n")
-
-	writeCheckMacros(w)
-	fmt.Fprintf(w, "\n")
-
-	writeSettings(cfg, w)
-	fmt.Fprintf(w, "\n")
-
-	fmt.Fprintf(w, "#endif\n")
-}
-
-func EnsureWritten(cfg Cfg, includeDir string) error {
-	// XXX: Detect these problems at error text generation time.
-	if err := calcPriorities(cfg, CFG_SETTING_TYPE_TASK_PRIO,
-		SYSCFG_TASK_PRIO_MAX, false); err != nil {
-
-		return err
-	}
-
-	// XXX: Detect these problems at error text generation time.
-	if err := calcPriorities(cfg, CFG_SETTING_TYPE_INTERRUPT_PRIO,
-		SYSCFG_INTERRUPT_PRIO_MAX, true); err != nil {
-
-		return err
-	}
-
-	buf := bytes.Buffer{}
-	write(cfg, &buf)
-
-	path := includeDir + "/" + HEADER_PATH
-
-	writeReqd, err := util.FileContentsChanged(path, buf.Bytes())
-	if err != nil {
-		return err
-	}
-	if !writeReqd {
-		log.Debugf("syscfg unchanged; not writing header file (%s).", path)
-		return nil
-	}
-
-	log.Debugf("syscfg changed; writing header file (%s).", path)
-
-	if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	if err := ioutil.WriteFile(path, buf.Bytes(), 0644); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	return nil
-}
-
-func KeyValueFromStr(str string) (map[string]string, error) {
-	vals := map[string]string{}
-
-	if strings.TrimSpace(str) == "" {
-		return vals, nil
-	}
-
-	// Separate syscfg vals are delimited by ':'.
-	fields := strings.Split(str, ":")
-
-	// Key-value pairs are delimited by '='.  If no '=' is present, assume the
-	// string is the key name and the value is 1.
-	for _, f := range fields {
-		if _, err := util.AtoiNoOct(f); err == nil {
-			return nil, util.FmtNewtError(
-				"Invalid setting name \"%s\"; must not be a number", f)
-		}
-
-		kv := strings.SplitN(f, "=", 2)
-		switch len(kv) {
-		case 1:
-			vals[f] = "1"
-		case 2:
-			vals[kv[0]] = kv[1]
-		}
-	}
-
-	return vals, nil
-}
-
-func KeyValueToStr(syscfgKv map[string]string) string {
-	str := ""
-
-	names := make([]string, 0, len(syscfgKv))
-	for k, _ := range syscfgKv {
-		names = append(names, k)
-	}
-	sort.Strings(names)
-
-	for i, name := range names {
-		if i != 0 {
-			str += ":"
-		}
-
-		str += fmt.Sprintf("%s=%s", name, syscfgKv[name])
-	}
-
-	return str
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/sysinit/sysinit.go
----------------------------------------------------------------------
diff --git a/newt/sysinit/sysinit.go b/newt/sysinit/sysinit.go
deleted file mode 100644
index 29dc082..0000000
--- a/newt/sysinit/sysinit.go
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package sysinit
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"sort"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/util"
-)
-
-type initFunc struct {
-	stage int
-	name  string
-	pkg   *pkg.LocalPackage
-}
-
-func buildStageMap(pkgs []*pkg.LocalPackage) map[int][]*initFunc {
-	sm := map[int][]*initFunc{}
-
-	for _, p := range pkgs {
-		for name, stage := range p.Init() {
-			initFunc := &initFunc{
-				stage: stage,
-				name:  name,
-				pkg:   p,
-			}
-			sm[stage] = append(sm[stage], initFunc)
-		}
-	}
-
-	return sm
-}
-
-func writePrototypes(pkgs []*pkg.LocalPackage, w io.Writer) {
-	sorted := pkg.SortLclPkgs(pkgs)
-	for _, p := range sorted {
-		init := p.Init()
-		for name, _ := range init {
-			fmt.Fprintf(w, "void %s(void);\n", name)
-		}
-	}
-}
-
-func writeStage(stage int, initFuncs []*initFunc, w io.Writer) {
-	fmt.Fprintf(w, "    /*** Stage %d */\n", stage)
-	for i, initFunc := range initFuncs {
-		fmt.Fprintf(w, "    /* %d.%d: %s */\n", stage, i, initFunc.pkg.Name())
-		fmt.Fprintf(w, "    %s();\n", initFunc.name)
-	}
-}
-
-func write(pkgs []*pkg.LocalPackage, isLoader bool,
-	w io.Writer) {
-
-	stageMap := buildStageMap(pkgs)
-
-	i := 0
-	stages := make([]int, len(stageMap))
-	for k, _ := range stageMap {
-		stages[i] = k
-		i++
-	}
-	sort.Ints(stages)
-
-	fmt.Fprintf(w, newtutil.GeneratedPreamble())
-
-	if isLoader {
-		fmt.Fprintf(w, "#if SPLIT_LOADER\n\n")
-	} else {
-		fmt.Fprintf(w, "#if !SPLIT_LOADER\n\n")
-	}
-
-	writePrototypes(pkgs, w)
-
-	var fnName string
-	if isLoader {
-		fnName = "sysinit_loader"
-	} else {
-		fnName = "sysinit_app"
-	}
-
-	fmt.Fprintf(w, "\n")
-	fmt.Fprintf(w, "void\n%s(void)\n{\n", fnName)
-
-	for _, s := range stages {
-		fmt.Fprintf(w, "\n")
-		writeStage(s, stageMap[s], w)
-	}
-
-	fmt.Fprintf(w, "}\n\n")
-	fmt.Fprintf(w, "#endif\n")
-}
-
-func writeRequired(contents []byte, path string) (bool, error) {
-	oldSrc, err := ioutil.ReadFile(path)
-	if err != nil {
-		if os.IsNotExist(err) {
-			// File doesn't exist; write required.
-			return true, nil
-		}
-
-		return true, util.NewNewtError(err.Error())
-	}
-
-	rc := bytes.Compare(oldSrc, contents)
-	return rc != 0, nil
-}
-
-func EnsureWritten(pkgs []*pkg.LocalPackage, srcDir string, targetName string,
-	isLoader bool) error {
-
-	buf := bytes.Buffer{}
-	write(pkgs, isLoader, &buf)
-
-	var path string
-	if isLoader {
-		path = fmt.Sprintf("%s/%s-sysinit-loader.c", srcDir, targetName)
-	} else {
-		path = fmt.Sprintf("%s/%s-sysinit-app.c", srcDir, targetName)
-	}
-
-	writeReqd, err := writeRequired(buf.Bytes(), path)
-	if err != nil {
-		return err
-	}
-
-	if !writeReqd {
-		log.Debugf("sysinit unchanged; not writing src file (%s).", path)
-		return nil
-	}
-
-	log.Debugf("sysinit changed; writing src file (%s).", path)
-
-	if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	if err := ioutil.WriteFile(path, buf.Bytes(), 0644); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	return nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/target/target.go
----------------------------------------------------------------------
diff --git a/newt/target/target.go b/newt/target/target.go
deleted file mode 100644
index 26ca4cf..0000000
--- a/newt/target/target.go
+++ /dev/null
@@ -1,293 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package target
-
-import (
-	"os"
-	"path/filepath"
-	"sort"
-	"strings"
-
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/newt/repo"
-	"mynewt.apache.org/newt/util"
-	"mynewt.apache.org/newt/yaml"
-)
-
-const TARGET_FILENAME string = "target.yml"
-const DEFAULT_BUILD_PROFILE string = "default"
-
-var globalTargetMap map[string]*Target
-
-type Target struct {
-	basePkg *pkg.LocalPackage
-
-	BspName      string
-	AppName      string
-	LoaderName   string
-	BuildProfile string
-
-	// target.yml configuration structure
-	Vars map[string]string
-}
-
-func NewTarget(basePkg *pkg.LocalPackage) *Target {
-	target := &Target{}
-	target.Init(basePkg)
-	return target
-}
-
-func LoadTarget(basePkg *pkg.LocalPackage) (*Target, error) {
-	target := NewTarget(basePkg)
-	if err := target.Load(basePkg); err != nil {
-		return nil, err
-	}
-
-	return target, nil
-}
-
-func (target *Target) Init(basePkg *pkg.LocalPackage) {
-	target.basePkg = basePkg
-}
-
-func (target *Target) Load(basePkg *pkg.LocalPackage) error {
-	v, err := util.ReadConfig(basePkg.BasePath(),
-		strings.TrimSuffix(TARGET_FILENAME, ".yml"))
-	if err != nil {
-		return err
-	}
-
-	target.Vars = map[string]string{}
-
-	settings := v.AllSettings()
-	for k, v := range settings {
-		target.Vars[k] = v.(string)
-	}
-
-	target.BspName = target.Vars["target.bsp"]
-	target.AppName = target.Vars["target.app"]
-	target.LoaderName = target.Vars["target.loader"]
-	target.BuildProfile = target.Vars["target.build_profile"]
-
-	if target.BuildProfile == "" {
-		target.BuildProfile = DEFAULT_BUILD_PROFILE
-	}
-
-	// Note: App not required in the case of unit tests.
-
-	// Remember the name of the configuration file so that it can be specified
-	// as a dependency to the compiler.
-	target.basePkg.AddCfgFilename(basePkg.BasePath() + TARGET_FILENAME)
-
-	return nil
-}
-
-func (target *Target) Validate(appRequired bool) error {
-	if target.BspName == "" {
-		return util.NewNewtError("Target does not specify a BSP package " +
-			"(target.bsp)")
-	}
-	bsp := target.resolvePackageName(target.BspName)
-	if bsp == nil {
-		return util.FmtNewtError("Could not resolve BSP package: %s",
-			target.BspName)
-	}
-
-	if bsp.Type() != pkg.PACKAGE_TYPE_BSP {
-		return util.FmtNewtError("bsp package (%s) is not of "+
-			"type bsp; type is: %s\n", bsp.Name(),
-			pkg.PackageTypeNames[bsp.Type()])
-	}
-
-	if appRequired {
-		if target.AppName == "" {
-			return util.NewNewtError("Target does not specify an app " +
-				"package (target.app)")
-		}
-		app := target.resolvePackageName(target.AppName)
-		if app == nil {
-			return util.FmtNewtError("Could not resolve app package: %s",
-				target.AppName)
-		}
-
-		if app.Type() != pkg.PACKAGE_TYPE_APP {
-			return util.FmtNewtError("target.app package (%s) is not of "+
-				"type app; type is: %s\n", app.Name(),
-				pkg.PackageTypeNames[app.Type()])
-		}
-
-		if target.LoaderName != "" {
-			loader := target.resolvePackageName(target.LoaderName)
-			if loader == nil {
-				return util.FmtNewtError(
-					"Could not resolve loader package: %s", target.LoaderName)
-			}
-
-			if loader.Type() != pkg.PACKAGE_TYPE_APP {
-				return util.FmtNewtError(
-					"target.loader package (%s) is not of type app; type "+
-						"is: %s\n", loader.Name(),
-					pkg.PackageTypeNames[loader.Type()])
-			}
-		}
-	}
-
-	return nil
-}
-
-func (target *Target) Package() *pkg.LocalPackage {
-	return target.basePkg
-}
-
-func (target *Target) Name() string {
-	return target.basePkg.Name()
-}
-
-func (target *Target) FullName() string {
-	return target.basePkg.FullName()
-}
-
-func (target *Target) ShortName() string {
-	return filepath.Base(target.Name())
-}
-
-func (target *Target) Clone(newRepo *repo.Repo, newName string) *Target {
-	// Clone the target.
-	newTarget := *target
-	newTarget.basePkg = target.basePkg.Clone(newRepo, newName)
-
-	// Insert the clone into the global target map.
-	GetTargets()[newTarget.FullName()] = &newTarget
-
-	return &newTarget
-}
-
-func (target *Target) resolvePackageName(name string) *pkg.LocalPackage {
-	dep, err := pkg.NewDependency(target.basePkg.Repo(), name)
-	if err != nil {
-		return nil
-	}
-
-	pack, ok := project.GetProject().ResolveDependency(dep).(*pkg.LocalPackage)
-	if !ok {
-		return nil
-	}
-
-	return pack
-}
-
-func (target *Target) App() *pkg.LocalPackage {
-	return target.resolvePackageName(target.AppName)
-}
-
-func (target *Target) Loader() *pkg.LocalPackage {
-	return target.resolvePackageName(target.LoaderName)
-}
-
-func (target *Target) Bsp() *pkg.LocalPackage {
-	return target.resolvePackageName(target.BspName)
-}
-
-func (target *Target) BinBasePath() string {
-	appPkg := target.App()
-	if appPkg == nil {
-		return ""
-	}
-
-	return appPkg.BasePath() + "/bin/" + target.Name() + "/" +
-		appPkg.Name()
-}
-
-func (target *Target) ElfPath() string {
-	return target.BinBasePath() + ".elf"
-}
-
-func (target *Target) ImagePath() string {
-	return target.BinBasePath() + ".img"
-}
-
-// Save the target's configuration elements
-func (t *Target) Save() error {
-	if err := t.basePkg.Save(); err != nil {
-		return err
-	}
-
-	dirpath := t.basePkg.BasePath()
-	filepath := dirpath + "/" + TARGET_FILENAME
-	file, err := os.Create(filepath)
-	if err != nil {
-		return util.NewNewtError(err.Error())
-	}
-	defer file.Close()
-
-	file.WriteString("### Target: " + t.Name() + "\n")
-
-	keys := []string{}
-	for k, _ := range t.Vars {
-		keys = append(keys, k)
-	}
-	sort.Strings(keys)
-
-	for _, k := range keys {
-		file.WriteString(k + ": " + yaml.EscapeString(t.Vars[k]) + "\n")
-	}
-
-	if err := t.basePkg.SaveSyscfgVals(); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func buildTargetMap() error {
-	globalTargetMap = map[string]*Target{}
-
-	packs := project.GetProject().PackagesOfType(pkg.PACKAGE_TYPE_TARGET)
-	for _, packItf := range packs {
-		pack := packItf.(*pkg.LocalPackage)
-		target, err := LoadTarget(pack)
-		if err != nil {
-			nerr := err.(*util.NewtError)
-			util.ErrorMessage(util.VERBOSITY_QUIET,
-				"Warning: failed to load target \"%s\": %s\n", pack.Name(),
-				nerr.Text)
-		} else {
-			globalTargetMap[pack.FullName()] = target
-		}
-	}
-
-	return nil
-}
-
-func ResetTargets() {
-	globalTargetMap = nil
-}
-
-func GetTargets() map[string]*Target {
-	if globalTargetMap == nil {
-		err := buildTargetMap()
-		if err != nil {
-			panic(err.Error())
-		}
-	}
-
-	return globalTargetMap
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/toolchain/compiler.go
----------------------------------------------------------------------
diff --git a/newt/toolchain/compiler.go b/newt/toolchain/compiler.go
deleted file mode 100644
index d2e484c..0000000
--- a/newt/toolchain/compiler.go
+++ /dev/null
@@ -1,1286 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package toolchain
-
-import (
-	"fmt"
-	"io/ioutil"
-	"os"
-	"path"
-	"path/filepath"
-	"regexp"
-	"runtime"
-	"sort"
-	"strconv"
-	"strings"
-	"sync"
-	"time"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/newt/symbol"
-	"mynewt.apache.org/newt/util"
-	"mynewt.apache.org/newt/viper"
-)
-
-const COMPILER_FILENAME string = "compiler.yml"
-
-const (
-	COMPILER_TYPE_C       = 0
-	COMPILER_TYPE_ASM     = 1
-	COMPILER_TYPE_CPP     = 2
-	COMPILER_TYPE_ARCHIVE = 3
-)
-
-type CompilerInfo struct {
-	Includes    []string
-	Cflags      []string
-	Lflags      []string
-	Aflags      []string
-	IgnoreFiles []*regexp.Regexp
-	IgnoreDirs  []*regexp.Regexp
-}
-
-type Compiler struct {
-	objPathList   map[string]bool
-	LinkerScripts []string
-
-	// Needs to be locked whenever a mutable field in this struct is accessed
-	// during a build.  Currently, objPathList is the only such member.
-	mutex *sync.Mutex
-
-	depTracker            DepTracker
-	ccPath                string
-	cppPath               string
-	asPath                string
-	arPath                string
-	odPath                string
-	osPath                string
-	ocPath                string
-	ldResolveCircularDeps bool
-	ldMapFile             bool
-	ldBinFile             bool
-	baseDir               string
-	srcDir                string
-	dstDir                string
-
-	// The info to be applied during compilation.
-	info CompilerInfo
-
-	// Info read from the compiler package itself.  This is kept separate from
-	// the rest of the info because it has the lowest priority; it can only be
-	// added immediately before compiling beings.
-	lclInfo CompilerInfo
-
-	// Indicates whether the local compiler info has been appended to the
-	// common info set.  Ensures the local info only gets added once.
-	lclInfoAdded bool
-
-	extraDeps []string
-}
-
-type CompilerJob struct {
-	Filename     string
-	Compiler     *Compiler
-	CompilerType int
-}
-
-func NewCompilerInfo() *CompilerInfo {
-	ci := &CompilerInfo{}
-	ci.Includes = []string{}
-	ci.Cflags = []string{}
-	ci.Lflags = []string{}
-	ci.Aflags = []string{}
-	ci.IgnoreFiles = []*regexp.Regexp{}
-	ci.IgnoreDirs = []*regexp.Regexp{}
-
-	return ci
-}
-
-// Extracts the base of a flag string.  A flag base is used when detecting flag
-// conflicts.  If two flags have identicial bases, then they are in conflict.
-func flagsBase(cflags string) string {
-	eqIdx := strings.IndexByte(cflags, '=')
-	if eqIdx == -1 {
-		return cflags
-	} else {
-		return cflags[:eqIdx]
-	}
-}
-
-// Creates a map of flag bases to flag values, i.e.,
-//     [flag-base] => flag
-//
-// This is used to make flag conflict detection more efficient.
-func flagsMap(cflags []string) map[string]string {
-	hash := map[string]string{}
-	for _, cf := range cflags {
-		hash[flagsBase(cf)] = cf
-	}
-
-	return hash
-}
-
-// Appends a new set of flags to an original set.  If a new flag conflicts with
-// an original, the new flag is discarded.  The assumption is that flags from
-// higher priority packages get added first.
-//
-// This is not terribly efficient: it results in flag maps being generated
-// repeatedly when they could be cached.  Any inefficiencies here are probably
-// negligible compared to the time spent compiling and linking.  If this
-// assumption turns out to be incorrect, we should cache the flag maps.
-func addFlags(flagType string, orig []string, new []string) []string {
-	origMap := flagsMap(orig)
-
-	combined := orig
-	for _, c := range new {
-		newBase := flagsBase(c)
-		origVal := origMap[newBase]
-		if origVal == "" {
-			// New flag; add it.
-			combined = append(combined, c)
-		} else {
-			// Flag already present from a higher priority package; discard the
-			// new one.
-			if origVal != c {
-				log.Debugf("Discarding %s %s in favor of %s", flagType, c,
-					origVal)
-			}
-		}
-	}
-
-	return combined
-}
-
-func (ci *CompilerInfo) AddCflags(cflags []string) {
-	ci.Cflags = addFlags("cflag", ci.Cflags, cflags)
-}
-
-func (ci *CompilerInfo) AddCompilerInfo(newCi *CompilerInfo) {
-	ci.Includes = append(ci.Includes, newCi.Includes...)
-	ci.Cflags = addFlags("cflag", ci.Cflags, newCi.Cflags)
-	ci.Lflags = addFlags("lflag", ci.Lflags, newCi.Lflags)
-	ci.Aflags = addFlags("aflag", ci.Aflags, newCi.Aflags)
-	ci.IgnoreFiles = append(ci.IgnoreFiles, newCi.IgnoreFiles...)
-	ci.IgnoreDirs = append(ci.IgnoreDirs, newCi.IgnoreDirs...)
-}
-
-func NewCompiler(compilerDir string, dstDir string,
-	buildProfile string) (*Compiler, error) {
-
-	c := &Compiler{
-		mutex:       &sync.Mutex{},
-		objPathList: map[string]bool{},
-		baseDir:     project.GetProject().BasePath,
-		srcDir:      "",
-		dstDir:      dstDir,
-		extraDeps:   []string{},
-	}
-
-	c.depTracker = NewDepTracker(c)
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE,
-		"Loading compiler %s, buildProfile %s\n", compilerDir,
-		buildProfile)
-	err := c.load(compilerDir, buildProfile)
-	if err != nil {
-		return nil, err
-	}
-
-	return c, nil
-}
-
-func loadFlags(v *viper.Viper, features map[string]bool,
-	key string) []string {
-
-	flags := []string{}
-
-	rawFlags := newtutil.GetStringSliceFeatures(v, features, key)
-	for _, rawFlag := range rawFlags {
-		if strings.HasPrefix(rawFlag, key) {
-			expandedFlags := newtutil.GetStringSliceFeatures(v, features,
-				rawFlag)
-
-			flags = append(flags, expandedFlags...)
-		} else {
-			flags = append(flags, strings.Trim(rawFlag, "\n"))
-		}
-	}
-
-	return flags
-}
-
-func (c *Compiler) load(compilerDir string, buildProfile string) error {
-	v, err := util.ReadConfig(compilerDir, "compiler")
-	if err != nil {
-		return err
-	}
-
-	features := map[string]bool{
-		buildProfile:                  true,
-		strings.ToUpper(runtime.GOOS): true,
-	}
-
-	c.ccPath = newtutil.GetStringFeatures(v, features, "compiler.path.cc")
-	c.cppPath = newtutil.GetStringFeatures(v, features, "compiler.path.cpp")
-	c.asPath = newtutil.GetStringFeatures(v, features, "compiler.path.as")
-	c.arPath = newtutil.GetStringFeatures(v, features, "compiler.path.archive")
-	c.odPath = newtutil.GetStringFeatures(v, features, "compiler.path.objdump")
-	c.osPath = newtutil.GetStringFeatures(v, features, "compiler.path.objsize")
-	c.ocPath = newtutil.GetStringFeatures(v, features, "compiler.path.objcopy")
-
-	c.lclInfo.Cflags = loadFlags(v, features, "compiler.flags")
-	c.lclInfo.Lflags = loadFlags(v, features, "compiler.ld.flags")
-	c.lclInfo.Aflags = loadFlags(v, features, "compiler.as.flags")
-
-	c.ldResolveCircularDeps, err = newtutil.GetBoolFeatures(v, features,
-		"compiler.ld.resolve_circular_deps")
-	if err != nil {
-		return err
-	}
-
-	c.ldMapFile, err = newtutil.GetBoolFeatures(v, features,
-		"compiler.ld.mapfile")
-	if err != nil {
-		return err
-	}
-
-	c.ldBinFile, err = newtutil.GetBoolFeaturesDflt(v, features,
-		"compiler.ld.binfile", true)
-	if err != nil {
-		return err
-	}
-
-	if len(c.lclInfo.Cflags) == 0 {
-		// Assume no Cflags implies an unsupported build profile.
-		return util.FmtNewtError("Compiler doesn't support build profile "+
-			"specified by target on this OS (build_profile=\"%s\" OS=\"%s\")",
-			buildProfile, runtime.GOOS)
-	}
-
-	return nil
-}
-
-func (c *Compiler) AddInfo(info *CompilerInfo) {
-	c.info.AddCompilerInfo(info)
-}
-
-func (c *Compiler) DstDir() string {
-	return c.dstDir
-}
-
-func (c *Compiler) SetSrcDir(srcDir string) {
-	c.srcDir = filepath.ToSlash(filepath.Clean(srcDir))
-}
-
-func (c *Compiler) AddDeps(depFilenames ...string) {
-	c.extraDeps = append(c.extraDeps, depFilenames...)
-}
-
-// Skips compilation of the specified C or assembly file, but adds the name of
-// the object file that would have been generated to the compiler's list of
-// object files.  This function is used when the object file is already up to
-// date, so no compilation is necessary.  The name of the object file should
-// still be remembered so that it gets linked in to the final library or
-// executable.
-func (c *Compiler) SkipSourceFile(srcFile string) error {
-	objPath := c.dstFilePath(srcFile) + ".o"
-
-	c.mutex.Lock()
-	c.objPathList[filepath.ToSlash(objPath)] = true
-	c.mutex.Unlock()
-
-	// Update the dependency tracker with the object file's modification time.
-	// This is necessary later for determining if the library / executable
-	// needs to be rebuilt.
-	err := c.depTracker.ProcessFileTime(objPath)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-// Generates a string consisting of all the necessary include path (-I)
-// options.  The result is sorted and contains no duplicate paths.
-func (c *Compiler) includesStrings() []string {
-	if len(c.info.Includes) == 0 {
-		return nil
-	}
-
-	includes := util.SortFields(c.info.Includes...)
-
-	tokens := make([]string, len(includes))
-	for i, s := range includes {
-		s = strings.TrimPrefix(filepath.ToSlash(filepath.Clean(s)), c.baseDir+"/")
-		tokens[i] = "-I" + s
-	}
-
-	return tokens
-}
-
-func (c *Compiler) cflagsStrings() []string {
-	cflags := util.SortFields(c.info.Cflags...)
-	return cflags
-}
-
-func (c *Compiler) aflagsStrings() []string {
-	aflags := util.SortFields(c.info.Aflags...)
-	return aflags
-}
-
-func (c *Compiler) lflagsStrings() []string {
-	lflags := util.SortFields(c.info.Lflags...)
-	return lflags
-}
-
-func (c *Compiler) depsString() string {
-	extraDeps := util.SortFields(c.extraDeps...)
-	return strings.Join(extraDeps, " ") + "\n"
-}
-
-func (c *Compiler) dstFilePath(srcPath string) string {
-	relSrcPath := strings.TrimPrefix(filepath.ToSlash(srcPath), c.baseDir+"/")
-	relDstPath := strings.TrimSuffix(relSrcPath, filepath.Ext(srcPath))
-	dstPath := fmt.Sprintf("%s/%s", c.dstDir, relDstPath)
-	return dstPath
-}
-
-// Calculates the command-line invocation necessary to compile the specified C
-// or assembly file.
-//
-// @param file                  The filename of the source file to compile.
-// @param compilerType          One of the COMPILER_TYPE_[...] constants.
-//
-// @return                      (success) The command arguments.
-func (c *Compiler) CompileFileCmd(file string, compilerType int) (
-	[]string, error) {
-
-	objPath := c.dstFilePath(file) + ".o"
-
-	var cmdName string
-	var flags []string
-	switch compilerType {
-	case COMPILER_TYPE_C:
-		cmdName = c.ccPath
-		flags = c.cflagsStrings()
-	case COMPILER_TYPE_ASM:
-		cmdName = c.asPath
-
-		// Include both the compiler flags and the assembler flags.
-		// XXX: This is not great.  We don't have a way of specifying compiler
-		// flags without also passing them to the assembler.
-		flags = append(c.cflagsStrings(), c.aflagsStrings()...)
-	case COMPILER_TYPE_CPP:
-		cmdName = c.cppPath
-		flags = c.cflagsStrings()
-	default:
-		return nil, util.NewNewtError("Unknown compiler type")
-	}
-
-	srcPath := strings.TrimPrefix(file, c.baseDir+"/")
-	cmd := []string{cmdName}
-	cmd = append(cmd, flags...)
-	cmd = append(cmd, c.includesStrings()...)
-	cmd = append(cmd, []string{
-		"-c",
-		"-o",
-		objPath,
-		srcPath,
-	}...)
-
-	return cmd, nil
-}
-
-// Generates a dependency Makefile (.d) for the specified source C file.
-//
-// @param file                  The name of the source file.
-func (c *Compiler) GenDepsForFile(file string) error {
-	depPath := c.dstFilePath(file) + ".d"
-	depDir := filepath.Dir(depPath)
-	if util.NodeNotExist(depDir) {
-		os.MkdirAll(depDir, 0755)
-	}
-
-	srcPath := strings.TrimPrefix(file, c.baseDir+"/")
-	cmd := []string{c.ccPath}
-	cmd = append(cmd, c.cflagsStrings()...)
-	cmd = append(cmd, c.includesStrings()...)
-	cmd = append(cmd, []string{"-MM", "-MG", srcPath}...)
-
-	o, err := util.ShellCommandLimitDbgOutput(cmd, nil, 0)
-	if err != nil {
-		return err
-	}
-
-	// Write the compiler output to a dependency file.
-	f, err := os.OpenFile(depPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0666)
-	if err != nil {
-		return util.ChildNewtError(err)
-	}
-	defer f.Close()
-
-	if _, err := f.Write(o); err != nil {
-		return util.ChildNewtError(err)
-	}
-
-	// Append the extra dependencies (.yml files) to the .d file.
-	objFile := strings.TrimSuffix(file, filepath.Ext(file)) + ".o"
-	if _, err := f.WriteString(objFile + ": " + c.depsString()); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	return nil
-}
-
-func serializeCommand(cmd []string) []byte {
-	// Use a newline as the separator rather than a space to disambiguate cases
-	// where arguments contain spaces.
-	return []byte(strings.Join(cmd, "\n"))
-}
-
-// Writes a file containing the command-line invocation used to generate the
-// specified file.  The file that this function writes can be used later to
-// determine if the set of compiler options has changed.
-//
-// @param dstFile               The output file whose build invocation is being
-//                                  recorded.
-// @param cmd                   The command strings to write.
-func writeCommandFile(dstFile string, cmd []string) error {
-	cmdPath := dstFile + ".cmd"
-	content := serializeCommand(cmd)
-	err := ioutil.WriteFile(cmdPath, content, 0644)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-// Adds the info from the compiler package to the common set if it hasn't
-// already been added.  The compiler package's info needs to be added last
-// because the compiler is the lowest priority package.
-func (c *Compiler) ensureLclInfoAdded() {
-	if !c.lclInfoAdded {
-		log.Debugf("Generating build flags for compiler")
-		c.AddInfo(&c.lclInfo)
-		c.lclInfoAdded = true
-	}
-}
-
-// Compile the specified C or assembly file.
-//
-// @param file                  The filename of the source file to compile.
-// @param compilerType          One of the COMPILER_TYPE_[...] constants.
-func (c *Compiler) CompileFile(file string, compilerType int) error {
-	objPath := c.dstFilePath(file) + ".o"
-	objDir := filepath.Dir(objPath)
-	if util.NodeNotExist(objDir) {
-		os.MkdirAll(objDir, 0755)
-	}
-
-	c.mutex.Lock()
-	c.objPathList[filepath.ToSlash(objPath)] = true
-	c.mutex.Unlock()
-
-	cmd, err := c.CompileFileCmd(file, compilerType)
-	if err != nil {
-		return err
-	}
-
-	srcPath := strings.TrimPrefix(file, c.baseDir+"/")
-	switch compilerType {
-	case COMPILER_TYPE_C:
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "Compiling %s\n", srcPath)
-	case COMPILER_TYPE_CPP:
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "Compiling %s\n", srcPath)
-	case COMPILER_TYPE_ASM:
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "Assembling %s\n", srcPath)
-	default:
-		return util.NewNewtError("Unknown compiler type")
-	}
-
-	_, err = util.ShellCommand(cmd, nil)
-	if err != nil {
-		return err
-	}
-
-	err = writeCommandFile(objPath, cmd)
-	if err != nil {
-		return err
-	}
-
-	// Tell the dependency tracker that an object file was just rebuilt.
-	c.depTracker.MostRecent = time.Now()
-
-	return nil
-}
-
-func (c *Compiler) shouldIgnoreFile(file string) bool {
-	file = strings.TrimPrefix(file, c.srcDir)
-	for _, re := range c.info.IgnoreFiles {
-		if match := re.MatchString(file); match {
-			return true
-		}
-	}
-
-	return false
-}
-
-func compilerTypeToExts(compilerType int) ([]string, error) {
-	switch compilerType {
-	case COMPILER_TYPE_C:
-		return []string{"c"}, nil
-	case COMPILER_TYPE_ASM:
-		return []string{"s", "S"}, nil
-	case COMPILER_TYPE_CPP:
-		return []string{"cc", "cpp", "cxx"}, nil
-	case COMPILER_TYPE_ARCHIVE:
-		return []string{"a"}, nil
-	default:
-		return nil, util.NewNewtError("Wrong compiler type specified to " +
-			"compilerTypeToExts")
-	}
-}
-
-// Compiles all C files matching the specified file glob.
-func (c *Compiler) CompileC(filename string) error {
-	filename = filepath.ToSlash(filename)
-
-	if c.shouldIgnoreFile(filename) {
-		log.Infof("Ignoring %s because package dictates it.", filename)
-		return nil
-	}
-
-	compileRequired, err := c.depTracker.CompileRequired(filename,
-		COMPILER_TYPE_C)
-	if err != nil {
-		return err
-	}
-	if compileRequired {
-		err = c.CompileFile(filename, COMPILER_TYPE_C)
-	} else {
-		err = c.SkipSourceFile(filename)
-	}
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-// Compiles all CPP files
-func (c *Compiler) CompileCpp(filename string) error {
-	filename = filepath.ToSlash(filename)
-
-	if c.shouldIgnoreFile(filename) {
-		log.Infof("Ignoring %s because package dictates it.", filename)
-		return nil
-	}
-
-	compileRequired, err := c.depTracker.CompileRequired(filename,
-		COMPILER_TYPE_CPP)
-	if err != nil {
-		return err
-	}
-
-	if compileRequired {
-		err = c.CompileFile(filename, COMPILER_TYPE_CPP)
-	} else {
-		err = c.SkipSourceFile(filename)
-	}
-
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-// Compiles all assembly files matching the specified file glob.
-//
-// @param match                 The file glob specifying which assembly files
-//                                  to compile.
-func (c *Compiler) CompileAs(filename string) error {
-	filename = filepath.ToSlash(filename)
-
-	if c.shouldIgnoreFile(filename) {
-		log.Infof("Ignoring %s because package dictates it.", filename)
-		return nil
-	}
-
-	compileRequired, err := c.depTracker.CompileRequired(filename,
-		COMPILER_TYPE_ASM)
-	if err != nil {
-		return err
-	}
-	if compileRequired {
-		err = c.CompileFile(filename, COMPILER_TYPE_ASM)
-	} else {
-		err = c.SkipSourceFile(filename)
-	}
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-// Copies all archive files matching the specified file glob.
-//
-// @param match                 The file glob specifying which assembly files
-//                                  to compile.
-func (c *Compiler) CopyArchive(filename string) error {
-	filename = filepath.ToSlash(filename)
-
-	if c.shouldIgnoreFile(filename) {
-		log.Infof("Ignoring %s because package dictates it.", filename)
-		return nil
-	}
-
-	tgtFile := c.dstFilePath(filename) + ".a"
-	copyRequired, err := c.depTracker.CopyRequired(filename)
-	if err != nil {
-		return err
-	}
-	if copyRequired {
-		err = util.CopyFile(filename, tgtFile)
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "copying %s\n",
-			filepath.ToSlash(tgtFile))
-	}
-
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (c *Compiler) processEntry(node os.FileInfo, cType int,
-	ignDirs []string) ([]CompilerJob, error) {
-
-	// check to see if we ignore this element
-	for _, dir := range ignDirs {
-		if dir == node.Name() {
-			return nil, nil
-		}
-	}
-
-	// Check in the user specified ignore directories
-	for _, dir := range c.info.IgnoreDirs {
-		if dir.MatchString(node.Name()) {
-			return nil, nil
-		}
-	}
-
-	// If not, recurse into the directory.  Make the output directory
-	// structure mirror that of the source tree.
-	prevSrcDir := c.srcDir
-	prevDstDir := c.dstDir
-
-	c.srcDir += "/" + node.Name()
-	c.dstDir += "/" + node.Name()
-
-	entries, err := c.RecursiveCollectEntries(cType, ignDirs)
-
-	// Restore the compiler destination directory now that the child
-	// directory has been fully built.
-	c.srcDir = prevSrcDir
-	c.dstDir = prevDstDir
-
-	return entries, err
-}
-
-func (c *Compiler) RecursiveCollectEntries(cType int,
-	ignDirs []string) ([]CompilerJob, error) {
-
-	// Make sure the compiler package info is added to the global set.
-	c.ensureLclInfoAdded()
-
-	if err := os.Chdir(c.baseDir); err != nil {
-		return nil, util.ChildNewtError(err)
-	}
-
-	// Get a list of files in the current directory, and if they are a
-	// directory, and that directory is not in the ignDirs variable, then
-	// recurse into that directory and compile the files in there
-
-	ls, err := ioutil.ReadDir(c.srcDir)
-	if err != nil {
-		return nil, util.NewNewtError(err.Error())
-	}
-
-	entries := []CompilerJob{}
-	for _, node := range ls {
-		if node.IsDir() {
-			subEntries, err := c.processEntry(node, cType, ignDirs)
-			if err != nil {
-				return nil, err
-			}
-
-			entries = append(entries, subEntries...)
-		}
-	}
-
-	exts, err := compilerTypeToExts(cType)
-	if err != nil {
-		return nil, err
-	}
-
-	for _, ext := range exts {
-		files, _ := filepath.Glob(c.srcDir + "/*." + ext)
-		for _, file := range files {
-			entries = append(entries, CompilerJob{
-				Filename:     file,
-				Compiler:     c,
-				CompilerType: cType,
-			})
-		}
-	}
-
-	return entries, nil
-}
-
-func RunJob(record CompilerJob) error {
-	switch record.CompilerType {
-	case COMPILER_TYPE_C:
-		return record.Compiler.CompileC(record.Filename)
-	case COMPILER_TYPE_ASM:
-		return record.Compiler.CompileAs(record.Filename)
-	case COMPILER_TYPE_CPP:
-		return record.Compiler.CompileCpp(record.Filename)
-	case COMPILER_TYPE_ARCHIVE:
-		return record.Compiler.CopyArchive(record.Filename)
-	default:
-		return util.NewNewtError("Wrong compiler type specified to " +
-			"RunJob")
-	}
-}
-
-func (c *Compiler) getObjFiles(baseObjFiles []string) []string {
-	c.mutex.Lock()
-	for objName, _ := range c.objPathList {
-		baseObjFiles = append(baseObjFiles, objName)
-	}
-	c.mutex.Unlock()
-
-	sort.Strings(baseObjFiles)
-	return baseObjFiles
-}
-
-// Calculates the command-line invocation necessary to link the specified elf
-// file.
-//
-// @param dstFile               The filename of the destination elf file to
-//                                  link.
-// @param options               Some build options specifying how the elf file
-//                                  gets generated.
-// @param objFiles              An array of the source .o and .a filenames.
-//
-// @return                      (success) The command tokens.
-func (c *Compiler) CompileBinaryCmd(dstFile string, options map[string]bool,
-	objFiles []string, keepSymbols []string, elfLib string) []string {
-
-	objList := c.getObjFiles(util.UniqueStrings(objFiles))
-
-	cmd := []string{
-		c.ccPath,
-		"-o",
-		dstFile,
-	}
-	cmd = append(cmd, c.cflagsStrings()...)
-
-	if elfLib != "" {
-		cmd = append(cmd, "-Wl,--just-symbols="+elfLib)
-	}
-
-	if c.ldResolveCircularDeps {
-		cmd = append(cmd, "-Wl,--start-group")
-		cmd = append(cmd, objList...)
-		cmd = append(cmd, "-Wl,--end-group")
-	} else {
-		cmd = append(cmd, objList...)
-	}
-
-	if keepSymbols != nil {
-		for _, name := range keepSymbols {
-			cmd = append(cmd, "-Wl,--undefined="+name)
-		}
-	}
-
-	cmd = append(cmd, c.lflagsStrings()...)
-
-	/* so we don't get multiple global definitions of the same vartiable */
-	//cmd += " -Wl,--warn-common "
-
-	for _, ls := range c.LinkerScripts {
-		cmd = append(cmd, "-T")
-		cmd = append(cmd, ls)
-	}
-	if options["mapFile"] {
-		cmd = append(cmd, "-Wl,-Map="+dstFile+".map")
-	}
-
-	return cmd
-}
-
-// Links the specified elf file.
-//
-// @param dstFile               The filename of the destination elf file to
-//                                  link.
-// @param options               Some build options specifying how the elf file
-//                                  gets generated.
-// @param objFiles              An array of the source .o and .a filenames.
-func (c *Compiler) CompileBinary(dstFile string, options map[string]bool,
-	objFiles []string, keepSymbols []string, elfLib string) error {
-
-	// Make sure the compiler package info is added to the global set.
-	c.ensureLclInfoAdded()
-
-	objList := c.getObjFiles(util.UniqueStrings(objFiles))
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "Linking %s\n", dstFile)
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Linking %s with input files %s\n",
-		dstFile, objList)
-
-	if elfLib != "" {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "Linking %s with rom image %s\n",
-			dstFile, elfLib)
-	}
-
-	cmd := c.CompileBinaryCmd(dstFile, options, objFiles, keepSymbols, elfLib)
-	_, err := util.ShellCommand(cmd, nil)
-	if err != nil {
-		return err
-	}
-
-	err = writeCommandFile(dstFile, cmd)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-// Generates the following build artifacts:
-//    * lst file
-//    * map file
-//    * bin file
-//
-// @param elfFilename           The filename of the elf file corresponding to
-//                                  the artifacts to be generated.
-// @param options               Some build options specifying which artifacts
-//                                  get generated.
-func (c *Compiler) generateExtras(elfFilename string,
-	options map[string]bool) error {
-
-	if options["binFile"] {
-		binFile := elfFilename + ".bin"
-		cmd := []string{
-			c.ocPath,
-			"-R",
-			".bss",
-			"-R",
-			".bss.core",
-			"-R",
-			".bss.core.nz",
-			"-O",
-			"binary",
-			elfFilename,
-			binFile,
-		}
-		_, err := util.ShellCommand(cmd, nil)
-		if err != nil {
-			return err
-		}
-	}
-
-	if options["listFile"] {
-		listFile := elfFilename + ".lst"
-		f, err := os.OpenFile(listFile, os.O_CREATE|os.O_WRONLY|os.O_TRUNC,
-			0666)
-		if err != nil {
-			return util.NewNewtError(err.Error())
-		}
-		defer f.Close()
-
-		cmd := []string{
-			c.odPath,
-			"-wxdS",
-			elfFilename,
-		}
-		o, err := util.ShellCommandLimitDbgOutput(cmd, nil, 0)
-		if err != nil {
-			// XXX: gobjdump appears to always crash.  Until we get that sorted
-			// out, don't fail the link process if lst generation fails.
-			return nil
-		}
-
-		if _, err := f.Write(o); err != nil {
-			return util.ChildNewtError(err)
-		}
-
-		sects := []string{".text", ".rodata", ".data"}
-		for _, sect := range sects {
-			cmd := []string{
-				c.odPath,
-				"-s",
-				"-j",
-				sect,
-				elfFilename,
-			}
-			o, err := util.ShellCommandLimitDbgOutput(cmd, nil, 0)
-			if err != nil {
-				if _, err := f.Write(o); err != nil {
-					return util.NewNewtError(err.Error())
-				}
-			}
-		}
-
-		cmd = []string{
-			c.osPath,
-			elfFilename,
-		}
-		o, err = util.ShellCommandLimitDbgOutput(cmd, nil, 0)
-		if err != nil {
-			return err
-		}
-		if _, err := f.Write(o); err != nil {
-			return util.NewNewtError(err.Error())
-		}
-	}
-
-	return nil
-}
-
-func (c *Compiler) PrintSize(elfFilename string) (string, error) {
-	cmd := []string{
-		c.osPath,
-		elfFilename,
-	}
-	o, err := util.ShellCommand(cmd, nil)
-	if err != nil {
-		return "", err
-	}
-	return string(o), nil
-}
-
-// Links the specified elf file and generates some associated artifacts (lst,
-// bin, and map files).
-//
-// @param binFile               The filename of the destination elf file to
-//                                  link.
-// @param options               Some build options specifying how the elf file
-//                                  gets generated.
-// @param objFiles              An array of the source .o and .a filenames.
-func (c *Compiler) CompileElf(binFile string, objFiles []string,
-	keepSymbols []string, elfLib string) error {
-	options := map[string]bool{"mapFile": c.ldMapFile,
-		"listFile": true, "binFile": c.ldBinFile}
-
-	// Make sure the compiler package info is added to the global set.
-	c.ensureLclInfoAdded()
-
-	linkRequired, err := c.depTracker.LinkRequired(binFile, options,
-		objFiles, keepSymbols, elfLib)
-	if err != nil {
-		return err
-	}
-	if linkRequired {
-		if err := os.MkdirAll(filepath.Dir(binFile), 0755); err != nil {
-			return util.NewNewtError(err.Error())
-		}
-		err := c.CompileBinary(binFile, options, objFiles, keepSymbols, elfLib)
-		if err != nil {
-			return err
-		}
-	}
-
-	err = c.generateExtras(binFile, options)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (c *Compiler) RenameSymbolsCmd(
-	sm *symbol.SymbolMap, libraryFile string, ext string) []string {
-
-	cmd := []string{c.ocPath}
-	for s, _ := range *sm {
-		cmd = append(cmd, "--redefine-sym")
-		cmd = append(cmd, s+"="+s+ext)
-	}
-
-	cmd = append(cmd, libraryFile)
-	return cmd
-}
-
-func (c *Compiler) ParseLibraryCmd(libraryFile string) []string {
-	return []string{
-		c.odPath,
-		"-t",
-		libraryFile,
-	}
-}
-
-func (c *Compiler) CopySymbolsCmd(infile string, outfile string, sm *symbol.SymbolMap) []string {
-
-	cmd := []string{c.ocPath, "-S"}
-	for symbol, _ := range *sm {
-		cmd = append(cmd, "-K")
-		cmd = append(cmd, symbol)
-	}
-
-	cmd = append(cmd, infile)
-	cmd = append(cmd, outfile)
-
-	return cmd
-}
-
-// Calculates the command-line invocation necessary to archive the specified
-// static library.
-//
-// @param archiveFile           The filename of the library to archive.
-// @param objFiles              An array of the source .o filenames.
-//
-// @return                      The command string.
-func (c *Compiler) CompileArchiveCmd(archiveFile string,
-	objFiles []string) []string {
-
-	cmd := []string{
-		c.arPath,
-		"rcs",
-		archiveFile,
-	}
-	cmd = append(cmd, c.getObjFiles(objFiles)...)
-	return cmd
-}
-
-func linkerScriptFileName(archiveFile string) string {
-	ar_script_name := strings.TrimSuffix(archiveFile, filepath.Ext(archiveFile)) + "_ar.mri"
-	return ar_script_name
-}
-
-/* this create a new library combining all of the other libraries */
-func createSplitArchiveLinkerFile(archiveFile string,
-	archFiles []string) error {
-
-	/* create a name for this script */
-	ar_script_name := linkerScriptFileName(archiveFile)
-
-	// open the file and write out the script
-	f, err := os.OpenFile(ar_script_name, os.O_CREATE|os.O_WRONLY|os.O_TRUNC,
-		0666)
-	if err != nil {
-		return util.NewNewtError(err.Error())
-	}
-	defer f.Close()
-
-	if _, err := f.WriteString("CREATE " + archiveFile + "\n"); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	for _, arch := range archFiles {
-		if _, err := f.WriteString("ADDLIB " + arch + "\n"); err != nil {
-			return util.NewNewtError(err.Error())
-		}
-	}
-
-	if _, err := f.WriteString("SAVE\n"); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	if _, err := f.WriteString("END\n"); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	return nil
-}
-
-// calculates the command-line invocation necessary to build a split all
-// archive from the collection of archive files
-func (c *Compiler) BuildSplitArchiveCmd(archiveFile string) string {
-
-	str := c.arPath + " -M < " + linkerScriptFileName(archiveFile)
-	return str
-}
-
-// Archives the specified static library.
-//
-// @param archiveFile           The filename of the library to archive.
-// @param objFiles              An array of the source .o filenames.
-func (c *Compiler) CompileArchive(archiveFile string) error {
-	objFiles := []string{}
-
-	// Make sure the compiler package info is added to the global set.
-	c.ensureLclInfoAdded()
-
-	arRequired, err := c.depTracker.ArchiveRequired(archiveFile, objFiles)
-	if err != nil {
-		return err
-	}
-	if !arRequired {
-		return nil
-	}
-
-	if err := os.MkdirAll(filepath.Dir(archiveFile), 0755); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	// Delete the old archive, if it exists.
-	os.Remove(archiveFile)
-
-	objList := c.getObjFiles([]string{})
-	if objList == nil {
-		return nil
-	}
-
-	if len(objList) == 0 {
-		util.StatusMessage(util.VERBOSITY_VERBOSE,
-			"Not archiving %s; no object files\n", archiveFile)
-		return nil
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "Archiving %s",
-		path.Base(archiveFile))
-	util.StatusMessage(util.VERBOSITY_VERBOSE, " with object files %s",
-		strings.Join(objList, " "))
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "\n")
-
-	if err != nil && !os.IsNotExist(err) {
-		return util.NewNewtError(err.Error())
-	}
-
-	cmd := c.CompileArchiveCmd(archiveFile, objFiles)
-	_, err = util.ShellCommand(cmd, nil)
-	if err != nil {
-		return err
-	}
-
-	err = writeCommandFile(archiveFile, cmd)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func getParseRexeg() (error, *regexp.Regexp) {
-	r, err := regexp.Compile("^([0-9A-Fa-f]+)[\t ]+([lgu! ][w ][C ][W ][Ii ][Dd ][FfO ])[\t ]+([^\t\n\f\r ]+)[\t ]+([0-9a-fA-F]+)[\t ]([^\t\n\f\r ]+)")
-
-	if err != nil {
-		return err, nil
-	}
-
-	return nil, r
-}
-
-/* This is a tricky thing to parse. Right now, I keep all the
- * flags together and just store the offset, size, name and flags.
-* 00012970 l       .bss	00000000 _end
-* 00011c60 l       .init_array	00000000 __init_array_start
-* 00011c60 l       .init_array	00000000 __preinit_array_start
-* 000084b0 g     F .text	00000034 os_arch_start
-* 00000000 g       .debug_aranges	00000000 __HeapBase
-* 00011c88 g     O .data	00000008 g_os_task_list
-* 000082cc g     F .text	0000004c os_idle_task
-* 000094e0 g     F .text	0000002e .hidden __gnu_uldivmod_helper
-* 00000000 g       .svc_table	00000000 SVC_Count
-* 000125e4 g     O .bss	00000004 g_console_is_init
-* 00009514 g     F .text	0000029c .hidden __divdi3
-* 000085a8 g     F .text	00000054 os_eventq_put
-*/
-func ParseObjectLine(line string, r *regexp.Regexp) (error, *symbol.SymbolInfo) {
-
-	answer := r.FindAllStringSubmatch(line, 11)
-
-	if len(answer) == 0 {
-		return nil, nil
-	}
-
-	data := answer[0]
-
-	if len(data) != 6 {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Not enough content in object file line --- %s", line)
-		return nil, nil
-	}
-
-	si := symbol.NewSymbolInfo()
-
-	si.Name = data[5]
-
-	v, err := strconv.ParseUint(data[1], 16, 32)
-
-	if err != nil {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Could not convert location from object file line --- %s", line)
-		return nil, nil
-	}
-
-	si.Loc = int(v)
-
-	v, err = strconv.ParseUint(data[4], 16, 32)
-
-	if err != nil {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Could not convert size form object file line --- %s", line)
-		return nil, nil
-	}
-
-	si.Size = int(v)
-	si.Code = data[2]
-	si.Section = data[3]
-
-	return nil, si
-}
-
-func (c *Compiler) RenameSymbols(sm *symbol.SymbolMap, libraryFile string, ext string) error {
-
-	cmd := c.RenameSymbolsCmd(sm, libraryFile, ext)
-
-	_, err := util.ShellCommand(cmd, nil)
-
-	return err
-}
-
-func (c *Compiler) ParseLibrary(libraryFile string) (error, []byte) {
-	cmd := c.ParseLibraryCmd(libraryFile)
-
-	out, err := util.ShellCommand(cmd, nil)
-	if err != nil {
-		return err, nil
-	}
-	return err, out
-}
-
-func (c *Compiler) CopySymbols(infile string, outfile string, sm *symbol.SymbolMap) error {
-	cmd := c.CopySymbolsCmd(infile, outfile, sm)
-
-	_, err := util.ShellCommand(cmd, nil)
-	if err != nil {
-		return err
-	}
-	return err
-}


[49/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/pkg_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/pkg_cmds.go b/newt/cli/pkg_cmds.go
deleted file mode 100644
index 472369b..0000000
--- a/newt/cli/pkg_cmds.go
+++ /dev/null
@@ -1,288 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"io/ioutil"
-	"os"
-	"path"
-	"regexp"
-	"strings"
-
-	"github.com/spf13/cobra"
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/util"
-)
-
-var NewTypeStr = "pkg"
-
-func pkgNewCmd(cmd *cobra.Command, args []string) {
-
-	if len(args) == 0 {
-		NewtUsage(cmd, util.NewNewtError("Must specify a package name"))
-	}
-
-	if len(args) != 1 {
-		NewtUsage(cmd, util.NewNewtError("Exactly one argument required"))
-	}
-
-	NewTypeStr = strings.ToUpper(NewTypeStr)
-
-	pw := project.NewPackageWriter()
-	if err := pw.ConfigurePackage(NewTypeStr, args[0]); err != nil {
-		NewtUsage(cmd, err)
-	}
-	if err := pw.WritePackage(); err != nil {
-		NewtUsage(cmd, err)
-	}
-}
-
-type dirOperation func(string, string) error
-
-func pkgCopyCmd(cmd *cobra.Command, args []string) {
-	pkgCloneOrMoveCmd(cmd, args, util.CopyDir, "Copying")
-}
-
-func pkgMoveCmd(cmd *cobra.Command, args []string) {
-	pkgCloneOrMoveCmd(cmd, args, util.MoveDir, "Moving")
-}
-
-func pkgCloneOrMoveCmd(cmd *cobra.Command, args []string, dirOpFn dirOperation, opStr string) {
-	if len(args) != 2 {
-		NewtUsage(cmd, util.NewNewtError("Exactly two arguments required to pkg move"))
-	}
-
-	srcLoc := args[0]
-	dstLoc := args[1]
-
-	proj := TryGetProject()
-	interfaces.SetProject(proj)
-
-	wd, err := os.Getwd()
-	if err != nil {
-		NewtUsage(cmd, util.ChildNewtError(err))
-	}
-
-	if err := os.Chdir(proj.Path() + "/"); err != nil {
-		NewtUsage(cmd, util.ChildNewtError(err))
-	}
-
-	defer os.Chdir(wd)
-
-	/* Find source package, defaulting search to the local project if no
-	 * repository descriptor is found.
-	 */
-	srcRepoName, srcName, err := newtutil.ParsePackageString(srcLoc)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	srcRepo := proj.LocalRepo()
-	if srcRepoName != "" {
-		srcRepo = proj.FindRepo(srcRepoName)
-	}
-
-	srcPkg, err := proj.ResolvePackage(srcRepo, srcName)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	/* Resolve the destination package to a physical location, and then
-	 * move the source package to that location.
-	 * dstLoc is assumed to be in the format "@repo/pkg/loc"
-	 */
-	repoName, pkgName, err := newtutil.ParsePackageString(dstLoc)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	dstPath := proj.Path() + "/"
-	repo := proj.LocalRepo()
-	if repoName != "" {
-		dstPath += "repos/" + repoName + "/"
-		repo = proj.FindRepo(repoName)
-		if repo == nil {
-			NewtUsage(cmd, util.NewNewtError("Destination repo "+
-				repoName+" does not exist"))
-		}
-	}
-	dstPath += pkgName + "/"
-
-	if util.NodeExist(dstPath) {
-		NewtUsage(cmd, util.NewNewtError("Cannot overwrite existing package, "+
-			"use pkg delete first"))
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "%s package %s to %s\n",
-		opStr, srcLoc, dstLoc)
-
-	if err := dirOpFn(srcPkg.BasePath(), dstPath); err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	/* Replace the package name in the pkg.yml file */
-	pkgData, err := ioutil.ReadFile(dstPath + "/pkg.yml")
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	re := regexp.MustCompile(regexp.QuoteMeta(srcName))
-	res := re.ReplaceAllString(string(pkgData), pkgName)
-
-	if err := ioutil.WriteFile(dstPath+"/pkg.yml", []byte(res), 0666); err != nil {
-		NewtUsage(cmd, util.ChildNewtError(err))
-	}
-
-	/* If the last element of the package path changes, rename the include
-	 * directory.
-	 */
-	if path.Base(pkgName) != path.Base(srcPkg.Name()) {
-		dirOpFn(dstPath+"/include/"+path.Base(srcPkg.Name()),
-			dstPath+"/include/"+path.Base(pkgName))
-	}
-}
-
-func pkgRemoveCmd(cmd *cobra.Command, args []string) {
-	if len(args) != 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify a package name to delete"))
-	}
-
-	proj := TryGetProject()
-	interfaces.SetProject(proj)
-
-	wd, err := os.Getwd()
-	if err != nil {
-		NewtUsage(cmd, util.ChildNewtError(err))
-	}
-
-	if err := os.Chdir(proj.Path() + "/"); err != nil {
-		NewtUsage(cmd, util.ChildNewtError(err))
-	}
-
-	defer os.Chdir(wd)
-
-	/* Resolve package, and get path from package to ensure we're being asked
-	 * to remove a valid path.
-	 */
-	repoName, pkgName, err := newtutil.ParsePackageString(args[0])
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	repo := proj.LocalRepo()
-	if repoName != "" {
-		repo = proj.FindRepo(repoName)
-		if repo == nil {
-			NewtUsage(cmd, util.NewNewtError("Destination repo "+
-				repoName+" does not exist"))
-		}
-	}
-
-	pkg, err := pkg.LoadLocalPackage(repo, pkgName)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "Removing package %s\n",
-		args[0])
-
-	if err := os.RemoveAll(pkg.BasePath()); err != nil {
-		NewtUsage(cmd, util.ChildNewtError(err))
-	}
-}
-
-func AddPackageCommands(cmd *cobra.Command) {
-	/* Add the base package command, on top of which other commands are
-	 * keyed
-	 */
-	pkgHelpText := "Commands for creating and manipulating packages"
-	pkgHelpEx := "  newt pkg new --type=pkg sys/mylib"
-
-	pkgCmd := &cobra.Command{
-		Use:     "pkg",
-		Short:   "Create and manage packages in the current workspace",
-		Long:    pkgHelpText,
-		Example: pkgHelpEx,
-		Run: func(cmd *cobra.Command, args []string) {
-			cmd.Help()
-		},
-	}
-
-	cmd.AddCommand(pkgCmd)
-
-	/* Package new command, create a new package */
-	newCmdHelpText := ""
-	newCmdHelpEx := ""
-
-	newCmd := &cobra.Command{
-		Use:     "new <package-name>",
-		Short:   "Create a new package in the current directory, from a template",
-		Long:    newCmdHelpText,
-		Example: newCmdHelpEx,
-		Run:     pkgNewCmd,
-	}
-
-	newCmd.PersistentFlags().StringVarP(&NewTypeStr, "type", "t",
-		"pkg", "Type of package to create: pkg, bsp, sdk.")
-
-	pkgCmd.AddCommand(newCmd)
-
-	copyCmdHelpText := "Create a new package <dst-pkg> by cloning <src-pkg>"
-	copyCmdHelpEx := "  newt pkg copy apps/blinky apps/myapp"
-
-	copyCmd := &cobra.Command{
-		Use:     "copy <src-pkg> <dst-pkg>",
-		Short:   "Copy an existing package into another",
-		Long:    copyCmdHelpText,
-		Example: copyCmdHelpEx,
-		Run:     pkgCopyCmd,
-	}
-
-	pkgCmd.AddCommand(copyCmd)
-
-	moveCmdHelpText := ""
-	moveCmdHelpEx := "  newt pkg move apps/blinky apps/myapp"
-
-	moveCmd := &cobra.Command{
-		Use:     "move <oldpkg> <newpkg>",
-		Short:   "Move a package from one location to another",
-		Long:    moveCmdHelpText,
-		Example: moveCmdHelpEx,
-		Run:     pkgMoveCmd,
-	}
-
-	pkgCmd.AddCommand(moveCmd)
-
-	removeCmdHelpText := ""
-	removeCmdHelpEx := ""
-
-	removeCmd := &cobra.Command{
-		Use:     "remove <package-name>",
-		Short:   "Remove a package",
-		Long:    removeCmdHelpText,
-		Example: removeCmdHelpEx,
-		Run:     pkgRemoveCmd,
-	}
-
-	pkgCmd.AddCommand(removeCmd)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/project_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/project_cmds.go b/newt/cli/project_cmds.go
deleted file mode 100644
index 89a6eae..0000000
--- a/newt/cli/project_cmds.go
+++ /dev/null
@@ -1,259 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"fmt"
-	"os"
-	"sort"
-	"strings"
-
-	"github.com/spf13/cobra"
-	"mynewt.apache.org/newt/newt/downloader"
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/util"
-)
-
-func newRunCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify "+
-			"a project directory to newt new"))
-	}
-
-	newDir := args[0]
-
-	if util.NodeExist(newDir) {
-		NewtUsage(cmd, util.NewNewtError("Cannot create new project, "+
-			"directory already exists"))
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "Downloading "+
-		"project skeleton from apache/incubator-mynewt-blinky...\n")
-	dl := downloader.NewGithubDownloader()
-	dl.User = "apache"
-	dl.Repo = "incubator-mynewt-blinky"
-
-	dir, err := dl.DownloadRepo(newtutil.NewtBlinkyTag)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "Installing "+
-		"skeleton in %s...\n", newDir)
-
-	if err := util.CopyDir(dir, newDir); err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	if err := os.RemoveAll(newDir + "/" + "/.git/"); err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"Project %s successfully created.\n", newDir)
-}
-
-func installRunCmd(cmd *cobra.Command, args []string) {
-	proj := TryGetProject()
-	interfaces.SetProject(proj)
-
-	if err := proj.Install(false, newtutil.NewtForce); err != nil {
-		NewtUsage(cmd, err)
-	}
-}
-
-func upgradeRunCmd(cmd *cobra.Command, args []string) {
-	proj := TryGetProject()
-	interfaces.SetProject(proj)
-
-	if err := proj.Upgrade(newtutil.NewtForce); err != nil {
-		NewtUsage(cmd, err)
-	}
-}
-
-func infoRunCmd(cmd *cobra.Command, args []string) {
-	reqRepoName := ""
-	if len(args) >= 1 {
-		reqRepoName = strings.TrimPrefix(args[0], "@")
-	}
-
-	proj := TryGetProject()
-
-	repoNames := []string{}
-	for repoName, _ := range proj.PackageList() {
-		repoNames = append(repoNames, repoName)
-	}
-	sort.Strings(repoNames)
-
-	if reqRepoName == "" {
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "Repositories in %s:\n",
-			proj.Name())
-
-		for _, repoName := range repoNames {
-			util.StatusMessage(util.VERBOSITY_DEFAULT, "    * @%s\n", repoName)
-		}
-
-		// Now display the packages in the local repository.
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "\n")
-		reqRepoName = "local"
-	}
-
-	firstRepo := true
-	for _, repoName := range repoNames {
-		if reqRepoName == "all" || reqRepoName == repoName {
-			packNames := []string{}
-			for _, pack := range *proj.PackageList()[repoName] {
-				// Don't display the special unittest target; this is used
-				// internally by newt, so the user doesn't need to know about
-				// it.
-				// XXX: This is a hack; come up with a better solution for
-				// unit testing.
-				if !strings.HasSuffix(pack.Name(), "/unittest") {
-					packNames = append(packNames, pack.Name())
-				}
-			}
-
-			sort.Strings(packNames)
-			if !firstRepo {
-				util.StatusMessage(util.VERBOSITY_DEFAULT, "\n")
-			} else {
-				firstRepo = false
-			}
-			util.StatusMessage(util.VERBOSITY_DEFAULT, "Packages in @%s:\n",
-				repoName)
-			for _, pkgName := range packNames {
-				util.StatusMessage(util.VERBOSITY_DEFAULT, "    * %s\n",
-					pkgName)
-			}
-		}
-	}
-}
-
-func syncRunCmd(cmd *cobra.Command, args []string) {
-	proj := TryGetProject()
-	repos := proj.Repos()
-
-	ps, err := project.LoadProjectState()
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	var failedRepos []string
-	for _, repo := range repos {
-		var exists bool
-		var updated bool
-		if repo.IsLocal() {
-			continue
-		}
-		vers := ps.GetInstalledVersion(repo.Name())
-		if vers == nil {
-			util.StatusMessage(util.VERBOSITY_DEFAULT,
-				"No installed version of %s found, skipping\n\n",
-				repo.Name())
-		}
-		exists, updated, err = repo.Sync(vers, newtutil.NewtForce)
-		if exists && !updated {
-			failedRepos = append(failedRepos, repo.Name())
-		}
-	}
-	if len(failedRepos) > 0 {
-		var forceMsg string
-		if !newtutil.NewtForce {
-			forceMsg = " To force resync, add the -f (force) option."
-		}
-		err = util.NewNewtError(fmt.Sprintf("Failed for repos: %v."+
-			forceMsg, failedRepos))
-		NewtUsage(nil, err)
-	}
-}
-
-func AddProjectCommands(cmd *cobra.Command) {
-	installHelpText := ""
-	installHelpEx := ""
-	installCmd := &cobra.Command{
-		Use:     "install",
-		Short:   "Install project dependencies",
-		Long:    installHelpText,
-		Example: installHelpEx,
-		Run:     installRunCmd,
-	}
-	installCmd.PersistentFlags().BoolVarP(&newtutil.NewtForce,
-		"force", "f", false,
-		"Force install of the repositories in project, regardless of what "+
-			"exists in repos directory")
-
-	cmd.AddCommand(installCmd)
-
-	upgradeHelpText := ""
-	upgradeHelpEx := ""
-	upgradeCmd := &cobra.Command{
-		Use:     "upgrade",
-		Short:   "Upgrade project dependencies",
-		Long:    upgradeHelpText,
-		Example: upgradeHelpEx,
-		Run:     upgradeRunCmd,
-	}
-	upgradeCmd.PersistentFlags().BoolVarP(&newtutil.NewtForce,
-		"force", "f", false,
-		"Force upgrade of the repositories to latest state in project.yml")
-
-	cmd.AddCommand(upgradeCmd)
-
-	syncHelpText := ""
-	syncHelpEx := ""
-	syncCmd := &cobra.Command{
-		Use:     "sync",
-		Short:   "Synchronize project dependencies",
-		Long:    syncHelpText,
-		Example: syncHelpEx,
-		Run:     syncRunCmd,
-	}
-	syncCmd.PersistentFlags().BoolVarP(&newtutil.NewtForce,
-		"force", "f", false,
-		"Force overwrite of existing remote repositories.")
-	cmd.AddCommand(syncCmd)
-
-	newHelpText := ""
-	newHelpEx := ""
-	newCmd := &cobra.Command{
-		Use:     "new <project-dir>",
-		Short:   "Create a new project",
-		Long:    newHelpText,
-		Example: newHelpEx,
-		Run:     newRunCmd,
-	}
-
-	cmd.AddCommand(newCmd)
-
-	infoHelpText := "Show information about the current project."
-	infoHelpEx := "  newt info\n"
-
-	infoCmd := &cobra.Command{
-		Use:     "info",
-		Short:   "Show project info",
-		Long:    infoHelpText,
-		Example: infoHelpEx,
-		Run:     infoRunCmd,
-	}
-
-	cmd.AddCommand(infoCmd)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/run_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/run_cmds.go b/newt/cli/run_cmds.go
deleted file mode 100644
index 16620dd..0000000
--- a/newt/cli/run_cmds.go
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"os"
-
-	"github.com/spf13/cobra"
-
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/util"
-)
-
-func runRunCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify target"))
-	}
-
-	TryGetProject()
-
-	b, err := TargetBuilderForTargetOrUnittest(args[0])
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	testPkg := b.GetTestPkg()
-	if testPkg != nil {
-		b.InjectSetting("TESTUTIL_SYSTEM_ASSERT", "1")
-		if err := b.SelfTestCreateExe(); err != nil {
-			NewtUsage(nil, err)
-		}
-		if err := b.SelfTestDebug(); err != nil {
-			NewtUsage(nil, err)
-		}
-	} else {
-		if err := b.Build(); err != nil {
-			NewtUsage(nil, err)
-		}
-
-		/*
-		 * Run create-image if version number is specified. If no version
-		 * number, remove .img which would'be been created. This so that
-		 * download script will barf if it needs an image for this type of
-		 * target, instead of downloading an older version.
-		 */
-		if len(args) > 1 {
-			_, _, err = b.CreateImages(args[1], "", 0)
-			if err != nil {
-				NewtUsage(cmd, err)
-			}
-		} else {
-			os.Remove(b.AppBuilder.AppImgPath())
-
-			if b.LoaderBuilder != nil {
-				os.Remove(b.LoaderBuilder.AppImgPath())
-			}
-		}
-
-		if err := b.Load(extraJtagCmd); err != nil {
-			NewtUsage(nil, err)
-		}
-
-		if err := b.Debug(extraJtagCmd, true, noGDB_flag); err != nil {
-			NewtUsage(nil, err)
-		}
-	}
-}
-
-func AddRunCommands(cmd *cobra.Command) {
-	runHelpText := "Same as running\n" +
-		" - build <target>\n" +
-		" - create-image <target> <version>\n" +
-		" - load <target>\n" +
-		" - debug <target>\n\n" +
-		"Note if version number is omitted, create-image step is skipped\n"
-	runHelpEx := "  newt run <target-name> [<version>]\n"
-
-	runCmd := &cobra.Command{
-		Use:     "run",
-		Short:   "build/create-image/download/debug <target>",
-		Long:    runHelpText,
-		Example: runHelpEx,
-		Run:     runRunCmd,
-	}
-
-	runCmd.PersistentFlags().StringVarP(&extraJtagCmd, "extrajtagcmd", "", "",
-		"Extra commands to send to JTAG software")
-	runCmd.PersistentFlags().BoolVarP(&noGDB_flag, "noGDB", "n", false,
-		"Do not start GDB from command line")
-	runCmd.PersistentFlags().BoolVarP(&newtutil.NewtForce,
-		"force", "f", false,
-		"Ignore flash overflow errors during image creation")
-
-	cmd.AddCommand(runCmd)
-	AddTabCompleteFn(runCmd, func() []string {
-		return append(targetList(), unittestList()...)
-	})
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/target_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/target_cmds.go b/newt/cli/target_cmds.go
deleted file mode 100644
index 786838c..0000000
--- a/newt/cli/target_cmds.go
+++ /dev/null
@@ -1,809 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"sort"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-	"github.com/spf13/cobra"
-	"mynewt.apache.org/newt/newt/builder"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/resolve"
-	"mynewt.apache.org/newt/newt/syscfg"
-	"mynewt.apache.org/newt/newt/target"
-	"mynewt.apache.org/newt/util"
-	"mynewt.apache.org/newt/viper"
-)
-
-var targetForce bool = false
-
-func resolveExistingTargetArg(arg string) (*target.Target, error) {
-	t := ResolveTarget(arg)
-	if t == nil {
-		return nil, util.NewNewtError("Unknown target: " + arg)
-	}
-
-	return t, nil
-}
-
-// Tells you if a target's directory contains extra user files (i.e., files
-// other than pkg.yml).
-func targetContainsUserFiles(t *target.Target) (bool, error) {
-	contents, err := ioutil.ReadDir(t.Package().BasePath())
-	if err != nil {
-		return false, err
-	}
-
-	userFiles := false
-	for _, node := range contents {
-		name := node.Name()
-		if name != "." && name != ".." &&
-			name != pkg.PACKAGE_FILE_NAME && name != target.TARGET_FILENAME {
-
-			userFiles = true
-			break
-		}
-	}
-
-	return userFiles, nil
-}
-
-func pkgVarSliceString(pack *pkg.LocalPackage, key string) string {
-	features := pack.PkgV.GetStringSlice(key)
-	sort.Strings(features)
-
-	var buffer bytes.Buffer
-	for _, f := range features {
-		buffer.WriteString(f)
-		buffer.WriteString(" ")
-	}
-	return buffer.String()
-}
-
-func targetShowCmd(cmd *cobra.Command, args []string) {
-	TryGetProject()
-	targetNames := []string{}
-	if len(args) == 0 {
-		for name, _ := range target.GetTargets() {
-			// Don't display the special unittest target; this is used
-			// internally by newt, so the user doesn't need to know about it.
-			// XXX: This is a hack; come up with a better solution for unit
-			// testing.
-			if !strings.HasSuffix(name, "/unittest") {
-				targetNames = append(targetNames, name)
-			}
-		}
-	} else {
-		targetSlice, err := ResolveTargets(args...)
-		if err != nil {
-			NewtUsage(cmd, err)
-		}
-
-		for _, t := range targetSlice {
-			targetNames = append(targetNames, t.FullName())
-		}
-	}
-
-	sort.Strings(targetNames)
-
-	for _, name := range targetNames {
-		kvPairs := map[string]string{}
-
-		util.StatusMessage(util.VERBOSITY_DEFAULT, name+"\n")
-
-		target := target.GetTargets()[name]
-		for k, v := range target.Vars {
-			kvPairs[strings.TrimPrefix(k, "target.")] = v
-		}
-
-		// A few variables come from the base package rather than the target.
-		kvPairs["syscfg"] = syscfg.KeyValueToStr(
-			target.Package().SyscfgV.GetStringMapString("syscfg.vals"))
-		kvPairs["cflags"] = pkgVarSliceString(target.Package(), "pkg.cflags")
-		kvPairs["lflags"] = pkgVarSliceString(target.Package(), "pkg.lflags")
-		kvPairs["aflags"] = pkgVarSliceString(target.Package(), "pkg.aflags")
-
-		keys := []string{}
-		for k, _ := range kvPairs {
-			keys = append(keys, k)
-		}
-		sort.Strings(keys)
-		for _, k := range keys {
-			val := kvPairs[k]
-			if len(val) > 0 {
-				util.StatusMessage(util.VERBOSITY_DEFAULT, "    %s=%s\n",
-					k, kvPairs[k])
-			}
-		}
-	}
-}
-
-func targetSetCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 2 {
-		NewtUsage(cmd,
-			util.NewNewtError("Must specify at least two arguments "+
-				"(target-name & k=v) to set"))
-	}
-
-	TryGetProject()
-
-	// Parse target name.
-	t, err := resolveExistingTargetArg(args[0])
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	// Parse series of k=v pairs.  If an argument doesn't contain a '='
-	// character, display the valid values for the variable and quit.
-	vars := [][]string{}
-	for i := 1; i < len(args); i++ {
-		kv := strings.SplitN(args[i], "=", 2)
-		if !strings.HasPrefix(kv[0], "target.") {
-			kv[0] = "target." + kv[0]
-		}
-
-		if len(kv) == 1 {
-			// User entered a variable name without a value.
-			NewtUsage(cmd, nil)
-		}
-
-		// Trim trailing slash from value.  This is necessary when tab
-		// completion is used to fill in the value.
-		kv[1] = strings.TrimSuffix(kv[1], "/")
-
-		vars = append(vars, kv)
-	}
-
-	// Set each specified variable in the target.
-	for _, kv := range vars {
-		// A few variables are special cases; they get set in the base package
-		// instead of the target.
-		if kv[0] == "target.syscfg" {
-			t.Package().SyscfgV = viper.New()
-			kv, err := syscfg.KeyValueFromStr(kv[1])
-			if err != nil {
-				NewtUsage(cmd, err)
-			}
-
-			t.Package().SyscfgV.Set("syscfg.vals", kv)
-		} else if kv[0] == "target.cflags" ||
-			kv[0] == "target.lflags" ||
-			kv[0] == "target.aflags" {
-
-			kv[0] = "pkg." + strings.TrimPrefix(kv[0], "target.")
-			if kv[1] == "" {
-				// User specified empty value; delete variable.
-				t.Package().PkgV.Set(kv[0], nil)
-			} else {
-				t.Package().PkgV.Set(kv[0], strings.Fields(kv[1]))
-			}
-		} else {
-			if kv[1] == "" {
-				// User specified empty value; delete variable.
-				delete(t.Vars, kv[0])
-			} else {
-				// Assign value to specified variable.
-				t.Vars[kv[0]] = kv[1]
-			}
-		}
-	}
-
-	if err := t.Save(); err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	for _, kv := range vars {
-		if kv[1] == "" {
-			util.StatusMessage(util.VERBOSITY_DEFAULT,
-				"Target %s successfully unset %s\n", t.FullName(), kv[0])
-		} else {
-			util.StatusMessage(util.VERBOSITY_DEFAULT,
-				"Target %s successfully set %s to %s\n", t.FullName(), kv[0],
-				kv[1])
-		}
-	}
-}
-
-func targetCreateCmd(cmd *cobra.Command, args []string) {
-	if len(args) != 1 {
-		NewtUsage(cmd, util.NewNewtError("Missing target name"))
-	}
-
-	proj := TryGetProject()
-
-	pkgName, err := ResolveNewTargetName(args[0])
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	repo := proj.LocalRepo()
-	pack := pkg.NewLocalPackage(repo, repo.Path()+"/"+pkgName)
-	pack.SetName(pkgName)
-	pack.SetType(pkg.PACKAGE_TYPE_TARGET)
-
-	t := target.NewTarget(pack)
-	err = t.Save()
-	if err != nil {
-		NewtUsage(nil, err)
-	} else {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Target %s successfully created\n", pkgName)
-	}
-}
-
-func targetDelOne(t *target.Target) error {
-	if !targetForce {
-		// Determine if the target directory contains extra user files.  If it
-		// does, a prompt (or force) is required to delete it.
-		userFiles, err := targetContainsUserFiles(t)
-		if err != nil {
-			return err
-		}
-
-		if userFiles {
-			fmt.Printf("Target directory %s contains some extra content; "+
-				"delete anyway? (y/N): ", t.Package().BasePath())
-			rsp := PromptYesNo(false)
-			if !rsp {
-				return nil
-			}
-		}
-	}
-
-	if err := os.RemoveAll(t.Package().BasePath()); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"Target %s successfully deleted.\n", t.FullName())
-
-	return nil
-}
-
-func targetDelCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify at least one "+
-			"target to delete"))
-	}
-
-	TryGetProject()
-
-	targets, err := ResolveTargets(args...)
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	for _, t := range targets {
-		if err := targetDelOne(t); err != nil {
-			NewtUsage(cmd, err)
-		}
-	}
-}
-
-func targetCopyCmd(cmd *cobra.Command, args []string) {
-	if len(args) != 2 {
-		NewtUsage(cmd, util.NewNewtError("Must specify exactly one "+
-			"source target and one destination target"))
-	}
-
-	proj := TryGetProject()
-
-	srcTarget, err := resolveExistingTargetArg(args[0])
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	dstName, err := ResolveNewTargetName(args[1])
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	// Copy the source target's base package and adjust the fields which need
-	// to change.
-	dstTarget := srcTarget.Clone(proj.LocalRepo(), dstName)
-
-	// Save the new target.
-	err = dstTarget.Save()
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	// Copy syscfg.yml file.
-	srcSyscfgPath := fmt.Sprintf("%s/%s",
-		srcTarget.Package().BasePath(),
-		pkg.SYSCFG_YAML_FILENAME)
-	dstSyscfgPath := fmt.Sprintf("%s/%s",
-		dstTarget.Package().BasePath(),
-		pkg.SYSCFG_YAML_FILENAME)
-
-	if err := util.CopyFile(srcSyscfgPath, dstSyscfgPath); err != nil {
-		// If there is just no source syscfg.yml file, that is not an error.
-		if !util.IsNotExist(err) {
-			NewtUsage(nil, err)
-		}
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"Target successfully copied; %s --> %s\n",
-		srcTarget.FullName(), dstTarget.FullName())
-}
-
-func printSetting(entry syscfg.CfgEntry) {
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"  * Setting: %s\n", entry.Name)
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"    * Description: %s\n", entry.Description)
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"    * Value: %s", entry.Value)
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "\n")
-
-	if len(entry.History) > 1 {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"    * Overridden: ")
-		for i := 1; i < len(entry.History); i++ {
-			util.StatusMessage(util.VERBOSITY_DEFAULT, "%s, ",
-				entry.History[i].Source.Name())
-		}
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"default=%s\n", entry.History[0].Value)
-	}
-}
-
-func printPkgCfg(pkgName string, cfg syscfg.Cfg, entries []syscfg.CfgEntry) {
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "* PACKAGE: %s\n", pkgName)
-
-	settingNames := make([]string, len(entries))
-	for i, entry := range entries {
-		settingNames[i] = entry.Name
-	}
-	sort.Strings(settingNames)
-
-	for _, name := range settingNames {
-		printSetting(cfg.Settings[name])
-	}
-}
-
-func printCfg(targetName string, cfg syscfg.Cfg) {
-	if errText := cfg.ErrorText(); errText != "" {
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "!!! %s\n\n", errText)
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT, "Syscfg for %s:\n", targetName)
-	pkgNameEntryMap := syscfg.EntriesByPkg(cfg)
-
-	pkgNames := make([]string, 0, len(pkgNameEntryMap))
-	for pkgName, _ := range pkgNameEntryMap {
-		pkgNames = append(pkgNames, pkgName)
-	}
-	sort.Strings(pkgNames)
-
-	for i, pkgName := range pkgNames {
-		if i > 0 {
-			util.StatusMessage(util.VERBOSITY_DEFAULT, "\n")
-		}
-		printPkgCfg(pkgName, cfg, pkgNameEntryMap[pkgName])
-	}
-}
-
-func yamlPkgCfg(w io.Writer, pkgName string, cfg syscfg.Cfg,
-	entries []syscfg.CfgEntry) {
-
-	settingNames := make([]string, len(entries))
-	for i, entry := range entries {
-		settingNames[i] = entry.Name
-	}
-	sort.Strings(settingNames)
-
-	fmt.Fprintf(w, "    ### %s\n", pkgName)
-	for _, name := range settingNames {
-		fmt.Fprintf(w, "    %s: '%s'\n", name, cfg.Settings[name].Value)
-	}
-}
-
-func yamlCfg(cfg syscfg.Cfg) string {
-	if errText := cfg.ErrorText(); errText != "" {
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "!!! %s\n\n", errText)
-	}
-
-	pkgNameEntryMap := syscfg.EntriesByPkg(cfg)
-
-	pkgNames := make([]string, 0, len(pkgNameEntryMap))
-	for pkgName, _ := range pkgNameEntryMap {
-		pkgNames = append(pkgNames, pkgName)
-	}
-	sort.Strings(pkgNames)
-
-	buf := bytes.Buffer{}
-
-	fmt.Fprintf(&buf, "syscfg.vals:\n")
-	for i, pkgName := range pkgNames {
-		if i > 0 {
-			fmt.Fprintf(&buf, "\n")
-		}
-		yamlPkgCfg(&buf, pkgName, cfg, pkgNameEntryMap[pkgName])
-	}
-
-	return string(buf.Bytes())
-}
-
-func targetBuilderConfigResolve(b *builder.TargetBuilder) *resolve.Resolution {
-	res, err := b.Resolve()
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	warningText := strings.TrimSpace(res.WarningText())
-	if warningText != "" {
-		for _, line := range strings.Split(warningText, "\n") {
-			log.Warn(line)
-		}
-	}
-
-	return res
-}
-
-func targetConfigShowCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd,
-			util.NewNewtError("Must specify target or unittest name"))
-	}
-
-	for _, arg := range args {
-		b, err := TargetBuilderForTargetOrUnittest(arg)
-		if err != nil {
-			NewtUsage(cmd, err)
-		}
-
-		res := targetBuilderConfigResolve(b)
-		printCfg(b.GetTarget().Name(), res.Cfg)
-	}
-}
-
-func targetConfigInitCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd,
-			util.NewNewtError("Must specify target or unittest name"))
-	}
-
-	type entry struct {
-		lpkg   *pkg.LocalPackage
-		path   string
-		b      *builder.TargetBuilder
-		exists bool
-	}
-
-	anyExist := false
-	entries := make([]entry, len(args))
-	for i, pkgName := range args {
-		e := &entries[i]
-
-		b, err := TargetBuilderForTargetOrUnittest(pkgName)
-		if err != nil {
-			NewtUsage(cmd, err)
-		}
-		e.b = b
-
-		e.lpkg = b.GetTestPkg()
-		if e.lpkg == nil {
-			e.lpkg = b.GetTarget().Package()
-		}
-
-		e.path = builder.PkgSyscfgPath(e.lpkg.BasePath())
-
-		if util.NodeExist(e.path) {
-			e.exists = true
-			anyExist = true
-		}
-	}
-
-	if anyExist && !targetForce {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"Configuration files already exist:\n")
-		for _, e := range entries {
-			if e.exists {
-				util.StatusMessage(util.VERBOSITY_DEFAULT, "    * %s\n",
-					e.path)
-			}
-		}
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "\n")
-
-		fmt.Printf("Overwrite them? (y/N): ")
-		rsp := PromptYesNo(false)
-		if !rsp {
-			return
-		}
-	}
-
-	for _, e := range entries {
-		res := targetBuilderConfigResolve(e.b)
-		yaml := yamlCfg(res.Cfg)
-
-		if err := ioutil.WriteFile(e.path, []byte(yaml), 0644); err != nil {
-			NewtUsage(nil, util.FmtNewtError("Error writing file \"%s\"; %s",
-				e.path, err.Error()))
-		}
-	}
-}
-
-func targetDepCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd,
-			util.NewNewtError("Must specify target or unittest name"))
-	}
-
-	TryGetProject()
-
-	b, err := TargetBuilderForTargetOrUnittest(args[0])
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	res, err := b.Resolve()
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	dg, err := b.CreateDepGraph()
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	// If user specified any package names, only include specified packages.
-	if len(args) > 1 {
-		rpkgs, err := ResolveRpkgs(res, args[1:])
-		if err != nil {
-			NewtUsage(cmd, err)
-		}
-
-		var missingRpkgs []*resolve.ResolvePackage
-		dg, missingRpkgs = builder.FilterDepGraph(dg, rpkgs)
-		for _, rpkg := range missingRpkgs {
-			util.StatusMessage(util.VERBOSITY_QUIET,
-				"Warning: Package \"%s\" not included in target \"%s\"\n",
-				rpkg.Lpkg.FullName(), b.GetTarget().FullName())
-		}
-	}
-
-	if len(dg) > 0 {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			builder.DepGraphText(dg)+"\n")
-	}
-}
-
-func targetRevdepCmd(cmd *cobra.Command, args []string) {
-	if len(args) < 1 {
-		NewtUsage(cmd, util.NewNewtError("Must specify target name"))
-	}
-
-	TryGetProject()
-
-	b, err := TargetBuilderForTargetOrUnittest(args[0])
-	if err != nil {
-		NewtUsage(cmd, err)
-	}
-
-	res, err := b.Resolve()
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	dg, err := b.CreateRevdepGraph()
-	if err != nil {
-		NewtUsage(nil, err)
-	}
-
-	// If user specified any package names, only include specified packages.
-	if len(args) > 1 {
-		rpkgs, err := ResolveRpkgs(res, args[1:])
-		if err != nil {
-			NewtUsage(cmd, err)
-		}
-
-		var missingRpkgs []*resolve.ResolvePackage
-		dg, missingRpkgs = builder.FilterDepGraph(dg, rpkgs)
-		for _, rpkg := range missingRpkgs {
-			util.StatusMessage(util.VERBOSITY_QUIET,
-				"Warning: Package \"%s\" not included in target \"%s\"\n",
-				rpkg.Lpkg.FullName(), b.GetTarget().FullName())
-		}
-	}
-
-	if len(dg) > 0 {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			builder.RevdepGraphText(dg)+"\n")
-	}
-}
-
-func AddTargetCommands(cmd *cobra.Command) {
-	targetHelpText := ""
-	targetHelpEx := ""
-	targetCmd := &cobra.Command{
-		Use:     "target",
-		Short:   "Commands to create, delete, configure, and query targets",
-		Long:    targetHelpText,
-		Example: targetHelpEx,
-		Run: func(cmd *cobra.Command, args []string) {
-			cmd.Usage()
-		},
-	}
-
-	cmd.AddCommand(targetCmd)
-
-	showHelpText := "Show all the variables for the target specified " +
-		"by <target-name>."
-	showHelpEx := "  newt target show <target-name>\n"
-	showHelpEx += "  newt target show my_target1"
-
-	showCmd := &cobra.Command{
-		Use:     "show",
-		Short:   "View target configuration variables",
-		Long:    showHelpText,
-		Example: showHelpEx,
-		Run:     targetShowCmd,
-	}
-	targetCmd.AddCommand(showCmd)
-	AddTabCompleteFn(showCmd, targetList)
-
-	setHelpText := "Set a target variable (<var-name>) on target "
-	setHelpText += "<target-name> to value <value>.\n\n"
-	setHelpText += "Warning: When setting the syscfg variable, a new syscfg.yml file\n"
-	setHelpText += "is created and the current settings are deleted. Only the settings\n"
-	setHelpText += "specified in the command are saved in the syscfg.yml file."
-	setHelpEx := "  newt target set my_target1 build_profile=optimized "
-	setHelpEx += "cflags=\"-DNDEBUG\"\n"
-	setHelpEx += "  newt target set my_target1 "
-	setHelpEx += "syscfg=LOG_NEWTMGR=1:CONFIG_NEWTMGR=0\n"
-
-	setCmd := &cobra.Command{
-		Use: "set <target-name> <var-name>=<value>" +
-			"[:<var-name>=<value>...]",
-		Short:   "Set target configuration variable",
-		Long:    setHelpText,
-		Example: setHelpEx,
-		Run:     targetSetCmd,
-	}
-	targetCmd.AddCommand(setCmd)
-	AddTabCompleteFn(setCmd, targetList)
-
-	createHelpText := "Create a target specified by <target-name>."
-	createHelpEx := "  newt target create <target-name>\n"
-	createHelpEx += "  newt target create my_target1"
-
-	createCmd := &cobra.Command{
-		Use:     "create",
-		Short:   "Create a target",
-		Long:    createHelpText,
-		Example: createHelpEx,
-		Run:     targetCreateCmd,
-	}
-
-	targetCmd.AddCommand(createCmd)
-
-	delHelpText := "Delete the target specified by <target-name>."
-	delHelpEx := "  newt target delete <target-name>\n"
-	delHelpEx += "  newt target delete my_target1"
-
-	delCmd := &cobra.Command{
-		Use:     "delete",
-		Short:   "Delete target",
-		Long:    delHelpText,
-		Example: delHelpEx,
-		Run:     targetDelCmd,
-	}
-	delCmd.PersistentFlags().BoolVarP(&newtutil.NewtForce,
-		"force", "f", false,
-		"Force delete of targets with user files without prompt")
-
-	targetCmd.AddCommand(delCmd)
-
-	copyHelpText := "Create a new target <dst-target> by cloning <src-target>"
-	copyHelpEx := "  newt target copy blinky_sim my_target"
-
-	copyCmd := &cobra.Command{
-		Use:     "copy <src-target> <dst-target>",
-		Short:   "Copy target",
-		Long:    copyHelpText,
-		Example: copyHelpEx,
-		Run:     targetCopyCmd,
-	}
-
-	targetCmd.AddCommand(copyCmd)
-	AddTabCompleteFn(copyCmd, targetList)
-
-	configHelpText := "View or populate a target's system configuration"
-
-	configCmd := &cobra.Command{
-		Use:   "config",
-		Short: configHelpText,
-		Long:  configHelpText,
-		Run: func(cmd *cobra.Command, args []string) {
-			cmd.Usage()
-		},
-	}
-
-	targetCmd.AddCommand(configCmd)
-
-	configShowCmd := &cobra.Command{
-		Use:   "show <target>",
-		Short: "View a target's system configuration",
-		Long:  "View a target's system configuration",
-		Run:   targetConfigShowCmd,
-	}
-
-	configCmd.AddCommand(configShowCmd)
-	AddTabCompleteFn(configShowCmd, func() []string {
-		return append(targetList(), unittestList()...)
-	})
-
-	configInitCmd := &cobra.Command{
-		Use:   "init",
-		Short: "Populate a target's system configuration file",
-		Long: "Populate a target's system configuration file (syscfg). " +
-			"Unspecified settings are given default values.",
-		Run: targetConfigInitCmd,
-	}
-	configInitCmd.PersistentFlags().BoolVarP(&newtutil.NewtForce,
-		"force", "f", false,
-		"Force overwrite of target configuration")
-
-	configCmd.AddCommand(configInitCmd)
-	AddTabCompleteFn(configInitCmd, func() []string {
-		return append(targetList(), unittestList()...)
-	})
-
-	depHelpText := "View a target's dependency graph."
-
-	depCmd := &cobra.Command{
-		Use:   "dep <target> [pkg-1] [pkg-2] [...]",
-		Short: "View target's dependency graph",
-		Long:  depHelpText,
-		Run:   targetDepCmd,
-	}
-
-	targetCmd.AddCommand(depCmd)
-	AddTabCompleteFn(depCmd, func() []string {
-		return append(targetList(), unittestList()...)
-	})
-
-	revdepHelpText := "View a target's reverse-dependency graph."
-
-	revdepCmd := &cobra.Command{
-		Use:   "revdep <target> [pkg-1] [pkg-2] [...]",
-		Short: "View target's reverse-dependency graph",
-		Long:  revdepHelpText,
-		Run:   targetRevdepCmd,
-	}
-
-	targetCmd.AddCommand(revdepCmd)
-	AddTabCompleteFn(revdepCmd, func() []string {
-		return append(targetList(), unittestList()...)
-	})
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/util.go
----------------------------------------------------------------------
diff --git a/newt/cli/util.go b/newt/cli/util.go
deleted file mode 100644
index e9c0b4c..0000000
--- a/newt/cli/util.go
+++ /dev/null
@@ -1,353 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"bufio"
-	"bytes"
-	"fmt"
-	"os"
-	"path/filepath"
-	"regexp"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-	"github.com/spf13/cobra"
-
-	"mynewt.apache.org/newt/newt/builder"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/newt/resolve"
-	"mynewt.apache.org/newt/newt/target"
-	"mynewt.apache.org/newt/util"
-)
-
-const TARGET_KEYWORD_ALL string = "all"
-const TARGET_DEFAULT_DIR string = "targets"
-const MFG_DEFAULT_DIR string = "mfgs"
-
-func NewtUsage(cmd *cobra.Command, err error) {
-	if err != nil {
-		sErr := err.(*util.NewtError)
-		log.Debugf("%s", sErr.StackTrace)
-		fmt.Fprintf(os.Stderr, "Error: %s\n", sErr.Text)
-	}
-
-	if cmd != nil {
-		fmt.Printf("\n")
-		fmt.Printf("%s - ", cmd.Name())
-		cmd.Help()
-	}
-	os.Exit(1)
-}
-
-// Display help text with a max line width of 79 characters
-func FormatHelp(text string) string {
-	// first compress all new lines and extra spaces
-	words := regexp.MustCompile("\\s+").Split(text, -1)
-	linelen := 0
-	fmtText := ""
-	for _, word := range words {
-		word = strings.Trim(word, "\n ") + " "
-		tmplen := linelen + len(word)
-		if tmplen >= 80 {
-			fmtText += "\n"
-			linelen = 0
-		}
-		fmtText += word
-		linelen += len(word)
-	}
-	return fmtText
-}
-
-func ResolveTarget(name string) *target.Target {
-	// Trim trailing slash from name.  This is necessary when tab
-	// completion is used to specify the name.
-	name = strings.TrimSuffix(name, "/")
-
-	targetMap := target.GetTargets()
-
-	// Check for fully-qualified name.
-	if t := targetMap[name]; t != nil {
-		return t
-	}
-
-	// Check the local "targets" directory.
-	if t := targetMap[TARGET_DEFAULT_DIR+"/"+name]; t != nil {
-		return t
-	}
-
-	// Check each repo alphabetically.
-	fullNames := []string{}
-	for fullName, _ := range targetMap {
-		fullNames = append(fullNames, fullName)
-	}
-	for _, fullName := range util.SortFields(fullNames...) {
-		if name == filepath.Base(fullName) {
-			return targetMap[fullName]
-		}
-	}
-
-	return nil
-}
-
-// Resolves a list of target names and checks for the optional "all" keyword
-// among them.  Regardless of whether "all" is specified, all target names must
-// be valid, or an error is reported.
-//
-// @return                      targets, all (t/f), err
-func ResolveTargetsOrAll(names ...string) ([]*target.Target, bool, error) {
-	targets := []*target.Target{}
-	all := false
-
-	for _, name := range names {
-		if name == "all" {
-			all = true
-		} else {
-			t := ResolveTarget(name)
-			if t == nil {
-				return nil, false,
-					util.NewNewtError("Could not resolve target name: " + name)
-			}
-
-			targets = append(targets, t)
-		}
-	}
-
-	return targets, all, nil
-}
-
-func ResolveTargets(names ...string) ([]*target.Target, error) {
-	targets, all, err := ResolveTargetsOrAll(names...)
-	if err != nil {
-		return nil, err
-	}
-	if all {
-		return nil,
-			util.NewNewtError("Keyword \"all\" not allowed in thie context")
-	}
-
-	return targets, nil
-}
-
-func ResolveNewTargetName(name string) (string, error) {
-	repoName, pkgName, err := newtutil.ParsePackageString(name)
-	if err != nil {
-		return "", err
-	}
-
-	if repoName != "" {
-		return "", util.NewNewtError("Target name cannot contain repo; " +
-			"must be local")
-	}
-
-	if pkgName == TARGET_KEYWORD_ALL {
-		return "", util.NewNewtError("Target name " + TARGET_KEYWORD_ALL +
-			" is reserved")
-	}
-
-	// "Naked" target names translate to "targets/<name>".
-	if !strings.Contains(pkgName, "/") {
-		pkgName = TARGET_DEFAULT_DIR + "/" + pkgName
-	}
-
-	if target.GetTargets()[pkgName] != nil {
-		return "", util.NewNewtError("Target already exists: " + pkgName)
-	}
-
-	return pkgName, nil
-}
-
-func PackageNameList(pkgs []*pkg.LocalPackage) string {
-	var buffer bytes.Buffer
-	for i, pack := range pkgs {
-		if i != 0 {
-			buffer.WriteString(" ")
-		}
-		buffer.WriteString(pack.Name())
-	}
-
-	return buffer.String()
-}
-
-func ResetGlobalState() error {
-	// Make sure the current working directory is at the project base.
-	if err := os.Chdir(project.GetProject().Path()); err != nil {
-		return util.NewNewtError("Failed to reset global state: " +
-			err.Error())
-	}
-
-	target.ResetTargets()
-	project.ResetProject()
-
-	return nil
-}
-
-func TryGetProject() *project.Project {
-	var p *project.Project
-	var err error
-
-	if p, err = project.TryGetProject(); err != nil {
-		NewtUsage(nil, err)
-	}
-
-	for _, w := range p.Warnings() {
-		util.ErrorMessage(util.VERBOSITY_QUIET, "* Warning: %s\n", w)
-	}
-
-	return p
-}
-
-func ResolveUnittest(pkgName string) (*target.Target, error) {
-	// Each unit test package gets its own target.  This target is a copy
-	// of the base unit test package, just with an appropriate name.  The
-	// reason each test needs a unique target is: syscfg and sysinit are
-	// target-specific.  If each test package shares a target, they will
-	// overwrite these generated headers each time they are run.  Worse, if
-	// two tests are run back-to-back, the timestamps may indicate that the
-	// headers have not changed between tests, causing build failures.
-	baseTarget := ResolveTarget(TARGET_TEST_NAME)
-	if baseTarget == nil {
-		return nil, util.FmtNewtError("Can't find unit test target: %s",
-			TARGET_TEST_NAME)
-	}
-
-	targetName := fmt.Sprintf("%s/%s/%s",
-		TARGET_DEFAULT_DIR, TARGET_TEST_NAME,
-		builder.TestTargetName(pkgName))
-
-	t := ResolveTarget(targetName)
-	if t == nil {
-		targetName, err := ResolveNewTargetName(targetName)
-		if err != nil {
-			return nil, err
-		}
-
-		t = baseTarget.Clone(TryGetProject().LocalRepo(), targetName)
-	}
-
-	return t, nil
-}
-
-// @return Target
-// @return LocalPackage         The package under test, if any.
-// @return error
-func ResolveTargetOrUnittest(pkgName string) (
-	*target.Target, *pkg.LocalPackage, error) {
-
-	// Argument can specify either a target or a unittest package.  Determine
-	// which type the package is and construct a target builder appropriately.
-	if t, err := resolveExistingTargetArg(pkgName); err == nil {
-		return t, nil, nil
-	}
-
-	// Package wasn't a target.  Try for a unittest.
-	proj := TryGetProject()
-	pack, err := proj.ResolvePackage(proj.LocalRepo(), pkgName)
-	if err != nil {
-		return nil, nil, util.FmtNewtError(
-			"Could not resolve target or unittest \"%s\"", pkgName)
-	}
-
-	if pack.Type() != pkg.PACKAGE_TYPE_UNITTEST {
-		return nil, nil, util.FmtNewtError(
-			"Package \"%s\" is of type %s; "+
-				"must be target or unittest", pkgName,
-			pkg.PackageTypeNames[pack.Type()])
-	}
-
-	t, err := ResolveUnittest(pack.Name())
-	if err != nil {
-		return nil, nil, err
-	}
-
-	return t, pack, nil
-}
-
-func ResolvePackages(pkgNames []string) ([]*pkg.LocalPackage, error) {
-	proj := TryGetProject()
-
-	lpkgs := []*pkg.LocalPackage{}
-	for _, pkgName := range pkgNames {
-		pack, err := proj.ResolvePackage(proj.LocalRepo(), pkgName)
-		if err != nil {
-			return nil, err
-		}
-		lpkgs = append(lpkgs, pack)
-	}
-
-	return lpkgs, nil
-}
-
-func ResolveRpkgs(res *resolve.Resolution, pkgNames []string) (
-	[]*resolve.ResolvePackage, error) {
-
-	lpkgs, err := ResolvePackages(pkgNames)
-	if err != nil {
-		return nil, err
-	}
-
-	rpkgs := []*resolve.ResolvePackage{}
-	for _, lpkg := range lpkgs {
-		rpkg := res.LpkgRpkgMap[lpkg]
-		if rpkg == nil {
-			return nil, util.FmtNewtError("Unexpected error; local package "+
-				"%s lacks a corresponding resolve package", lpkg.FullName())
-		}
-
-		rpkgs = append(rpkgs, rpkg)
-	}
-
-	return rpkgs, nil
-}
-
-func TargetBuilderForTargetOrUnittest(pkgName string) (
-	*builder.TargetBuilder, error) {
-
-	t, testPkg, err := ResolveTargetOrUnittest(pkgName)
-	if err != nil {
-		return nil, err
-	}
-
-	if testPkg == nil {
-		return builder.NewTargetBuilder(t)
-	} else {
-		return builder.NewTargetTester(t, testPkg)
-	}
-}
-
-func PromptYesNo(dflt bool) bool {
-	scanner := bufio.NewScanner(os.Stdin)
-	rc := scanner.Scan()
-	if !rc {
-		return dflt
-	}
-
-	if strings.ToLower(scanner.Text()) == "y" {
-		return true
-	}
-
-	if strings.ToLower(scanner.Text()) == "n" {
-		return false
-	}
-
-	return dflt
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/vals_cmds.go
----------------------------------------------------------------------
diff --git a/newt/cli/vals_cmds.go b/newt/cli/vals_cmds.go
deleted file mode 100644
index 267fc79..0000000
--- a/newt/cli/vals_cmds.go
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"strings"
-
-	"github.com/spf13/cobra"
-
-	"mynewt.apache.org/newt/util"
-)
-
-func valsRunCmd(cmd *cobra.Command, args []string) {
-	if len(args) == 0 {
-		NewtUsage(cmd, nil)
-	}
-
-	allVals := [][]string{}
-	for _, elemType := range args {
-		vals, err := VarValues(elemType)
-		if err != nil {
-			NewtUsage(cmd, err)
-		}
-
-		allVals = append(allVals, vals)
-	}
-
-	for i, vals := range allVals {
-		if i != 0 {
-			util.StatusMessage(util.VERBOSITY_DEFAULT, "\n")
-		}
-
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "%s names:\n", args[i])
-		for _, val := range vals {
-			util.StatusMessage(util.VERBOSITY_DEFAULT, "    %s\n", val)
-		}
-	}
-}
-
-func AddValsCommands(cmd *cobra.Command) {
-	valsShortHelp := "Display valid values for the specified element type(s)"
-
-	valsLongHelp := valsShortHelp + ".\n\nElement types:\n    " +
-		strings.Join(VarTypes(), "\n    ")
-
-	valsCmd := &cobra.Command{
-		Use:   "vals <element-type> [element-types...]",
-		Short: valsShortHelp,
-		Long:  valsLongHelp,
-		Run:   valsRunCmd,
-	}
-
-	cmd.AddCommand(valsCmd)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/cli/vars.go
----------------------------------------------------------------------
diff --git a/newt/cli/vars.go b/newt/cli/vars.go
deleted file mode 100644
index 7ed25de..0000000
--- a/newt/cli/vars.go
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package cli
-
-import (
-	"fmt"
-	"path/filepath"
-	"sort"
-	"strings"
-
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/util"
-)
-
-func varsFromPackageType(
-	pt interfaces.PackageType, fullPath bool) ([]string, error) {
-
-	values := []string{}
-
-	packs := project.GetProject().PackagesOfType(pt)
-	for _, pack := range packs {
-		value := pack.FullName()
-		if !fullPath {
-			value = filepath.Base(value)
-		}
-
-		values = append(values, value)
-	}
-
-	sort.Strings(values)
-
-	return values, nil
-}
-
-func settingValues(settingName string) ([]string, error) {
-	settingMap := map[string]struct{}{}
-
-	packs := project.GetProject().PackagesOfType(-1)
-	for _, pack := range packs {
-		settings :=
-			pack.(*pkg.LocalPackage).PkgV.GetStringSlice(settingName)
-
-		for _, setting := range settings {
-			settingMap[setting] = struct{}{}
-		}
-	}
-
-	values := make([]string, 0, len(settingMap))
-	for f, _ := range settingMap {
-		values = append(values, f)
-	}
-	sort.Strings(values)
-
-	return values, nil
-}
-
-func buildProfileValues() ([]string, error) {
-	profileMap := map[string]struct{}{}
-
-	packs := project.GetProject().PackagesOfType(pkg.PACKAGE_TYPE_COMPILER)
-	for _, pack := range packs {
-		v, err := util.ReadConfig(pack.(*pkg.LocalPackage).BasePath(),
-			"compiler")
-		if err != nil {
-			return nil, err
-		}
-
-		settingMap := v.AllSettings()
-		for k, _ := range settingMap {
-			if strings.HasPrefix(k, "compiler.flags") {
-				fields := strings.Split(k, ".")
-				if len(fields) >= 3 {
-					profileMap[fields[2]] = struct{}{}
-				}
-			}
-		}
-	}
-
-	values := make([]string, 0, len(profileMap))
-	for k, _ := range profileMap {
-		values = append(values, k)
-	}
-
-	sort.Strings(values)
-
-	return values, nil
-}
-
-var varsMap = map[string]func() ([]string, error){
-	// Package names.
-	"app": func() ([]string, error) {
-		return varsFromPackageType(pkg.PACKAGE_TYPE_APP, true)
-	},
-	"bsp": func() ([]string, error) {
-		return varsFromPackageType(pkg.PACKAGE_TYPE_BSP, true)
-	},
-	"compiler": func() ([]string, error) {
-		return varsFromPackageType(pkg.PACKAGE_TYPE_COMPILER, true)
-	},
-	"lib": func() ([]string, error) {
-		return varsFromPackageType(pkg.PACKAGE_TYPE_LIB, true)
-	},
-	"sdk": func() ([]string, error) {
-		return varsFromPackageType(pkg.PACKAGE_TYPE_SDK, true)
-	},
-	"target": func() ([]string, error) {
-		return varsFromPackageType(pkg.PACKAGE_TYPE_TARGET, true)
-	},
-
-	// Package settings.
-	"api": func() ([]string, error) {
-		return settingValues("pkg.apis")
-	},
-
-	// Target settings.
-	"build_profile": func() ([]string, error) {
-		return buildProfileValues()
-	},
-}
-
-// Returns a slice of valid values for the target variable with the specified
-// name.  If an invalid target variable is specified, an error is returned.
-func VarValues(varName string) ([]string, error) {
-	_, err := project.TryGetProject()
-	if err != nil {
-		return nil, err
-	}
-
-	fn := varsMap[varName]
-	if fn == nil {
-		err := util.NewNewtError(fmt.Sprintf("Unknown setting name: \"%s\"",
-			varName))
-		return nil, err
-	}
-
-	values, err := fn()
-	if err != nil {
-		return nil, err
-	}
-
-	return values, nil
-}
-
-func VarTypes() []string {
-	types := make([]string, 0, len(varsMap))
-
-	for k, _ := range varsMap {
-		types = append(types, k)
-	}
-
-	sort.Strings(types)
-	return types
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/compat/compat.go
----------------------------------------------------------------------
diff --git a/newt/compat/compat.go b/newt/compat/compat.go
deleted file mode 100644
index 2e4355f..0000000
--- a/newt/compat/compat.go
+++ /dev/null
@@ -1,275 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package compat
-
-import (
-	"fmt"
-	"math"
-	"sort"
-
-	"github.com/spf13/cast"
-
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/util"
-	"mynewt.apache.org/newt/viper"
-)
-
-type NewtCompatCode int
-
-const (
-	NEWT_COMPAT_GOOD NewtCompatCode = iota
-	NEWT_COMPAT_WARN
-	NEWT_COMPAT_ERROR
-)
-
-var NewtCompatCodeNames = map[NewtCompatCode]string{
-	NEWT_COMPAT_GOOD:  "good",
-	NEWT_COMPAT_WARN:  "warn",
-	NEWT_COMPAT_ERROR: "error",
-}
-
-type NewtCompatEntry struct {
-	code       NewtCompatCode
-	minNewtVer newtutil.Version
-}
-
-// Sorted in ascending order by newt version number.
-type NewtCompatTable []NewtCompatEntry
-
-type NewtCompatMap map[newtutil.Version]NewtCompatTable
-
-func newtCompatCodeToString(code NewtCompatCode) string {
-	return NewtCompatCodeNames[code]
-}
-
-func newtCompatCodeFromString(codeStr string) (NewtCompatCode, error) {
-	for c, s := range NewtCompatCodeNames {
-		if codeStr == s {
-			return c, nil
-		}
-	}
-
-	return NewtCompatCode(0),
-		util.FmtNewtError("Invalid newt compatibility code: %s", codeStr)
-}
-
-func parseNcEntry(verStr string, codeStr string) (NewtCompatEntry, error) {
-	entry := NewtCompatEntry{}
-	var err error
-
-	entry.minNewtVer, err = newtutil.ParseVersion(verStr)
-	if err != nil {
-		return entry, err
-	}
-
-	entry.code, err = newtCompatCodeFromString(codeStr)
-	if err != nil {
-		return entry, err
-	}
-
-	return entry, nil
-}
-
-func ParseNcTable(strMap map[string]string) (NewtCompatTable, error) {
-	tbl := NewtCompatTable{}
-
-	for v, c := range strMap {
-		entry, err := parseNcEntry(v, c)
-		if err != nil {
-			return tbl, err
-		}
-
-		tbl = append(tbl, entry)
-	}
-
-	sortEntries(tbl)
-
-	return tbl, nil
-}
-
-func ReadNcMap(v *viper.Viper) (NewtCompatMap, error) {
-	mp := NewtCompatMap{}
-	ncMap := v.GetStringMap("repo.newt_compatibility")
-
-	for k, v := range ncMap {
-		repoVer, err := newtutil.ParseVersion(k)
-		if err != nil {
-			return nil, util.FmtNewtError("Newt compatibility table contains " +
-				"invalid repo version \"%s\"")
-		}
-
-		if _, ok := mp[repoVer]; ok {
-			return nil, util.FmtNewtError("Newt compatibility table contains "+
-				"duplicate version specifier: %s", repoVer.String())
-		}
-
-		strMap := cast.ToStringMapString(v)
-		tbl, err := ParseNcTable(strMap)
-		if err != nil {
-			return nil, err
-		}
-
-		mp[repoVer] = tbl
-	}
-
-	return mp, nil
-}
-
-func (tbl NewtCompatTable) matchIdx(newtVer newtutil.Version) int {
-	// Iterate the table backwards.  The first entry whose version is less than
-	// or equal to the specified version is the match.
-	for i := 0; i < len(tbl); i++ {
-		idx := len(tbl) - i - 1
-		entry := &tbl[idx]
-		cmp := newtutil.VerCmp(entry.minNewtVer, newtVer)
-		if cmp <= 0 {
-			return idx
-		}
-	}
-
-	return -1
-}
-
-func (tbl NewtCompatTable) newIdxRange(i int, j int) []int {
-	if i >= len(tbl) {
-		return []int{j, i}
-	}
-
-	if j >= len(tbl) {
-		return []int{i, j}
-	}
-
-	e1 := tbl[i]
-	e2 := tbl[j]
-
-	if newtutil.VerCmp(e1.minNewtVer, e2.minNewtVer) < 0 {
-		return []int{i, j}
-	} else {
-		return []int{j, i}
-	}
-}
-
-func (tbl NewtCompatTable) idxRangesWithCode(c NewtCompatCode) [][]int {
-	ranges := [][]int{}
-
-	curi := -1
-	for i, e := range tbl {
-		if curi == -1 {
-			if e.code == c {
-				curi = i
-			}
-		} else {
-			if e.code != c {
-				ranges = append(ranges, tbl.newIdxRange(curi, i))
-				curi = -1
-			}
-		}
-	}
-
-	if curi != -1 {
-		ranges = append(ranges, tbl.newIdxRange(curi, len(tbl)))
-	}
-	return ranges
-}
-
-func (tbl NewtCompatTable) minMaxTgtVers(goodRange []int) (
-	newtutil.Version, newtutil.Version, newtutil.Version) {
-
-	minVer := tbl[goodRange[0]].minNewtVer
-
-	var maxVer newtutil.Version
-	if goodRange[1] < len(tbl) {
-		maxVer = tbl[goodRange[1]].minNewtVer
-	} else {
-		maxVer = newtutil.Version{math.MaxInt64, math.MaxInt64, math.MaxInt64}
-	}
-
-	targetVer := tbl[goodRange[1]-1].minNewtVer
-
-	return minVer, maxVer, targetVer
-}
-
-// @return NewtCompatCode       The severity of the newt incompatibility
-//         string               The warning or error message to display in case
-//                                  of incompatibility.
-func (tbl NewtCompatTable) CheckNewtVer(
-	newtVer newtutil.Version) (NewtCompatCode, string) {
-
-	var code NewtCompatCode
-	idx := tbl.matchIdx(newtVer)
-	if idx == -1 {
-		// This version of newt is older than every entry in the table.
-		code = NEWT_COMPAT_ERROR
-	} else {
-		code = tbl[idx].code
-		if code == NEWT_COMPAT_GOOD {
-			return NEWT_COMPAT_GOOD, ""
-		}
-	}
-
-	goodRanges := tbl.idxRangesWithCode(NEWT_COMPAT_GOOD)
-	for i := 0; i < len(goodRanges); i++ {
-		minVer, maxVer, tgtVer := tbl.minMaxTgtVers(goodRanges[i])
-
-		if newtutil.VerCmp(newtVer, minVer) < 0 {
-			return code, fmt.Sprintf("Please upgrade your newt tool to "+
-				"version %s", tgtVer.String())
-		}
-
-		if newtutil.VerCmp(newtVer, maxVer) >= 0 {
-			return code, fmt.Sprintf("Please upgrade your project "+
-				"or downgrade newt to %s", tgtVer.String())
-		}
-	}
-
-	return code, ""
-}
-
-type entrySorter struct {
-	entries []NewtCompatEntry
-}
-
-func (s entrySorter) Len() int {
-	return len(s.entries)
-}
-func (s entrySorter) Swap(i, j int) {
-	s.entries[i], s.entries[j] = s.entries[j], s.entries[i]
-}
-func (s entrySorter) Less(i, j int) bool {
-	e1 := s.entries[i]
-	e2 := s.entries[j]
-
-	cmp := newtutil.VerCmp(e1.minNewtVer, e2.minNewtVer)
-	if cmp < 0 {
-		return true
-	} else if cmp > 0 {
-		return false
-	}
-
-	return false
-}
-
-func sortEntries(entries []NewtCompatEntry) {
-	sorter := entrySorter{
-		entries: entries,
-	}
-
-	sort.Sort(sorter)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/downloader/downloader.go
----------------------------------------------------------------------
diff --git a/newt/downloader/downloader.go b/newt/downloader/downloader.go
deleted file mode 100644
index c8e13c6..0000000
--- a/newt/downloader/downloader.go
+++ /dev/null
@@ -1,472 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package downloader
-
-import (
-	"fmt"
-	"io"
-	"io/ioutil"
-	"net/http"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/util"
-)
-
-type Downloader interface {
-	FetchFile(name string, dest string) error
-	Branch() string
-	SetBranch(branch string)
-	DownloadRepo(branch string) (string, error)
-	CurrentBranch(path string) (string, error)
-	UpdateRepo(path string, branchName string) error
-	CleanupRepo(path string, branchName string) error
-	LocalDiff(path string) ([]byte, error)
-}
-
-type GenericDownloader struct {
-	branch string
-}
-
-type GithubDownloader struct {
-	GenericDownloader
-	Server string
-	User   string
-	Repo   string
-
-	// Github access token for private repositories.
-	Token string
-
-	// Basic authentication login and password for private repositories.
-	Login    string
-	Password string
-}
-
-type LocalDownloader struct {
-	GenericDownloader
-
-	// Path to parent directory of repository.yml file.
-	Path string
-}
-
-func executeGitCommand(dir string, cmd []string) ([]byte, error) {
-	wd, err := os.Getwd()
-	if err != nil {
-		return nil, util.NewNewtError(err.Error())
-	}
-
-	gitPath, err := exec.LookPath("git")
-	if err != nil {
-		return nil, util.NewNewtError(fmt.Sprintf("Can't find git binary: %s\n",
-			err.Error()))
-	}
-	gitPath = filepath.ToSlash(gitPath)
-
-	if err := os.Chdir(dir); err != nil {
-		return nil, util.NewNewtError(err.Error())
-	}
-
-	defer os.Chdir(wd)
-
-	gitCmd := []string{gitPath}
-	gitCmd = append(gitCmd, cmd...)
-	output, err := util.ShellCommand(gitCmd, nil)
-	if err != nil {
-		return nil, err
-	}
-
-	return output, nil
-}
-
-func isTag(repoDir string, branchName string) bool {
-	cmd := []string{"tag", "--list"}
-	output, _ := executeGitCommand(repoDir, cmd)
-	return strings.Contains(string(output), branchName)
-}
-
-func branchExists(repoDir string, branchName string) bool {
-	cmd := []string{"show-ref", "--verify", "--quiet", "refs/heads/" + branchName}
-	_, err := executeGitCommand(repoDir, cmd)
-	return err == nil
-}
-
-// checkout does checkout a branch, or create a new branch from a tag name
-// if the commit supplied is a tag. sha1 based commits have no special
-// handling and result in dettached from HEAD state.
-func checkout(repoDir string, commit string) error {
-	var cmd []string
-	if isTag(repoDir, commit) && !branchExists(repoDir, commit) {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "Will create new branch %s"+
-			" from tag %s\n", commit, "tags/"+commit)
-		cmd = []string{
-			"checkout",
-			"tags/" + commit,
-			"-b",
-			commit,
-		}
-	} else {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "Will checkout branch %s\n",
-			commit)
-		cmd = []string{
-			"checkout",
-			commit,
-		}
-	}
-	_, err := executeGitCommand(repoDir, cmd)
-	return err
-}
-
-// mergeBranches applies upstream changes to the local copy and must be
-// preceeded by a "fetch" to achieve any meaningful result.
-func mergeBranches(repoDir string) {
-	branches := []string{"master", "develop"}
-	for _, branch := range branches {
-		err := checkout(repoDir, branch)
-		if err != nil {
-			continue
-		}
-		_, err = executeGitCommand(repoDir, []string{"merge", "origin/" + branch})
-		if err != nil {
-			util.StatusMessage(util.VERBOSITY_VERBOSE, "Merging changes from origin/%s: %s\n",
-				branch, err)
-		} else {
-			util.StatusMessage(util.VERBOSITY_VERBOSE, "Merging changes from origin/%s\n",
-				branch)
-		}
-		// XXX: ignore error, probably resulting from a branch not available at
-		//      origin anymore.
-	}
-}
-
-func fetch(repoDir string) error {
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Fetching new remote branches/tags\n")
-	_, err := executeGitCommand(repoDir, []string{"fetch", "--tags"})
-	return err
-}
-
-// stash saves current changes locally and returns if a new stash was
-// created (if there where no changes, there's no need to stash)
-func stash(repoDir string) (bool, error) {
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Stashing local changes\n")
-	output, err := executeGitCommand(repoDir, []string{"stash"})
-	if err != nil {
-		return false, err
-	}
-	return strings.Contains(string(output), "Saved"), nil
-}
-
-func stashPop(repoDir string) error {
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Un-stashing local changes\n")
-	_, err := executeGitCommand(repoDir, []string{"stash", "pop"})
-	return err
-}
-
-func clean(repoDir string) error {
-	_, err := executeGitCommand(repoDir, []string{"clean", "-f"})
-	return err
-}
-
-func (gd *GenericDownloader) Branch() string {
-	return gd.branch
-}
-
-func (gd *GenericDownloader) SetBranch(branch string) {
-	gd.branch = branch
-}
-
-func (gd *GenericDownloader) TempDir() (string, error) {
-	dir, err := ioutil.TempDir("", "newt-tmp")
-	return dir, err
-}
-
-func (gd *GithubDownloader) FetchFile(name string, dest string) error {
-	server := "api.github.com"
-	prefix := "repos"
-	if gd.Server != "" {
-		server = gd.Server
-		prefix = "api/v3/repos"
-	}
-	url := fmt.Sprintf("https://%s/%s/%s/%s/contents/%s?ref=%s",
-		server, prefix, gd.User, gd.Repo, name, gd.Branch())
-
-	req, err := http.NewRequest("GET", url, nil)
-	req.Header.Add("Accept", "application/vnd.github.v3.raw")
-
-	if gd.Token != "" {
-		// XXX: Add command line option to include token in log.
-		log.Debugf("Using authorization token")
-		req.Header.Add("Authorization", "token "+gd.Token)
-	} else if gd.Login != "" && gd.Password != "" {
-		// XXX: Add command line option to include password in log.
-		log.Debugf("Using basic auth; login=%s", gd.Login)
-		req.SetBasicAuth(gd.Login, gd.Password)
-	}
-
-	log.Debugf("Fetching file %s (url: %s) to %s", name, url, dest)
-	client := &http.Client{}
-	rsp, err := client.Do(req)
-	if err != nil {
-		return util.NewNewtError(err.Error())
-	}
-	defer rsp.Body.Close()
-
-	if rsp.StatusCode != http.StatusOK {
-		errMsg := fmt.Sprintf("Failed to download '%s'; status=%s",
-			url, rsp.Status)
-		switch rsp.StatusCode {
-		case http.StatusNotFound:
-			errMsg += "; URL incorrect or repository private?"
-		case http.StatusUnauthorized:
-			errMsg += "; credentials incorrect?"
-		}
-
-		return util.NewNewtError(errMsg)
-	}
-
-	handle, err := os.Create(dest)
-	if err != nil {
-		return util.NewNewtError(err.Error())
-	}
-	defer handle.Close()
-
-	_, err = io.Copy(handle, rsp.Body)
-
-	return nil
-}
-
-func (gd *GithubDownloader) CurrentBranch(path string) (string, error) {
-	cmd := []string{"rev-parse", "--abbrev-ref", "HEAD"}
-	branch, err := executeGitCommand(path, cmd)
-	return strings.Trim(string(branch), "\r\n"), err
-}
-
-func (gd *GithubDownloader) UpdateRepo(path string, branchName string) error {
-	err := fetch(path)
-	if err != nil {
-		return err
-	}
-
-	stashed, err := stash(path)
-	if err != nil {
-		return err
-	}
-
-	mergeBranches(path)
-
-	err = checkout(path, branchName)
-	if err != nil {
-		return err
-	}
-
-	if stashed {
-		return stashPop(path)
-	}
-
-	return nil
-}
-
-func (gd *GithubDownloader) CleanupRepo(path string, branchName string) error {
-	_, err := stash(path)
-	if err != nil {
-		return err
-	}
-
-	err = clean(path)
-	if err != nil {
-		return err
-	}
-
-	// TODO: needs handling of non-tracked files
-
-	return gd.UpdateRepo(path, branchName)
-}
-
-func (gd *GithubDownloader) LocalDiff(path string) ([]byte, error) {
-	return executeGitCommand(path, []string{"diff"})
-}
-
-func (gd *GithubDownloader) DownloadRepo(commit string) (string, error) {
-	// Get a temporary directory, and copy the repository into that directory.
-	tmpdir, err := ioutil.TempDir("", "newt-repo")
-	if err != nil {
-		return "", err
-	}
-
-	// Currently only the master branch is supported.
-	branch := "master"
-	server := "github.com"
-
-	if gd.Server != "" {
-		server = gd.Server
-	}
-	url := fmt.Sprintf("https://%s/%s/%s.git", server, gd.User, gd.Repo)
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Downloading "+
-		"repository %s (branch: %s; commit: %s) at %s\n", gd.Repo, branch,
-		commit, url)
-
-	gitPath, err := exec.LookPath("git")
-	if err != nil {
-		os.RemoveAll(tmpdir)
-		return "", util.NewNewtError(fmt.Sprintf("Can't find git binary: %s\n",
-			err.Error()))
-	}
-	gitPath = filepath.ToSlash(gitPath)
-
-	// Clone the repository.
-	cmd := []string{
-		gitPath,
-		"clone",
-		"-b",
-		branch,
-		url,
-		tmpdir,
-	}
-
-	if util.Verbosity >= util.VERBOSITY_VERBOSE {
-		if err := util.ShellInteractiveCommand(cmd, nil); err != nil {
-			os.RemoveAll(tmpdir)
-			return "", err
-		}
-	} else {
-		if _, err := util.ShellCommand(cmd, nil); err != nil {
-			return "", err
-		}
-	}
-
-	// Checkout the specified commit.
-	if err := checkout(tmpdir, commit); err != nil {
-		return "", err
-	}
-
-	return tmpdir, nil
-}
-
-func NewGithubDownloader() *GithubDownloader {
-	return &GithubDownloader{}
-}
-
-func (ld *LocalDownloader) FetchFile(name string, dest string) error {
-	srcPath := ld.Path + "/" + name
-
-	log.Debugf("Fetching file %s to %s", srcPath, dest)
-	if err := util.CopyFile(srcPath, dest); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (ld *LocalDownloader) CurrentBranch(path string) (string, error) {
-	cmd := []string{"rev-parse", "--abbrev-ref", "HEAD"}
-	branch, err := executeGitCommand(path, cmd)
-	return strings.Trim(string(branch), "\r\n"), err
-}
-
-// NOTE: intentionally always error...
-func (ld *LocalDownloader) UpdateRepo(path string, branchName string) error {
-	return util.NewNewtError(fmt.Sprintf("Can't pull from a local repo\n"))
-}
-
-func (ld *LocalDownloader) CleanupRepo(path string, branchName string) error {
-	os.RemoveAll(path)
-	_, err := ld.DownloadRepo(branchName)
-	return err
-}
-
-func (ld *LocalDownloader) LocalDiff(path string) ([]byte, error) {
-	return executeGitCommand(path, []string{"diff"})
-}
-
-func (ld *LocalDownloader) DownloadRepo(commit string) (string, error) {
-	// Get a temporary directory, and copy the repository into that directory.
-	tmpdir, err := ioutil.TempDir("", "newt-repo")
-	if err != nil {
-		return "", err
-	}
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE,
-		"Downloading local repository %s\n", ld.Path)
-
-	if err := util.CopyDir(ld.Path, tmpdir); err != nil {
-		return "", err
-	}
-
-	// Checkout the specified commit.
-	if err := checkout(tmpdir, commit); err != nil {
-		return "", err
-	}
-
-	return tmpdir, nil
-}
-
-func NewLocalDownloader() *LocalDownloader {
-	return &LocalDownloader{}
-}
-
-func LoadDownloader(repoName string, repoVars map[string]string) (
-	Downloader, error) {
-
-	switch repoVars["type"] {
-	case "github":
-		gd := NewGithubDownloader()
-
-		gd.Server = repoVars["server"]
-		gd.User = repoVars["user"]
-		gd.Repo = repoVars["repo"]
-
-		// The project.yml file can contain github access tokens and
-		// authentication credentials, but this file is probably world-readable
-		// and therefore not a great place for this.
-		gd.Token = repoVars["token"]
-		gd.Login = repoVars["login"]
-		gd.Password = repoVars["password"]
-
-		// Alternatively, the user can put security material in
-		// $HOME/.newt/repos.yml.
-		newtrc := newtutil.Newtrc()
-		privRepo := newtrc.GetStringMapString("repository." + repoName)
-		if privRepo != nil {
-			if gd.Token == "" {
-				gd.Token = privRepo["token"]
-			}
-			if gd.Login == "" {
-				gd.Login = privRepo["login"]
-			}
-			if gd.Password == "" {
-				gd.Password = privRepo["password"]
-			}
-		}
-		return gd, nil
-
-	case "local":
-		ld := NewLocalDownloader()
-		ld.Path = repoVars["path"]
-		return ld, nil
-
-	default:
-		return nil, util.FmtNewtError("Invalid repository type: %s",
-			repoVars["type"])
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/flash/flash.go
----------------------------------------------------------------------
diff --git a/newt/flash/flash.go b/newt/flash/flash.go
deleted file mode 100644
index 97114c5..0000000
--- a/newt/flash/flash.go
+++ /dev/null
@@ -1,421 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package flash
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"sort"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-	"github.com/spf13/cast"
-
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/util"
-)
-
-const FLASH_AREA_NAME_BOOTLOADER = "FLASH_AREA_BOOTLOADER"
-const FLASH_AREA_NAME_IMAGE_0 = "FLASH_AREA_IMAGE_0"
-const FLASH_AREA_NAME_IMAGE_1 = "FLASH_AREA_IMAGE_1"
-const FLASH_AREA_NAME_IMAGE_SCRATCH = "FLASH_AREA_IMAGE_SCRATCH"
-
-var SYSTEM_AREA_NAME_ID_MAP = map[string]int{
-	FLASH_AREA_NAME_BOOTLOADER:    0,
-	FLASH_AREA_NAME_IMAGE_0:       1,
-	FLASH_AREA_NAME_IMAGE_1:       2,
-	FLASH_AREA_NAME_IMAGE_SCRATCH: 3,
-}
-
-const AREA_USER_ID_MIN = 16
-
-const HEADER_PATH = "sysflash/sysflash.h"
-const C_VAR_NAME = "sysflash_map_dflt"
-const C_VAR_COMMENT = `/**
- * This flash map definition is used for two purposes:
- * 1. To locate the meta area, which contains the true flash map definition.
- * 2. As a fallback in case the meta area cannot be read from flash.
- */
-`
-
-type FlashArea struct {
-	Name   string
-	Id     int
-	Device int
-	Offset int
-	Size   int
-}
-
-type FlashMap struct {
-	Areas       map[string]FlashArea
-	Overlaps    [][]FlashArea
-	IdConflicts [][]FlashArea
-}
-
-func newFlashMap() FlashMap {
-	return FlashMap{
-		Areas:    map[string]FlashArea{},
-		Overlaps: [][]FlashArea{},
-	}
-}
-
-func flashAreaErr(areaName string, format string, args ...interface{}) error {
-	return util.NewNewtError(
-		"failure while parsing flash area \"" + areaName + "\": " +
-			fmt.Sprintf(format, args...))
-}
-
-func parseSize(val string) (int, error) {
-	lower := strings.ToLower(val)
-
-	multiplier := 1
-	if strings.HasSuffix(lower, "kb") {
-		multiplier = 1024
-		lower = strings.TrimSuffix(lower, "kb")
-	}
-
-	num, err := util.AtoiNoOct(lower)
-	if err != nil {
-		return 0, err
-	}
-
-	return num * multiplier, nil
-}
-
-func parseFlashArea(
-	name string, ymlFields map[string]interface{}) (FlashArea, error) {
-
-	area := FlashArea{
-		Name: name,
-	}
-
-	idPresent := false
-	devicePresent := false
-	offsetPresent := false
-	sizePresent := false
-
-	var isSystem bool
-	area.Id, isSystem = SYSTEM_AREA_NAME_ID_MAP[name]
-
-	var err error
-
-	fields := cast.ToStringMapString(ymlFields)
-	for k, v := range fields {
-		switch k {
-		case "user_id":
-			if isSystem {
-				return area, flashAreaErr(name,
-					"system areas cannot specify a user ID")
-			}
-			userId, err := util.AtoiNoOct(v)
-			if err != nil {
-				return area, flashAreaErr(name, "invalid user id: %s", v)
-			}
-			area.Id = userId + AREA_USER_ID_MIN
-			idPresent = true
-
-		case "device":
-			area.Device, err = util.AtoiNoOct(v)
-			if err != nil {
-				return area, flashAreaErr(name, "invalid device: %s", v)
-			}
-			devicePresent = true
-
-		case "offset":
-			area.Offset, err = util.AtoiNoOct(v)
-			if err != nil {
-				return area, flashAreaErr(name, "invalid offset: %s", v)
-			}
-			offsetPresent = true
-
-		case "size":
-			area.Size, err = parseSize(v)
-			if err != nil {
-				return area, flashAreaErr(name, err.Error())
-			}
-			sizePresent = true
-
-		default:
-			util.StatusMessage(util.VERBOSITY_QUIET,
-				"Warning: flash area \"%s\" contains unrecognized field: %s",
-				name, k)
-		}
-	}
-
-	if !isSystem && !idPresent {
-		return area, flashAreaErr(name, "required field \"user_id\" missing")
-	}
-	if !devicePresent {
-		return area, flashAreaErr(name, "required field \"device\" missing")
-	}
-	if !offsetPresent {
-		return area, flashAreaErr(name, "required field \"offset\" missing")
-	}
-	if !sizePresent {
-		return area, flashAreaErr(name, "required field \"size\" missing")
-	}
-
-	return area, nil
-}
-
-func (flashMap FlashMap) unSortedAreas() []FlashArea {
-	areas := make([]FlashArea, 0, len(flashMap.Areas))
-	for _, area := range flashMap.Areas {
-		areas = append(areas, area)
-	}
-
-	return areas
-}
-
-func (flashMap FlashMap) SortedAreas() []FlashArea {
-	idMap := make(map[int]FlashArea, len(flashMap.Areas))
-	ids := make([]int, 0, len(flashMap.Areas))
-	for _, area := range flashMap.Areas {
-		idMap[area.Id] = area
-		ids = append(ids, area.Id)
-	}
-	sort.Ints(ids)
-
-	areas := make([]FlashArea, len(ids))
-	for i, id := range ids {
-		areas[i] = idMap[id]
-	}
-
-	return areas
-}
-
-func (flashMap FlashMap) DeviceIds() []int {
-	deviceMap := map[int]struct{}{}
-
-	for _, area := range flashMap.Areas {
-		deviceMap[area.Device] = struct{}{}
-	}
-
-	devices := make([]int, 0, len(deviceMap))
-	for device, _ := range deviceMap {
-		devices = append(devices, device)
-	}
-	sort.Ints(devices)
-
-	return devices
-}
-
-func areasDistinct(a FlashArea, b FlashArea) bool {
-	var lo FlashArea
-	var hi FlashArea
-
-	if a.Offset < b.Offset {
-		lo = a
-		hi = b
-	} else {
-		lo = b
-		hi = a
-	}
-
-	return lo.Device != hi.Device || lo.Offset+lo.Size <= hi.Offset
-}
-
-func (flashMap *FlashMap) detectOverlaps() {
-	flashMap.Overlaps = [][]FlashArea{}
-
-	// Convert the map to a slice.
-	areas := flashMap.unSortedAreas()
-
-	for i := 0; i < len(areas)-1; i++ {
-		iarea := areas[i]
-		for j := i + 1; j < len(areas); j++ {
-			jarea := areas[j]
-
-			if !areasDistinct(iarea, jarea) {
-				flashMap.Overlaps = append(
-					flashMap.Overlaps, []FlashArea{iarea, jarea})
-			}
-
-			if iarea.Id == jarea.Id {
-				flashMap.IdConflicts = append(
-					flashMap.IdConflicts, []FlashArea{iarea, jarea})
-			}
-		}
-	}
-}
-
-func (flashMap FlashMap) ErrorText() string {
-	str := ""
-
-	if len(flashMap.IdConflicts) > 0 {
-		str += "Conflicting flash area IDs detected:\n"
-
-		for _, pair := range flashMap.IdConflicts {
-			str += fmt.Sprintf("    (%d) %s =/= %s\n",
-				pair[0].Id-AREA_USER_ID_MIN, pair[0].Name, pair[1].Name)
-		}
-	}
-
-	if len(flashMap.Overlaps) > 0 {
-		str += "Overlapping flash areas detected:\n"
-
-		for _, pair := range flashMap.Overlaps {
-			str += fmt.Sprintf("    %s =/= %s\n", pair[0].Name, pair[1].Name)
-		}
-	}
-
-	return str
-}
-
-func Read(ymlFlashMap map[string]interface{}) (FlashMap, error) {
-	flashMap := newFlashMap()
-
-	ymlAreas := ymlFlashMap["areas"]
-	if ymlAreas == nil {
-		return flashMap, util.NewNewtError(
-			"\"areas\" mapping missing from flash map definition")
-	}
-
-	areaMap := cast.ToStringMap(ymlAreas)
-	for k, v := range areaMap {
-		if _, ok := flashMap.Areas[k]; ok {
-			return flashMap, flashAreaErr(k, "name conflict")
-		}
-
-		ymlArea := cast.ToStringMap(v)
-		area, err := parseFlashArea(k, ymlArea)
-		if err != nil {
-			return flashMap, flashAreaErr(k, err.Error())
-		}
-
-		flashMap.Areas[k] = area
-	}
-
-	flashMap.detectOverlaps()
-
-	return flashMap, nil
-}
-
-func (flashMap FlashMap) varDecl() string {
-	return fmt.Sprintf("const struct flash_area %s[%d]", C_VAR_NAME,
-		len(flashMap.Areas))
-}
-
-func (area FlashArea) writeHeader(w io.Writer) {
-	fmt.Fprintf(w, "#define %-40s %d\n", area.Name, area.Id)
-}
-
-func (flashMap FlashMap) writeHeader(w io.Writer) {
-	fmt.Fprintf(w, newtutil.GeneratedPreamble())
-
-	fmt.Fprintf(w, "#ifndef H_MYNEWT_SYSFLASH_\n")
-	fmt.Fprintf(w, "#define H_MYNEWT_SYSFLASH_\n")
-	fmt.Fprintf(w, "\n")
-	fmt.Fprintf(w, "#include \"flash_map/flash_map.h\"\n")
-	fmt.Fprintf(w, "\n")
-	fmt.Fprintf(w, "%s", C_VAR_COMMENT)
-	fmt.Fprintf(w, "extern %s;\n", flashMap.varDecl())
-	fmt.Fprintf(w, "\n")
-
-	for _, area := range flashMap.SortedAreas() {
-		area.writeHeader(w)
-	}
-
-	fmt.Fprintf(w, "\n#endif\n")
-}
-
-func sizeComment(size int) string {
-	if size%1024 != 0 {
-		return ""
-	}
-
-	return fmt.Sprintf(" /* %d kB */", size/1024)
-}
-
-func (area FlashArea) writeSrc(w io.Writer) {
-	fmt.Fprintf(w, "    /* %s */\n", area.Name)
-	fmt.Fprintf(w, "    {\n")
-	fmt.Fprintf(w, "        .fa_id = %d,\n", area.Id)
-	fmt.Fprintf(w, "        .fa_device_id = %d,\n", area.Device)
-	fmt.Fprintf(w, "        .fa_off = 0x%08x,\n", area.Offset)
-	fmt.Fprintf(w, "        .fa_size = %d,%s\n", area.Size,
-		sizeComment(area.Size))
-	fmt.Fprintf(w, "    },\n")
-}
-
-func (flashMap FlashMap) writeSrc(w io.Writer) {
-	fmt.Fprintf(w, newtutil.GeneratedPreamble())
-
-	fmt.Fprintf(w, "#include \"%s\"\n", HEADER_PATH)
-	fmt.Fprintf(w, "\n")
-	fmt.Fprintf(w, "%s", C_VAR_COMMENT)
-	fmt.Fprintf(w, "%s = {", flashMap.varDecl())
-
-	for _, area := range flashMap.SortedAreas() {
-		fmt.Fprintf(w, "\n")
-		area.writeSrc(w)
-	}
-
-	fmt.Fprintf(w, "};\n")
-}
-
-func (flashMap FlashMap) ensureWrittenGen(path string, contents []byte) error {
-	writeReqd, err := util.FileContentsChanged(path, contents)
-	if err != nil {
-		return err
-	}
-	if !writeReqd {
-		log.Debugf("flash map unchanged; not writing file (%s).", path)
-		return nil
-	}
-
-	log.Debugf("flash map changed; writing file (%s).", path)
-
-	if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	if err := ioutil.WriteFile(path, contents, 0644); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	return nil
-}
-
-func (flashMap FlashMap) EnsureWritten(
-	srcDir string, includeDir string, targetName string) error {
-
-	buf := bytes.Buffer{}
-	flashMap.writeSrc(&buf)
-	if err := flashMap.ensureWrittenGen(
-		fmt.Sprintf("%s/%s-sysflash.c", srcDir, targetName),
-		buf.Bytes()); err != nil {
-
-		return err
-	}
-
-	buf = bytes.Buffer{}
-	flashMap.writeHeader(&buf)
-	if err := flashMap.ensureWrittenGen(
-		includeDir+"/"+HEADER_PATH, buf.Bytes()); err != nil {
-		return err
-	}
-
-	return nil
-}


[12/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
deleted file mode 100644
index a08922b..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go
+++ /dev/null
@@ -1,1436 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,solaris
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_802                        = 0x12
-	AF_APPLETALK                  = 0x10
-	AF_CCITT                      = 0xa
-	AF_CHAOS                      = 0x5
-	AF_DATAKIT                    = 0x9
-	AF_DECnet                     = 0xc
-	AF_DLI                        = 0xd
-	AF_ECMA                       = 0x8
-	AF_FILE                       = 0x1
-	AF_GOSIP                      = 0x16
-	AF_HYLINK                     = 0xf
-	AF_IMPLINK                    = 0x3
-	AF_INET                       = 0x2
-	AF_INET6                      = 0x1a
-	AF_INET_OFFLOAD               = 0x1e
-	AF_IPX                        = 0x17
-	AF_KEY                        = 0x1b
-	AF_LAT                        = 0xe
-	AF_LINK                       = 0x19
-	AF_LOCAL                      = 0x1
-	AF_MAX                        = 0x20
-	AF_NBS                        = 0x7
-	AF_NCA                        = 0x1c
-	AF_NIT                        = 0x11
-	AF_NS                         = 0x6
-	AF_OSI                        = 0x13
-	AF_OSINET                     = 0x15
-	AF_PACKET                     = 0x20
-	AF_POLICY                     = 0x1d
-	AF_PUP                        = 0x4
-	AF_ROUTE                      = 0x18
-	AF_SNA                        = 0xb
-	AF_TRILL                      = 0x1f
-	AF_UNIX                       = 0x1
-	AF_UNSPEC                     = 0x0
-	AF_X25                        = 0x14
-	ARPHRD_ARCNET                 = 0x7
-	ARPHRD_ATM                    = 0x10
-	ARPHRD_AX25                   = 0x3
-	ARPHRD_CHAOS                  = 0x5
-	ARPHRD_EETHER                 = 0x2
-	ARPHRD_ETHER                  = 0x1
-	ARPHRD_FC                     = 0x12
-	ARPHRD_FRAME                  = 0xf
-	ARPHRD_HDLC                   = 0x11
-	ARPHRD_IB                     = 0x20
-	ARPHRD_IEEE802                = 0x6
-	ARPHRD_IPATM                  = 0x13
-	ARPHRD_METRICOM               = 0x17
-	ARPHRD_TUNNEL                 = 0x1f
-	B0                            = 0x0
-	B110                          = 0x3
-	B115200                       = 0x12
-	B1200                         = 0x9
-	B134                          = 0x4
-	B150                          = 0x5
-	B153600                       = 0x13
-	B1800                         = 0xa
-	B19200                        = 0xe
-	B200                          = 0x6
-	B230400                       = 0x14
-	B2400                         = 0xb
-	B300                          = 0x7
-	B307200                       = 0x15
-	B38400                        = 0xf
-	B460800                       = 0x16
-	B4800                         = 0xc
-	B50                           = 0x1
-	B57600                        = 0x10
-	B600                          = 0x8
-	B75                           = 0x2
-	B76800                        = 0x11
-	B921600                       = 0x17
-	B9600                         = 0xd
-	BIOCFLUSH                     = 0x20004268
-	BIOCGBLEN                     = 0x40044266
-	BIOCGDLT                      = 0x4004426a
-	BIOCGDLTLIST                  = -0x3fefbd89
-	BIOCGDLTLIST32                = -0x3ff7bd89
-	BIOCGETIF                     = 0x4020426b
-	BIOCGETLIF                    = 0x4078426b
-	BIOCGHDRCMPLT                 = 0x40044274
-	BIOCGRTIMEOUT                 = 0x4010427b
-	BIOCGRTIMEOUT32               = 0x4008427b
-	BIOCGSEESENT                  = 0x40044278
-	BIOCGSTATS                    = 0x4080426f
-	BIOCGSTATSOLD                 = 0x4008426f
-	BIOCIMMEDIATE                 = -0x7ffbbd90
-	BIOCPROMISC                   = 0x20004269
-	BIOCSBLEN                     = -0x3ffbbd9a
-	BIOCSDLT                      = -0x7ffbbd8a
-	BIOCSETF                      = -0x7fefbd99
-	BIOCSETF32                    = -0x7ff7bd99
-	BIOCSETIF                     = -0x7fdfbd94
-	BIOCSETLIF                    = -0x7f87bd94
-	BIOCSHDRCMPLT                 = -0x7ffbbd8b
-	BIOCSRTIMEOUT                 = -0x7fefbd86
-	BIOCSRTIMEOUT32               = -0x7ff7bd86
-	BIOCSSEESENT                  = -0x7ffbbd87
-	BIOCSTCPF                     = -0x7fefbd8e
-	BIOCSUDPF                     = -0x7fefbd8d
-	BIOCVERSION                   = 0x40044271
-	BPF_A                         = 0x10
-	BPF_ABS                       = 0x20
-	BPF_ADD                       = 0x0
-	BPF_ALIGNMENT                 = 0x4
-	BPF_ALU                       = 0x4
-	BPF_AND                       = 0x50
-	BPF_B                         = 0x10
-	BPF_DFLTBUFSIZE               = 0x100000
-	BPF_DIV                       = 0x30
-	BPF_H                         = 0x8
-	BPF_IMM                       = 0x0
-	BPF_IND                       = 0x40
-	BPF_JA                        = 0x0
-	BPF_JEQ                       = 0x10
-	BPF_JGE                       = 0x30
-	BPF_JGT                       = 0x20
-	BPF_JMP                       = 0x5
-	BPF_JSET                      = 0x40
-	BPF_K                         = 0x0
-	BPF_LD                        = 0x0
-	BPF_LDX                       = 0x1
-	BPF_LEN                       = 0x80
-	BPF_LSH                       = 0x60
-	BPF_MAJOR_VERSION             = 0x1
-	BPF_MAXBUFSIZE                = 0x1000000
-	BPF_MAXINSNS                  = 0x200
-	BPF_MEM                       = 0x60
-	BPF_MEMWORDS                  = 0x10
-	BPF_MINBUFSIZE                = 0x20
-	BPF_MINOR_VERSION             = 0x1
-	BPF_MISC                      = 0x7
-	BPF_MSH                       = 0xa0
-	BPF_MUL                       = 0x20
-	BPF_NEG                       = 0x80
-	BPF_OR                        = 0x40
-	BPF_RELEASE                   = 0x30bb6
-	BPF_RET                       = 0x6
-	BPF_RSH                       = 0x70
-	BPF_ST                        = 0x2
-	BPF_STX                       = 0x3
-	BPF_SUB                       = 0x10
-	BPF_TAX                       = 0x0
-	BPF_TXA                       = 0x80
-	BPF_W                         = 0x0
-	BPF_X                         = 0x8
-	BRKINT                        = 0x2
-	CFLUSH                        = 0xf
-	CLOCAL                        = 0x800
-	CLOCK_HIGHRES                 = 0x4
-	CLOCK_LEVEL                   = 0xa
-	CLOCK_MONOTONIC               = 0x4
-	CLOCK_PROCESS_CPUTIME_ID      = 0x5
-	CLOCK_PROF                    = 0x2
-	CLOCK_REALTIME                = 0x3
-	CLOCK_THREAD_CPUTIME_ID       = 0x2
-	CLOCK_VIRTUAL                 = 0x1
-	CREAD                         = 0x80
-	CS5                           = 0x0
-	CS6                           = 0x10
-	CS7                           = 0x20
-	CS8                           = 0x30
-	CSIZE                         = 0x30
-	CSTART                        = 0x11
-	CSTATUS                       = 0x14
-	CSTOP                         = 0x13
-	CSTOPB                        = 0x40
-	CSUSP                         = 0x1a
-	CSWTCH                        = 0x1a
-	DLT_AIRONET_HEADER            = 0x78
-	DLT_APPLE_IP_OVER_IEEE1394    = 0x8a
-	DLT_ARCNET                    = 0x7
-	DLT_ARCNET_LINUX              = 0x81
-	DLT_ATM_CLIP                  = 0x13
-	DLT_ATM_RFC1483               = 0xb
-	DLT_AURORA                    = 0x7e
-	DLT_AX25                      = 0x3
-	DLT_BACNET_MS_TP              = 0xa5
-	DLT_CHAOS                     = 0x5
-	DLT_CISCO_IOS                 = 0x76
-	DLT_C_HDLC                    = 0x68
-	DLT_DOCSIS                    = 0x8f
-	DLT_ECONET                    = 0x73
-	DLT_EN10MB                    = 0x1
-	DLT_EN3MB                     = 0x2
-	DLT_ENC                       = 0x6d
-	DLT_ERF_ETH                   = 0xaf
-	DLT_ERF_POS                   = 0xb0
-	DLT_FDDI                      = 0xa
-	DLT_FRELAY                    = 0x6b
-	DLT_GCOM_SERIAL               = 0xad
-	DLT_GCOM_T1E1                 = 0xac
-	DLT_GPF_F                     = 0xab
-	DLT_GPF_T                     = 0xaa
-	DLT_GPRS_LLC                  = 0xa9
-	DLT_HDLC                      = 0x10
-	DLT_HHDLC                     = 0x79
-	DLT_HIPPI                     = 0xf
-	DLT_IBM_SN                    = 0x92
-	DLT_IBM_SP                    = 0x91
-	DLT_IEEE802                   = 0x6
-	DLT_IEEE802_11                = 0x69
-	DLT_IEEE802_11_RADIO          = 0x7f
-	DLT_IEEE802_11_RADIO_AVS      = 0xa3
-	DLT_IPNET                     = 0xe2
-	DLT_IPOIB                     = 0xa2
-	DLT_IP_OVER_FC                = 0x7a
-	DLT_JUNIPER_ATM1              = 0x89
-	DLT_JUNIPER_ATM2              = 0x87
-	DLT_JUNIPER_CHDLC             = 0xb5
-	DLT_JUNIPER_ES                = 0x84
-	DLT_JUNIPER_ETHER             = 0xb2
-	DLT_JUNIPER_FRELAY            = 0xb4
-	DLT_JUNIPER_GGSN              = 0x85
-	DLT_JUNIPER_MFR               = 0x86
-	DLT_JUNIPER_MLFR              = 0x83
-	DLT_JUNIPER_MLPPP             = 0x82
-	DLT_JUNIPER_MONITOR           = 0xa4
-	DLT_JUNIPER_PIC_PEER          = 0xae
-	DLT_JUNIPER_PPP               = 0xb3
-	DLT_JUNIPER_PPPOE             = 0xa7
-	DLT_JUNIPER_PPPOE_ATM         = 0xa8
-	DLT_JUNIPER_SERVICES          = 0x88
-	DLT_LINUX_IRDA                = 0x90
-	DLT_LINUX_LAPD                = 0xb1
-	DLT_LINUX_SLL                 = 0x71
-	DLT_LOOP                      = 0x6c
-	DLT_LTALK                     = 0x72
-	DLT_MTP2                      = 0x8c
-	DLT_MTP2_WITH_PHDR            = 0x8b
-	DLT_MTP3                      = 0x8d
-	DLT_NULL                      = 0x0
-	DLT_PCI_EXP                   = 0x7d
-	DLT_PFLOG                     = 0x75
-	DLT_PFSYNC                    = 0x12
-	DLT_PPP                       = 0x9
-	DLT_PPP_BSDOS                 = 0xe
-	DLT_PPP_PPPD                  = 0xa6
-	DLT_PRISM_HEADER              = 0x77
-	DLT_PRONET                    = 0x4
-	DLT_RAW                       = 0xc
-	DLT_RAWAF_MASK                = 0x2240000
-	DLT_RIO                       = 0x7c
-	DLT_SCCP                      = 0x8e
-	DLT_SLIP                      = 0x8
-	DLT_SLIP_BSDOS                = 0xd
-	DLT_SUNATM                    = 0x7b
-	DLT_SYMANTEC_FIREWALL         = 0x63
-	DLT_TZSP                      = 0x80
-	ECHO                          = 0x8
-	ECHOCTL                       = 0x200
-	ECHOE                         = 0x10
-	ECHOK                         = 0x20
-	ECHOKE                        = 0x800
-	ECHONL                        = 0x40
-	ECHOPRT                       = 0x400
-	EMPTY_SET                     = 0x0
-	EMT_CPCOVF                    = 0x1
-	EQUALITY_CHECK                = 0x0
-	EXTA                          = 0xe
-	EXTB                          = 0xf
-	FD_CLOEXEC                    = 0x1
-	FD_NFDBITS                    = 0x40
-	FD_SETSIZE                    = 0x10000
-	FLUSHALL                      = 0x1
-	FLUSHDATA                     = 0x0
-	FLUSHO                        = 0x2000
-	F_ALLOCSP                     = 0xa
-	F_ALLOCSP64                   = 0xa
-	F_BADFD                       = 0x2e
-	F_BLKSIZE                     = 0x13
-	F_BLOCKS                      = 0x12
-	F_CHKFL                       = 0x8
-	F_COMPAT                      = 0x8
-	F_DUP2FD                      = 0x9
-	F_DUP2FD_CLOEXEC              = 0x24
-	F_DUPFD                       = 0x0
-	F_DUPFD_CLOEXEC               = 0x25
-	F_FREESP                      = 0xb
-	F_FREESP64                    = 0xb
-	F_GETFD                       = 0x1
-	F_GETFL                       = 0x3
-	F_GETLK                       = 0xe
-	F_GETLK64                     = 0xe
-	F_GETOWN                      = 0x17
-	F_GETXFL                      = 0x2d
-	F_HASREMOTELOCKS              = 0x1a
-	F_ISSTREAM                    = 0xd
-	F_MANDDNY                     = 0x10
-	F_MDACC                       = 0x20
-	F_NODNY                       = 0x0
-	F_NPRIV                       = 0x10
-	F_PRIV                        = 0xf
-	F_QUOTACTL                    = 0x11
-	F_RDACC                       = 0x1
-	F_RDDNY                       = 0x1
-	F_RDLCK                       = 0x1
-	F_REVOKE                      = 0x19
-	F_RMACC                       = 0x4
-	F_RMDNY                       = 0x4
-	F_RWACC                       = 0x3
-	F_RWDNY                       = 0x3
-	F_SETFD                       = 0x2
-	F_SETFL                       = 0x4
-	F_SETLK                       = 0x6
-	F_SETLK64                     = 0x6
-	F_SETLK64_NBMAND              = 0x2a
-	F_SETLKW                      = 0x7
-	F_SETLKW64                    = 0x7
-	F_SETLK_NBMAND                = 0x2a
-	F_SETOWN                      = 0x18
-	F_SHARE                       = 0x28
-	F_SHARE_NBMAND                = 0x2b
-	F_UNLCK                       = 0x3
-	F_UNLKSYS                     = 0x4
-	F_UNSHARE                     = 0x29
-	F_WRACC                       = 0x2
-	F_WRDNY                       = 0x2
-	F_WRLCK                       = 0x2
-	HUPCL                         = 0x400
-	ICANON                        = 0x2
-	ICRNL                         = 0x100
-	IEXTEN                        = 0x8000
-	IFF_ADDRCONF                  = 0x80000
-	IFF_ALLMULTI                  = 0x200
-	IFF_ANYCAST                   = 0x400000
-	IFF_BROADCAST                 = 0x2
-	IFF_CANTCHANGE                = 0x7f203003b5a
-	IFF_COS_ENABLED               = 0x200000000
-	IFF_DEBUG                     = 0x4
-	IFF_DEPRECATED                = 0x40000
-	IFF_DHCPRUNNING               = 0x4000
-	IFF_DUPLICATE                 = 0x4000000000
-	IFF_FAILED                    = 0x10000000
-	IFF_FIXEDMTU                  = 0x1000000000
-	IFF_INACTIVE                  = 0x40000000
-	IFF_INTELLIGENT               = 0x400
-	IFF_IPMP                      = 0x8000000000
-	IFF_IPMP_CANTCHANGE           = 0x10000000
-	IFF_IPMP_INVALID              = 0x1ec200080
-	IFF_IPV4                      = 0x1000000
-	IFF_IPV6                      = 0x2000000
-	IFF_L3PROTECT                 = 0x40000000000
-	IFF_LOOPBACK                  = 0x8
-	IFF_MULTICAST                 = 0x800
-	IFF_MULTI_BCAST               = 0x1000
-	IFF_NOACCEPT                  = 0x4000000
-	IFF_NOARP                     = 0x80
-	IFF_NOFAILOVER                = 0x8000000
-	IFF_NOLINKLOCAL               = 0x20000000000
-	IFF_NOLOCAL                   = 0x20000
-	IFF_NONUD                     = 0x200000
-	IFF_NORTEXCH                  = 0x800000
-	IFF_NOTRAILERS                = 0x20
-	IFF_NOXMIT                    = 0x10000
-	IFF_OFFLINE                   = 0x80000000
-	IFF_POINTOPOINT               = 0x10
-	IFF_PREFERRED                 = 0x400000000
-	IFF_PRIVATE                   = 0x8000
-	IFF_PROMISC                   = 0x100
-	IFF_ROUTER                    = 0x100000
-	IFF_RUNNING                   = 0x40
-	IFF_STANDBY                   = 0x20000000
-	IFF_TEMPORARY                 = 0x800000000
-	IFF_UNNUMBERED                = 0x2000
-	IFF_UP                        = 0x1
-	IFF_VIRTUAL                   = 0x2000000000
-	IFF_VRRP                      = 0x10000000000
-	IFF_XRESOLV                   = 0x100000000
-	IFNAMSIZ                      = 0x10
-	IFT_1822                      = 0x2
-	IFT_6TO4                      = 0xca
-	IFT_AAL5                      = 0x31
-	IFT_ARCNET                    = 0x23
-	IFT_ARCNETPLUS                = 0x24
-	IFT_ATM                       = 0x25
-	IFT_CEPT                      = 0x13
-	IFT_DS3                       = 0x1e
-	IFT_EON                       = 0x19
-	IFT_ETHER                     = 0x6
-	IFT_FDDI                      = 0xf
-	IFT_FRELAY                    = 0x20
-	IFT_FRELAYDCE                 = 0x2c
-	IFT_HDH1822                   = 0x3
-	IFT_HIPPI                     = 0x2f
-	IFT_HSSI                      = 0x2e
-	IFT_HY                        = 0xe
-	IFT_IB                        = 0xc7
-	IFT_IPV4                      = 0xc8
-	IFT_IPV6                      = 0xc9
-	IFT_ISDNBASIC                 = 0x14
-	IFT_ISDNPRIMARY               = 0x15
-	IFT_ISO88022LLC               = 0x29
-	IFT_ISO88023                  = 0x7
-	IFT_ISO88024                  = 0x8
-	IFT_ISO88025                  = 0x9
-	IFT_ISO88026                  = 0xa
-	IFT_LAPB                      = 0x10
-	IFT_LOCALTALK                 = 0x2a
-	IFT_LOOP                      = 0x18
-	IFT_MIOX25                    = 0x26
-	IFT_MODEM                     = 0x30
-	IFT_NSIP                      = 0x1b
-	IFT_OTHER                     = 0x1
-	IFT_P10                       = 0xc
-	IFT_P80                       = 0xd
-	IFT_PARA                      = 0x22
-	IFT_PPP                       = 0x17
-	IFT_PROPMUX                   = 0x36
-	IFT_PROPVIRTUAL               = 0x35
-	IFT_PTPSERIAL                 = 0x16
-	IFT_RS232                     = 0x21
-	IFT_SDLC                      = 0x11
-	IFT_SIP                       = 0x1f
-	IFT_SLIP                      = 0x1c
-	IFT_SMDSDXI                   = 0x2b
-	IFT_SMDSICIP                  = 0x34
-	IFT_SONET                     = 0x27
-	IFT_SONETPATH                 = 0x32
-	IFT_SONETVT                   = 0x33
-	IFT_STARLAN                   = 0xb
-	IFT_T1                        = 0x12
-	IFT_ULTRA                     = 0x1d
-	IFT_V35                       = 0x2d
-	IFT_X25                       = 0x5
-	IFT_X25DDN                    = 0x4
-	IFT_X25PLE                    = 0x28
-	IFT_XETHER                    = 0x1a
-	IGNBRK                        = 0x1
-	IGNCR                         = 0x80
-	IGNPAR                        = 0x4
-	IMAXBEL                       = 0x2000
-	INLCR                         = 0x40
-	INPCK                         = 0x10
-	IN_AUTOCONF_MASK              = 0xffff0000
-	IN_AUTOCONF_NET               = 0xa9fe0000
-	IN_CLASSA_HOST                = 0xffffff
-	IN_CLASSA_MAX                 = 0x80
-	IN_CLASSA_NET                 = 0xff000000
-	IN_CLASSA_NSHIFT              = 0x18
-	IN_CLASSB_HOST                = 0xffff
-	IN_CLASSB_MAX                 = 0x10000
-	IN_CLASSB_NET                 = 0xffff0000
-	IN_CLASSB_NSHIFT              = 0x10
-	IN_CLASSC_HOST                = 0xff
-	IN_CLASSC_NET                 = 0xffffff00
-	IN_CLASSC_NSHIFT              = 0x8
-	IN_CLASSD_HOST                = 0xfffffff
-	IN_CLASSD_NET                 = 0xf0000000
-	IN_CLASSD_NSHIFT              = 0x1c
-	IN_CLASSE_NET                 = 0xffffffff
-	IN_LOOPBACKNET                = 0x7f
-	IN_PRIVATE12_MASK             = 0xfff00000
-	IN_PRIVATE12_NET              = 0xac100000
-	IN_PRIVATE16_MASK             = 0xffff0000
-	IN_PRIVATE16_NET              = 0xc0a80000
-	IN_PRIVATE8_MASK              = 0xff000000
-	IN_PRIVATE8_NET               = 0xa000000
-	IPPROTO_AH                    = 0x33
-	IPPROTO_DSTOPTS               = 0x3c
-	IPPROTO_EGP                   = 0x8
-	IPPROTO_ENCAP                 = 0x4
-	IPPROTO_EON                   = 0x50
-	IPPROTO_ESP                   = 0x32
-	IPPROTO_FRAGMENT              = 0x2c
-	IPPROTO_GGP                   = 0x3
-	IPPROTO_HELLO                 = 0x3f
-	IPPROTO_HOPOPTS               = 0x0
-	IPPROTO_ICMP                  = 0x1
-	IPPROTO_ICMPV6                = 0x3a
-	IPPROTO_IDP                   = 0x16
-	IPPROTO_IGMP                  = 0x2
-	IPPROTO_IP                    = 0x0
-	IPPROTO_IPV6                  = 0x29
-	IPPROTO_MAX                   = 0x100
-	IPPROTO_ND                    = 0x4d
-	IPPROTO_NONE                  = 0x3b
-	IPPROTO_OSPF                  = 0x59
-	IPPROTO_PIM                   = 0x67
-	IPPROTO_PUP                   = 0xc
-	IPPROTO_RAW                   = 0xff
-	IPPROTO_ROUTING               = 0x2b
-	IPPROTO_RSVP                  = 0x2e
-	IPPROTO_SCTP                  = 0x84
-	IPPROTO_TCP                   = 0x6
-	IPPROTO_UDP                   = 0x11
-	IPV6_ADD_MEMBERSHIP           = 0x9
-	IPV6_BOUND_IF                 = 0x41
-	IPV6_CHECKSUM                 = 0x18
-	IPV6_DONTFRAG                 = 0x21
-	IPV6_DROP_MEMBERSHIP          = 0xa
-	IPV6_DSTOPTS                  = 0xf
-	IPV6_FLOWINFO_FLOWLABEL       = 0xffff0f00
-	IPV6_FLOWINFO_TCLASS          = 0xf00f
-	IPV6_HOPLIMIT                 = 0xc
-	IPV6_HOPOPTS                  = 0xe
-	IPV6_JOIN_GROUP               = 0x9
-	IPV6_LEAVE_GROUP              = 0xa
-	IPV6_MULTICAST_HOPS           = 0x7
-	IPV6_MULTICAST_IF             = 0x6
-	IPV6_MULTICAST_LOOP           = 0x8
-	IPV6_NEXTHOP                  = 0xd
-	IPV6_PAD1_OPT                 = 0x0
-	IPV6_PATHMTU                  = 0x25
-	IPV6_PKTINFO                  = 0xb
-	IPV6_PREFER_SRC_CGA           = 0x20
-	IPV6_PREFER_SRC_CGADEFAULT    = 0x10
-	IPV6_PREFER_SRC_CGAMASK       = 0x30
-	IPV6_PREFER_SRC_COA           = 0x2
-	IPV6_PREFER_SRC_DEFAULT       = 0x15
-	IPV6_PREFER_SRC_HOME          = 0x1
-	IPV6_PREFER_SRC_MASK          = 0x3f
-	IPV6_PREFER_SRC_MIPDEFAULT    = 0x1
-	IPV6_PREFER_SRC_MIPMASK       = 0x3
-	IPV6_PREFER_SRC_NONCGA        = 0x10
-	IPV6_PREFER_SRC_PUBLIC        = 0x4
-	IPV6_PREFER_SRC_TMP           = 0x8
-	IPV6_PREFER_SRC_TMPDEFAULT    = 0x4
-	IPV6_PREFER_SRC_TMPMASK       = 0xc
-	IPV6_RECVDSTOPTS              = 0x28
-	IPV6_RECVHOPLIMIT             = 0x13
-	IPV6_RECVHOPOPTS              = 0x14
-	IPV6_RECVPATHMTU              = 0x24
-	IPV6_RECVPKTINFO              = 0x12
-	IPV6_RECVRTHDR                = 0x16
-	IPV6_RECVRTHDRDSTOPTS         = 0x17
-	IPV6_RECVTCLASS               = 0x19
-	IPV6_RTHDR                    = 0x10
-	IPV6_RTHDRDSTOPTS             = 0x11
-	IPV6_RTHDR_TYPE_0             = 0x0
-	IPV6_SEC_OPT                  = 0x22
-	IPV6_SRC_PREFERENCES          = 0x23
-	IPV6_TCLASS                   = 0x26
-	IPV6_UNICAST_HOPS             = 0x5
-	IPV6_UNSPEC_SRC               = 0x42
-	IPV6_USE_MIN_MTU              = 0x20
-	IPV6_V6ONLY                   = 0x27
-	IP_ADD_MEMBERSHIP             = 0x13
-	IP_ADD_SOURCE_MEMBERSHIP      = 0x17
-	IP_BLOCK_SOURCE               = 0x15
-	IP_BOUND_IF                   = 0x41
-	IP_BROADCAST                  = 0x106
-	IP_BROADCAST_TTL              = 0x43
-	IP_DEFAULT_MULTICAST_LOOP     = 0x1
-	IP_DEFAULT_MULTICAST_TTL      = 0x1
-	IP_DF                         = 0x4000
-	IP_DHCPINIT_IF                = 0x45
-	IP_DONTFRAG                   = 0x1b
-	IP_DONTROUTE                  = 0x105
-	IP_DROP_MEMBERSHIP            = 0x14
-	IP_DROP_SOURCE_MEMBERSHIP     = 0x18
-	IP_HDRINCL                    = 0x2
-	IP_MAXPACKET                  = 0xffff
-	IP_MF                         = 0x2000
-	IP_MSS                        = 0x240
-	IP_MULTICAST_IF               = 0x10
-	IP_MULTICAST_LOOP             = 0x12
-	IP_MULTICAST_TTL              = 0x11
-	IP_NEXTHOP                    = 0x19
-	IP_OPTIONS                    = 0x1
-	IP_PKTINFO                    = 0x1a
-	IP_RECVDSTADDR                = 0x7
-	IP_RECVIF                     = 0x9
-	IP_RECVOPTS                   = 0x5
-	IP_RECVPKTINFO                = 0x1a
-	IP_RECVRETOPTS                = 0x6
-	IP_RECVSLLA                   = 0xa
-	IP_RECVTTL                    = 0xb
-	IP_RETOPTS                    = 0x8
-	IP_REUSEADDR                  = 0x104
-	IP_SEC_OPT                    = 0x22
-	IP_TOS                        = 0x3
-	IP_TTL                        = 0x4
-	IP_UNBLOCK_SOURCE             = 0x16
-	IP_UNSPEC_SRC                 = 0x42
-	ISIG                          = 0x1
-	ISTRIP                        = 0x20
-	IXANY                         = 0x800
-	IXOFF                         = 0x1000
-	IXON                          = 0x400
-	MADV_ACCESS_DEFAULT           = 0x6
-	MADV_ACCESS_LWP               = 0x7
-	MADV_ACCESS_MANY              = 0x8
-	MADV_DONTNEED                 = 0x4
-	MADV_FREE                     = 0x5
-	MADV_NORMAL                   = 0x0
-	MADV_RANDOM                   = 0x1
-	MADV_SEQUENTIAL               = 0x2
-	MADV_WILLNEED                 = 0x3
-	MAP_32BIT                     = 0x80
-	MAP_ALIGN                     = 0x200
-	MAP_ANON                      = 0x100
-	MAP_ANONYMOUS                 = 0x100
-	MAP_FIXED                     = 0x10
-	MAP_INITDATA                  = 0x800
-	MAP_NORESERVE                 = 0x40
-	MAP_PRIVATE                   = 0x2
-	MAP_RENAME                    = 0x20
-	MAP_SHARED                    = 0x1
-	MAP_TEXT                      = 0x400
-	MAP_TYPE                      = 0xf
-	MCL_CURRENT                   = 0x1
-	MCL_FUTURE                    = 0x2
-	MSG_CTRUNC                    = 0x10
-	MSG_DONTROUTE                 = 0x4
-	MSG_DONTWAIT                  = 0x80
-	MSG_DUPCTRL                   = 0x800
-	MSG_EOR                       = 0x8
-	MSG_MAXIOVLEN                 = 0x10
-	MSG_NOTIFICATION              = 0x100
-	MSG_OOB                       = 0x1
-	MSG_PEEK                      = 0x2
-	MSG_TRUNC                     = 0x20
-	MSG_WAITALL                   = 0x40
-	MSG_XPG4_2                    = 0x8000
-	MS_ASYNC                      = 0x1
-	MS_INVALIDATE                 = 0x2
-	MS_OLDSYNC                    = 0x0
-	MS_SYNC                       = 0x4
-	M_FLUSH                       = 0x86
-	NOFLSH                        = 0x80
-	OCRNL                         = 0x8
-	OFDEL                         = 0x80
-	OFILL                         = 0x40
-	ONLCR                         = 0x4
-	ONLRET                        = 0x20
-	ONOCR                         = 0x10
-	OPENFAIL                      = -0x1
-	OPOST                         = 0x1
-	O_ACCMODE                     = 0x600003
-	O_APPEND                      = 0x8
-	O_CLOEXEC                     = 0x800000
-	O_CREAT                       = 0x100
-	O_DSYNC                       = 0x40
-	O_EXCL                        = 0x400
-	O_EXEC                        = 0x400000
-	O_LARGEFILE                   = 0x2000
-	O_NDELAY                      = 0x4
-	O_NOCTTY                      = 0x800
-	O_NOFOLLOW                    = 0x20000
-	O_NOLINKS                     = 0x40000
-	O_NONBLOCK                    = 0x80
-	O_RDONLY                      = 0x0
-	O_RDWR                        = 0x2
-	O_RSYNC                       = 0x8000
-	O_SEARCH                      = 0x200000
-	O_SIOCGIFCONF                 = -0x3ff796ec
-	O_SIOCGLIFCONF                = -0x3fef9688
-	O_SYNC                        = 0x10
-	O_TRUNC                       = 0x200
-	O_WRONLY                      = 0x1
-	O_XATTR                       = 0x4000
-	PARENB                        = 0x100
-	PAREXT                        = 0x100000
-	PARMRK                        = 0x8
-	PARODD                        = 0x200
-	PENDIN                        = 0x4000
-	PRIO_PGRP                     = 0x1
-	PRIO_PROCESS                  = 0x0
-	PRIO_USER                     = 0x2
-	PROT_EXEC                     = 0x4
-	PROT_NONE                     = 0x0
-	PROT_READ                     = 0x1
-	PROT_WRITE                    = 0x2
-	RLIMIT_AS                     = 0x6
-	RLIMIT_CORE                   = 0x4
-	RLIMIT_CPU                    = 0x0
-	RLIMIT_DATA                   = 0x2
-	RLIMIT_FSIZE                  = 0x1
-	RLIMIT_NOFILE                 = 0x5
-	RLIMIT_STACK                  = 0x3
-	RLIM_INFINITY                 = -0x3
-	RTAX_AUTHOR                   = 0x6
-	RTAX_BRD                      = 0x7
-	RTAX_DST                      = 0x0
-	RTAX_GATEWAY                  = 0x1
-	RTAX_GENMASK                  = 0x3
-	RTAX_IFA                      = 0x5
-	RTAX_IFP                      = 0x4
-	RTAX_MAX                      = 0x9
-	RTAX_NETMASK                  = 0x2
-	RTAX_SRC                      = 0x8
-	RTA_AUTHOR                    = 0x40
-	RTA_BRD                       = 0x80
-	RTA_DST                       = 0x1
-	RTA_GATEWAY                   = 0x2
-	RTA_GENMASK                   = 0x8
-	RTA_IFA                       = 0x20
-	RTA_IFP                       = 0x10
-	RTA_NETMASK                   = 0x4
-	RTA_NUMBITS                   = 0x9
-	RTA_SRC                       = 0x100
-	RTF_BLACKHOLE                 = 0x1000
-	RTF_CLONING                   = 0x100
-	RTF_DONE                      = 0x40
-	RTF_DYNAMIC                   = 0x10
-	RTF_GATEWAY                   = 0x2
-	RTF_HOST                      = 0x4
-	RTF_INDIRECT                  = 0x40000
-	RTF_KERNEL                    = 0x80000
-	RTF_LLINFO                    = 0x400
-	RTF_MASK                      = 0x80
-	RTF_MODIFIED                  = 0x20
-	RTF_MULTIRT                   = 0x10000
-	RTF_PRIVATE                   = 0x2000
-	RTF_PROTO1                    = 0x8000
-	RTF_PROTO2                    = 0x4000
-	RTF_REJECT                    = 0x8
-	RTF_SETSRC                    = 0x20000
-	RTF_STATIC                    = 0x800
-	RTF_UP                        = 0x1
-	RTF_XRESOLVE                  = 0x200
-	RTF_ZONE                      = 0x100000
-	RTM_ADD                       = 0x1
-	RTM_CHANGE                    = 0x3
-	RTM_CHGADDR                   = 0xf
-	RTM_DELADDR                   = 0xd
-	RTM_DELETE                    = 0x2
-	RTM_FREEADDR                  = 0x10
-	RTM_GET                       = 0x4
-	RTM_IFINFO                    = 0xe
-	RTM_LOCK                      = 0x8
-	RTM_LOSING                    = 0x5
-	RTM_MISS                      = 0x7
-	RTM_NEWADDR                   = 0xc
-	RTM_OLDADD                    = 0x9
-	RTM_OLDDEL                    = 0xa
-	RTM_REDIRECT                  = 0x6
-	RTM_RESOLVE                   = 0xb
-	RTM_VERSION                   = 0x3
-	RTV_EXPIRE                    = 0x4
-	RTV_HOPCOUNT                  = 0x2
-	RTV_MTU                       = 0x1
-	RTV_RPIPE                     = 0x8
-	RTV_RTT                       = 0x40
-	RTV_RTTVAR                    = 0x80
-	RTV_SPIPE                     = 0x10
-	RTV_SSTHRESH                  = 0x20
-	RT_AWARE                      = 0x1
-	RUSAGE_CHILDREN               = -0x1
-	RUSAGE_SELF                   = 0x0
-	SCM_RIGHTS                    = 0x1010
-	SCM_TIMESTAMP                 = 0x1013
-	SCM_UCRED                     = 0x1012
-	SHUT_RD                       = 0x0
-	SHUT_RDWR                     = 0x2
-	SHUT_WR                       = 0x1
-	SIG2STR_MAX                   = 0x20
-	SIOCADDMULTI                  = -0x7fdf96cf
-	SIOCADDRT                     = -0x7fcf8df6
-	SIOCATMARK                    = 0x40047307
-	SIOCDARP                      = -0x7fdb96e0
-	SIOCDELMULTI                  = -0x7fdf96ce
-	SIOCDELRT                     = -0x7fcf8df5
-	SIOCDXARP                     = -0x7fff9658
-	SIOCGARP                      = -0x3fdb96e1
-	SIOCGDSTINFO                  = -0x3fff965c
-	SIOCGENADDR                   = -0x3fdf96ab
-	SIOCGENPSTATS                 = -0x3fdf96c7
-	SIOCGETLSGCNT                 = -0x3fef8deb
-	SIOCGETNAME                   = 0x40107334
-	SIOCGETPEER                   = 0x40107335
-	SIOCGETPROP                   = -0x3fff8f44
-	SIOCGETSGCNT                  = -0x3feb8deb
-	SIOCGETSYNC                   = -0x3fdf96d3
-	SIOCGETVIFCNT                 = -0x3feb8dec
-	SIOCGHIWAT                    = 0x40047301
-	SIOCGIFADDR                   = -0x3fdf96f3
-	SIOCGIFBRDADDR                = -0x3fdf96e9
-	SIOCGIFCONF                   = -0x3ff796a4
-	SIOCGIFDSTADDR                = -0x3fdf96f1
-	SIOCGIFFLAGS                  = -0x3fdf96ef
-	SIOCGIFHWADDR                 = -0x3fdf9647
-	SIOCGIFINDEX                  = -0x3fdf96a6
-	SIOCGIFMEM                    = -0x3fdf96ed
-	SIOCGIFMETRIC                 = -0x3fdf96e5
-	SIOCGIFMTU                    = -0x3fdf96ea
-	SIOCGIFMUXID                  = -0x3fdf96a8
-	SIOCGIFNETMASK                = -0x3fdf96e7
-	SIOCGIFNUM                    = 0x40046957
-	SIOCGIP6ADDRPOLICY            = -0x3fff965e
-	SIOCGIPMSFILTER               = -0x3ffb964c
-	SIOCGLIFADDR                  = -0x3f87968f
-	SIOCGLIFBINDING               = -0x3f879666
-	SIOCGLIFBRDADDR               = -0x3f879685
-	SIOCGLIFCONF                  = -0x3fef965b
-	SIOCGLIFDADSTATE              = -0x3f879642
-	SIOCGLIFDSTADDR               = -0x3f87968d
-	SIOCGLIFFLAGS                 = -0x3f87968b
-	SIOCGLIFGROUPINFO             = -0x3f4b9663
-	SIOCGLIFGROUPNAME             = -0x3f879664
-	SIOCGLIFHWADDR                = -0x3f879640
-	SIOCGLIFINDEX                 = -0x3f87967b
-	SIOCGLIFLNKINFO               = -0x3f879674
-	SIOCGLIFMETRIC                = -0x3f879681
-	SIOCGLIFMTU                   = -0x3f879686
-	SIOCGLIFMUXID                 = -0x3f87967d
-	SIOCGLIFNETMASK               = -0x3f879683
-	SIOCGLIFNUM                   = -0x3ff3967e
-	SIOCGLIFSRCOF                 = -0x3fef964f
-	SIOCGLIFSUBNET                = -0x3f879676
-	SIOCGLIFTOKEN                 = -0x3f879678
-	SIOCGLIFUSESRC                = -0x3f879651
-	SIOCGLIFZONE                  = -0x3f879656
-	SIOCGLOWAT                    = 0x40047303
-	SIOCGMSFILTER                 = -0x3ffb964e
-	SIOCGPGRP                     = 0x40047309
-	SIOCGSTAMP                    = -0x3fef9646
-	SIOCGXARP                     = -0x3fff9659
-	SIOCIFDETACH                  = -0x7fdf96c8
-	SIOCILB                       = -0x3ffb9645
-	SIOCLIFADDIF                  = -0x3f879691
-	SIOCLIFDELND                  = -0x7f879673
-	SIOCLIFGETND                  = -0x3f879672
-	SIOCLIFREMOVEIF               = -0x7f879692
-	SIOCLIFSETND                  = -0x7f879671
-	SIOCLOWER                     = -0x7fdf96d7
-	SIOCSARP                      = -0x7fdb96e2
-	SIOCSCTPGOPT                  = -0x3fef9653
-	SIOCSCTPPEELOFF               = -0x3ffb9652
-	SIOCSCTPSOPT                  = -0x7fef9654
-	SIOCSENABLESDP                = -0x3ffb9649
-	SIOCSETPROP                   = -0x7ffb8f43
-	SIOCSETSYNC                   = -0x7fdf96d4
-	SIOCSHIWAT                    = -0x7ffb8d00
-	SIOCSIFADDR                   = -0x7fdf96f4
-	SIOCSIFBRDADDR                = -0x7fdf96e8
-	SIOCSIFDSTADDR                = -0x7fdf96f2
-	SIOCSIFFLAGS                  = -0x7fdf96f0
-	SIOCSIFINDEX                  = -0x7fdf96a5
-	SIOCSIFMEM                    = -0x7fdf96ee
-	SIOCSIFMETRIC                 = -0x7fdf96e4
-	SIOCSIFMTU                    = -0x7fdf96eb
-	SIOCSIFMUXID                  = -0x7fdf96a7
-	SIOCSIFNAME                   = -0x7fdf96b7
-	SIOCSIFNETMASK                = -0x7fdf96e6
-	SIOCSIP6ADDRPOLICY            = -0x7fff965d
-	SIOCSIPMSFILTER               = -0x7ffb964b
-	SIOCSLGETREQ                  = -0x3fdf96b9
-	SIOCSLIFADDR                  = -0x7f879690
-	SIOCSLIFBRDADDR               = -0x7f879684
-	SIOCSLIFDSTADDR               = -0x7f87968e
-	SIOCSLIFFLAGS                 = -0x7f87968c
-	SIOCSLIFGROUPNAME             = -0x7f879665
-	SIOCSLIFINDEX                 = -0x7f87967a
-	SIOCSLIFLNKINFO               = -0x7f879675
-	SIOCSLIFMETRIC                = -0x7f879680
-	SIOCSLIFMTU                   = -0x7f879687
-	SIOCSLIFMUXID                 = -0x7f87967c
-	SIOCSLIFNAME                  = -0x3f87967f
-	SIOCSLIFNETMASK               = -0x7f879682
-	SIOCSLIFPREFIX                = -0x3f879641
-	SIOCSLIFSUBNET                = -0x7f879677
-	SIOCSLIFTOKEN                 = -0x7f879679
-	SIOCSLIFUSESRC                = -0x7f879650
-	SIOCSLIFZONE                  = -0x7f879655
-	SIOCSLOWAT                    = -0x7ffb8cfe
-	SIOCSLSTAT                    = -0x7fdf96b8
-	SIOCSMSFILTER                 = -0x7ffb964d
-	SIOCSPGRP                     = -0x7ffb8cf8
-	SIOCSPROMISC                  = -0x7ffb96d0
-	SIOCSQPTR                     = -0x3ffb9648
-	SIOCSSDSTATS                  = -0x3fdf96d2
-	SIOCSSESTATS                  = -0x3fdf96d1
-	SIOCSXARP                     = -0x7fff965a
-	SIOCTMYADDR                   = -0x3ff79670
-	SIOCTMYSITE                   = -0x3ff7966e
-	SIOCTONLINK                   = -0x3ff7966f
-	SIOCUPPER                     = -0x7fdf96d8
-	SIOCX25RCV                    = -0x3fdf96c4
-	SIOCX25TBL                    = -0x3fdf96c3
-	SIOCX25XMT                    = -0x3fdf96c5
-	SIOCXPROTO                    = 0x20007337
-	SOCK_CLOEXEC                  = 0x80000
-	SOCK_DGRAM                    = 0x1
-	SOCK_NDELAY                   = 0x200000
-	SOCK_NONBLOCK                 = 0x100000
-	SOCK_RAW                      = 0x4
-	SOCK_RDM                      = 0x5
-	SOCK_SEQPACKET                = 0x6
-	SOCK_STREAM                   = 0x2
-	SOCK_TYPE_MASK                = 0xffff
-	SOL_FILTER                    = 0xfffc
-	SOL_PACKET                    = 0xfffd
-	SOL_ROUTE                     = 0xfffe
-	SOL_SOCKET                    = 0xffff
-	SOMAXCONN                     = 0x80
-	SO_ACCEPTCONN                 = 0x2
-	SO_ALL                        = 0x3f
-	SO_ALLZONES                   = 0x1014
-	SO_ANON_MLP                   = 0x100a
-	SO_ATTACH_FILTER              = 0x40000001
-	SO_BAND                       = 0x4000
-	SO_BROADCAST                  = 0x20
-	SO_COPYOPT                    = 0x80000
-	SO_DEBUG                      = 0x1
-	SO_DELIM                      = 0x8000
-	SO_DETACH_FILTER              = 0x40000002
-	SO_DGRAM_ERRIND               = 0x200
-	SO_DOMAIN                     = 0x100c
-	SO_DONTLINGER                 = -0x81
-	SO_DONTROUTE                  = 0x10
-	SO_ERROPT                     = 0x40000
-	SO_ERROR                      = 0x1007
-	SO_EXCLBIND                   = 0x1015
-	SO_HIWAT                      = 0x10
-	SO_ISNTTY                     = 0x800
-	SO_ISTTY                      = 0x400
-	SO_KEEPALIVE                  = 0x8
-	SO_LINGER                     = 0x80
-	SO_LOWAT                      = 0x20
-	SO_MAC_EXEMPT                 = 0x100b
-	SO_MAC_IMPLICIT               = 0x1016
-	SO_MAXBLK                     = 0x100000
-	SO_MAXPSZ                     = 0x8
-	SO_MINPSZ                     = 0x4
-	SO_MREADOFF                   = 0x80
-	SO_MREADON                    = 0x40
-	SO_NDELOFF                    = 0x200
-	SO_NDELON                     = 0x100
-	SO_NODELIM                    = 0x10000
-	SO_OOBINLINE                  = 0x100
-	SO_PROTOTYPE                  = 0x1009
-	SO_RCVBUF                     = 0x1002
-	SO_RCVLOWAT                   = 0x1004
-	SO_RCVPSH                     = 0x100d
-	SO_RCVTIMEO                   = 0x1006
-	SO_READOPT                    = 0x1
-	SO_RECVUCRED                  = 0x400
-	SO_REUSEADDR                  = 0x4
-	SO_SECATTR                    = 0x1011
-	SO_SNDBUF                     = 0x1001
-	SO_SNDLOWAT                   = 0x1003
-	SO_SNDTIMEO                   = 0x1005
-	SO_STRHOLD                    = 0x20000
-	SO_TAIL                       = 0x200000
-	SO_TIMESTAMP                  = 0x1013
-	SO_TONSTOP                    = 0x2000
-	SO_TOSTOP                     = 0x1000
-	SO_TYPE                       = 0x1008
-	SO_USELOOPBACK                = 0x40
-	SO_VRRP                       = 0x1017
-	SO_WROFF                      = 0x2
-	TCFLSH                        = 0x5407
-	TCGETA                        = 0x5401
-	TCGETS                        = 0x540d
-	TCIFLUSH                      = 0x0
-	TCIOFLUSH                     = 0x2
-	TCOFLUSH                      = 0x1
-	TCP_ABORT_THRESHOLD           = 0x11
-	TCP_ANONPRIVBIND              = 0x20
-	TCP_CONN_ABORT_THRESHOLD      = 0x13
-	TCP_CONN_NOTIFY_THRESHOLD     = 0x12
-	TCP_CORK                      = 0x18
-	TCP_EXCLBIND                  = 0x21
-	TCP_INIT_CWND                 = 0x15
-	TCP_KEEPALIVE                 = 0x8
-	TCP_KEEPALIVE_ABORT_THRESHOLD = 0x17
-	TCP_KEEPALIVE_THRESHOLD       = 0x16
-	TCP_KEEPCNT                   = 0x23
-	TCP_KEEPIDLE                  = 0x22
-	TCP_KEEPINTVL                 = 0x24
-	TCP_LINGER2                   = 0x1c
-	TCP_MAXSEG                    = 0x2
-	TCP_MSS                       = 0x218
-	TCP_NODELAY                   = 0x1
-	TCP_NOTIFY_THRESHOLD          = 0x10
-	TCP_RECVDSTADDR               = 0x14
-	TCP_RTO_INITIAL               = 0x19
-	TCP_RTO_MAX                   = 0x1b
-	TCP_RTO_MIN                   = 0x1a
-	TCSAFLUSH                     = 0x5410
-	TCSBRK                        = 0x5405
-	TCSETA                        = 0x5402
-	TCSETAF                       = 0x5404
-	TCSETAW                       = 0x5403
-	TCSETS                        = 0x540e
-	TCSETSF                       = 0x5410
-	TCSETSW                       = 0x540f
-	TCXONC                        = 0x5406
-	TIOC                          = 0x5400
-	TIOCCBRK                      = 0x747a
-	TIOCCDTR                      = 0x7478
-	TIOCCILOOP                    = 0x746c
-	TIOCEXCL                      = 0x740d
-	TIOCFLUSH                     = 0x7410
-	TIOCGETC                      = 0x7412
-	TIOCGETD                      = 0x7400
-	TIOCGETP                      = 0x7408
-	TIOCGLTC                      = 0x7474
-	TIOCGPGRP                     = 0x7414
-	TIOCGPPS                      = 0x547d
-	TIOCGPPSEV                    = 0x547f
-	TIOCGSID                      = 0x7416
-	TIOCGSOFTCAR                  = 0x5469
-	TIOCGWINSZ                    = 0x5468
-	TIOCHPCL                      = 0x7402
-	TIOCKBOF                      = 0x5409
-	TIOCKBON                      = 0x5408
-	TIOCLBIC                      = 0x747e
-	TIOCLBIS                      = 0x747f
-	TIOCLGET                      = 0x747c
-	TIOCLSET                      = 0x747d
-	TIOCMBIC                      = 0x741c
-	TIOCMBIS                      = 0x741b
-	TIOCMGET                      = 0x741d
-	TIOCMSET                      = 0x741a
-	TIOCM_CAR                     = 0x40
-	TIOCM_CD                      = 0x40
-	TIOCM_CTS                     = 0x20
-	TIOCM_DSR                     = 0x100
-	TIOCM_DTR                     = 0x2
-	TIOCM_LE                      = 0x1
-	TIOCM_RI                      = 0x80
-	TIOCM_RNG                     = 0x80
-	TIOCM_RTS                     = 0x4
-	TIOCM_SR                      = 0x10
-	TIOCM_ST                      = 0x8
-	TIOCNOTTY                     = 0x7471
-	TIOCNXCL                      = 0x740e
-	TIOCOUTQ                      = 0x7473
-	TIOCREMOTE                    = 0x741e
-	TIOCSBRK                      = 0x747b
-	TIOCSCTTY                     = 0x7484
-	TIOCSDTR                      = 0x7479
-	TIOCSETC                      = 0x7411
-	TIOCSETD                      = 0x7401
-	TIOCSETN                      = 0x740a
-	TIOCSETP                      = 0x7409
-	TIOCSIGNAL                    = 0x741f
-	TIOCSILOOP                    = 0x746d
-	TIOCSLTC                      = 0x7475
-	TIOCSPGRP                     = 0x7415
-	TIOCSPPS                      = 0x547e
-	TIOCSSOFTCAR                  = 0x546a
-	TIOCSTART                     = 0x746e
-	TIOCSTI                       = 0x7417
-	TIOCSTOP                      = 0x746f
-	TIOCSWINSZ                    = 0x5467
-	TOSTOP                        = 0x100
-	VCEOF                         = 0x8
-	VCEOL                         = 0x9
-	VDISCARD                      = 0xd
-	VDSUSP                        = 0xb
-	VEOF                          = 0x4
-	VEOL                          = 0x5
-	VEOL2                         = 0x6
-	VERASE                        = 0x2
-	VINTR                         = 0x0
-	VKILL                         = 0x3
-	VLNEXT                        = 0xf
-	VMIN                          = 0x4
-	VQUIT                         = 0x1
-	VREPRINT                      = 0xc
-	VSTART                        = 0x8
-	VSTATUS                       = 0x10
-	VSTOP                         = 0x9
-	VSUSP                         = 0xa
-	VSWTCH                        = 0x7
-	VT0                           = 0x0
-	VT1                           = 0x4000
-	VTDLY                         = 0x4000
-	VTIME                         = 0x5
-	VWERASE                       = 0xe
-	WCONTFLG                      = 0xffff
-	WCONTINUED                    = 0x8
-	WCOREFLG                      = 0x80
-	WEXITED                       = 0x1
-	WNOHANG                       = 0x40
-	WNOWAIT                       = 0x80
-	WOPTMASK                      = 0xcf
-	WRAP                          = 0x20000
-	WSIGMASK                      = 0x7f
-	WSTOPFLG                      = 0x7f
-	WSTOPPED                      = 0x4
-	WTRAPPED                      = 0x2
-	WUNTRACED                     = 0x4
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x7d)
-	EADDRNOTAVAIL   = syscall.Errno(0x7e)
-	EADV            = syscall.Errno(0x44)
-	EAFNOSUPPORT    = syscall.Errno(0x7c)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x95)
-	EBADE           = syscall.Errno(0x32)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x51)
-	EBADMSG         = syscall.Errno(0x4d)
-	EBADR           = syscall.Errno(0x33)
-	EBADRQC         = syscall.Errno(0x36)
-	EBADSLT         = syscall.Errno(0x37)
-	EBFONT          = syscall.Errno(0x39)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x2f)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x25)
-	ECOMM           = syscall.Errno(0x46)
-	ECONNABORTED    = syscall.Errno(0x82)
-	ECONNREFUSED    = syscall.Errno(0x92)
-	ECONNRESET      = syscall.Errno(0x83)
-	EDEADLK         = syscall.Errno(0x2d)
-	EDEADLOCK       = syscall.Errno(0x38)
-	EDESTADDRREQ    = syscall.Errno(0x60)
-	EDOM            = syscall.Errno(0x21)
-	EDQUOT          = syscall.Errno(0x31)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x93)
-	EHOSTUNREACH    = syscall.Errno(0x94)
-	EIDRM           = syscall.Errno(0x24)
-	EILSEQ          = syscall.Errno(0x58)
-	EINPROGRESS     = syscall.Errno(0x96)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x85)
-	EISDIR          = syscall.Errno(0x15)
-	EL2HLT          = syscall.Errno(0x2c)
-	EL2NSYNC        = syscall.Errno(0x26)
-	EL3HLT          = syscall.Errno(0x27)
-	EL3RST          = syscall.Errno(0x28)
-	ELIBACC         = syscall.Errno(0x53)
-	ELIBBAD         = syscall.Errno(0x54)
-	ELIBEXEC        = syscall.Errno(0x57)
-	ELIBMAX         = syscall.Errno(0x56)
-	ELIBSCN         = syscall.Errno(0x55)
-	ELNRNG          = syscall.Errno(0x29)
-	ELOCKUNMAPPED   = syscall.Errno(0x48)
-	ELOOP           = syscall.Errno(0x5a)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x61)
-	EMULTIHOP       = syscall.Errno(0x4a)
-	ENAMETOOLONG    = syscall.Errno(0x4e)
-	ENETDOWN        = syscall.Errno(0x7f)
-	ENETRESET       = syscall.Errno(0x81)
-	ENETUNREACH     = syscall.Errno(0x80)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x35)
-	ENOBUFS         = syscall.Errno(0x84)
-	ENOCSI          = syscall.Errno(0x2b)
-	ENODATA         = syscall.Errno(0x3d)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x2e)
-	ENOLINK         = syscall.Errno(0x43)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x23)
-	ENONET          = syscall.Errno(0x40)
-	ENOPKG          = syscall.Errno(0x41)
-	ENOPROTOOPT     = syscall.Errno(0x63)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x3f)
-	ENOSTR          = syscall.Errno(0x3c)
-	ENOSYS          = syscall.Errno(0x59)
-	ENOTACTIVE      = syscall.Errno(0x49)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x86)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x5d)
-	ENOTRECOVERABLE = syscall.Errno(0x3b)
-	ENOTSOCK        = syscall.Errno(0x5f)
-	ENOTSUP         = syscall.Errno(0x30)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x50)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x7a)
-	EOVERFLOW       = syscall.Errno(0x4f)
-	EOWNERDEAD      = syscall.Errno(0x3a)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x7b)
-	EPIPE           = syscall.Errno(0x20)
-	EPROTO          = syscall.Errno(0x47)
-	EPROTONOSUPPORT = syscall.Errno(0x78)
-	EPROTOTYPE      = syscall.Errno(0x62)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x52)
-	EREMOTE         = syscall.Errno(0x42)
-	ERESTART        = syscall.Errno(0x5b)
-	EROFS           = syscall.Errno(0x1e)
-	ESHUTDOWN       = syscall.Errno(0x8f)
-	ESOCKTNOSUPPORT = syscall.Errno(0x79)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x45)
-	ESTALE          = syscall.Errno(0x97)
-	ESTRPIPE        = syscall.Errno(0x5c)
-	ETIME           = syscall.Errno(0x3e)
-	ETIMEDOUT       = syscall.Errno(0x91)
-	ETOOMANYREFS    = syscall.Errno(0x90)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUNATCH         = syscall.Errno(0x2a)
-	EUSERS          = syscall.Errno(0x5e)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x34)
-)
-
-// Signals
-const (
-	SIGABRT    = syscall.Signal(0x6)
-	SIGALRM    = syscall.Signal(0xe)
-	SIGBUS     = syscall.Signal(0xa)
-	SIGCANCEL  = syscall.Signal(0x24)
-	SIGCHLD    = syscall.Signal(0x12)
-	SIGCLD     = syscall.Signal(0x12)
-	SIGCONT    = syscall.Signal(0x19)
-	SIGEMT     = syscall.Signal(0x7)
-	SIGFPE     = syscall.Signal(0x8)
-	SIGFREEZE  = syscall.Signal(0x22)
-	SIGHUP     = syscall.Signal(0x1)
-	SIGILL     = syscall.Signal(0x4)
-	SIGINFO    = syscall.Signal(0x29)
-	SIGINT     = syscall.Signal(0x2)
-	SIGIO      = syscall.Signal(0x16)
-	SIGIOT     = syscall.Signal(0x6)
-	SIGJVM1    = syscall.Signal(0x27)
-	SIGJVM2    = syscall.Signal(0x28)
-	SIGKILL    = syscall.Signal(0x9)
-	SIGLOST    = syscall.Signal(0x25)
-	SIGLWP     = syscall.Signal(0x21)
-	SIGPIPE    = syscall.Signal(0xd)
-	SIGPOLL    = syscall.Signal(0x16)
-	SIGPROF    = syscall.Signal(0x1d)
-	SIGPWR     = syscall.Signal(0x13)
-	SIGQUIT    = syscall.Signal(0x3)
-	SIGSEGV    = syscall.Signal(0xb)
-	SIGSTOP    = syscall.Signal(0x17)
-	SIGSYS     = syscall.Signal(0xc)
-	SIGTERM    = syscall.Signal(0xf)
-	SIGTHAW    = syscall.Signal(0x23)
-	SIGTRAP    = syscall.Signal(0x5)
-	SIGTSTP    = syscall.Signal(0x18)
-	SIGTTIN    = syscall.Signal(0x1a)
-	SIGTTOU    = syscall.Signal(0x1b)
-	SIGURG     = syscall.Signal(0x15)
-	SIGUSR1    = syscall.Signal(0x10)
-	SIGUSR2    = syscall.Signal(0x11)
-	SIGVTALRM  = syscall.Signal(0x1c)
-	SIGWAITING = syscall.Signal(0x20)
-	SIGWINCH   = syscall.Signal(0x14)
-	SIGXCPU    = syscall.Signal(0x1e)
-	SIGXFSZ    = syscall.Signal(0x1f)
-	SIGXRES    = syscall.Signal(0x26)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "not owner",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "I/O error",
-	6:   "no such device or address",
-	7:   "arg list too long",
-	8:   "exec format error",
-	9:   "bad file number",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "not enough space",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device busy",
-	17:  "file exists",
-	18:  "cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "file table overflow",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "argument out of domain",
-	34:  "result too large",
-	35:  "no message of desired type",
-	36:  "identifier removed",
-	37:  "channel number out of range",
-	38:  "level 2 not synchronized",
-	39:  "level 3 halted",
-	40:  "level 3 reset",
-	41:  "link number out of range",
-	42:  "protocol driver not attached",
-	43:  "no CSI structure available",
-	44:  "level 2 halted",
-	45:  "deadlock situation detected/avoided",
-	46:  "no record locks available",
-	47:  "operation canceled",
-	48:  "operation not supported",
-	49:  "disc quota exceeded",
-	50:  "bad exchange descriptor",
-	51:  "bad request descriptor",
-	52:  "message tables full",
-	53:  "anode table overflow",
-	54:  "bad request code",
-	55:  "invalid slot",
-	56:  "file locking deadlock",
-	57:  "bad font file format",
-	58:  "owner of the lock died",
-	59:  "lock is not recoverable",
-	60:  "not a stream device",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of stream resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "locked lock was unmapped ",
-	73:  "facility is not active",
-	74:  "multihop attempted",
-	77:  "not a data message",
-	78:  "file name too long",
-	79:  "value too large for defined data type",
-	80:  "name not unique on network",
-	81:  "file descriptor in bad state",
-	82:  "remote address changed",
-	83:  "can not access a needed shared library",
-	84:  "accessing a corrupted shared library",
-	85:  ".lib section in a.out corrupted",
-	86:  "attempting to link in more shared libraries than system limit",
-	87:  "can not exec a shared library directly",
-	88:  "illegal byte sequence",
-	89:  "operation not applicable",
-	90:  "number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS",
-	91:  "error 91",
-	92:  "error 92",
-	93:  "directory not empty",
-	94:  "too many users",
-	95:  "socket operation on non-socket",
-	96:  "destination address required",
-	97:  "message too long",
-	98:  "protocol wrong type for socket",
-	99:  "option not supported by protocol",
-	120: "protocol not supported",
-	121: "socket type not supported",
-	122: "operation not supported on transport endpoint",
-	123: "protocol family not supported",
-	124: "address family not supported by protocol family",
-	125: "address already in use",
-	126: "cannot assign requested address",
-	127: "network is down",
-	128: "network is unreachable",
-	129: "network dropped connection because of reset",
-	130: "software caused connection abort",
-	131: "connection reset by peer",
-	132: "no buffer space available",
-	133: "transport endpoint is already connected",
-	134: "transport endpoint is not connected",
-	143: "cannot send after socket shutdown",
-	144: "too many references: cannot splice",
-	145: "connection timed out",
-	146: "connection refused",
-	147: "host is down",
-	148: "no route to host",
-	149: "operation already in progress",
-	150: "operation now in progress",
-	151: "stale NFS file handle",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal Instruction",
-	5:  "trace/Breakpoint Trap",
-	6:  "abort",
-	7:  "emulation Trap",
-	8:  "arithmetic Exception",
-	9:  "killed",
-	10: "bus Error",
-	11: "segmentation Fault",
-	12: "bad System Call",
-	13: "broken Pipe",
-	14: "alarm Clock",
-	15: "terminated",
-	16: "user Signal 1",
-	17: "user Signal 2",
-	18: "child Status Changed",
-	19: "power-Fail/Restart",
-	20: "window Size Change",
-	21: "urgent Socket Condition",
-	22: "pollable Event",
-	23: "stopped (signal)",
-	24: "stopped (user)",
-	25: "continued",
-	26: "stopped (tty input)",
-	27: "stopped (tty output)",
-	28: "virtual Timer Expired",
-	29: "profiling Timer Expired",
-	30: "cpu Limit Exceeded",
-	31: "file Size Limit Exceeded",
-	32: "no runnable lwp",
-	33: "inter-lwp signal",
-	34: "checkpoint Freeze",
-	35: "checkpoint Thaw",
-	36: "thread Cancellation",
-	37: "resource Lost",
-	38: "resource Control Exceeded",
-	39: "reserved for JVM 1",
-	40: "reserved for JVM 2",
-	41: "information Request",
-}


[60/67] [abbrv] incubator-mynewt-newtmgr git commit: nmxact - Fix parse error on empty byte string.

Posted by cc...@apache.org.
nmxact - Fix parse error on empty byte string.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/9cae5044
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/9cae5044
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/9cae5044

Branch: refs/heads/master
Commit: 9cae50447c17a177d0f6e5a94090acc5b8f65ac2
Parents: ea22bd0
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Mar 28 13:07:32 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 nmxact/nmble/ble_proto.go | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/9cae5044/nmxact/nmble/ble_proto.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_proto.go b/nmxact/nmble/ble_proto.go
index 80ef2a0..85a26f8 100644
--- a/nmxact/nmble/ble_proto.go
+++ b/nmxact/nmble/ble_proto.go
@@ -763,12 +763,18 @@ func (bb *BleBytes) UnmarshalJSON(data []byte) error {
 		return err
 	}
 
+	// strings.Split() appears to return { nil } when passed an empty string.
+	if len(s) == 0 {
+		return nil
+	}
+
 	toks := strings.Split(strings.ToLower(s), ":")
 	bb.Bytes = make([]byte, len(toks))
 
 	for i, t := range toks {
 		if !strings.HasPrefix(t, "0x") {
-			return errors.New("Byte stream contains invalid token: " + t)
+			return fmt.Errorf(
+				"Byte stream contains invalid token; token=%s stream=%s", t, s)
 		}
 
 		u64, err := strconv.ParseUint(t, 0, 8)


[35/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
deleted file mode 100644
index 8e63888..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
+++ /dev/null
@@ -1,1576 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,darwin
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1c
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x25
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x1e
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1c
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x28
-	AF_NATM                           = 0x1f
-	AF_NDRV                           = 0x1b
-	AF_NETBIOS                        = 0x21
-	AF_NS                             = 0x6
-	AF_OSI                            = 0x7
-	AF_PPP                            = 0x22
-	AF_PUP                            = 0x4
-	AF_RESERVED_36                    = 0x24
-	AF_ROUTE                          = 0x11
-	AF_SIP                            = 0x18
-	AF_SNA                            = 0xb
-	AF_SYSTEM                         = 0x20
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	AF_UTUN                           = 0x26
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B9600                             = 0x2580
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc00c4279
-	BIOCGETIF                         = 0x4020426b
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044272
-	BIOCGRTIMEOUT                     = 0x4008426e
-	BIOCGSEESENT                      = 0x40044276
-	BIOCGSTATS                        = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDLT                          = 0x80044278
-	BIOCSETF                          = 0x80084267
-	BIOCSETFNR                        = 0x8008427e
-	BIOCSETIF                         = 0x8020426c
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044273
-	BIOCSRTIMEOUT                     = 0x8008426d
-	BIOCSSEESENT                      = 0x80044277
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x80000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	DLT_A429                          = 0xb8
-	DLT_A653_ICM                      = 0xb9
-	DLT_AIRONET_HEADER                = 0x78
-	DLT_AOS                           = 0xde
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ARCNET_LINUX                  = 0x81
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AURORA                        = 0x7e
-	DLT_AX25                          = 0x3
-	DLT_AX25_KISS                     = 0xca
-	DLT_BACNET_MS_TP                  = 0xa5
-	DLT_BLUETOOTH_HCI_H4              = 0xbb
-	DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-	DLT_CAN20B                        = 0xbe
-	DLT_CAN_SOCKETCAN                 = 0xe3
-	DLT_CHAOS                         = 0x5
-	DLT_CHDLC                         = 0x68
-	DLT_CISCO_IOS                     = 0x76
-	DLT_C_HDLC                        = 0x68
-	DLT_C_HDLC_WITH_DIR               = 0xcd
-	DLT_DBUS                          = 0xe7
-	DLT_DECT                          = 0xdd
-	DLT_DOCSIS                        = 0x8f
-	DLT_DVB_CI                        = 0xeb
-	DLT_ECONET                        = 0x73
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0x6d
-	DLT_ERF                           = 0xc5
-	DLT_ERF_ETH                       = 0xaf
-	DLT_ERF_POS                       = 0xb0
-	DLT_FC_2                          = 0xe0
-	DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-	DLT_FDDI                          = 0xa
-	DLT_FLEXRAY                       = 0xd2
-	DLT_FRELAY                        = 0x6b
-	DLT_FRELAY_WITH_DIR               = 0xce
-	DLT_GCOM_SERIAL                   = 0xad
-	DLT_GCOM_T1E1                     = 0xac
-	DLT_GPF_F                         = 0xab
-	DLT_GPF_T                         = 0xaa
-	DLT_GPRS_LLC                      = 0xa9
-	DLT_GSMTAP_ABIS                   = 0xda
-	DLT_GSMTAP_UM                     = 0xd9
-	DLT_HHDLC                         = 0x79
-	DLT_IBM_SN                        = 0x92
-	DLT_IBM_SP                        = 0x91
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_IEEE802_15_4                  = 0xc3
-	DLT_IEEE802_15_4_LINUX            = 0xbf
-	DLT_IEEE802_15_4_NOFCS            = 0xe6
-	DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-	DLT_IEEE802_16_MAC_CPS            = 0xbc
-	DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-	DLT_IPFILTER                      = 0x74
-	DLT_IPMB                          = 0xc7
-	DLT_IPMB_LINUX                    = 0xd1
-	DLT_IPNET                         = 0xe2
-	DLT_IPOIB                         = 0xf2
-	DLT_IPV4                          = 0xe4
-	DLT_IPV6                          = 0xe5
-	DLT_IP_OVER_FC                    = 0x7a
-	DLT_JUNIPER_ATM1                  = 0x89
-	DLT_JUNIPER_ATM2                  = 0x87
-	DLT_JUNIPER_ATM_CEMIC             = 0xee
-	DLT_JUNIPER_CHDLC                 = 0xb5
-	DLT_JUNIPER_ES                    = 0x84
-	DLT_JUNIPER_ETHER                 = 0xb2
-	DLT_JUNIPER_FIBRECHANNEL          = 0xea
-	DLT_JUNIPER_FRELAY                = 0xb4
-	DLT_JUNIPER_GGSN                  = 0x85
-	DLT_JUNIPER_ISM                   = 0xc2
-	DLT_JUNIPER_MFR                   = 0x86
-	DLT_JUNIPER_MLFR                  = 0x83
-	DLT_JUNIPER_MLPPP                 = 0x82
-	DLT_JUNIPER_MONITOR               = 0xa4
-	DLT_JUNIPER_PIC_PEER              = 0xae
-	DLT_JUNIPER_PPP                   = 0xb3
-	DLT_JUNIPER_PPPOE                 = 0xa7
-	DLT_JUNIPER_PPPOE_ATM             = 0xa8
-	DLT_JUNIPER_SERVICES              = 0x88
-	DLT_JUNIPER_SRX_E2E               = 0xe9
-	DLT_JUNIPER_ST                    = 0xc8
-	DLT_JUNIPER_VP                    = 0xb7
-	DLT_JUNIPER_VS                    = 0xe8
-	DLT_LAPB_WITH_DIR                 = 0xcf
-	DLT_LAPD                          = 0xcb
-	DLT_LIN                           = 0xd4
-	DLT_LINUX_EVDEV                   = 0xd8
-	DLT_LINUX_IRDA                    = 0x90
-	DLT_LINUX_LAPD                    = 0xb1
-	DLT_LINUX_PPP_WITHDIRECTION       = 0xa6
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_LTALK                         = 0x72
-	DLT_MATCHING_MAX                  = 0xf5
-	DLT_MATCHING_MIN                  = 0x68
-	DLT_MFR                           = 0xb6
-	DLT_MOST                          = 0xd3
-	DLT_MPEG_2_TS                     = 0xf3
-	DLT_MPLS                          = 0xdb
-	DLT_MTP2                          = 0x8c
-	DLT_MTP2_WITH_PHDR                = 0x8b
-	DLT_MTP3                          = 0x8d
-	DLT_MUX27010                      = 0xec
-	DLT_NETANALYZER                   = 0xf0
-	DLT_NETANALYZER_TRANSPARENT       = 0xf1
-	DLT_NFC_LLCP                      = 0xf5
-	DLT_NFLOG                         = 0xef
-	DLT_NG40                          = 0xf4
-	DLT_NULL                          = 0x0
-	DLT_PCI_EXP                       = 0x7d
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPI                           = 0xc0
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_PPPD                      = 0xa6
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PPP_WITH_DIR                  = 0xcc
-	DLT_PPP_WITH_DIRECTION            = 0xa6
-	DLT_PRISM_HEADER                  = 0x77
-	DLT_PRONET                        = 0x4
-	DLT_RAIF1                         = 0xc6
-	DLT_RAW                           = 0xc
-	DLT_RIO                           = 0x7c
-	DLT_SCCP                          = 0x8e
-	DLT_SITA                          = 0xc4
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DLT_STANAG_5066_D_PDU             = 0xed
-	DLT_SUNATM                        = 0x7b
-	DLT_SYMANTEC_FIREWALL             = 0x63
-	DLT_TZSP                          = 0x80
-	DLT_USB                           = 0xba
-	DLT_USB_LINUX                     = 0xbd
-	DLT_USB_LINUX_MMAPPED             = 0xdc
-	DLT_USER0                         = 0x93
-	DLT_USER1                         = 0x94
-	DLT_USER10                        = 0x9d
-	DLT_USER11                        = 0x9e
-	DLT_USER12                        = 0x9f
-	DLT_USER13                        = 0xa0
-	DLT_USER14                        = 0xa1
-	DLT_USER15                        = 0xa2
-	DLT_USER2                         = 0x95
-	DLT_USER3                         = 0x96
-	DLT_USER4                         = 0x97
-	DLT_USER5                         = 0x98
-	DLT_USER6                         = 0x99
-	DLT_USER7                         = 0x9a
-	DLT_USER8                         = 0x9b
-	DLT_USER9                         = 0x9c
-	DLT_WIHART                        = 0xdf
-	DLT_X2E_SERIAL                    = 0xd5
-	DLT_X2E_XORAYA                    = 0xd6
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EVFILT_AIO                        = -0x3
-	EVFILT_FS                         = -0x9
-	EVFILT_MACHPORT                   = -0x8
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0xe
-	EVFILT_THREADMARKER               = 0xe
-	EVFILT_TIMER                      = -0x7
-	EVFILT_USER                       = -0xa
-	EVFILT_VM                         = -0xc
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_DISPATCH                       = 0x80
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG0                          = 0x1000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_OOBAND                         = 0x2000
-	EV_POLL                           = 0x1000
-	EV_RECEIPT                        = 0x40
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_ADDFILESIGS                     = 0x3d
-	F_ADDSIGS                         = 0x3b
-	F_ALLOCATEALL                     = 0x4
-	F_ALLOCATECONTIG                  = 0x2
-	F_CHKCLEAN                        = 0x29
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0x43
-	F_FINDSIGS                        = 0x4e
-	F_FLUSH_DATA                      = 0x28
-	F_FREEZE_FS                       = 0x35
-	F_FULLFSYNC                       = 0x33
-	F_GETCODEDIR                      = 0x48
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETLKPID                        = 0x42
-	F_GETNOSIGPIPE                    = 0x4a
-	F_GETOWN                          = 0x5
-	F_GETPATH                         = 0x32
-	F_GETPATH_MTMINFO                 = 0x47
-	F_GETPROTECTIONCLASS              = 0x3f
-	F_GETPROTECTIONLEVEL              = 0x4d
-	F_GLOBAL_NOCACHE                  = 0x37
-	F_LOG2PHYS                        = 0x31
-	F_LOG2PHYS_EXT                    = 0x41
-	F_NOCACHE                         = 0x30
-	F_NODIRECT                        = 0x3e
-	F_OK                              = 0x0
-	F_PATHPKG_CHECK                   = 0x34
-	F_PEOFPOSMODE                     = 0x3
-	F_PREALLOCATE                     = 0x2a
-	F_RDADVISE                        = 0x2c
-	F_RDAHEAD                         = 0x2d
-	F_RDLCK                           = 0x1
-	F_SETBACKINGSTORE                 = 0x46
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETLKWTIMEOUT                   = 0xa
-	F_SETNOSIGPIPE                    = 0x49
-	F_SETOWN                          = 0x6
-	F_SETPROTECTIONCLASS              = 0x40
-	F_SETSIZE                         = 0x2b
-	F_SINGLE_WRITER                   = 0x4c
-	F_THAW_FS                         = 0x36
-	F_TRANSCODEKEY                    = 0x4b
-	F_UNLCK                           = 0x2
-	F_VOLPOSMODE                      = 0x4
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFF_ALLMULTI                      = 0x200
-	IFF_ALTPHYS                       = 0x4000
-	IFF_BROADCAST                     = 0x2
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_AAL5                          = 0x31
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ATM                           = 0x25
-	IFT_BRIDGE                        = 0xd1
-	IFT_CARP                          = 0xf8
-	IFT_CELLULAR                      = 0xff
-	IFT_CEPT                          = 0x13
-	IFT_DS3                           = 0x1e
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0x38
-	IFT_FDDI                          = 0xf
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_GIF                           = 0x37
-	IFT_HDH1822                       = 0x3
-	IFT_HIPPI                         = 0x2f
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE8023ADLAG                 = 0x88
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88026                      = 0xa
-	IFT_L2VLAN                        = 0x87
-	IFT_LAPB                          = 0x10
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_NSIP                          = 0x1b
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PDP                           = 0xff
-	IFT_PFLOG                         = 0xf5
-	IFT_PFSYNC                        = 0xf6
-	IFT_PKTAP                         = 0xfe
-	IFT_PPP                           = 0x17
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PTPSERIAL                     = 0x16
-	IFT_RS232                         = 0x21
-	IFT_SDLC                          = 0x11
-	IFT_SIP                           = 0x1f
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0x39
-	IFT_T1                            = 0x12
-	IFT_ULTRA                         = 0x1d
-	IFT_V35                           = 0x2d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LINKLOCALNETNUM                = 0xa9fe0000
-	IN_LOOPBACKNET                    = 0x7f
-	IPPROTO_3PC                       = 0x22
-	IPPROTO_ADFS                      = 0x44
-	IPPROTO_AH                        = 0x33
-	IPPROTO_AHIP                      = 0x3d
-	IPPROTO_APES                      = 0x63
-	IPPROTO_ARGUS                     = 0xd
-	IPPROTO_AX25                      = 0x5d
-	IPPROTO_BHA                       = 0x31
-	IPPROTO_BLT                       = 0x1e
-	IPPROTO_BRSATMON                  = 0x4c
-	IPPROTO_CFTP                      = 0x3e
-	IPPROTO_CHAOS                     = 0x10
-	IPPROTO_CMTP                      = 0x26
-	IPPROTO_CPHB                      = 0x49
-	IPPROTO_CPNX                      = 0x48
-	IPPROTO_DDP                       = 0x25
-	IPPROTO_DGP                       = 0x56
-	IPPROTO_DIVERT                    = 0xfe
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_EMCON                     = 0xe
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GMTP                      = 0x64
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HELLO                     = 0x3f
-	IPPROTO_HMP                       = 0x14
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IDPR                      = 0x23
-	IPPROTO_IDRP                      = 0x2d
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IGP                       = 0x55
-	IPPROTO_IGRP                      = 0x58
-	IPPROTO_IL                        = 0x28
-	IPPROTO_INLSP                     = 0x34
-	IPPROTO_INP                       = 0x20
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPCV                      = 0x47
-	IPPROTO_IPEIP                     = 0x5e
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPPC                      = 0x43
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IRTP                      = 0x1c
-	IPPROTO_KRYPTOLAN                 = 0x41
-	IPPROTO_LARP                      = 0x5b
-	IPPROTO_LEAF1                     = 0x19
-	IPPROTO_LEAF2                     = 0x1a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MEAS                      = 0x13
-	IPPROTO_MHRP                      = 0x30
-	IPPROTO_MICP                      = 0x5f
-	IPPROTO_MTP                       = 0x5c
-	IPPROTO_MUX                       = 0x12
-	IPPROTO_ND                        = 0x4d
-	IPPROTO_NHRP                      = 0x36
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_NSP                       = 0x1f
-	IPPROTO_NVPII                     = 0xb
-	IPPROTO_OSPFIGP                   = 0x59
-	IPPROTO_PGM                       = 0x71
-	IPPROTO_PIGP                      = 0x9
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PRM                       = 0x15
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_PVP                       = 0x4b
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_RCCMON                    = 0xa
-	IPPROTO_RDP                       = 0x1b
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_RVD                       = 0x42
-	IPPROTO_SATEXPAK                  = 0x40
-	IPPROTO_SATMON                    = 0x45
-	IPPROTO_SCCSP                     = 0x60
-	IPPROTO_SCTP                      = 0x84
-	IPPROTO_SDRP                      = 0x2a
-	IPPROTO_SEP                       = 0x21
-	IPPROTO_SRPC                      = 0x5a
-	IPPROTO_ST                        = 0x7
-	IPPROTO_SVMTP                     = 0x52
-	IPPROTO_SWIPE                     = 0x35
-	IPPROTO_TCF                       = 0x57
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_TPXX                      = 0x27
-	IPPROTO_TRUNK1                    = 0x17
-	IPPROTO_TRUNK2                    = 0x18
-	IPPROTO_TTP                       = 0x54
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_VINES                     = 0x53
-	IPPROTO_VISA                      = 0x46
-	IPPROTO_VMTP                      = 0x51
-	IPPROTO_WBEXPAK                   = 0x4f
-	IPPROTO_WBMON                     = 0x4e
-	IPPROTO_WSN                       = 0x4a
-	IPPROTO_XNET                      = 0xf
-	IPPROTO_XTP                       = 0x24
-	IPV6_2292DSTOPTS                  = 0x17
-	IPV6_2292HOPLIMIT                 = 0x14
-	IPV6_2292HOPOPTS                  = 0x16
-	IPV6_2292NEXTHOP                  = 0x15
-	IPV6_2292PKTINFO                  = 0x13
-	IPV6_2292PKTOPTIONS               = 0x19
-	IPV6_2292RTHDR                    = 0x18
-	IPV6_BINDV6ONLY                   = 0x1b
-	IPV6_BOUND_IF                     = 0x7d
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x3c
-	IPV6_FW_ADD                       = 0x1e
-	IPV6_FW_DEL                       = 0x1f
-	IPV6_FW_FLUSH                     = 0x20
-	IPV6_FW_GET                       = 0x22
-	IPV6_FW_ZERO                      = 0x21
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXOPTHDR                    = 0x800
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MAX_GROUP_SRC_FILTER         = 0x200
-	IPV6_MAX_MEMBERSHIPS              = 0xfff
-	IPV6_MAX_SOCK_SRC_FILTER          = 0x80
-	IPV6_MIN_MEMBERSHIPS              = 0x1f
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVTCLASS                   = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x24
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_ADD_SOURCE_MEMBERSHIP          = 0x46
-	IP_BLOCK_SOURCE                   = 0x48
-	IP_BOUND_IF                       = 0x19
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_DROP_SOURCE_MEMBERSHIP         = 0x47
-	IP_DUMMYNET_CONFIGURE             = 0x3c
-	IP_DUMMYNET_DEL                   = 0x3d
-	IP_DUMMYNET_FLUSH                 = 0x3e
-	IP_DUMMYNET_GET                   = 0x40
-	IP_FAITH                          = 0x16
-	IP_FW_ADD                         = 0x28
-	IP_FW_DEL                         = 0x29
-	IP_FW_FLUSH                       = 0x2a
-	IP_FW_GET                         = 0x2c
-	IP_FW_RESETLOG                    = 0x2d
-	IP_FW_ZERO                        = 0x2b
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x15
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_GROUP_SRC_FILTER           = 0x200
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MAX_SOCK_MUTE_FILTER           = 0x80
-	IP_MAX_SOCK_SRC_FILTER            = 0x80
-	IP_MF                             = 0x2000
-	IP_MIN_MEMBERSHIPS                = 0x1f
-	IP_MSFILTER                       = 0x4a
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_IFINDEX              = 0x42
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_MULTICAST_VIF                  = 0xe
-	IP_NAT__XXX                       = 0x37
-	IP_OFFMASK                        = 0x1fff
-	IP_OLD_FW_ADD                     = 0x32
-	IP_OLD_FW_DEL                     = 0x33
-	IP_OLD_FW_FLUSH                   = 0x34
-	IP_OLD_FW_GET                     = 0x36
-	IP_OLD_FW_RESETLOG                = 0x38
-	IP_OLD_FW_ZERO                    = 0x35
-	IP_OPTIONS                        = 0x1
-	IP_PKTINFO                        = 0x1a
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVPKTINFO                    = 0x1a
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTTL                        = 0x18
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RSVP_OFF                       = 0x10
-	IP_RSVP_ON                        = 0xf
-	IP_RSVP_VIF_OFF                   = 0x12
-	IP_RSVP_VIF_ON                    = 0x11
-	IP_STRIPHDR                       = 0x17
-	IP_TOS                            = 0x3
-	IP_TRAFFIC_MGT_BACKGROUND         = 0x41
-	IP_TTL                            = 0x4
-	IP_UNBLOCK_SOURCE                 = 0x49
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IUTF8                             = 0x4000
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_CAN_REUSE                    = 0x9
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x5
-	MADV_FREE_REUSABLE                = 0x7
-	MADV_FREE_REUSE                   = 0x8
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_WILLNEED                     = 0x3
-	MADV_ZERO_WIRED_PAGES             = 0x6
-	MAP_ANON                          = 0x1000
-	MAP_COPY                          = 0x2
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_JIT                           = 0x800
-	MAP_NOCACHE                       = 0x400
-	MAP_NOEXTEND                      = 0x100
-	MAP_NORESERVE                     = 0x40
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_RESERVED0080                  = 0x80
-	MAP_SHARED                        = 0x1
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOF                           = 0x100
-	MSG_EOR                           = 0x8
-	MSG_FLUSH                         = 0x400
-	MSG_HAVEMORE                      = 0x2000
-	MSG_HOLD                          = 0x800
-	MSG_NEEDSA                        = 0x10000
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_RCVMORE                       = 0x4000
-	MSG_SEND                          = 0x1000
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MSG_WAITSTREAM                    = 0x200
-	MS_ASYNC                          = 0x1
-	MS_DEACTIVATE                     = 0x8
-	MS_INVALIDATE                     = 0x2
-	MS_KILLPAGES                      = 0x4
-	MS_SYNC                           = 0x10
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_DUMP2                      = 0x7
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_IFLIST2                    = 0x6
-	NET_RT_MAXID                      = 0xa
-	NET_RT_STAT                       = 0x4
-	NET_RT_TRASH                      = 0x5
-	NOFLSH                            = 0x80000000
-	NOTE_ABSOLUTE                     = 0x8
-	NOTE_ATTRIB                       = 0x8
-	NOTE_BACKGROUND                   = 0x40
-	NOTE_CHILD                        = 0x4
-	NOTE_CRITICAL                     = 0x20
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXITSTATUS                   = 0x4000000
-	NOTE_EXIT_CSERROR                 = 0x40000
-	NOTE_EXIT_DECRYPTFAIL             = 0x10000
-	NOTE_EXIT_DETAIL                  = 0x2000000
-	NOTE_EXIT_DETAIL_MASK             = 0x70000
-	NOTE_EXIT_MEMORY                  = 0x20000
-	NOTE_EXIT_REPARENTED              = 0x80000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FFAND                        = 0x40000000
-	NOTE_FFCOPY                       = 0xc0000000
-	NOTE_FFCTRLMASK                   = 0xc0000000
-	NOTE_FFLAGSMASK                   = 0xffffff
-	NOTE_FFNOP                        = 0x0
-	NOTE_FFOR                         = 0x80000000
-	NOTE_FORK                         = 0x40000000
-	NOTE_LEEWAY                       = 0x10
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_NONE                         = 0x80
-	NOTE_NSECONDS                     = 0x4
-	NOTE_PCTRLMASK                    = -0x100000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_REAP                         = 0x10000000
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_SECONDS                      = 0x1
-	NOTE_SIGNAL                       = 0x8000000
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRIGGER                      = 0x1000000
-	NOTE_USECONDS                     = 0x2
-	NOTE_VM_ERROR                     = 0x10000000
-	NOTE_VM_PRESSURE                  = 0x80000000
-	NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
-	NOTE_VM_PRESSURE_TERMINATE        = 0x40000000
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	OFDEL                             = 0x20000
-	OFILL                             = 0x80
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_ALERT                           = 0x20000000
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x1000000
-	O_CREAT                           = 0x200
-	O_DIRECTORY                       = 0x100000
-	O_DP_GETRAWENCRYPTED              = 0x1
-	O_DSYNC                           = 0x400000
-	O_EVTONLY                         = 0x8000
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x20000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_POPUP                           = 0x80000000
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_SHLOCK                          = 0x10
-	O_SYMLINK                         = 0x200000
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	PT_ATTACH                         = 0xa
-	PT_ATTACHEXC                      = 0xe
-	PT_CONTINUE                       = 0x7
-	PT_DENY_ATTACH                    = 0x1f
-	PT_DETACH                         = 0xb
-	PT_FIRSTMACH                      = 0x20
-	PT_FORCEQUOTA                     = 0x1e
-	PT_KILL                           = 0x8
-	PT_READ_D                         = 0x2
-	PT_READ_I                         = 0x1
-	PT_READ_U                         = 0x3
-	PT_SIGEXC                         = 0xc
-	PT_STEP                           = 0x9
-	PT_THUPDATE                       = 0xd
-	PT_TRACE_ME                       = 0x0
-	PT_WRITE_D                        = 0x5
-	PT_WRITE_I                        = 0x4
-	PT_WRITE_U                        = 0x6
-	RLIMIT_AS                         = 0x5
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_CPU_USAGE_MONITOR          = 0x2
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x8
-	RTAX_NETMASK                      = 0x2
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_BROADCAST                     = 0x400000
-	RTF_CLONING                       = 0x100
-	RTF_CONDEMNED                     = 0x2000000
-	RTF_DELCLONE                      = 0x80
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_IFREF                         = 0x4000000
-	RTF_IFSCOPE                       = 0x1000000
-	RTF_LLINFO                        = 0x400
-	RTF_LOCAL                         = 0x200000
-	RTF_MODIFIED                      = 0x20
-	RTF_MULTICAST                     = 0x800000
-	RTF_NOIFREF                       = 0x2000
-	RTF_PINNED                        = 0x100000
-	RTF_PRCLONING                     = 0x10000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x40000
-	RTF_PROXY                         = 0x8000000
-	RTF_REJECT                        = 0x8
-	RTF_ROUTER                        = 0x10000000
-	RTF_STATIC                        = 0x800
-	RTF_UP                            = 0x1
-	RTF_WASCLONED                     = 0x20000
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DELMADDR                      = 0x10
-	RTM_GET                           = 0x4
-	RTM_GET2                          = 0x14
-	RTM_IFINFO                        = 0xe
-	RTM_IFINFO2                       = 0x12
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_NEWMADDR                      = 0xf
-	RTM_NEWMADDR2                     = 0x13
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	SCM_CREDS                         = 0x3
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x2
-	SCM_TIMESTAMP_MONOTONIC           = 0x4
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCARPIPLL                       = 0xc0206928
-	SIOCATMARK                        = 0x40047307
-	SIOCAUTOADDR                      = 0xc0206926
-	SIOCAUTONETMASK                   = 0x80206927
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFPHYADDR                    = 0x80206941
-	SIOCGDRVSPEC                      = 0xc01c697b
-	SIOCGETVLAN                       = 0xc020697f
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFALTMTU                     = 0xc0206948
-	SIOCGIFASYNCMAP                   = 0xc020697c
-	SIOCGIFBOND                       = 0xc0206947
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCAP                        = 0xc020695b
-	SIOCGIFCONF                       = 0xc0086924
-	SIOCGIFDEVMTU                     = 0xc0206944
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFKPI                        = 0xc0206987
-	SIOCGIFMAC                        = 0xc0206982
-	SIOCGIFMEDIA                      = 0xc0286938
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc0206933
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206940
-	SIOCGIFPHYS                       = 0xc0206935
-	SIOCGIFPSRCADDR                   = 0xc020693f
-	SIOCGIFSTATUS                     = 0xc331693d
-	SIOCGIFVLAN                       = 0xc020697f
-	SIOCGIFWAKEFLAGS                  = 0xc0206988
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCIFCREATE                      = 0xc0206978
-	SIOCIFCREATE2                     = 0xc020697a
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc00c6981
-	SIOCRSLVMULTI                     = 0xc008693b
-	SIOCSDRVSPEC                      = 0x801c697b
-	SIOCSETVLAN                       = 0x8020697e
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFALTMTU                     = 0x80206945
-	SIOCSIFASYNCMAP                   = 0x8020697d
-	SIOCSIFBOND                       = 0x80206946
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFCAP                        = 0x8020695a
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFKPI                        = 0x80206986
-	SIOCSIFLLADDR                     = 0x8020693c
-	SIOCSIFMAC                        = 0x80206983
-	SIOCSIFMEDIA                      = 0xc0206937
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x80206934
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x8040693e
-	SIOCSIFPHYS                       = 0x80206936
-	SIOCSIFVLAN                       = 0x8020697e
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SOCK_DGRAM                        = 0x2
-	SOCK_MAXADDRLEN                   = 0xff
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_DONTTRUNC                      = 0x2000
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LABEL                          = 0x1010
-	SO_LINGER                         = 0x80
-	SO_LINGER_SEC                     = 0x1080
-	SO_NKE                            = 0x1021
-	SO_NOADDRERR                      = 0x1023
-	SO_NOSIGPIPE                      = 0x1022
-	SO_NOTIFYCONFLICT                 = 0x1026
-	SO_NP_EXTENSIONS                  = 0x1083
-	SO_NREAD                          = 0x1020
-	SO_NUMRCVPKT                      = 0x1112
-	SO_NWRITE                         = 0x1024
-	SO_OOBINLINE                      = 0x100
-	SO_PEERLABEL                      = 0x1011
-	SO_RANDOMPORT                     = 0x1082
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_REUSESHAREUID                  = 0x1025
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_TIMESTAMP                      = 0x400
-	SO_TIMESTAMP_MONOTONIC            = 0x800
-	SO_TYPE                           = 0x1008
-	SO_UPCALLCLOSEWAIT                = 0x1027
-	SO_USELOOPBACK                    = 0x40
-	SO_WANTMORE                       = 0x4000
-	SO_WANTOOBFLAG                    = 0x8000
-	S_IEXEC                           = 0x40
-	S_IFBLK                           = 0x6000
-	S_IFCHR                           = 0x2000
-	S_IFDIR                           = 0x4000
-	S_IFIFO                           = 0x1000
-	S_IFLNK                           = 0xa000
-	S_IFMT                            = 0xf000
-	S_IFREG                           = 0x8000
-	S_IFSOCK                          = 0xc000
-	S_IFWHT                           = 0xe000
-	S_IREAD                           = 0x100
-	S_IRGRP                           = 0x20
-	S_IROTH                           = 0x4
-	S_IRUSR                           = 0x100
-	S_IRWXG                           = 0x38
-	S_IRWXO                           = 0x7
-	S_IRWXU                           = 0x1c0
-	S_ISGID                           = 0x400
-	S_ISTXT                           = 0x200
-	S_ISUID                           = 0x800
-	S_ISVTX                           = 0x200
-	S_IWGRP                           = 0x10
-	S_IWOTH                           = 0x2
-	S_IWRITE                          = 0x80
-	S_IWUSR                           = 0x80
-	S_IXGRP                           = 0x8
-	S_IXOTH                           = 0x1
-	S_IXUSR                           = 0x40
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CONNECTIONTIMEOUT             = 0x20
-	TCP_ENABLE_ECN                    = 0x104
-	TCP_KEEPALIVE                     = 0x10
-	TCP_KEEPCNT                       = 0x102
-	TCP_KEEPINTVL                     = 0x101
-	TCP_MAXHLEN                       = 0x3c
-	TCP_MAXOLEN                       = 0x28
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x4
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x200
-	TCP_NODELAY                       = 0x1
-	TCP_NOOPT                         = 0x8
-	TCP_NOPUSH                        = 0x4
-	TCP_NOTSENT_LOWAT                 = 0x201
-	TCP_RXT_CONNDROPTIME              = 0x80
-	TCP_RXT_FINDROP                   = 0x100
-	TCP_SENDMOREACKS                  = 0x103
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDCDTIMESTAMP                  = 0x40087458
-	TIOCDRAIN                         = 0x2000745e
-	TIOCDSIMICROCODE                  = 0x20007455
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLUSH                         = 0x80047410
-	TIOCGDRAINWAIT                    = 0x40047456
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGPGRP                         = 0x40047477
-	TIOCGWINSZ                        = 0x40087468
-	TIOCIXOFF                         = 0x20007480
-	TIOCIXON                          = 0x20007481
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGDTRWAIT                     = 0x4004745a
-	TIOCMGET                          = 0x4004746a
-	TIOCMODG                          = 0x40047403
-	TIOCMODS                          = 0x80047404
-	TIOCMSDTRWAIT                     = 0x8004745b
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTYGNAME                      = 0x40807453
-	TIOCPTYGRANT                      = 0x20007454
-	TIOCPTYUNLK                       = 0x20007452
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCONS                         = 0x20007463
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDRAINWAIT                    = 0x80047457
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSIG                           = 0x2000745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x20007465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCTIMESTAMP                     = 0x40087459
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VT0                               = 0x0
-	VT1                               = 0x10000
-	VTDLY                             = 0x10000
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WCONTINUED                        = 0x10
-	WCOREFLAG                         = 0x80
-	WEXITED                           = 0x4
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x20
-	WORDSIZE                          = 0x20
-	WSTOPPED                          = 0x8
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADARCH        = syscall.Errno(0x56)
-	EBADEXEC        = syscall.Errno(0x55)
-	EBADF           = syscall.Errno(0x9)
-	EBADMACHO       = syscall.Errno(0x58)
-	EBADMSG         = syscall.Errno(0x5e)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x59)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDEVERR         = syscall.Errno(0x53)
-	EDOM            = syscall.Errno(0x21)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x5a)
-	EILSEQ          = syscall.Errno(0x5c)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x6a)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5f)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x5d)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODATA         = syscall.Errno(0x60)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x61)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x5b)
-	ENOPOLICY       = syscall.Errno(0x67)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x62)
-	ENOSTR          = syscall.Errno(0x63)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTRECOVERABLE = syscall.Errno(0x68)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x2d)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x66)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EOWNERDEAD      = syscall.Errno(0x69)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x64)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	EPWROFF         = syscall.Errno(0x52)
-	EQFULL          = syscall.Errno(0x6a)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHLIBVERS      = syscall.Errno(0x57)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIME           = syscall.Errno(0x65)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "device not configured",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource deadlock avoided",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "resource busy",
-	17:  "file exists",
-	18:  "cross-device link",
-	19:  "operation not supported by device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "result too large",
-	35:  "resource temporarily unavailable",
-	36:  "operation now in progress",
-	37:  "operation already in progress",
-	38:  "socket operation on non-socket",
-	39:  "destination address required",
-	40:  "message too long",
-	41:  "protocol wrong type for socket",
-	42:  "protocol not available",
-	43:  "protocol not supported",
-	44:  "socket type not supported",
-	45:  "operation not supported",
-	46:  "protocol family not supported",
-	47:  "address family not supported by protocol family",
-	48:  "address already in use",
-	49:  "can't assign requested address",
-	50:  "network is down",
-	51:  "network is unreachable",
-	52:  "network dropped connection on reset",
-	53:  "software caused connection abort",
-	54:  "connection reset by peer",
-	55:  "no buffer space available",
-	56:  "socket is already connected",
-	57:  "socket is not connected",
-	58:  "can't send after socket shutdown",
-	59:  "too many references: can't splice",
-	60:  "operation timed out",
-	61:  "connection refused",
-	62:  "too many levels of symbolic links",
-	63:  "file name too long",
-	64:  "host is down",
-	65:  "no route to host",
-	66:  "directory not empty",
-	67:  "too many processes",
-	68:  "too many users",
-	69:  "disc quota exceeded",
-	70:  "stale NFS file handle",
-	71:  "too many levels of remote in path",
-	72:  "RPC struct is bad",
-	73:  "RPC version wrong",
-	74:  "RPC prog. not avail",
-	75:  "program version wrong",
-	76:  "bad procedure for program",
-	77:  "no locks available",
-	78:  "function not implemented",
-	79:  "inappropriate file type or format",
-	80:  "authentication error",
-	81:  "need authenticator",
-	82:  "device power is off",
-	83:  "device error",
-	84:  "value too large to be stored in data type",
-	85:  "bad executable (or shared library)",
-	86:  "bad CPU type in executable",
-	87:  "shared library version mismatch",
-	88:  "malformed Mach-o file",
-	89:  "operation canceled",
-	90:  "identifier removed",
-	91:  "no message of desired type",
-	92:  "illegal byte sequence",
-	93:  "attribute not found",
-	94:  "bad message",
-	95:  "EMULTIHOP (Reserved)",
-	96:  "no message available on STREAM",
-	97:  "ENOLINK (Reserved)",
-	98:  "no STREAM resources",
-	99:  "not a STREAM",
-	100: "protocol error",
-	101: "STREAM ioctl timeout",
-	102: "operation not supported on socket",
-	103: "policy not found",
-	104: "state not recoverable",
-	105: "previous owner died",
-	106: "interface output queue is full",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "suspended (signal)",
-	18: "suspended",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-}


[36/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_unix.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_unix.go b/newt/vendor/golang.org/x/sys/unix/syscall_unix.go
deleted file mode 100644
index b46b250..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ /dev/null
@@ -1,297 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-import (
-	"runtime"
-	"sync"
-	"syscall"
-	"unsafe"
-)
-
-var (
-	Stdin  = 0
-	Stdout = 1
-	Stderr = 2
-)
-
-const (
-	darwin64Bit    = runtime.GOOS == "darwin" && sizeofPtr == 8
-	dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8
-	netbsd32Bit    = runtime.GOOS == "netbsd" && sizeofPtr == 4
-)
-
-// Do the interface allocations only once for common
-// Errno values.
-var (
-	errEAGAIN error = syscall.EAGAIN
-	errEINVAL error = syscall.EINVAL
-	errENOENT error = syscall.ENOENT
-)
-
-// errnoErr returns common boxed Errno values, to prevent
-// allocations at runtime.
-func errnoErr(e syscall.Errno) error {
-	switch e {
-	case 0:
-		return nil
-	case EAGAIN:
-		return errEAGAIN
-	case EINVAL:
-		return errEINVAL
-	case ENOENT:
-		return errENOENT
-	}
-	return e
-}
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// Mmap manager, for use by operating system-specific implementations.
-
-type mmapper struct {
-	sync.Mutex
-	active map[*byte][]byte // active mappings; key is last byte in mapping
-	mmap   func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error)
-	munmap func(addr uintptr, length uintptr) error
-}
-
-func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
-	if length <= 0 {
-		return nil, EINVAL
-	}
-
-	// Map the requested memory.
-	addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset)
-	if errno != nil {
-		return nil, errno
-	}
-
-	// Slice memory layout
-	var sl = struct {
-		addr uintptr
-		len  int
-		cap  int
-	}{addr, length, length}
-
-	// Use unsafe to turn sl into a []byte.
-	b := *(*[]byte)(unsafe.Pointer(&sl))
-
-	// Register mapping in m and return it.
-	p := &b[cap(b)-1]
-	m.Lock()
-	defer m.Unlock()
-	m.active[p] = b
-	return b, nil
-}
-
-func (m *mmapper) Munmap(data []byte) (err error) {
-	if len(data) == 0 || len(data) != cap(data) {
-		return EINVAL
-	}
-
-	// Find the base of the mapping.
-	p := &data[cap(data)-1]
-	m.Lock()
-	defer m.Unlock()
-	b := m.active[p]
-	if b == nil || &b[0] != &data[0] {
-		return EINVAL
-	}
-
-	// Unmap the memory and update m.
-	if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {
-		return errno
-	}
-	delete(m.active, p)
-	return nil
-}
-
-func Read(fd int, p []byte) (n int, err error) {
-	n, err = read(fd, p)
-	if raceenabled {
-		if n > 0 {
-			raceWriteRange(unsafe.Pointer(&p[0]), n)
-		}
-		if err == nil {
-			raceAcquire(unsafe.Pointer(&ioSync))
-		}
-	}
-	return
-}
-
-func Write(fd int, p []byte) (n int, err error) {
-	if raceenabled {
-		raceReleaseMerge(unsafe.Pointer(&ioSync))
-	}
-	n, err = write(fd, p)
-	if raceenabled && n > 0 {
-		raceReadRange(unsafe.Pointer(&p[0]), n)
-	}
-	return
-}
-
-// For testing: clients can set this flag to force
-// creation of IPv6 sockets to return EAFNOSUPPORT.
-var SocketDisableIPv6 bool
-
-type Sockaddr interface {
-	sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs
-}
-
-type SockaddrInet4 struct {
-	Port int
-	Addr [4]byte
-	raw  RawSockaddrInet4
-}
-
-type SockaddrInet6 struct {
-	Port   int
-	ZoneId uint32
-	Addr   [16]byte
-	raw    RawSockaddrInet6
-}
-
-type SockaddrUnix struct {
-	Name string
-	raw  RawSockaddrUnix
-}
-
-func Bind(fd int, sa Sockaddr) (err error) {
-	ptr, n, err := sa.sockaddr()
-	if err != nil {
-		return err
-	}
-	return bind(fd, ptr, n)
-}
-
-func Connect(fd int, sa Sockaddr) (err error) {
-	ptr, n, err := sa.sockaddr()
-	if err != nil {
-		return err
-	}
-	return connect(fd, ptr, n)
-}
-
-func Getpeername(fd int) (sa Sockaddr, err error) {
-	var rsa RawSockaddrAny
-	var len _Socklen = SizeofSockaddrAny
-	if err = getpeername(fd, &rsa, &len); err != nil {
-		return
-	}
-	return anyToSockaddr(&rsa)
-}
-
-func GetsockoptInt(fd, level, opt int) (value int, err error) {
-	var n int32
-	vallen := _Socklen(4)
-	err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
-	return int(n), err
-}
-
-func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
-	var rsa RawSockaddrAny
-	var len _Socklen = SizeofSockaddrAny
-	if n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil {
-		return
-	}
-	if rsa.Addr.Family != AF_UNSPEC {
-		from, err = anyToSockaddr(&rsa)
-	}
-	return
-}
-
-func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
-	ptr, n, err := to.sockaddr()
-	if err != nil {
-		return err
-	}
-	return sendto(fd, p, flags, ptr, n)
-}
-
-func SetsockoptByte(fd, level, opt int, value byte) (err error) {
-	return setsockopt(fd, level, opt, unsafe.Pointer(&value), 1)
-}
-
-func SetsockoptInt(fd, level, opt int, value int) (err error) {
-	var n = int32(value)
-	return setsockopt(fd, level, opt, unsafe.Pointer(&n), 4)
-}
-
-func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) {
-	return setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4)
-}
-
-func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) {
-	return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq)
-}
-
-func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) {
-	return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq)
-}
-
-func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error {
-	return setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter)
-}
-
-func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
-	return setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger)
-}
-
-func SetsockoptString(fd, level, opt int, s string) (err error) {
-	return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s)))
-}
-
-func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
-	return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))
-}
-
-func Socket(domain, typ, proto int) (fd int, err error) {
-	if domain == AF_INET6 && SocketDisableIPv6 {
-		return -1, EAFNOSUPPORT
-	}
-	fd, err = socket(domain, typ, proto)
-	return
-}
-
-func Socketpair(domain, typ, proto int) (fd [2]int, err error) {
-	var fdx [2]int32
-	err = socketpair(domain, typ, proto, &fdx)
-	if err == nil {
-		fd[0] = int(fdx[0])
-		fd[1] = int(fdx[1])
-	}
-	return
-}
-
-func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	if raceenabled {
-		raceReleaseMerge(unsafe.Pointer(&ioSync))
-	}
-	return sendfile(outfd, infd, offset, count)
-}
-
-var ioSync int64
-
-func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
-
-func SetNonblock(fd int, nonblocking bool) (err error) {
-	flag, err := fcntl(fd, F_GETFL, 0)
-	if err != nil {
-		return err
-	}
-	if nonblocking {
-		flag |= O_NONBLOCK
-	} else {
-		flag &= ^O_NONBLOCK
-	}
-	_, err = fcntl(fd, F_SETFL, flag)
-	return err
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/types_darwin.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/types_darwin.go b/newt/vendor/golang.org/x/sys/unix/types_darwin.go
deleted file mode 100644
index 1153261..0000000
--- a/newt/vendor/golang.org/x/sys/unix/types_darwin.go
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs.  See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define __DARWIN_UNIX03 0
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <unistd.h>
-#include <mach/mach.h>
-#include <mach/message.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/if_var.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
-	sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
-	struct sockaddr s1;	// this one gets used for fields
-	struct sockaddr_in s2;	// these pad it out
-	struct sockaddr_in6 s3;
-	struct sockaddr_un s4;
-	struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
-	struct sockaddr addr;
-	char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
-	_C_short     C.short
-	_C_int       C.int
-	_C_long      C.long
-	_C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timeval32 C.struct_timeval32
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat64
-
-type Statfs_t C.struct_statfs64
-
-type Flock_t C.struct_flock
-
-type Fstore_t C.struct_fstore
-
-type Radvisory_t C.struct_radvisory
-
-type Fbootstraptransfer_t C.struct_fbootstraptransfer
-
-type Log2phys_t C.struct_log2phys
-
-type Fsid C.struct_fsid
-
-type Dirent C.struct_dirent
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet4Pktinfo C.struct_in_pktinfo
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
-	SizeofSockaddrInet4    = C.sizeof_struct_sockaddr_in
-	SizeofSockaddrInet6    = C.sizeof_struct_sockaddr_in6
-	SizeofSockaddrAny      = C.sizeof_struct_sockaddr_any
-	SizeofSockaddrUnix     = C.sizeof_struct_sockaddr_un
-	SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
-	SizeofLinger           = C.sizeof_struct_linger
-	SizeofIPMreq           = C.sizeof_struct_ip_mreq
-	SizeofIPv6Mreq         = C.sizeof_struct_ipv6_mreq
-	SizeofMsghdr           = C.sizeof_struct_msghdr
-	SizeofCmsghdr          = C.sizeof_struct_cmsghdr
-	SizeofInet4Pktinfo     = C.sizeof_struct_in_pktinfo
-	SizeofInet6Pktinfo     = C.sizeof_struct_in6_pktinfo
-	SizeofIPv6MTUInfo      = C.sizeof_struct_ip6_mtuinfo
-	SizeofICMPv6Filter     = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
-	PTRACE_TRACEME = C.PT_TRACE_ME
-	PTRACE_CONT    = C.PT_CONTINUE
-	PTRACE_KILL    = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
-	SizeofIfMsghdr    = C.sizeof_struct_if_msghdr
-	SizeofIfData      = C.sizeof_struct_if_data
-	SizeofIfaMsghdr   = C.sizeof_struct_ifa_msghdr
-	SizeofIfmaMsghdr  = C.sizeof_struct_ifma_msghdr
-	SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2
-	SizeofRtMsghdr    = C.sizeof_struct_rt_msghdr
-	SizeofRtMetrics   = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfmaMsghdr2 C.struct_ifma_msghdr2
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
-	SizeofBpfVersion = C.sizeof_struct_bpf_version
-	SizeofBpfStat    = C.sizeof_struct_bpf_stat
-	SizeofBpfProgram = C.sizeof_struct_bpf_program
-	SizeofBpfInsn    = C.sizeof_struct_bpf_insn
-	SizeofBpfHdr     = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-// Terminal handling
-
-type Termios C.struct_termios
-
-// fchmodat-like syscalls.
-
-const (
-	AT_FDCWD            = C.AT_FDCWD
-	AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
-)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/types_dragonfly.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/types_dragonfly.go b/newt/vendor/golang.org/x/sys/unix/types_dragonfly.go
deleted file mode 100644
index f3c971d..0000000
--- a/newt/vendor/golang.org/x/sys/unix/types_dragonfly.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs.  See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
-	sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
-	struct sockaddr s1;	// this one gets used for fields
-	struct sockaddr_in s2;	// these pad it out
-	struct sockaddr_in6 s3;
-	struct sockaddr_un s4;
-	struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
-	struct sockaddr addr;
-	char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
-	_C_short     C.short
-	_C_int       C.int
-	_C_long      C.long
-	_C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
-	S_IFMT   = C.S_IFMT
-	S_IFIFO  = C.S_IFIFO
-	S_IFCHR  = C.S_IFCHR
-	S_IFDIR  = C.S_IFDIR
-	S_IFBLK  = C.S_IFBLK
-	S_IFREG  = C.S_IFREG
-	S_IFLNK  = C.S_IFLNK
-	S_IFSOCK = C.S_IFSOCK
-	S_ISUID  = C.S_ISUID
-	S_ISGID  = C.S_ISGID
-	S_ISVTX  = C.S_ISVTX
-	S_IRUSR  = C.S_IRUSR
-	S_IWUSR  = C.S_IWUSR
-	S_IXUSR  = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.struct_fsid
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
-	SizeofSockaddrInet4    = C.sizeof_struct_sockaddr_in
-	SizeofSockaddrInet6    = C.sizeof_struct_sockaddr_in6
-	SizeofSockaddrAny      = C.sizeof_struct_sockaddr_any
-	SizeofSockaddrUnix     = C.sizeof_struct_sockaddr_un
-	SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
-	SizeofLinger           = C.sizeof_struct_linger
-	SizeofIPMreq           = C.sizeof_struct_ip_mreq
-	SizeofIPv6Mreq         = C.sizeof_struct_ipv6_mreq
-	SizeofMsghdr           = C.sizeof_struct_msghdr
-	SizeofCmsghdr          = C.sizeof_struct_cmsghdr
-	SizeofInet6Pktinfo     = C.sizeof_struct_in6_pktinfo
-	SizeofIPv6MTUInfo      = C.sizeof_struct_ip6_mtuinfo
-	SizeofICMPv6Filter     = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
-	PTRACE_TRACEME = C.PT_TRACE_ME
-	PTRACE_CONT    = C.PT_CONTINUE
-	PTRACE_KILL    = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
-	SizeofIfMsghdr         = C.sizeof_struct_if_msghdr
-	SizeofIfData           = C.sizeof_struct_if_data
-	SizeofIfaMsghdr        = C.sizeof_struct_ifa_msghdr
-	SizeofIfmaMsghdr       = C.sizeof_struct_ifma_msghdr
-	SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
-	SizeofRtMsghdr         = C.sizeof_struct_rt_msghdr
-	SizeofRtMetrics        = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
-	SizeofBpfVersion = C.sizeof_struct_bpf_version
-	SizeofBpfStat    = C.sizeof_struct_bpf_stat
-	SizeofBpfProgram = C.sizeof_struct_bpf_program
-	SizeofBpfInsn    = C.sizeof_struct_bpf_insn
-	SizeofBpfHdr     = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-// Terminal handling
-
-type Termios C.struct_termios

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/types_freebsd.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/types_freebsd.go b/newt/vendor/golang.org/x/sys/unix/types_freebsd.go
deleted file mode 100644
index ae24557..0000000
--- a/newt/vendor/golang.org/x/sys/unix/types_freebsd.go
+++ /dev/null
@@ -1,353 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs.  See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
-	sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
-	struct sockaddr s1;	// this one gets used for fields
-	struct sockaddr_in s2;	// these pad it out
-	struct sockaddr_in6 s3;
-	struct sockaddr_un s4;
-	struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
-	struct sockaddr addr;
-	char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-// This structure is a duplicate of stat on FreeBSD 8-STABLE.
-// See /usr/include/sys/stat.h.
-struct stat8 {
-#undef st_atimespec	st_atim
-#undef st_mtimespec	st_mtim
-#undef st_ctimespec	st_ctim
-#undef st_birthtimespec	st_birthtim
-	__dev_t   st_dev;
-	ino_t     st_ino;
-	mode_t    st_mode;
-	nlink_t   st_nlink;
-	uid_t     st_uid;
-	gid_t     st_gid;
-	__dev_t   st_rdev;
-#if __BSD_VISIBLE
-	struct  timespec st_atimespec;
-	struct  timespec st_mtimespec;
-	struct  timespec st_ctimespec;
-#else
-	time_t    st_atime;
-	long      __st_atimensec;
-	time_t    st_mtime;
-	long      __st_mtimensec;
-	time_t    st_ctime;
-	long      __st_ctimensec;
-#endif
-	off_t     st_size;
-	blkcnt_t st_blocks;
-	blksize_t st_blksize;
-	fflags_t  st_flags;
-	__uint32_t st_gen;
-	__int32_t st_lspare;
-#if __BSD_VISIBLE
-	struct timespec st_birthtimespec;
-	unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
-	unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
-#else
-	time_t    st_birthtime;
-	long      st_birthtimensec;
-	unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
-	unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
-#endif
-};
-
-// This structure is a duplicate of if_data on FreeBSD 8-STABLE.
-// See /usr/include/net/if.h.
-struct if_data8 {
-	u_char  ifi_type;
-	u_char  ifi_physical;
-	u_char  ifi_addrlen;
-	u_char  ifi_hdrlen;
-	u_char  ifi_link_state;
-	u_char  ifi_spare_char1;
-	u_char  ifi_spare_char2;
-	u_char  ifi_datalen;
-	u_long  ifi_mtu;
-	u_long  ifi_metric;
-	u_long  ifi_baudrate;
-	u_long  ifi_ipackets;
-	u_long  ifi_ierrors;
-	u_long  ifi_opackets;
-	u_long  ifi_oerrors;
-	u_long  ifi_collisions;
-	u_long  ifi_ibytes;
-	u_long  ifi_obytes;
-	u_long  ifi_imcasts;
-	u_long  ifi_omcasts;
-	u_long  ifi_iqdrops;
-	u_long  ifi_noproto;
-	u_long  ifi_hwassist;
-	time_t  ifi_epoch;
-	struct  timeval ifi_lastchange;
-};
-
-// This structure is a duplicate of if_msghdr on FreeBSD 8-STABLE.
-// See /usr/include/net/if.h.
-struct if_msghdr8 {
-	u_short ifm_msglen;
-	u_char  ifm_version;
-	u_char  ifm_type;
-	int     ifm_addrs;
-	int     ifm_flags;
-	u_short ifm_index;
-	struct  if_data8 ifm_data;
-};
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
-	_C_short     C.short
-	_C_int       C.int
-	_C_long      C.long
-	_C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
-	S_IFMT   = C.S_IFMT
-	S_IFIFO  = C.S_IFIFO
-	S_IFCHR  = C.S_IFCHR
-	S_IFDIR  = C.S_IFDIR
-	S_IFBLK  = C.S_IFBLK
-	S_IFREG  = C.S_IFREG
-	S_IFLNK  = C.S_IFLNK
-	S_IFSOCK = C.S_IFSOCK
-	S_ISUID  = C.S_ISUID
-	S_ISGID  = C.S_ISGID
-	S_ISVTX  = C.S_ISVTX
-	S_IRUSR  = C.S_IRUSR
-	S_IWUSR  = C.S_IWUSR
-	S_IXUSR  = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat8
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.struct_fsid
-
-// Advice to Fadvise
-
-const (
-	FADV_NORMAL     = C.POSIX_FADV_NORMAL
-	FADV_RANDOM     = C.POSIX_FADV_RANDOM
-	FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
-	FADV_WILLNEED   = C.POSIX_FADV_WILLNEED
-	FADV_DONTNEED   = C.POSIX_FADV_DONTNEED
-	FADV_NOREUSE    = C.POSIX_FADV_NOREUSE
-)
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPMreqn C.struct_ip_mreqn
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
-	SizeofSockaddrInet4    = C.sizeof_struct_sockaddr_in
-	SizeofSockaddrInet6    = C.sizeof_struct_sockaddr_in6
-	SizeofSockaddrAny      = C.sizeof_struct_sockaddr_any
-	SizeofSockaddrUnix     = C.sizeof_struct_sockaddr_un
-	SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
-	SizeofLinger           = C.sizeof_struct_linger
-	SizeofIPMreq           = C.sizeof_struct_ip_mreq
-	SizeofIPMreqn          = C.sizeof_struct_ip_mreqn
-	SizeofIPv6Mreq         = C.sizeof_struct_ipv6_mreq
-	SizeofMsghdr           = C.sizeof_struct_msghdr
-	SizeofCmsghdr          = C.sizeof_struct_cmsghdr
-	SizeofInet6Pktinfo     = C.sizeof_struct_in6_pktinfo
-	SizeofIPv6MTUInfo      = C.sizeof_struct_ip6_mtuinfo
-	SizeofICMPv6Filter     = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
-	PTRACE_TRACEME = C.PT_TRACE_ME
-	PTRACE_CONT    = C.PT_CONTINUE
-	PTRACE_KILL    = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
-	sizeofIfMsghdr         = C.sizeof_struct_if_msghdr
-	SizeofIfMsghdr         = C.sizeof_struct_if_msghdr8
-	sizeofIfData           = C.sizeof_struct_if_data
-	SizeofIfData           = C.sizeof_struct_if_data8
-	SizeofIfaMsghdr        = C.sizeof_struct_ifa_msghdr
-	SizeofIfmaMsghdr       = C.sizeof_struct_ifma_msghdr
-	SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
-	SizeofRtMsghdr         = C.sizeof_struct_rt_msghdr
-	SizeofRtMetrics        = C.sizeof_struct_rt_metrics
-)
-
-type ifMsghdr C.struct_if_msghdr
-
-type IfMsghdr C.struct_if_msghdr8
-
-type ifData C.struct_if_data
-
-type IfData C.struct_if_data8
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
-	SizeofBpfVersion    = C.sizeof_struct_bpf_version
-	SizeofBpfStat       = C.sizeof_struct_bpf_stat
-	SizeofBpfZbuf       = C.sizeof_struct_bpf_zbuf
-	SizeofBpfProgram    = C.sizeof_struct_bpf_program
-	SizeofBpfInsn       = C.sizeof_struct_bpf_insn
-	SizeofBpfHdr        = C.sizeof_struct_bpf_hdr
-	SizeofBpfZbufHeader = C.sizeof_struct_bpf_zbuf_header
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfZbuf C.struct_bpf_zbuf
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-type BpfZbufHeader C.struct_bpf_zbuf_header
-
-// Terminal handling
-
-type Termios C.struct_termios

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/types_linux.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/types_linux.go b/newt/vendor/golang.org/x/sys/unix/types_linux.go
deleted file mode 100644
index de80e2c..0000000
--- a/newt/vendor/golang.org/x/sys/unix/types_linux.go
+++ /dev/null
@@ -1,457 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs.  See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#define _FILE_OFFSET_BITS 64
-#define _GNU_SOURCE
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <netpacket/packet.h>
-#include <poll.h>
-#include <signal.h>
-#include <stdio.h>
-#include <sys/epoll.h>
-#include <sys/inotify.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/sysinfo.h>
-#include <sys/time.h>
-#include <sys/times.h>
-#include <sys/timex.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/user.h>
-#include <sys/utsname.h>
-#include <sys/wait.h>
-#include <linux/filter.h>
-#include <linux/netlink.h>
-#include <linux/rtnetlink.h>
-#include <linux/icmpv6.h>
-#include <asm/termbits.h>
-#include <time.h>
-#include <unistd.h>
-#include <ustat.h>
-#include <utime.h>
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/hci.h>
-
-#ifdef TCSETS2
-// On systems that have "struct termios2" use this as type Termios.
-typedef struct termios2 termios_t;
-#else
-typedef struct termios termios_t;
-#endif
-
-enum {
-	sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
-	struct sockaddr s1;	// this one gets used for fields
-	struct sockaddr_in s2;	// these pad it out
-	struct sockaddr_in6 s3;
-	struct sockaddr_un s4;
-	struct sockaddr_ll s5;
-	struct sockaddr_nl s6;
-};
-
-struct sockaddr_any {
-	struct sockaddr addr;
-	char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-// copied from /usr/include/linux/un.h
-struct my_sockaddr_un {
-	sa_family_t sun_family;
-#if defined(__ARM_EABI__) || defined(__powerpc64__)
-	// on ARM char is by default unsigned
-	signed char sun_path[108];
-#else
-	char sun_path[108];
-#endif
-};
-
-#ifdef __ARM_EABI__
-typedef struct user_regs PtraceRegs;
-#elif defined(__aarch64__)
-typedef struct user_pt_regs PtraceRegs;
-#elif defined(__powerpc64__)
-typedef struct pt_regs PtraceRegs;
-#elif defined(__mips__)
-typedef struct user PtraceRegs;
-#elif defined(__s390x__)
-typedef struct _user_regs_struct PtraceRegs;
-#elif defined(__sparc__)
-#include <asm/ptrace.h>
-typedef struct pt_regs PtraceRegs;
-#else
-typedef struct user_regs_struct PtraceRegs;
-#endif
-
-#if defined(__s390x__)
-typedef struct _user_psw_struct ptracePsw;
-typedef struct _user_fpregs_struct ptraceFpregs;
-typedef struct _user_per_struct ptracePer;
-#else
-typedef struct {} ptracePsw;
-typedef struct {} ptraceFpregs;
-typedef struct {} ptracePer;
-#endif
-
-// The real epoll_event is a union, and godefs doesn't handle it well.
-struct my_epoll_event {
-	uint32_t events;
-#if defined(__ARM_EABI__) || defined(__aarch64__)
-	// padding is not specified in linux/eventpoll.h but added to conform to the
-	// alignment requirements of EABI
-	int32_t padFd;
-#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__)
-	int32_t _padFd;
-#endif
-	int32_t fd;
-	int32_t pad;
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
-	PathMax        = C.PATH_MAX
-)
-
-// Basic types
-
-type (
-	_C_short     C.short
-	_C_int       C.int
-	_C_long      C.long
-	_C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timex C.struct_timex
-
-type Time_t C.time_t
-
-type Tms C.struct_tms
-
-type Utimbuf C.struct_utimbuf
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-type Flock_t C.struct_flock
-
-// Advice to Fadvise
-
-const (
-	FADV_NORMAL     = C.POSIX_FADV_NORMAL
-	FADV_RANDOM     = C.POSIX_FADV_RANDOM
-	FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL
-	FADV_WILLNEED   = C.POSIX_FADV_WILLNEED
-	FADV_DONTNEED   = C.POSIX_FADV_DONTNEED
-	FADV_NOREUSE    = C.POSIX_FADV_NOREUSE
-)
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_my_sockaddr_un
-
-type RawSockaddrLinklayer C.struct_sockaddr_ll
-
-type RawSockaddrNetlink C.struct_sockaddr_nl
-
-type RawSockaddrHCI C.struct_sockaddr_hci
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPMreqn C.struct_ip_mreqn
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet4Pktinfo C.struct_in_pktinfo
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-type Ucred C.struct_ucred
-
-type TCPInfo C.struct_tcp_info
-
-const (
-	SizeofSockaddrInet4     = C.sizeof_struct_sockaddr_in
-	SizeofSockaddrInet6     = C.sizeof_struct_sockaddr_in6
-	SizeofSockaddrAny       = C.sizeof_struct_sockaddr_any
-	SizeofSockaddrUnix      = C.sizeof_struct_sockaddr_un
-	SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll
-	SizeofSockaddrNetlink   = C.sizeof_struct_sockaddr_nl
-	SizeofSockaddrHCI       = C.sizeof_struct_sockaddr_hci
-	SizeofLinger            = C.sizeof_struct_linger
-	SizeofIPMreq            = C.sizeof_struct_ip_mreq
-	SizeofIPMreqn           = C.sizeof_struct_ip_mreqn
-	SizeofIPv6Mreq          = C.sizeof_struct_ipv6_mreq
-	SizeofMsghdr            = C.sizeof_struct_msghdr
-	SizeofCmsghdr           = C.sizeof_struct_cmsghdr
-	SizeofInet4Pktinfo      = C.sizeof_struct_in_pktinfo
-	SizeofInet6Pktinfo      = C.sizeof_struct_in6_pktinfo
-	SizeofIPv6MTUInfo       = C.sizeof_struct_ip6_mtuinfo
-	SizeofICMPv6Filter      = C.sizeof_struct_icmp6_filter
-	SizeofUcred             = C.sizeof_struct_ucred
-	SizeofTCPInfo           = C.sizeof_struct_tcp_info
-)
-
-// Netlink routing and interface messages
-
-const (
-	IFA_UNSPEC          = C.IFA_UNSPEC
-	IFA_ADDRESS         = C.IFA_ADDRESS
-	IFA_LOCAL           = C.IFA_LOCAL
-	IFA_LABEL           = C.IFA_LABEL
-	IFA_BROADCAST       = C.IFA_BROADCAST
-	IFA_ANYCAST         = C.IFA_ANYCAST
-	IFA_CACHEINFO       = C.IFA_CACHEINFO
-	IFA_MULTICAST       = C.IFA_MULTICAST
-	IFLA_UNSPEC         = C.IFLA_UNSPEC
-	IFLA_ADDRESS        = C.IFLA_ADDRESS
-	IFLA_BROADCAST      = C.IFLA_BROADCAST
-	IFLA_IFNAME         = C.IFLA_IFNAME
-	IFLA_MTU            = C.IFLA_MTU
-	IFLA_LINK           = C.IFLA_LINK
-	IFLA_QDISC          = C.IFLA_QDISC
-	IFLA_STATS          = C.IFLA_STATS
-	IFLA_COST           = C.IFLA_COST
-	IFLA_PRIORITY       = C.IFLA_PRIORITY
-	IFLA_MASTER         = C.IFLA_MASTER
-	IFLA_WIRELESS       = C.IFLA_WIRELESS
-	IFLA_PROTINFO       = C.IFLA_PROTINFO
-	IFLA_TXQLEN         = C.IFLA_TXQLEN
-	IFLA_MAP            = C.IFLA_MAP
-	IFLA_WEIGHT         = C.IFLA_WEIGHT
-	IFLA_OPERSTATE      = C.IFLA_OPERSTATE
-	IFLA_LINKMODE       = C.IFLA_LINKMODE
-	IFLA_LINKINFO       = C.IFLA_LINKINFO
-	IFLA_NET_NS_PID     = C.IFLA_NET_NS_PID
-	IFLA_IFALIAS        = C.IFLA_IFALIAS
-	IFLA_MAX            = C.IFLA_MAX
-	RT_SCOPE_UNIVERSE   = C.RT_SCOPE_UNIVERSE
-	RT_SCOPE_SITE       = C.RT_SCOPE_SITE
-	RT_SCOPE_LINK       = C.RT_SCOPE_LINK
-	RT_SCOPE_HOST       = C.RT_SCOPE_HOST
-	RT_SCOPE_NOWHERE    = C.RT_SCOPE_NOWHERE
-	RT_TABLE_UNSPEC     = C.RT_TABLE_UNSPEC
-	RT_TABLE_COMPAT     = C.RT_TABLE_COMPAT
-	RT_TABLE_DEFAULT    = C.RT_TABLE_DEFAULT
-	RT_TABLE_MAIN       = C.RT_TABLE_MAIN
-	RT_TABLE_LOCAL      = C.RT_TABLE_LOCAL
-	RT_TABLE_MAX        = C.RT_TABLE_MAX
-	RTA_UNSPEC          = C.RTA_UNSPEC
-	RTA_DST             = C.RTA_DST
-	RTA_SRC             = C.RTA_SRC
-	RTA_IIF             = C.RTA_IIF
-	RTA_OIF             = C.RTA_OIF
-	RTA_GATEWAY         = C.RTA_GATEWAY
-	RTA_PRIORITY        = C.RTA_PRIORITY
-	RTA_PREFSRC         = C.RTA_PREFSRC
-	RTA_METRICS         = C.RTA_METRICS
-	RTA_MULTIPATH       = C.RTA_MULTIPATH
-	RTA_FLOW            = C.RTA_FLOW
-	RTA_CACHEINFO       = C.RTA_CACHEINFO
-	RTA_TABLE           = C.RTA_TABLE
-	RTN_UNSPEC          = C.RTN_UNSPEC
-	RTN_UNICAST         = C.RTN_UNICAST
-	RTN_LOCAL           = C.RTN_LOCAL
-	RTN_BROADCAST       = C.RTN_BROADCAST
-	RTN_ANYCAST         = C.RTN_ANYCAST
-	RTN_MULTICAST       = C.RTN_MULTICAST
-	RTN_BLACKHOLE       = C.RTN_BLACKHOLE
-	RTN_UNREACHABLE     = C.RTN_UNREACHABLE
-	RTN_PROHIBIT        = C.RTN_PROHIBIT
-	RTN_THROW           = C.RTN_THROW
-	RTN_NAT             = C.RTN_NAT
-	RTN_XRESOLVE        = C.RTN_XRESOLVE
-	RTNLGRP_NONE        = C.RTNLGRP_NONE
-	RTNLGRP_LINK        = C.RTNLGRP_LINK
-	RTNLGRP_NOTIFY      = C.RTNLGRP_NOTIFY
-	RTNLGRP_NEIGH       = C.RTNLGRP_NEIGH
-	RTNLGRP_TC          = C.RTNLGRP_TC
-	RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR
-	RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE
-	RTNLGRP_IPV4_ROUTE  = C.RTNLGRP_IPV4_ROUTE
-	RTNLGRP_IPV4_RULE   = C.RTNLGRP_IPV4_RULE
-	RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR
-	RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE
-	RTNLGRP_IPV6_ROUTE  = C.RTNLGRP_IPV6_ROUTE
-	RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO
-	RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX
-	RTNLGRP_IPV6_RULE   = C.RTNLGRP_IPV6_RULE
-	RTNLGRP_ND_USEROPT  = C.RTNLGRP_ND_USEROPT
-	SizeofNlMsghdr      = C.sizeof_struct_nlmsghdr
-	SizeofNlMsgerr      = C.sizeof_struct_nlmsgerr
-	SizeofRtGenmsg      = C.sizeof_struct_rtgenmsg
-	SizeofNlAttr        = C.sizeof_struct_nlattr
-	SizeofRtAttr        = C.sizeof_struct_rtattr
-	SizeofIfInfomsg     = C.sizeof_struct_ifinfomsg
-	SizeofIfAddrmsg     = C.sizeof_struct_ifaddrmsg
-	SizeofRtMsg         = C.sizeof_struct_rtmsg
-	SizeofRtNexthop     = C.sizeof_struct_rtnexthop
-)
-
-type NlMsghdr C.struct_nlmsghdr
-
-type NlMsgerr C.struct_nlmsgerr
-
-type RtGenmsg C.struct_rtgenmsg
-
-type NlAttr C.struct_nlattr
-
-type RtAttr C.struct_rtattr
-
-type IfInfomsg C.struct_ifinfomsg
-
-type IfAddrmsg C.struct_ifaddrmsg
-
-type RtMsg C.struct_rtmsg
-
-type RtNexthop C.struct_rtnexthop
-
-// Linux socket filter
-
-const (
-	SizeofSockFilter = C.sizeof_struct_sock_filter
-	SizeofSockFprog  = C.sizeof_struct_sock_fprog
-)
-
-type SockFilter C.struct_sock_filter
-
-type SockFprog C.struct_sock_fprog
-
-// Inotify
-
-type InotifyEvent C.struct_inotify_event
-
-const SizeofInotifyEvent = C.sizeof_struct_inotify_event
-
-// Ptrace
-
-// Register structures
-type PtraceRegs C.PtraceRegs
-
-// Structures contained in PtraceRegs on s390x (exported by mkpost.go)
-type ptracePsw C.ptracePsw
-
-type ptraceFpregs C.ptraceFpregs
-
-type ptracePer C.ptracePer
-
-// Misc
-
-type FdSet C.fd_set
-
-type Sysinfo_t C.struct_sysinfo
-
-type Utsname C.struct_utsname
-
-type Ustat_t C.struct_ustat
-
-type EpollEvent C.struct_my_epoll_event
-
-const (
-	AT_FDCWD            = C.AT_FDCWD
-	AT_REMOVEDIR        = C.AT_REMOVEDIR
-	AT_SYMLINK_FOLLOW   = C.AT_SYMLINK_FOLLOW
-	AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
-)
-
-type PollFd C.struct_pollfd
-
-const (
-	POLLIN    = C.POLLIN
-	POLLPRI   = C.POLLPRI
-	POLLOUT   = C.POLLOUT
-	POLLRDHUP = C.POLLRDHUP
-	POLLERR   = C.POLLERR
-	POLLHUP   = C.POLLHUP
-	POLLNVAL  = C.POLLNVAL
-)
-
-type Sigset_t C.sigset_t
-
-// sysconf information
-
-const _SC_PAGESIZE = C._SC_PAGESIZE
-
-// Terminal handling
-
-type Termios C.termios_t

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/types_netbsd.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/types_netbsd.go b/newt/vendor/golang.org/x/sys/unix/types_netbsd.go
deleted file mode 100644
index d15f93d..0000000
--- a/newt/vendor/golang.org/x/sys/unix/types_netbsd.go
+++ /dev/null
@@ -1,232 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs.  See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/sysctl.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
-	sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
-	struct sockaddr s1;	// this one gets used for fields
-	struct sockaddr_in s2;	// these pad it out
-	struct sockaddr_in6 s3;
-	struct sockaddr_un s4;
-	struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
-	struct sockaddr addr;
-	char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
-	_C_short     C.short
-	_C_int       C.int
-	_C_long      C.long
-	_C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
-	SizeofSockaddrInet4    = C.sizeof_struct_sockaddr_in
-	SizeofSockaddrInet6    = C.sizeof_struct_sockaddr_in6
-	SizeofSockaddrAny      = C.sizeof_struct_sockaddr_any
-	SizeofSockaddrUnix     = C.sizeof_struct_sockaddr_un
-	SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
-	SizeofLinger           = C.sizeof_struct_linger
-	SizeofIPMreq           = C.sizeof_struct_ip_mreq
-	SizeofIPv6Mreq         = C.sizeof_struct_ipv6_mreq
-	SizeofMsghdr           = C.sizeof_struct_msghdr
-	SizeofCmsghdr          = C.sizeof_struct_cmsghdr
-	SizeofInet6Pktinfo     = C.sizeof_struct_in6_pktinfo
-	SizeofIPv6MTUInfo      = C.sizeof_struct_ip6_mtuinfo
-	SizeofICMPv6Filter     = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
-	PTRACE_TRACEME = C.PT_TRACE_ME
-	PTRACE_CONT    = C.PT_CONTINUE
-	PTRACE_KILL    = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
-	SizeofIfMsghdr         = C.sizeof_struct_if_msghdr
-	SizeofIfData           = C.sizeof_struct_if_data
-	SizeofIfaMsghdr        = C.sizeof_struct_ifa_msghdr
-	SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
-	SizeofRtMsghdr         = C.sizeof_struct_rt_msghdr
-	SizeofRtMetrics        = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-type Mclpool C.struct_mclpool
-
-// Berkeley packet filter
-
-const (
-	SizeofBpfVersion = C.sizeof_struct_bpf_version
-	SizeofBpfStat    = C.sizeof_struct_bpf_stat
-	SizeofBpfProgram = C.sizeof_struct_bpf_program
-	SizeofBpfInsn    = C.sizeof_struct_bpf_insn
-	SizeofBpfHdr     = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-type BpfTimeval C.struct_bpf_timeval
-
-// Terminal handling
-
-type Termios C.struct_termios
-
-// Sysctl
-
-type Sysctlnode C.struct_sysctlnode

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/types_openbsd.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/types_openbsd.go b/newt/vendor/golang.org/x/sys/unix/types_openbsd.go
deleted file mode 100644
index b66fe25..0000000
--- a/newt/vendor/golang.org/x/sys/unix/types_openbsd.go
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs.  See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include <dirent.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <termios.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/ptrace.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/uio.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-
-enum {
-	sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
-	struct sockaddr s1;	// this one gets used for fields
-	struct sockaddr_in s2;	// these pad it out
-	struct sockaddr_in6 s3;
-	struct sockaddr_un s4;
-	struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
-	struct sockaddr addr;
-	char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
-	_C_short     C.short
-	_C_int       C.int
-	_C_long      C.long
-	_C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
-	S_IFMT   = C.S_IFMT
-	S_IFIFO  = C.S_IFIFO
-	S_IFCHR  = C.S_IFCHR
-	S_IFDIR  = C.S_IFDIR
-	S_IFBLK  = C.S_IFBLK
-	S_IFREG  = C.S_IFREG
-	S_IFLNK  = C.S_IFLNK
-	S_IFSOCK = C.S_IFSOCK
-	S_ISUID  = C.S_ISUID
-	S_ISGID  = C.S_ISGID
-	S_ISVTX  = C.S_ISVTX
-	S_IRUSR  = C.S_IRUSR
-	S_IWUSR  = C.S_IWUSR
-	S_IXUSR  = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat
-
-type Statfs_t C.struct_statfs
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-type Fsid C.fsid_t
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
-	SizeofSockaddrInet4    = C.sizeof_struct_sockaddr_in
-	SizeofSockaddrInet6    = C.sizeof_struct_sockaddr_in6
-	SizeofSockaddrAny      = C.sizeof_struct_sockaddr_any
-	SizeofSockaddrUnix     = C.sizeof_struct_sockaddr_un
-	SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
-	SizeofLinger           = C.sizeof_struct_linger
-	SizeofIPMreq           = C.sizeof_struct_ip_mreq
-	SizeofIPv6Mreq         = C.sizeof_struct_ipv6_mreq
-	SizeofMsghdr           = C.sizeof_struct_msghdr
-	SizeofCmsghdr          = C.sizeof_struct_cmsghdr
-	SizeofInet6Pktinfo     = C.sizeof_struct_in6_pktinfo
-	SizeofIPv6MTUInfo      = C.sizeof_struct_ip6_mtuinfo
-	SizeofICMPv6Filter     = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
-	PTRACE_TRACEME = C.PT_TRACE_ME
-	PTRACE_CONT    = C.PT_CONTINUE
-	PTRACE_KILL    = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
-	SizeofIfMsghdr         = C.sizeof_struct_if_msghdr
-	SizeofIfData           = C.sizeof_struct_if_data
-	SizeofIfaMsghdr        = C.sizeof_struct_ifa_msghdr
-	SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr
-	SizeofRtMsghdr         = C.sizeof_struct_rt_msghdr
-	SizeofRtMetrics        = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfAnnounceMsghdr C.struct_if_announcemsghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-type Mclpool C.struct_mclpool
-
-// Berkeley packet filter
-
-const (
-	SizeofBpfVersion = C.sizeof_struct_bpf_version
-	SizeofBpfStat    = C.sizeof_struct_bpf_stat
-	SizeofBpfProgram = C.sizeof_struct_bpf_program
-	SizeofBpfInsn    = C.sizeof_struct_bpf_insn
-	SizeofBpfHdr     = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-type BpfTimeval C.struct_bpf_timeval
-
-// Terminal handling
-
-type Termios C.struct_termios

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/types_solaris.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/types_solaris.go b/newt/vendor/golang.org/x/sys/unix/types_solaris.go
deleted file mode 100644
index c5d5c8f..0000000
--- a/newt/vendor/golang.org/x/sys/unix/types_solaris.go
+++ /dev/null
@@ -1,262 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs.  See also mkerrors.sh and mkall.sh
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-// These defines ensure that builds done on newer versions of Solaris are
-// backwards-compatible with older versions of Solaris and
-// OpenSolaris-based derivatives.
-#define __USE_SUNOS_SOCKETS__          // msghdr
-#define __USE_LEGACY_PROTOTYPES__      // iovec
-#include <dirent.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <limits.h>
-#include <signal.h>
-#include <termios.h>
-#include <termio.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/param.h>
-#include <sys/resource.h>
-#include <sys/select.h>
-#include <sys/signal.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/times.h>
-#include <sys/types.h>
-#include <sys/utsname.h>
-#include <sys/un.h>
-#include <sys/wait.h>
-#include <net/bpf.h>
-#include <net/if.h>
-#include <net/if_dl.h>
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/icmp6.h>
-#include <netinet/tcp.h>
-#include <ustat.h>
-#include <utime.h>
-
-enum {
-	sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
-	struct sockaddr s1;	// this one gets used for fields
-	struct sockaddr_in s2;	// these pad it out
-	struct sockaddr_in6 s3;
-	struct sockaddr_un s4;
-	struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
-	struct sockaddr addr;
-	char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
-	sizeofPtr      = C.sizeofPtr
-	sizeofShort    = C.sizeof_short
-	sizeofInt      = C.sizeof_int
-	sizeofLong     = C.sizeof_long
-	sizeofLongLong = C.sizeof_longlong
-	PathMax        = C.PATH_MAX
-	MaxHostNameLen = C.MAXHOSTNAMELEN
-)
-
-// Basic types
-
-type (
-	_C_short     C.short
-	_C_int       C.int
-	_C_long      C.long
-	_C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timeval32 C.struct_timeval32
-
-type Tms C.struct_tms
-
-type Utimbuf C.struct_utimbuf
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-const ( // Directory mode bits
-	S_IFMT   = C.S_IFMT
-	S_IFIFO  = C.S_IFIFO
-	S_IFCHR  = C.S_IFCHR
-	S_IFDIR  = C.S_IFDIR
-	S_IFBLK  = C.S_IFBLK
-	S_IFREG  = C.S_IFREG
-	S_IFLNK  = C.S_IFLNK
-	S_IFSOCK = C.S_IFSOCK
-	S_ISUID  = C.S_ISUID
-	S_ISGID  = C.S_ISGID
-	S_ISVTX  = C.S_ISVTX
-	S_IRUSR  = C.S_IRUSR
-	S_IWUSR  = C.S_IWUSR
-	S_IXUSR  = C.S_IXUSR
-)
-
-type Stat_t C.struct_stat
-
-type Flock_t C.struct_flock
-
-type Dirent C.struct_dirent
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
-	SizeofSockaddrInet4    = C.sizeof_struct_sockaddr_in
-	SizeofSockaddrInet6    = C.sizeof_struct_sockaddr_in6
-	SizeofSockaddrAny      = C.sizeof_struct_sockaddr_any
-	SizeofSockaddrUnix     = C.sizeof_struct_sockaddr_un
-	SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
-	SizeofLinger           = C.sizeof_struct_linger
-	SizeofIPMreq           = C.sizeof_struct_ip_mreq
-	SizeofIPv6Mreq         = C.sizeof_struct_ipv6_mreq
-	SizeofMsghdr           = C.sizeof_struct_msghdr
-	SizeofCmsghdr          = C.sizeof_struct_cmsghdr
-	SizeofInet6Pktinfo     = C.sizeof_struct_in6_pktinfo
-	SizeofIPv6MTUInfo      = C.sizeof_struct_ip6_mtuinfo
-	SizeofICMPv6Filter     = C.sizeof_struct_icmp6_filter
-)
-
-// Select
-
-type FdSet C.fd_set
-
-// Misc
-
-type Utsname C.struct_utsname
-
-type Ustat_t C.struct_ustat
-
-const (
-	AT_FDCWD            = C.AT_FDCWD
-	AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
-	AT_SYMLINK_FOLLOW   = C.AT_SYMLINK_FOLLOW
-	AT_REMOVEDIR        = C.AT_REMOVEDIR
-	AT_EACCESS          = C.AT_EACCESS
-)
-
-// Routing and interface messages
-
-const (
-	SizeofIfMsghdr  = C.sizeof_struct_if_msghdr
-	SizeofIfData    = C.sizeof_struct_if_data
-	SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
-	SizeofRtMsghdr  = C.sizeof_struct_rt_msghdr
-	SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
-	SizeofBpfVersion = C.sizeof_struct_bpf_version
-	SizeofBpfStat    = C.sizeof_struct_bpf_stat
-	SizeofBpfProgram = C.sizeof_struct_bpf_program
-	SizeofBpfInsn    = C.sizeof_struct_bpf_insn
-	SizeofBpfHdr     = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfTimeval C.struct_bpf_timeval
-
-type BpfHdr C.struct_bpf_hdr
-
-// sysconf information
-
-const _SC_PAGESIZE = C._SC_PAGESIZE
-
-// Terminal handling
-
-type Termios C.struct_termios
-
-type Termio C.struct_termio
-
-type Winsize C.struct_winsize


[05/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
deleted file mode 100644
index 2e5cb39..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ /dev/null
@@ -1,1772 +0,0 @@
-// mksyscall.pl -l32 -arm syscall_linux.go syscall_linux_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,linux
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(arg)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(source)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	var _p2 *byte
-	_p2, err = BytePtrFromString(fstype)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	use(unsafe.Pointer(_p2))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
-	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
-	state = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
-	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
-	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
-	tid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(dest) > 0 {
-		_p2 = unsafe.Pointer(&dest[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(pathname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
-	use(unsafe.Pointer(_p0))
-	watchdesc = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
-	success = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(dest) > 0 {
-		_p1 = unsafe.Pointer(&dest[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
-	use(unsafe.Pointer(_p0))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(newroot)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(putold)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
-	_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(data) > 0 {
-		_p2 = unsafe.Pointer(&data[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
-	Syscall(SYS_SYNC, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
-	r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
-	n = int64(int64(r1)<<32 | int64(r0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
-	ticks = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
-	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
-	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
-	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
-	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	nn = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
-	euid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
-	written = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(events) > 0 {
-		_p0 = unsafe.Pointer(&events[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
-	_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getrlimit(resource int, rlim *rlimit32) (err error) {
-	_, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setrlimit(resource int, rlim *rlimit32) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}



[34/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
deleted file mode 100644
index 9594f93..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ /dev/null
@@ -1,1576 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,darwin
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1c
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x25
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x1e
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1c
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x28
-	AF_NATM                           = 0x1f
-	AF_NDRV                           = 0x1b
-	AF_NETBIOS                        = 0x21
-	AF_NS                             = 0x6
-	AF_OSI                            = 0x7
-	AF_PPP                            = 0x22
-	AF_PUP                            = 0x4
-	AF_RESERVED_36                    = 0x24
-	AF_ROUTE                          = 0x11
-	AF_SIP                            = 0x18
-	AF_SNA                            = 0xb
-	AF_SYSTEM                         = 0x20
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	AF_UTUN                           = 0x26
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B9600                             = 0x2580
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc00c4279
-	BIOCGETIF                         = 0x4020426b
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044272
-	BIOCGRTIMEOUT                     = 0x4010426e
-	BIOCGSEESENT                      = 0x40044276
-	BIOCGSTATS                        = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDLT                          = 0x80044278
-	BIOCSETF                          = 0x80104267
-	BIOCSETFNR                        = 0x8010427e
-	BIOCSETIF                         = 0x8020426c
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044273
-	BIOCSRTIMEOUT                     = 0x8010426d
-	BIOCSSEESENT                      = 0x80044277
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x80000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	DLT_A429                          = 0xb8
-	DLT_A653_ICM                      = 0xb9
-	DLT_AIRONET_HEADER                = 0x78
-	DLT_AOS                           = 0xde
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ARCNET_LINUX                  = 0x81
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AURORA                        = 0x7e
-	DLT_AX25                          = 0x3
-	DLT_AX25_KISS                     = 0xca
-	DLT_BACNET_MS_TP                  = 0xa5
-	DLT_BLUETOOTH_HCI_H4              = 0xbb
-	DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-	DLT_CAN20B                        = 0xbe
-	DLT_CAN_SOCKETCAN                 = 0xe3
-	DLT_CHAOS                         = 0x5
-	DLT_CHDLC                         = 0x68
-	DLT_CISCO_IOS                     = 0x76
-	DLT_C_HDLC                        = 0x68
-	DLT_C_HDLC_WITH_DIR               = 0xcd
-	DLT_DBUS                          = 0xe7
-	DLT_DECT                          = 0xdd
-	DLT_DOCSIS                        = 0x8f
-	DLT_DVB_CI                        = 0xeb
-	DLT_ECONET                        = 0x73
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0x6d
-	DLT_ERF                           = 0xc5
-	DLT_ERF_ETH                       = 0xaf
-	DLT_ERF_POS                       = 0xb0
-	DLT_FC_2                          = 0xe0
-	DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-	DLT_FDDI                          = 0xa
-	DLT_FLEXRAY                       = 0xd2
-	DLT_FRELAY                        = 0x6b
-	DLT_FRELAY_WITH_DIR               = 0xce
-	DLT_GCOM_SERIAL                   = 0xad
-	DLT_GCOM_T1E1                     = 0xac
-	DLT_GPF_F                         = 0xab
-	DLT_GPF_T                         = 0xaa
-	DLT_GPRS_LLC                      = 0xa9
-	DLT_GSMTAP_ABIS                   = 0xda
-	DLT_GSMTAP_UM                     = 0xd9
-	DLT_HHDLC                         = 0x79
-	DLT_IBM_SN                        = 0x92
-	DLT_IBM_SP                        = 0x91
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_IEEE802_15_4                  = 0xc3
-	DLT_IEEE802_15_4_LINUX            = 0xbf
-	DLT_IEEE802_15_4_NOFCS            = 0xe6
-	DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-	DLT_IEEE802_16_MAC_CPS            = 0xbc
-	DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-	DLT_IPFILTER                      = 0x74
-	DLT_IPMB                          = 0xc7
-	DLT_IPMB_LINUX                    = 0xd1
-	DLT_IPNET                         = 0xe2
-	DLT_IPOIB                         = 0xf2
-	DLT_IPV4                          = 0xe4
-	DLT_IPV6                          = 0xe5
-	DLT_IP_OVER_FC                    = 0x7a
-	DLT_JUNIPER_ATM1                  = 0x89
-	DLT_JUNIPER_ATM2                  = 0x87
-	DLT_JUNIPER_ATM_CEMIC             = 0xee
-	DLT_JUNIPER_CHDLC                 = 0xb5
-	DLT_JUNIPER_ES                    = 0x84
-	DLT_JUNIPER_ETHER                 = 0xb2
-	DLT_JUNIPER_FIBRECHANNEL          = 0xea
-	DLT_JUNIPER_FRELAY                = 0xb4
-	DLT_JUNIPER_GGSN                  = 0x85
-	DLT_JUNIPER_ISM                   = 0xc2
-	DLT_JUNIPER_MFR                   = 0x86
-	DLT_JUNIPER_MLFR                  = 0x83
-	DLT_JUNIPER_MLPPP                 = 0x82
-	DLT_JUNIPER_MONITOR               = 0xa4
-	DLT_JUNIPER_PIC_PEER              = 0xae
-	DLT_JUNIPER_PPP                   = 0xb3
-	DLT_JUNIPER_PPPOE                 = 0xa7
-	DLT_JUNIPER_PPPOE_ATM             = 0xa8
-	DLT_JUNIPER_SERVICES              = 0x88
-	DLT_JUNIPER_SRX_E2E               = 0xe9
-	DLT_JUNIPER_ST                    = 0xc8
-	DLT_JUNIPER_VP                    = 0xb7
-	DLT_JUNIPER_VS                    = 0xe8
-	DLT_LAPB_WITH_DIR                 = 0xcf
-	DLT_LAPD                          = 0xcb
-	DLT_LIN                           = 0xd4
-	DLT_LINUX_EVDEV                   = 0xd8
-	DLT_LINUX_IRDA                    = 0x90
-	DLT_LINUX_LAPD                    = 0xb1
-	DLT_LINUX_PPP_WITHDIRECTION       = 0xa6
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_LTALK                         = 0x72
-	DLT_MATCHING_MAX                  = 0xf5
-	DLT_MATCHING_MIN                  = 0x68
-	DLT_MFR                           = 0xb6
-	DLT_MOST                          = 0xd3
-	DLT_MPEG_2_TS                     = 0xf3
-	DLT_MPLS                          = 0xdb
-	DLT_MTP2                          = 0x8c
-	DLT_MTP2_WITH_PHDR                = 0x8b
-	DLT_MTP3                          = 0x8d
-	DLT_MUX27010                      = 0xec
-	DLT_NETANALYZER                   = 0xf0
-	DLT_NETANALYZER_TRANSPARENT       = 0xf1
-	DLT_NFC_LLCP                      = 0xf5
-	DLT_NFLOG                         = 0xef
-	DLT_NG40                          = 0xf4
-	DLT_NULL                          = 0x0
-	DLT_PCI_EXP                       = 0x7d
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPI                           = 0xc0
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_PPPD                      = 0xa6
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PPP_WITH_DIR                  = 0xcc
-	DLT_PPP_WITH_DIRECTION            = 0xa6
-	DLT_PRISM_HEADER                  = 0x77
-	DLT_PRONET                        = 0x4
-	DLT_RAIF1                         = 0xc6
-	DLT_RAW                           = 0xc
-	DLT_RIO                           = 0x7c
-	DLT_SCCP                          = 0x8e
-	DLT_SITA                          = 0xc4
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DLT_STANAG_5066_D_PDU             = 0xed
-	DLT_SUNATM                        = 0x7b
-	DLT_SYMANTEC_FIREWALL             = 0x63
-	DLT_TZSP                          = 0x80
-	DLT_USB                           = 0xba
-	DLT_USB_LINUX                     = 0xbd
-	DLT_USB_LINUX_MMAPPED             = 0xdc
-	DLT_USER0                         = 0x93
-	DLT_USER1                         = 0x94
-	DLT_USER10                        = 0x9d
-	DLT_USER11                        = 0x9e
-	DLT_USER12                        = 0x9f
-	DLT_USER13                        = 0xa0
-	DLT_USER14                        = 0xa1
-	DLT_USER15                        = 0xa2
-	DLT_USER2                         = 0x95
-	DLT_USER3                         = 0x96
-	DLT_USER4                         = 0x97
-	DLT_USER5                         = 0x98
-	DLT_USER6                         = 0x99
-	DLT_USER7                         = 0x9a
-	DLT_USER8                         = 0x9b
-	DLT_USER9                         = 0x9c
-	DLT_WIHART                        = 0xdf
-	DLT_X2E_SERIAL                    = 0xd5
-	DLT_X2E_XORAYA                    = 0xd6
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EVFILT_AIO                        = -0x3
-	EVFILT_FS                         = -0x9
-	EVFILT_MACHPORT                   = -0x8
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0xe
-	EVFILT_THREADMARKER               = 0xe
-	EVFILT_TIMER                      = -0x7
-	EVFILT_USER                       = -0xa
-	EVFILT_VM                         = -0xc
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_DISPATCH                       = 0x80
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG0                          = 0x1000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_OOBAND                         = 0x2000
-	EV_POLL                           = 0x1000
-	EV_RECEIPT                        = 0x40
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_ADDFILESIGS                     = 0x3d
-	F_ADDSIGS                         = 0x3b
-	F_ALLOCATEALL                     = 0x4
-	F_ALLOCATECONTIG                  = 0x2
-	F_CHKCLEAN                        = 0x29
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0x43
-	F_FINDSIGS                        = 0x4e
-	F_FLUSH_DATA                      = 0x28
-	F_FREEZE_FS                       = 0x35
-	F_FULLFSYNC                       = 0x33
-	F_GETCODEDIR                      = 0x48
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETLKPID                        = 0x42
-	F_GETNOSIGPIPE                    = 0x4a
-	F_GETOWN                          = 0x5
-	F_GETPATH                         = 0x32
-	F_GETPATH_MTMINFO                 = 0x47
-	F_GETPROTECTIONCLASS              = 0x3f
-	F_GETPROTECTIONLEVEL              = 0x4d
-	F_GLOBAL_NOCACHE                  = 0x37
-	F_LOG2PHYS                        = 0x31
-	F_LOG2PHYS_EXT                    = 0x41
-	F_NOCACHE                         = 0x30
-	F_NODIRECT                        = 0x3e
-	F_OK                              = 0x0
-	F_PATHPKG_CHECK                   = 0x34
-	F_PEOFPOSMODE                     = 0x3
-	F_PREALLOCATE                     = 0x2a
-	F_RDADVISE                        = 0x2c
-	F_RDAHEAD                         = 0x2d
-	F_RDLCK                           = 0x1
-	F_SETBACKINGSTORE                 = 0x46
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETLKWTIMEOUT                   = 0xa
-	F_SETNOSIGPIPE                    = 0x49
-	F_SETOWN                          = 0x6
-	F_SETPROTECTIONCLASS              = 0x40
-	F_SETSIZE                         = 0x2b
-	F_SINGLE_WRITER                   = 0x4c
-	F_THAW_FS                         = 0x36
-	F_TRANSCODEKEY                    = 0x4b
-	F_UNLCK                           = 0x2
-	F_VOLPOSMODE                      = 0x4
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFF_ALLMULTI                      = 0x200
-	IFF_ALTPHYS                       = 0x4000
-	IFF_BROADCAST                     = 0x2
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_AAL5                          = 0x31
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ATM                           = 0x25
-	IFT_BRIDGE                        = 0xd1
-	IFT_CARP                          = 0xf8
-	IFT_CELLULAR                      = 0xff
-	IFT_CEPT                          = 0x13
-	IFT_DS3                           = 0x1e
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0x38
-	IFT_FDDI                          = 0xf
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_GIF                           = 0x37
-	IFT_HDH1822                       = 0x3
-	IFT_HIPPI                         = 0x2f
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE8023ADLAG                 = 0x88
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88026                      = 0xa
-	IFT_L2VLAN                        = 0x87
-	IFT_LAPB                          = 0x10
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_NSIP                          = 0x1b
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PDP                           = 0xff
-	IFT_PFLOG                         = 0xf5
-	IFT_PFSYNC                        = 0xf6
-	IFT_PKTAP                         = 0xfe
-	IFT_PPP                           = 0x17
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PTPSERIAL                     = 0x16
-	IFT_RS232                         = 0x21
-	IFT_SDLC                          = 0x11
-	IFT_SIP                           = 0x1f
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0x39
-	IFT_T1                            = 0x12
-	IFT_ULTRA                         = 0x1d
-	IFT_V35                           = 0x2d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LINKLOCALNETNUM                = 0xa9fe0000
-	IN_LOOPBACKNET                    = 0x7f
-	IPPROTO_3PC                       = 0x22
-	IPPROTO_ADFS                      = 0x44
-	IPPROTO_AH                        = 0x33
-	IPPROTO_AHIP                      = 0x3d
-	IPPROTO_APES                      = 0x63
-	IPPROTO_ARGUS                     = 0xd
-	IPPROTO_AX25                      = 0x5d
-	IPPROTO_BHA                       = 0x31
-	IPPROTO_BLT                       = 0x1e
-	IPPROTO_BRSATMON                  = 0x4c
-	IPPROTO_CFTP                      = 0x3e
-	IPPROTO_CHAOS                     = 0x10
-	IPPROTO_CMTP                      = 0x26
-	IPPROTO_CPHB                      = 0x49
-	IPPROTO_CPNX                      = 0x48
-	IPPROTO_DDP                       = 0x25
-	IPPROTO_DGP                       = 0x56
-	IPPROTO_DIVERT                    = 0xfe
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_EMCON                     = 0xe
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GMTP                      = 0x64
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HELLO                     = 0x3f
-	IPPROTO_HMP                       = 0x14
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IDPR                      = 0x23
-	IPPROTO_IDRP                      = 0x2d
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IGP                       = 0x55
-	IPPROTO_IGRP                      = 0x58
-	IPPROTO_IL                        = 0x28
-	IPPROTO_INLSP                     = 0x34
-	IPPROTO_INP                       = 0x20
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPCV                      = 0x47
-	IPPROTO_IPEIP                     = 0x5e
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPPC                      = 0x43
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IRTP                      = 0x1c
-	IPPROTO_KRYPTOLAN                 = 0x41
-	IPPROTO_LARP                      = 0x5b
-	IPPROTO_LEAF1                     = 0x19
-	IPPROTO_LEAF2                     = 0x1a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MEAS                      = 0x13
-	IPPROTO_MHRP                      = 0x30
-	IPPROTO_MICP                      = 0x5f
-	IPPROTO_MTP                       = 0x5c
-	IPPROTO_MUX                       = 0x12
-	IPPROTO_ND                        = 0x4d
-	IPPROTO_NHRP                      = 0x36
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_NSP                       = 0x1f
-	IPPROTO_NVPII                     = 0xb
-	IPPROTO_OSPFIGP                   = 0x59
-	IPPROTO_PGM                       = 0x71
-	IPPROTO_PIGP                      = 0x9
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PRM                       = 0x15
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_PVP                       = 0x4b
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_RCCMON                    = 0xa
-	IPPROTO_RDP                       = 0x1b
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_RVD                       = 0x42
-	IPPROTO_SATEXPAK                  = 0x40
-	IPPROTO_SATMON                    = 0x45
-	IPPROTO_SCCSP                     = 0x60
-	IPPROTO_SCTP                      = 0x84
-	IPPROTO_SDRP                      = 0x2a
-	IPPROTO_SEP                       = 0x21
-	IPPROTO_SRPC                      = 0x5a
-	IPPROTO_ST                        = 0x7
-	IPPROTO_SVMTP                     = 0x52
-	IPPROTO_SWIPE                     = 0x35
-	IPPROTO_TCF                       = 0x57
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_TPXX                      = 0x27
-	IPPROTO_TRUNK1                    = 0x17
-	IPPROTO_TRUNK2                    = 0x18
-	IPPROTO_TTP                       = 0x54
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_VINES                     = 0x53
-	IPPROTO_VISA                      = 0x46
-	IPPROTO_VMTP                      = 0x51
-	IPPROTO_WBEXPAK                   = 0x4f
-	IPPROTO_WBMON                     = 0x4e
-	IPPROTO_WSN                       = 0x4a
-	IPPROTO_XNET                      = 0xf
-	IPPROTO_XTP                       = 0x24
-	IPV6_2292DSTOPTS                  = 0x17
-	IPV6_2292HOPLIMIT                 = 0x14
-	IPV6_2292HOPOPTS                  = 0x16
-	IPV6_2292NEXTHOP                  = 0x15
-	IPV6_2292PKTINFO                  = 0x13
-	IPV6_2292PKTOPTIONS               = 0x19
-	IPV6_2292RTHDR                    = 0x18
-	IPV6_BINDV6ONLY                   = 0x1b
-	IPV6_BOUND_IF                     = 0x7d
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x3c
-	IPV6_FW_ADD                       = 0x1e
-	IPV6_FW_DEL                       = 0x1f
-	IPV6_FW_FLUSH                     = 0x20
-	IPV6_FW_GET                       = 0x22
-	IPV6_FW_ZERO                      = 0x21
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXOPTHDR                    = 0x800
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MAX_GROUP_SRC_FILTER         = 0x200
-	IPV6_MAX_MEMBERSHIPS              = 0xfff
-	IPV6_MAX_SOCK_SRC_FILTER          = 0x80
-	IPV6_MIN_MEMBERSHIPS              = 0x1f
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVTCLASS                   = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x24
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_ADD_SOURCE_MEMBERSHIP          = 0x46
-	IP_BLOCK_SOURCE                   = 0x48
-	IP_BOUND_IF                       = 0x19
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_DROP_SOURCE_MEMBERSHIP         = 0x47
-	IP_DUMMYNET_CONFIGURE             = 0x3c
-	IP_DUMMYNET_DEL                   = 0x3d
-	IP_DUMMYNET_FLUSH                 = 0x3e
-	IP_DUMMYNET_GET                   = 0x40
-	IP_FAITH                          = 0x16
-	IP_FW_ADD                         = 0x28
-	IP_FW_DEL                         = 0x29
-	IP_FW_FLUSH                       = 0x2a
-	IP_FW_GET                         = 0x2c
-	IP_FW_RESETLOG                    = 0x2d
-	IP_FW_ZERO                        = 0x2b
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x15
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_GROUP_SRC_FILTER           = 0x200
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MAX_SOCK_MUTE_FILTER           = 0x80
-	IP_MAX_SOCK_SRC_FILTER            = 0x80
-	IP_MF                             = 0x2000
-	IP_MIN_MEMBERSHIPS                = 0x1f
-	IP_MSFILTER                       = 0x4a
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_IFINDEX              = 0x42
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_MULTICAST_VIF                  = 0xe
-	IP_NAT__XXX                       = 0x37
-	IP_OFFMASK                        = 0x1fff
-	IP_OLD_FW_ADD                     = 0x32
-	IP_OLD_FW_DEL                     = 0x33
-	IP_OLD_FW_FLUSH                   = 0x34
-	IP_OLD_FW_GET                     = 0x36
-	IP_OLD_FW_RESETLOG                = 0x38
-	IP_OLD_FW_ZERO                    = 0x35
-	IP_OPTIONS                        = 0x1
-	IP_PKTINFO                        = 0x1a
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVPKTINFO                    = 0x1a
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTTL                        = 0x18
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RSVP_OFF                       = 0x10
-	IP_RSVP_ON                        = 0xf
-	IP_RSVP_VIF_OFF                   = 0x12
-	IP_RSVP_VIF_ON                    = 0x11
-	IP_STRIPHDR                       = 0x17
-	IP_TOS                            = 0x3
-	IP_TRAFFIC_MGT_BACKGROUND         = 0x41
-	IP_TTL                            = 0x4
-	IP_UNBLOCK_SOURCE                 = 0x49
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IUTF8                             = 0x4000
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_CAN_REUSE                    = 0x9
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x5
-	MADV_FREE_REUSABLE                = 0x7
-	MADV_FREE_REUSE                   = 0x8
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_WILLNEED                     = 0x3
-	MADV_ZERO_WIRED_PAGES             = 0x6
-	MAP_ANON                          = 0x1000
-	MAP_COPY                          = 0x2
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_JIT                           = 0x800
-	MAP_NOCACHE                       = 0x400
-	MAP_NOEXTEND                      = 0x100
-	MAP_NORESERVE                     = 0x40
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_RESERVED0080                  = 0x80
-	MAP_SHARED                        = 0x1
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOF                           = 0x100
-	MSG_EOR                           = 0x8
-	MSG_FLUSH                         = 0x400
-	MSG_HAVEMORE                      = 0x2000
-	MSG_HOLD                          = 0x800
-	MSG_NEEDSA                        = 0x10000
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_RCVMORE                       = 0x4000
-	MSG_SEND                          = 0x1000
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MSG_WAITSTREAM                    = 0x200
-	MS_ASYNC                          = 0x1
-	MS_DEACTIVATE                     = 0x8
-	MS_INVALIDATE                     = 0x2
-	MS_KILLPAGES                      = 0x4
-	MS_SYNC                           = 0x10
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_DUMP2                      = 0x7
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_IFLIST2                    = 0x6
-	NET_RT_MAXID                      = 0xa
-	NET_RT_STAT                       = 0x4
-	NET_RT_TRASH                      = 0x5
-	NOFLSH                            = 0x80000000
-	NOTE_ABSOLUTE                     = 0x8
-	NOTE_ATTRIB                       = 0x8
-	NOTE_BACKGROUND                   = 0x40
-	NOTE_CHILD                        = 0x4
-	NOTE_CRITICAL                     = 0x20
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXITSTATUS                   = 0x4000000
-	NOTE_EXIT_CSERROR                 = 0x40000
-	NOTE_EXIT_DECRYPTFAIL             = 0x10000
-	NOTE_EXIT_DETAIL                  = 0x2000000
-	NOTE_EXIT_DETAIL_MASK             = 0x70000
-	NOTE_EXIT_MEMORY                  = 0x20000
-	NOTE_EXIT_REPARENTED              = 0x80000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FFAND                        = 0x40000000
-	NOTE_FFCOPY                       = 0xc0000000
-	NOTE_FFCTRLMASK                   = 0xc0000000
-	NOTE_FFLAGSMASK                   = 0xffffff
-	NOTE_FFNOP                        = 0x0
-	NOTE_FFOR                         = 0x80000000
-	NOTE_FORK                         = 0x40000000
-	NOTE_LEEWAY                       = 0x10
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_NONE                         = 0x80
-	NOTE_NSECONDS                     = 0x4
-	NOTE_PCTRLMASK                    = -0x100000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_REAP                         = 0x10000000
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_SECONDS                      = 0x1
-	NOTE_SIGNAL                       = 0x8000000
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRIGGER                      = 0x1000000
-	NOTE_USECONDS                     = 0x2
-	NOTE_VM_ERROR                     = 0x10000000
-	NOTE_VM_PRESSURE                  = 0x80000000
-	NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
-	NOTE_VM_PRESSURE_TERMINATE        = 0x40000000
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	OFDEL                             = 0x20000
-	OFILL                             = 0x80
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_ALERT                           = 0x20000000
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x1000000
-	O_CREAT                           = 0x200
-	O_DIRECTORY                       = 0x100000
-	O_DP_GETRAWENCRYPTED              = 0x1
-	O_DSYNC                           = 0x400000
-	O_EVTONLY                         = 0x8000
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x20000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_POPUP                           = 0x80000000
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_SHLOCK                          = 0x10
-	O_SYMLINK                         = 0x200000
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	PT_ATTACH                         = 0xa
-	PT_ATTACHEXC                      = 0xe
-	PT_CONTINUE                       = 0x7
-	PT_DENY_ATTACH                    = 0x1f
-	PT_DETACH                         = 0xb
-	PT_FIRSTMACH                      = 0x20
-	PT_FORCEQUOTA                     = 0x1e
-	PT_KILL                           = 0x8
-	PT_READ_D                         = 0x2
-	PT_READ_I                         = 0x1
-	PT_READ_U                         = 0x3
-	PT_SIGEXC                         = 0xc
-	PT_STEP                           = 0x9
-	PT_THUPDATE                       = 0xd
-	PT_TRACE_ME                       = 0x0
-	PT_WRITE_D                        = 0x5
-	PT_WRITE_I                        = 0x4
-	PT_WRITE_U                        = 0x6
-	RLIMIT_AS                         = 0x5
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_CPU_USAGE_MONITOR          = 0x2
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x8
-	RTAX_NETMASK                      = 0x2
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_BROADCAST                     = 0x400000
-	RTF_CLONING                       = 0x100
-	RTF_CONDEMNED                     = 0x2000000
-	RTF_DELCLONE                      = 0x80
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_IFREF                         = 0x4000000
-	RTF_IFSCOPE                       = 0x1000000
-	RTF_LLINFO                        = 0x400
-	RTF_LOCAL                         = 0x200000
-	RTF_MODIFIED                      = 0x20
-	RTF_MULTICAST                     = 0x800000
-	RTF_NOIFREF                       = 0x2000
-	RTF_PINNED                        = 0x100000
-	RTF_PRCLONING                     = 0x10000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x40000
-	RTF_PROXY                         = 0x8000000
-	RTF_REJECT                        = 0x8
-	RTF_ROUTER                        = 0x10000000
-	RTF_STATIC                        = 0x800
-	RTF_UP                            = 0x1
-	RTF_WASCLONED                     = 0x20000
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DELMADDR                      = 0x10
-	RTM_GET                           = 0x4
-	RTM_GET2                          = 0x14
-	RTM_IFINFO                        = 0xe
-	RTM_IFINFO2                       = 0x12
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_NEWMADDR                      = 0xf
-	RTM_NEWMADDR2                     = 0x13
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	SCM_CREDS                         = 0x3
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x2
-	SCM_TIMESTAMP_MONOTONIC           = 0x4
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCARPIPLL                       = 0xc0206928
-	SIOCATMARK                        = 0x40047307
-	SIOCAUTOADDR                      = 0xc0206926
-	SIOCAUTONETMASK                   = 0x80206927
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFPHYADDR                    = 0x80206941
-	SIOCGDRVSPEC                      = 0xc028697b
-	SIOCGETVLAN                       = 0xc020697f
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFALTMTU                     = 0xc0206948
-	SIOCGIFASYNCMAP                   = 0xc020697c
-	SIOCGIFBOND                       = 0xc0206947
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCAP                        = 0xc020695b
-	SIOCGIFCONF                       = 0xc00c6924
-	SIOCGIFDEVMTU                     = 0xc0206944
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFKPI                        = 0xc0206987
-	SIOCGIFMAC                        = 0xc0206982
-	SIOCGIFMEDIA                      = 0xc02c6938
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc0206933
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206940
-	SIOCGIFPHYS                       = 0xc0206935
-	SIOCGIFPSRCADDR                   = 0xc020693f
-	SIOCGIFSTATUS                     = 0xc331693d
-	SIOCGIFVLAN                       = 0xc020697f
-	SIOCGIFWAKEFLAGS                  = 0xc0206988
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCIFCREATE                      = 0xc0206978
-	SIOCIFCREATE2                     = 0xc020697a
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc0106981
-	SIOCRSLVMULTI                     = 0xc010693b
-	SIOCSDRVSPEC                      = 0x8028697b
-	SIOCSETVLAN                       = 0x8020697e
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFALTMTU                     = 0x80206945
-	SIOCSIFASYNCMAP                   = 0x8020697d
-	SIOCSIFBOND                       = 0x80206946
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFCAP                        = 0x8020695a
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFKPI                        = 0x80206986
-	SIOCSIFLLADDR                     = 0x8020693c
-	SIOCSIFMAC                        = 0x80206983
-	SIOCSIFMEDIA                      = 0xc0206937
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x80206934
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x8040693e
-	SIOCSIFPHYS                       = 0x80206936
-	SIOCSIFVLAN                       = 0x8020697e
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SOCK_DGRAM                        = 0x2
-	SOCK_MAXADDRLEN                   = 0xff
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_DONTTRUNC                      = 0x2000
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LABEL                          = 0x1010
-	SO_LINGER                         = 0x80
-	SO_LINGER_SEC                     = 0x1080
-	SO_NKE                            = 0x1021
-	SO_NOADDRERR                      = 0x1023
-	SO_NOSIGPIPE                      = 0x1022
-	SO_NOTIFYCONFLICT                 = 0x1026
-	SO_NP_EXTENSIONS                  = 0x1083
-	SO_NREAD                          = 0x1020
-	SO_NUMRCVPKT                      = 0x1112
-	SO_NWRITE                         = 0x1024
-	SO_OOBINLINE                      = 0x100
-	SO_PEERLABEL                      = 0x1011
-	SO_RANDOMPORT                     = 0x1082
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_REUSESHAREUID                  = 0x1025
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_TIMESTAMP                      = 0x400
-	SO_TIMESTAMP_MONOTONIC            = 0x800
-	SO_TYPE                           = 0x1008
-	SO_UPCALLCLOSEWAIT                = 0x1027
-	SO_USELOOPBACK                    = 0x40
-	SO_WANTMORE                       = 0x4000
-	SO_WANTOOBFLAG                    = 0x8000
-	S_IEXEC                           = 0x40
-	S_IFBLK                           = 0x6000
-	S_IFCHR                           = 0x2000
-	S_IFDIR                           = 0x4000
-	S_IFIFO                           = 0x1000
-	S_IFLNK                           = 0xa000
-	S_IFMT                            = 0xf000
-	S_IFREG                           = 0x8000
-	S_IFSOCK                          = 0xc000
-	S_IFWHT                           = 0xe000
-	S_IREAD                           = 0x100
-	S_IRGRP                           = 0x20
-	S_IROTH                           = 0x4
-	S_IRUSR                           = 0x100
-	S_IRWXG                           = 0x38
-	S_IRWXO                           = 0x7
-	S_IRWXU                           = 0x1c0
-	S_ISGID                           = 0x400
-	S_ISTXT                           = 0x200
-	S_ISUID                           = 0x800
-	S_ISVTX                           = 0x200
-	S_IWGRP                           = 0x10
-	S_IWOTH                           = 0x2
-	S_IWRITE                          = 0x80
-	S_IWUSR                           = 0x80
-	S_IXGRP                           = 0x8
-	S_IXOTH                           = 0x1
-	S_IXUSR                           = 0x40
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CONNECTIONTIMEOUT             = 0x20
-	TCP_ENABLE_ECN                    = 0x104
-	TCP_KEEPALIVE                     = 0x10
-	TCP_KEEPCNT                       = 0x102
-	TCP_KEEPINTVL                     = 0x101
-	TCP_MAXHLEN                       = 0x3c
-	TCP_MAXOLEN                       = 0x28
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x4
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x200
-	TCP_NODELAY                       = 0x1
-	TCP_NOOPT                         = 0x8
-	TCP_NOPUSH                        = 0x4
-	TCP_NOTSENT_LOWAT                 = 0x201
-	TCP_RXT_CONNDROPTIME              = 0x80
-	TCP_RXT_FINDROP                   = 0x100
-	TCP_SENDMOREACKS                  = 0x103
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDCDTIMESTAMP                  = 0x40107458
-	TIOCDRAIN                         = 0x2000745e
-	TIOCDSIMICROCODE                  = 0x20007455
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLUSH                         = 0x80047410
-	TIOCGDRAINWAIT                    = 0x40047456
-	TIOCGETA                          = 0x40487413
-	TIOCGETD                          = 0x4004741a
-	TIOCGPGRP                         = 0x40047477
-	TIOCGWINSZ                        = 0x40087468
-	TIOCIXOFF                         = 0x20007480
-	TIOCIXON                          = 0x20007481
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGDTRWAIT                     = 0x4004745a
-	TIOCMGET                          = 0x4004746a
-	TIOCMODG                          = 0x40047403
-	TIOCMODS                          = 0x80047404
-	TIOCMSDTRWAIT                     = 0x8004745b
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTYGNAME                      = 0x40807453
-	TIOCPTYGRANT                      = 0x20007454
-	TIOCPTYUNLK                       = 0x20007452
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCONS                         = 0x20007463
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDRAINWAIT                    = 0x80047457
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x80487414
-	TIOCSETAF                         = 0x80487416
-	TIOCSETAW                         = 0x80487415
-	TIOCSETD                          = 0x8004741b
-	TIOCSIG                           = 0x2000745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x20007465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCTIMESTAMP                     = 0x40107459
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VT0                               = 0x0
-	VT1                               = 0x10000
-	VTDLY                             = 0x10000
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WCONTINUED                        = 0x10
-	WCOREFLAG                         = 0x80
-	WEXITED                           = 0x4
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x20
-	WORDSIZE                          = 0x40
-	WSTOPPED                          = 0x8
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADARCH        = syscall.Errno(0x56)
-	EBADEXEC        = syscall.Errno(0x55)
-	EBADF           = syscall.Errno(0x9)
-	EBADMACHO       = syscall.Errno(0x58)
-	EBADMSG         = syscall.Errno(0x5e)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x59)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDEVERR         = syscall.Errno(0x53)
-	EDOM            = syscall.Errno(0x21)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x5a)
-	EILSEQ          = syscall.Errno(0x5c)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x6a)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5f)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x5d)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODATA         = syscall.Errno(0x60)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x61)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x5b)
-	ENOPOLICY       = syscall.Errno(0x67)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x62)
-	ENOSTR          = syscall.Errno(0x63)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTRECOVERABLE = syscall.Errno(0x68)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x2d)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x66)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EOWNERDEAD      = syscall.Errno(0x69)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x64)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	EPWROFF         = syscall.Errno(0x52)
-	EQFULL          = syscall.Errno(0x6a)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHLIBVERS      = syscall.Errno(0x57)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIME           = syscall.Errno(0x65)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "device not configured",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource deadlock avoided",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "resource busy",
-	17:  "file exists",
-	18:  "cross-device link",
-	19:  "operation not supported by device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "result too large",
-	35:  "resource temporarily unavailable",
-	36:  "operation now in progress",
-	37:  "operation already in progress",
-	38:  "socket operation on non-socket",
-	39:  "destination address required",
-	40:  "message too long",
-	41:  "protocol wrong type for socket",
-	42:  "protocol not available",
-	43:  "protocol not supported",
-	44:  "socket type not supported",
-	45:  "operation not supported",
-	46:  "protocol family not supported",
-	47:  "address family not supported by protocol family",
-	48:  "address already in use",
-	49:  "can't assign requested address",
-	50:  "network is down",
-	51:  "network is unreachable",
-	52:  "network dropped connection on reset",
-	53:  "software caused connection abort",
-	54:  "connection reset by peer",
-	55:  "no buffer space available",
-	56:  "socket is already connected",
-	57:  "socket is not connected",
-	58:  "can't send after socket shutdown",
-	59:  "too many references: can't splice",
-	60:  "operation timed out",
-	61:  "connection refused",
-	62:  "too many levels of symbolic links",
-	63:  "file name too long",
-	64:  "host is down",
-	65:  "no route to host",
-	66:  "directory not empty",
-	67:  "too many processes",
-	68:  "too many users",
-	69:  "disc quota exceeded",
-	70:  "stale NFS file handle",
-	71:  "too many levels of remote in path",
-	72:  "RPC struct is bad",
-	73:  "RPC version wrong",
-	74:  "RPC prog. not avail",
-	75:  "program version wrong",
-	76:  "bad procedure for program",
-	77:  "no locks available",
-	78:  "function not implemented",
-	79:  "inappropriate file type or format",
-	80:  "authentication error",
-	81:  "need authenticator",
-	82:  "device power is off",
-	83:  "device error",
-	84:  "value too large to be stored in data type",
-	85:  "bad executable (or shared library)",
-	86:  "bad CPU type in executable",
-	87:  "shared library version mismatch",
-	88:  "malformed Mach-o file",
-	89:  "operation canceled",
-	90:  "identifier removed",
-	91:  "no message of desired type",
-	92:  "illegal byte sequence",
-	93:  "attribute not found",
-	94:  "bad message",
-	95:  "EMULTIHOP (Reserved)",
-	96:  "no message available on STREAM",
-	97:  "ENOLINK (Reserved)",
-	98:  "no STREAM resources",
-	99:  "not a STREAM",
-	100: "protocol error",
-	101: "STREAM ioctl timeout",
-	102: "operation not supported on socket",
-	103: "policy not found",
-	104: "state not recoverable",
-	105: "previous owner died",
-	106: "interface output queue is full",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "suspended (signal)",
-	18: "suspended",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-}


[02/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
deleted file mode 100644
index 8c86bd7..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ /dev/null
@@ -1,1814 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_mips64x.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build mips64le,linux
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(arg)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(source)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	var _p2 *byte
-	_p2, err = BytePtrFromString(fstype)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	use(unsafe.Pointer(_p2))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
-	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
-	state = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
-	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
-	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
-	tid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(dest) > 0 {
-		_p2 = unsafe.Pointer(&dest[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(pathname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
-	use(unsafe.Pointer(_p0))
-	watchdesc = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
-	success = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(dest) > 0 {
-		_p1 = unsafe.Pointer(&dest[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
-	use(unsafe.Pointer(_p0))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(newroot)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(putold)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
-	_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(data) > 0 {
-		_p2 = unsafe.Pointer(&data[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
-	Syscall(SYS_SYNC, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
-	ticks = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
-	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
-	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
-	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
-	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(events) > 0 {
-		_p0 = unsafe.Pointer(&events[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	euid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
-	_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	off = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
-	written = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
-	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	nn = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstat(fd int, st *stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func lstat(path string, st *stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func stat(path string, st *stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}



[04/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
deleted file mode 100644
index 0d584cc..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ /dev/null
@@ -1,1745 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_arm64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm64,linux
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(arg)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(source)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	var _p2 *byte
-	_p2, err = BytePtrFromString(fstype)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	use(unsafe.Pointer(_p2))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
-	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
-	state = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
-	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
-	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
-	tid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(dest) > 0 {
-		_p2 = unsafe.Pointer(&dest[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(pathname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
-	use(unsafe.Pointer(_p0))
-	watchdesc = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
-	success = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(dest) > 0 {
-		_p1 = unsafe.Pointer(&dest[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
-	use(unsafe.Pointer(_p0))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(newroot)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(putold)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
-	_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(data) > 0 {
-		_p2 = unsafe.Pointer(&data[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
-	Syscall(SYS_SYNC, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
-	ticks = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
-	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
-	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
-	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
-	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(events) > 0 {
-		_p0 = unsafe.Pointer(&events[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	euid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	off = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
-	written = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
-	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	nn = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}



[38/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_freebsd.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/newt/vendor/golang.org/x/sys/unix/syscall_freebsd.go
deleted file mode 100644
index 520ccbe..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ /dev/null
@@ -1,683 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// FreeBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import "unsafe"
-
-type SockaddrDatalink struct {
-	Len    uint8
-	Family uint8
-	Index  uint16
-	Type   uint8
-	Nlen   uint8
-	Alen   uint8
-	Slen   uint8
-	Data   [46]int8
-	raw    RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
-	const siz = unsafe.Sizeof(mib[0])
-
-	// NOTE(rsc): It seems strange to set the buffer to have
-	// size CTL_MAXNAME+2 but use only CTL_MAXNAME
-	// as the size.  I don't know why the +2 is here, but the
-	// kernel uses +2 for its own implementation of this function.
-	// I am scared that if we don't include the +2 here, the kernel
-	// will silently write 2 words farther than we specify
-	// and we'll get memory corruption.
-	var buf [CTL_MAXNAME + 2]_C_int
-	n := uintptr(CTL_MAXNAME) * siz
-
-	p := (*byte)(unsafe.Pointer(&buf[0]))
-	bytes, err := ByteSliceFromString(name)
-	if err != nil {
-		return nil, err
-	}
-
-	// Magic sysctl: "setting" 0.3 to a string name
-	// lets you read back the array of integers form.
-	if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
-		return nil, err
-	}
-	return buf[0 : n/siz], nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names.  It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
-	origlen := len(buf)
-	for max != 0 && len(buf) > 0 {
-		dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
-		if dirent.Reclen == 0 {
-			buf = nil
-			break
-		}
-		buf = buf[dirent.Reclen:]
-		if dirent.Fileno == 0 { // File absent in directory.
-			continue
-		}
-		bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
-		var name = string(bytes[0:dirent.Namlen])
-		if name == "." || name == ".." { // Useless names
-			continue
-		}
-		max--
-		count++
-		names = append(names, name)
-	}
-	return origlen - len(buf), count, names
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	p[0], p[1], err = pipe()
-	return
-}
-
-func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
-	var value IPMreqn
-	vallen := _Socklen(SizeofIPMreqn)
-	errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, errno
-}
-
-func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
-	return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
-}
-
-func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
-	var rsa RawSockaddrAny
-	var len _Socklen = SizeofSockaddrAny
-	nfd, err = accept4(fd, &rsa, &len, flags)
-	if err != nil {
-		return
-	}
-	if len > SizeofSockaddrAny {
-		panic("RawSockaddrAny too small")
-	}
-	sa, err = anyToSockaddr(&rsa)
-	if err != nil {
-		Close(nfd)
-		nfd = 0
-	}
-	return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	var bufsize uintptr
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-		bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
-	}
-	r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-// Derive extattr namespace and attribute name
-
-func xattrnamespace(fullattr string) (ns int, attr string, err error) {
-	s := -1
-	for idx, val := range fullattr {
-		if val == '.' {
-			s = idx
-			break
-		}
-	}
-
-	if s == -1 {
-		return -1, "", ENOATTR
-	}
-
-	namespace := fullattr[0:s]
-	attr = fullattr[s+1:]
-
-	switch namespace {
-	case "user":
-		return EXTATTR_NAMESPACE_USER, attr, nil
-	case "system":
-		return EXTATTR_NAMESPACE_SYSTEM, attr, nil
-	default:
-		return -1, "", ENOATTR
-	}
-}
-
-func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
-	if len(dest) > idx {
-		return unsafe.Pointer(&dest[idx])
-	} else {
-		return unsafe.Pointer(_zero)
-	}
-}
-
-// FreeBSD implements its own syscalls to handle extended attributes
-
-func Getxattr(file string, attr string, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsize := len(dest)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return -1, err
-	}
-
-	return ExtattrGetFile(file, nsid, a, uintptr(d), destsize)
-}
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsize := len(dest)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return -1, err
-	}
-
-	return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize)
-}
-
-func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsize := len(dest)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return -1, err
-	}
-
-	return ExtattrGetLink(link, nsid, a, uintptr(d), destsize)
-}
-
-// flags are unused on FreeBSD
-
-func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
-	d := unsafe.Pointer(&data[0])
-	datasiz := len(data)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	_, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz)
-	return
-}
-
-func Setxattr(file string, attr string, data []byte, flags int) (err error) {
-	d := unsafe.Pointer(&data[0])
-	datasiz := len(data)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	_, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz)
-	return
-}
-
-func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
-	d := unsafe.Pointer(&data[0])
-	datasiz := len(data)
-
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	_, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz)
-	return
-}
-
-func Removexattr(file string, attr string) (err error) {
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	err = ExtattrDeleteFile(file, nsid, a)
-	return
-}
-
-func Fremovexattr(fd int, attr string) (err error) {
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	err = ExtattrDeleteFd(fd, nsid, a)
-	return
-}
-
-func Lremovexattr(link string, attr string) (err error) {
-	nsid, a, err := xattrnamespace(attr)
-	if err != nil {
-		return
-	}
-
-	err = ExtattrDeleteLink(link, nsid, a)
-	return
-}
-
-func Listxattr(file string, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsiz := len(dest)
-
-	// FreeBSD won't allow you to list xattrs from multiple namespaces
-	s := 0
-	var e error
-	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
-		stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
-
-		/* Errors accessing system attrs are ignored so that
-		 * we can implement the Linux-like behavior of omitting errors that
-		 * we don't have read permissions on
-		 *
-		 * Linux will still error if we ask for user attributes on a file that
-		 * we don't have read permissions on, so don't ignore those errors
-		 */
-		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
-			e = nil
-			continue
-		} else if e != nil {
-			return s, e
-		}
-
-		s += stmp
-		destsiz -= s
-		if destsiz < 0 {
-			destsiz = 0
-		}
-		d = initxattrdest(dest, s)
-	}
-
-	return s, e
-}
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsiz := len(dest)
-
-	s := 0
-	var e error
-	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
-		stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
-		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
-			e = nil
-			continue
-		} else if e != nil {
-			return s, e
-		}
-
-		s += stmp
-		destsiz -= s
-		if destsiz < 0 {
-			destsiz = 0
-		}
-		d = initxattrdest(dest, s)
-	}
-
-	return s, e
-}
-
-func Llistxattr(link string, dest []byte) (sz int, err error) {
-	d := initxattrdest(dest, 0)
-	destsiz := len(dest)
-
-	s := 0
-	var e error
-	for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
-		stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
-		if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
-			e = nil
-			continue
-		} else if e != nil {
-			return s, e
-		}
-
-		s += stmp
-		destsiz -= s
-		if destsiz < 0 {
-			destsiz = 0
-		}
-		d = initxattrdest(dest, s)
-	}
-
-	return s, e
-}
-
-/*
- * Exposed directly
- */
-//sys	Access(path string, mode uint32) (err error)
-//sys	Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys	Chdir(path string) (err error)
-//sys	Chflags(path string, flags int) (err error)
-//sys	Chmod(path string, mode uint32) (err error)
-//sys	Chown(path string, uid int, gid int) (err error)
-//sys	Chroot(path string) (err error)
-//sys	Close(fd int) (err error)
-//sys	Dup(fd int) (nfd int, err error)
-//sys	Dup2(from int, to int) (err error)
-//sys	Exit(code int)
-//sys	ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys	ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys	ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error)
-//sys	ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys	ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys	ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys	ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error)
-//sys	ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys	ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys	ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys	ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)
-//sys	ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE
-//sys	Fchdir(fd int) (err error)
-//sys	Fchflags(fd int, flags int) (err error)
-//sys	Fchmod(fd int, mode uint32) (err error)
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Flock(fd int, how int) (err error)
-//sys	Fpathconf(fd int, name int) (val int, err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys	Fsync(fd int) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sys	Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys	Getdtablesize() (size int)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (uid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getpgid(pid int) (pgid int, err error)
-//sysnb	Getpgrp() (pgrp int)
-//sysnb	Getpid() (pid int)
-//sysnb	Getppid() (ppid int)
-//sys	Getpriority(which int, who int) (prio int, err error)
-//sysnb	Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Getrusage(who int, rusage *Rusage) (err error)
-//sysnb	Getsid(pid int) (sid int, err error)
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-//sysnb	Getuid() (uid int)
-//sys	Issetugid() (tainted bool)
-//sys	Kill(pid int, signum syscall.Signal) (err error)
-//sys	Kqueue() (fd int, err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Link(path string, link string) (err error)
-//sys	Listen(s int, backlog int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error)
-//sys	Mkdir(path string, mode uint32) (err error)
-//sys	Mkfifo(path string, mode uint32) (err error)
-//sys	Mknod(path string, mode uint32, dev int) (err error)
-//sys	Mlock(b []byte) (err error)
-//sys	Mlockall(flags int) (err error)
-//sys	Mprotect(b []byte, prot int) (err error)
-//sys	Munlock(b []byte) (err error)
-//sys	Munlockall() (err error)
-//sys	Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys	Open(path string, mode int, perm uint32) (fd int, err error)
-//sys	Pathconf(path string, name int) (val int, err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys	read(fd int, p []byte) (n int, err error)
-//sys	Readlink(path string, buf []byte) (n int, err error)
-//sys	Rename(from string, to string) (err error)
-//sys	Revoke(path string) (err error)
-//sys	Rmdir(path string) (err error)
-//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb	Setegid(egid int) (err error)
-//sysnb	Seteuid(euid int) (err error)
-//sysnb	Setgid(gid int) (err error)
-//sys	Setlogin(name string) (err error)
-//sysnb	Setpgid(pid int, pgid int) (err error)
-//sys	Setpriority(which int, who int, prio int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Setsid() (pid int, err error)
-//sysnb	Settimeofday(tp *Timeval) (err error)
-//sysnb	Setuid(uid int) (err error)
-//sys	Stat(path string, stat *Stat_t) (err error)
-//sys	Statfs(path string, stat *Statfs_t) (err error)
-//sys	Symlink(path string, link string) (err error)
-//sys	Sync() (err error)
-//sys	Truncate(path string, length int64) (err error)
-//sys	Umask(newmask int) (oldmask int)
-//sys	Undelete(path string) (err error)
-//sys	Unlink(path string) (err error)
-//sys	Unmount(path string, flags int) (err error)
-//sys	write(fd int, p []byte) (n int, err error)
-//sys   mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys   munmap(addr uintptr, length uintptr) (err error)
-//sys	readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys	writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-//sys	accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
deleted file mode 100644
index 6a0cd80..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,freebsd
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int32(nsec / 1e9)
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int32(nsec / 1e9)
-	return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint32(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	var writtenOut uint64 = 0
-	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
-	written = int(writtenOut)
-
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
deleted file mode 100644
index e142540..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,freebsd
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = nsec % 1e9 / 1e3
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint64(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	var writtenOut uint64 = 0
-	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
-
-	written = int(writtenOut)
-
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
deleted file mode 100644
index 5504cb1..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm,freebsd
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = nsec / 1e9
-	return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint32(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	var writtenOut uint64 = 0
-	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
-	written = int(writtenOut)
-
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_linux.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_linux.go b/newt/vendor/golang.org/x/sys/unix/syscall_linux.go
deleted file mode 100644
index 74eae9b..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ /dev/null
@@ -1,1111 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Linux system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and
-// wrap it in our own nicer implementation.
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-/*
- * Wrapped
- */
-
-func Access(path string, mode uint32) (err error) {
-	return Faccessat(AT_FDCWD, path, mode, 0)
-}
-
-func Chmod(path string, mode uint32) (err error) {
-	return Fchmodat(AT_FDCWD, path, mode, 0)
-}
-
-func Chown(path string, uid int, gid int) (err error) {
-	return Fchownat(AT_FDCWD, path, uid, gid, 0)
-}
-
-func Creat(path string, mode uint32) (fd int, err error) {
-	return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
-}
-
-//sys	Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
-
-func Link(oldpath string, newpath string) (err error) {
-	return Linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0)
-}
-
-func Mkdir(path string, mode uint32) (err error) {
-	return Mkdirat(AT_FDCWD, path, mode)
-}
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	return Mknodat(AT_FDCWD, path, mode, dev)
-}
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	return openat(AT_FDCWD, path, mode|O_LARGEFILE, perm)
-}
-
-//sys	openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
-
-func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	return openat(dirfd, path, flags|O_LARGEFILE, mode)
-}
-
-//sys	ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
-
-func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
-	if len(fds) == 0 {
-		return ppoll(nil, 0, timeout, sigmask)
-	}
-	return ppoll(&fds[0], len(fds), timeout, sigmask)
-}
-
-//sys	Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	return Readlinkat(AT_FDCWD, path, buf)
-}
-
-func Rename(oldpath string, newpath string) (err error) {
-	return Renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath)
-}
-
-func Rmdir(path string) error {
-	return Unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
-}
-
-//sys	Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
-
-func Symlink(oldpath string, newpath string) (err error) {
-	return Symlinkat(oldpath, AT_FDCWD, newpath)
-}
-
-func Unlink(path string) error {
-	return Unlinkat(AT_FDCWD, path, 0)
-}
-
-//sys	Unlinkat(dirfd int, path string, flags int) (err error)
-
-//sys	utimes(path string, times *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) error {
-	if tv == nil {
-		err := utimensat(AT_FDCWD, path, nil, 0)
-		if err != ENOSYS {
-			return err
-		}
-		return utimes(path, nil)
-	}
-	if len(tv) != 2 {
-		return EINVAL
-	}
-	var ts [2]Timespec
-	ts[0] = NsecToTimespec(TimevalToNsec(tv[0]))
-	ts[1] = NsecToTimespec(TimevalToNsec(tv[1]))
-	err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
-	if err != ENOSYS {
-		return err
-	}
-	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys	utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
-
-func UtimesNano(path string, ts []Timespec) error {
-	if ts == nil {
-		err := utimensat(AT_FDCWD, path, nil, 0)
-		if err != ENOSYS {
-			return err
-		}
-		return utimes(path, nil)
-	}
-	if len(ts) != 2 {
-		return EINVAL
-	}
-	err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
-	if err != ENOSYS {
-		return err
-	}
-	// If the utimensat syscall isn't available (utimensat was added to Linux
-	// in 2.6.22, Released, 8 July 2007) then fall back to utimes
-	var tv [2]Timeval
-	for i := 0; i < 2; i++ {
-		tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
-	}
-	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
-	if ts == nil {
-		return utimensat(dirfd, path, nil, flags)
-	}
-	if len(ts) != 2 {
-		return EINVAL
-	}
-	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
-}
-
-//sys	futimesat(dirfd int, path *byte, times *[2]Timeval) (err error)
-
-func Futimesat(dirfd int, path string, tv []Timeval) error {
-	pathp, err := BytePtrFromString(path)
-	if err != nil {
-		return err
-	}
-	if tv == nil {
-		return futimesat(dirfd, pathp, nil)
-	}
-	if len(tv) != 2 {
-		return EINVAL
-	}
-	return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func Futimes(fd int, tv []Timeval) (err error) {
-	// Believe it or not, this is the best we can do on Linux
-	// (and is what glibc does).
-	return Utimes("/proc/self/fd/"+itoa(fd), tv)
-}
-
-const ImplementsGetwd = true
-
-//sys	Getcwd(buf []byte) (n int, err error)
-
-func Getwd() (wd string, err error) {
-	var buf [PathMax]byte
-	n, err := Getcwd(buf[0:])
-	if err != nil {
-		return "", err
-	}
-	// Getcwd returns the number of bytes written to buf, including the NUL.
-	if n < 1 || n > len(buf) || buf[n-1] != 0 {
-		return "", EINVAL
-	}
-	return string(buf[0 : n-1]), nil
-}
-
-func Getgroups() (gids []int, err error) {
-	n, err := getgroups(0, nil)
-	if err != nil {
-		return nil, err
-	}
-	if n == 0 {
-		return nil, nil
-	}
-
-	// Sanity check group count.  Max is 1<<16 on Linux.
-	if n < 0 || n > 1<<20 {
-		return nil, EINVAL
-	}
-
-	a := make([]_Gid_t, n)
-	n, err = getgroups(n, &a[0])
-	if err != nil {
-		return nil, err
-	}
-	gids = make([]int, n)
-	for i, v := range a[0:n] {
-		gids[i] = int(v)
-	}
-	return
-}
-
-func Setgroups(gids []int) (err error) {
-	if len(gids) == 0 {
-		return setgroups(0, nil)
-	}
-
-	a := make([]_Gid_t, len(gids))
-	for i, v := range gids {
-		a[i] = _Gid_t(v)
-	}
-	return setgroups(len(a), &a[0])
-}
-
-type WaitStatus uint32
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.  At least that's the idea.
-// There are various irregularities.  For example, the
-// "continued" status is 0xFFFF, distinguishing itself
-// from stopped via the core dump bit.
-
-const (
-	mask    = 0x7F
-	core    = 0x80
-	exited  = 0x00
-	stopped = 0x7F
-	shift   = 8
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited }
-
-func (w WaitStatus) Stopped() bool { return w&0xFF == stopped }
-
-func (w WaitStatus) Continued() bool { return w == 0xFFFF }
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) ExitStatus() int {
-	if !w.Exited() {
-		return -1
-	}
-	return int(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) Signal() syscall.Signal {
-	if !w.Signaled() {
-		return -1
-	}
-	return syscall.Signal(w & mask)
-}
-
-func (w WaitStatus) StopSignal() syscall.Signal {
-	if !w.Stopped() {
-		return -1
-	}
-	return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int {
-	if w.StopSignal() != SIGTRAP {
-		return -1
-	}
-	return int(w>>shift) >> 8
-}
-
-//sys	wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
-	var status _C_int
-	wpid, err = wait4(pid, &status, options, rusage)
-	if wstatus != nil {
-		*wstatus = WaitStatus(status)
-	}
-	return
-}
-
-func Mkfifo(path string, mode uint32) (err error) {
-	return Mknod(path, mode|S_IFIFO, 0)
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	if sa.Port < 0 || sa.Port > 0xFFFF {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Family = AF_INET
-	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
-	p[0] = byte(sa.Port >> 8)
-	p[1] = byte(sa.Port)
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
-	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	if sa.Port < 0 || sa.Port > 0xFFFF {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Family = AF_INET6
-	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
-	p[0] = byte(sa.Port >> 8)
-	p[1] = byte(sa.Port)
-	sa.raw.Scope_id = sa.ZoneId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
-	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	name := sa.Name
-	n := len(name)
-	if n >= len(sa.raw.Path) {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Family = AF_UNIX
-	for i := 0; i < n; i++ {
-		sa.raw.Path[i] = int8(name[i])
-	}
-	// length is family (uint16), name, NUL.
-	sl := _Socklen(2)
-	if n > 0 {
-		sl += _Socklen(n) + 1
-	}
-	if sa.raw.Path[0] == '@' {
-		sa.raw.Path[0] = 0
-		// Don't count trailing NUL for abstract address.
-		sl--
-	}
-
-	return unsafe.Pointer(&sa.raw), sl, nil
-}
-
-type SockaddrLinklayer struct {
-	Protocol uint16
-	Ifindex  int
-	Hatype   uint16
-	Pkttype  uint8
-	Halen    uint8
-	Addr     [8]byte
-	raw      RawSockaddrLinklayer
-}
-
-func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Family = AF_PACKET
-	sa.raw.Protocol = sa.Protocol
-	sa.raw.Ifindex = int32(sa.Ifindex)
-	sa.raw.Hatype = sa.Hatype
-	sa.raw.Pkttype = sa.Pkttype
-	sa.raw.Halen = sa.Halen
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
-	return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
-}
-
-type SockaddrNetlink struct {
-	Family uint16
-	Pad    uint16
-	Pid    uint32
-	Groups uint32
-	raw    RawSockaddrNetlink
-}
-
-func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	sa.raw.Family = AF_NETLINK
-	sa.raw.Pad = sa.Pad
-	sa.raw.Pid = sa.Pid
-	sa.raw.Groups = sa.Groups
-	return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil
-}
-
-type SockaddrHCI struct {
-	Dev     uint16
-	Channel uint16
-	raw     RawSockaddrHCI
-}
-
-func (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	sa.raw.Family = AF_BLUETOOTH
-	sa.raw.Dev = sa.Dev
-	sa.raw.Channel = sa.Channel
-	return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
-	switch rsa.Addr.Family {
-	case AF_NETLINK:
-		pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa))
-		sa := new(SockaddrNetlink)
-		sa.Family = pp.Family
-		sa.Pad = pp.Pad
-		sa.Pid = pp.Pid
-		sa.Groups = pp.Groups
-		return sa, nil
-
-	case AF_PACKET:
-		pp := (*RawSockaddrLinklayer)(unsafe.Pointer(rsa))
-		sa := new(SockaddrLinklayer)
-		sa.Protocol = pp.Protocol
-		sa.Ifindex = int(pp.Ifindex)
-		sa.Hatype = pp.Hatype
-		sa.Pkttype = pp.Pkttype
-		sa.Halen = pp.Halen
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
-		return sa, nil
-
-	case AF_UNIX:
-		pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
-		sa := new(SockaddrUnix)
-		if pp.Path[0] == 0 {
-			// "Abstract" Unix domain socket.
-			// Rewrite leading NUL as @ for textual display.
-			// (This is the standard convention.)
-			// Not friendly to overwrite in place,
-			// but the callers below don't care.
-			pp.Path[0] = '@'
-		}
-
-		// Assume path ends at NUL.
-		// This is not technically the Linux semantics for
-		// abstract Unix domain sockets--they are supposed
-		// to be uninterpreted fixed-size binary blobs--but
-		// everyone uses this convention.
-		n := 0
-		for n < len(pp.Path) && pp.Path[n] != 0 {
-			n++
-		}
-		bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
-		sa.Name = string(bytes)
-		return sa, nil
-
-	case AF_INET:
-		pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
-		sa := new(SockaddrInet4)
-		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
-		sa.Port = int(p[0])<<8 + int(p[1])
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
-		return sa, nil
-
-	case AF_INET6:
-		pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
-		sa := new(SockaddrInet6)
-		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
-		sa.Port = int(p[0])<<8 + int(p[1])
-		sa.ZoneId = pp.Scope_id
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
-		return sa, nil
-	}
-	return nil, EAFNOSUPPORT
-}
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
-	var rsa RawSockaddrAny
-	var len _Socklen = SizeofSockaddrAny
-	nfd, err = accept(fd, &rsa, &len)
-	if err != nil {
-		return
-	}
-	sa, err = anyToSockaddr(&rsa)
-	if err != nil {
-		Close(nfd)
-		nfd = 0
-	}
-	return
-}
-
-func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
-	var rsa RawSockaddrAny
-	var len _Socklen = SizeofSockaddrAny
-	nfd, err = accept4(fd, &rsa, &len, flags)
-	if err != nil {
-		return
-	}
-	if len > SizeofSockaddrAny {
-		panic("RawSockaddrAny too small")
-	}
-	sa, err = anyToSockaddr(&rsa)
-	if err != nil {
-		Close(nfd)
-		nfd = 0
-	}
-	return
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
-	var rsa RawSockaddrAny
-	var len _Socklen = SizeofSockaddrAny
-	if err = getsockname(fd, &rsa, &len); err != nil {
-		return
-	}
-	return anyToSockaddr(&rsa)
-}
-
-func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
-	vallen := _Socklen(4)
-	err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
-	return value, err
-}
-
-func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
-	var value IPMreq
-	vallen := _Socklen(SizeofIPMreq)
-	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, err
-}
-
-func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
-	var value IPMreqn
-	vallen := _Socklen(SizeofIPMreqn)
-	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, err
-}
-
-func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
-	var value IPv6Mreq
-	vallen := _Socklen(SizeofIPv6Mreq)
-	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, err
-}
-
-func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
-	var value IPv6MTUInfo
-	vallen := _Socklen(SizeofIPv6MTUInfo)
-	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, err
-}
-
-func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
-	var value ICMPv6Filter
-	vallen := _Socklen(SizeofICMPv6Filter)
-	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, err
-}
-
-func GetsockoptUcred(fd, level, opt int) (*Ucred, error) {
-	var value Ucred
-	vallen := _Socklen(SizeofUcred)
-	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, err
-}
-
-func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
-	return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
-}
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
-	var msg Msghdr
-	var rsa RawSockaddrAny
-	msg.Name = (*byte)(unsafe.Pointer(&rsa))
-	msg.Namelen = uint32(SizeofSockaddrAny)
-	var iov Iovec
-	if len(p) > 0 {
-		iov.Base = (*byte)(unsafe.Pointer(&p[0]))
-		iov.SetLen(len(p))
-	}
-	var dummy byte
-	if len(oob) > 0 {
-		// receive at least one normal byte
-		if len(p) == 0 {
-			iov.Base = &dummy
-			iov.SetLen(1)
-		}
-		msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
-		msg.SetControllen(len(oob))
-	}
-	msg.Iov = &iov
-	msg.Iovlen = 1
-	if n, err = recvmsg(fd, &msg, flags); err != nil {
-		return
-	}
-	oobn = int(msg.Controllen)
-	recvflags = int(msg.Flags)
-	// source address is only specified if the socket is unconnected
-	if rsa.Addr.Family != AF_UNSPEC {
-		from, err = anyToSockaddr(&rsa)
-	}
-	return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
-	_, err = SendmsgN(fd, p, oob, to, flags)
-	return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
-	var ptr unsafe.Pointer
-	var salen _Socklen
-	if to != nil {
-		var err error
-		ptr, salen, err = to.sockaddr()
-		if err != nil {
-			return 0, err
-		}
-	}
-	var msg Msghdr
-	msg.Name = (*byte)(unsafe.Pointer(ptr))
-	msg.Namelen = uint32(salen)
-	var iov Iovec
-	if len(p) > 0 {
-		iov.Base = (*byte)(unsafe.Pointer(&p[0]))
-		iov.SetLen(len(p))
-	}
-	var dummy byte
-	if len(oob) > 0 {
-		// send at least one normal byte
-		if len(p) == 0 {
-			iov.Base = &dummy
-			iov.SetLen(1)
-		}
-		msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
-		msg.SetControllen(len(oob))
-	}
-	msg.Iov = &iov
-	msg.Iovlen = 1
-	if n, err = sendmsg(fd, &msg, flags); err != nil {
-		return 0, err
-	}
-	if len(oob) > 0 && len(p) == 0 {
-		n = 0
-	}
-	return n, nil
-}
-
-// BindToDevice binds the socket associated with fd to device.
-func BindToDevice(fd int, device string) (err error) {
-	return SetsockoptString(fd, SOL_SOCKET, SO_BINDTODEVICE, device)
-}
-
-//sys	ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-
-func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) {
-	// The peek requests are machine-size oriented, so we wrap it
-	// to retrieve arbitrary-length data.
-
-	// The ptrace syscall differs from glibc's ptrace.
-	// Peeks returns the word in *data, not as the return value.
-
-	var buf [sizeofPtr]byte
-
-	// Leading edge.  PEEKTEXT/PEEKDATA don't require aligned
-	// access (PEEKUSER warns that it might), but if we don't
-	// align our reads, we might straddle an unmapped page
-	// boundary and not get the bytes leading up to the page
-	// boundary.
-	n := 0
-	if addr%sizeofPtr != 0 {
-		err = ptrace(req, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
-		if err != nil {
-			return 0, err
-		}
-		n += copy(out, buf[addr%sizeofPtr:])
-		out = out[n:]
-	}
-
-	// Remainder.
-	for len(out) > 0 {
-		// We use an internal buffer to guarantee alignment.
-		// It's not documented if this is necessary, but we're paranoid.
-		err = ptrace(req, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
-		if err != nil {
-			return n, err
-		}
-		copied := copy(out, buf[0:])
-		n += copied
-		out = out[copied:]
-	}
-
-	return n, nil
-}
-
-func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) {
-	return ptracePeek(PTRACE_PEEKTEXT, pid, addr, out)
-}
-
-func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
-	return ptracePeek(PTRACE_PEEKDATA, pid, addr, out)
-}
-
-func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) {
-	// As for ptracePeek, we need to align our accesses to deal
-	// with the possibility of straddling an invalid page.
-
-	// Leading edge.
-	n := 0
-	if addr%sizeofPtr != 0 {
-		var buf [sizeofPtr]byte
-		err = ptrace(peekReq, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
-		if err != nil {
-			return 0, err
-		}
-		n += copy(buf[addr%sizeofPtr:], data)
-		word := *((*uintptr)(unsafe.Pointer(&buf[0])))
-		err = ptrace(pokeReq, pid, addr-addr%sizeofPtr, word)
-		if err != nil {
-			return 0, err
-		}
-		data = data[n:]
-	}
-
-	// Interior.
-	for len(data) > sizeofPtr {
-		word := *((*uintptr)(unsafe.Pointer(&data[0])))
-		err = ptrace(pokeReq, pid, addr+uintptr(n), word)
-		if err != nil {
-			return n, err
-		}
-		n += sizeofPtr
-		data = data[sizeofPtr:]
-	}
-
-	// Trailing edge.
-	if len(data) > 0 {
-		var buf [sizeofPtr]byte
-		err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
-		if err != nil {
-			return n, err
-		}
-		copy(buf[0:], data)
-		word := *((*uintptr)(unsafe.Pointer(&buf[0])))
-		err = ptrace(pokeReq, pid, addr+uintptr(n), word)
-		if err != nil {
-			return n, err
-		}
-		n += len(data)
-	}
-
-	return n, nil
-}
-
-func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
-	return ptracePoke(PTRACE_POKETEXT, PTRACE_PEEKTEXT, pid, addr, data)
-}
-
-func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {
-	return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data)
-}
-
-func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
-	return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
-}
-
-func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
-	return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
-}
-
-func PtraceSetOptions(pid int, options int) (err error) {
-	return ptrace(PTRACE_SETOPTIONS, pid, 0, uintptr(options))
-}
-
-func PtraceGetEventMsg(pid int) (msg uint, err error) {
-	var data _C_long
-	err = ptrace(PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data)))
-	msg = uint(data)
-	return
-}
-
-func PtraceCont(pid int, signal int) (err error) {
-	return ptrace(PTRACE_CONT, pid, 0, uintptr(signal))
-}
-
-func PtraceSyscall(pid int, signal int) (err error) {
-	return ptrace(PTRACE_SYSCALL, pid, 0, uintptr(signal))
-}
-
-func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) }
-
-func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) }
-
-func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) }
-
-//sys	reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error)
-
-func Reboot(cmd int) (err error) {
-	return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "")
-}
-
-func clen(n []byte) int {
-	for i := 0; i < len(n); i++ {
-		if n[i] == 0 {
-			return i
-		}
-	}
-	return len(n)
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
-	return Getdents(fd, buf)
-}
-
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
-	origlen := len(buf)
-	count = 0
-	for max != 0 && len(buf) > 0 {
-		dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
-		buf = buf[dirent.Reclen:]
-		if dirent.Ino == 0 { // File absent in directory.
-			continue
-		}
-		bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
-		var name = string(bytes[0:clen(bytes[:])])
-		if name == "." || name == ".." { // Useless names
-			continue
-		}
-		max--
-		count++
-		names = append(names, name)
-	}
-	return origlen - len(buf), count, names
-}
-
-//sys	mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
-
-func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {
-	// Certain file systems get rather angry and EINVAL if you give
-	// them an empty string of data, rather than NULL.
-	if data == "" {
-		return mount(source, target, fstype, flags, nil)
-	}
-	datap, err := BytePtrFromString(data)
-	if err != nil {
-		return err
-	}
-	return mount(source, target, fstype, flags, datap)
-}
-
-// Sendto
-// Recvfrom
-// Socketpair
-
-/*
- * Direct access
- */
-//sys	Acct(path string) (err error)
-//sys	Adjtimex(buf *Timex) (state int, err error)
-//sys	Chdir(path string) (err error)
-//sys	Chroot(path string) (err error)
-//sys	ClockGettime(clockid int32, time *Timespec) (err error)
-//sys	Close(fd int) (err error)
-//sys	Dup(oldfd int) (fd int, err error)
-//sys	Dup3(oldfd int, newfd int, flags int) (err error)
-//sysnb	EpollCreate(size int) (fd int, err error)
-//sysnb	EpollCreate1(flag int) (fd int, err error)
-//sysnb	EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
-//sys	Exit(code int) = SYS_EXIT_GROUP
-//sys	Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys	Fallocate(fd int, mode uint32, off int64, len int64) (err error)
-//sys	Fchdir(fd int) (err error)
-//sys	Fchmod(fd int, mode uint32) (err error)
-//sys	Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys	Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
-//sys	fcntl(fd int, cmd int, arg int) (val int, err error)
-//sys	Fdatasync(fd int) (err error)
-//sys	Flock(fd int, how int) (err error)
-//sys	Fsync(fd int) (err error)
-//sys	Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
-//sysnb	Getpgid(pid int) (pgid int, err error)
-
-func Getpgrp() (pid int) {
-	pid, _ = Getpgid(0)
-	return
-}
-
-//sysnb	Getpid() (pid int)
-//sysnb	Getppid() (ppid int)
-//sys	Getpriority(which int, who int) (prio int, err error)
-//sysnb	Getrusage(who int, rusage *Rusage) (err error)
-//sysnb	Getsid(pid int) (sid int, err error)
-//sysnb	Gettid() (tid int)
-//sys	Getxattr(path string, attr string, dest []byte) (sz int, err error)
-//sys	InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)
-//sysnb	InotifyInit1(flags int) (fd int, err error)
-//sysnb	InotifyRmWatch(fd int, watchdesc uint32) (success int, err error)
-//sysnb	Kill(pid int, sig syscall.Signal) (err error)
-//sys	Klogctl(typ int, buf []byte) (n int, err error) = SYS_SYSLOG
-//sys	Listxattr(path string, dest []byte) (sz int, err error)
-//sys	Mkdirat(dirfd int, path string, mode uint32) (err error)
-//sys	Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
-//sys	Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys	PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
-//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
-//sys   Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
-//sys	read(fd int, p []byte) (n int, err error)
-//sys	Removexattr(path string, attr string) (err error)
-//sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
-//sys	Setdomainname(p []byte) (err error)
-//sys	Sethostname(p []byte) (err error)
-//sysnb	Setpgid(pid int, pgid int) (err error)
-//sysnb	Setsid() (pid int, err error)
-//sysnb	Settimeofday(tv *Timeval) (err error)
-//sys	Setns(fd int, nstype int) (err error)
-
-// issue 1435.
-// On linux Setuid and Setgid only affects the current thread, not the process.
-// This does not match what most callers expect so we must return an error
-// here rather than letting the caller think that the call succeeded.
-
-func Setuid(uid int) (err error) {
-	return EOPNOTSUPP
-}
-
-func Setgid(uid int) (err error) {
-	return EOPNOTSUPP
-}
-
-//sys	Setpriority(which int, who int, prio int) (err error)
-//sys	Setxattr(path string, attr string, data []byte, flags int) (err error)
-//sys	Sync()
-//sysnb	Sysinfo(info *Sysinfo_t) (err error)
-//sys	Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
-//sysnb	Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
-//sysnb	Times(tms *Tms) (ticks uintptr, err error)
-//sysnb	Umask(mask int) (oldmask int)
-//sysnb	Uname(buf *Utsname) (err error)
-//sys	Unmount(target string, flags int) (err error) = SYS_UMOUNT2
-//sys	Unshare(flags int) (err error)
-//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys	write(fd int, p []byte) (n int, err error)
-//sys	exitThread(code int) (err error) = SYS_EXIT
-//sys	readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
-//sys	writelen(fd int, p *byte, np int) (n int, err error) = SYS_WRITE
-
-// mmap varies by architecture; see syscall_linux_*.go.
-//sys	munmap(addr uintptr, length uintptr) (err error)
-
-var mapper = &mmapper{
-	active: make(map[*byte][]byte),
-	mmap:   mmap,
-	munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
-	return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
-	return mapper.Munmap(b)
-}
-
-//sys	Madvise(b []byte, advice int) (err error)
-//sys	Mprotect(b []byte, prot int) (err error)
-//sys	Mlock(b []byte) (err error)
-//sys	Munlock(b []byte) (err error)
-//sys	Mlockall(flags int) (err error)
-//sys	Munlockall() (err error)
-
-/*
- * Unimplemented
- */
-// AddKey
-// AfsSyscall
-// Alarm
-// ArchPrctl
-// Brk
-// Capget
-// Capset
-// ClockGetres
-// ClockNanosleep
-// ClockSettime
-// Clone
-// CreateModule
-// DeleteModule
-// EpollCtlOld
-// EpollPwait
-// EpollWaitOld
-// Eventfd
-// Execve
-// Fgetxattr
-// Flistxattr
-// Fork
-// Fremovexattr
-// Fsetxattr
-// Futex
-// GetKernelSyms
-// GetMempolicy
-// GetRobustList
-// GetThreadArea
-// Getitimer
-// Getpmsg
-// IoCancel
-// IoDestroy
-// IoGetevents
-// IoSetup
-// IoSubmit
-// Ioctl
-// IoprioGet
-// IoprioSet
-// KexecLoad
-// Keyctl
-// Lgetxattr
-// Llistxattr
-// LookupDcookie
-// Lremovexattr
-// Lsetxattr
-// Mbind
-// MigratePages
-// Mincore
-// ModifyLdt
-// Mount
-// MovePages
-// Mprotect
-// MqGetsetattr
-// MqNotify
-// MqOpen
-// MqTimedreceive
-// MqTimedsend
-// MqUnlink
-// Mremap
-// Msgctl
-// Msgget
-// Msgrcv
-// Msgsnd
-// Msync
-// Newfstatat
-// Nfsservctl
-// Personality
-// Pselect6
-// Ptrace
-// Putpmsg
-// QueryModule
-// Quotactl
-// Readahead
-// Readv
-// RemapFilePages
-// RequestKey
-// RestartSyscall
-// RtSigaction
-// RtSigpending
-// RtSigprocmask
-// RtSigqueueinfo
-// RtSigreturn
-// RtSigsuspend
-// RtSigtimedwait
-// SchedGetPriorityMax
-// SchedGetPriorityMin
-// SchedGetaffinity
-// SchedGetparam
-// SchedGetscheduler
-// SchedRrGetInterval
-// SchedSetaffinity
-// SchedSetparam
-// SchedYield
-// Security
-// Semctl
-// Semget
-// Semop
-// Semtimedop
-// SetMempolicy
-// SetRobustList
-// SetThreadArea
-// SetTidAddress
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Sigaltstack
-// Signalfd
-// Swapoff
-// Swapon
-// Sysfs
-// TimerCreate
-// TimerDelete
-// TimerGetoverrun
-// TimerGettime
-// TimerSettime
-// Timerfd
-// Tkill (obsolete)
-// Tuxcall
-// Umount2
-// Uselib
-// Utimensat
-// Vfork
-// Vhangup
-// Vmsplice
-// Vserver
-// Waitid
-// _Sysctl

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_linux_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/newt/vendor/golang.org/x/sys/unix/syscall_linux_386.go
deleted file mode 100644
index 2b881b9..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ /dev/null
@@ -1,399 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-// +build 386,linux
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int32(nsec / 1e9)
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Sec = int32(nsec / 1e9)
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	return
-}
-
-//sysnb	pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe(&pp)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, flags)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-// 64-bit file system and 32-bit uid calls
-// (386 default is 32-bit file system and 16-bit uid).
-//sys	Dup2(oldfd int, newfd int) (err error)
-//sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
-//sys	Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
-//sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys	Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
-//sysnb	Getegid() (egid int) = SYS_GETEGID32
-//sysnb	Geteuid() (euid int) = SYS_GETEUID32
-//sysnb	Getgid() (gid int) = SYS_GETGID32
-//sysnb	Getuid() (uid int) = SYS_GETUID32
-//sysnb	InotifyInit() (fd int, err error)
-//sys	Ioperm(from int, num int, on int) (err error)
-//sys	Iopl(level int) (err error)
-//sys	Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
-//sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
-//sys	Setfsgid(gid int) (err error) = SYS_SETFSGID32
-//sys	Setfsuid(uid int) (err error) = SYS_SETFSUID32
-//sysnb	Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb	Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
-//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-//sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
-//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
-//sysnb	setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
-//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
-
-//sys	mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys	Pause() (err error)
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	page := uintptr(offset / 4096)
-	if offset != int64(page)*4096 {
-		return 0, EINVAL
-	}
-	return mmap2(addr, length, prot, flags, fd, page)
-}
-
-type rlimit32 struct {
-	Cur uint32
-	Max uint32
-}
-
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
-
-const rlimInf32 = ^uint32(0)
-const rlimInf64 = ^uint64(0)
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
-	err = prlimit(0, resource, nil, rlim)
-	if err != ENOSYS {
-		return err
-	}
-
-	rl := rlimit32{}
-	err = getrlimit(resource, &rl)
-	if err != nil {
-		return
-	}
-
-	if rl.Cur == rlimInf32 {
-		rlim.Cur = rlimInf64
-	} else {
-		rlim.Cur = uint64(rl.Cur)
-	}
-
-	if rl.Max == rlimInf32 {
-		rlim.Max = rlimInf64
-	} else {
-		rlim.Max = uint64(rl.Max)
-	}
-	return
-}
-
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-	err = prlimit(0, resource, rlim, nil)
-	if err != ENOSYS {
-		return err
-	}
-
-	rl := rlimit32{}
-	if rlim.Cur == rlimInf64 {
-		rl.Cur = rlimInf32
-	} else if rlim.Cur < uint64(rlimInf32) {
-		rl.Cur = uint32(rlim.Cur)
-	} else {
-		return EINVAL
-	}
-	if rlim.Max == rlimInf64 {
-		rl.Max = rlimInf32
-	} else if rlim.Max < uint64(rlimInf32) {
-		rl.Max = uint32(rlim.Max)
-	} else {
-		return EINVAL
-	}
-
-	return setrlimit(resource, &rl)
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	newoffset, errno := seek(fd, offset, whence)
-	if errno != 0 {
-		return 0, errno
-	}
-	return newoffset, nil
-}
-
-// Vsyscalls on amd64.
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-//sysnb	Time(t *Time_t) (tt Time_t, err error)
-
-//sys	Utime(path string, buf *Utimbuf) (err error)
-
-// On x86 Linux, all the socket calls go through an extra indirection,
-// I think because the 5-register system call interface can't handle
-// the 6-argument calls like sendto and recvfrom.  Instead the
-// arguments to the underlying system call are the number below
-// and a pointer to an array of uintptr.  We hide the pointer in the
-// socketcall assembly to avoid allocation on every system call.
-
-const (
-	// see linux/net.h
-	_SOCKET      = 1
-	_BIND        = 2
-	_CONNECT     = 3
-	_LISTEN      = 4
-	_ACCEPT      = 5
-	_GETSOCKNAME = 6
-	_GETPEERNAME = 7
-	_SOCKETPAIR  = 8
-	_SEND        = 9
-	_RECV        = 10
-	_SENDTO      = 11
-	_RECVFROM    = 12
-	_SHUTDOWN    = 13
-	_SETSOCKOPT  = 14
-	_GETSOCKOPT  = 15
-	_SENDMSG     = 16
-	_RECVMSG     = 17
-	_ACCEPT4     = 18
-	_RECVMMSG    = 19
-	_SENDMMSG    = 20
-)
-
-func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
-func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
-	fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
-	fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, e := rawsocketcall(_GETSOCKNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, e := rawsocketcall(_GETPEERNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {
-	_, e := rawsocketcall(_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, e := socketcall(_BIND, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
-	_, e := socketcall(_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
-	fd, e := rawsocketcall(_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
-	_, e := socketcall(_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
-	_, e := socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
-	var base uintptr
-	if len(p) > 0 {
-		base = uintptr(unsafe.Pointer(&p[0]))
-	}
-	n, e := socketcall(_RECVFROM, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
-	var base uintptr
-	if len(p) > 0 {
-		base = uintptr(unsafe.Pointer(&p[0]))
-	}
-	_, e := socketcall(_SENDTO, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	n, e := socketcall(_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
-	n, e := socketcall(_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func Listen(s int, n int) (err error) {
-	_, e := socketcall(_LISTEN, uintptr(s), uintptr(n), 0, 0, 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func Shutdown(s, how int) (err error) {
-	_, e := socketcall(_SHUTDOWN, uintptr(s), uintptr(how), 0, 0, 0, 0)
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
-	_, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func Statfs(path string, buf *Statfs_t) (err error) {
-	pathp, err := BytePtrFromString(path)
-	if err != nil {
-		return err
-	}
-	_, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func (r *PtraceRegs) PC() uint64 { return uint64(uint32(r.Eip)) }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Eip = int32(pc) }
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-	if len(fds) == 0 {
-		return poll(nil, 0, timeout)
-	}
-	return poll(&fds[0], len(fds), timeout)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/newt/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
deleted file mode 100644
index 18911c2..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,linux
-
-package unix
-
-import "syscall"
-
-//sys	Dup2(oldfd int, newfd int) (err error)
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (euid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Getuid() (uid int)
-//sysnb	InotifyInit() (fd int, err error)
-//sys	Ioperm(from int, num int, on int) (err error)
-//sys	Iopl(level int) (err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Listen(s int, n int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error)
-//sys	Pause() (err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys	Setfsgid(gid int) (err error)
-//sys	Setfsuid(uid int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sys	Shutdown(fd int, how int) (err error)
-//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys	Stat(path string, stat *Stat_t) (err error)
-//sys	Statfs(path string, buf *Statfs_t) (err error)
-//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys	Truncate(path string, length int64) (err error)
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb	setgroups(n int, list *_Gid_t) (err error)
-//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-//go:noescape
-func gettimeofday(tv *Timeval) (err syscall.Errno)
-
-func Gettimeofday(tv *Timeval) (err error) {
-	errno := gettimeofday(tv)
-	if errno != 0 {
-		return errno
-	}
-	return nil
-}
-
-func Getpagesize() int { return 4096 }
-
-func Time(t *Time_t) (tt Time_t, err error) {
-	var tv Timeval
-	errno := gettimeofday(&tv)
-	if errno != 0 {
-		return 0, errno
-	}
-	if t != nil {
-		*t = Time_t(tv.Sec)
-	}
-	return Time_t(tv.Sec), nil
-}
-
-//sys	Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Sec = nsec / 1e9
-	tv.Usec = nsec % 1e9 / 1e3
-	return
-}
-
-//sysnb	pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe(&pp)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, flags)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Rip }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint64(length)
-}
-
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-	if len(fds) == 0 {
-		return poll(nil, 0, timeout)
-	}
-	return poll(&fds[0], len(fds), timeout)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/newt/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
deleted file mode 100644
index 71d8702..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ /dev/null
@@ -1,263 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm,linux
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int32(nsec / 1e9)
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Sec = int32(nsec / 1e9)
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	return
-}
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, 0)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, flags)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	newoffset, errno := seek(fd, offset, whence)
-	if errno != 0 {
-		return 0, errno
-	}
-	return newoffset, nil
-}
-
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
-//sysnb	setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
-//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb	socketpair(domain int, typ int, flags int, fd *[2]int32) (err error)
-//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-// 64-bit file system and 32-bit uid calls
-// (16-bit uid calls are not always supported in newer kernels)
-//sys	Dup2(oldfd int, newfd int) (err error)
-//sys	Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
-//sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sysnb	Getegid() (egid int) = SYS_GETEGID32
-//sysnb	Geteuid() (euid int) = SYS_GETEUID32
-//sysnb	Getgid() (gid int) = SYS_GETGID32
-//sysnb	Getuid() (uid int) = SYS_GETUID32
-//sysnb	InotifyInit() (fd int, err error)
-//sys	Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
-//sys	Listen(s int, n int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
-//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
-//sys	Setfsgid(gid int) (err error) = SYS_SETFSGID32
-//sys	Setfsuid(uid int) (err error) = SYS_SETFSUID32
-//sysnb	Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb	Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
-//sys	Shutdown(fd int, how int) (err error)
-//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-//sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-
-// Vsyscalls on amd64.
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys	Pause() (err error)
-
-func Time(t *Time_t) (Time_t, error) {
-	var tv Timeval
-	err := Gettimeofday(&tv)
-	if err != nil {
-		return 0, err
-	}
-	if t != nil {
-		*t = Time_t(tv.Sec)
-	}
-	return Time_t(tv.Sec), nil
-}
-
-func Utime(path string, buf *Utimbuf) error {
-	tv := []Timeval{
-		{Sec: buf.Actime},
-		{Sec: buf.Modtime},
-	}
-	return Utimes(path, tv)
-}
-
-//sys   Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys   Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys	Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
-//sys	Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
-	_, _, e1 := Syscall6(SYS_ARM_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-//sys	mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
-	_, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func Statfs(path string, buf *Statfs_t) (err error) {
-	pathp, err := BytePtrFromString(path)
-	if err != nil {
-		return err
-	}
-	_, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
-	if e != 0 {
-		err = e
-	}
-	return
-}
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	page := uintptr(offset / 4096)
-	if offset != int64(page)*4096 {
-		return 0, EINVAL
-	}
-	return mmap2(addr, length, prot, flags, fd, page)
-}
-
-type rlimit32 struct {
-	Cur uint32
-	Max uint32
-}
-
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
-
-const rlimInf32 = ^uint32(0)
-const rlimInf64 = ^uint64(0)
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
-	err = prlimit(0, resource, nil, rlim)
-	if err != ENOSYS {
-		return err
-	}
-
-	rl := rlimit32{}
-	err = getrlimit(resource, &rl)
-	if err != nil {
-		return
-	}
-
-	if rl.Cur == rlimInf32 {
-		rlim.Cur = rlimInf64
-	} else {
-		rlim.Cur = uint64(rl.Cur)
-	}
-
-	if rl.Max == rlimInf32 {
-		rlim.Max = rlimInf64
-	} else {
-		rlim.Max = uint64(rl.Max)
-	}
-	return
-}
-
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-	err = prlimit(0, resource, rlim, nil)
-	if err != ENOSYS {
-		return err
-	}
-
-	rl := rlimit32{}
-	if rlim.Cur == rlimInf64 {
-		rl.Cur = rlimInf32
-	} else if rlim.Cur < uint64(rlimInf32) {
-		rl.Cur = uint32(rlim.Cur)
-	} else {
-		return EINVAL
-	}
-	if rlim.Max == rlimInf64 {
-		rl.Max = rlimInf32
-	} else if rlim.Max < uint64(rlimInf32) {
-		rl.Max = uint32(rlim.Max)
-	} else {
-		return EINVAL
-	}
-
-	return setrlimit(resource, &rl)
-}
-
-func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-	if len(fds) == 0 {
-		return poll(nil, 0, timeout)
-	}
-	return poll(&fds[0], len(fds), timeout)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/newt/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
deleted file mode 100644
index 4a13639..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm64,linux
-
-package unix
-
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
-//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (euid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Getuid() (uid int)
-//sys	Listen(s int, n int) (err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6
-//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys	Setfsgid(gid int) (err error)
-//sys	Setfsuid(uid int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sys	Shutdown(fd int, how int) (err error)
-//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-
-func Stat(path string, stat *Stat_t) (err error) {
-	return Fstatat(AT_FDCWD, path, stat, 0)
-}
-
-func Lchown(path string, uid int, gid int) (err error) {
-	return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)
-}
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
-}
-
-//sys	Statfs(path string, buf *Statfs_t) (err error)
-//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys	Truncate(path string, length int64) (err error)
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb	setgroups(n int, list *_Gid_t) (err error)
-//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Sec = nsec / 1e9
-	tv.Usec = nsec % 1e9 / 1e3
-	return
-}
-
-func Time(t *Time_t) (Time_t, error) {
-	var tv Timeval
-	err := Gettimeofday(&tv)
-	if err != nil {
-		return 0, err
-	}
-	if t != nil {
-		*t = Time_t(tv.Sec)
-	}
-	return Time_t(tv.Sec), nil
-}
-
-func Utime(path string, buf *Utimbuf) error {
-	tv := []Timeval{
-		{Sec: buf.Actime},
-		{Sec: buf.Modtime},
-	}
-	return Utimes(path, tv)
-}
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, 0)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, flags)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Pc }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint64(length)
-}
-
-func InotifyInit() (fd int, err error) {
-	return InotifyInit1(0)
-}
-
-func Dup2(oldfd int, newfd int) (err error) {
-	return Dup3(oldfd, newfd, 0)
-}
-
-func Pause() (err error) {
-	_, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove
-// these when the deprecated syscalls that the syscall package relies on
-// are removed.
-const (
-	SYS_GETPGRP      = 1060
-	SYS_UTIMES       = 1037
-	SYS_FUTIMESAT    = 1066
-	SYS_PAUSE        = 1061
-	SYS_USTAT        = 1070
-	SYS_UTIME        = 1063
-	SYS_LCHOWN       = 1032
-	SYS_TIME         = 1062
-	SYS_EPOLL_CREATE = 1042
-	SYS_EPOLL_WAIT   = 1069
-)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-	var ts *Timespec
-	if timeout >= 0 {
-		ts = new(Timespec)
-		*ts = NsecToTimespec(int64(timeout) * 1e6)
-	}
-	if len(fds) == 0 {
-		return ppoll(nil, 0, ts, nil)
-	}
-	return ppoll(&fds[0], len(fds), ts, nil)
-}


[39/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl b/newt/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
deleted file mode 100755
index 06bade7..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl
+++ /dev/null
@@ -1,294 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# This program reads a file containing function prototypes
-# (like syscall_solaris.go) and generates system call bodies.
-# The prototypes are marked by lines beginning with "//sys"
-# and read like func declarations if //sys is replaced by func, but:
-#	* The parameter lists must give a name for each argument.
-#	  This includes return parameters.
-#	* The parameter lists must give a type for each argument:
-#	  the (x, y, z int) shorthand is not allowed.
-#	* If the return parameter is an error number, it must be named err.
-#	* If go func name needs to be different than its libc name, 
-#	* or the function is not in libc, name could be specified
-#	* at the end, after "=" sign, like
-#	  //sys getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (err error) = libsocket.getsockopt
-
-use strict;
-
-my $cmdline = "mksyscall_solaris.pl " . join(' ', @ARGV);
-my $errors = 0;
-my $_32bit = "";
-
-binmode STDOUT;
-
-if($ARGV[0] eq "-b32") {
-	$_32bit = "big-endian";
-	shift;
-} elsif($ARGV[0] eq "-l32") {
-	$_32bit = "little-endian";
-	shift;
-}
-
-if($ARGV[0] =~ /^-/) {
-	print STDERR "usage: mksyscall_solaris.pl [-b32 | -l32] [file ...]\n";
-	exit 1;
-}
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
-	print STDERR "GOARCH or GOOS not defined in environment\n";
-	exit 1;
-}
-
-sub parseparamlist($) {
-	my ($list) = @_;
-	$list =~ s/^\s*//;
-	$list =~ s/\s*$//;
-	if($list eq "") {
-		return ();
-	}
-	return split(/\s*,\s*/, $list);
-}
-
-sub parseparam($) {
-	my ($p) = @_;
-	if($p !~ /^(\S*) (\S*)$/) {
-		print STDERR "$ARGV:$.: malformed parameter: $p\n";
-		$errors = 1;
-		return ("xx", "int");
-	}
-	return ($1, $2);
-}
-
-my $package = "";
-my $text = "";
-my $dynimports = "";
-my $linknames = "";
-my @vars = ();
-while(<>) {
-	chomp;
-	s/\s+/ /g;
-	s/^\s+//;
-	s/\s+$//;
-	$package = $1 if !$package && /^package (\S+)$/;
-	my $nonblock = /^\/\/sysnb /;
-	next if !/^\/\/sys / && !$nonblock;
-
-	# Line must be of the form
-	#	func Open(path string, mode int, perm int) (fd int, err error)
-	# Split into name, in params, out params.
-	if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
-		print STDERR "$ARGV:$.: malformed //sys declaration\n";
-		$errors = 1;
-		next;
-	}
-	my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
-
-	# Split argument lists on comma.
-	my @in = parseparamlist($in);
-	my @out = parseparamlist($out);
-
-	# So file name.
-	if($modname eq "") {
-		$modname = "libc";
-	}
-
-	# System call name.
-	if($sysname eq "") {
-		$sysname = "$func";
-	}
-
-	# System call pointer variable name.
-	my $sysvarname = "proc$sysname";
-
-	my $strconvfunc = "BytePtrFromString";
-	my $strconvtype = "*byte";
-
-	$sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
-
-	# Runtime import of function to allow cross-platform builds.
-	$dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n";
-	# Link symbol to proc address variable.
-	$linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n";
-	# Library proc address variable.
-	push @vars, $sysvarname;
-
-	# Go function header.
-	$out = join(', ', @out);
-	if($out ne "") {
-		$out = " ($out)";
-	}
-	if($text ne "") {
-		$text .= "\n"
-	}
-	$text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out;
-
-	# Check if err return available
-	my $errvar = "";
-	foreach my $p (@out) {
-		my ($name, $type) = parseparam($p);
-		if($type eq "error") {
-			$errvar = $name;
-			last;
-		}
-	}
-
-	# Prepare arguments to Syscall.
-	my @args = ();
-	my @uses = ();
-	my $n = 0;
-	foreach my $p (@in) {
-		my ($name, $type) = parseparam($p);
-		if($type =~ /^\*/) {
-			push @args, "uintptr(unsafe.Pointer($name))";
-		} elsif($type eq "string" && $errvar ne "") {
-			$text .= "\tvar _p$n $strconvtype\n";
-			$text .= "\t_p$n, $errvar = $strconvfunc($name)\n";
-			$text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
-			push @args, "uintptr(unsafe.Pointer(_p$n))";
-			push @uses, "use(unsafe.Pointer(_p$n))";
-			$n++;
-		} elsif($type eq "string") {
-			print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
-			$text .= "\tvar _p$n $strconvtype\n";
-			$text .= "\t_p$n, _ = $strconvfunc($name)\n";
-			push @args, "uintptr(unsafe.Pointer(_p$n))";
-			push @uses, "use(unsafe.Pointer(_p$n))";
-			$n++;
-		} elsif($type =~ /^\[\](.*)/) {
-			# Convert slice into pointer, length.
-			# Have to be careful not to take address of &a[0] if len == 0:
-			# pass nil in that case.
-			$text .= "\tvar _p$n *$1\n";
-			$text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
-			push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))";
-			$n++;
-		} elsif($type eq "int64" && $_32bit ne "") {
-			if($_32bit eq "big-endian") {
-				push @args, "uintptr($name >> 32)", "uintptr($name)";
-			} else {
-				push @args, "uintptr($name)", "uintptr($name >> 32)";
-			}
-		} elsif($type eq "bool") {
- 			$text .= "\tvar _p$n uint32\n";
-			$text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
-			push @args, "uintptr(_p$n)";
-			$n++;
-		} else {
-			push @args, "uintptr($name)";
-		}
-	}
-	my $nargs = @args;
-
-	# Determine which form to use; pad args with zeros.
-	my $asm = "sysvicall6";
-	if ($nonblock) {
-		$asm = "rawSysvicall6";
-	}
-	if(@args <= 6) {
-		while(@args < 6) {
-			push @args, "0";
-		}
-	} else {
-		print STDERR "$ARGV:$.: too many arguments to system call\n";
-	}
-
-	# Actual call.
-	my $args = join(', ', @args);
-	my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)";
-
-	# Assign return values.
-	my $body = "";
-	my $failexpr = "";
-	my @ret = ("_", "_", "_");
-	my @pout= ();
-	my $do_errno = 0;
-	for(my $i=0; $i<@out; $i++) {
-		my $p = $out[$i];
-		my ($name, $type) = parseparam($p);
-		my $reg = "";
-		if($name eq "err") {
-			$reg = "e1";
-			$ret[2] = $reg;
-			$do_errno = 1;
-		} else {
-			$reg = sprintf("r%d", $i);
-			$ret[$i] = $reg;
-		}
-		if($type eq "bool") {
-			$reg = "$reg != 0";
-		}
-		if($type eq "int64" && $_32bit ne "") {
-			# 64-bit number in r1:r0 or r0:r1.
-			if($i+2 > @out) {
-				print STDERR "$ARGV:$.: not enough registers for int64 return\n";
-			}
-			if($_32bit eq "big-endian") {
-				$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
-			} else {
-				$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
-			}
-			$ret[$i] = sprintf("r%d", $i);
-			$ret[$i+1] = sprintf("r%d", $i+1);
-		}
-		if($reg ne "e1") {
-			$body .= "\t$name = $type($reg)\n";
-		}
-	}
-	if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
-		$text .= "\t$call\n";
-	} else {
-		$text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
-	}
-	foreach my $use (@uses) {
-		$text .= "\t$use\n";
-	}
-	$text .= $body;
-
-	if ($do_errno) {
-		$text .= "\tif e1 != 0 {\n";
-		$text .= "\t\terr = e1\n";
-		$text .= "\t}\n";
-	}
-	$text .= "\treturn\n";
-	$text .= "}\n";
-}
-
-if($errors) {
-	exit 1;
-}
-
-print <<EOF;
-// $cmdline
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package $package
-
-import (
-	"syscall"
-	"unsafe"
-)
-EOF
-
-print "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
-
-my $vardecls = "\t" . join(",\n\t", @vars);
-$vardecls .= " syscallFunc";
-
-chomp($_=<<EOF);
-
-$dynimports
-$linknames
-var (
-$vardecls
-)
-
-$text
-EOF
-print $_;
-exit 0;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl b/newt/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
deleted file mode 100755
index be67afa..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl
+++ /dev/null
@@ -1,264 +0,0 @@
-#!/usr/bin/env perl
-
-# Copyright 2011 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-#
-# Parse the header files for OpenBSD and generate a Go usable sysctl MIB.
-#
-# Build a MIB with each entry being an array containing the level, type and
-# a hash that will contain additional entries if the current entry is a node.
-# We then walk this MIB and create a flattened sysctl name to OID hash.
-#
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
-	print STDERR "GOARCH or GOOS not defined in environment\n";
-	exit 1;
-}
-
-my $debug = 0;
-my %ctls = ();
-
-my @headers = qw (
-	sys/sysctl.h
-	sys/socket.h
-	sys/tty.h
-	sys/malloc.h
-	sys/mount.h
-	sys/namei.h
-	sys/sem.h
-	sys/shm.h
-	sys/vmmeter.h
-	uvm/uvm_param.h
-	uvm/uvm_swap_encrypt.h
-	ddb/db_var.h
-	net/if.h
-	net/if_pfsync.h
-	net/pipex.h
-	netinet/in.h
-	netinet/icmp_var.h
-	netinet/igmp_var.h
-	netinet/ip_ah.h
-	netinet/ip_carp.h
-	netinet/ip_divert.h
-	netinet/ip_esp.h
-	netinet/ip_ether.h
-	netinet/ip_gre.h
-	netinet/ip_ipcomp.h
-	netinet/ip_ipip.h
-	netinet/pim_var.h
-	netinet/tcp_var.h
-	netinet/udp_var.h
-	netinet6/in6.h
-	netinet6/ip6_divert.h
-	netinet6/pim6_var.h
-	netinet/icmp6.h
-	netmpls/mpls.h
-);
-
-my @ctls = qw (
-	kern
-	vm
-	fs
-	net
-	#debug				# Special handling required
-	hw
-	#machdep			# Arch specific
-	user
-	ddb
-	#vfs				# Special handling required
-	fs.posix
-	kern.forkstat
-	kern.intrcnt
-	kern.malloc
-	kern.nchstats
-	kern.seminfo
-	kern.shminfo
-	kern.timecounter
-	kern.tty
-	kern.watchdog
-	net.bpf
-	net.ifq
-	net.inet
-	net.inet.ah
-	net.inet.carp
-	net.inet.divert
-	net.inet.esp
-	net.inet.etherip
-	net.inet.gre
-	net.inet.icmp
-	net.inet.igmp
-	net.inet.ip
-	net.inet.ip.ifq
-	net.inet.ipcomp
-	net.inet.ipip
-	net.inet.mobileip
-	net.inet.pfsync
-	net.inet.pim
-	net.inet.tcp
-	net.inet.udp
-	net.inet6
-	net.inet6.divert
-	net.inet6.ip6
-	net.inet6.icmp6
-	net.inet6.pim6
-	net.inet6.tcp6
-	net.inet6.udp6
-	net.mpls
-	net.mpls.ifq
-	net.key
-	net.pflow
-	net.pfsync
-	net.pipex
-	net.rt
-	vm.swapencrypt
-	#vfsgenctl			# Special handling required
-);
-
-# Node name "fixups"
-my %ctl_map = (
-	"ipproto" => "net.inet",
-	"net.inet.ipproto" => "net.inet",
-	"net.inet6.ipv6proto" => "net.inet6",
-	"net.inet6.ipv6" => "net.inet6.ip6",
-	"net.inet.icmpv6" => "net.inet6.icmp6",
-	"net.inet6.divert6" => "net.inet6.divert",
-	"net.inet6.tcp6" => "net.inet.tcp",
-	"net.inet6.udp6" => "net.inet.udp",
-	"mpls" => "net.mpls",
-	"swpenc" => "vm.swapencrypt"
-);
-
-# Node mappings
-my %node_map = (
-	"net.inet.ip.ifq" => "net.ifq",
-	"net.inet.pfsync" => "net.pfsync",
-	"net.mpls.ifq" => "net.ifq"
-);
-
-my $ctlname;
-my %mib = ();
-my %sysctl = ();
-my $node;
-
-sub debug() {
-	print STDERR "$_[0]\n" if $debug;
-}
-
-# Walk the MIB and build a sysctl name to OID mapping.
-sub build_sysctl() {
-	my ($node, $name, $oid) = @_;
-	my %node = %{$node};
-	my @oid = @{$oid};
-
-	foreach my $key (sort keys %node) {
-		my @node = @{$node{$key}};
-		my $nodename = $name.($name ne '' ? '.' : '').$key;
-		my @nodeoid = (@oid, $node[0]);
-		if ($node[1] eq 'CTLTYPE_NODE') {
-			if (exists $node_map{$nodename}) {
-				$node = \%mib;
-				$ctlname = $node_map{$nodename};
-				foreach my $part (split /\./, $ctlname) {
-					$node = \%{@{$$node{$part}}[2]};
-				}
-			} else {
-				$node = $node[2];
-			}
-			&build_sysctl($node, $nodename, \@nodeoid);
-		} elsif ($node[1] ne '') {
-			$sysctl{$nodename} = \@nodeoid;
-		}
-	}
-}
-
-foreach my $ctl (@ctls) {
-	$ctls{$ctl} = $ctl;
-}
-
-# Build MIB
-foreach my $header (@headers) {
-	&debug("Processing $header...");
-	open HEADER, "/usr/include/$header" ||
-	    print STDERR "Failed to open $header\n";
-	while (<HEADER>) {
-		if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ ||
-		    $_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ ||
-		    $_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) {
-			if ($1 eq 'CTL_NAMES') {
-				# Top level.
-				$node = \%mib;
-			} else {
-				# Node.
-				my $nodename = lc($2);
-				if ($header =~ /^netinet\//) {
-					$ctlname = "net.inet.$nodename";
-				} elsif ($header =~ /^netinet6\//) {
-					$ctlname = "net.inet6.$nodename";
-				} elsif ($header =~ /^net\//) {
-					$ctlname = "net.$nodename";
-				} else {
-					$ctlname = "$nodename";
-					$ctlname =~ s/^(fs|net|kern)_/$1\./;
-				}
-				if (exists $ctl_map{$ctlname}) {
-					$ctlname = $ctl_map{$ctlname};
-				}
-				if (not exists $ctls{$ctlname}) {
-					&debug("Ignoring $ctlname...");
-					next;
-				}
-
-				# Walk down from the top of the MIB.
-				$node = \%mib;
-				foreach my $part (split /\./, $ctlname) {
-					if (not exists $$node{$part}) {
-						&debug("Missing node $part");
-						$$node{$part} = [ 0, '', {} ];
-					}
-					$node = \%{@{$$node{$part}}[2]};
-				}
-			}
-
-			# Populate current node with entries.
-			my $i = -1;
-			while (defined($_) && $_ !~ /^}/) {
-				$_ = <HEADER>;
-				$i++ if $_ =~ /{.*}/;
-				next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/;
-				$$node{$1} = [ $i, $2, {} ];
-			}
-		}
-	}
-	close HEADER;
-}
-
-&build_sysctl(\%mib, "", []);
-
-print <<EOF;
-// mksysctl_openbsd.pl
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix;
-
-type mibentry struct {
-	ctlname string
-	ctloid []_C_int
-}
-
-var sysctlMib = []mibentry {
-EOF
-
-foreach my $name (sort keys %sysctl) {
-	my @oid = @{$sysctl{$name}};
-	print "\t{ \"$name\", []_C_int{ ", join(', ', @oid), " } }, \n";
-}
-
-print <<EOF;
-}
-EOF

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl b/newt/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
deleted file mode 100755
index d3e5147..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-#
-# Generate system call table for Darwin from sys/syscall.h
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
-	print STDERR "GOARCH or GOOS not defined in environment\n";
-	exit 1;
-}
-
-my $command = "mksysnum_darwin.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const (
-EOF
-
-while(<>){
-	if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
-		my $name = $1;
-		my $num = $2;
-		$name =~ y/a-z/A-Z/;
-		print "	SYS_$name = $num;"
-	}
-}
-
-print <<EOF;
-)
-EOF

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl b/newt/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
deleted file mode 100755
index 266a248..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-#
-# Generate system call table for DragonFly from master list
-# (for example, /usr/src/sys/kern/syscalls.master).
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
-	print STDERR "GOARCH or GOOS not defined in environment\n";
-	exit 1;
-}
-
-my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const (
-EOF
-
-while(<>){
-	if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
-		my $num = $1;
-		my $proto = $2;
-		my $name = "SYS_$3";
-		$name =~ y/a-z/A-Z/;
-
-		# There are multiple entries for enosys and nosys, so comment them out.
-		if($name =~ /^SYS_E?NOSYS$/){
-			$name = "// $name";
-		}
-		if($name eq 'SYS_SYS_EXIT'){
-			$name = 'SYS_EXIT';
-		}
-
-		print "	$name = $num;  // $proto\n";
-	}
-}
-
-print <<EOF;
-)
-EOF

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl b/newt/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
deleted file mode 100755
index b767e12..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-#
-# Generate system call table for FreeBSD from master list
-# (for example, /usr/src/sys/kern/syscalls.master).
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
-	print STDERR "GOARCH or GOOS not defined in environment\n";
-	exit 1;
-}
-
-my $command = "mksysnum_freebsd.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const (
-EOF
-
-while(<>){
-	if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){
-		my $num = $1;
-		my $proto = $2;
-		my $name = "SYS_$3";
-		$name =~ y/a-z/A-Z/;
-
-		# There are multiple entries for enosys and nosys, so comment them out.
-		if($name =~ /^SYS_E?NOSYS$/){
-			$name = "// $name";
-		}
-		if($name eq 'SYS_SYS_EXIT'){
-			$name = 'SYS_EXIT';
-		}
-		if($name =~ /^SYS_CAP_+/ || $name =~ /^SYS___CAP_+/){
-			next
-		}
-
-		print "	$name = $num;  // $proto\n";
-
-		# We keep Capsicum syscall numbers for FreeBSD
-		# 9-STABLE here because we are not sure whether they
-		# are mature and stable.
-		if($num == 513){
-			print " SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }\n";
-			print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \\\n";
-			print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\n";
-			print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n";
-		}
-	}
-}
-
-print <<EOF;
-)
-EOF

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mksysnum_linux.pl
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mksysnum_linux.pl b/newt/vendor/golang.org/x/sys/unix/mksysnum_linux.pl
deleted file mode 100755
index 4d4017d..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mksysnum_linux.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
-	print STDERR "GOARCH or GOOS not defined in environment\n";
-	exit 1;
-}
-
-my $command = "mksysnum_linux.pl ". join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const(
-EOF
-
-sub fmt {
-	my ($name, $num) = @_;
-	if($num > 999){
-		# ignore deprecated syscalls that are no longer implemented
-		# https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716
-		return;
-	}
-	$name =~ y/a-z/A-Z/;
-	print "	SYS_$name = $num;\n";
-}
-
-my $prev;
-open(GCC, "gcc -E -dD $ARGV[0] |") || die "can't run gcc";
-while(<GCC>){
-	if(/^#define __NR_syscalls\s+/) {
-		# ignore redefinitions of __NR_syscalls
-	}
-	elsif(/^#define __NR_(\w+)\s+([0-9]+)/){
-		$prev = $2;
-		fmt($1, $2);
-	}
-	elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){
-		$prev = $2;
-		fmt($1, $2);
-	}
-	elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){
-		fmt($1, $prev+$2)
-	}
-}
-
-print <<EOF;
-)
-EOF

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl b/newt/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
deleted file mode 100755
index e74616a..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-#
-# Generate system call table for OpenBSD from master list
-# (for example, /usr/src/sys/kern/syscalls.master).
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
-	print STDERR "GOARCH or GOOS not defined in environment\n";
-	exit 1;
-}
-
-my $command = "mksysnum_netbsd.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const (
-EOF
-
-my $line = '';
-while(<>){
-	if($line =~ /^(.*)\\$/) {
-		# Handle continuation
-		$line = $1;
-		$_ =~ s/^\s+//;
-		$line .= $_;
-	} else {
-		# New line
-		$line = $_;
-	}
-	next if $line =~ /\\$/;
-	if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
-		my $num = $1;
-		my $proto = $6;
-		my $compat = $8;
-		my $name = "$7_$9";
-
-		$name = "$7_$11" if $11 ne '';
-		$name =~ y/a-z/A-Z/;
-
-		if($compat eq '' || $compat eq '30' || $compat eq '50') {
-			print "	$name = $num;  // $proto\n";
-		}
-	}
-}
-
-print <<EOF;
-)
-EOF

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl b/newt/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
deleted file mode 100755
index ae5aad5..0000000
--- a/newt/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-#
-# Generate system call table for OpenBSD from master list
-# (for example, /usr/src/sys/kern/syscalls.master).
-
-use strict;
-
-if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") {
-	print STDERR "GOARCH or GOOS not defined in environment\n";
-	exit 1;
-}
-
-my $command = "mksysnum_openbsd.pl " . join(' ', @ARGV);
-
-print <<EOF;
-// $command
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
-
-// +build $ENV{'GOARCH'},$ENV{'GOOS'}
-
-package unix
-
-const (
-EOF
-
-while(<>){
-	if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
-		my $num = $1;
-		my $proto = $3;
-		my $name = $4;
-		$name =~ y/a-z/A-Z/;
-
-		# There are multiple entries for enosys and nosys, so comment them out.
-		if($name =~ /^SYS_E?NOSYS$/){
-			$name = "// $name";
-		}
-		if($name eq 'SYS_SYS_EXIT'){
-			$name = 'SYS_EXIT';
-		}
-
-		print "	$name = $num;  // $proto\n";
-	}
-}
-
-print <<EOF;
-)
-EOF

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/race.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/race.go b/newt/vendor/golang.org/x/sys/unix/race.go
deleted file mode 100644
index 3c7627e..0000000
--- a/newt/vendor/golang.org/x/sys/unix/race.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin,race linux,race freebsd,race
-
-package unix
-
-import (
-	"runtime"
-	"unsafe"
-)
-
-const raceenabled = true
-
-func raceAcquire(addr unsafe.Pointer) {
-	runtime.RaceAcquire(addr)
-}
-
-func raceReleaseMerge(addr unsafe.Pointer) {
-	runtime.RaceReleaseMerge(addr)
-}
-
-func raceReadRange(addr unsafe.Pointer, len int) {
-	runtime.RaceReadRange(addr, len)
-}
-
-func raceWriteRange(addr unsafe.Pointer, len int) {
-	runtime.RaceWriteRange(addr, len)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/race0.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/race0.go b/newt/vendor/golang.org/x/sys/unix/race0.go
deleted file mode 100644
index f8678e0..0000000
--- a/newt/vendor/golang.org/x/sys/unix/race0.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2012 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
-
-package unix
-
-import (
-	"unsafe"
-)
-
-const raceenabled = false
-
-func raceAcquire(addr unsafe.Pointer) {
-}
-
-func raceReleaseMerge(addr unsafe.Pointer) {
-}
-
-func raceReadRange(addr unsafe.Pointer, len int) {
-}
-
-func raceWriteRange(addr unsafe.Pointer, len int) {
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/sockcmsg_linux.go b/newt/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
deleted file mode 100644
index d9ff473..0000000
--- a/newt/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Socket control messages
-
-package unix
-
-import "unsafe"
-
-// UnixCredentials encodes credentials into a socket control message
-// for sending to another process. This can be used for
-// authentication.
-func UnixCredentials(ucred *Ucred) []byte {
-	b := make([]byte, CmsgSpace(SizeofUcred))
-	h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
-	h.Level = SOL_SOCKET
-	h.Type = SCM_CREDENTIALS
-	h.SetLen(CmsgLen(SizeofUcred))
-	*((*Ucred)(cmsgData(h))) = *ucred
-	return b
-}
-
-// 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.
-func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
-	if m.Header.Level != SOL_SOCKET {
-		return nil, EINVAL
-	}
-	if m.Header.Type != SCM_CREDENTIALS {
-		return nil, EINVAL
-	}
-	ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
-	return &ucred, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/newt/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
deleted file mode 100644
index f1493a3..0000000
--- a/newt/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2011 The Go Authors.  All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Socket control messages
-
-package unix
-
-import "unsafe"
-
-// Round the length of a raw sockaddr up to align it properly.
-func cmsgAlignOf(salen int) int {
-	salign := sizeofPtr
-	// NOTE: It seems like 64-bit Darwin and DragonFly BSD kernels
-	// still require 32-bit aligned access to network subsystem.
-	if darwin64Bit || dragonfly64Bit {
-		salign = 4
-	}
-	return (salen + salign - 1) & ^(salign - 1)
-}
-
-// CmsgLen returns the value to store in the Len field of the Cmsghdr
-// structure, taking into account any necessary alignment.
-func CmsgLen(datalen int) int {
-	return cmsgAlignOf(SizeofCmsghdr) + datalen
-}
-
-// CmsgSpace returns the number of bytes an ancillary element with
-// payload of the passed data length occupies.
-func CmsgSpace(datalen int) int {
-	return cmsgAlignOf(SizeofCmsghdr) + cmsgAlignOf(datalen)
-}
-
-func cmsgData(h *Cmsghdr) unsafe.Pointer {
-	return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)))
-}
-
-// SocketControlMessage represents a socket control message.
-type SocketControlMessage struct {
-	Header Cmsghdr
-	Data   []byte
-}
-
-// ParseSocketControlMessage parses b as an array of socket control
-// messages.
-func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {
-	var msgs []SocketControlMessage
-	i := 0
-	for i+CmsgLen(0) <= len(b) {
-		h, dbuf, err := socketControlMessageHeaderAndData(b[i:])
-		if err != nil {
-			return nil, err
-		}
-		m := SocketControlMessage{Header: *h, Data: dbuf}
-		msgs = append(msgs, m)
-		i += cmsgAlignOf(int(h.Len))
-	}
-	return msgs, nil
-}
-
-func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {
-	h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
-	if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {
-		return nil, nil, EINVAL
-	}
-	return h, b[cmsgAlignOf(SizeofCmsghdr):h.Len], nil
-}
-
-// UnixRights encodes a set of open file descriptors into a socket
-// control message for sending to another process.
-func UnixRights(fds ...int) []byte {
-	datalen := len(fds) * 4
-	b := make([]byte, CmsgSpace(datalen))
-	h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
-	h.Level = SOL_SOCKET
-	h.Type = SCM_RIGHTS
-	h.SetLen(CmsgLen(datalen))
-	data := cmsgData(h)
-	for _, fd := range fds {
-		*(*int32)(data) = int32(fd)
-		data = unsafe.Pointer(uintptr(data) + 4)
-	}
-	return b
-}
-
-// ParseUnixRights decodes a socket control message that contains an
-// integer array of open file descriptors from another process.
-func ParseUnixRights(m *SocketControlMessage) ([]int, error) {
-	if m.Header.Level != SOL_SOCKET {
-		return nil, EINVAL
-	}
-	if m.Header.Type != SCM_RIGHTS {
-		return nil, EINVAL
-	}
-	fds := make([]int, len(m.Data)>>2)
-	for i, j := 0, 0; i < len(m.Data); i += 4 {
-		fds[j] = int(*(*int32)(unsafe.Pointer(&m.Data[i])))
-		j++
-	}
-	return fds, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/str.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/str.go b/newt/vendor/golang.org/x/sys/unix/str.go
deleted file mode 100644
index 35ed664..0000000
--- a/newt/vendor/golang.org/x/sys/unix/str.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-func itoa(val int) string { // do it here rather than with fmt to avoid dependency
-	if val < 0 {
-		return "-" + uitoa(uint(-val))
-	}
-	return uitoa(uint(val))
-}
-
-func uitoa(val uint) string {
-	var buf [32]byte // big enough for int64
-	i := len(buf) - 1
-	for val >= 10 {
-		buf[i] = byte(val%10 + '0')
-		i--
-		val /= 10
-	}
-	buf[i] = byte(val + '0')
-	return string(buf[i:])
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall.go b/newt/vendor/golang.org/x/sys/unix/syscall.go
deleted file mode 100644
index 571e699..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall.go
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Package unix contains an interface to the low-level operating system
-// primitives.  OS details vary depending on the underlying system, and
-// by default, godoc will display OS-specific documentation for the current
-// system.  If you want godoc to display OS 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 this package 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 represents an operating system error describing the failure and
-// holds a value of type syscall.Errno.
-package unix
-
-import "unsafe"
-
-// 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 ByteSliceFromString(s string) ([]byte, error) {
-	for i := 0; i < len(s); i++ {
-		if s[i] == 0 {
-			return nil, EINVAL
-		}
-	}
-	a := make([]byte, len(s)+1)
-	copy(a, s)
-	return a, nil
-}
-
-// 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 BytePtrFromString(s string) (*byte, error) {
-	a, err := ByteSliceFromString(s)
-	if err != nil {
-		return nil, err
-	}
-	return &a[0], nil
-}
-
-// Single-word zero for use when we need a valid pointer to 0 bytes.
-// See mkunix.pl.
-var _zero uintptr
-
-func (ts *Timespec) Unix() (sec int64, nsec int64) {
-	return int64(ts.Sec), int64(ts.Nsec)
-}
-
-func (tv *Timeval) Unix() (sec int64, nsec int64) {
-	return int64(tv.Sec), int64(tv.Usec) * 1000
-}
-
-func (ts *Timespec) Nano() int64 {
-	return int64(ts.Sec)*1e9 + int64(ts.Nsec)
-}
-
-func (tv *Timeval) Nano() int64 {
-	return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
-
-// use is a no-op, but the compiler cannot see that it is.
-// Calling use(p) ensures that p is kept live until that point.
-//go:noescape
-func use(p unsafe.Pointer)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_bsd.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_bsd.go b/newt/vendor/golang.org/x/sys/unix/syscall_bsd.go
deleted file mode 100644
index e967176..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ /dev/null
@@ -1,628 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-// BSD system call wrappers shared by *BSD based systems
-// including OS X (Darwin) and FreeBSD.  Like the other
-// syscall_*.go files it is compiled as Go code but also
-// used as input to mksyscall which parses the //sys
-// lines and generates system call stubs.
-
-package unix
-
-import (
-	"runtime"
-	"syscall"
-	"unsafe"
-)
-
-/*
- * Wrapped
- */
-
-//sysnb	getgroups(ngid int, gid *_Gid_t) (n int, err error)
-//sysnb	setgroups(ngid int, gid *_Gid_t) (err error)
-
-func Getgroups() (gids []int, err error) {
-	n, err := getgroups(0, nil)
-	if err != nil {
-		return nil, err
-	}
-	if n == 0 {
-		return nil, nil
-	}
-
-	// Sanity check group count.  Max is 16 on BSD.
-	if n < 0 || n > 1000 {
-		return nil, EINVAL
-	}
-
-	a := make([]_Gid_t, n)
-	n, err = getgroups(n, &a[0])
-	if err != nil {
-		return nil, err
-	}
-	gids = make([]int, n)
-	for i, v := range a[0:n] {
-		gids[i] = int(v)
-	}
-	return
-}
-
-func Setgroups(gids []int) (err error) {
-	if len(gids) == 0 {
-		return setgroups(0, nil)
-	}
-
-	a := make([]_Gid_t, len(gids))
-	for i, v := range gids {
-		a[i] = _Gid_t(v)
-	}
-	return setgroups(len(a), &a[0])
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
-	// Final argument is (basep *uintptr) and the syscall doesn't take nil.
-	// 64 bits should be enough. (32 bits isn't even on 386). Since the
-	// actual system call is getdirentries64, 64 is a good guess.
-	// TODO(rsc): Can we use a single global basep for all calls?
-	var base = (*uintptr)(unsafe.Pointer(new(uint64)))
-	return Getdirentries(fd, buf, base)
-}
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.
-
-type WaitStatus uint32
-
-const (
-	mask  = 0x7F
-	core  = 0x80
-	shift = 8
-
-	exited  = 0
-	stopped = 0x7F
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) ExitStatus() int {
-	if w&mask != exited {
-		return -1
-	}
-	return int(w >> shift)
-}
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
-
-func (w WaitStatus) Signal() syscall.Signal {
-	sig := syscall.Signal(w & mask)
-	if sig == stopped || sig == 0 {
-		return -1
-	}
-	return sig
-}
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }
-
-func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }
-
-func (w WaitStatus) StopSignal() syscall.Signal {
-	if !w.Stopped() {
-		return -1
-	}
-	return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-//sys	wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
-	var status _C_int
-	wpid, err = wait4(pid, &status, options, rusage)
-	if wstatus != nil {
-		*wstatus = WaitStatus(status)
-	}
-	return
-}
-
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
-//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys	Shutdown(s int, how int) (err error)
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	if sa.Port < 0 || sa.Port > 0xFFFF {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Len = SizeofSockaddrInet4
-	sa.raw.Family = AF_INET
-	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
-	p[0] = byte(sa.Port >> 8)
-	p[1] = byte(sa.Port)
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
-	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	if sa.Port < 0 || sa.Port > 0xFFFF {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Len = SizeofSockaddrInet6
-	sa.raw.Family = AF_INET6
-	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
-	p[0] = byte(sa.Port >> 8)
-	p[1] = byte(sa.Port)
-	sa.raw.Scope_id = sa.ZoneId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
-	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	name := sa.Name
-	n := len(name)
-	if n >= len(sa.raw.Path) || n == 0 {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL
-	sa.raw.Family = AF_UNIX
-	for i := 0; i < n; i++ {
-		sa.raw.Path[i] = int8(name[i])
-	}
-	return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	if sa.Index == 0 {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Len = sa.Len
-	sa.raw.Family = AF_LINK
-	sa.raw.Index = sa.Index
-	sa.raw.Type = sa.Type
-	sa.raw.Nlen = sa.Nlen
-	sa.raw.Alen = sa.Alen
-	sa.raw.Slen = sa.Slen
-	for i := 0; i < len(sa.raw.Data); i++ {
-		sa.raw.Data[i] = sa.Data[i]
-	}
-	return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
-	switch rsa.Addr.Family {
-	case AF_LINK:
-		pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa))
-		sa := new(SockaddrDatalink)
-		sa.Len = pp.Len
-		sa.Family = pp.Family
-		sa.Index = pp.Index
-		sa.Type = pp.Type
-		sa.Nlen = pp.Nlen
-		sa.Alen = pp.Alen
-		sa.Slen = pp.Slen
-		for i := 0; i < len(sa.Data); i++ {
-			sa.Data[i] = pp.Data[i]
-		}
-		return sa, nil
-
-	case AF_UNIX:
-		pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
-		if pp.Len < 2 || pp.Len > SizeofSockaddrUnix {
-			return nil, EINVAL
-		}
-		sa := new(SockaddrUnix)
-
-		// Some BSDs include the trailing NUL in the length, whereas
-		// others do not. Work around this by subtracting the leading
-		// family and len. The path is then scanned to see if a NUL
-		// terminator still exists within the length.
-		n := int(pp.Len) - 2 // subtract leading Family, Len
-		for i := 0; i < n; i++ {
-			if pp.Path[i] == 0 {
-				// found early NUL; assume Len included the NUL
-				// or was overestimating.
-				n = i
-				break
-			}
-		}
-		bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
-		sa.Name = string(bytes)
-		return sa, nil
-
-	case AF_INET:
-		pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
-		sa := new(SockaddrInet4)
-		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
-		sa.Port = int(p[0])<<8 + int(p[1])
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
-		return sa, nil
-
-	case AF_INET6:
-		pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
-		sa := new(SockaddrInet6)
-		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
-		sa.Port = int(p[0])<<8 + int(p[1])
-		sa.ZoneId = pp.Scope_id
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
-		return sa, nil
-	}
-	return nil, EAFNOSUPPORT
-}
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
-	var rsa RawSockaddrAny
-	var len _Socklen = SizeofSockaddrAny
-	nfd, err = accept(fd, &rsa, &len)
-	if err != nil {
-		return
-	}
-	if runtime.GOOS == "darwin" && len == 0 {
-		// Accepted socket has no address.
-		// This is likely due to a bug in xnu kernels,
-		// where instead of ECONNABORTED error socket
-		// is accepted, but has no address.
-		Close(nfd)
-		return 0, nil, ECONNABORTED
-	}
-	sa, err = anyToSockaddr(&rsa)
-	if err != nil {
-		Close(nfd)
-		nfd = 0
-	}
-	return
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
-	var rsa RawSockaddrAny
-	var len _Socklen = SizeofSockaddrAny
-	if err = getsockname(fd, &rsa, &len); err != nil {
-		return
-	}
-	// TODO(jsing): DragonFly has a "bug" (see issue 3349), which should be
-	// reported upstream.
-	if runtime.GOOS == "dragonfly" && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 {
-		rsa.Addr.Family = AF_UNIX
-		rsa.Addr.Len = SizeofSockaddrUnix
-	}
-	return anyToSockaddr(&rsa)
-}
-
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-
-func GetsockoptByte(fd, level, opt int) (value byte, err error) {
-	var n byte
-	vallen := _Socklen(1)
-	err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
-	return n, err
-}
-
-func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
-	vallen := _Socklen(4)
-	err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
-	return value, err
-}
-
-func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
-	var value IPMreq
-	vallen := _Socklen(SizeofIPMreq)
-	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, err
-}
-
-func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
-	var value IPv6Mreq
-	vallen := _Socklen(SizeofIPv6Mreq)
-	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, err
-}
-
-func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
-	var value IPv6MTUInfo
-	vallen := _Socklen(SizeofIPv6MTUInfo)
-	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, err
-}
-
-func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
-	var value ICMPv6Filter
-	vallen := _Socklen(SizeofICMPv6Filter)
-	err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
-	return &value, err
-}
-
-//sys   recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys   sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
-	var msg Msghdr
-	var rsa RawSockaddrAny
-	msg.Name = (*byte)(unsafe.Pointer(&rsa))
-	msg.Namelen = uint32(SizeofSockaddrAny)
-	var iov Iovec
-	if len(p) > 0 {
-		iov.Base = (*byte)(unsafe.Pointer(&p[0]))
-		iov.SetLen(len(p))
-	}
-	var dummy byte
-	if len(oob) > 0 {
-		// receive at least one normal byte
-		if len(p) == 0 {
-			iov.Base = &dummy
-			iov.SetLen(1)
-		}
-		msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
-		msg.SetControllen(len(oob))
-	}
-	msg.Iov = &iov
-	msg.Iovlen = 1
-	if n, err = recvmsg(fd, &msg, flags); err != nil {
-		return
-	}
-	oobn = int(msg.Controllen)
-	recvflags = int(msg.Flags)
-	// source address is only specified if the socket is unconnected
-	if rsa.Addr.Family != AF_UNSPEC {
-		from, err = anyToSockaddr(&rsa)
-	}
-	return
-}
-
-//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
-	_, err = SendmsgN(fd, p, oob, to, flags)
-	return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
-	var ptr unsafe.Pointer
-	var salen _Socklen
-	if to != nil {
-		ptr, salen, err = to.sockaddr()
-		if err != nil {
-			return 0, err
-		}
-	}
-	var msg Msghdr
-	msg.Name = (*byte)(unsafe.Pointer(ptr))
-	msg.Namelen = uint32(salen)
-	var iov Iovec
-	if len(p) > 0 {
-		iov.Base = (*byte)(unsafe.Pointer(&p[0]))
-		iov.SetLen(len(p))
-	}
-	var dummy byte
-	if len(oob) > 0 {
-		// send at least one normal byte
-		if len(p) == 0 {
-			iov.Base = &dummy
-			iov.SetLen(1)
-		}
-		msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
-		msg.SetControllen(len(oob))
-	}
-	msg.Iov = &iov
-	msg.Iovlen = 1
-	if n, err = sendmsg(fd, &msg, flags); err != nil {
-		return 0, err
-	}
-	if len(oob) > 0 && len(p) == 0 {
-		n = 0
-	}
-	return n, nil
-}
-
-//sys	kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error)
-
-func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err error) {
-	var change, event unsafe.Pointer
-	if len(changes) > 0 {
-		change = unsafe.Pointer(&changes[0])
-	}
-	if len(events) > 0 {
-		event = unsafe.Pointer(&events[0])
-	}
-	return kevent(kq, change, len(changes), event, len(events), timeout)
-}
-
-//sys	sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
-
-// sysctlmib translates name to mib number and appends any additional args.
-func sysctlmib(name string, args ...int) ([]_C_int, error) {
-	// Translate name to mib number.
-	mib, err := nametomib(name)
-	if err != nil {
-		return nil, err
-	}
-
-	for _, a := range args {
-		mib = append(mib, _C_int(a))
-	}
-
-	return mib, nil
-}
-
-func Sysctl(name string) (string, error) {
-	return SysctlArgs(name)
-}
-
-func SysctlArgs(name string, args ...int) (string, error) {
-	mib, err := sysctlmib(name, args...)
-	if err != nil {
-		return "", err
-	}
-
-	// Find size.
-	n := uintptr(0)
-	if err := sysctl(mib, nil, &n, nil, 0); err != nil {
-		return "", err
-	}
-	if n == 0 {
-		return "", nil
-	}
-
-	// Read into buffer of that size.
-	buf := make([]byte, n)
-	if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
-		return "", err
-	}
-
-	// Throw away terminating NUL.
-	if n > 0 && buf[n-1] == '\x00' {
-		n--
-	}
-	return string(buf[0:n]), nil
-}
-
-func SysctlUint32(name string) (uint32, error) {
-	return SysctlUint32Args(name)
-}
-
-func SysctlUint32Args(name string, args ...int) (uint32, error) {
-	mib, err := sysctlmib(name, args...)
-	if err != nil {
-		return 0, err
-	}
-
-	n := uintptr(4)
-	buf := make([]byte, 4)
-	if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
-		return 0, err
-	}
-	if n != 4 {
-		return 0, EIO
-	}
-	return *(*uint32)(unsafe.Pointer(&buf[0])), nil
-}
-
-func SysctlUint64(name string, args ...int) (uint64, error) {
-	mib, err := sysctlmib(name, args...)
-	if err != nil {
-		return 0, err
-	}
-
-	n := uintptr(8)
-	buf := make([]byte, 8)
-	if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
-		return 0, err
-	}
-	if n != 8 {
-		return 0, EIO
-	}
-	return *(*uint64)(unsafe.Pointer(&buf[0])), nil
-}
-
-func SysctlRaw(name string, args ...int) ([]byte, error) {
-	mib, err := sysctlmib(name, args...)
-	if err != nil {
-		return nil, err
-	}
-
-	// Find size.
-	n := uintptr(0)
-	if err := sysctl(mib, nil, &n, nil, 0); err != nil {
-		return nil, err
-	}
-	if n == 0 {
-		return nil, nil
-	}
-
-	// Read into buffer of that size.
-	buf := make([]byte, n)
-	if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
-		return nil, err
-	}
-
-	// The actual call may return less than the original reported required
-	// size so ensure we deal with that.
-	return buf[:n], nil
-}
-
-//sys	utimes(path string, timeval *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) error {
-	if tv == nil {
-		return utimes(path, nil)
-	}
-	if len(tv) != 2 {
-		return EINVAL
-	}
-	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func UtimesNano(path string, ts []Timespec) error {
-	if ts == nil {
-		return utimes(path, nil)
-	}
-	// TODO: The BSDs can do utimensat with SYS_UTIMENSAT but it
-	// isn't supported by darwin so this uses utimes instead
-	if len(ts) != 2 {
-		return EINVAL
-	}
-	// Not as efficient as it could be because Timespec and
-	// Timeval have different types in the different OSes
-	tv := [2]Timeval{
-		NsecToTimeval(TimespecToNsec(ts[0])),
-		NsecToTimeval(TimespecToNsec(ts[1])),
-	}
-	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys	futimes(fd int, timeval *[2]Timeval) (err error)
-
-func Futimes(fd int, tv []Timeval) error {
-	if tv == nil {
-		return futimes(fd, nil)
-	}
-	if len(tv) != 2 {
-		return EINVAL
-	}
-	return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys	fcntl(fd int, cmd int, arg int) (val int, err error)
-
-// TODO: wrap
-//	Acct(name nil-string) (err error)
-//	Gethostuuid(uuid *byte, timeout *Timespec) (err error)
-//	Madvise(addr *byte, len int, behav int) (err error)
-//	Mprotect(addr *byte, len int, prot int) (err error)
-//	Msync(addr *byte, len int, flags int) (err error)
-//	Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error)
-
-var mapper = &mmapper{
-	active: make(map[*byte][]byte),
-	mmap:   mmap,
-	munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
-	return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
-	return mapper.Munmap(b)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_darwin.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_darwin.go b/newt/vendor/golang.org/x/sys/unix/syscall_darwin.go
deleted file mode 100644
index 3d534d2..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ /dev/null
@@ -1,511 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Darwin system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
-	errorspkg "errors"
-	"syscall"
-	"unsafe"
-)
-
-const ImplementsGetwd = true
-
-func Getwd() (string, error) {
-	buf := make([]byte, 2048)
-	attrs, err := getAttrList(".", attrList{CommonAttr: attrCmnFullpath}, buf, 0)
-	if err == nil && len(attrs) == 1 && len(attrs[0]) >= 2 {
-		wd := string(attrs[0])
-		// Sanity check that it's an absolute path and ends
-		// in a null byte, which we then strip.
-		if wd[0] == '/' && wd[len(wd)-1] == 0 {
-			return wd[:len(wd)-1], nil
-		}
-	}
-	// If pkg/os/getwd.go gets ENOTSUP, it will fall back to the
-	// slow algorithm.
-	return "", ENOTSUP
-}
-
-type SockaddrDatalink struct {
-	Len    uint8
-	Family uint8
-	Index  uint16
-	Type   uint8
-	Nlen   uint8
-	Alen   uint8
-	Slen   uint8
-	Data   [12]int8
-	raw    RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
-	const siz = unsafe.Sizeof(mib[0])
-
-	// NOTE(rsc): It seems strange to set the buffer to have
-	// size CTL_MAXNAME+2 but use only CTL_MAXNAME
-	// as the size.  I don't know why the +2 is here, but the
-	// kernel uses +2 for its own implementation of this function.
-	// I am scared that if we don't include the +2 here, the kernel
-	// will silently write 2 words farther than we specify
-	// and we'll get memory corruption.
-	var buf [CTL_MAXNAME + 2]_C_int
-	n := uintptr(CTL_MAXNAME) * siz
-
-	p := (*byte)(unsafe.Pointer(&buf[0]))
-	bytes, err := ByteSliceFromString(name)
-	if err != nil {
-		return nil, err
-	}
-
-	// Magic sysctl: "setting" 0.3 to a string name
-	// lets you read back the array of integers form.
-	if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
-		return nil, err
-	}
-	return buf[0 : n/siz], nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names.  It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
-	origlen := len(buf)
-	for max != 0 && len(buf) > 0 {
-		dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
-		if dirent.Reclen == 0 {
-			buf = nil
-			break
-		}
-		buf = buf[dirent.Reclen:]
-		if dirent.Ino == 0 { // File absent in directory.
-			continue
-		}
-		bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
-		var name = string(bytes[0:dirent.Namlen])
-		if name == "." || name == ".." { // Useless names
-			continue
-		}
-		max--
-		count++
-		names = append(names, name)
-	}
-	return origlen - len(buf), count, names
-}
-
-//sys   ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
-func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
-
-const (
-	attrBitMapCount = 5
-	attrCmnFullpath = 0x08000000
-)
-
-type attrList struct {
-	bitmapCount uint16
-	_           uint16
-	CommonAttr  uint32
-	VolAttr     uint32
-	DirAttr     uint32
-	FileAttr    uint32
-	Forkattr    uint32
-}
-
-func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) {
-	if len(attrBuf) < 4 {
-		return nil, errorspkg.New("attrBuf too small")
-	}
-	attrList.bitmapCount = attrBitMapCount
-
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return nil, err
-	}
-
-	_, _, e1 := Syscall6(
-		SYS_GETATTRLIST,
-		uintptr(unsafe.Pointer(_p0)),
-		uintptr(unsafe.Pointer(&attrList)),
-		uintptr(unsafe.Pointer(&attrBuf[0])),
-		uintptr(len(attrBuf)),
-		uintptr(options),
-		0,
-	)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		return nil, e1
-	}
-	size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
-
-	// dat is the section of attrBuf that contains valid data,
-	// without the 4 byte length header. All attribute offsets
-	// are relative to dat.
-	dat := attrBuf
-	if int(size) < len(attrBuf) {
-		dat = dat[:size]
-	}
-	dat = dat[4:] // remove length prefix
-
-	for i := uint32(0); int(i) < len(dat); {
-		header := dat[i:]
-		if len(header) < 8 {
-			return attrs, errorspkg.New("truncated attribute header")
-		}
-		datOff := *(*int32)(unsafe.Pointer(&header[0]))
-		attrLen := *(*uint32)(unsafe.Pointer(&header[4]))
-		if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) {
-			return attrs, errorspkg.New("truncated results; attrBuf too small")
-		}
-		end := uint32(datOff) + attrLen
-		attrs = append(attrs, dat[datOff:end])
-		i = end
-		if r := i % 4; r != 0 {
-			i += (4 - r)
-		}
-	}
-	return
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	p[0], p[1], err = pipe()
-	return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	var bufsize uintptr
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-		bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
-	}
-	r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-/*
- * Wrapped
- */
-
-//sys	kill(pid int, signum int, posix int) (err error)
-
-func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
-
-/*
- * Exposed directly
- */
-//sys	Access(path string, mode uint32) (err error)
-//sys	Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys	Chdir(path string) (err error)
-//sys	Chflags(path string, flags int) (err error)
-//sys	Chmod(path string, mode uint32) (err error)
-//sys	Chown(path string, uid int, gid int) (err error)
-//sys	Chroot(path string) (err error)
-//sys	Close(fd int) (err error)
-//sys	Dup(fd int) (nfd int, err error)
-//sys	Dup2(from int, to int) (err error)
-//sys	Exchangedata(path1 string, path2 string, options int) (err error)
-//sys	Exit(code int)
-//sys	Fchdir(fd int) (err error)
-//sys	Fchflags(fd int, flags int) (err error)
-//sys	Fchmod(fd int, mode uint32) (err error)
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Flock(fd int, how int) (err error)
-//sys	Fpathconf(fd int, name int) (val int, err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys	Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
-//sys	Fsync(fd int) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sys	Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
-//sys	Getdtablesize() (size int)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (uid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getpgid(pid int) (pgid int, err error)
-//sysnb	Getpgrp() (pgrp int)
-//sysnb	Getpid() (pid int)
-//sysnb	Getppid() (ppid int)
-//sys	Getpriority(which int, who int) (prio int, err error)
-//sysnb	Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Getrusage(who int, rusage *Rusage) (err error)
-//sysnb	Getsid(pid int) (sid int, err error)
-//sysnb	Getuid() (uid int)
-//sysnb	Issetugid() (tainted bool)
-//sys	Kqueue() (fd int, err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Link(path string, link string) (err error)
-//sys	Listen(s int, backlog int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys	Mkdir(path string, mode uint32) (err error)
-//sys	Mkfifo(path string, mode uint32) (err error)
-//sys	Mknod(path string, mode uint32, dev int) (err error)
-//sys	Mlock(b []byte) (err error)
-//sys	Mlockall(flags int) (err error)
-//sys	Mprotect(b []byte, prot int) (err error)
-//sys	Munlock(b []byte) (err error)
-//sys	Munlockall() (err error)
-//sys	Open(path string, mode int, perm uint32) (fd int, err error)
-//sys	Pathconf(path string, name int) (val int, err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys	read(fd int, p []byte) (n int, err error)
-//sys	Readlink(path string, buf []byte) (n int, err error)
-//sys	Rename(from string, to string) (err error)
-//sys	Revoke(path string) (err error)
-//sys	Rmdir(path string) (err error)
-//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sys	Setegid(egid int) (err error)
-//sysnb	Seteuid(euid int) (err error)
-//sysnb	Setgid(gid int) (err error)
-//sys	Setlogin(name string) (err error)
-//sysnb	Setpgid(pid int, pgid int) (err error)
-//sys	Setpriority(which int, who int, prio int) (err error)
-//sys	Setprivexec(flag int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Setsid() (pid int, err error)
-//sysnb	Settimeofday(tp *Timeval) (err error)
-//sysnb	Setuid(uid int) (err error)
-//sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-//sys	Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
-//sys	Symlink(path string, link string) (err error)
-//sys	Sync() (err error)
-//sys	Truncate(path string, length int64) (err error)
-//sys	Umask(newmask int) (oldmask int)
-//sys	Undelete(path string) (err error)
-//sys	Unlink(path string) (err error)
-//sys	Unmount(path string, flags int) (err error)
-//sys	write(fd int, p []byte) (n int, err error)
-//sys   mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys   munmap(addr uintptr, length uintptr) (err error)
-//sys	readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys	writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// sendfile
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/newt/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
deleted file mode 100644
index c172a3d..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,darwin
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int32(nsec / 1e9)
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int32(nsec / 1e9)
-	return
-}
-
-//sysnb	gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
-	// The tv passed to gettimeofday must be non-nil
-	// but is otherwise unused.  The answers come back
-	// in the two registers.
-	sec, usec, err := gettimeofday(tv)
-	tv.Sec = int32(sec)
-	tv.Usec = int32(usec)
-	return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint32(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	var length = uint64(count)
-
-	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
-
-	written = int(length)
-
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/386 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/newt/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
deleted file mode 100644
index fc1e5a4..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,darwin
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-//sys	Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-//sysnb	gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
-	// The tv passed to gettimeofday must be non-nil
-	// but is otherwise unused.  The answers come back
-	// in the two registers.
-	sec, usec, err := gettimeofday(tv)
-	tv.Sec = sec
-	tv.Usec = usec
-	return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint64(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	var length = uint64(count)
-
-	_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
-
-	written = int(length)
-
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/amd64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/newt/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
deleted file mode 100644
index d286cf4..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int32(nsec / 1e9)
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int32(nsec / 1e9)
-	return
-}
-
-//sysnb	gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
-	// The tv passed to gettimeofday must be non-nil
-	// but is otherwise unused.  The answers come back
-	// in the two registers.
-	sec, usec, err := gettimeofday(tv)
-	tv.Sec = int32(sec)
-	tv.Usec = int32(usec)
-	return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint32(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	var length = uint64(count)
-
-	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
-
-	written = int(length)
-
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/newt/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
deleted file mode 100644
index c33905c..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm64,darwin
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func Getpagesize() int { return 16384 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-//sysnb	gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
-	// The tv passed to gettimeofday must be non-nil
-	// but is otherwise unused.  The answers come back
-	// in the two registers.
-	sec, usec, err := gettimeofday(tv)
-	tv.Sec = sec
-	tv.Usec = usec
-	return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint64(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	var length = uint64(count)
-
-	_, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
-
-	written = int(length)
-
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/arm64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/newt/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
deleted file mode 100644
index ec408ee..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ /dev/null
@@ -1,412 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// FreeBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import "unsafe"
-
-type SockaddrDatalink struct {
-	Len    uint8
-	Family uint8
-	Index  uint16
-	Type   uint8
-	Nlen   uint8
-	Alen   uint8
-	Slen   uint8
-	Data   [12]int8
-	Rcf    uint16
-	Route  [16]uint16
-	raw    RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
-	const siz = unsafe.Sizeof(mib[0])
-
-	// NOTE(rsc): It seems strange to set the buffer to have
-	// size CTL_MAXNAME+2 but use only CTL_MAXNAME
-	// as the size.  I don't know why the +2 is here, but the
-	// kernel uses +2 for its own implementation of this function.
-	// I am scared that if we don't include the +2 here, the kernel
-	// will silently write 2 words farther than we specify
-	// and we'll get memory corruption.
-	var buf [CTL_MAXNAME + 2]_C_int
-	n := uintptr(CTL_MAXNAME) * siz
-
-	p := (*byte)(unsafe.Pointer(&buf[0]))
-	bytes, err := ByteSliceFromString(name)
-	if err != nil {
-		return nil, err
-	}
-
-	// Magic sysctl: "setting" 0.3 to a string name
-	// lets you read back the array of integers form.
-	if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
-		return nil, err
-	}
-	return buf[0 : n/siz], nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names.  It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
-	origlen := len(buf)
-	for max != 0 && len(buf) > 0 {
-		dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
-		reclen := int(16+dirent.Namlen+1+7) & ^7
-		buf = buf[reclen:]
-		if dirent.Fileno == 0 { // File absent in directory.
-			continue
-		}
-		bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
-		var name = string(bytes[0:dirent.Namlen])
-		if name == "." || name == ".." { // Useless names
-			continue
-		}
-		max--
-		count++
-		names = append(names, name)
-	}
-	return origlen - len(buf), count, names
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	p[0], p[1], err = pipe()
-	return
-}
-
-//sys	extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	return extpread(fd, p, 0, offset)
-}
-
-//sys	extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	return extpwrite(fd, p, 0, offset)
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	var bufsize uintptr
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-		bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
-	}
-	r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-/*
- * Exposed directly
- */
-//sys	Access(path string, mode uint32) (err error)
-//sys	Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys	Chdir(path string) (err error)
-//sys	Chflags(path string, flags int) (err error)
-//sys	Chmod(path string, mode uint32) (err error)
-//sys	Chown(path string, uid int, gid int) (err error)
-//sys	Chroot(path string) (err error)
-//sys	Close(fd int) (err error)
-//sys	Dup(fd int) (nfd int, err error)
-//sys	Dup2(from int, to int) (err error)
-//sys	Exit(code int)
-//sys	Fchdir(fd int) (err error)
-//sys	Fchflags(fd int, flags int) (err error)
-//sys	Fchmod(fd int, mode uint32) (err error)
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Flock(fd int, how int) (err error)
-//sys	Fpathconf(fd int, name int) (val int, err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys	Fsync(fd int) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sys	Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys	Getdtablesize() (size int)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (uid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getpgid(pid int) (pgid int, err error)
-//sysnb	Getpgrp() (pgrp int)
-//sysnb	Getpid() (pid int)
-//sysnb	Getppid() (ppid int)
-//sys	Getpriority(which int, who int) (prio int, err error)
-//sysnb	Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Getrusage(who int, rusage *Rusage) (err error)
-//sysnb	Getsid(pid int) (sid int, err error)
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-//sysnb	Getuid() (uid int)
-//sys	Issetugid() (tainted bool)
-//sys	Kill(pid int, signum syscall.Signal) (err error)
-//sys	Kqueue() (fd int, err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Link(path string, link string) (err error)
-//sys	Listen(s int, backlog int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error)
-//sys	Mkdir(path string, mode uint32) (err error)
-//sys	Mkfifo(path string, mode uint32) (err error)
-//sys	Mknod(path string, mode uint32, dev int) (err error)
-//sys	Mlock(b []byte) (err error)
-//sys	Mlockall(flags int) (err error)
-//sys	Mprotect(b []byte, prot int) (err error)
-//sys	Munlock(b []byte) (err error)
-//sys	Munlockall() (err error)
-//sys	Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys	Open(path string, mode int, perm uint32) (fd int, err error)
-//sys	Pathconf(path string, name int) (val int, err error)
-//sys	read(fd int, p []byte) (n int, err error)
-//sys	Readlink(path string, buf []byte) (n int, err error)
-//sys	Rename(from string, to string) (err error)
-//sys	Revoke(path string) (err error)
-//sys	Rmdir(path string) (err error)
-//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb	Setegid(egid int) (err error)
-//sysnb	Seteuid(euid int) (err error)
-//sysnb	Setgid(gid int) (err error)
-//sys	Setlogin(name string) (err error)
-//sysnb	Setpgid(pid int, pgid int) (err error)
-//sys	Setpriority(which int, who int, prio int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Setsid() (pid int, err error)
-//sysnb	Settimeofday(tp *Timeval) (err error)
-//sysnb	Setuid(uid int) (err error)
-//sys	Stat(path string, stat *Stat_t) (err error)
-//sys	Statfs(path string, stat *Statfs_t) (err error)
-//sys	Symlink(path string, link string) (err error)
-//sys	Sync() (err error)
-//sys	Truncate(path string, length int64) (err error)
-//sys	Umask(newmask int) (oldmask int)
-//sys	Undelete(path string) (err error)
-//sys	Unlink(path string) (err error)
-//sys	Unmount(path string, flags int) (err error)
-//sys	write(fd int, p []byte) (n int, err error)
-//sys   mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys   munmap(addr uintptr, length uintptr) (err error)
-//sys	readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys	writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- * TODO(jsing): Update this list for DragonFly.
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/newt/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
deleted file mode 100644
index da7cb79..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,dragonfly
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = nsec % 1e9 / 1e3
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint64(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	var writtenOut uint64 = 0
-	_, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
-
-	written = int(writtenOut)
-
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)



[57/67] [abbrv] incubator-mynewt-newtmgr git commit: newtmgr - Revendor

Posted by cc...@apache.org.
newtmgr - Revendor


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/02401c9a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/02401c9a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/02401c9a

Branch: refs/heads/master
Commit: 02401c9a17ec0b3752e67c3958f1a481bf4ec96a
Parents: d9849de
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Mar 16 14:13:34 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 newtmgr/Godeps/Godeps.json                      | 54 ++++++++++----------
 .../newt/nmxact/nmble/ble_fsm.go                | 14 +++--
 .../newt/nmxact/nmble/ble_oic_sesn.go           |  5 +-
 .../newt/nmxact/nmble/ble_plain_sesn.go         |  5 +-
 4 files changed, 42 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/02401c9a/newtmgr/Godeps/Godeps.json
----------------------------------------------------------------------
diff --git a/newtmgr/Godeps/Godeps.json b/newtmgr/Godeps/Godeps.json
index d8a7f8a..e600078 100644
--- a/newtmgr/Godeps/Godeps.json
+++ b/newtmgr/Godeps/Godeps.json
@@ -39,7 +39,7 @@
 		},
 		{
 			"ImportPath": "github.com/runtimeco/go-coap",
-			"Rev": "983dcc293d85e870e020b9cd4fce1edb47963a3b"
+			"Rev": "bd370e53f10e4e6ebb585bed665d5076ea71f56c"
 		},
 		{
 			"ImportPath": "github.com/spf13/cast",
@@ -76,68 +76,68 @@
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/bledefs",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/nmble",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/nmp",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/nmserial",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/nmxutil",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/omp",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/sesn",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/xact",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/xport",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/util",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/util/unixchild",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/viper",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/yaml",
-			"Comment": "mynewt_1_0_0_b1_tag-196-gced4e6f",
-			"Rev": "ced4e6f68b9f254cf6e8b2c52d6183ab7eecfc8a"
+			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
+			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
 		}
 	]
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/02401c9a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
index e8ad433..a9ce890 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
@@ -62,7 +62,8 @@ type BleFsm struct {
 	attMtu     int
 	connChan   chan error
 
-	mtx sync.Mutex
+	mtx             sync.Mutex
+	lastStateChange time.Time
 
 	// These variables must be protected by the mutex.
 	bls   map[*BleListener]struct{}
@@ -92,6 +93,12 @@ func (bf *BleFsm) disconnectError(reason int) error {
 	return nmxutil.NewBleSesnDisconnectError(reason, str)
 }
 
+func (bf *BleFsm) closedError(msg string) error {
+	return nmxutil.NewSesnClosedError(fmt.Sprintf(
+		"%s; state=%d last-state-change=%s",
+		msg, bf.getState(), bf.lastStateChange))
+}
+
 func (bf *BleFsm) getState() BleSesnState {
 	bf.mtx.Lock()
 	defer bf.mtx.Unlock()
@@ -104,6 +111,7 @@ func (bf *BleFsm) setState(toState BleSesnState) {
 	defer bf.mtx.Unlock()
 
 	bf.state = toState
+	bf.lastStateChange = time.Now()
 }
 
 func (bf *BleFsm) transitionState(fromState BleSesnState,
@@ -603,8 +611,8 @@ func (bf *BleFsm) Stop() (bool, error) {
 		SESN_STATE_TERMINATING,
 		SESN_STATE_CONN_CANCELLING:
 
-		return false, nmxutil.NewSesnClosedError(
-			"Attempt to close an unopened BLE session")
+		return false,
+			bf.closedError("Attempt to close an unopened BLE session")
 
 	case SESN_STATE_CONNECTING:
 		if err := bf.connCancel(); err != nil {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/02401c9a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
index f72bb48..6c6de2f 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
@@ -7,7 +7,6 @@ import (
 
 	"mynewt.apache.org/newt/nmxact/bledefs"
 	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/nmxutil"
 	"mynewt.apache.org/newt/nmxact/omp"
 	"mynewt.apache.org/newt/nmxact/sesn"
 	"mynewt.apache.org/newt/util"
@@ -110,7 +109,7 @@ func (bos *BleOicSesn) Open() error {
 
 func (bos *BleOicSesn) Close() error {
 	if !bos.setCloseChan() {
-		return nmxutil.NewSesnClosedError(
+		return bos.bf.closedError(
 			"Attempt to close an unopened BLE session")
 	}
 	defer bos.clearCloseChan()
@@ -165,7 +164,7 @@ func (bos *BleOicSesn) TxNmpOnce(m *nmp.NmpMsg, opt sesn.TxOptions) (
 	nmp.NmpRsp, error) {
 
 	if !bos.IsOpen() {
-		return nil, nmxutil.NewSesnClosedError(
+		return nil, bos.bf.closedError(
 			"Attempt to transmit over closed BLE session")
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/02401c9a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
index 7ee99f2..967e320 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
@@ -7,7 +7,6 @@ import (
 
 	"mynewt.apache.org/newt/nmxact/bledefs"
 	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/nmxutil"
 	"mynewt.apache.org/newt/nmxact/sesn"
 	"mynewt.apache.org/newt/util"
 )
@@ -104,7 +103,7 @@ func (bps *BlePlainSesn) Open() error {
 
 func (bps *BlePlainSesn) Close() error {
 	if !bps.setCloseChan() {
-		return nmxutil.NewSesnClosedError(
+		return bps.bf.closedError(
 			"Attempt to close an unopened BLE session")
 	}
 	defer bps.clearCloseChan()
@@ -159,7 +158,7 @@ func (bps *BlePlainSesn) TxNmpOnce(msg *nmp.NmpMsg, opt sesn.TxOptions) (
 	nmp.NmpRsp, error) {
 
 	if !bps.IsOpen() {
-		return nil, nmxutil.NewSesnClosedError(
+		return nil, bps.bf.closedError(
 			"Attempt to transmit over closed BLE session")
 	}
 


[18/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
deleted file mode 100644
index 766d1e6..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ /dev/null
@@ -1,2077 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build sparc64,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IB                            = 0x1b
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KCM                           = 0x29
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x2a
-	AF_MPLS                          = 0x1c
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_VSOCK                         = 0x28
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_6LOWPAN                   = 0x339
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_MONITOR        = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IP6GRE                    = 0x337
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETLINK                   = 0x338
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	ASI_LEON_DFLUSH                  = 0x11
-	ASI_LEON_IFLUSH                  = 0x10
-	ASI_LEON_MMUFLUSH                = 0x18
-	B0                               = 0x0
-	B1000000                         = 0x100c
-	B110                             = 0x3
-	B115200                          = 0x1002
-	B1152000                         = 0x100d
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x100e
-	B153600                          = 0x1006
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x100f
-	B230400                          = 0x1003
-	B2400                            = 0xb
-	B300                             = 0x7
-	B307200                          = 0x1007
-	B38400                           = 0xf
-	B460800                          = 0x1004
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x100a
-	B57600                           = 0x1001
-	B576000                          = 0x100b
-	B600                             = 0x8
-	B614400                          = 0x1008
-	B75                              = 0x2
-	B76800                           = 0x1005
-	B921600                          = 0x1009
-	B9600                            = 0xd
-	BOTHER                           = 0x1000
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LL_OFF                       = -0x200000
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MOD                          = 0x90
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_NET_OFF                      = -0x100000
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BPF_XOR                          = 0xa0
-	BRKINT                           = 0x2
-	BS0                              = 0x0
-	BS1                              = 0x2000
-	BSDLY                            = 0x2000
-	CBAUD                            = 0x100f
-	CBAUDEX                          = 0x1000
-	CFLUSH                           = 0xf
-	CIBAUD                           = 0x100f0000
-	CLOCAL                           = 0x800
-	CLOCK_BOOTTIME                   = 0x7
-	CLOCK_BOOTTIME_ALARM             = 0x9
-	CLOCK_DEFAULT                    = 0x0
-	CLOCK_EXT                        = 0x1
-	CLOCK_INT                        = 0x2
-	CLOCK_MONOTONIC                  = 0x1
-	CLOCK_MONOTONIC_COARSE           = 0x6
-	CLOCK_MONOTONIC_RAW              = 0x4
-	CLOCK_PROCESS_CPUTIME_ID         = 0x2
-	CLOCK_REALTIME                   = 0x0
-	CLOCK_REALTIME_ALARM             = 0x8
-	CLOCK_REALTIME_COARSE            = 0x5
-	CLOCK_TAI                        = 0xb
-	CLOCK_THREAD_CPUTIME_ID          = 0x3
-	CLOCK_TXFROMRX                   = 0x4
-	CLOCK_TXINT                      = 0x3
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWCGROUP                  = 0x2000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CMSPAR                           = 0x40000000
-	CR0                              = 0x0
-	CR1                              = 0x200
-	CR2                              = 0x400
-	CR3                              = 0x600
-	CRDLY                            = 0x600
-	CREAD                            = 0x80
-	CRTSCTS                          = 0x80000000
-	CS5                              = 0x0
-	CS6                              = 0x10
-	CS7                              = 0x20
-	CS8                              = 0x30
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x30
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x40
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x200
-	ECHOE                            = 0x10
-	ECHOK                            = 0x20
-	ECHOKE                           = 0x800
-	ECHONL                           = 0x40
-	ECHOPRT                          = 0x400
-	EMT_TAGOVF                       = 0x1
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLEXCLUSIVE                   = 0x10000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWAKEUP                      = 0x20000000
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x400000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_80221                      = 0x8917
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_802_3_MIN                  = 0x600
-	ETH_P_802_EX1                    = 0x88b5
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BATMAN                     = 0x4305
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CANFD                      = 0xd
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_HSR                        = 0x892f
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_LOOPBACK                   = 0x9000
-	ETH_P_MACSEC                     = 0x88e5
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_MVRP                       = 0x88f5
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PRP                        = 0x88fb
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_TSN                        = 0x22f0
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	ETH_P_XDSA                       = 0xf8
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FF0                              = 0x0
-	FF1                              = 0x8000
-	FFDLY                            = 0x8000
-	FLUSHO                           = 0x2000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0x7
-	F_GETLK64                        = 0x7
-	F_GETOWN                         = 0x5
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OFD_GETLK                      = 0x24
-	F_OFD_SETLK                      = 0x25
-	F_OFD_SETLKW                     = 0x26
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x1
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x8
-	F_SETLK64                        = 0x8
-	F_SETLKW                         = 0x9
-	F_SETLKW64                       = 0x9
-	F_SETOWN                         = 0x6
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x3
-	F_WRLCK                          = 0x2
-	HUPCL                            = 0x400
-	IBSHIFT                          = 0x10
-	ICANON                           = 0x2
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x8000
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_MANAGETEMPADDR             = 0x100
-	IFA_F_MCAUTOJOIN                 = 0x400
-	IFA_F_NODAD                      = 0x2
-	IFA_F_NOPREFIXROUTE              = 0x200
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_STABLE_PRIVACY             = 0x800
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x8
-	IFF_ALLMULTI                     = 0x200
-	IFF_ATTACH_QUEUE                 = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DETACH_QUEUE                 = 0x400
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_ECHO                         = 0x40000
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MASTER                       = 0x400
-	IFF_MULTICAST                    = 0x1000
-	IFF_MULTI_QUEUE                  = 0x100
-	IFF_NOARP                        = 0x80
-	IFF_NOFILTER                     = 0x1000
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_PERSIST                      = 0x800
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_TAP                          = 0x2
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x400000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x4000
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_BEETPH                   = 0x5e
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MH                       = 0x87
-	IPPROTO_MPLS                     = 0x89
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DONTFRAG                    = 0x3e
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HDRINCL                     = 0x24
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PATHMTU                     = 0x3d
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_INTERFACE          = 0x4
-	IPV6_PMTUDISC_OMIT               = 0x5
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPATHMTU                 = 0x3c
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BIND_ADDRESS_NO_PORT          = 0x18
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_CHECKSUM                      = 0x17
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_NODEFRAG                      = 0x16
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_INTERFACE            = 0x4
-	IP_PMTUDISC_OMIT                 = 0x5
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_UNICAST_IF                    = 0x32
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x1
-	ISTRIP                           = 0x20
-	IUCLC                            = 0x200
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x1000
-	IXON                             = 0x400
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DODUMP                      = 0x11
-	MADV_DOFORK                      = 0xb
-	MADV_DONTDUMP                    = 0x10
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_FREE                        = 0x8
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x200
-	MAP_HUGETLB                      = 0x40000
-	MAP_HUGE_MASK                    = 0x3f
-	MAP_HUGE_SHIFT                   = 0x1a
-	MAP_LOCKED                       = 0x100
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x40
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_RENAME                       = 0x20
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x20000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x2000
-	MCL_FUTURE                       = 0x4000
-	MCL_ONFAULT                      = 0x8000
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_BATCH                        = 0x40000
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_LAZYTIME                      = 0x2000000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x2800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CAP_ACK                  = 0xa
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_LISTEN_ALL_NSID          = 0x8
-	NETLINK_LIST_MEMBERSHIPS         = 0x9
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_RX_RING                  = 0x6
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_SOCK_DIAG                = 0x4
-	NETLINK_TX_RING                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NL0                              = 0x0
-	NL1                              = 0x100
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLDLY                            = 0x100
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_FILTERED              = 0x20
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	OLCUC                            = 0x2
-	ONLCR                            = 0x4
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x8
-	O_ASYNC                          = 0x40
-	O_CLOEXEC                        = 0x400000
-	O_CREAT                          = 0x200
-	O_DIRECT                         = 0x100000
-	O_DIRECTORY                      = 0x10000
-	O_DSYNC                          = 0x2000
-	O_EXCL                           = 0x800
-	O_FSYNC                          = 0x802000
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x4004
-	O_NOATIME                        = 0x200000
-	O_NOCTTY                         = 0x8000
-	O_NOFOLLOW                       = 0x20000
-	O_NONBLOCK                       = 0x4000
-	O_PATH                           = 0x1000000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x802000
-	O_SYNC                           = 0x802000
-	O_TMPFILE                        = 0x2010000
-	O_TRUNC                          = 0x400
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CBPF               = 0x6
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_DATA               = 0x16
-	PACKET_FANOUT_EBPF               = 0x7
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_FLAG_ROLLOVER      = 0x1000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FANOUT_QM                 = 0x5
-	PACKET_FANOUT_RND                = 0x4
-	PACKET_FANOUT_ROLLOVER           = 0x3
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_KERNEL                    = 0x7
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_QDISC_BYPASS              = 0x14
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_ROLLOVER_STATS            = 0x15
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_HAS_OFF                = 0x13
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_USER                      = 0x6
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x100
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x200
-	PENDIN                           = 0x4000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_CAP_AMBIENT                   = 0x2f
-	PR_CAP_AMBIENT_CLEAR_ALL         = 0x4
-	PR_CAP_AMBIENT_IS_SET            = 0x1
-	PR_CAP_AMBIENT_LOWER             = 0x3
-	PR_CAP_AMBIENT_RAISE             = 0x2
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_FP_MODE_FR                    = 0x1
-	PR_FP_MODE_FRE                   = 0x2
-	PR_GET_CHILD_SUBREAPER           = 0x25
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_FP_MODE                   = 0x2e
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_THP_DISABLE               = 0x2a
-	PR_GET_TID_ADDRESS               = 0x28
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_MPX_DISABLE_MANAGEMENT        = 0x2c
-	PR_MPX_ENABLE_MANAGEMENT         = 0x2b
-	PR_SET_CHILD_SUBREAPER           = 0x24
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_FP_MODE                   = 0x2d
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_ARG_END                = 0x9
-	PR_SET_MM_ARG_START              = 0x8
-	PR_SET_MM_AUXV                   = 0xc
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_ENV_END                = 0xb
-	PR_SET_MM_ENV_START              = 0xa
-	PR_SET_MM_EXE_FILE               = 0xd
-	PR_SET_MM_MAP                    = 0xe
-	PR_SET_MM_MAP_SIZE               = 0xf
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_THP_DISABLE               = 0x29
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETFPAREGS                = 0x14
-	PTRACE_GETFPREGS                 = 0xe
-	PTRACE_GETFPREGS64               = 0x19
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGS64                 = 0x16
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETSIGMASK                = 0x420a
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_O_EXITKILL                = 0x100000
-	PTRACE_O_MASK                    = 0x3000ff
-	PTRACE_O_SUSPEND_SECCOMP         = 0x200000
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKSIGINFO               = 0x4209
-	PTRACE_PEEKSIGINFO_SHARED        = 0x1
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_READDATA                  = 0x10
-	PTRACE_READTEXT                  = 0x12
-	PTRACE_SECCOMP_GET_FILTER        = 0x420c
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SETFPAREGS                = 0x15
-	PTRACE_SETFPREGS                 = 0xf
-	PTRACE_SETFPREGS64               = 0x1a
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGS64                 = 0x17
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETSIGMASK                = 0x420b
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SPARC_DETACH              = 0xb
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TRACEME                   = 0x0
-	PTRACE_WRITEDATA                 = 0x11
-	PTRACE_WRITETEXT                 = 0x13
-	PT_FP                            = 0x48
-	PT_G0                            = 0x10
-	PT_G1                            = 0x14
-	PT_G2                            = 0x18
-	PT_G3                            = 0x1c
-	PT_G4                            = 0x20
-	PT_G5                            = 0x24
-	PT_G6                            = 0x28
-	PT_G7                            = 0x2c
-	PT_I0                            = 0x30
-	PT_I1                            = 0x34
-	PT_I2                            = 0x38
-	PT_I3                            = 0x3c
-	PT_I4                            = 0x40
-	PT_I5                            = 0x44
-	PT_I6                            = 0x48
-	PT_I7                            = 0x4c
-	PT_NPC                           = 0x8
-	PT_PC                            = 0x4
-	PT_PSR                           = 0x0
-	PT_REGS_MAGIC                    = 0x57ac6c00
-	PT_TNPC                          = 0x90
-	PT_TPC                           = 0x88
-	PT_TSTATE                        = 0x80
-	PT_V9_FP                         = 0x70
-	PT_V9_G0                         = 0x0
-	PT_V9_G1                         = 0x8
-	PT_V9_G2                         = 0x10
-	PT_V9_G3                         = 0x18
-	PT_V9_G4                         = 0x20
-	PT_V9_G5                         = 0x28
-	PT_V9_G6                         = 0x30
-	PT_V9_G7                         = 0x38
-	PT_V9_I0                         = 0x40
-	PT_V9_I1                         = 0x48
-	PT_V9_I2                         = 0x50
-	PT_V9_I3                         = 0x58
-	PT_V9_I4                         = 0x60
-	PT_V9_I5                         = 0x68
-	PT_V9_I6                         = 0x70
-	PT_V9_I7                         = 0x78
-	PT_V9_MAGIC                      = 0x9c
-	PT_V9_TNPC                       = 0x90
-	PT_V9_TPC                        = 0x88
-	PT_V9_TSTATE                     = 0x80
-	PT_V9_Y                          = 0x98
-	PT_WIM                           = 0x10
-	PT_Y                             = 0xc
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x6
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CC_ALGO                     = 0x10
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_MASK                = 0xf
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0x10
-	RTAX_MTU                         = 0x2
-	RTAX_QUICKACK                    = 0xf
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x18
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELMDB                       = 0x55
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELNSID                      = 0x59
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_LOOKUP_TABLE               = 0x1000
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMDB                       = 0x56
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETNETCONF                   = 0x52
-	RTM_GETNSID                      = 0x5a
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETSTATS                     = 0x5e
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x5f
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWMDB                       = 0x54
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWNETCONF                   = 0x50
-	RTM_NEWNSID                      = 0x58
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWSTATS                     = 0x5c
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x14
-	RTM_NR_MSGTYPES                  = 0x50
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_COMPARE_MASK                = 0x11
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_LINKDOWN                  = 0x10
-	RTNH_F_OFFLOAD                   = 0x8
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BABEL                     = 0x2a
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MROUTED                   = 0x11
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x23
-	SCM_TIMESTAMPNS                  = 0x21
-	SCM_WIFI_STATUS                  = 0x25
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCBONDCHANGEACTIVE             = 0x8995
-	SIOCBONDENSLAVE                  = 0x8990
-	SIOCBONDINFOQUERY                = 0x8994
-	SIOCBONDRELEASE                  = 0x8991
-	SIOCBONDSETHWADDR                = 0x8992
-	SIOCBONDSLAVEINFOQUERY           = 0x8993
-	SIOCBRADDBR                      = 0x89a0
-	SIOCBRADDIF                      = 0x89a2
-	SIOCBRDELBR                      = 0x89a1
-	SIOCBRDELIF                      = 0x89a3
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCETHTOOL                      = 0x8946
-	SIOCGARP                         = 0x8954
-	SIOCGHWTSTAMP                    = 0x89b1
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGIFVLAN                      = 0x8982
-	SIOCGMIIPHY                      = 0x8947
-	SIOCGMIIREG                      = 0x8948
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCINQ                          = 0x4004667f
-	SIOCOUTQ                         = 0x40047473
-	SIOCOUTQNSD                      = 0x894b
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSHWTSTAMP                    = 0x89b0
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSIFVLAN                      = 0x8983
-	SIOCSMIIREG                      = 0x8949
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SIOCWANDEV                       = 0x894a
-	SOCK_CLOEXEC                     = 0x400000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x4000
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ALG                          = 0x117
-	SOL_ATM                          = 0x108
-	SOL_CAIF                         = 0x116
-	SOL_DCCP                         = 0x10d
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_IUCV                         = 0x115
-	SOL_KCM                          = 0x119
-	SOL_LLC                          = 0x10c
-	SOL_NETBEUI                      = 0x10b
-	SOL_NETLINK                      = 0x10e
-	SOL_NFC                          = 0x118
-	SOL_PACKET                       = 0x107
-	SOL_PNPIPE                       = 0x113
-	SOL_PPPOL2TP                     = 0x111
-	SOL_RAW                          = 0xff
-	SOL_RDS                          = 0x114
-	SOL_RXRPC                        = 0x110
-	SOL_SOCKET                       = 0xffff
-	SOL_TCP                          = 0x6
-	SOL_TIPC                         = 0x10f
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x8000
-	SO_ATTACH_BPF                    = 0x34
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_ATTACH_REUSEPORT_CBPF         = 0x35
-	SO_ATTACH_REUSEPORT_EBPF         = 0x36
-	SO_BINDTODEVICE                  = 0xd
-	SO_BPF_EXTENSIONS                = 0x32
-	SO_BROADCAST                     = 0x20
-	SO_BSDCOMPAT                     = 0x400
-	SO_BUSY_POLL                     = 0x30
-	SO_CNX_ADVICE                    = 0x37
-	SO_DEBUG                         = 0x1
-	SO_DETACH_BPF                    = 0x1b
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x1029
-	SO_DONTROUTE                     = 0x10
-	SO_ERROR                         = 0x1007
-	SO_GET_FILTER                    = 0x1a
-	SO_INCOMING_CPU                  = 0x33
-	SO_KEEPALIVE                     = 0x8
-	SO_LINGER                        = 0x80
-	SO_LOCK_FILTER                   = 0x28
-	SO_MARK                          = 0x22
-	SO_MAX_PACING_RATE               = 0x31
-	SO_NOFCS                         = 0x27
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0x100
-	SO_PASSCRED                      = 0x2
-	SO_PASSSEC                       = 0x1f
-	SO_PEEK_OFF                      = 0x26
-	SO_PEERCRED                      = 0x40
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1e
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x1028
-	SO_RCVBUF                        = 0x1002
-	SO_RCVBUFFORCE                   = 0x100b
-	SO_RCVLOWAT                      = 0x800
-	SO_RCVTIMEO                      = 0x2000
-	SO_REUSEADDR                     = 0x4
-	SO_REUSEPORT                     = 0x200
-	SO_RXQ_OVFL                      = 0x24
-	SO_SECURITY_AUTHENTICATION       = 0x5001
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x5004
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002
-	SO_SELECT_ERR_QUEUE              = 0x29
-	SO_SNDBUF                        = 0x1001
-	SO_SNDBUFFORCE                   = 0x100a
-	SO_SNDLOWAT                      = 0x1000
-	SO_SNDTIMEO                      = 0x4000
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x23
-	SO_TIMESTAMPNS                   = 0x21
-	SO_TYPE                          = 0x1008
-	SO_WIFI_STATUS                   = 0x25
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TAB0                             = 0x0
-	TAB1                             = 0x800
-	TAB2                             = 0x1000
-	TAB3                             = 0x1800
-	TABDLY                           = 0x1800
-	TCFLSH                           = 0x20005407
-	TCGETA                           = 0x40125401
-	TCGETS                           = 0x40245408
-	TCGETS2                          = 0x402c540c
-	TCIFLUSH                         = 0x0
-	TCIOFF                           = 0x2
-	TCIOFLUSH                        = 0x2
-	TCION                            = 0x3
-	TCOFLUSH                         = 0x1
-	TCOOFF                           = 0x0
-	TCOON                            = 0x1
-	TCP_CC_INFO                      = 0x1a
-	TCP_CONGESTION                   = 0xd
-	TCP_COOKIE_IN_ALWAYS             = 0x1
-	TCP_COOKIE_MAX                   = 0x10
-	TCP_COOKIE_MIN                   = 0x8
-	TCP_COOKIE_OUT_NEVER             = 0x2
-	TCP_COOKIE_PAIR_SIZE             = 0x20
-	TCP_COOKIE_TRANSACTIONS          = 0xf
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_FASTOPEN                     = 0x17
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_MSS_DEFAULT                  = 0x218
-	TCP_MSS_DESIRED                  = 0x4c4
-	TCP_NODELAY                      = 0x1
-	TCP_NOTSENT_LOWAT                = 0x19
-	TCP_QUEUE_SEQ                    = 0x15
-	TCP_QUICKACK                     = 0xc
-	TCP_REPAIR                       = 0x13
-	TCP_REPAIR_OPTIONS               = 0x16
-	TCP_REPAIR_QUEUE                 = 0x14
-	TCP_SAVED_SYN                    = 0x1c
-	TCP_SAVE_SYN                     = 0x1b
-	TCP_SYNCNT                       = 0x7
-	TCP_S_DATA_IN                    = 0x4
-	TCP_S_DATA_OUT                   = 0x8
-	TCP_THIN_DUPACK                  = 0x11
-	TCP_THIN_LINEAR_TIMEOUTS         = 0x10
-	TCP_TIMESTAMP                    = 0x18
-	TCP_USER_TIMEOUT                 = 0x12
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TCSBRK                           = 0x20005405
-	TCSBRKP                          = 0x5425
-	TCSETA                           = 0x80125402
-	TCSETAF                          = 0x80125404
-	TCSETAW                          = 0x80125403
-	TCSETS                           = 0x80245409
-	TCSETS2                          = 0x802c540d
-	TCSETSF                          = 0x8024540b
-	TCSETSF2                         = 0x802c540f
-	TCSETSW                          = 0x8024540a
-	TCSETSW2                         = 0x802c540e
-	TCXONC                           = 0x20005406
-	TIOCCBRK                         = 0x2000747a
-	TIOCCONS                         = 0x20007424
-	TIOCEXCL                         = 0x2000740d
-	TIOCGDEV                         = 0x40045432
-	TIOCGETD                         = 0x40047400
-	TIOCGEXCL                        = 0x40045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGPGRP                        = 0x40047483
-	TIOCGPKT                         = 0x40045438
-	TIOCGPTLCK                       = 0x40045439
-	TIOCGPTN                         = 0x40047486
-	TIOCGRS485                       = 0x40205441
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x40047485
-	TIOCGSOFTCAR                     = 0x40047464
-	TIOCGWINSZ                       = 0x40087468
-	TIOCINQ                          = 0x4004667f
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x8004746b
-	TIOCMBIS                         = 0x8004746c
-	TIOCMGET                         = 0x4004746a
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x8004746d
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_LOOP                       = 0x8000
-	TIOCM_OUT1                       = 0x2000
-	TIOCM_OUT2                       = 0x4000
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x20007471
-	TIOCNXCL                         = 0x2000740e
-	TIOCOUTQ                         = 0x40047473
-	TIOCPKT                          = 0x80047470
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x2000747b
-	TIOCSCTTY                        = 0x20007484
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETD                         = 0x80047401
-	TIOCSIG                          = 0x80047488
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSPGRP                        = 0x80047482
-	TIOCSPTLCK                       = 0x80047487
-	TIOCSRS485                       = 0xc0205442
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x80047465
-	TIOCSTART                        = 0x2000746e
-	TIOCSTI                          = 0x80017472
-	TIOCSTOP                         = 0x2000746f
-	TIOCSWINSZ                       = 0x80087467
-	TIOCVHANGUP                      = 0x20005437
-	TOSTOP                           = 0x100
-	TUNATTACHFILTER                  = 0x801054d5
-	TUNDETACHFILTER                  = 0x801054d6
-	TUNGETFEATURES                   = 0x400454cf
-	TUNGETFILTER                     = 0x401054db
-	TUNGETIFF                        = 0x400454d2
-	TUNGETSNDBUF                     = 0x400454d3
-	TUNGETVNETBE                     = 0x400454df
-	TUNGETVNETHDRSZ                  = 0x400454d7
-	TUNGETVNETLE                     = 0x400454dd
-	TUNSETDEBUG                      = 0x800454c9
-	TUNSETGROUP                      = 0x800454ce
-	TUNSETIFF                        = 0x800454ca
-	TUNSETIFINDEX                    = 0x800454da
-	TUNSETLINK                       = 0x800454cd
-	TUNSETNOCSUM                     = 0x800454c8
-	TUNSETOFFLOAD                    = 0x800454d0
-	TUNSETOWNER                      = 0x800454cc
-	TUNSETPERSIST                    = 0x800454cb
-	TUNSETQUEUE                      = 0x800454d9
-	TUNSETSNDBUF                     = 0x800454d4
-	TUNSETTXFILTER                   = 0x800454d1
-	TUNSETVNETBE                     = 0x800454de
-	TUNSETVNETHDRSZ                  = 0x800454d8
-	TUNSETVNETLE                     = 0x800454dc
-	VDISCARD                         = 0xd
-	VDSUSP                           = 0xb
-	VEOF                             = 0x4
-	VEOL                             = 0x5
-	VEOL2                            = 0x6
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x4
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xc
-	VSTART                           = 0x8
-	VSTOP                            = 0x9
-	VSUSP                            = 0xa
-	VSWTC                            = 0x7
-	VT0                              = 0x0
-	VT1                              = 0x4000
-	VTDLY                            = 0x4000
-	VTIME                            = 0x5
-	VWERASE                          = 0xe
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WRAP                             = 0x20000
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-	XCASE                            = 0x4
-	XTABS                            = 0x1800
-	__TIOCFLUSH                      = 0x80047410
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EADV            = syscall.Errno(0x53)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x25)
-	EBADE           = syscall.Errno(0x66)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x5d)
-	EBADMSG         = syscall.Errno(0x4c)
-	EBADR           = syscall.Errno(0x67)
-	EBADRQC         = syscall.Errno(0x6a)
-	EBADSLT         = syscall.Errno(0x6b)
-	EBFONT          = syscall.Errno(0x6d)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x7f)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x5e)
-	ECOMM           = syscall.Errno(0x55)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0x4e)
-	EDEADLOCK       = syscall.Errno(0x6c)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDOM            = syscall.Errno(0x21)
-	EDOTDOT         = syscall.Errno(0x58)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EHWPOISON       = syscall.Errno(0x87)
-	EIDRM           = syscall.Errno(0x4d)
-	EILSEQ          = syscall.Errno(0x7a)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	EISNAM          = syscall.Errno(0x78)
-	EKEYEXPIRED     = syscall.Errno(0x81)
-	EKEYREJECTED    = syscall.Errno(0x83)
-	EKEYREVOKED     = syscall.Errno(0x82)
-	EL2HLT          = syscall.Errno(0x65)
-	EL2NSYNC        = syscall.Errno(0x5f)
-	EL3HLT          = syscall.Errno(0x60)
-	EL3RST          = syscall.Errno(0x61)
-	ELIBACC         = syscall.Errno(0x72)
-	ELIBBAD         = syscall.Errno(0x70)
-	ELIBEXEC        = syscall.Errno(0x6e)
-	ELIBMAX         = syscall.Errno(0x7b)
-	ELIBSCN         = syscall.Errno(0x7c)
-	ELNRNG          = syscall.Errno(0x62)
-	ELOOP           = syscall.Errno(0x3e)
-	EMEDIUMTYPE     = syscall.Errno(0x7e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x57)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENAVAIL         = syscall.Errno(0x77)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x69)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENOCSI          = syscall.Errno(0x64)
-	ENODATA         = syscall.Errno(0x6f)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOKEY          = syscall.Errno(0x80)
-	ENOLCK          = syscall.Errno(0x4f)
-	ENOLINK         = syscall.Errno(0x52)
-	ENOMEDIUM       = syscall.Errno(0x7d)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x4b)
-	ENONET          = syscall.Errno(0x50)
-	ENOPKG          = syscall.Errno(0x71)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x4a)
-	ENOSTR          = syscall.Errno(0x48)
-	ENOSYS          = syscall.Errno(0x5a)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTNAM         = syscall.Errno(0x76)
-	ENOTRECOVERABLE = syscall.Errno(0x85)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x2d)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x73)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x2d)
-	EOVERFLOW       = syscall.Errno(0x5c)
-	EOWNERDEAD      = syscall.Errno(0x84)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROTO          = syscall.Errno(0x56)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x59)
-	EREMOTE         = syscall.Errno(0x47)
-	EREMOTEIO       = syscall.Errno(0x79)
-	ERESTART        = syscall.Errno(0x74)
-	ERFKILL         = syscall.Errno(0x86)
-	EROFS           = syscall.Errno(0x1e)
-	ERREMOTE        = syscall.Errno(0x51)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x54)
-	ESTALE          = syscall.Errno(0x46)
-	ESTRPIPE        = syscall.Errno(0x5b)
-	ETIME           = syscall.Errno(0x49)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUCLEAN         = syscall.Errno(0x75)
-	EUNATCH         = syscall.Errno(0x63)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x68)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCLD    = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGLOST   = syscall.Signal(0x1d)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPOLL   = syscall.Signal(0x17)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x1d)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	36:  "operation now in progress",
-	37:  "operation already in progress",
-	38:  "socket operation on non-socket",
-	39:  "destination address required",
-	40:  "message too long",
-	41:  "protocol wrong type for socket",
-	42:  "protocol not available",
-	43:  "protocol not supported",
-	44:  "socket type not supported",
-	45:  "operation not supported",
-	46:  "protocol family not supported",
-	47:  "address family not supported by protocol",
-	48:  "address already in use",
-	49:  "cannot assign requested address",
-	50:  "network is down",
-	51:  "network is unreachable",
-	52:  "network dropped connection on reset",
-	53:  "software caused connection abort",
-	54:  "connection reset by peer",
-	55:  "no buffer space available",
-	56:  "transport endpoint is already connected",
-	57:  "transport endpoint is not connected",
-	58:  "cannot send after transport endpoint shutdown",
-	59:  "too many references: cannot splice",
-	60:  "connection timed out",
-	61:  "connection refused",
-	62:  "too many levels of symbolic links",
-	63:  "file name too long",
-	64:  "host is down",
-	65:  "no route to host",
-	66:  "directory not empty",
-	67:  "too many processes",
-	68:  "too many users",
-	69:  "disk quota exceeded",
-	70:  "stale file handle",
-	71:  "object is remote",
-	72:  "device not a stream",
-	73:  "timer expired",
-	74:  "out of streams resources",
-	75:  "no message of desired type",
-	76:  "bad message",
-	77:  "identifier removed",
-	78:  "resource deadlock avoided",
-	79:  "no locks available",
-	80:  "machine is not on the network",
-	81:  "unknown error 81",
-	82:  "link has been severed",
-	83:  "advertise error",
-	84:  "srmount error",
-	85:  "communication error on send",
-	86:  "protocol error",
-	87:  "multihop attempted",
-	88:  "RFS specific error",
-	89:  "remote address changed",
-	90:  "function not implemented",
-	91:  "streams pipe error",
-	92:  "value too large for defined data type",
-	93:  "file descriptor in bad state",
-	94:  "channel number out of range",
-	95:  "level 2 not synchronized",
-	96:  "level 3 halted",
-	97:  "level 3 reset",
-	98:  "link number out of range",
-	99:  "protocol driver not attached",
-	100: "no CSI structure available",
-	101: "level 2 halted",
-	102: "invalid exchange",
-	103: "invalid request descriptor",
-	104: "exchange full",
-	105: "no anode",
-	106: "invalid request code",
-	107: "invalid slot",
-	108: "file locking deadlock error",
-	109: "bad font file format",
-	110: "cannot exec a shared library directly",
-	111: "no data available",
-	112: "accessing a corrupted shared library",
-	113: "package not installed",
-	114: "can not access a needed shared library",
-	115: "name not unique on network",
-	116: "interrupted system call should be restarted",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "invalid or incomplete multibyte or wide character",
-	123: "attempting to link in too many shared libraries",
-	124: ".lib section in a.out corrupted",
-	125: "no medium found",
-	126: "wrong medium type",
-	127: "operation canceled",
-	128: "required key not available",
-	129: "key has expired",
-	130: "key has been revoked",
-	131: "key was rejected by service",
-	132: "owner died",
-	133: "state not recoverable",
-	134: "operation not possible due to RF-kill",
-	135: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "stopped (signal)",
-	18: "stopped",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "resource lost",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-}


[27/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/newt/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
deleted file mode 100644
index 8f92012..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ /dev/null
@@ -1,1819 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x28
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x1008
-	B110                             = 0x3
-	B115200                          = 0x1002
-	B1152000                         = 0x1009
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x100a
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x100b
-	B230400                          = 0x1003
-	B2400                            = 0xb
-	B2500000                         = 0x100c
-	B300                             = 0x7
-	B3000000                         = 0x100d
-	B3500000                         = 0x100e
-	B38400                           = 0xf
-	B4000000                         = 0x100f
-	B460800                          = 0x1004
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x1005
-	B57600                           = 0x1001
-	B576000                          = 0x1006
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x1007
-	B9600                            = 0xd
-	BOTHER                           = 0x1000
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BRKINT                           = 0x2
-	BS0                              = 0x0
-	BS1                              = 0x2000
-	BSDLY                            = 0x2000
-	CBAUD                            = 0x100f
-	CBAUDEX                          = 0x1000
-	CFLUSH                           = 0xf
-	CIBAUD                           = 0x100f0000
-	CLOCAL                           = 0x800
-	CLOCK_BOOTTIME                   = 0x7
-	CLOCK_BOOTTIME_ALARM             = 0x9
-	CLOCK_DEFAULT                    = 0x0
-	CLOCK_EXT                        = 0x1
-	CLOCK_INT                        = 0x2
-	CLOCK_MONOTONIC                  = 0x1
-	CLOCK_MONOTONIC_COARSE           = 0x6
-	CLOCK_MONOTONIC_RAW              = 0x4
-	CLOCK_PROCESS_CPUTIME_ID         = 0x2
-	CLOCK_REALTIME                   = 0x0
-	CLOCK_REALTIME_ALARM             = 0x8
-	CLOCK_REALTIME_COARSE            = 0x5
-	CLOCK_THREAD_CPUTIME_ID          = 0x3
-	CLOCK_TXFROMRX                   = 0x4
-	CLOCK_TXINT                      = 0x3
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWCGROUP                  = 0x2000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CMSPAR                           = 0x40000000
-	CR0                              = 0x0
-	CR1                              = 0x200
-	CR2                              = 0x400
-	CR3                              = 0x600
-	CRDLY                            = 0x600
-	CREAD                            = 0x80
-	CRTSCTS                          = 0x80000000
-	CS5                              = 0x0
-	CS6                              = 0x10
-	CS7                              = 0x20
-	CS8                              = 0x30
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x30
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x40
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x200
-	ECHOE                            = 0x10
-	ECHOK                            = 0x20
-	ECHOKE                           = 0x800
-	ECHONL                           = 0x40
-	ECHOPRT                          = 0x400
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	EPOLL_NONBLOCK                   = 0x800
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FF0                              = 0x0
-	FF1                              = 0x8000
-	FFDLY                            = 0x8000
-	FLUSHO                           = 0x1000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0xc
-	F_GETLK64                        = 0xc
-	F_GETOWN                         = 0x9
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0xd
-	F_SETLK64                        = 0xd
-	F_SETLKW                         = 0xe
-	F_SETLKW64                       = 0xe
-	F_SETOWN                         = 0x8
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x400
-	IBSHIFT                          = 0x10
-	ICANON                           = 0x2
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x8000
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_NODAD                      = 0x2
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x7
-	IFF_802_1Q_VLAN                  = 0x1
-	IFF_ALLMULTI                     = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BONDING                      = 0x20
-	IFF_BRIDGE_PORT                  = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DISABLE_NETPOLL              = 0x1000
-	IFF_DONT_BRIDGE                  = 0x800
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_EBRIDGE                      = 0x2
-	IFF_ECHO                         = 0x40000
-	IFF_ISATAP                       = 0x80
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MACVLAN_PORT                 = 0x2000
-	IFF_MASTER                       = 0x400
-	IFF_MASTER_8023AD                = 0x8
-	IFF_MASTER_ALB                   = 0x10
-	IFF_MASTER_ARPMON                = 0x100
-	IFF_MULTICAST                    = 0x1000
-	IFF_NOARP                        = 0x80
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_OVS_DATAPATH                 = 0x8000
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_SLAVE_INACTIVE               = 0x4
-	IFF_SLAVE_NEEDARP                = 0x40
-	IFF_TAP                          = 0x2
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_TX_SKB_SHARING               = 0x10000
-	IFF_UNICAST_FLT                  = 0x20000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFF_WAN_HDLC                     = 0x200
-	IFF_XMIT_DST_RELEASE             = 0x400
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x800
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x1
-	ISTRIP                           = 0x20
-	IUCLC                            = 0x200
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x1000
-	IXON                             = 0x400
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DOFORK                      = 0xb
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_32BIT                        = 0x40
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x100
-	MAP_HUGETLB                      = 0x40000
-	MAP_LOCKED                       = 0x2000
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x4000
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x20000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x1
-	MCL_FUTURE                       = 0x2
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NL0                              = 0x0
-	NL1                              = 0x100
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLDLY                            = 0x100
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	OLCUC                            = 0x2
-	ONLCR                            = 0x4
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x400
-	O_ASYNC                          = 0x2000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x40
-	O_DIRECT                         = 0x4000
-	O_DIRECTORY                      = 0x10000
-	O_DSYNC                          = 0x1000
-	O_EXCL                           = 0x80
-	O_FSYNC                          = 0x101000
-	O_LARGEFILE                      = 0x8000
-	O_NDELAY                         = 0x800
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x100
-	O_NOFOLLOW                       = 0x20000
-	O_NONBLOCK                       = 0x800
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x101000
-	O_SYNC                           = 0x101000
-	O_TMPFILE                        = 0x410000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x100
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x200
-	PENDIN                           = 0x4000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = 0xffffffff
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETFPREGS                 = 0xe
-	PTRACE_GETFPXREGS                = 0x12
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GET_THREAD_AREA           = 0x19
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_OLDSETOPTIONS             = 0x15
-	PTRACE_O_MASK                    = 0xff
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SEIZE_DEVEL               = 0x80000000
-	PTRACE_SETFPREGS                 = 0xf
-	PTRACE_SETFPXREGS                = 0x13
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SET_THREAD_AREA           = 0x1a
-	PTRACE_SINGLEBLOCK               = 0x21
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_SYSEMU                    = 0x1f
-	PTRACE_SYSEMU_SINGLESTEP         = 0x20
-	PTRACE_TRACEME                   = 0x0
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x7
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0xe
-	RTAX_MTU                         = 0x2
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x10
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x4f
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x10
-	RTM_NR_MSGTYPES                  = 0x40
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x800
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0x1
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1e
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BROADCAST                     = 0x6
-	SO_BSDCOMPAT                     = 0xe
-	SO_DEBUG                         = 0x1
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x27
-	SO_DONTROUTE                     = 0x5
-	SO_ERROR                         = 0x4
-	SO_KEEPALIVE                     = 0x9
-	SO_LINGER                        = 0xd
-	SO_MARK                          = 0x24
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0xa
-	SO_PASSCRED                      = 0x10
-	SO_PASSSEC                       = 0x22
-	SO_PEERCRED                      = 0x11
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1f
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x26
-	SO_RCVBUF                        = 0x8
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x12
-	SO_RCVTIMEO                      = 0x14
-	SO_REUSEADDR                     = 0x2
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SNDBUF                        = 0x7
-	SO_SNDBUFFORCE                   = 0x20
-	SO_SNDLOWAT                      = 0x13
-	SO_SNDTIMEO                      = 0x15
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x3
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TAB0                             = 0x0
-	TAB1                             = 0x800
-	TAB2                             = 0x1000
-	TAB3                             = 0x1800
-	TABDLY                           = 0x1800
-	TCFLSH                           = 0x540b
-	TCGETA                           = 0x5405
-	TCGETS                           = 0x5401
-	TCGETS2                          = 0x802c542a
-	TCGETX                           = 0x5432
-	TCIFLUSH                         = 0x0
-	TCIOFF                           = 0x2
-	TCIOFLUSH                        = 0x2
-	TCION                            = 0x3
-	TCOFLUSH                         = 0x1
-	TCOOFF                           = 0x0
-	TCOON                            = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_NODELAY                      = 0x1
-	TCP_QUICKACK                     = 0xc
-	TCP_SYNCNT                       = 0x7
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TCSBRK                           = 0x5409
-	TCSBRKP                          = 0x5425
-	TCSETA                           = 0x5406
-	TCSETAF                          = 0x5408
-	TCSETAW                          = 0x5407
-	TCSETS                           = 0x5402
-	TCSETS2                          = 0x402c542b
-	TCSETSF                          = 0x5404
-	TCSETSF2                         = 0x402c542d
-	TCSETSW                          = 0x5403
-	TCSETSW2                         = 0x402c542c
-	TCSETX                           = 0x5433
-	TCSETXF                          = 0x5434
-	TCSETXW                          = 0x5435
-	TCXONC                           = 0x540a
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x541d
-	TIOCEXCL                         = 0x540c
-	TIOCGDEV                         = 0x80045432
-	TIOCGETD                         = 0x5424
-	TIOCGEXCL                        = 0x80045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGPGRP                        = 0x540f
-	TIOCGPKT                         = 0x80045438
-	TIOCGPTLCK                       = 0x80045439
-	TIOCGPTN                         = 0x80045430
-	TIOCGRS485                       = 0x542e
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x5429
-	TIOCGSOFTCAR                     = 0x5419
-	TIOCGWINSZ                       = 0x5413
-	TIOCINQ                          = 0x541b
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x5417
-	TIOCMBIS                         = 0x5416
-	TIOCMGET                         = 0x5415
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x5418
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x5422
-	TIOCNXCL                         = 0x540d
-	TIOCOUTQ                         = 0x5411
-	TIOCPKT                          = 0x5420
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x540e
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETD                         = 0x5423
-	TIOCSIG                          = 0x40045436
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSPGRP                        = 0x5410
-	TIOCSPTLCK                       = 0x40045431
-	TIOCSRS485                       = 0x542f
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x541a
-	TIOCSTI                          = 0x5412
-	TIOCSWINSZ                       = 0x5414
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x100
-	TUNATTACHFILTER                  = 0x400854d5
-	TUNDETACHFILTER                  = 0x400854d6
-	TUNGETFEATURES                   = 0x800454cf
-	TUNGETIFF                        = 0x800454d2
-	TUNGETSNDBUF                     = 0x800454d3
-	TUNGETVNETHDRSZ                  = 0x800454d7
-	TUNSETDEBUG                      = 0x400454c9
-	TUNSETGROUP                      = 0x400454ce
-	TUNSETIFF                        = 0x400454ca
-	TUNSETLINK                       = 0x400454cd
-	TUNSETNOCSUM                     = 0x400454c8
-	TUNSETOFFLOAD                    = 0x400454d0
-	TUNSETOWNER                      = 0x400454cc
-	TUNSETPERSIST                    = 0x400454cb
-	TUNSETSNDBUF                     = 0x400454d4
-	TUNSETTXFILTER                   = 0x400454d1
-	TUNSETVNETHDRSZ                  = 0x400454d8
-	VDISCARD                         = 0xd
-	VEOF                             = 0x4
-	VEOL                             = 0xb
-	VEOL2                            = 0x10
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x6
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xc
-	VSTART                           = 0x8
-	VSTOP                            = 0x9
-	VSUSP                            = 0xa
-	VSWTC                            = 0x7
-	VT0                              = 0x0
-	VT1                              = 0x4000
-	VTDLY                            = 0x4000
-	VTIME                            = 0x5
-	VWERASE                          = 0xe
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x20
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-	XCASE                            = 0x4
-	XTABS                            = 0x1800
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x62)
-	EADDRNOTAVAIL   = syscall.Errno(0x63)
-	EADV            = syscall.Errno(0x44)
-	EAFNOSUPPORT    = syscall.Errno(0x61)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x72)
-	EBADE           = syscall.Errno(0x34)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x4d)
-	EBADMSG         = syscall.Errno(0x4a)
-	EBADR           = syscall.Errno(0x35)
-	EBADRQC         = syscall.Errno(0x38)
-	EBADSLT         = syscall.Errno(0x39)
-	EBFONT          = syscall.Errno(0x3b)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x7d)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x2c)
-	ECOMM           = syscall.Errno(0x46)
-	ECONNABORTED    = syscall.Errno(0x67)
-	ECONNREFUSED    = syscall.Errno(0x6f)
-	ECONNRESET      = syscall.Errno(0x68)
-	EDEADLK         = syscall.Errno(0x23)
-	EDEADLOCK       = syscall.Errno(0x23)
-	EDESTADDRREQ    = syscall.Errno(0x59)
-	EDOM            = syscall.Errno(0x21)
-	EDOTDOT         = syscall.Errno(0x49)
-	EDQUOT          = syscall.Errno(0x7a)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x70)
-	EHOSTUNREACH    = syscall.Errno(0x71)
-	EHWPOISON       = syscall.Errno(0x85)
-	EIDRM           = syscall.Errno(0x2b)
-	EILSEQ          = syscall.Errno(0x54)
-	EINPROGRESS     = syscall.Errno(0x73)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x6a)
-	EISDIR          = syscall.Errno(0x15)
-	EISNAM          = syscall.Errno(0x78)
-	EKEYEXPIRED     = syscall.Errno(0x7f)
-	EKEYREJECTED    = syscall.Errno(0x81)
-	EKEYREVOKED     = syscall.Errno(0x80)
-	EL2HLT          = syscall.Errno(0x33)
-	EL2NSYNC        = syscall.Errno(0x2d)
-	EL3HLT          = syscall.Errno(0x2e)
-	EL3RST          = syscall.Errno(0x2f)
-	ELIBACC         = syscall.Errno(0x4f)
-	ELIBBAD         = syscall.Errno(0x50)
-	ELIBEXEC        = syscall.Errno(0x53)
-	ELIBMAX         = syscall.Errno(0x52)
-	ELIBSCN         = syscall.Errno(0x51)
-	ELNRNG          = syscall.Errno(0x30)
-	ELOOP           = syscall.Errno(0x28)
-	EMEDIUMTYPE     = syscall.Errno(0x7c)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x5a)
-	EMULTIHOP       = syscall.Errno(0x48)
-	ENAMETOOLONG    = syscall.Errno(0x24)
-	ENAVAIL         = syscall.Errno(0x77)
-	ENETDOWN        = syscall.Errno(0x64)
-	ENETRESET       = syscall.Errno(0x66)
-	ENETUNREACH     = syscall.Errno(0x65)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x37)
-	ENOBUFS         = syscall.Errno(0x69)
-	ENOCSI          = syscall.Errno(0x32)
-	ENODATA         = syscall.Errno(0x3d)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOKEY          = syscall.Errno(0x7e)
-	ENOLCK          = syscall.Errno(0x25)
-	ENOLINK         = syscall.Errno(0x43)
-	ENOMEDIUM       = syscall.Errno(0x7b)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x2a)
-	ENONET          = syscall.Errno(0x40)
-	ENOPKG          = syscall.Errno(0x41)
-	ENOPROTOOPT     = syscall.Errno(0x5c)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x3f)
-	ENOSTR          = syscall.Errno(0x3c)
-	ENOSYS          = syscall.Errno(0x26)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x6b)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x27)
-	ENOTNAM         = syscall.Errno(0x76)
-	ENOTRECOVERABLE = syscall.Errno(0x83)
-	ENOTSOCK        = syscall.Errno(0x58)
-	ENOTSUP         = syscall.Errno(0x5f)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x4c)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x5f)
-	EOVERFLOW       = syscall.Errno(0x4b)
-	EOWNERDEAD      = syscall.Errno(0x82)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x60)
-	EPIPE           = syscall.Errno(0x20)
-	EPROTO          = syscall.Errno(0x47)
-	EPROTONOSUPPORT = syscall.Errno(0x5d)
-	EPROTOTYPE      = syscall.Errno(0x5b)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x4e)
-	EREMOTE         = syscall.Errno(0x42)
-	EREMOTEIO       = syscall.Errno(0x79)
-	ERESTART        = syscall.Errno(0x55)
-	ERFKILL         = syscall.Errno(0x84)
-	EROFS           = syscall.Errno(0x1e)
-	ESHUTDOWN       = syscall.Errno(0x6c)
-	ESOCKTNOSUPPORT = syscall.Errno(0x5e)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x45)
-	ESTALE          = syscall.Errno(0x74)
-	ESTRPIPE        = syscall.Errno(0x56)
-	ETIME           = syscall.Errno(0x3e)
-	ETIMEDOUT       = syscall.Errno(0x6e)
-	ETOOMANYREFS    = syscall.Errno(0x6d)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUCLEAN         = syscall.Errno(0x75)
-	EUNATCH         = syscall.Errno(0x31)
-	EUSERS          = syscall.Errno(0x57)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x36)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0x7)
-	SIGCHLD   = syscall.Signal(0x11)
-	SIGCLD    = syscall.Signal(0x11)
-	SIGCONT   = syscall.Signal(0x12)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x1d)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPOLL   = syscall.Signal(0x1d)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x1e)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTKFLT = syscall.Signal(0x10)
-	SIGSTOP   = syscall.Signal(0x13)
-	SIGSYS    = syscall.Signal(0x1f)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x14)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGUNUSED = syscall.Signal(0x1f)
-	SIGURG    = syscall.Signal(0x17)
-	SIGUSR1   = syscall.Signal(0xa)
-	SIGUSR2   = syscall.Signal(0xc)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	35:  "resource deadlock avoided",
-	36:  "file name too long",
-	37:  "no locks available",
-	38:  "function not implemented",
-	39:  "directory not empty",
-	40:  "too many levels of symbolic links",
-	42:  "no message of desired type",
-	43:  "identifier removed",
-	44:  "channel number out of range",
-	45:  "level 2 not synchronized",
-	46:  "level 3 halted",
-	47:  "level 3 reset",
-	48:  "link number out of range",
-	49:  "protocol driver not attached",
-	50:  "no CSI structure available",
-	51:  "level 2 halted",
-	52:  "invalid exchange",
-	53:  "invalid request descriptor",
-	54:  "exchange full",
-	55:  "no anode",
-	56:  "invalid request code",
-	57:  "invalid slot",
-	59:  "bad font file format",
-	60:  "device not a stream",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of streams resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "multihop attempted",
-	73:  "RFS specific error",
-	74:  "bad message",
-	75:  "value too large for defined data type",
-	76:  "name not unique on network",
-	77:  "file descriptor in bad state",
-	78:  "remote address changed",
-	79:  "can not access a needed shared library",
-	80:  "accessing a corrupted shared library",
-	81:  ".lib section in a.out corrupted",
-	82:  "attempting to link in too many shared libraries",
-	83:  "cannot exec a shared library directly",
-	84:  "invalid or incomplete multibyte or wide character",
-	85:  "interrupted system call should be restarted",
-	86:  "streams pipe error",
-	87:  "too many users",
-	88:  "socket operation on non-socket",
-	89:  "destination address required",
-	90:  "message too long",
-	91:  "protocol wrong type for socket",
-	92:  "protocol not available",
-	93:  "protocol not supported",
-	94:  "socket type not supported",
-	95:  "operation not supported",
-	96:  "protocol family not supported",
-	97:  "address family not supported by protocol",
-	98:  "address already in use",
-	99:  "cannot assign requested address",
-	100: "network is down",
-	101: "network is unreachable",
-	102: "network dropped connection on reset",
-	103: "software caused connection abort",
-	104: "connection reset by peer",
-	105: "no buffer space available",
-	106: "transport endpoint is already connected",
-	107: "transport endpoint is not connected",
-	108: "cannot send after transport endpoint shutdown",
-	109: "too many references: cannot splice",
-	110: "connection timed out",
-	111: "connection refused",
-	112: "host is down",
-	113: "no route to host",
-	114: "operation already in progress",
-	115: "operation now in progress",
-	116: "stale NFS file handle",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "disk quota exceeded",
-	123: "no medium found",
-	124: "wrong medium type",
-	125: "operation canceled",
-	126: "required key not available",
-	127: "key has expired",
-	128: "key has been revoked",
-	129: "key was rejected by service",
-	130: "owner died",
-	131: "state not recoverable",
-	132: "operation not possible due to RF-kill",
-	133: "unknown error 133",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "bus error",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "user defined signal 1",
-	11: "segmentation fault",
-	12: "user defined signal 2",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "stack fault",
-	17: "child exited",
-	18: "continued",
-	19: "stopped (signal)",
-	20: "stopped",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "urgent I/O condition",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "I/O possible",
-	30: "power failure",
-	31: "bad system call",
-}


[59/67] [abbrv] incubator-mynewt-newtmgr git commit: nmxact - Scan to determine peer address.

Posted by cc...@apache.org.
nmxact - Scan to determine peer address.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/2c153c28
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/2c153c28
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/2c153c28

Branch: refs/heads/master
Commit: 2c153c283bfb17ae9b8f0bfc5916cd11cf0a5247
Parents: d24f040
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Mar 16 19:15:08 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 nmxact/bledefs/bledefs.go      | 145 +++++++++++++++++++++++++++++++-----
 nmxact/nmble/ble_act.go        |  75 +++++++++++++++++++
 nmxact/nmble/ble_fsm.go        | 108 ++++++++++++++++++++++-----
 nmxact/nmble/ble_oic_sesn.go   |   2 +-
 nmxact/nmble/ble_plain_sesn.go |   2 +-
 nmxact/nmble/ble_proto.go      |  69 +++++++++++++++++
 nmxact/nmble/ble_util.go       |  16 ++++
 nmxact/nmble/dispatch.go       |   6 ++
 nmxact/sesn/sesn_cfg.go        |   2 +-
 9 files changed, 385 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/2c153c28/nmxact/bledefs/bledefs.go
----------------------------------------------------------------------
diff --git a/nmxact/bledefs/bledefs.go b/nmxact/bledefs/bledefs.go
index 314cbec..5b12d0a 100644
--- a/nmxact/bledefs/bledefs.go
+++ b/nmxact/bledefs/bledefs.go
@@ -27,10 +27,10 @@ import (
 	"strings"
 )
 
-type BleAddrType int
-
 const BLE_ATT_ATTR_MAX_LEN = 512
 
+type BleAddrType int
+
 const (
 	BLE_ADDR_TYPE_PUBLIC  BleAddrType = 0
 	BLE_ADDR_TYPE_RANDOM              = 1
@@ -45,21 +45,6 @@ var BleAddrTypeStringMap = map[BleAddrType]string{
 	BLE_ADDR_TYPE_RPA_RND: "rpa_rnd",
 }
 
-type BleAddr struct {
-	Bytes [6]byte
-}
-
-type BleDev struct {
-	AddrType BleAddrType
-	Addr     BleAddr
-}
-
-func (bd *BleDev) String() string {
-	return fmt.Sprintf("%s,%s",
-		BleAddrTypeToString(bd.AddrType),
-		bd.Addr.String())
-}
-
 func BleAddrTypeToString(addrType BleAddrType) string {
 	s := BleAddrTypeStringMap[addrType]
 	if s == "" {
@@ -95,6 +80,10 @@ func (a *BleAddrType) UnmarshalJSON(data []byte) error {
 	return err
 }
 
+type BleAddr struct {
+	Bytes [6]byte
+}
+
 func ParseBleAddr(s string) (BleAddr, error) {
 	ba := BleAddr{}
 
@@ -146,3 +135,125 @@ func (ba *BleAddr) UnmarshalJSON(data []byte) error {
 
 	return nil
 }
+
+type BleDev struct {
+	AddrType BleAddrType
+	Addr     BleAddr
+}
+
+func (bd *BleDev) String() string {
+	return fmt.Sprintf("%s,%s",
+		BleAddrTypeToString(bd.AddrType),
+		bd.Addr.String())
+}
+
+type BlePeerSpec struct {
+	Name string
+	Dev  BleDev // Only used if name not present.
+}
+
+type BleScanFilterPolicy int
+
+const (
+	BLE_SCAN_FILT_NO_WL        BleScanFilterPolicy = 0
+	BLE_SCAN_FILT_USE_WL                           = 1
+	BLE_SCAN_FILT_NO_WL_INITA                      = 2
+	BLE_SCAN_FILT_USE_WL_INITA                     = 3
+)
+
+var BleScanFilterPolicyStringMap = map[BleScanFilterPolicy]string{
+	BLE_SCAN_FILT_NO_WL:        "no_wl",
+	BLE_SCAN_FILT_USE_WL:       "use_wl",
+	BLE_SCAN_FILT_NO_WL_INITA:  "no_wl_inita",
+	BLE_SCAN_FILT_USE_WL_INITA: "use_wl_inita",
+}
+
+func BleScanFilterPolicyToString(filtPolicy BleScanFilterPolicy) string {
+	s := BleScanFilterPolicyStringMap[filtPolicy]
+	if s == "" {
+		panic(fmt.Sprintf("Invalid BleScanFilterPolicy: %d", int(filtPolicy)))
+	}
+
+	return s
+}
+
+func BleScanFilterPolicyFromString(s string) (BleScanFilterPolicy, error) {
+	for filtPolicy, name := range BleScanFilterPolicyStringMap {
+		if s == name {
+			return filtPolicy, nil
+		}
+	}
+
+	return BleScanFilterPolicy(0),
+		fmt.Errorf("Invalid BleScanFilterPolicy string: %s", s)
+}
+
+func (a BleScanFilterPolicy) MarshalJSON() ([]byte, error) {
+	return json.Marshal(BleScanFilterPolicyToString(a))
+}
+
+func (a *BleScanFilterPolicy) UnmarshalJSON(data []byte) error {
+	var err error
+
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	*a, err = BleScanFilterPolicyFromString(s)
+	return err
+}
+
+type BleAdvEventType int
+
+const (
+	BLE_ADV_EVENT_IND           BleAdvEventType = 0
+	BLE_ADV_EVENT_DIRECT_IND_HD                 = 1
+	BLE_ADV_EVENT_SCAN_IND                      = 2
+	BLE_ADV_EVENT_NONCONN_IND                   = 3
+	BLE_ADV_EVENT_DIRECT_IND_LD                 = 4
+)
+
+var BleAdvEventTypeStringMap = map[BleAdvEventType]string{
+	BLE_ADV_EVENT_IND:           "ind",
+	BLE_ADV_EVENT_DIRECT_IND_HD: "direct_ind_hd",
+	BLE_ADV_EVENT_SCAN_IND:      "scan_ind",
+	BLE_ADV_EVENT_NONCONN_IND:   "nonconn_ind",
+	BLE_ADV_EVENT_DIRECT_IND_LD: "direct_ind_ld",
+}
+
+func BleAdvEventTypeToString(advEventType BleAdvEventType) string {
+	s := BleAdvEventTypeStringMap[advEventType]
+	if s == "" {
+		panic(fmt.Sprintf("Invalid BleAdvEventType: %d", int(advEventType)))
+	}
+
+	return s
+}
+
+func BleAdvEventTypeFromString(s string) (BleAdvEventType, error) {
+	for advEventType, name := range BleAdvEventTypeStringMap {
+		if s == name {
+			return advEventType, nil
+		}
+	}
+
+	return BleAdvEventType(0),
+		fmt.Errorf("Invalid BleAdvEventType string: %s", s)
+}
+
+func (a BleAdvEventType) MarshalJSON() ([]byte, error) {
+	return json.Marshal(BleAdvEventTypeToString(a))
+}
+
+func (a *BleAdvEventType) UnmarshalJSON(data []byte) error {
+	var err error
+
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	*a, err = BleAdvEventTypeFromString(s)
+	return err
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/2c153c28/nmxact/nmble/ble_act.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_act.go b/nmxact/nmble/ble_act.go
index 673010c..08c396f 100644
--- a/nmxact/nmble/ble_act.go
+++ b/nmxact/nmble/ble_act.go
@@ -286,3 +286,78 @@ func exchangeMtu(x *BleXport, bl *BleListener, r *BleExchangeMtuReq) (
 		}
 	}
 }
+
+type scanFn func(evt *BleScanEvt)
+
+func scan(x *BleXport, bl *BleListener, r *BleScanReq,
+	abortChan chan struct{}, scanCb scanFn) error {
+
+	j, err := json.Marshal(r)
+	if err != nil {
+		return err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return err
+	}
+
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleScanRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return StatusError(MSG_OP_RSP, MSG_TYPE_SCAN, msg.Status)
+				}
+
+			case *BleScanEvt:
+				scanCb(msg)
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return BhdTimeoutError(MSG_TYPE_EXCHANGE_MTU)
+
+		case <-abortChan:
+			return nil
+		}
+	}
+}
+
+func scanCancel(x *BleXport, bl *BleListener, r *BleScanCancelReq) error {
+	j, err := json.Marshal(r)
+	if err != nil {
+		return err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return err
+	}
+
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleScanCancelRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return StatusError(MSG_OP_RSP, MSG_TYPE_SCAN, msg.Status)
+				}
+				return nil
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return BhdTimeoutError(MSG_TYPE_EXCHANGE_MTU)
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/2c153c28/nmxact/nmble/ble_fsm.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_fsm.go b/nmxact/nmble/ble_fsm.go
index a9ce890..88ce90e 100644
--- a/nmxact/nmble/ble_fsm.go
+++ b/nmxact/nmble/ble_fsm.go
@@ -19,16 +19,17 @@ const DFLT_ATT_MTU = 23
 
 const (
 	SESN_STATE_UNCONNECTED     BleSesnState = 0
-	SESN_STATE_CONNECTING                   = 1
-	SESN_STATE_CONNECTED                    = 2
-	SESN_STATE_EXCHANGING_MTU               = 3
-	SESN_STATE_EXCHANGED_MTU                = 4
-	SESN_STATE_DISCOVERING_SVC              = 5
-	SESN_STATE_DISCOVERED_SVC               = 6
-	SESN_STATE_DISCOVERING_CHR              = 7
-	SESN_STATE_DISCOVERED_CHR               = 8
-	SESN_STATE_TERMINATING                  = 9
-	SESN_STATE_CONN_CANCELLING              = 10
+	SESN_STATE_SCANNING                     = 1
+	SESN_STATE_CONNECTING                   = 2
+	SESN_STATE_CONNECTED                    = 3
+	SESN_STATE_EXCHANGING_MTU               = 4
+	SESN_STATE_EXCHANGED_MTU                = 5
+	SESN_STATE_DISCOVERING_SVC              = 6
+	SESN_STATE_DISCOVERED_SVC               = 7
+	SESN_STATE_DISCOVERING_CHR              = 8
+	SESN_STATE_DISCOVERED_CHR               = 9
+	SESN_STATE_TERMINATING                  = 10
+	SESN_STATE_CONN_CANCELLING              = 11
 )
 
 type BleRxNmpFn func(data []byte)
@@ -37,7 +38,7 @@ type BleDisconnectFn func(err error)
 type BleFsmParams struct {
 	Bx           *BleXport
 	OwnAddrType  BleAddrType
-	Peer         BleDev
+	PeerSpec     BlePeerSpec
 	SvcUuid      BleUuid
 	ReqChrUuid   BleUuid
 	RspChrUuid   BleUuid
@@ -47,8 +48,9 @@ type BleFsmParams struct {
 
 type BleFsm struct {
 	bx           *BleXport
+	peerSpec     BlePeerSpec
 	ownAddrType  BleAddrType
-	peer         BleDev
+	peer         *BleDev
 	svcUuid      BleUuid
 	reqChrUuid   BleUuid
 	rspChrUuid   BleUuid
@@ -71,10 +73,10 @@ type BleFsm struct {
 }
 
 func NewBleFsm(p BleFsmParams) *BleFsm {
-	return &BleFsm{
+	bf := &BleFsm{
 		bx:           p.Bx,
+		peerSpec:     p.PeerSpec,
 		ownAddrType:  p.OwnAddrType,
-		peer:         p.Peer,
 		svcUuid:      p.SvcUuid,
 		reqChrUuid:   p.ReqChrUuid,
 		rspChrUuid:   p.RspChrUuid,
@@ -84,6 +86,12 @@ func NewBleFsm(p BleFsmParams) *BleFsm {
 		bls:    map[*BleListener]struct{}{},
 		attMtu: DFLT_ATT_MTU,
 	}
+
+	if bf.peerSpec.Name == "" {
+		bf.peer = &bf.peerSpec.Dev
+	}
+
+	return bf
 }
 
 func (bf *BleFsm) disconnectError(reason int) error {
@@ -347,6 +355,56 @@ func (bf *BleFsm) connect() error {
 	return nil
 }
 
+func (bf *BleFsm) scan() error {
+	r := NewBleScanReq()
+	r.OwnAddrType = bf.ownAddrType
+	r.DurationMs = 15000
+	r.FilterPolicy = BLE_SCAN_FILT_NO_WL
+	r.Limited = false
+	r.Passive = false
+	r.FilterDuplicates = true
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	abortChan := make(chan struct{}, 1)
+
+	scanCb := func(evt *BleScanEvt) {
+		if evt.DataName == bf.peerSpec.Name {
+			bf.peer = &BleDev{
+				AddrType: evt.AddrType,
+				Addr:     evt.Addr,
+			}
+			abortChan <- struct{}{}
+		}
+	}
+	if err := scan(bf.bx, bl, r, abortChan, scanCb); err != nil {
+		return err
+	}
+
+	// Scanning still in progress; cancel the operation.
+	return bf.scanCancel()
+}
+
+func (bf *BleFsm) scanCancel() error {
+	r := NewBleScanCancelReq()
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	if err := scanCancel(bf.bx, bl, r); err != nil {
+		return err
+	}
+
+	return nil
+}
+
 func (bf *BleFsm) terminateSetState() error {
 	bf.mtx.Lock()
 	defer bf.mtx.Unlock()
@@ -537,12 +595,22 @@ func (bf *BleFsm) Start() error {
 		state := bf.getState()
 		switch state {
 		case SESN_STATE_UNCONNECTED:
-			cb := func() error { return bf.connect() }
-			err := bf.action(
-				SESN_STATE_UNCONNECTED,
-				SESN_STATE_CONNECTING,
-				SESN_STATE_CONNECTED,
-				cb)
+			var err error
+			if bf.peer == nil {
+				cb := func() error { return bf.scan() }
+				err = bf.action(
+					SESN_STATE_UNCONNECTED,
+					SESN_STATE_SCANNING,
+					SESN_STATE_UNCONNECTED,
+					cb)
+			} else {
+				cb := func() error { return bf.connect() }
+				err = bf.action(
+					SESN_STATE_UNCONNECTED,
+					SESN_STATE_CONNECTING,
+					SESN_STATE_CONNECTED,
+					cb)
+			}
 
 			if err != nil {
 				return err

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/2c153c28/nmxact/nmble/ble_oic_sesn.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_oic_sesn.go b/nmxact/nmble/ble_oic_sesn.go
index 6c6de2f..f0dead2 100644
--- a/nmxact/nmble/ble_oic_sesn.go
+++ b/nmxact/nmble/ble_oic_sesn.go
@@ -49,7 +49,7 @@ func NewBleOicSesn(bx *BleXport, cfg sesn.SesnCfg) *BleOicSesn {
 	bos.bf = NewBleFsm(BleFsmParams{
 		Bx:           bx,
 		OwnAddrType:  cfg.Ble.OwnAddrType,
-		Peer:         cfg.Ble.Peer,
+		PeerSpec:     cfg.Ble.Peer,
 		SvcUuid:      svcUuid,
 		ReqChrUuid:   reqChrUuid,
 		RspChrUuid:   rspChrUuid,

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/2c153c28/nmxact/nmble/ble_plain_sesn.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_plain_sesn.go b/nmxact/nmble/ble_plain_sesn.go
index 967e320..c4b24c6 100644
--- a/nmxact/nmble/ble_plain_sesn.go
+++ b/nmxact/nmble/ble_plain_sesn.go
@@ -43,7 +43,7 @@ func NewBlePlainSesn(bx *BleXport, cfg sesn.SesnCfg) *BlePlainSesn {
 	bps.bf = NewBleFsm(BleFsmParams{
 		Bx:           bx,
 		OwnAddrType:  cfg.Ble.OwnAddrType,
-		Peer:         cfg.Ble.Peer,
+		PeerSpec:     cfg.Ble.Peer,
 		SvcUuid:      svcUuid,
 		ReqChrUuid:   chrUuid,
 		RspChrUuid:   chrUuid,

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/2c153c28/nmxact/nmble/ble_proto.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_proto.go b/nmxact/nmble/ble_proto.go
index f8f936b..80ef2a0 100644
--- a/nmxact/nmble/ble_proto.go
+++ b/nmxact/nmble/ble_proto.go
@@ -227,6 +227,8 @@ const (
 	MSG_TYPE_GEN_RAND_ADDR         = 12
 	MSG_TYPE_SET_RAND_ADDR         = 13
 	MSG_TYPE_CONN_CANCEL           = 14
+	MSG_TYPE_SCAN                  = 15
+	MSG_TYPE_SCAN_CANCEL           = 16
 
 	MSG_TYPE_SYNC_EVT       = 2049
 	MSG_TYPE_CONNECT_EVT    = 2050
@@ -236,6 +238,7 @@ const (
 	MSG_TYPE_WRITE_ACK_EVT  = 2054
 	MSG_TYPE_NOTIFY_RX_EVT  = 2055
 	MSG_TYPE_MTU_CHANGE_EVT = 2056
+	MSG_TYPE_SCAN_EVT       = 2057
 )
 
 var MsgOpStringMap = map[MsgOp]string{
@@ -255,6 +258,8 @@ var MsgTypeStringMap = map[MsgType]string{
 	MSG_TYPE_WRITE_CMD:     "write_cmd",
 	MSG_TYPE_EXCHANGE_MTU:  "exchange_mtu",
 	MSG_TYPE_CONN_CANCEL:   "conn_cancel",
+	MSG_TYPE_SCAN:          "scan",
+	MSG_TYPE_SCAN_CANCEL:   "scan_cancel",
 
 	MSG_TYPE_SYNC_EVT:       "sync_evt",
 	MSG_TYPE_CONNECT_EVT:    "connect_evt",
@@ -263,6 +268,7 @@ var MsgTypeStringMap = map[MsgType]string{
 	MSG_TYPE_DISC_CHR_EVT:   "disc_chr_evt",
 	MSG_TYPE_NOTIFY_RX_EVT:  "notify_rx_evt",
 	MSG_TYPE_MTU_CHANGE_EVT: "mtu_change_evt",
+	MSG_TYPE_SCAN_EVT:       "scan_evt",
 }
 
 type BleHdr struct {
@@ -579,6 +585,69 @@ type BleMtuChangeEvt struct {
 	Mtu        int `json:"mtu"`
 }
 
+type BleScanReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	OwnAddrType      BleAddrType         `json:"own_addr_type"`
+	DurationMs       int                 `json:"duration_ms"`
+	Itvl             int                 `json:"itvl"`
+	Window           int                 `json:"window"`
+	FilterPolicy     BleScanFilterPolicy `json:"filter_policy"`
+	Limited          bool                `json:"limited"`
+	Passive          bool                `json:"passive"`
+	FilterDuplicates bool                `json:"filter_duplicates"`
+}
+
+type BleScanRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleScanEvt struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	EventType BleAdvEventType `json:"event_type"`
+	AddrType  BleAddrType     `json:"addr_type"`
+	Addr      BleAddr         `json:"addr"`
+	Rssi      int8            `json:"rssi"`
+	Data      BleBytes        `json:"data"`
+
+	// Optional
+	DataFlags          uint8  `json:"data_flags"`
+	DataName           string `json:"data_name"`
+	DataNameIsComplete bool   `json:"data_name_is_complete"`
+}
+
+type BleScanCancelReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+}
+
+type BleScanCancelRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
 func ErrCodeToString(e int) string {
 	var s string
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/2c153c28/nmxact/nmble/ble_util.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_util.go b/nmxact/nmble/ble_util.go
index a202186..08eb8d9 100644
--- a/nmxact/nmble/ble_util.go
+++ b/nmxact/nmble/ble_util.go
@@ -156,3 +156,19 @@ func NewBleWriteCmdReq() *BleWriteCmdReq {
 		Data:       BleBytes{},
 	}
 }
+
+func NewBleScanReq() *BleScanReq {
+	return &BleScanReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_SCAN,
+		Seq:  NextSeq(),
+	}
+}
+
+func NewBleScanCancelReq() *BleScanCancelReq {
+	return &BleScanCancelReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_SCAN_CANCEL,
+		Seq:  NextSeq(),
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/2c153c28/nmxact/nmble/dispatch.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/dispatch.go b/nmxact/nmble/dispatch.go
index cb1f864..546fc11 100644
--- a/nmxact/nmble/dispatch.go
+++ b/nmxact/nmble/dispatch.go
@@ -94,6 +94,8 @@ func discChrUuidRspCtor() BleMsg { return &BleDiscChrUuidRsp{} }
 func writeCmdRspCtor() BleMsg    { return &BleWriteCmdRsp{} }
 func exchangeMtuRspCtor() BleMsg { return &BleExchangeMtuRsp{} }
 func connCancelRspCtor() BleMsg  { return &BleConnCancelRsp{} }
+func scanRspCtor() BleMsg        { return &BleScanRsp{} }
+func scanCancelRspCtor() BleMsg  { return &BleScanCancelRsp{} }
 
 func syncEvtCtor() BleMsg       { return &BleSyncEvt{} }
 func connectEvtCtor() BleMsg    { return &BleConnectEvt{} }
@@ -102,6 +104,7 @@ func discSvcEvtCtor() BleMsg    { return &BleDiscSvcEvt{} }
 func discChrEvtCtor() BleMsg    { return &BleDiscChrEvt{} }
 func notifyRxEvtCtor() BleMsg   { return &BleNotifyRxEvt{} }
 func mtuChangeEvtCtor() BleMsg  { return &BleMtuChangeEvt{} }
+func scanEvtCtor() BleMsg       { return &BleScanEvt{} }
 
 var msgCtorMap = map[OpTypePair]msgCtor{
 	{MSG_OP_RSP, MSG_TYPE_ERR}:           errRspCtor,
@@ -114,6 +117,8 @@ var msgCtorMap = map[OpTypePair]msgCtor{
 	{MSG_OP_RSP, MSG_TYPE_WRITE_CMD}:     writeCmdRspCtor,
 	{MSG_OP_RSP, MSG_TYPE_EXCHANGE_MTU}:  exchangeMtuRspCtor,
 	{MSG_OP_RSP, MSG_TYPE_CONN_CANCEL}:   connCancelRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_SCAN}:          scanRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_SCAN_CANCEL}:   scanCancelRspCtor,
 
 	{MSG_OP_EVT, MSG_TYPE_SYNC_EVT}:       syncEvtCtor,
 	{MSG_OP_EVT, MSG_TYPE_CONNECT_EVT}:    connectEvtCtor,
@@ -122,6 +127,7 @@ var msgCtorMap = map[OpTypePair]msgCtor{
 	{MSG_OP_EVT, MSG_TYPE_DISC_CHR_EVT}:   discChrEvtCtor,
 	{MSG_OP_EVT, MSG_TYPE_NOTIFY_RX_EVT}:  notifyRxEvtCtor,
 	{MSG_OP_EVT, MSG_TYPE_MTU_CHANGE_EVT}: mtuChangeEvtCtor,
+	{MSG_OP_EVT, MSG_TYPE_SCAN_EVT}:       scanEvtCtor,
 }
 
 func NewBleDispatcher() *BleDispatcher {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/2c153c28/nmxact/sesn/sesn_cfg.go
----------------------------------------------------------------------
diff --git a/nmxact/sesn/sesn_cfg.go b/nmxact/sesn/sesn_cfg.go
index 21def4b..cb6dce6 100644
--- a/nmxact/sesn/sesn_cfg.go
+++ b/nmxact/sesn/sesn_cfg.go
@@ -17,7 +17,7 @@ type OnCloseFn func(s Sesn, err error)
 
 type SesnCfgBle struct {
 	OwnAddrType  bledefs.BleAddrType
-	Peer         bledefs.BleDev
+	Peer         bledefs.BlePeerSpec
 	CloseTimeout time.Duration
 }
 


[25/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/newt/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
deleted file mode 100644
index f036758..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ /dev/null
@@ -1,1743 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x27
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_PHY            = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x1008
-	B110                             = 0x3
-	B115200                          = 0x1002
-	B1152000                         = 0x1009
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x100a
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x100b
-	B230400                          = 0x1003
-	B2400                            = 0xb
-	B2500000                         = 0x100c
-	B300                             = 0x7
-	B3000000                         = 0x100d
-	B3500000                         = 0x100e
-	B38400                           = 0xf
-	B4000000                         = 0x100f
-	B460800                          = 0x1004
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x1005
-	B57600                           = 0x1001
-	B576000                          = 0x1006
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x1007
-	B9600                            = 0xd
-	BOTHER                           = 0x1000
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BRKINT                           = 0x2
-	BS0                              = 0x0
-	BS1                              = 0x2000
-	BSDLY                            = 0x2000
-	CBAUD                            = 0x100f
-	CBAUDEX                          = 0x1000
-	CFLUSH                           = 0xf
-	CIBAUD                           = 0x100f0000
-	CLOCAL                           = 0x800
-	CLOCK_BOOTTIME                   = 0x7
-	CLOCK_BOOTTIME_ALARM             = 0x9
-	CLOCK_DEFAULT                    = 0x0
-	CLOCK_EXT                        = 0x1
-	CLOCK_INT                        = 0x2
-	CLOCK_MONOTONIC                  = 0x1
-	CLOCK_MONOTONIC_COARSE           = 0x6
-	CLOCK_MONOTONIC_RAW              = 0x4
-	CLOCK_PROCESS_CPUTIME_ID         = 0x2
-	CLOCK_REALTIME                   = 0x0
-	CLOCK_REALTIME_ALARM             = 0x8
-	CLOCK_REALTIME_COARSE            = 0x5
-	CLOCK_THREAD_CPUTIME_ID          = 0x3
-	CLOCK_TXFROMRX                   = 0x4
-	CLOCK_TXINT                      = 0x3
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWCGROUP                  = 0x2000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CMSPAR                           = 0x40000000
-	CR0                              = 0x0
-	CR1                              = 0x200
-	CR2                              = 0x400
-	CR3                              = 0x600
-	CRDLY                            = 0x600
-	CREAD                            = 0x80
-	CRTSCTS                          = 0x80000000
-	CS5                              = 0x0
-	CS6                              = 0x10
-	CS7                              = 0x20
-	CS8                              = 0x30
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x30
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x40
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ELF_NGREG                        = 0x12
-	ELF_PRARGSZ                      = 0x50
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x200
-	ECHOE                            = 0x10
-	ECHOK                            = 0x20
-	ECHOKE                           = 0x800
-	ECHONL                           = 0x40
-	ECHOPRT                          = 0x400
-	EPOLLERR                         = 0x8
-	EPOLLET                          = -0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	EPOLL_NONBLOCK                   = 0x800
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FF0                              = 0x0
-	FF1                              = 0x8000
-	FFDLY                            = 0x8000
-	FLUSHO                           = 0x1000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0xc
-	F_GETLK64                        = 0xc
-	F_GETOWN                         = 0x9
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0xd
-	F_SETLK64                        = 0xd
-	F_SETLKW                         = 0xe
-	F_SETLKW64                       = 0xe
-	F_SETOWN                         = 0x8
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x400
-	IBSHIFT                          = 0x10
-	ICANON                           = 0x2
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x8000
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_NODAD                      = 0x2
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x7
-	IFF_ALLMULTI                     = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DYNAMIC                      = 0x8000
-	IFF_LOOPBACK                     = 0x8
-	IFF_MASTER                       = 0x400
-	IFF_MULTICAST                    = 0x1000
-	IFF_NOARP                        = 0x80
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_TAP                          = 0x2
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x800
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x1
-	ISTRIP                           = 0x20
-	IUCLC                            = 0x200
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x1000
-	IXON                             = 0x400
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DOFORK                      = 0xb
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x100
-	MAP_LOCKED                       = 0x2000
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x4000
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_SHARED                       = 0x1
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x1
-	MCL_FUTURE                       = 0x2
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NL0                              = 0x0
-	NL1                              = 0x100
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLDLY                            = 0x100
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	OLCUC                            = 0x2
-	ONLCR                            = 0x4
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x400
-	O_ASYNC                          = 0x2000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x40
-	O_DIRECT                         = 0x10000
-	O_DIRECTORY                      = 0x4000
-	O_DSYNC                          = 0x1000
-	O_EXCL                           = 0x80
-	O_FSYNC                          = 0x1000
-	O_LARGEFILE                      = 0x20000
-	O_NDELAY                         = 0x800
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x100
-	O_NOFOLLOW                       = 0x8000
-	O_NONBLOCK                       = 0x800
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x1000
-	O_SYNC                           = 0x1000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_BROADCAST                 = 0x1
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HOST                      = 0x0
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MULTICAST                 = 0x2
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PARENB                           = 0x100
-	PARMRK                           = 0x8
-	PARODD                           = 0x200
-	PENDIN                           = 0x4000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_CLEAR_SECCOMP_FILTER          = 0x25
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECCOMP_FILTER            = 0x23
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_SECCOMP_FILTER_EVENT          = 0x1
-	PR_SECCOMP_FILTER_SYSCALL        = 0x0
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_NAME                      = 0xf
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECCOMP_FILTER            = 0x24
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETCRUNCHREGS             = 0x19
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETFPREGS                 = 0xe
-	PTRACE_GETHBPREGS                = 0x1d
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETVFPREGS                = 0x1b
-	PTRACE_GETWMMXREGS               = 0x12
-	PTRACE_GET_THREAD_AREA           = 0x16
-	PTRACE_KILL                      = 0x8
-	PTRACE_OLDSETOPTIONS             = 0x15
-	PTRACE_O_MASK                    = 0x7f
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SETCRUNCHREGS             = 0x1a
-	PTRACE_SETFPREGS                 = 0xf
-	PTRACE_SETHBPREGS                = 0x1e
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETVFPREGS                = 0x1c
-	PTRACE_SETWMMXREGS               = 0x13
-	PTRACE_SET_SYSCALL               = 0x17
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TRACEME                   = 0x0
-	PT_DATA_ADDR                     = 0x10004
-	PT_TEXT_ADDR                     = 0x10000
-	PT_TEXT_END_ADDR                 = 0x10008
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x7
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0xe
-	RTAX_MTU                         = 0x2
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x10
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x4f
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x10
-	RTM_NR_MSGTYPES                  = 0x40
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x800
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0x1
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1e
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BROADCAST                     = 0x6
-	SO_BSDCOMPAT                     = 0xe
-	SO_DEBUG                         = 0x1
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x27
-	SO_DONTROUTE                     = 0x5
-	SO_ERROR                         = 0x4
-	SO_KEEPALIVE                     = 0x9
-	SO_LINGER                        = 0xd
-	SO_MARK                          = 0x24
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0xa
-	SO_PASSCRED                      = 0x10
-	SO_PASSSEC                       = 0x22
-	SO_PEERCRED                      = 0x11
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1f
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x26
-	SO_RCVBUF                        = 0x8
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x12
-	SO_RCVTIMEO                      = 0x14
-	SO_REUSEADDR                     = 0x2
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SNDBUF                        = 0x7
-	SO_SNDBUFFORCE                   = 0x20
-	SO_SNDLOWAT                      = 0x13
-	SO_SNDTIMEO                      = 0x15
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x3
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TAB0                             = 0x0
-	TAB1                             = 0x800
-	TAB2                             = 0x1000
-	TAB3                             = 0x1800
-	TABDLY                           = 0x1800
-	TCFLSH                           = 0x540b
-	TCGETA                           = 0x5405
-	TCGETS                           = 0x5401
-	TCGETS2                          = 0x802c542a
-	TCGETX                           = 0x5432
-	TCIFLUSH                         = 0x0
-	TCIOFF                           = 0x2
-	TCIOFLUSH                        = 0x2
-	TCION                            = 0x3
-	TCOFLUSH                         = 0x1
-	TCOOFF                           = 0x0
-	TCOON                            = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_NODELAY                      = 0x1
-	TCP_QUICKACK                     = 0xc
-	TCP_SYNCNT                       = 0x7
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TCSBRK                           = 0x5409
-	TCSBRKP                          = 0x5425
-	TCSETA                           = 0x5406
-	TCSETAF                          = 0x5408
-	TCSETAW                          = 0x5407
-	TCSETS                           = 0x5402
-	TCSETS2                          = 0x402c542b
-	TCSETSF                          = 0x5404
-	TCSETSF2                         = 0x402c542d
-	TCSETSW                          = 0x5403
-	TCSETSW2                         = 0x402c542c
-	TCSETX                           = 0x5433
-	TCSETXF                          = 0x5434
-	TCSETXW                          = 0x5435
-	TCXONC                           = 0x540a
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x541d
-	TIOCEXCL                         = 0x540c
-	TIOCGDEV                         = 0x80045432
-	TIOCGETD                         = 0x5424
-	TIOCGEXCL                        = 0x80045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGPGRP                        = 0x540f
-	TIOCGPKT                         = 0x80045438
-	TIOCGPTLCK                       = 0x80045439
-	TIOCGPTN                         = 0x80045430
-	TIOCGRS485                       = 0x542e
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x5429
-	TIOCGSOFTCAR                     = 0x5419
-	TIOCGWINSZ                       = 0x5413
-	TIOCINQ                          = 0x541b
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x5417
-	TIOCMBIS                         = 0x5416
-	TIOCMGET                         = 0x5415
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x5418
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x5422
-	TIOCNXCL                         = 0x540d
-	TIOCOUTQ                         = 0x5411
-	TIOCPKT                          = 0x5420
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x540e
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETD                         = 0x5423
-	TIOCSIG                          = 0x40045436
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSPGRP                        = 0x5410
-	TIOCSPTLCK                       = 0x40045431
-	TIOCSRS485                       = 0x542f
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x541a
-	TIOCSTI                          = 0x5412
-	TIOCSWINSZ                       = 0x5414
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x100
-	TUNATTACHFILTER                  = 0x400854d5
-	TUNDETACHFILTER                  = 0x400854d6
-	TUNGETFEATURES                   = 0x800454cf
-	TUNGETIFF                        = 0x800454d2
-	TUNGETSNDBUF                     = 0x800454d3
-	TUNGETVNETHDRSZ                  = 0x800454d7
-	TUNSETDEBUG                      = 0x400454c9
-	TUNSETGROUP                      = 0x400454ce
-	TUNSETIFF                        = 0x400454ca
-	TUNSETLINK                       = 0x400454cd
-	TUNSETNOCSUM                     = 0x400454c8
-	TUNSETOFFLOAD                    = 0x400454d0
-	TUNSETOWNER                      = 0x400454cc
-	TUNSETPERSIST                    = 0x400454cb
-	TUNSETSNDBUF                     = 0x400454d4
-	TUNSETTXFILTER                   = 0x400454d1
-	TUNSETVNETHDRSZ                  = 0x400454d8
-	VDISCARD                         = 0xd
-	VEOF                             = 0x4
-	VEOL                             = 0xb
-	VEOL2                            = 0x10
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x6
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xc
-	VSTART                           = 0x8
-	VSTOP                            = 0x9
-	VSUSP                            = 0xa
-	VSWTC                            = 0x7
-	VT0                              = 0x0
-	VT1                              = 0x4000
-	VTDLY                            = 0x4000
-	VTIME                            = 0x5
-	VWERASE                          = 0xe
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x20
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-	XCASE                            = 0x4
-	XTABS                            = 0x1800
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x62)
-	EADDRNOTAVAIL   = syscall.Errno(0x63)
-	EADV            = syscall.Errno(0x44)
-	EAFNOSUPPORT    = syscall.Errno(0x61)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x72)
-	EBADE           = syscall.Errno(0x34)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x4d)
-	EBADMSG         = syscall.Errno(0x4a)
-	EBADR           = syscall.Errno(0x35)
-	EBADRQC         = syscall.Errno(0x38)
-	EBADSLT         = syscall.Errno(0x39)
-	EBFONT          = syscall.Errno(0x3b)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x7d)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x2c)
-	ECOMM           = syscall.Errno(0x46)
-	ECONNABORTED    = syscall.Errno(0x67)
-	ECONNREFUSED    = syscall.Errno(0x6f)
-	ECONNRESET      = syscall.Errno(0x68)
-	EDEADLK         = syscall.Errno(0x23)
-	EDEADLOCK       = syscall.Errno(0x23)
-	EDESTADDRREQ    = syscall.Errno(0x59)
-	EDOM            = syscall.Errno(0x21)
-	EDOTDOT         = syscall.Errno(0x49)
-	EDQUOT          = syscall.Errno(0x7a)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x70)
-	EHOSTUNREACH    = syscall.Errno(0x71)
-	EHWPOISON       = syscall.Errno(0x85)
-	EIDRM           = syscall.Errno(0x2b)
-	EILSEQ          = syscall.Errno(0x54)
-	EINPROGRESS     = syscall.Errno(0x73)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x6a)
-	EISDIR          = syscall.Errno(0x15)
-	EISNAM          = syscall.Errno(0x78)
-	EKEYEXPIRED     = syscall.Errno(0x7f)
-	EKEYREJECTED    = syscall.Errno(0x81)
-	EKEYREVOKED     = syscall.Errno(0x80)
-	EL2HLT          = syscall.Errno(0x33)
-	EL2NSYNC        = syscall.Errno(0x2d)
-	EL3HLT          = syscall.Errno(0x2e)
-	EL3RST          = syscall.Errno(0x2f)
-	ELIBACC         = syscall.Errno(0x4f)
-	ELIBBAD         = syscall.Errno(0x50)
-	ELIBEXEC        = syscall.Errno(0x53)
-	ELIBMAX         = syscall.Errno(0x52)
-	ELIBSCN         = syscall.Errno(0x51)
-	ELNRNG          = syscall.Errno(0x30)
-	ELOOP           = syscall.Errno(0x28)
-	EMEDIUMTYPE     = syscall.Errno(0x7c)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x5a)
-	EMULTIHOP       = syscall.Errno(0x48)
-	ENAMETOOLONG    = syscall.Errno(0x24)
-	ENAVAIL         = syscall.Errno(0x77)
-	ENETDOWN        = syscall.Errno(0x64)
-	ENETRESET       = syscall.Errno(0x66)
-	ENETUNREACH     = syscall.Errno(0x65)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x37)
-	ENOBUFS         = syscall.Errno(0x69)
-	ENOCSI          = syscall.Errno(0x32)
-	ENODATA         = syscall.Errno(0x3d)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOKEY          = syscall.Errno(0x7e)
-	ENOLCK          = syscall.Errno(0x25)
-	ENOLINK         = syscall.Errno(0x43)
-	ENOMEDIUM       = syscall.Errno(0x7b)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x2a)
-	ENONET          = syscall.Errno(0x40)
-	ENOPKG          = syscall.Errno(0x41)
-	ENOPROTOOPT     = syscall.Errno(0x5c)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x3f)
-	ENOSTR          = syscall.Errno(0x3c)
-	ENOSYS          = syscall.Errno(0x26)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x6b)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x27)
-	ENOTNAM         = syscall.Errno(0x76)
-	ENOTRECOVERABLE = syscall.Errno(0x83)
-	ENOTSOCK        = syscall.Errno(0x58)
-	ENOTSUP         = syscall.Errno(0x5f)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x4c)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x5f)
-	EOVERFLOW       = syscall.Errno(0x4b)
-	EOWNERDEAD      = syscall.Errno(0x82)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x60)
-	EPIPE           = syscall.Errno(0x20)
-	EPROTO          = syscall.Errno(0x47)
-	EPROTONOSUPPORT = syscall.Errno(0x5d)
-	EPROTOTYPE      = syscall.Errno(0x5b)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x4e)
-	EREMOTE         = syscall.Errno(0x42)
-	EREMOTEIO       = syscall.Errno(0x79)
-	ERESTART        = syscall.Errno(0x55)
-	ERFKILL         = syscall.Errno(0x84)
-	EROFS           = syscall.Errno(0x1e)
-	ESHUTDOWN       = syscall.Errno(0x6c)
-	ESOCKTNOSUPPORT = syscall.Errno(0x5e)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x45)
-	ESTALE          = syscall.Errno(0x74)
-	ESTRPIPE        = syscall.Errno(0x56)
-	ETIME           = syscall.Errno(0x3e)
-	ETIMEDOUT       = syscall.Errno(0x6e)
-	ETOOMANYREFS    = syscall.Errno(0x6d)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUCLEAN         = syscall.Errno(0x75)
-	EUNATCH         = syscall.Errno(0x31)
-	EUSERS          = syscall.Errno(0x57)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x36)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0x7)
-	SIGCHLD   = syscall.Signal(0x11)
-	SIGCLD    = syscall.Signal(0x11)
-	SIGCONT   = syscall.Signal(0x12)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x1d)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPOLL   = syscall.Signal(0x1d)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x1e)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTKFLT = syscall.Signal(0x10)
-	SIGSTOP   = syscall.Signal(0x13)
-	SIGSYS    = syscall.Signal(0x1f)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x14)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGUNUSED = syscall.Signal(0x1f)
-	SIGURG    = syscall.Signal(0x17)
-	SIGUSR1   = syscall.Signal(0xa)
-	SIGUSR2   = syscall.Signal(0xc)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	35:  "resource deadlock avoided",
-	36:  "file name too long",
-	37:  "no locks available",
-	38:  "function not implemented",
-	39:  "directory not empty",
-	40:  "too many levels of symbolic links",
-	42:  "no message of desired type",
-	43:  "identifier removed",
-	44:  "channel number out of range",
-	45:  "level 2 not synchronized",
-	46:  "level 3 halted",
-	47:  "level 3 reset",
-	48:  "link number out of range",
-	49:  "protocol driver not attached",
-	50:  "no CSI structure available",
-	51:  "level 2 halted",
-	52:  "invalid exchange",
-	53:  "invalid request descriptor",
-	54:  "exchange full",
-	55:  "no anode",
-	56:  "invalid request code",
-	57:  "invalid slot",
-	59:  "bad font file format",
-	60:  "device not a stream",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of streams resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "multihop attempted",
-	73:  "RFS specific error",
-	74:  "bad message",
-	75:  "value too large for defined data type",
-	76:  "name not unique on network",
-	77:  "file descriptor in bad state",
-	78:  "remote address changed",
-	79:  "can not access a needed shared library",
-	80:  "accessing a corrupted shared library",
-	81:  ".lib section in a.out corrupted",
-	82:  "attempting to link in too many shared libraries",
-	83:  "cannot exec a shared library directly",
-	84:  "invalid or incomplete multibyte or wide character",
-	85:  "interrupted system call should be restarted",
-	86:  "streams pipe error",
-	87:  "too many users",
-	88:  "socket operation on non-socket",
-	89:  "destination address required",
-	90:  "message too long",
-	91:  "protocol wrong type for socket",
-	92:  "protocol not available",
-	93:  "protocol not supported",
-	94:  "socket type not supported",
-	95:  "operation not supported",
-	96:  "protocol family not supported",
-	97:  "address family not supported by protocol",
-	98:  "address already in use",
-	99:  "cannot assign requested address",
-	100: "network is down",
-	101: "network is unreachable",
-	102: "network dropped connection on reset",
-	103: "software caused connection abort",
-	104: "connection reset by peer",
-	105: "no buffer space available",
-	106: "transport endpoint is already connected",
-	107: "transport endpoint is not connected",
-	108: "cannot send after transport endpoint shutdown",
-	109: "too many references: cannot splice",
-	110: "connection timed out",
-	111: "connection refused",
-	112: "host is down",
-	113: "no route to host",
-	114: "operation already in progress",
-	115: "operation now in progress",
-	116: "stale NFS file handle",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "disk quota exceeded",
-	123: "no medium found",
-	124: "wrong medium type",
-	125: "operation canceled",
-	126: "required key not available",
-	127: "key has expired",
-	128: "key has been revoked",
-	129: "key was rejected by service",
-	130: "owner died",
-	131: "state not recoverable",
-	132: "operation not possible due to RF-kill",
-	133: "unknown error 133",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "bus error",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "user defined signal 1",
-	11: "segmentation fault",
-	12: "user defined signal 2",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "stack fault",
-	17: "child exited",
-	18: "continued",
-	19: "stopped (signal)",
-	20: "stopped",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "urgent I/O condition",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "I/O possible",
-	30: "power failure",
-	31: "bad system call",
-}


[56/67] [abbrv] incubator-mynewt-newtmgr git commit: nmxact - Indicate peer in BLE sesn close callback.

Posted by cc...@apache.org.
nmxact - Indicate peer in BLE sesn close callback.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/ea22bd05
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/ea22bd05
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/ea22bd05

Branch: refs/heads/master
Commit: ea22bd05c0e5161a6d312f9922923f2f1583b5b6
Parents: ae52880
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Mar 28 12:10:51 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 nmxact/nmble/ble_fsm.go        |  5 +++--
 nmxact/nmble/ble_oic_sesn.go   | 14 +++++++-------
 nmxact/nmble/ble_plain_sesn.go | 14 +++++++-------
 nmxact/sesn/sesn_cfg.go        |  4 ++--
 4 files changed, 19 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/ea22bd05/nmxact/nmble/ble_fsm.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_fsm.go b/nmxact/nmble/ble_fsm.go
index 52f61b8..daa930b 100644
--- a/nmxact/nmble/ble_fsm.go
+++ b/nmxact/nmble/ble_fsm.go
@@ -34,7 +34,7 @@ const (
 )
 
 type BleRxNmpFn func(data []byte)
-type BleDisconnectFn func(err error)
+type BleDisconnectFn func(peer BleDev, err error)
 
 type BleFsmParams struct {
 	Bx           *BleXport
@@ -284,8 +284,9 @@ func (bf *BleFsm) connectListen(seq int) error {
 					}
 
 					bf.setState(SESN_STATE_UNCONNECTED)
+					peer := *bf.peerDev
 					bf.peerDev = nil
-					bf.disconnectCb(err)
+					bf.disconnectCb(peer, err)
 					return
 
 				default:

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/ea22bd05/nmxact/nmble/ble_oic_sesn.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_oic_sesn.go b/nmxact/nmble/ble_oic_sesn.go
index 98a30e9..949d7aa 100644
--- a/nmxact/nmble/ble_oic_sesn.go
+++ b/nmxact/nmble/ble_oic_sesn.go
@@ -5,7 +5,7 @@ import (
 	"sync"
 	"time"
 
-	"mynewt.apache.org/newt/nmxact/bledefs"
+	. "mynewt.apache.org/newt/nmxact/bledefs"
 	"mynewt.apache.org/newt/nmxact/nmp"
 	"mynewt.apache.org/newt/nmxact/omp"
 	"mynewt.apache.org/newt/nmxact/sesn"
@@ -17,7 +17,7 @@ type BleOicSesn struct {
 	nls          map[*nmp.NmpListener]struct{}
 	od           *omp.OmpDispatcher
 	closeTimeout time.Duration
-	onCloseCb    sesn.OnCloseFn
+	onCloseCb    sesn.BleOnCloseFn
 
 	closeChan chan error
 	mx        sync.Mutex
@@ -28,7 +28,7 @@ func NewBleOicSesn(bx *BleXport, cfg sesn.SesnCfg) *BleOicSesn {
 		nls:          map[*nmp.NmpListener]struct{}{},
 		od:           omp.NewOmpDispatcher(),
 		closeTimeout: cfg.Ble.CloseTimeout,
-		onCloseCb:    cfg.OnCloseCb,
+		onCloseCb:    cfg.Ble.OnCloseCb,
 	}
 
 	svcUuid, err := ParseUuid(NmpOicSvcUuid)
@@ -54,7 +54,7 @@ func NewBleOicSesn(bx *BleXport, cfg sesn.SesnCfg) *BleOicSesn {
 		ReqChrUuid:   reqChrUuid,
 		RspChrUuid:   rspChrUuid,
 		RxNmpCb:      func(d []byte) { bos.onRxNmp(d) },
-		DisconnectCb: func(e error) { bos.onDisconnect(e) },
+		DisconnectCb: func(p BleDev, e error) { bos.onDisconnect(p, e) },
 	})
 
 	return bos
@@ -141,7 +141,7 @@ func (bos *BleOicSesn) onRxNmp(data []byte) {
 	bos.od.Dispatch(data)
 }
 
-func (bos *BleOicSesn) onDisconnect(err error) {
+func (bos *BleOicSesn) onDisconnect(peer BleDev, err error) {
 	for nl, _ := range bos.nls {
 		nl.ErrChan <- err
 	}
@@ -151,7 +151,7 @@ func (bos *BleOicSesn) onDisconnect(err error) {
 		bos.closeChan <- err
 	}
 	if bos.onCloseCb != nil {
-		bos.onCloseCb(bos, err)
+		bos.onCloseCb(bos, peer, err)
 	}
 }
 
@@ -194,5 +194,5 @@ func (bos *BleOicSesn) MtuOut() int {
 		WRITE_CMD_BASE_SZ -
 		omp.OMP_MSG_OVERHEAD -
 		nmp.NMP_HDR_SIZE
-	return util.IntMin(mtu, bledefs.BLE_ATT_ATTR_MAX_LEN)
+	return util.IntMin(mtu, BLE_ATT_ATTR_MAX_LEN)
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/ea22bd05/nmxact/nmble/ble_plain_sesn.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_plain_sesn.go b/nmxact/nmble/ble_plain_sesn.go
index b4fda8e..71133e7 100644
--- a/nmxact/nmble/ble_plain_sesn.go
+++ b/nmxact/nmble/ble_plain_sesn.go
@@ -5,7 +5,7 @@ import (
 	"sync"
 	"time"
 
-	"mynewt.apache.org/newt/nmxact/bledefs"
+	. "mynewt.apache.org/newt/nmxact/bledefs"
 	"mynewt.apache.org/newt/nmxact/nmp"
 	"mynewt.apache.org/newt/nmxact/sesn"
 	"mynewt.apache.org/newt/util"
@@ -16,7 +16,7 @@ type BlePlainSesn struct {
 	nls          map[*nmp.NmpListener]struct{}
 	nd           *nmp.NmpDispatcher
 	closeTimeout time.Duration
-	onCloseCb    sesn.OnCloseFn
+	onCloseCb    sesn.BleOnCloseFn
 
 	closeChan chan error
 	mx        sync.Mutex
@@ -27,7 +27,7 @@ func NewBlePlainSesn(bx *BleXport, cfg sesn.SesnCfg) *BlePlainSesn {
 		nls:          map[*nmp.NmpListener]struct{}{},
 		nd:           nmp.NewNmpDispatcher(),
 		closeTimeout: cfg.Ble.CloseTimeout,
-		onCloseCb:    cfg.OnCloseCb,
+		onCloseCb:    cfg.Ble.OnCloseCb,
 	}
 
 	svcUuid, err := ParseUuid(NmpPlainSvcUuid)
@@ -48,7 +48,7 @@ func NewBlePlainSesn(bx *BleXport, cfg sesn.SesnCfg) *BlePlainSesn {
 		ReqChrUuid:   chrUuid,
 		RspChrUuid:   chrUuid,
 		RxNmpCb:      func(d []byte) { bps.onRxNmp(d) },
-		DisconnectCb: func(e error) { bps.onDisconnect(e) },
+		DisconnectCb: func(p BleDev, e error) { bps.onDisconnect(p, e) },
 	})
 
 	return bps
@@ -135,7 +135,7 @@ func (bps *BlePlainSesn) onRxNmp(data []byte) {
 	bps.nd.Dispatch(data)
 }
 
-func (bps *BlePlainSesn) onDisconnect(err error) {
+func (bps *BlePlainSesn) onDisconnect(peer BleDev, err error) {
 	for nl, _ := range bps.nls {
 		nl.ErrChan <- err
 	}
@@ -145,7 +145,7 @@ func (bps *BlePlainSesn) onDisconnect(err error) {
 		bps.closeChan <- err
 	}
 	if bps.onCloseCb != nil {
-		bps.onCloseCb(bps, err)
+		bps.onCloseCb(bps, peer, err)
 	}
 }
 
@@ -182,5 +182,5 @@ func (bps *BlePlainSesn) MtuIn() int {
 
 func (bps *BlePlainSesn) MtuOut() int {
 	mtu := bps.bf.attMtu - WRITE_CMD_BASE_SZ - nmp.NMP_HDR_SIZE
-	return util.IntMin(mtu, bledefs.BLE_ATT_ATTR_MAX_LEN)
+	return util.IntMin(mtu, BLE_ATT_ATTR_MAX_LEN)
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/ea22bd05/nmxact/sesn/sesn_cfg.go
----------------------------------------------------------------------
diff --git a/nmxact/sesn/sesn_cfg.go b/nmxact/sesn/sesn_cfg.go
index c511d10..9e07c71 100644
--- a/nmxact/sesn/sesn_cfg.go
+++ b/nmxact/sesn/sesn_cfg.go
@@ -13,7 +13,7 @@ const (
 	MGMT_PROTO_OMP
 )
 
-type OnCloseFn func(s Sesn, err error)
+type BleOnCloseFn func(s Sesn, peer bledefs.BleDev, err error)
 
 // Specifies the BLE peer to connect to.
 type BlePeerSpec struct {
@@ -45,12 +45,12 @@ type SesnCfgBle struct {
 	OwnAddrType  bledefs.BleAddrType
 	PeerSpec     BlePeerSpec
 	CloseTimeout time.Duration
+	OnCloseCb    BleOnCloseFn
 }
 
 type SesnCfg struct {
 	// Used with all transport types.
 	MgmtProto MgmtProto
-	OnCloseCb OnCloseFn
 
 	// Only used with BLE transports.
 	Ble SesnCfgBle


[28/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
deleted file mode 100644
index 2afbe2d..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go
+++ /dev/null
@@ -1,1729 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,freebsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_ARP                            = 0x23
-	AF_ATM                            = 0x1e
-	AF_BLUETOOTH                      = 0x24
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1a
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x25
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x1c
-	AF_INET6_SDP                      = 0x2a
-	AF_INET_SDP                       = 0x28
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1a
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x2a
-	AF_NATM                           = 0x1d
-	AF_NETBIOS                        = 0x6
-	AF_NETGRAPH                       = 0x20
-	AF_OSI                            = 0x7
-	AF_PUP                            = 0x4
-	AF_ROUTE                          = 0x11
-	AF_SCLUSTER                       = 0x22
-	AF_SIP                            = 0x18
-	AF_SLOW                           = 0x21
-	AF_SNA                            = 0xb
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	AF_VENDOR00                       = 0x27
-	AF_VENDOR01                       = 0x29
-	AF_VENDOR02                       = 0x2b
-	AF_VENDOR03                       = 0x2d
-	AF_VENDOR04                       = 0x2f
-	AF_VENDOR05                       = 0x31
-	AF_VENDOR06                       = 0x33
-	AF_VENDOR07                       = 0x35
-	AF_VENDOR08                       = 0x37
-	AF_VENDOR09                       = 0x39
-	AF_VENDOR10                       = 0x3b
-	AF_VENDOR11                       = 0x3d
-	AF_VENDOR12                       = 0x3f
-	AF_VENDOR13                       = 0x41
-	AF_VENDOR14                       = 0x43
-	AF_VENDOR15                       = 0x45
-	AF_VENDOR16                       = 0x47
-	AF_VENDOR17                       = 0x49
-	AF_VENDOR18                       = 0x4b
-	AF_VENDOR19                       = 0x4d
-	AF_VENDOR20                       = 0x4f
-	AF_VENDOR21                       = 0x51
-	AF_VENDOR22                       = 0x53
-	AF_VENDOR23                       = 0x55
-	AF_VENDOR24                       = 0x57
-	AF_VENDOR25                       = 0x59
-	AF_VENDOR26                       = 0x5b
-	AF_VENDOR27                       = 0x5d
-	AF_VENDOR28                       = 0x5f
-	AF_VENDOR29                       = 0x61
-	AF_VENDOR30                       = 0x63
-	AF_VENDOR31                       = 0x65
-	AF_VENDOR32                       = 0x67
-	AF_VENDOR33                       = 0x69
-	AF_VENDOR34                       = 0x6b
-	AF_VENDOR35                       = 0x6d
-	AF_VENDOR36                       = 0x6f
-	AF_VENDOR37                       = 0x71
-	AF_VENDOR38                       = 0x73
-	AF_VENDOR39                       = 0x75
-	AF_VENDOR40                       = 0x77
-	AF_VENDOR41                       = 0x79
-	AF_VENDOR42                       = 0x7b
-	AF_VENDOR43                       = 0x7d
-	AF_VENDOR44                       = 0x7f
-	AF_VENDOR45                       = 0x81
-	AF_VENDOR46                       = 0x83
-	AF_VENDOR47                       = 0x85
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B460800                           = 0x70800
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B921600                           = 0xe1000
-	B9600                             = 0x2580
-	BIOCFEEDBACK                      = 0x8004427c
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDIRECTION                    = 0x40044276
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc0084279
-	BIOCGETBUFMODE                    = 0x4004427d
-	BIOCGETIF                         = 0x4020426b
-	BIOCGETZMAX                       = 0x4004427f
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044272
-	BIOCGRTIMEOUT                     = 0x4008426e
-	BIOCGSEESENT                      = 0x40044276
-	BIOCGSTATS                        = 0x4008426f
-	BIOCGTSTAMP                       = 0x40044283
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCLOCK                          = 0x2000427a
-	BIOCPROMISC                       = 0x20004269
-	BIOCROTZBUF                       = 0x400c4280
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDIRECTION                    = 0x80044277
-	BIOCSDLT                          = 0x80044278
-	BIOCSETBUFMODE                    = 0x8004427e
-	BIOCSETF                          = 0x80084267
-	BIOCSETFNR                        = 0x80084282
-	BIOCSETIF                         = 0x8020426c
-	BIOCSETWF                         = 0x8008427b
-	BIOCSETZBUF                       = 0x800c4281
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044273
-	BIOCSRTIMEOUT                     = 0x8008426d
-	BIOCSSEESENT                      = 0x80044277
-	BIOCSTSTAMP                       = 0x80044284
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_BUFMODE_BUFFER                = 0x1
-	BPF_BUFMODE_ZBUF                  = 0x2
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x80000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_T_BINTIME                     = 0x2
-	BPF_T_BINTIME_FAST                = 0x102
-	BPF_T_BINTIME_MONOTONIC           = 0x202
-	BPF_T_BINTIME_MONOTONIC_FAST      = 0x302
-	BPF_T_FAST                        = 0x100
-	BPF_T_FLAG_MASK                   = 0x300
-	BPF_T_FORMAT_MASK                 = 0x3
-	BPF_T_MICROTIME                   = 0x0
-	BPF_T_MICROTIME_FAST              = 0x100
-	BPF_T_MICROTIME_MONOTONIC         = 0x200
-	BPF_T_MICROTIME_MONOTONIC_FAST    = 0x300
-	BPF_T_MONOTONIC                   = 0x200
-	BPF_T_MONOTONIC_FAST              = 0x300
-	BPF_T_NANOTIME                    = 0x1
-	BPF_T_NANOTIME_FAST               = 0x101
-	BPF_T_NANOTIME_MONOTONIC          = 0x201
-	BPF_T_NANOTIME_MONOTONIC_FAST     = 0x301
-	BPF_T_NONE                        = 0x3
-	BPF_T_NORMAL                      = 0x0
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0x18
-	CTL_NET                           = 0x4
-	DLT_A429                          = 0xb8
-	DLT_A653_ICM                      = 0xb9
-	DLT_AIRONET_HEADER                = 0x78
-	DLT_AOS                           = 0xde
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ARCNET_LINUX                  = 0x81
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AURORA                        = 0x7e
-	DLT_AX25                          = 0x3
-	DLT_AX25_KISS                     = 0xca
-	DLT_BACNET_MS_TP                  = 0xa5
-	DLT_BLUETOOTH_HCI_H4              = 0xbb
-	DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-	DLT_CAN20B                        = 0xbe
-	DLT_CAN_SOCKETCAN                 = 0xe3
-	DLT_CHAOS                         = 0x5
-	DLT_CHDLC                         = 0x68
-	DLT_CISCO_IOS                     = 0x76
-	DLT_C_HDLC                        = 0x68
-	DLT_C_HDLC_WITH_DIR               = 0xcd
-	DLT_DBUS                          = 0xe7
-	DLT_DECT                          = 0xdd
-	DLT_DOCSIS                        = 0x8f
-	DLT_DVB_CI                        = 0xeb
-	DLT_ECONET                        = 0x73
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0x6d
-	DLT_ERF                           = 0xc5
-	DLT_ERF_ETH                       = 0xaf
-	DLT_ERF_POS                       = 0xb0
-	DLT_FC_2                          = 0xe0
-	DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-	DLT_FDDI                          = 0xa
-	DLT_FLEXRAY                       = 0xd2
-	DLT_FRELAY                        = 0x6b
-	DLT_FRELAY_WITH_DIR               = 0xce
-	DLT_GCOM_SERIAL                   = 0xad
-	DLT_GCOM_T1E1                     = 0xac
-	DLT_GPF_F                         = 0xab
-	DLT_GPF_T                         = 0xaa
-	DLT_GPRS_LLC                      = 0xa9
-	DLT_GSMTAP_ABIS                   = 0xda
-	DLT_GSMTAP_UM                     = 0xd9
-	DLT_HHDLC                         = 0x79
-	DLT_IBM_SN                        = 0x92
-	DLT_IBM_SP                        = 0x91
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_IEEE802_15_4                  = 0xc3
-	DLT_IEEE802_15_4_LINUX            = 0xbf
-	DLT_IEEE802_15_4_NOFCS            = 0xe6
-	DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-	DLT_IEEE802_16_MAC_CPS            = 0xbc
-	DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-	DLT_IPFILTER                      = 0x74
-	DLT_IPMB                          = 0xc7
-	DLT_IPMB_LINUX                    = 0xd1
-	DLT_IPNET                         = 0xe2
-	DLT_IPOIB                         = 0xf2
-	DLT_IPV4                          = 0xe4
-	DLT_IPV6                          = 0xe5
-	DLT_IP_OVER_FC                    = 0x7a
-	DLT_JUNIPER_ATM1                  = 0x89
-	DLT_JUNIPER_ATM2                  = 0x87
-	DLT_JUNIPER_ATM_CEMIC             = 0xee
-	DLT_JUNIPER_CHDLC                 = 0xb5
-	DLT_JUNIPER_ES                    = 0x84
-	DLT_JUNIPER_ETHER                 = 0xb2
-	DLT_JUNIPER_FIBRECHANNEL          = 0xea
-	DLT_JUNIPER_FRELAY                = 0xb4
-	DLT_JUNIPER_GGSN                  = 0x85
-	DLT_JUNIPER_ISM                   = 0xc2
-	DLT_JUNIPER_MFR                   = 0x86
-	DLT_JUNIPER_MLFR                  = 0x83
-	DLT_JUNIPER_MLPPP                 = 0x82
-	DLT_JUNIPER_MONITOR               = 0xa4
-	DLT_JUNIPER_PIC_PEER              = 0xae
-	DLT_JUNIPER_PPP                   = 0xb3
-	DLT_JUNIPER_PPPOE                 = 0xa7
-	DLT_JUNIPER_PPPOE_ATM             = 0xa8
-	DLT_JUNIPER_SERVICES              = 0x88
-	DLT_JUNIPER_SRX_E2E               = 0xe9
-	DLT_JUNIPER_ST                    = 0xc8
-	DLT_JUNIPER_VP                    = 0xb7
-	DLT_JUNIPER_VS                    = 0xe8
-	DLT_LAPB_WITH_DIR                 = 0xcf
-	DLT_LAPD                          = 0xcb
-	DLT_LIN                           = 0xd4
-	DLT_LINUX_EVDEV                   = 0xd8
-	DLT_LINUX_IRDA                    = 0x90
-	DLT_LINUX_LAPD                    = 0xb1
-	DLT_LINUX_PPP_WITHDIRECTION       = 0xa6
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_LTALK                         = 0x72
-	DLT_MATCHING_MAX                  = 0xf6
-	DLT_MATCHING_MIN                  = 0x68
-	DLT_MFR                           = 0xb6
-	DLT_MOST                          = 0xd3
-	DLT_MPEG_2_TS                     = 0xf3
-	DLT_MPLS                          = 0xdb
-	DLT_MTP2                          = 0x8c
-	DLT_MTP2_WITH_PHDR                = 0x8b
-	DLT_MTP3                          = 0x8d
-	DLT_MUX27010                      = 0xec
-	DLT_NETANALYZER                   = 0xf0
-	DLT_NETANALYZER_TRANSPARENT       = 0xf1
-	DLT_NFC_LLCP                      = 0xf5
-	DLT_NFLOG                         = 0xef
-	DLT_NG40                          = 0xf4
-	DLT_NULL                          = 0x0
-	DLT_PCI_EXP                       = 0x7d
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x79
-	DLT_PPI                           = 0xc0
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_PPPD                      = 0xa6
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PPP_WITH_DIR                  = 0xcc
-	DLT_PPP_WITH_DIRECTION            = 0xa6
-	DLT_PRISM_HEADER                  = 0x77
-	DLT_PRONET                        = 0x4
-	DLT_RAIF1                         = 0xc6
-	DLT_RAW                           = 0xc
-	DLT_RIO                           = 0x7c
-	DLT_SCCP                          = 0x8e
-	DLT_SITA                          = 0xc4
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DLT_STANAG_5066_D_PDU             = 0xed
-	DLT_SUNATM                        = 0x7b
-	DLT_SYMANTEC_FIREWALL             = 0x63
-	DLT_TZSP                          = 0x80
-	DLT_USB                           = 0xba
-	DLT_USB_LINUX                     = 0xbd
-	DLT_USB_LINUX_MMAPPED             = 0xdc
-	DLT_USER0                         = 0x93
-	DLT_USER1                         = 0x94
-	DLT_USER10                        = 0x9d
-	DLT_USER11                        = 0x9e
-	DLT_USER12                        = 0x9f
-	DLT_USER13                        = 0xa0
-	DLT_USER14                        = 0xa1
-	DLT_USER15                        = 0xa2
-	DLT_USER2                         = 0x95
-	DLT_USER3                         = 0x96
-	DLT_USER4                         = 0x97
-	DLT_USER5                         = 0x98
-	DLT_USER6                         = 0x99
-	DLT_USER7                         = 0x9a
-	DLT_USER8                         = 0x9b
-	DLT_USER9                         = 0x9c
-	DLT_WIHART                        = 0xdf
-	DLT_X2E_SERIAL                    = 0xd5
-	DLT_X2E_XORAYA                    = 0xd6
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EVFILT_AIO                        = -0x3
-	EVFILT_FS                         = -0x9
-	EVFILT_LIO                        = -0xa
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0xb
-	EVFILT_TIMER                      = -0x7
-	EVFILT_USER                       = -0xb
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_DISPATCH                       = 0x80
-	EV_DROP                           = 0x1000
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_RECEIPT                        = 0x40
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTATTR_NAMESPACE_EMPTY           = 0x0
-	EXTATTR_NAMESPACE_SYSTEM          = 0x2
-	EXTATTR_NAMESPACE_USER            = 0x1
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_CANCEL                          = 0x5
-	F_DUP2FD                          = 0xa
-	F_DUP2FD_CLOEXEC                  = 0x12
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0x11
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0xb
-	F_GETOWN                          = 0x5
-	F_OGETLK                          = 0x7
-	F_OK                              = 0x0
-	F_OSETLK                          = 0x8
-	F_OSETLKW                         = 0x9
-	F_RDAHEAD                         = 0x10
-	F_RDLCK                           = 0x1
-	F_READAHEAD                       = 0xf
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0xc
-	F_SETLKW                          = 0xd
-	F_SETLK_REMOTE                    = 0xe
-	F_SETOWN                          = 0x6
-	F_UNLCK                           = 0x2
-	F_UNLCKSYS                        = 0x4
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFAN_ARRIVAL                      = 0x0
-	IFAN_DEPARTURE                    = 0x1
-	IFF_ALLMULTI                      = 0x200
-	IFF_ALTPHYS                       = 0x4000
-	IFF_BROADCAST                     = 0x2
-	IFF_CANTCHANGE                    = 0x218f72
-	IFF_CANTCONFIG                    = 0x10000
-	IFF_DEBUG                         = 0x4
-	IFF_DRV_OACTIVE                   = 0x400
-	IFF_DRV_RUNNING                   = 0x40
-	IFF_DYING                         = 0x200000
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MONITOR                       = 0x40000
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PPROMISC                      = 0x20000
-	IFF_PROMISC                       = 0x100
-	IFF_RENAMING                      = 0x400000
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_SMART                         = 0x20
-	IFF_STATICARP                     = 0x80000
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_A12MPPSWITCH                  = 0x82
-	IFT_AAL2                          = 0xbb
-	IFT_AAL5                          = 0x31
-	IFT_ADSL                          = 0x5e
-	IFT_AFLANE8023                    = 0x3b
-	IFT_AFLANE8025                    = 0x3c
-	IFT_ARAP                          = 0x58
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ASYNC                         = 0x54
-	IFT_ATM                           = 0x25
-	IFT_ATMDXI                        = 0x69
-	IFT_ATMFUNI                       = 0x6a
-	IFT_ATMIMA                        = 0x6b
-	IFT_ATMLOGICAL                    = 0x50
-	IFT_ATMRADIO                      = 0xbd
-	IFT_ATMSUBINTERFACE               = 0x86
-	IFT_ATMVCIENDPT                   = 0xc2
-	IFT_ATMVIRTUAL                    = 0x95
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
-	IFT_BRIDGE                        = 0xd1
-	IFT_BSC                           = 0x53
-	IFT_CARP                          = 0xf8
-	IFT_CCTEMUL                       = 0x3d
-	IFT_CEPT                          = 0x13
-	IFT_CES                           = 0x85
-	IFT_CHANNEL                       = 0x46
-	IFT_CNR                           = 0x55
-	IFT_COFFEE                        = 0x84
-	IFT_COMPOSITELINK                 = 0x9b
-	IFT_DCN                           = 0x8d
-	IFT_DIGITALPOWERLINE              = 0x8a
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-	IFT_DLSW                          = 0x4a
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
-	IFT_DOCSCABLEMACLAYER             = 0x7f
-	IFT_DOCSCABLEUPSTREAM             = 0x81
-	IFT_DS0                           = 0x51
-	IFT_DS0BUNDLE                     = 0x52
-	IFT_DS1FDL                        = 0xaa
-	IFT_DS3                           = 0x1e
-	IFT_DTM                           = 0x8c
-	IFT_DVBASILN                      = 0xac
-	IFT_DVBASIOUT                     = 0xad
-	IFT_DVBRCCDOWNSTREAM              = 0x93
-	IFT_DVBRCCMACLAYER                = 0x92
-	IFT_DVBRCCUPSTREAM                = 0x94
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_EPLRS                         = 0x57
-	IFT_ESCON                         = 0x49
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0xf2
-	IFT_FAST                          = 0x7d
-	IFT_FASTETHER                     = 0x3e
-	IFT_FASTETHERFX                   = 0x45
-	IFT_FDDI                          = 0xf
-	IFT_FIBRECHANNEL                  = 0x38
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
-	IFT_FRAMERELAYMPI                 = 0x5c
-	IFT_FRDLCIENDPT                   = 0xc1
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_FRF16MFRBUNDLE                = 0xa3
-	IFT_FRFORWARD                     = 0x9e
-	IFT_G703AT2MB                     = 0x43
-	IFT_G703AT64K                     = 0x42
-	IFT_GIF                           = 0xf0
-	IFT_GIGABITETHERNET               = 0x75
-	IFT_GR303IDT                      = 0xb2
-	IFT_GR303RDT                      = 0xb1
-	IFT_H323GATEKEEPER                = 0xa4
-	IFT_H323PROXY                     = 0xa5
-	IFT_HDH1822                       = 0x3
-	IFT_HDLC                          = 0x76
-	IFT_HDSL2                         = 0xa8
-	IFT_HIPERLAN2                     = 0xb7
-	IFT_HIPPI                         = 0x2f
-	IFT_HIPPIINTERFACE                = 0x39
-	IFT_HOSTPAD                       = 0x5a
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IBM370PARCHAN                 = 0x48
-	IFT_IDSL                          = 0x9a
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE80211                     = 0x47
-	IFT_IEEE80212                     = 0x37
-	IFT_IEEE8023ADLAG                 = 0xa1
-	IFT_IFGSN                         = 0x91
-	IFT_IMT                           = 0xbe
-	IFT_INFINIBAND                    = 0xc7
-	IFT_INTERLEAVE                    = 0x7c
-	IFT_IP                            = 0x7e
-	IFT_IPFORWARD                     = 0x8e
-	IFT_IPOVERATM                     = 0x72
-	IFT_IPOVERCDLC                    = 0x6d
-	IFT_IPOVERCLAW                    = 0x6e
-	IFT_IPSWITCH                      = 0x4e
-	IFT_IPXIP                         = 0xf9
-	IFT_ISDN                          = 0x3f
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISDNS                         = 0x4b
-	IFT_ISDNU                         = 0x4c
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88025CRFPINT               = 0x62
-	IFT_ISO88025DTR                   = 0x56
-	IFT_ISO88025FIBER                 = 0x73
-	IFT_ISO88026                      = 0xa
-	IFT_ISUP                          = 0xb3
-	IFT_L2VLAN                        = 0x87
-	IFT_L3IPVLAN                      = 0x88
-	IFT_L3IPXVLAN                     = 0x89
-	IFT_LAPB                          = 0x10
-	IFT_LAPD                          = 0x4d
-	IFT_LAPF                          = 0x77
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MEDIAMAILOVERIP               = 0x8b
-	IFT_MFSIGLINK                     = 0xa7
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_MPC                           = 0x71
-	IFT_MPLS                          = 0xa6
-	IFT_MPLSTUNNEL                    = 0x96
-	IFT_MSDSL                         = 0x8f
-	IFT_MVL                           = 0xbf
-	IFT_MYRINET                       = 0x63
-	IFT_NFAS                          = 0xaf
-	IFT_NSIP                          = 0x1b
-	IFT_OPTICALCHANNEL                = 0xc3
-	IFT_OPTICALTRANSPORT              = 0xc4
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PFLOG                         = 0xf6
-	IFT_PFSYNC                        = 0xf7
-	IFT_PLC                           = 0xae
-	IFT_POS                           = 0xab
-	IFT_PPP                           = 0x17
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
-	IFT_PROPBWAP2MP                   = 0xb8
-	IFT_PROPCNLS                      = 0x59
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PROPWIRELESSP2P               = 0x9d
-	IFT_PTPSERIAL                     = 0x16
-	IFT_PVC                           = 0xf1
-	IFT_QLLC                          = 0x44
-	IFT_RADIOMAC                      = 0xbc
-	IFT_RADSL                         = 0x5f
-	IFT_REACHDSL                      = 0xc0
-	IFT_RFC1483                       = 0x9f
-	IFT_RS232                         = 0x21
-	IFT_RSRB                          = 0x4f
-	IFT_SDLC                          = 0x11
-	IFT_SDSL                          = 0x60
-	IFT_SHDSL                         = 0xa9
-	IFT_SIP                           = 0x1f
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_SRP                           = 0x97
-	IFT_SS7SIGLINK                    = 0x9c
-	IFT_STACKTOSTACK                  = 0x6f
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0xd7
-	IFT_T1                            = 0x12
-	IFT_TDLC                          = 0x74
-	IFT_TERMPAD                       = 0x5b
-	IFT_TR008                         = 0xb0
-	IFT_TRANSPHDLC                    = 0x7b
-	IFT_TUNNEL                        = 0x83
-	IFT_ULTRA                         = 0x1d
-	IFT_USB                           = 0xa0
-	IFT_V11                           = 0x40
-	IFT_V35                           = 0x2d
-	IFT_V36                           = 0x41
-	IFT_V37                           = 0x78
-	IFT_VDSL                          = 0x61
-	IFT_VIRTUALIPADDRESS              = 0x70
-	IFT_VOICEEM                       = 0x64
-	IFT_VOICEENCAP                    = 0x67
-	IFT_VOICEFXO                      = 0x65
-	IFT_VOICEFXS                      = 0x66
-	IFT_VOICEOVERATM                  = 0x98
-	IFT_VOICEOVERFRAMERELAY           = 0x99
-	IFT_VOICEOVERIP                   = 0x68
-	IFT_X213                          = 0x5d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25HUNTGROUP                  = 0x7a
-	IFT_X25MLP                        = 0x79
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LOOPBACKNET                    = 0x7f
-	IN_RFC3021_MASK                   = 0xfffffffe
-	IPPROTO_3PC                       = 0x22
-	IPPROTO_ADFS                      = 0x44
-	IPPROTO_AH                        = 0x33
-	IPPROTO_AHIP                      = 0x3d
-	IPPROTO_APES                      = 0x63
-	IPPROTO_ARGUS                     = 0xd
-	IPPROTO_AX25                      = 0x5d
-	IPPROTO_BHA                       = 0x31
-	IPPROTO_BLT                       = 0x1e
-	IPPROTO_BRSATMON                  = 0x4c
-	IPPROTO_CARP                      = 0x70
-	IPPROTO_CFTP                      = 0x3e
-	IPPROTO_CHAOS                     = 0x10
-	IPPROTO_CMTP                      = 0x26
-	IPPROTO_CPHB                      = 0x49
-	IPPROTO_CPNX                      = 0x48
-	IPPROTO_DDP                       = 0x25
-	IPPROTO_DGP                       = 0x56
-	IPPROTO_DIVERT                    = 0x102
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_EMCON                     = 0xe
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GMTP                      = 0x64
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HELLO                     = 0x3f
-	IPPROTO_HIP                       = 0x8b
-	IPPROTO_HMP                       = 0x14
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IDPR                      = 0x23
-	IPPROTO_IDRP                      = 0x2d
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IGP                       = 0x55
-	IPPROTO_IGRP                      = 0x58
-	IPPROTO_IL                        = 0x28
-	IPPROTO_INLSP                     = 0x34
-	IPPROTO_INP                       = 0x20
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPCV                      = 0x47
-	IPPROTO_IPEIP                     = 0x5e
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPPC                      = 0x43
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IRTP                      = 0x1c
-	IPPROTO_KRYPTOLAN                 = 0x41
-	IPPROTO_LARP                      = 0x5b
-	IPPROTO_LEAF1                     = 0x19
-	IPPROTO_LEAF2                     = 0x1a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MEAS                      = 0x13
-	IPPROTO_MH                        = 0x87
-	IPPROTO_MHRP                      = 0x30
-	IPPROTO_MICP                      = 0x5f
-	IPPROTO_MOBILE                    = 0x37
-	IPPROTO_MPLS                      = 0x89
-	IPPROTO_MTP                       = 0x5c
-	IPPROTO_MUX                       = 0x12
-	IPPROTO_ND                        = 0x4d
-	IPPROTO_NHRP                      = 0x36
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_NSP                       = 0x1f
-	IPPROTO_NVPII                     = 0xb
-	IPPROTO_OLD_DIVERT                = 0xfe
-	IPPROTO_OSPFIGP                   = 0x59
-	IPPROTO_PFSYNC                    = 0xf0
-	IPPROTO_PGM                       = 0x71
-	IPPROTO_PIGP                      = 0x9
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PRM                       = 0x15
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_PVP                       = 0x4b
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_RCCMON                    = 0xa
-	IPPROTO_RDP                       = 0x1b
-	IPPROTO_RESERVED_253              = 0xfd
-	IPPROTO_RESERVED_254              = 0xfe
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_RVD                       = 0x42
-	IPPROTO_SATEXPAK                  = 0x40
-	IPPROTO_SATMON                    = 0x45
-	IPPROTO_SCCSP                     = 0x60
-	IPPROTO_SCTP                      = 0x84
-	IPPROTO_SDRP                      = 0x2a
-	IPPROTO_SEND                      = 0x103
-	IPPROTO_SEP                       = 0x21
-	IPPROTO_SHIM6                     = 0x8c
-	IPPROTO_SKIP                      = 0x39
-	IPPROTO_SPACER                    = 0x7fff
-	IPPROTO_SRPC                      = 0x5a
-	IPPROTO_ST                        = 0x7
-	IPPROTO_SVMTP                     = 0x52
-	IPPROTO_SWIPE                     = 0x35
-	IPPROTO_TCF                       = 0x57
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TLSP                      = 0x38
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_TPXX                      = 0x27
-	IPPROTO_TRUNK1                    = 0x17
-	IPPROTO_TRUNK2                    = 0x18
-	IPPROTO_TTP                       = 0x54
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_UDPLITE                   = 0x88
-	IPPROTO_VINES                     = 0x53
-	IPPROTO_VISA                      = 0x46
-	IPPROTO_VMTP                      = 0x51
-	IPPROTO_WBEXPAK                   = 0x4f
-	IPPROTO_WBMON                     = 0x4e
-	IPPROTO_WSN                       = 0x4a
-	IPPROTO_XNET                      = 0xf
-	IPPROTO_XTP                       = 0x24
-	IPV6_AUTOFLOWLABEL                = 0x3b
-	IPV6_BINDANY                      = 0x40
-	IPV6_BINDV6ONLY                   = 0x1b
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_DONTFRAG                     = 0x3e
-	IPV6_DSTOPTS                      = 0x32
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_FW_ADD                       = 0x1e
-	IPV6_FW_DEL                       = 0x1f
-	IPV6_FW_FLUSH                     = 0x20
-	IPV6_FW_GET                       = 0x22
-	IPV6_FW_ZERO                      = 0x21
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_HOPLIMIT                     = 0x2f
-	IPV6_HOPOPTS                      = 0x31
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXOPTHDR                    = 0x800
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MAX_GROUP_SRC_FILTER         = 0x200
-	IPV6_MAX_MEMBERSHIPS              = 0xfff
-	IPV6_MAX_SOCK_SRC_FILTER          = 0x80
-	IPV6_MIN_MEMBERSHIPS              = 0x1f
-	IPV6_MMTU                         = 0x500
-	IPV6_MSFILTER                     = 0x4a
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_NEXTHOP                      = 0x30
-	IPV6_PATHMTU                      = 0x2c
-	IPV6_PKTINFO                      = 0x2e
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_PREFER_TEMPADDR              = 0x3f
-	IPV6_RECVDSTOPTS                  = 0x28
-	IPV6_RECVHOPLIMIT                 = 0x25
-	IPV6_RECVHOPOPTS                  = 0x27
-	IPV6_RECVPATHMTU                  = 0x2b
-	IPV6_RECVPKTINFO                  = 0x24
-	IPV6_RECVRTHDR                    = 0x26
-	IPV6_RECVTCLASS                   = 0x39
-	IPV6_RTHDR                        = 0x33
-	IPV6_RTHDRDSTOPTS                 = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x3d
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_USE_MIN_MTU                  = 0x2a
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_ADD_SOURCE_MEMBERSHIP          = 0x46
-	IP_BINDANY                        = 0x18
-	IP_BLOCK_SOURCE                   = 0x48
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DONTFRAG                       = 0x43
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_DROP_SOURCE_MEMBERSHIP         = 0x47
-	IP_DUMMYNET3                      = 0x31
-	IP_DUMMYNET_CONFIGURE             = 0x3c
-	IP_DUMMYNET_DEL                   = 0x3d
-	IP_DUMMYNET_FLUSH                 = 0x3e
-	IP_DUMMYNET_GET                   = 0x40
-	IP_FAITH                          = 0x16
-	IP_FW3                            = 0x30
-	IP_FW_ADD                         = 0x32
-	IP_FW_DEL                         = 0x33
-	IP_FW_FLUSH                       = 0x34
-	IP_FW_GET                         = 0x36
-	IP_FW_NAT_CFG                     = 0x38
-	IP_FW_NAT_DEL                     = 0x39
-	IP_FW_NAT_GET_CONFIG              = 0x3a
-	IP_FW_NAT_GET_LOG                 = 0x3b
-	IP_FW_RESETLOG                    = 0x37
-	IP_FW_TABLE_ADD                   = 0x28
-	IP_FW_TABLE_DEL                   = 0x29
-	IP_FW_TABLE_FLUSH                 = 0x2a
-	IP_FW_TABLE_GETSIZE               = 0x2b
-	IP_FW_TABLE_LIST                  = 0x2c
-	IP_FW_ZERO                        = 0x35
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x15
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_GROUP_SRC_FILTER           = 0x200
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MAX_SOCK_MUTE_FILTER           = 0x80
-	IP_MAX_SOCK_SRC_FILTER            = 0x80
-	IP_MAX_SOURCE_FILTER              = 0x400
-	IP_MF                             = 0x2000
-	IP_MINTTL                         = 0x42
-	IP_MIN_MEMBERSHIPS                = 0x1f
-	IP_MSFILTER                       = 0x4a
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_MULTICAST_VIF                  = 0xe
-	IP_OFFMASK                        = 0x1fff
-	IP_ONESBCAST                      = 0x17
-	IP_OPTIONS                        = 0x1
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTOS                        = 0x44
-	IP_RECVTTL                        = 0x41
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RSVP_OFF                       = 0x10
-	IP_RSVP_ON                        = 0xf
-	IP_RSVP_VIF_OFF                   = 0x12
-	IP_RSVP_VIF_ON                    = 0x11
-	IP_SENDSRCADDR                    = 0x7
-	IP_TOS                            = 0x3
-	IP_TTL                            = 0x4
-	IP_UNBLOCK_SOURCE                 = 0x49
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_AUTOSYNC                     = 0x7
-	MADV_CORE                         = 0x9
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x5
-	MADV_NOCORE                       = 0x8
-	MADV_NORMAL                       = 0x0
-	MADV_NOSYNC                       = 0x6
-	MADV_PROTECT                      = 0xa
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_WILLNEED                     = 0x3
-	MAP_ALIGNED_SUPER                 = 0x1000000
-	MAP_ALIGNMENT_MASK                = -0x1000000
-	MAP_ALIGNMENT_SHIFT               = 0x18
-	MAP_ANON                          = 0x1000
-	MAP_ANONYMOUS                     = 0x1000
-	MAP_COPY                          = 0x2
-	MAP_EXCL                          = 0x4000
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_NOCORE                        = 0x20000
-	MAP_NORESERVE                     = 0x40
-	MAP_NOSYNC                        = 0x800
-	MAP_PREFAULT_READ                 = 0x40000
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_RESERVED0080                  = 0x80
-	MAP_RESERVED0100                  = 0x100
-	MAP_SHARED                        = 0x1
-	MAP_STACK                         = 0x400
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_CMSG_CLOEXEC                  = 0x40000
-	MSG_COMPAT                        = 0x8000
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOF                           = 0x100
-	MSG_EOR                           = 0x8
-	MSG_NBIO                          = 0x4000
-	MSG_NOSIGNAL                      = 0x20000
-	MSG_NOTIFICATION                  = 0x2000
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MS_ASYNC                          = 0x1
-	MS_INVALIDATE                     = 0x2
-	MS_SYNC                           = 0x0
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_IFLISTL                    = 0x5
-	NET_RT_IFMALIST                   = 0x4
-	NET_RT_MAXID                      = 0x6
-	NOFLSH                            = 0x80000000
-	NOTE_ATTRIB                       = 0x8
-	NOTE_CHILD                        = 0x4
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FFAND                        = 0x40000000
-	NOTE_FFCOPY                       = 0xc0000000
-	NOTE_FFCTRLMASK                   = 0xc0000000
-	NOTE_FFLAGSMASK                   = 0xffffff
-	NOTE_FFNOP                        = 0x0
-	NOTE_FFOR                         = 0x80000000
-	NOTE_FORK                         = 0x40000000
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_PCTRLMASK                    = 0xf0000000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRIGGER                      = 0x1000000
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x100000
-	O_CREAT                           = 0x200
-	O_DIRECT                          = 0x10000
-	O_DIRECTORY                       = 0x20000
-	O_EXCL                            = 0x800
-	O_EXEC                            = 0x40000
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x8000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_SHLOCK                          = 0x10
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_TTY_INIT                        = 0x80000
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	RLIMIT_AS                         = 0xa
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x8
-	RTAX_NETMASK                      = 0x2
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_BROADCAST                     = 0x400000
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_FMASK                         = 0x1004d808
-	RTF_GATEWAY                       = 0x2
-	RTF_GWFLAG_COMPAT                 = 0x80000000
-	RTF_HOST                          = 0x4
-	RTF_LLDATA                        = 0x400
-	RTF_LLINFO                        = 0x400
-	RTF_LOCAL                         = 0x200000
-	RTF_MODIFIED                      = 0x20
-	RTF_MULTICAST                     = 0x800000
-	RTF_PINNED                        = 0x100000
-	RTF_PRCLONING                     = 0x10000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x40000
-	RTF_REJECT                        = 0x8
-	RTF_RNH_LOCKED                    = 0x40000000
-	RTF_STATIC                        = 0x800
-	RTF_STICKY                        = 0x10000000
-	RTF_UP                            = 0x1
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DELMADDR                      = 0x10
-	RTM_GET                           = 0x4
-	RTM_IEEE80211                     = 0x12
-	RTM_IFANNOUNCE                    = 0x11
-	RTM_IFINFO                        = 0xe
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_NEWMADDR                      = 0xf
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RTV_WEIGHT                        = 0x100
-	RT_ALL_FIBS                       = -0x1
-	RT_CACHING_CONTEXT                = 0x1
-	RT_DEFAULT_FIB                    = 0x0
-	RT_NORTREF                        = 0x2
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	RUSAGE_THREAD                     = 0x1
-	SCM_BINTIME                       = 0x4
-	SCM_CREDS                         = 0x3
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x2
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCADDRT                         = 0x8030720a
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCAIFGROUP                      = 0x80246987
-	SIOCALIFADDR                      = 0x8118691b
-	SIOCATMARK                        = 0x40047307
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDELRT                         = 0x8030720b
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFGROUP                      = 0x80246989
-	SIOCDIFPHYADDR                    = 0x80206949
-	SIOCDLIFADDR                      = 0x8118691d
-	SIOCGDRVSPEC                      = 0xc01c697b
-	SIOCGETSGCNT                      = 0xc0147210
-	SIOCGETVIFCNT                     = 0xc014720f
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCAP                        = 0xc020691f
-	SIOCGIFCONF                       = 0xc0086924
-	SIOCGIFDESCR                      = 0xc020692a
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFIB                        = 0xc020695c
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFGMEMB                      = 0xc024698a
-	SIOCGIFGROUP                      = 0xc0246988
-	SIOCGIFINDEX                      = 0xc0206920
-	SIOCGIFMAC                        = 0xc0206926
-	SIOCGIFMEDIA                      = 0xc0286938
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc0206933
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206948
-	SIOCGIFPHYS                       = 0xc0206935
-	SIOCGIFPSRCADDR                   = 0xc0206947
-	SIOCGIFSTATUS                     = 0xc331693b
-	SIOCGLIFADDR                      = 0xc118691c
-	SIOCGLIFPHYADDR                   = 0xc118694b
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCGPRIVATE_0                    = 0xc0206950
-	SIOCGPRIVATE_1                    = 0xc0206951
-	SIOCIFCREATE                      = 0xc020697a
-	SIOCIFCREATE2                     = 0xc020697c
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc00c6978
-	SIOCSDRVSPEC                      = 0x801c697b
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFCAP                        = 0x8020691e
-	SIOCSIFDESCR                      = 0x80206929
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFIB                        = 0x8020695d
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFLLADDR                     = 0x8020693c
-	SIOCSIFMAC                        = 0x80206927
-	SIOCSIFMEDIA                      = 0xc0206937
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x80206934
-	SIOCSIFNAME                       = 0x80206928
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x80406946
-	SIOCSIFPHYS                       = 0x80206936
-	SIOCSIFRVNET                      = 0xc020695b
-	SIOCSIFVNET                       = 0xc020695a
-	SIOCSLIFPHYADDR                   = 0x8118694a
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SOCK_CLOEXEC                      = 0x10000000
-	SOCK_DGRAM                        = 0x2
-	SOCK_MAXADDRLEN                   = 0xff
-	SOCK_NONBLOCK                     = 0x20000000
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_ACCEPTFILTER                   = 0x1000
-	SO_BINTIME                        = 0x2000
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LABEL                          = 0x1009
-	SO_LINGER                         = 0x80
-	SO_LISTENINCQLEN                  = 0x1013
-	SO_LISTENQLEN                     = 0x1012
-	SO_LISTENQLIMIT                   = 0x1011
-	SO_NOSIGPIPE                      = 0x800
-	SO_NO_DDP                         = 0x8000
-	SO_NO_OFFLOAD                     = 0x4000
-	SO_OOBINLINE                      = 0x100
-	SO_PEERLABEL                      = 0x1010
-	SO_PROTOCOL                       = 0x1016
-	SO_PROTOTYPE                      = 0x1016
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_SETFIB                         = 0x1014
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_TIMESTAMP                      = 0x400
-	SO_TYPE                           = 0x1008
-	SO_USELOOPBACK                    = 0x40
-	SO_USER_COOKIE                    = 0x1015
-	SO_VENDOR                         = 0x80000000
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CA_NAME_MAX                   = 0x10
-	TCP_CONGESTION                    = 0x40
-	TCP_INFO                          = 0x20
-	TCP_KEEPCNT                       = 0x400
-	TCP_KEEPIDLE                      = 0x100
-	TCP_KEEPINIT                      = 0x80
-	TCP_KEEPINTVL                     = 0x200
-	TCP_MAXBURST                      = 0x4
-	TCP_MAXHLEN                       = 0x3c
-	TCP_MAXOLEN                       = 0x28
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x4
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MD5SIG                        = 0x10
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x218
-	TCP_NODELAY                       = 0x1
-	TCP_NOOPT                         = 0x8
-	TCP_NOPUSH                        = 0x4
-	TCP_VENDOR                        = 0x80000000
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDRAIN                         = 0x2000745e
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLUSH                         = 0x80047410
-	TIOCGDRAINWAIT                    = 0x40047456
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGPGRP                         = 0x40047477
-	TIOCGPTN                          = 0x4004740f
-	TIOCGSID                          = 0x40047463
-	TIOCGWINSZ                        = 0x40087468
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGDTRWAIT                     = 0x4004745a
-	TIOCMGET                          = 0x4004746a
-	TIOCMSDTRWAIT                     = 0x8004745b
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DCD                         = 0x40
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTMASTER                      = 0x2000741c
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDRAINWAIT                    = 0x80047457
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSIG                           = 0x2004745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x20007465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCTIMESTAMP                     = 0x40087459
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VERASE2                           = 0x7
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WCONTINUED                        = 0x4
-	WCOREFLAG                         = 0x80
-	WEXITED                           = 0x10
-	WLINUXCLONE                       = 0x80000000
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x8
-	WSTOPPED                          = 0x2
-	WTRAPPED                          = 0x20
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADF           = syscall.Errno(0x9)
-	EBADMSG         = syscall.Errno(0x59)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x55)
-	ECAPMODE        = syscall.Errno(0x5e)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDOM            = syscall.Errno(0x21)
-	EDOOFUS         = syscall.Errno(0x58)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x52)
-	EILSEQ          = syscall.Errno(0x56)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x60)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5a)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x57)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x5b)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x53)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCAPABLE     = syscall.Errno(0x5d)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTRECOVERABLE = syscall.Errno(0x5f)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x2d)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x2d)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EOWNERDEAD      = syscall.Errno(0x60)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x5c)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGLIBRT  = syscall.Signal(0x21)
-	SIGLWP    = syscall.Signal(0x20)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTHR    = syscall.Signal(0x20)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:  "operation not permitted",
-	2:  "no such file or directory",
-	3:  "no such process",
-	4:  "interrupted system call",
-	5:  "input/output error",
-	6:  "device not configured",
-	7:  "argument list too long",
-	8:  "exec format error",
-	9:  "bad file descriptor",
-	10: "no child processes",
-	11: "resource deadlock avoided",
-	12: "cannot allocate memory",
-	13: "permission denied",
-	14: "bad address",
-	15: "block device required",
-	16: "device busy",
-	17: "file exists",
-	18: "cross-device link",
-	19: "operation not supported by device",
-	20: "not a directory",
-	21: "is a directory",
-	22: "invalid argument",
-	23: "too many open files in system",
-	24: "too many open files",
-	25: "inappropriate ioctl for device",
-	26: "text file busy",
-	27: "file too large",
-	28: "no space left on device",
-	29: "illegal seek",
-	30: "read-only file system",
-	31: "too many links",
-	32: "broken pipe",
-	33: "numerical argument out of domain",
-	34: "result too large",
-	35: "resource temporarily unavailable",
-	36: "operation now in progress",
-	37: "operation already in progress",
-	38: "socket operation on non-socket",
-	39: "destination address required",
-	40: "message too long",
-	41: "protocol wrong type for socket",
-	42: "protocol not available",
-	43: "protocol not supported",
-	44: "socket type not supported",
-	45: "operation not supported",
-	46: "protocol family not supported",
-	47: "address family not supported by protocol family",
-	48: "address already in use",
-	49: "can't assign requested address",
-	50: "network is down",
-	51: "network is unreachable",
-	52: "network dropped connection on reset",
-	53: "software caused connection abort",
-	54: "connection reset by peer",
-	55: "no buffer space available",
-	56: "socket is already connected",
-	57: "socket is not connected",
-	58: "can't send after socket shutdown",
-	59: "too many references: can't splice",
-	60: "operation timed out",
-	61: "connection refused",
-	62: "too many levels of symbolic links",
-	63: "file name too long",
-	64: "host is down",
-	65: "no route to host",
-	66: "directory not empty",
-	67: "too many processes",
-	68: "too many users",
-	69: "disc quota exceeded",
-	70: "stale NFS file handle",
-	71: "too many levels of remote in path",
-	72: "RPC struct is bad",
-	73: "RPC version wrong",
-	74: "RPC prog. not avail",
-	75: "program version wrong",
-	76: "bad procedure for program",
-	77: "no locks available",
-	78: "function not implemented",
-	79: "inappropriate file type or format",
-	80: "authentication error",
-	81: "need authenticator",
-	82: "identifier removed",
-	83: "no message of desired type",
-	84: "value too large to be stored in data type",
-	85: "operation canceled",
-	86: "illegal byte sequence",
-	87: "attribute not found",
-	88: "programming error",
-	89: "bad message",
-	90: "multihop attempted",
-	91: "link has been severed",
-	92: "protocol error",
-	93: "capabilities insufficient",
-	94: "not permitted in capability mode",
-	95: "state not recoverable",
-	96: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "suspended (signal)",
-	18: "suspended",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-	32: "unknown signal",
-	33: "unknown signal",
-}


[42/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/command.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/command.go b/newt/vendor/github.com/spf13/cobra/command.go
deleted file mode 100644
index 4988931..0000000
--- a/newt/vendor/github.com/spf13/cobra/command.go
+++ /dev/null
@@ -1,1291 +0,0 @@
-// Copyright � 2013 Steve Francia <sp...@spf13.com>.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-//Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces.
-//In addition to providing an interface, Cobra simultaneously provides a controller to organize your application code.
-package cobra
-
-import (
-	"bytes"
-	"fmt"
-	"io"
-	"os"
-	"path/filepath"
-	"sort"
-	"strings"
-
-	flag "github.com/spf13/pflag"
-)
-
-// Command is just that, a command for your application.
-// eg.  'go run' ... 'run' is the command. Cobra requires
-// you to define the usage and description as part of your command
-// definition to ensure usability.
-type Command struct {
-	// Name is the command name, usually the executable's name.
-	name string
-	// The one-line usage message.
-	Use string
-	// An array of aliases that can be used instead of the first word in Use.
-	Aliases []string
-	// An array of command names for which this command will be suggested - similar to aliases but only suggests.
-	SuggestFor []string
-	// The short description shown in the 'help' output.
-	Short string
-	// The long message shown in the 'help <this-command>' output.
-	Long string
-	// Examples of how to use the command
-	Example string
-	// List of all valid non-flag arguments that are accepted in bash completions
-	ValidArgs []string
-	// List of aliases for ValidArgs. These are not suggested to the user in the bash
-	// completion, but accepted if entered manually.
-	ArgAliases []string
-	// Custom functions used by the bash autocompletion generator
-	BashCompletionFunction string
-	// Is this command deprecated and should print this string when used?
-	Deprecated string
-	// Is this command hidden and should NOT show up in the list of available commands?
-	Hidden bool
-	// Full set of flags
-	flags *flag.FlagSet
-	// Set of flags childrens of this command will inherit
-	pflags *flag.FlagSet
-	// Flags that are declared specifically by this command (not inherited).
-	lflags *flag.FlagSet
-	// SilenceErrors is an option to quiet errors down stream
-	SilenceErrors bool
-	// Silence Usage is an option to silence usage when an error occurs.
-	SilenceUsage bool
-	// The *Run functions are executed in the following order:
-	//   * PersistentPreRun()
-	//   * PreRun()
-	//   * Run()
-	//   * PostRun()
-	//   * PersistentPostRun()
-	// All functions get the same args, the arguments after the command name
-	// PersistentPreRun: children of this command will inherit and execute
-	PersistentPreRun func(cmd *Command, args []string)
-	// PersistentPreRunE: PersistentPreRun but returns an error
-	PersistentPreRunE func(cmd *Command, args []string) error
-	// PreRun: children of this command will not inherit.
-	PreRun func(cmd *Command, args []string)
-	// PreRunE: PreRun but returns an error
-	PreRunE func(cmd *Command, args []string) error
-	// Run: Typically the actual work function. Most commands will only implement this
-	Run func(cmd *Command, args []string)
-	// RunE: Run but returns an error
-	RunE func(cmd *Command, args []string) error
-	// PostRun: run after the Run command.
-	PostRun func(cmd *Command, args []string)
-	// PostRunE: PostRun but returns an error
-	PostRunE func(cmd *Command, args []string) error
-	// PersistentPostRun: children of this command will inherit and execute after PostRun
-	PersistentPostRun func(cmd *Command, args []string)
-	// PersistentPostRunE: PersistentPostRun but returns an error
-	PersistentPostRunE func(cmd *Command, args []string) error
-	// DisableAutoGenTag remove
-	DisableAutoGenTag bool
-	// Commands is the list of commands supported by this program.
-	commands []*Command
-	// Parent Command for this command
-	parent *Command
-	// max lengths of commands' string lengths for use in padding
-	commandsMaxUseLen         int
-	commandsMaxCommandPathLen int
-	commandsMaxNameLen        int
-	// is commands slice are sorted or not
-	commandsAreSorted bool
-
-	flagErrorBuf *bytes.Buffer
-
-	args          []string             // actual args parsed from flags
-	output        *io.Writer           // out writer if set in SetOutput(w)
-	usageFunc     func(*Command) error // Usage can be defined by application
-	usageTemplate string               // Can be defined by Application
-	flagErrorFunc func(*Command, error) error
-	helpTemplate  string                   // Can be defined by Application
-	helpFunc      func(*Command, []string) // Help can be defined by application
-	helpCommand   *Command                 // The help command
-	// The global normalization function that we can use on every pFlag set and children commands
-	globNormFunc func(f *flag.FlagSet, name string) flag.NormalizedName
-
-	// Disable the suggestions based on Levenshtein distance that go along with 'unknown command' messages
-	DisableSuggestions bool
-	// If displaying suggestions, allows to set the minimum levenshtein distance to display, must be > 0
-	SuggestionsMinimumDistance int
-
-	// Disable the flag parsing. If this is true all flags will be passed to the command as arguments.
-	DisableFlagParsing bool
-}
-
-// os.Args[1:] by default, if desired, can be overridden
-// particularly useful when testing.
-func (c *Command) SetArgs(a []string) {
-	c.args = a
-}
-
-// SetOutput sets the destination for usage and error messages.
-// If output is nil, os.Stderr is used.
-func (c *Command) SetOutput(output io.Writer) {
-	c.output = &output
-}
-
-// Usage can be defined by application.
-func (c *Command) SetUsageFunc(f func(*Command) error) {
-	c.usageFunc = f
-}
-
-// Can be defined by Application.
-func (c *Command) SetUsageTemplate(s string) {
-	c.usageTemplate = s
-}
-
-// SetFlagErrorFunc sets a function to generate an error when flag parsing
-// fails
-func (c *Command) SetFlagErrorFunc(f func(*Command, error) error) {
-	c.flagErrorFunc = f
-}
-
-// Can be defined by Application
-func (c *Command) SetHelpFunc(f func(*Command, []string)) {
-	c.helpFunc = f
-}
-
-func (c *Command) SetHelpCommand(cmd *Command) {
-	c.helpCommand = cmd
-}
-
-// Can be defined by Application.
-func (c *Command) SetHelpTemplate(s string) {
-	c.helpTemplate = s
-}
-
-// SetGlobalNormalizationFunc sets a normalization function to all flag sets and also to child commands.
-// The user should not have a cyclic dependency on commands.
-func (c *Command) SetGlobalNormalizationFunc(n func(f *flag.FlagSet, name string) flag.NormalizedName) {
-	c.Flags().SetNormalizeFunc(n)
-	c.PersistentFlags().SetNormalizeFunc(n)
-	c.globNormFunc = n
-
-	for _, command := range c.commands {
-		command.SetGlobalNormalizationFunc(n)
-	}
-}
-
-func (c *Command) OutOrStdout() io.Writer {
-	return c.getOut(os.Stdout)
-}
-
-func (c *Command) OutOrStderr() io.Writer {
-	return c.getOut(os.Stderr)
-}
-
-func (c *Command) getOut(def io.Writer) io.Writer {
-	if c.output != nil {
-		return *c.output
-	}
-	if c.HasParent() {
-		return c.parent.getOut(def)
-	}
-	return def
-}
-
-// UsageFunc returns either the function set by SetUsageFunc for this command
-// or a parent, or it returns a default usage function.
-func (c *Command) UsageFunc() (f func(*Command) error) {
-	if c.usageFunc != nil {
-		return c.usageFunc
-	}
-
-	if c.HasParent() {
-		return c.parent.UsageFunc()
-	}
-	return func(c *Command) error {
-		c.mergePersistentFlags()
-		err := tmpl(c.OutOrStderr(), c.UsageTemplate(), c)
-		if err != nil {
-			c.Println(err)
-		}
-		return err
-	}
-}
-
-// Usage puts out the usage for the command.
-// Used when a user provides invalid input.
-// Can be defined by user by overriding UsageFunc.
-func (c *Command) Usage() error {
-	return c.UsageFunc()(c)
-}
-
-// HelpFunc returns either the function set by SetHelpFunc for this command
-// or a parent, or it returns a function with default help behavior.
-func (c *Command) HelpFunc() func(*Command, []string) {
-	if helpFunc := c.checkHelpFunc(); helpFunc != nil {
-		return helpFunc
-	}
-	return func(*Command, []string) {
-		c.mergePersistentFlags()
-		err := tmpl(c.OutOrStdout(), c.HelpTemplate(), c)
-		if err != nil {
-			c.Println(err)
-		}
-	}
-}
-
-// checkHelpFunc checks if there is helpFunc in ancestors of c.
-func (c *Command) checkHelpFunc() func(*Command, []string) {
-	if c == nil {
-		return nil
-	}
-	if c.helpFunc != nil {
-		return c.helpFunc
-	}
-	if c.HasParent() {
-		return c.parent.checkHelpFunc()
-	}
-	return nil
-}
-
-// Help puts out the help for the command.
-// Used when a user calls help [command].
-// Can be defined by user by overriding HelpFunc.
-func (c *Command) Help() error {
-	c.HelpFunc()(c, []string{})
-	return nil
-}
-
-func (c *Command) UsageString() string {
-	tmpOutput := c.output
-	bb := new(bytes.Buffer)
-	c.SetOutput(bb)
-	c.Usage()
-	c.output = tmpOutput
-	return bb.String()
-}
-
-// FlagErrorFunc returns either the function set by SetFlagErrorFunc for this
-// command or a parent, or it returns a function which returns the original
-// error.
-func (c *Command) FlagErrorFunc() (f func(*Command, error) error) {
-	if c.flagErrorFunc != nil {
-		return c.flagErrorFunc
-	}
-
-	if c.HasParent() {
-		return c.parent.FlagErrorFunc()
-	}
-	return func(c *Command, err error) error {
-		return err
-	}
-}
-
-var minUsagePadding = 25
-
-func (c *Command) UsagePadding() int {
-	if c.parent == nil || minUsagePadding > c.parent.commandsMaxUseLen {
-		return minUsagePadding
-	}
-	return c.parent.commandsMaxUseLen
-}
-
-var minCommandPathPadding = 11
-
-//
-func (c *Command) CommandPathPadding() int {
-	if c.parent == nil || minCommandPathPadding > c.parent.commandsMaxCommandPathLen {
-		return minCommandPathPadding
-	}
-	return c.parent.commandsMaxCommandPathLen
-}
-
-var minNamePadding = 11
-
-func (c *Command) NamePadding() int {
-	if c.parent == nil || minNamePadding > c.parent.commandsMaxNameLen {
-		return minNamePadding
-	}
-	return c.parent.commandsMaxNameLen
-}
-
-func (c *Command) UsageTemplate() string {
-	if c.usageTemplate != "" {
-		return c.usageTemplate
-	}
-
-	if c.HasParent() {
-		return c.parent.UsageTemplate()
-	}
-	return `Usage:{{if .Runnable}}
-  {{if .HasAvailableFlags}}{{appendIfNotPresent .UseLine "[flags]"}}{{else}}{{.UseLine}}{{end}}{{end}}{{if .HasAvailableSubCommands}}
-  {{ .CommandPath}} [command]{{end}}{{if gt .Aliases 0}}
-
-Aliases:
-  {{.NameAndAliases}}
-{{end}}{{if .HasExample}}
-
-Examples:
-{{ .Example }}{{end}}{{ if .HasAvailableSubCommands}}
-
-Available Commands:{{range .Commands}}{{if .IsAvailableCommand}}
-  {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{ if .HasAvailableLocalFlags}}
-
-Flags:
-{{.LocalFlags.FlagUsages | trimRightSpace}}{{end}}{{ if .HasAvailableInheritedFlags}}
-
-Global Flags:
-{{.InheritedFlags.FlagUsages | trimRightSpace}}{{end}}{{if .HasHelpSubCommands}}
-
-Additional help topics:{{range .Commands}}{{if .IsHelpCommand}}
-  {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{ if .HasAvailableSubCommands }}
-
-Use "{{.CommandPath}} [command] --help" for more information about a command.{{end}}
-`
-}
-
-func (c *Command) HelpTemplate() string {
-	if c.helpTemplate != "" {
-		return c.helpTemplate
-	}
-
-	if c.HasParent() {
-		return c.parent.HelpTemplate()
-	}
-	return `{{with or .Long .Short }}{{. | trim}}
-
-{{end}}{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
-}
-
-// Really only used when casting a command to a commander.
-func (c *Command) resetChildrensParents() {
-	for _, x := range c.commands {
-		x.parent = c
-	}
-}
-
-// Test if the named flag is a boolean flag.
-func isBooleanFlag(name string, f *flag.FlagSet) bool {
-	flag := f.Lookup(name)
-	if flag == nil {
-		return false
-	}
-	return flag.Value.Type() == "bool"
-}
-
-// Test if the named flag is a boolean flag.
-func isBooleanShortFlag(name string, f *flag.FlagSet) bool {
-	result := false
-	f.VisitAll(func(f *flag.Flag) {
-		if f.Shorthand == name && f.Value.Type() == "bool" {
-			result = true
-		}
-	})
-	return result
-}
-
-func stripFlags(args []string, c *Command) []string {
-	if len(args) < 1 {
-		return args
-	}
-	c.mergePersistentFlags()
-
-	commands := []string{}
-
-	inQuote := false
-	inFlag := false
-	for _, y := range args {
-		if !inQuote {
-			switch {
-			case strings.HasPrefix(y, "\""):
-				inQuote = true
-			case strings.Contains(y, "=\""):
-				inQuote = true
-			case strings.HasPrefix(y, "--") && !strings.Contains(y, "="):
-				// TODO: this isn't quite right, we should really check ahead for 'true' or 'false'
-				inFlag = !isBooleanFlag(y[2:], c.Flags())
-			case strings.HasPrefix(y, "-") && !strings.Contains(y, "=") && len(y) == 2 && !isBooleanShortFlag(y[1:], c.Flags()):
-				inFlag = true
-			case inFlag:
-				inFlag = false
-			case y == "":
-				// strip empty commands, as the go tests expect this to be ok....
-			case !strings.HasPrefix(y, "-"):
-				commands = append(commands, y)
-				inFlag = false
-			}
-		}
-
-		if strings.HasSuffix(y, "\"") && !strings.HasSuffix(y, "\\\"") {
-			inQuote = false
-		}
-	}
-
-	return commands
-}
-
-// argsMinusFirstX removes only the first x from args.  Otherwise, commands that look like
-// openshift admin policy add-role-to-user admin my-user, lose the admin argument (arg[4]).
-func argsMinusFirstX(args []string, x string) []string {
-	for i, y := range args {
-		if x == y {
-			ret := []string{}
-			ret = append(ret, args[:i]...)
-			ret = append(ret, args[i+1:]...)
-			return ret
-		}
-	}
-	return args
-}
-
-// find the target command given the args and command tree
-// Meant to be run on the highest node. Only searches down.
-func (c *Command) Find(args []string) (*Command, []string, error) {
-	if c == nil {
-		return nil, nil, fmt.Errorf("Called find() on a nil Command")
-	}
-
-	var innerfind func(*Command, []string) (*Command, []string)
-
-	innerfind = func(c *Command, innerArgs []string) (*Command, []string) {
-		argsWOflags := stripFlags(innerArgs, c)
-		if len(argsWOflags) == 0 {
-			return c, innerArgs
-		}
-		nextSubCmd := argsWOflags[0]
-		matches := make([]*Command, 0)
-		for _, cmd := range c.commands {
-			if cmd.Name() == nextSubCmd || cmd.HasAlias(nextSubCmd) { // exact name or alias match
-				return innerfind(cmd, argsMinusFirstX(innerArgs, nextSubCmd))
-			}
-			if EnablePrefixMatching {
-				if strings.HasPrefix(cmd.Name(), nextSubCmd) { // prefix match
-					matches = append(matches, cmd)
-				}
-				for _, x := range cmd.Aliases {
-					if strings.HasPrefix(x, nextSubCmd) {
-						matches = append(matches, cmd)
-					}
-				}
-			}
-		}
-
-		// only accept a single prefix match - multiple matches would be ambiguous
-		if len(matches) == 1 {
-			return innerfind(matches[0], argsMinusFirstX(innerArgs, argsWOflags[0]))
-		}
-
-		return c, innerArgs
-	}
-
-	commandFound, a := innerfind(c, args)
-	argsWOflags := stripFlags(a, commandFound)
-
-	// no subcommand, always take args
-	if !commandFound.HasSubCommands() {
-		return commandFound, a, nil
-	}
-
-	// root command with subcommands, do subcommand checking
-	if commandFound == c && len(argsWOflags) > 0 {
-		suggestionsString := ""
-		if !c.DisableSuggestions {
-			if c.SuggestionsMinimumDistance <= 0 {
-				c.SuggestionsMinimumDistance = 2
-			}
-			if suggestions := c.SuggestionsFor(argsWOflags[0]); len(suggestions) > 0 {
-				suggestionsString += "\n\nDid you mean this?\n"
-				for _, s := range suggestions {
-					suggestionsString += fmt.Sprintf("\t%v\n", s)
-				}
-			}
-		}
-		return commandFound, a, fmt.Errorf("unknown command %q for %q%s", argsWOflags[0], commandFound.CommandPath(), suggestionsString)
-	}
-
-	return commandFound, a, nil
-}
-
-func (c *Command) SuggestionsFor(typedName string) []string {
-	suggestions := []string{}
-	for _, cmd := range c.commands {
-		if cmd.IsAvailableCommand() {
-			levenshteinDistance := ld(typedName, cmd.Name(), true)
-			suggestByLevenshtein := levenshteinDistance <= c.SuggestionsMinimumDistance
-			suggestByPrefix := strings.HasPrefix(strings.ToLower(cmd.Name()), strings.ToLower(typedName))
-			if suggestByLevenshtein || suggestByPrefix {
-				suggestions = append(suggestions, cmd.Name())
-			}
-			for _, explicitSuggestion := range cmd.SuggestFor {
-				if strings.EqualFold(typedName, explicitSuggestion) {
-					suggestions = append(suggestions, cmd.Name())
-				}
-			}
-		}
-	}
-	return suggestions
-}
-
-func (c *Command) VisitParents(fn func(*Command)) {
-	var traverse func(*Command) *Command
-
-	traverse = func(x *Command) *Command {
-		if x != c {
-			fn(x)
-		}
-		if x.HasParent() {
-			return traverse(x.parent)
-		}
-		return x
-	}
-	traverse(c)
-}
-
-func (c *Command) Root() *Command {
-	var findRoot func(*Command) *Command
-
-	findRoot = func(x *Command) *Command {
-		if x.HasParent() {
-			return findRoot(x.parent)
-		}
-		return x
-	}
-
-	return findRoot(c)
-}
-
-// ArgsLenAtDash will return the length of f.Args at the moment when a -- was
-// found during arg parsing. This allows your program to know which args were
-// before the -- and which came after. (Description from
-// https://godoc.org/github.com/spf13/pflag#FlagSet.ArgsLenAtDash).
-func (c *Command) ArgsLenAtDash() int {
-	return c.Flags().ArgsLenAtDash()
-}
-
-func (c *Command) execute(a []string) (err error) {
-	if c == nil {
-		return fmt.Errorf("Called Execute() on a nil Command")
-	}
-
-	if len(c.Deprecated) > 0 {
-		c.Printf("Command %q is deprecated, %s\n", c.Name(), c.Deprecated)
-	}
-
-	// initialize help flag as the last point possible to allow for user
-	// overriding
-	c.initHelpFlag()
-
-	err = c.ParseFlags(a)
-	if err != nil {
-		return c.FlagErrorFunc()(c, err)
-	}
-	// If help is called, regardless of other flags, return we want help
-	// Also say we need help if the command isn't runnable.
-	helpVal, err := c.Flags().GetBool("help")
-	if err != nil {
-		// should be impossible to get here as we always declare a help
-		// flag in initHelpFlag()
-		c.Println("\"help\" flag declared as non-bool. Please correct your code")
-		return err
-	}
-
-	if helpVal || !c.Runnable() {
-		return flag.ErrHelp
-	}
-
-	c.preRun()
-
-	argWoFlags := c.Flags().Args()
-	if c.DisableFlagParsing {
-		argWoFlags = a
-	}
-
-	for p := c; p != nil; p = p.Parent() {
-		if p.PersistentPreRunE != nil {
-			if err := p.PersistentPreRunE(c, argWoFlags); err != nil {
-				return err
-			}
-			break
-		} else if p.PersistentPreRun != nil {
-			p.PersistentPreRun(c, argWoFlags)
-			break
-		}
-	}
-	if c.PreRunE != nil {
-		if err := c.PreRunE(c, argWoFlags); err != nil {
-			return err
-		}
-	} else if c.PreRun != nil {
-		c.PreRun(c, argWoFlags)
-	}
-
-	if c.RunE != nil {
-		if err := c.RunE(c, argWoFlags); err != nil {
-			return err
-		}
-	} else {
-		c.Run(c, argWoFlags)
-	}
-	if c.PostRunE != nil {
-		if err := c.PostRunE(c, argWoFlags); err != nil {
-			return err
-		}
-	} else if c.PostRun != nil {
-		c.PostRun(c, argWoFlags)
-	}
-	for p := c; p != nil; p = p.Parent() {
-		if p.PersistentPostRunE != nil {
-			if err := p.PersistentPostRunE(c, argWoFlags); err != nil {
-				return err
-			}
-			break
-		} else if p.PersistentPostRun != nil {
-			p.PersistentPostRun(c, argWoFlags)
-			break
-		}
-	}
-
-	return nil
-}
-
-func (c *Command) preRun() {
-	for _, x := range initializers {
-		x()
-	}
-}
-
-func (c *Command) errorMsgFromParse() string {
-	s := c.flagErrorBuf.String()
-
-	x := strings.Split(s, "\n")
-
-	if len(x) > 0 {
-		return x[0]
-	}
-	return ""
-}
-
-// Call execute to use the args (os.Args[1:] by default)
-// and run through the command tree finding appropriate matches
-// for commands and then corresponding flags.
-func (c *Command) Execute() error {
-	_, err := c.ExecuteC()
-	return err
-}
-
-func (c *Command) ExecuteC() (cmd *Command, err error) {
-
-	// Regardless of what command execute is called on, run on Root only
-	if c.HasParent() {
-		return c.Root().ExecuteC()
-	}
-
-	// windows hook
-	if preExecHookFn != nil {
-		preExecHookFn(c)
-	}
-
-	// initialize help as the last point possible to allow for user
-	// overriding
-	c.initHelpCmd()
-
-	var args []string
-
-	// Workaround FAIL with "go test -v" or "cobra.test -test.v", see #155
-	if c.args == nil && filepath.Base(os.Args[0]) != "cobra.test" {
-		args = os.Args[1:]
-	} else {
-		args = c.args
-	}
-
-	cmd, flags, err := c.Find(args)
-	if err != nil {
-		// If found parse to a subcommand and then failed, talk about the subcommand
-		if cmd != nil {
-			c = cmd
-		}
-		if !c.SilenceErrors {
-			c.Println("Error:", err.Error())
-			c.Printf("Run '%v --help' for usage.\n", c.CommandPath())
-		}
-		return c, err
-	}
-	err = cmd.execute(flags)
-	if err != nil {
-		// Always show help if requested, even if SilenceErrors is in
-		// effect
-		if err == flag.ErrHelp {
-			cmd.HelpFunc()(cmd, args)
-			return cmd, nil
-		}
-
-		// If root command has SilentErrors flagged,
-		// all subcommands should respect it
-		if !cmd.SilenceErrors && !c.SilenceErrors {
-			c.Println("Error:", err.Error())
-		}
-
-		// If root command has SilentUsage flagged,
-		// all subcommands should respect it
-		if !cmd.SilenceUsage && !c.SilenceUsage {
-			c.Println(cmd.UsageString())
-		}
-		return cmd, err
-	}
-	return cmd, nil
-}
-
-func (c *Command) initHelpFlag() {
-	c.mergePersistentFlags()
-	if c.Flags().Lookup("help") == nil {
-		c.Flags().BoolP("help", "h", false, "help for "+c.Name())
-	}
-}
-
-func (c *Command) initHelpCmd() {
-	if c.helpCommand == nil {
-		if !c.HasSubCommands() {
-			return
-		}
-
-		c.helpCommand = &Command{
-			Use:   "help [command]",
-			Short: "Help about any command",
-			Long: `Help provides help for any command in the application.
-    Simply type ` + c.Name() + ` help [path to command] for full details.`,
-			PersistentPreRun:  func(cmd *Command, args []string) {},
-			PersistentPostRun: func(cmd *Command, args []string) {},
-
-			Run: func(c *Command, args []string) {
-				cmd, _, e := c.Root().Find(args)
-				if cmd == nil || e != nil {
-					c.Printf("Unknown help topic %#q.", args)
-					c.Root().Usage()
-				} else {
-					cmd.Help()
-				}
-			},
-		}
-	}
-	c.AddCommand(c.helpCommand)
-}
-
-// Used for testing.
-func (c *Command) ResetCommands() {
-	c.commands = nil
-	c.helpCommand = nil
-}
-
-// Sorts commands by their names.
-type commandSorterByName []*Command
-
-func (c commandSorterByName) Len() int           { return len(c) }
-func (c commandSorterByName) Swap(i, j int)      { c[i], c[j] = c[j], c[i] }
-func (c commandSorterByName) Less(i, j int) bool { return c[i].Name() < c[j].Name() }
-
-// Commands returns a sorted slice of child commands.
-func (c *Command) Commands() []*Command {
-	// do not sort commands if it already sorted or sorting was disabled
-	if EnableCommandSorting && !c.commandsAreSorted {
-		sort.Sort(commandSorterByName(c.commands))
-		c.commandsAreSorted = true
-	}
-	return c.commands
-}
-
-// AddCommand adds one or more commands to this parent command.
-func (c *Command) AddCommand(cmds ...*Command) {
-	for i, x := range cmds {
-		if cmds[i] == c {
-			panic("Command can't be a child of itself")
-		}
-		cmds[i].parent = c
-		// update max lengths
-		usageLen := len(x.Use)
-		if usageLen > c.commandsMaxUseLen {
-			c.commandsMaxUseLen = usageLen
-		}
-		commandPathLen := len(x.CommandPath())
-		if commandPathLen > c.commandsMaxCommandPathLen {
-			c.commandsMaxCommandPathLen = commandPathLen
-		}
-		nameLen := len(x.Name())
-		if nameLen > c.commandsMaxNameLen {
-			c.commandsMaxNameLen = nameLen
-		}
-		// If global normalization function exists, update all children
-		if c.globNormFunc != nil {
-			x.SetGlobalNormalizationFunc(c.globNormFunc)
-		}
-		c.commands = append(c.commands, x)
-		c.commandsAreSorted = false
-	}
-}
-
-// RemoveCommand removes one or more commands from a parent command.
-func (c *Command) RemoveCommand(cmds ...*Command) {
-	commands := []*Command{}
-main:
-	for _, command := range c.commands {
-		for _, cmd := range cmds {
-			if command == cmd {
-				command.parent = nil
-				continue main
-			}
-		}
-		commands = append(commands, command)
-	}
-	c.commands = commands
-	// recompute all lengths
-	c.commandsMaxUseLen = 0
-	c.commandsMaxCommandPathLen = 0
-	c.commandsMaxNameLen = 0
-	for _, command := range c.commands {
-		usageLen := len(command.Use)
-		if usageLen > c.commandsMaxUseLen {
-			c.commandsMaxUseLen = usageLen
-		}
-		commandPathLen := len(command.CommandPath())
-		if commandPathLen > c.commandsMaxCommandPathLen {
-			c.commandsMaxCommandPathLen = commandPathLen
-		}
-		nameLen := len(command.Name())
-		if nameLen > c.commandsMaxNameLen {
-			c.commandsMaxNameLen = nameLen
-		}
-	}
-}
-
-// Print is a convenience method to Print to the defined output, fallback to Stderr if not set.
-func (c *Command) Print(i ...interface{}) {
-	fmt.Fprint(c.OutOrStderr(), i...)
-}
-
-// Println is a convenience method to Println to the defined output, fallback to Stderr if not set.
-func (c *Command) Println(i ...interface{}) {
-	str := fmt.Sprintln(i...)
-	c.Print(str)
-}
-
-// Printf is a convenience method to Printf to the defined output, fallback to Stderr if not set.
-func (c *Command) Printf(format string, i ...interface{}) {
-	str := fmt.Sprintf(format, i...)
-	c.Print(str)
-}
-
-// CommandPath returns the full path to this command.
-func (c *Command) CommandPath() string {
-	str := c.Name()
-	x := c
-	for x.HasParent() {
-		str = x.parent.Name() + " " + str
-		x = x.parent
-	}
-	return str
-}
-
-// UseLine puts out the full usage for a given command (including parents).
-func (c *Command) UseLine() string {
-	str := ""
-	if c.HasParent() {
-		str = c.parent.CommandPath() + " "
-	}
-	return str + c.Use
-}
-
-// For use in determining which flags have been assigned to which commands
-// and which persist.
-func (c *Command) DebugFlags() {
-	c.Println("DebugFlags called on", c.Name())
-	var debugflags func(*Command)
-
-	debugflags = func(x *Command) {
-		if x.HasFlags() || x.HasPersistentFlags() {
-			c.Println(x.Name())
-		}
-		if x.HasFlags() {
-			x.flags.VisitAll(func(f *flag.Flag) {
-				if x.HasPersistentFlags() {
-					if x.persistentFlag(f.Name) == nil {
-						c.Println("  -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, "  [L]")
-					} else {
-						c.Println("  -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, "  [LP]")
-					}
-				} else {
-					c.Println("  -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, "  [L]")
-				}
-			})
-		}
-		if x.HasPersistentFlags() {
-			x.pflags.VisitAll(func(f *flag.Flag) {
-				if x.HasFlags() {
-					if x.flags.Lookup(f.Name) == nil {
-						c.Println("  -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, "  [P]")
-					}
-				} else {
-					c.Println("  -"+f.Shorthand+",", "--"+f.Name, "["+f.DefValue+"]", "", f.Value, "  [P]")
-				}
-			})
-		}
-		c.Println(x.flagErrorBuf)
-		if x.HasSubCommands() {
-			for _, y := range x.commands {
-				debugflags(y)
-			}
-		}
-	}
-
-	debugflags(c)
-}
-
-// Name returns the command's name: the first word in the use line.
-func (c *Command) Name() string {
-	if c.name != "" {
-		return c.name
-	}
-	name := c.Use
-	i := strings.Index(name, " ")
-	if i >= 0 {
-		name = name[:i]
-	}
-	return name
-}
-
-// HasAlias determines if a given string is an alias of the command.
-func (c *Command) HasAlias(s string) bool {
-	for _, a := range c.Aliases {
-		if a == s {
-			return true
-		}
-	}
-	return false
-}
-
-func (c *Command) NameAndAliases() string {
-	return strings.Join(append([]string{c.Name()}, c.Aliases...), ", ")
-}
-
-func (c *Command) HasExample() bool {
-	return len(c.Example) > 0
-}
-
-// Runnable determines if the command is itself runnable.
-func (c *Command) Runnable() bool {
-	return c.Run != nil || c.RunE != nil
-}
-
-// HasSubCommands determines if the command has children commands.
-func (c *Command) HasSubCommands() bool {
-	return len(c.commands) > 0
-}
-
-// IsAvailableCommand determines if a command is available as a non-help command
-// (this includes all non deprecated/hidden commands).
-func (c *Command) IsAvailableCommand() bool {
-	if len(c.Deprecated) != 0 || c.Hidden {
-		return false
-	}
-
-	if c.HasParent() && c.Parent().helpCommand == c {
-		return false
-	}
-
-	if c.Runnable() || c.HasAvailableSubCommands() {
-		return true
-	}
-
-	return false
-}
-
-// IsHelpCommand determines if a command is a 'help' command; a help command is
-// determined by the fact that it is NOT runnable/hidden/deprecated, and has no
-// sub commands that are runnable/hidden/deprecated.
-func (c *Command) IsHelpCommand() bool {
-
-	// if a command is runnable, deprecated, or hidden it is not a 'help' command
-	if c.Runnable() || len(c.Deprecated) != 0 || c.Hidden {
-		return false
-	}
-
-	// if any non-help sub commands are found, the command is not a 'help' command
-	for _, sub := range c.commands {
-		if !sub.IsHelpCommand() {
-			return false
-		}
-	}
-
-	// the command either has no sub commands, or no non-help sub commands
-	return true
-}
-
-// HasHelpSubCommands determines if a command has any available 'help' sub commands
-// that need to be shown in the usage/help default template under 'additional help
-// topics'.
-func (c *Command) HasHelpSubCommands() bool {
-
-	// return true on the first found available 'help' sub command
-	for _, sub := range c.commands {
-		if sub.IsHelpCommand() {
-			return true
-		}
-	}
-
-	// the command either has no sub commands, or no available 'help' sub commands
-	return false
-}
-
-// HasAvailableSubCommands determines if a command has available sub commands that
-// need to be shown in the usage/help default template under 'available commands'.
-func (c *Command) HasAvailableSubCommands() bool {
-
-	// return true on the first found available (non deprecated/help/hidden)
-	// sub command
-	for _, sub := range c.commands {
-		if sub.IsAvailableCommand() {
-			return true
-		}
-	}
-
-	// the command either has no sub comamnds, or no available (non deprecated/help/hidden)
-	// sub commands
-	return false
-}
-
-// HasParent determines if the command is a child command.
-func (c *Command) HasParent() bool {
-	return c.parent != nil
-}
-
-// GlobalNormalizationFunc returns the global normalization function or nil if doesn't exists.
-func (c *Command) GlobalNormalizationFunc() func(f *flag.FlagSet, name string) flag.NormalizedName {
-	return c.globNormFunc
-}
-
-// Flage returns the complete FlagSet that applies
-// to this command (local and persistent declared here and by all parents).
-func (c *Command) Flags() *flag.FlagSet {
-	if c.flags == nil {
-		c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
-		if c.flagErrorBuf == nil {
-			c.flagErrorBuf = new(bytes.Buffer)
-		}
-		c.flags.SetOutput(c.flagErrorBuf)
-	}
-	return c.flags
-}
-
-// LocalNonPersistentFlags are flags specific to this command which will NOT persist to subcommands.
-func (c *Command) LocalNonPersistentFlags() *flag.FlagSet {
-	persistentFlags := c.PersistentFlags()
-
-	out := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
-	c.LocalFlags().VisitAll(func(f *flag.Flag) {
-		if persistentFlags.Lookup(f.Name) == nil {
-			out.AddFlag(f)
-		}
-	})
-	return out
-}
-
-// LocalFlags returns the local FlagSet specifically set in the current command.
-func (c *Command) LocalFlags() *flag.FlagSet {
-	c.mergePersistentFlags()
-
-	local := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
-	c.lflags.VisitAll(func(f *flag.Flag) {
-		local.AddFlag(f)
-	})
-	if !c.HasParent() {
-		flag.CommandLine.VisitAll(func(f *flag.Flag) {
-			if local.Lookup(f.Name) == nil {
-				local.AddFlag(f)
-			}
-		})
-	}
-	return local
-}
-
-// InheritedFlags returns all flags which were inherited from parents commands.
-func (c *Command) InheritedFlags() *flag.FlagSet {
-	c.mergePersistentFlags()
-
-	inherited := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
-	local := c.LocalFlags()
-
-	var rmerge func(x *Command)
-
-	rmerge = func(x *Command) {
-		if x.HasPersistentFlags() {
-			x.PersistentFlags().VisitAll(func(f *flag.Flag) {
-				if inherited.Lookup(f.Name) == nil && local.Lookup(f.Name) == nil {
-					inherited.AddFlag(f)
-				}
-			})
-		}
-		if x.HasParent() {
-			rmerge(x.parent)
-		}
-	}
-
-	if c.HasParent() {
-		rmerge(c.parent)
-	}
-
-	return inherited
-}
-
-// NonInheritedFlags returns all flags which were not inherited from parent commands.
-func (c *Command) NonInheritedFlags() *flag.FlagSet {
-	return c.LocalFlags()
-}
-
-// PersistentFlags returns the persistent FlagSet specifically set in the current command.
-func (c *Command) PersistentFlags() *flag.FlagSet {
-	if c.pflags == nil {
-		c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
-		if c.flagErrorBuf == nil {
-			c.flagErrorBuf = new(bytes.Buffer)
-		}
-		c.pflags.SetOutput(c.flagErrorBuf)
-	}
-	return c.pflags
-}
-
-// ResetFlags is used in testing.
-func (c *Command) ResetFlags() {
-	c.flagErrorBuf = new(bytes.Buffer)
-	c.flagErrorBuf.Reset()
-	c.flags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
-	c.flags.SetOutput(c.flagErrorBuf)
-	c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
-	c.pflags.SetOutput(c.flagErrorBuf)
-}
-
-// Does the command contain any flags (local plus persistent from the entire structure).
-func (c *Command) HasFlags() bool {
-	return c.Flags().HasFlags()
-}
-
-// Does the command contain persistent flags.
-func (c *Command) HasPersistentFlags() bool {
-	return c.PersistentFlags().HasFlags()
-}
-
-// Does the command has flags specifically declared locally.
-func (c *Command) HasLocalFlags() bool {
-	return c.LocalFlags().HasFlags()
-}
-
-// Does the command have flags inherited from its parent command.
-func (c *Command) HasInheritedFlags() bool {
-	return c.InheritedFlags().HasFlags()
-}
-
-// Does the command contain any flags (local plus persistent from the entire
-// structure) which are not hidden or deprecated.
-func (c *Command) HasAvailableFlags() bool {
-	return c.Flags().HasAvailableFlags()
-}
-
-// Does the command contain persistent flags which are not hidden or deprecated.
-func (c *Command) HasAvailablePersistentFlags() bool {
-	return c.PersistentFlags().HasAvailableFlags()
-}
-
-// Does the command has flags specifically declared locally which are not hidden
-// or deprecated.
-func (c *Command) HasAvailableLocalFlags() bool {
-	return c.LocalFlags().HasAvailableFlags()
-}
-
-// Does the command have flags inherited from its parent command which are
-// not hidden or deprecated.
-func (c *Command) HasAvailableInheritedFlags() bool {
-	return c.InheritedFlags().HasAvailableFlags()
-}
-
-// Flag climbs up the command tree looking for matching flag.
-func (c *Command) Flag(name string) (flag *flag.Flag) {
-	flag = c.Flags().Lookup(name)
-
-	if flag == nil {
-		flag = c.persistentFlag(name)
-	}
-
-	return
-}
-
-// Recursively find matching persistent flag.
-func (c *Command) persistentFlag(name string) (flag *flag.Flag) {
-	if c.HasPersistentFlags() {
-		flag = c.PersistentFlags().Lookup(name)
-	}
-
-	if flag == nil && c.HasParent() {
-		flag = c.parent.persistentFlag(name)
-	}
-	return
-}
-
-// ParseFlags parses persistent flag tree and local flags.
-func (c *Command) ParseFlags(args []string) (err error) {
-	if c.DisableFlagParsing {
-		return nil
-	}
-	c.mergePersistentFlags()
-	err = c.Flags().Parse(args)
-	return
-}
-
-// Parent returns a commands parent command.
-func (c *Command) Parent() *Command {
-	return c.parent
-}
-
-func (c *Command) mergePersistentFlags() {
-	var rmerge func(x *Command)
-
-	// Save the set of local flags
-	if c.lflags == nil {
-		c.lflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
-		if c.flagErrorBuf == nil {
-			c.flagErrorBuf = new(bytes.Buffer)
-		}
-		c.lflags.SetOutput(c.flagErrorBuf)
-		addtolocal := func(f *flag.Flag) {
-			c.lflags.AddFlag(f)
-		}
-		c.Flags().VisitAll(addtolocal)
-		c.PersistentFlags().VisitAll(addtolocal)
-	}
-	rmerge = func(x *Command) {
-		if !x.HasParent() {
-			flag.CommandLine.VisitAll(func(f *flag.Flag) {
-				if x.PersistentFlags().Lookup(f.Name) == nil {
-					x.PersistentFlags().AddFlag(f)
-				}
-			})
-		}
-		if x.HasPersistentFlags() {
-			x.PersistentFlags().VisitAll(func(f *flag.Flag) {
-				if c.Flags().Lookup(f.Name) == nil {
-					c.Flags().AddFlag(f)
-				}
-			})
-		}
-		if x.HasParent() {
-			rmerge(x.parent)
-		}
-	}
-
-	rmerge(c)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/command_notwin.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/command_notwin.go b/newt/vendor/github.com/spf13/cobra/command_notwin.go
deleted file mode 100644
index 6159c1c..0000000
--- a/newt/vendor/github.com/spf13/cobra/command_notwin.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// +build !windows
-
-package cobra
-
-var preExecHookFn func(*Command)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/command_win.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/command_win.go b/newt/vendor/github.com/spf13/cobra/command_win.go
deleted file mode 100644
index 4b0eaa1..0000000
--- a/newt/vendor/github.com/spf13/cobra/command_win.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// +build windows
-
-package cobra
-
-import (
-	"os"
-	"time"
-
-	"github.com/inconshreveable/mousetrap"
-)
-
-var preExecHookFn = preExecHook
-
-// enables an information splash screen on Windows if the CLI is started from explorer.exe.
-var MousetrapHelpText string = `This is a command line tool
-
-You need to open cmd.exe and run it from there.
-`
-
-func preExecHook(c *Command) {
-	if mousetrap.StartedByExplorer() {
-		c.Print(MousetrapHelpText)
-		time.Sleep(5 * time.Second)
-		os.Exit(1)
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/jwalterweatherman/.gitignore
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/jwalterweatherman/.gitignore b/newt/vendor/github.com/spf13/jwalterweatherman/.gitignore
deleted file mode 100644
index 0026861..0000000
--- a/newt/vendor/github.com/spf13/jwalterweatherman/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/jwalterweatherman/LICENSE
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/jwalterweatherman/LICENSE b/newt/vendor/github.com/spf13/jwalterweatherman/LICENSE
deleted file mode 100644
index 4527efb..0000000
--- a/newt/vendor/github.com/spf13/jwalterweatherman/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Steve Francia
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/jwalterweatherman/README.md
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/jwalterweatherman/README.md b/newt/vendor/github.com/spf13/jwalterweatherman/README.md
deleted file mode 100644
index c6f327c..0000000
--- a/newt/vendor/github.com/spf13/jwalterweatherman/README.md
+++ /dev/null
@@ -1,161 +0,0 @@
-jWalterWeatherman
-=================
-
-Seamless printing to the terminal (stdout) and logging to a io.Writer
-(file) that\u2019s as easy to use as fmt.Println.
-
-![and_that__s_why_you_always_leave_a_note_by_jonnyetc-d57q7um](https://cloud.githubusercontent.com/assets/173412/11002937/ccd01654-847d-11e5-828e-12ebaf582eaf.jpg)
-Graphic by [JonnyEtc](http://jonnyetc.deviantart.com/art/And-That-s-Why-You-Always-Leave-a-Note-315311422)
-
-JWW is primarily a wrapper around the excellent standard log library. It
-provides a few advantages over using the standard log library alone.
-
-1. Ready to go out of the box. 
-2. One library for both printing to the terminal and logging (to files).
-3. Really easy to log to either a temp file or a file you specify.
-
-
-I really wanted a very straightforward library that could seamlessly do
-the following things.
-
-1. Replace all the println, printf, etc statements thought my code with
-   something more useful
-2. Allow the user to easily control what levels are printed to stdout
-3. Allow the user to easily control what levels are logged
-4. Provide an easy mechanism (like fmt.Println) to print info to the user
-   which can be easily logged as well 
-5. Due to 2 & 3 provide easy verbose mode for output and logs
-6. Not have any unnecessary initialization cruft. Just use it.
-
-# Usage
-
-## Step 1. Use it
-Put calls throughout your source based on type of feedback.
-No initialization or setup needs to happen. Just start calling things.
-
-Available Loggers are:
-
- * TRACE
- * DEBUG
- * INFO
- * WARN
- * ERROR
- * CRITICAL
- * FATAL
-
-These each are loggers based on the log standard library and follow the
-standard usage. Eg..
-
-```go
-    import (
-        jww "github.com/spf13/jwalterweatherman"
-    )
-
-    ...
-
-    if err != nil {
-
-        // This is a pretty serious error and the user should know about
-        // it. It will be printed to the terminal as well as logged under the
-        // default thresholds.
-
-        jww.ERROR.Println(err)
-    }
-
-    if err2 != nil {
-        // This error isn\u2019t going to materially change the behavior of the
-        // application, but it\u2019s something that may not be what the user
-        // expects. Under the default thresholds, Warn will be logged, but
-        // not printed to the terminal. 
-
-        jww.WARN.Println(err2)
-    }
-
-    // Information that\u2019s relevant to what\u2019s happening, but not very
-    // important for the user. Under the default thresholds this will be
-    // discarded.
-
-    jww.INFO.Printf("information %q", response)
-
-```
-
-_Why 7 levels?_
-
-Maybe you think that 7 levels are too much for any application... and you
-are probably correct. Just because there are seven levels doesn\u2019t mean
-that you should be using all 7 levels. Pick the right set for your needs.
-Remember they only have to mean something to your project.
-
-## Step 2. Optionally configure JWW
-
-Under the default thresholds :
-
- * Debug, Trace & Info goto /dev/null
- * Warn and above is logged (when a log file/io.Writer is provided)
- * Error and above is printed to the terminal (stdout)
-
-### Changing the thresholds
-
-The threshold can be changed at any time, but will only affect calls that
-execute after the change was made.
-
-This is very useful if your application has a verbose mode. Of course you
-can decide what verbose means to you or even have multiple levels of
-verbosity.
-
-
-```go
-    import (
-        jww "github.com/spf13/jwalterweatherman"
-    )
-
-    if Verbose {
-        jww.SetLogThreshold(jww.LevelTrace)
-        jww.SetStdoutThreshold(jww.LevelInfo)
-    }
-```
-
-Note that JWW's own internal output uses log levels as well, so set the log
-level before making any other calls if you want to see what it's up to.
-
-### Using a temp log file
-
-JWW conveniently creates a temporary file and sets the log Handle to
-a io.Writer created for it. You should call this early in your application
-initialization routine as it will only log calls made after it is executed. 
-When this option is used, the library will fmt.Println where to find the
-log file.
-
-```go
-    import (
-        jww "github.com/spf13/jwalterweatherman"
-    )
-
-    jww.UseTempLogFile("YourAppName") 
-
-```
-
-### Setting a log file
-
-JWW can log to any file you provide a path to (provided it\u2019s writable).
-Will only append to this file.
-
-
-```go
-    import (
-        jww "github.com/spf13/jwalterweatherman"
-    )
-
-    jww.SetLogFile("/path/to/logfile") 
-
-```
-
-
-# More information
-
-This is an early release. I\u2019ve been using it for a while and this is the
-third interface I\u2019ve tried. I like this one pretty well, but no guarantees
-that it won\u2019t change a bit.
-
-I wrote this for use in [hugo](http://hugo.spf13.com). If you are looking
-for a static website engine that\u2019s super fast please checkout Hugo.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go b/newt/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go
deleted file mode 100644
index b64ed46..0000000
--- a/newt/vendor/github.com/spf13/jwalterweatherman/thatswhyyoualwaysleaveanote.go
+++ /dev/null
@@ -1,256 +0,0 @@
-// Copyright � 2016 Steve Francia <sp...@spf13.com>.
-//
-// Use of this source code is governed by an MIT-style
-// license that can be found in the LICENSE file.
-
-package jwalterweatherman
-
-import (
-	"fmt"
-	"io"
-	"io/ioutil"
-	"log"
-	"os"
-	"sync/atomic"
-)
-
-// Level describes the chosen log level between
-// debug and critical.
-type Level int
-
-type NotePad struct {
-	Handle  io.Writer
-	Level   Level
-	Prefix  string
-	Logger  **log.Logger
-	counter uint64
-}
-
-func (n *NotePad) incr() {
-	atomic.AddUint64(&n.counter, 1)
-}
-
-func (n *NotePad) resetCounter() {
-	atomic.StoreUint64(&n.counter, 0)
-}
-
-func (n *NotePad) getCount() uint64 {
-	return atomic.LoadUint64(&n.counter)
-}
-
-type countingWriter struct {
-	incrFunc func()
-}
-
-func (cw *countingWriter) Write(p []byte) (n int, err error) {
-	cw.incrFunc()
-
-	return 0, nil
-}
-
-// Feedback is special. It writes plainly to the output while
-// logging with the standard extra information (date, file, etc)
-// Only Println and Printf are currently provided for this
-type Feedback struct{}
-
-const (
-	LevelTrace Level = iota
-	LevelDebug
-	LevelInfo
-	LevelWarn
-	LevelError
-	LevelCritical
-	LevelFatal
-	DefaultLogThreshold    = LevelWarn
-	DefaultStdoutThreshold = LevelError
-)
-
-var (
-	TRACE      *log.Logger
-	DEBUG      *log.Logger
-	INFO       *log.Logger
-	WARN       *log.Logger
-	ERROR      *log.Logger
-	CRITICAL   *log.Logger
-	FATAL      *log.Logger
-	LOG        *log.Logger
-	FEEDBACK   Feedback
-	LogHandle  io.Writer  = ioutil.Discard
-	OutHandle  io.Writer  = os.Stdout
-	BothHandle io.Writer  = io.MultiWriter(LogHandle, OutHandle)
-	NotePads   []*NotePad = []*NotePad{trace, debug, info, warn, err, critical, fatal}
-
-	trace           *NotePad = &NotePad{Level: LevelTrace, Handle: os.Stdout, Logger: &TRACE, Prefix: "TRACE: "}
-	debug           *NotePad = &NotePad{Level: LevelDebug, Handle: os.Stdout, Logger: &DEBUG, Prefix: "DEBUG: "}
-	info            *NotePad = &NotePad{Level: LevelInfo, Handle: os.Stdout, Logger: &INFO, Prefix: "INFO: "}
-	warn            *NotePad = &NotePad{Level: LevelWarn, Handle: os.Stdout, Logger: &WARN, Prefix: "WARN: "}
-	err             *NotePad = &NotePad{Level: LevelError, Handle: os.Stdout, Logger: &ERROR, Prefix: "ERROR: "}
-	critical        *NotePad = &NotePad{Level: LevelCritical, Handle: os.Stdout, Logger: &CRITICAL, Prefix: "CRITICAL: "}
-	fatal           *NotePad = &NotePad{Level: LevelFatal, Handle: os.Stdout, Logger: &FATAL, Prefix: "FATAL: "}
-	logThreshold    Level    = DefaultLogThreshold
-	outputThreshold Level    = DefaultStdoutThreshold
-)
-
-const (
-	DATE  = log.Ldate
-	TIME  = log.Ltime
-	SFILE = log.Lshortfile
-	LFILE = log.Llongfile
-	MSEC  = log.Lmicroseconds
-)
-
-var logFlags = DATE | TIME | SFILE
-
-func init() {
-	SetStdoutThreshold(DefaultStdoutThreshold)
-}
-
-// initialize will setup the jWalterWeatherman standard approach of providing the user
-// some feedback and logging a potentially different amount based on independent log and output thresholds.
-// By default the output has a lower threshold than logged
-// Don't use if you have manually set the Handles of the different levels as it will overwrite them.
-func initialize() {
-	BothHandle = io.MultiWriter(LogHandle, OutHandle)
-
-	for _, n := range NotePads {
-		if n.Level < outputThreshold && n.Level < logThreshold {
-			n.Handle = ioutil.Discard
-		} else if n.Level >= outputThreshold && n.Level >= logThreshold {
-			n.Handle = BothHandle
-		} else if n.Level >= outputThreshold && n.Level < logThreshold {
-			n.Handle = OutHandle
-		} else {
-			n.Handle = LogHandle
-		}
-	}
-
-	for _, n := range NotePads {
-		n.Handle = io.MultiWriter(n.Handle, &countingWriter{n.incr})
-		*n.Logger = log.New(n.Handle, n.Prefix, logFlags)
-	}
-
-	LOG = log.New(LogHandle,
-		"LOG:   ",
-		logFlags)
-}
-
-// Set the log Flags (Available flag: DATE, TIME, SFILE, LFILE and MSEC)
-func SetLogFlag(flags int) {
-	logFlags = flags
-	initialize()
-}
-
-// Level returns the current global log threshold.
-func LogThreshold() Level {
-	return logThreshold
-}
-
-// Level returns the current global output threshold.
-func StdoutThreshold() Level {
-	return outputThreshold
-}
-
-// Ensures that the level provided is within the bounds of available levels
-func levelCheck(level Level) Level {
-	switch {
-	case level <= LevelTrace:
-		return LevelTrace
-	case level >= LevelFatal:
-		return LevelFatal
-	default:
-		return level
-	}
-}
-
-// Establishes a threshold where anything matching or above will be logged
-func SetLogThreshold(level Level) {
-	logThreshold = levelCheck(level)
-	initialize()
-}
-
-// Establishes a threshold where anything matching or above will be output
-func SetStdoutThreshold(level Level) {
-	outputThreshold = levelCheck(level)
-	initialize()
-}
-
-// Conveniently Sets the Log Handle to a io.writer created for the file behind the given filepath
-// Will only append to this file
-func SetLogFile(path string) {
-	file, err := os.OpenFile(path, os.O_RDWR|os.O_APPEND|os.O_CREATE, 0666)
-	if err != nil {
-		CRITICAL.Println("Failed to open log file:", path, err)
-		os.Exit(-1)
-	}
-
-	INFO.Println("Logging to", file.Name())
-
-	LogHandle = file
-	initialize()
-}
-
-// Conveniently Creates a temporary file and sets the Log Handle to a io.writer created for it
-func UseTempLogFile(prefix string) {
-	file, err := ioutil.TempFile(os.TempDir(), prefix)
-	if err != nil {
-		CRITICAL.Println(err)
-	}
-
-	INFO.Println("Logging to", file.Name())
-
-	LogHandle = file
-	initialize()
-}
-
-// LogCountForLevel returns the number of log invocations for a given level.
-func LogCountForLevel(l Level) uint64 {
-	for _, np := range NotePads {
-		if np.Level == l {
-			return np.getCount()
-		}
-	}
-	return 0
-}
-
-// LogCountForLevelsGreaterThanorEqualTo returns the number of log invocations
-// greater than or equal to a given level threshold.
-func LogCountForLevelsGreaterThanorEqualTo(threshold Level) uint64 {
-	var cnt uint64
-	for _, np := range NotePads {
-		if np.Level >= threshold {
-			cnt += np.getCount()
-		}
-	}
-	return cnt
-}
-
-// ResetLogCounters resets the invocation counters for all levels.
-func ResetLogCounters() {
-	for _, np := range NotePads {
-		np.resetCounter()
-	}
-}
-
-// Disables logging for the entire JWW system
-func DiscardLogging() {
-	LogHandle = ioutil.Discard
-	initialize()
-}
-
-// Feedback is special. It writes plainly to the output while
-// logging with the standard extra information (date, file, etc)
-// Only Println and Printf are currently provided for this
-func (fb *Feedback) Println(v ...interface{}) {
-	s := fmt.Sprintln(v...)
-	fmt.Print(s)
-	LOG.Output(2, s)
-}
-
-// Feedback is special. It writes plainly to the output while
-// logging with the standard extra information (date, file, etc)
-// Only Println and Printf are currently provided for this
-func (fb *Feedback) Printf(format string, v ...interface{}) {
-	s := fmt.Sprintf(format, v...)
-	fmt.Print(s)
-	LOG.Output(2, s)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/.travis.yml
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/.travis.yml b/newt/vendor/github.com/spf13/pflag/.travis.yml
deleted file mode 100644
index 707bdc3..0000000
--- a/newt/vendor/github.com/spf13/pflag/.travis.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-sudo: false
-
-language: go
-
-go:
-        - 1.6.3
-        - 1.7.3
-        - tip
-
-matrix:
-        allow_failures:
-                  - go: tip
-install:
-        - go get github.com/golang/lint/golint
-        - export PATH=$GOPATH/bin:$PATH
-        - go install ./...
-
-script:
-        - verify/all.sh -v
-        - go test ./...

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/LICENSE
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/LICENSE b/newt/vendor/github.com/spf13/pflag/LICENSE
deleted file mode 100644
index 63ed1cf..0000000
--- a/newt/vendor/github.com/spf13/pflag/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2012 Alex Ogier. All rights reserved.
-Copyright (c) 2012 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-   * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/README.md
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/README.md b/newt/vendor/github.com/spf13/pflag/README.md
deleted file mode 100644
index 08ad945..0000000
--- a/newt/vendor/github.com/spf13/pflag/README.md
+++ /dev/null
@@ -1,275 +0,0 @@
-[![Build Status](https://travis-ci.org/spf13/pflag.svg?branch=master)](https://travis-ci.org/spf13/pflag)
-
-## Description
-
-pflag is a drop-in replacement for Go's flag package, implementing
-POSIX/GNU-style --flags.
-
-pflag is compatible with the [GNU extensions to the POSIX recommendations
-for command-line options][1]. For a more precise description, see the
-"Command-line flag syntax" section below.
-
-[1]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
-
-pflag is available under the same style of BSD license as the Go language,
-which can be found in the LICENSE file.
-
-## Installation
-
-pflag is available using the standard `go get` command.
-
-Install by running:
-
-    go get github.com/spf13/pflag
-
-Run tests by running:
-
-    go test github.com/spf13/pflag
-
-## Usage
-
-pflag is a drop-in replacement of Go's native flag package. If you import
-pflag under the name "flag" then all code should continue to function
-with no changes.
-
-``` go
-import flag "github.com/spf13/pflag"
-```
-
-There is one exception to this: if you directly instantiate the Flag struct
-there is one more field "Shorthand" that you will need to set.
-Most code never instantiates this struct directly, and instead uses
-functions such as String(), BoolVar(), and Var(), and is therefore
-unaffected.
-
-Define flags using flag.String(), Bool(), Int(), etc.
-
-This declares an integer flag, -flagname, stored in the pointer ip, with type *int.
-
-``` go
-var ip *int = flag.Int("flagname", 1234, "help message for flagname")
-```
-
-If you like, you can bind the flag to a variable using the Var() functions.
-
-``` go
-var flagvar int
-func init() {
-    flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname")
-}
-```
-
-Or you can create custom flags that satisfy the Value interface (with
-pointer receivers) and couple them to flag parsing by
-
-``` go
-flag.Var(&flagVal, "name", "help message for flagname")
-```
-
-For such flags, the default value is just the initial value of the variable.
-
-After all flags are defined, call
-
-``` go
-flag.Parse()
-```
-
-to parse the command line into the defined flags.
-
-Flags may then be used directly. If you're using the flags themselves,
-they are all pointers; if you bind to variables, they're values.
-
-``` go
-fmt.Println("ip has value ", *ip)
-fmt.Println("flagvar has value ", flagvar)
-```
-
-There are helpers function to get values later if you have the FlagSet but
-it was difficult to keep up with all of the flag pointers in your code.
-If you have a pflag.FlagSet with a flag called 'flagname' of type int you
-can use GetInt() to get the int value. But notice that 'flagname' must exist
-and it must be an int. GetString("flagname") will fail.
-
-``` go
-i, err := flagset.GetInt("flagname")
-```
-
-After parsing, the arguments after the flag are available as the
-slice flag.Args() or individually as flag.Arg(i).
-The arguments are indexed from 0 through flag.NArg()-1.
-
-The pflag package also defines some new functions that are not in flag,
-that give one-letter shorthands for flags. You can use these by appending
-'P' to the name of any function that defines a flag.
-
-``` go
-var ip = flag.IntP("flagname", "f", 1234, "help message")
-var flagvar bool
-func init() {
-    flag.BoolVarP("boolname", "b", true, "help message")
-}
-flag.VarP(&flagVar, "varname", "v", 1234, "help message")
-```
-
-Shorthand letters can be used with single dashes on the command line.
-Boolean shorthand flags can be combined with other shorthand flags.
-
-The default set of command-line flags is controlled by
-top-level functions.  The FlagSet type allows one to define
-independent sets of flags, such as to implement subcommands
-in a command-line interface. The methods of FlagSet are
-analogous to the top-level functions for the command-line
-flag set.
-
-## Setting no option default values for flags
-
-After you create a flag it is possible to set the pflag.NoOptDefVal for
-the given flag. Doing this changes the meaning of the flag slightly. If
-a flag has a NoOptDefVal and the flag is set on the command line without
-an option the flag will be set to the NoOptDefVal. For example given:
-
-``` go
-var ip = flag.IntP("flagname", "f", 1234, "help message")
-flag.Lookup("flagname").NoOptDefVal = "4321"
-```
-
-Would result in something like
-
-| Parsed Arguments | Resulting Value |
-| -------------    | -------------   |
-| --flagname=1357  | ip=1357         |
-| --flagname       | ip=4321         |
-| [nothing]        | ip=1234         |
-
-## Command line flag syntax
-
-```
---flag    // boolean flags, or flags with no option default values
---flag x  // only on flags without a default value
---flag=x
-```
-
-Unlike the flag package, a single dash before an option means something
-different than a double dash. Single dashes signify a series of shorthand
-letters for flags. All but the last shorthand letter must be boolean flags
-or a flag with a default value
-
-```
-// boolean or flags where the 'no option default value' is set
--f
--f=true
--abc
-but
--b true is INVALID
-
-// non-boolean and flags without a 'no option default value'
--n 1234
--n=1234
--n1234
-
-// mixed
--abcs "hello"
--absd="hello"
--abcs1234
-```
-
-Flag parsing stops after the terminator "--". Unlike the flag package,
-flags can be interspersed with arguments anywhere on the command line
-before this terminator.
-
-Integer flags accept 1234, 0664, 0x1234 and may be negative.
-Boolean flags (in their long form) accept 1, 0, t, f, true, false,
-TRUE, FALSE, True, False.
-Duration flags accept any input valid for time.ParseDuration.
-
-## Mutating or "Normalizing" Flag names
-
-It is possible to set a custom flag name 'normalization function.' It allows flag names to be mutated both when created in the code and when used on the command line to some 'normalized' form. The 'normalized' form is used for comparison. Two examples of using the custom normalization func follow.
-
-**Example #1**: You want -, _, and . in flags to compare the same. aka --my-flag == --my_flag == --my.flag
-
-``` go
-func wordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName {
-	from := []string{"-", "_"}
-	to := "."
-	for _, sep := range from {
-		name = strings.Replace(name, sep, to, -1)
-	}
-	return pflag.NormalizedName(name)
-}
-
-myFlagSet.SetNormalizeFunc(wordSepNormalizeFunc)
-```
-
-**Example #2**: You want to alias two flags. aka --old-flag-name == --new-flag-name
-
-``` go
-func aliasNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName {
-	switch name {
-	case "old-flag-name":
-		name = "new-flag-name"
-		break
-	}
-	return pflag.NormalizedName(name)
-}
-
-myFlagSet.SetNormalizeFunc(aliasNormalizeFunc)
-```
-
-## Deprecating a flag or its shorthand
-It is possible to deprecate a flag, or just its shorthand. Deprecating a flag/shorthand hides it from help text and prints a usage message when the deprecated flag/shorthand is used.
-
-**Example #1**: You want to deprecate a flag named "badflag" as well as inform the users what flag they should use instead.
-```go
-// deprecate a flag by specifying its name and a usage message
-flags.MarkDeprecated("badflag", "please use --good-flag instead")
-```
-This hides "badflag" from help text, and prints `Flag --badflag has been deprecated, please use --good-flag instead` when "badflag" is used.
-
-**Example #2**: You want to keep a flag name "noshorthandflag" but deprecate its shortname "n".
-```go
-// deprecate a flag shorthand by specifying its flag name and a usage message
-flags.MarkShorthandDeprecated("noshorthandflag", "please use --noshorthandflag only")
-```
-This hides the shortname "n" from help text, and prints `Flag shorthand -n has been deprecated, please use --noshorthandflag only` when the shorthand "n" is used.
-
-Note that usage message is essential here, and it should not be empty.
-
-## Hidden flags
-It is possible to mark a flag as hidden, meaning it will still function as normal, however will not show up in usage/help text.
-
-**Example**: You have a flag named "secretFlag" that you need for internal use only and don't want it showing up in help text, or for its usage text to be available.
-```go
-// hide a flag by specifying its name
-flags.MarkHidden("secretFlag")
-```
-
-## Supporting Go flags when using pflag
-In order to support flags defined using Go's `flag` package, they must be added to the `pflag` flagset. This is usually necessary
-to support flags defined by third-party dependencies (e.g. `golang/glog`).
-
-**Example**: You want to add the Go flags to the `CommandLine` flagset
-```go
-import (
-	goflag "flag"
-	flag "github.com/spf13/pflag"
-)
-
-var ip *int = flag.Int("flagname", 1234, "help message for flagname")
-
-func main() {
-	flag.CommandLine.AddGoFlagSet(goflag.CommandLine)
-	flag.Parse()
-}
-```
-
-## More info
-
-You can see the full reference documentation of the pflag package
-[at godoc.org][3], or through go's standard documentation system by
-running `godoc -http=:6060` and browsing to
-[http://localhost:6060/pkg/github.com/ogier/pflag][2] after
-installation.
-
-[2]: http://localhost:6060/pkg/github.com/ogier/pflag
-[3]: http://godoc.org/github.com/ogier/pflag

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/bool.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/bool.go b/newt/vendor/github.com/spf13/pflag/bool.go
deleted file mode 100644
index c4c5c0b..0000000
--- a/newt/vendor/github.com/spf13/pflag/bool.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package pflag
-
-import "strconv"
-
-// optional interface to indicate boolean flags that can be
-// supplied without "=value" text
-type boolFlag interface {
-	Value
-	IsBoolFlag() bool
-}
-
-// -- bool Value
-type boolValue bool
-
-func newBoolValue(val bool, p *bool) *boolValue {
-	*p = val
-	return (*boolValue)(p)
-}
-
-func (b *boolValue) Set(s string) error {
-	v, err := strconv.ParseBool(s)
-	*b = boolValue(v)
-	return err
-}
-
-func (b *boolValue) Type() string {
-	return "bool"
-}
-
-func (b *boolValue) String() string { return strconv.FormatBool(bool(*b)) }
-
-func (b *boolValue) IsBoolFlag() bool { return true }
-
-func boolConv(sval string) (interface{}, error) {
-	return strconv.ParseBool(sval)
-}
-
-// GetBool return the bool value of a flag with the given name
-func (f *FlagSet) GetBool(name string) (bool, error) {
-	val, err := f.getFlagType(name, "bool", boolConv)
-	if err != nil {
-		return false, err
-	}
-	return val.(bool), nil
-}
-
-// BoolVar defines a bool flag with specified name, default value, and usage string.
-// The argument p points to a bool variable in which to store the value of the flag.
-func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string) {
-	f.BoolVarP(p, name, "", value, usage)
-}
-
-// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) {
-	flag := f.VarPF(newBoolValue(value, p), name, shorthand, usage)
-	flag.NoOptDefVal = "true"
-}
-
-// BoolVar defines a bool flag with specified name, default value, and usage string.
-// The argument p points to a bool variable in which to store the value of the flag.
-func BoolVar(p *bool, name string, value bool, usage string) {
-	BoolVarP(p, name, "", value, usage)
-}
-
-// BoolVarP is like BoolVar, but accepts a shorthand letter that can be used after a single dash.
-func BoolVarP(p *bool, name, shorthand string, value bool, usage string) {
-	flag := CommandLine.VarPF(newBoolValue(value, p), name, shorthand, usage)
-	flag.NoOptDefVal = "true"
-}
-
-// Bool defines a bool flag with specified name, default value, and usage string.
-// The return value is the address of a bool variable that stores the value of the flag.
-func (f *FlagSet) Bool(name string, value bool, usage string) *bool {
-	return f.BoolP(name, "", value, usage)
-}
-
-// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool {
-	p := new(bool)
-	f.BoolVarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Bool defines a bool flag with specified name, default value, and usage string.
-// The return value is the address of a bool variable that stores the value of the flag.
-func Bool(name string, value bool, usage string) *bool {
-	return BoolP(name, "", value, usage)
-}
-
-// BoolP is like Bool, but accepts a shorthand letter that can be used after a single dash.
-func BoolP(name, shorthand string, value bool, usage string) *bool {
-	b := CommandLine.BoolP(name, shorthand, value, usage)
-	return b
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/count.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/count.go b/newt/vendor/github.com/spf13/pflag/count.go
deleted file mode 100644
index d22be41..0000000
--- a/newt/vendor/github.com/spf13/pflag/count.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package pflag
-
-import "strconv"
-
-// -- count Value
-type countValue int
-
-func newCountValue(val int, p *int) *countValue {
-	*p = val
-	return (*countValue)(p)
-}
-
-func (i *countValue) Set(s string) error {
-	v, err := strconv.ParseInt(s, 0, 64)
-	// -1 means that no specific value was passed, so increment
-	if v == -1 {
-		*i = countValue(*i + 1)
-	} else {
-		*i = countValue(v)
-	}
-	return err
-}
-
-func (i *countValue) Type() string {
-	return "count"
-}
-
-func (i *countValue) String() string { return strconv.Itoa(int(*i)) }
-
-func countConv(sval string) (interface{}, error) {
-	i, err := strconv.Atoi(sval)
-	if err != nil {
-		return nil, err
-	}
-	return i, nil
-}
-
-// GetCount return the int value of a flag with the given name
-func (f *FlagSet) GetCount(name string) (int, error) {
-	val, err := f.getFlagType(name, "count", countConv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(int), nil
-}
-
-// CountVar defines a count flag with specified name, default value, and usage string.
-// The argument p points to an int variable in which to store the value of the flag.
-// A count flag will add 1 to its value evey time it is found on the command line
-func (f *FlagSet) CountVar(p *int, name string, usage string) {
-	f.CountVarP(p, name, "", usage)
-}
-
-// CountVarP is like CountVar only take a shorthand for the flag name.
-func (f *FlagSet) CountVarP(p *int, name, shorthand string, usage string) {
-	flag := f.VarPF(newCountValue(0, p), name, shorthand, usage)
-	flag.NoOptDefVal = "-1"
-}
-
-// CountVar like CountVar only the flag is placed on the CommandLine instead of a given flag set
-func CountVar(p *int, name string, usage string) {
-	CommandLine.CountVar(p, name, usage)
-}
-
-// CountVarP is like CountVar only take a shorthand for the flag name.
-func CountVarP(p *int, name, shorthand string, usage string) {
-	CommandLine.CountVarP(p, name, shorthand, usage)
-}
-
-// Count defines a count flag with specified name, default value, and usage string.
-// The return value is the address of an int variable that stores the value of the flag.
-// A count flag will add 1 to its value evey time it is found on the command line
-func (f *FlagSet) Count(name string, usage string) *int {
-	p := new(int)
-	f.CountVarP(p, name, "", usage)
-	return p
-}
-
-// CountP is like Count only takes a shorthand for the flag name.
-func (f *FlagSet) CountP(name, shorthand string, usage string) *int {
-	p := new(int)
-	f.CountVarP(p, name, shorthand, usage)
-	return p
-}
-
-// Count like Count only the flag is placed on the CommandLine isntead of a given flag set
-func Count(name string, usage string) *int {
-	return CommandLine.CountP(name, "", usage)
-}
-
-// CountP is like Count only takes a shorthand for the flag name.
-func CountP(name, shorthand string, usage string) *int {
-	return CommandLine.CountP(name, shorthand, usage)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/pflag/duration.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/pflag/duration.go b/newt/vendor/github.com/spf13/pflag/duration.go
deleted file mode 100644
index e9debef..0000000
--- a/newt/vendor/github.com/spf13/pflag/duration.go
+++ /dev/null
@@ -1,86 +0,0 @@
-package pflag
-
-import (
-	"time"
-)
-
-// -- time.Duration Value
-type durationValue time.Duration
-
-func newDurationValue(val time.Duration, p *time.Duration) *durationValue {
-	*p = val
-	return (*durationValue)(p)
-}
-
-func (d *durationValue) Set(s string) error {
-	v, err := time.ParseDuration(s)
-	*d = durationValue(v)
-	return err
-}
-
-func (d *durationValue) Type() string {
-	return "duration"
-}
-
-func (d *durationValue) String() string { return (*time.Duration)(d).String() }
-
-func durationConv(sval string) (interface{}, error) {
-	return time.ParseDuration(sval)
-}
-
-// GetDuration return the duration value of a flag with the given name
-func (f *FlagSet) GetDuration(name string) (time.Duration, error) {
-	val, err := f.getFlagType(name, "duration", durationConv)
-	if err != nil {
-		return 0, err
-	}
-	return val.(time.Duration), nil
-}
-
-// DurationVar defines a time.Duration flag with specified name, default value, and usage string.
-// The argument p points to a time.Duration variable in which to store the value of the flag.
-func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) {
-	f.VarP(newDurationValue(value, p), name, "", usage)
-}
-
-// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) {
-	f.VarP(newDurationValue(value, p), name, shorthand, usage)
-}
-
-// DurationVar defines a time.Duration flag with specified name, default value, and usage string.
-// The argument p points to a time.Duration variable in which to store the value of the flag.
-func DurationVar(p *time.Duration, name string, value time.Duration, usage string) {
-	CommandLine.VarP(newDurationValue(value, p), name, "", usage)
-}
-
-// DurationVarP is like DurationVar, but accepts a shorthand letter that can be used after a single dash.
-func DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) {
-	CommandLine.VarP(newDurationValue(value, p), name, shorthand, usage)
-}
-
-// Duration defines a time.Duration flag with specified name, default value, and usage string.
-// The return value is the address of a time.Duration variable that stores the value of the flag.
-func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration {
-	p := new(time.Duration)
-	f.DurationVarP(p, name, "", value, usage)
-	return p
-}
-
-// DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash.
-func (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration {
-	p := new(time.Duration)
-	f.DurationVarP(p, name, shorthand, value, usage)
-	return p
-}
-
-// Duration defines a time.Duration flag with specified name, default value, and usage string.
-// The return value is the address of a time.Duration variable that stores the value of the flag.
-func Duration(name string, value time.Duration, usage string) *time.Duration {
-	return CommandLine.DurationP(name, "", value, usage)
-}
-
-// DurationP is like Duration, but accepts a shorthand letter that can be used after a single dash.
-func DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration {
-	return CommandLine.DurationP(name, shorthand, value, usage)
-}


[58/67] [abbrv] incubator-mynewt-newtmgr git commit: newtmgr - revendor.

Posted by cc...@apache.org.
newtmgr - revendor.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/4bcaec22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/4bcaec22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/4bcaec22

Branch: refs/heads/master
Commit: 4bcaec2204c250eaf427e095ae19db424e1d87e4
Parents: 3637a5a
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Mar 27 19:43:58 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 newtmgr/Godeps/Godeps.json                      |  52 +++----
 .../newt/nmxact/bledefs/bledefs.go              | 145 ++++++++++++++++---
 .../newt/nmxact/nmble/ble_act.go                |  75 ++++++++++
 .../newt/nmxact/nmble/ble_fsm.go                | 108 +++++++++++---
 .../newt/nmxact/nmble/ble_oic_sesn.go           |   2 +-
 .../newt/nmxact/nmble/ble_plain_sesn.go         |   2 +-
 .../newt/nmxact/nmble/ble_proto.go              |  69 +++++++++
 .../newt/nmxact/nmble/ble_util.go               |  16 ++
 .../newt/nmxact/nmble/dispatch.go               |   6 +
 .../newt/nmxact/sesn/sesn_cfg.go                |   2 +-
 10 files changed, 411 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/4bcaec22/newtmgr/Godeps/Godeps.json
----------------------------------------------------------------------
diff --git a/newtmgr/Godeps/Godeps.json b/newtmgr/Godeps/Godeps.json
index e600078..05125ba 100644
--- a/newtmgr/Godeps/Godeps.json
+++ b/newtmgr/Godeps/Godeps.json
@@ -76,68 +76,68 @@
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/bledefs",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/nmble",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/nmp",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/nmserial",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/nmxutil",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/omp",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/sesn",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/xact",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/nmxact/xport",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/util",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/util/unixchild",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/viper",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		},
 		{
 			"ImportPath": "mynewt.apache.org/newt/yaml",
-			"Comment": "mynewt_1_0_0_b1_tag-198-gedcfb8b",
-			"Rev": "edcfb8ba4504e88d30a79ce03509521f7ff50b1b"
+			"Comment": "mynewt_1_0_0_b1_tag-204-gf0bc627",
+			"Rev": "f0bc62726dd0f25d6ed007ef1128824057723df0"
 		}
 	]
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/4bcaec22/newtmgr/vendor/mynewt.apache.org/newt/nmxact/bledefs/bledefs.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/bledefs/bledefs.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/bledefs/bledefs.go
index 314cbec..5b12d0a 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/bledefs/bledefs.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/bledefs/bledefs.go
@@ -27,10 +27,10 @@ import (
 	"strings"
 )
 
-type BleAddrType int
-
 const BLE_ATT_ATTR_MAX_LEN = 512
 
+type BleAddrType int
+
 const (
 	BLE_ADDR_TYPE_PUBLIC  BleAddrType = 0
 	BLE_ADDR_TYPE_RANDOM              = 1
@@ -45,21 +45,6 @@ var BleAddrTypeStringMap = map[BleAddrType]string{
 	BLE_ADDR_TYPE_RPA_RND: "rpa_rnd",
 }
 
-type BleAddr struct {
-	Bytes [6]byte
-}
-
-type BleDev struct {
-	AddrType BleAddrType
-	Addr     BleAddr
-}
-
-func (bd *BleDev) String() string {
-	return fmt.Sprintf("%s,%s",
-		BleAddrTypeToString(bd.AddrType),
-		bd.Addr.String())
-}
-
 func BleAddrTypeToString(addrType BleAddrType) string {
 	s := BleAddrTypeStringMap[addrType]
 	if s == "" {
@@ -95,6 +80,10 @@ func (a *BleAddrType) UnmarshalJSON(data []byte) error {
 	return err
 }
 
+type BleAddr struct {
+	Bytes [6]byte
+}
+
 func ParseBleAddr(s string) (BleAddr, error) {
 	ba := BleAddr{}
 
@@ -146,3 +135,125 @@ func (ba *BleAddr) UnmarshalJSON(data []byte) error {
 
 	return nil
 }
+
+type BleDev struct {
+	AddrType BleAddrType
+	Addr     BleAddr
+}
+
+func (bd *BleDev) String() string {
+	return fmt.Sprintf("%s,%s",
+		BleAddrTypeToString(bd.AddrType),
+		bd.Addr.String())
+}
+
+type BlePeerSpec struct {
+	Name string
+	Dev  BleDev // Only used if name not present.
+}
+
+type BleScanFilterPolicy int
+
+const (
+	BLE_SCAN_FILT_NO_WL        BleScanFilterPolicy = 0
+	BLE_SCAN_FILT_USE_WL                           = 1
+	BLE_SCAN_FILT_NO_WL_INITA                      = 2
+	BLE_SCAN_FILT_USE_WL_INITA                     = 3
+)
+
+var BleScanFilterPolicyStringMap = map[BleScanFilterPolicy]string{
+	BLE_SCAN_FILT_NO_WL:        "no_wl",
+	BLE_SCAN_FILT_USE_WL:       "use_wl",
+	BLE_SCAN_FILT_NO_WL_INITA:  "no_wl_inita",
+	BLE_SCAN_FILT_USE_WL_INITA: "use_wl_inita",
+}
+
+func BleScanFilterPolicyToString(filtPolicy BleScanFilterPolicy) string {
+	s := BleScanFilterPolicyStringMap[filtPolicy]
+	if s == "" {
+		panic(fmt.Sprintf("Invalid BleScanFilterPolicy: %d", int(filtPolicy)))
+	}
+
+	return s
+}
+
+func BleScanFilterPolicyFromString(s string) (BleScanFilterPolicy, error) {
+	for filtPolicy, name := range BleScanFilterPolicyStringMap {
+		if s == name {
+			return filtPolicy, nil
+		}
+	}
+
+	return BleScanFilterPolicy(0),
+		fmt.Errorf("Invalid BleScanFilterPolicy string: %s", s)
+}
+
+func (a BleScanFilterPolicy) MarshalJSON() ([]byte, error) {
+	return json.Marshal(BleScanFilterPolicyToString(a))
+}
+
+func (a *BleScanFilterPolicy) UnmarshalJSON(data []byte) error {
+	var err error
+
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	*a, err = BleScanFilterPolicyFromString(s)
+	return err
+}
+
+type BleAdvEventType int
+
+const (
+	BLE_ADV_EVENT_IND           BleAdvEventType = 0
+	BLE_ADV_EVENT_DIRECT_IND_HD                 = 1
+	BLE_ADV_EVENT_SCAN_IND                      = 2
+	BLE_ADV_EVENT_NONCONN_IND                   = 3
+	BLE_ADV_EVENT_DIRECT_IND_LD                 = 4
+)
+
+var BleAdvEventTypeStringMap = map[BleAdvEventType]string{
+	BLE_ADV_EVENT_IND:           "ind",
+	BLE_ADV_EVENT_DIRECT_IND_HD: "direct_ind_hd",
+	BLE_ADV_EVENT_SCAN_IND:      "scan_ind",
+	BLE_ADV_EVENT_NONCONN_IND:   "nonconn_ind",
+	BLE_ADV_EVENT_DIRECT_IND_LD: "direct_ind_ld",
+}
+
+func BleAdvEventTypeToString(advEventType BleAdvEventType) string {
+	s := BleAdvEventTypeStringMap[advEventType]
+	if s == "" {
+		panic(fmt.Sprintf("Invalid BleAdvEventType: %d", int(advEventType)))
+	}
+
+	return s
+}
+
+func BleAdvEventTypeFromString(s string) (BleAdvEventType, error) {
+	for advEventType, name := range BleAdvEventTypeStringMap {
+		if s == name {
+			return advEventType, nil
+		}
+	}
+
+	return BleAdvEventType(0),
+		fmt.Errorf("Invalid BleAdvEventType string: %s", s)
+}
+
+func (a BleAdvEventType) MarshalJSON() ([]byte, error) {
+	return json.Marshal(BleAdvEventTypeToString(a))
+}
+
+func (a *BleAdvEventType) UnmarshalJSON(data []byte) error {
+	var err error
+
+	var s string
+	if err := json.Unmarshal(data, &s); err != nil {
+		return err
+	}
+
+	*a, err = BleAdvEventTypeFromString(s)
+	return err
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/4bcaec22/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_act.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_act.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_act.go
index 673010c..08c396f 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_act.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_act.go
@@ -286,3 +286,78 @@ func exchangeMtu(x *BleXport, bl *BleListener, r *BleExchangeMtuReq) (
 		}
 	}
 }
+
+type scanFn func(evt *BleScanEvt)
+
+func scan(x *BleXport, bl *BleListener, r *BleScanReq,
+	abortChan chan struct{}, scanCb scanFn) error {
+
+	j, err := json.Marshal(r)
+	if err != nil {
+		return err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return err
+	}
+
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleScanRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return StatusError(MSG_OP_RSP, MSG_TYPE_SCAN, msg.Status)
+				}
+
+			case *BleScanEvt:
+				scanCb(msg)
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return BhdTimeoutError(MSG_TYPE_EXCHANGE_MTU)
+
+		case <-abortChan:
+			return nil
+		}
+	}
+}
+
+func scanCancel(x *BleXport, bl *BleListener, r *BleScanCancelReq) error {
+	j, err := json.Marshal(r)
+	if err != nil {
+		return err
+	}
+
+	if err := x.Tx(j); err != nil {
+		return err
+	}
+
+	for {
+		select {
+		case err := <-bl.ErrChan:
+			return err
+
+		case bm := <-bl.BleChan:
+			switch msg := bm.(type) {
+			case *BleScanCancelRsp:
+				bl.Acked = true
+				if msg.Status != 0 {
+					return StatusError(MSG_OP_RSP, MSG_TYPE_SCAN, msg.Status)
+				}
+				return nil
+
+			default:
+			}
+
+		case <-bl.AfterTimeout(x.rspTimeout):
+			return BhdTimeoutError(MSG_TYPE_EXCHANGE_MTU)
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/4bcaec22/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
index a9ce890..88ce90e 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
@@ -19,16 +19,17 @@ const DFLT_ATT_MTU = 23
 
 const (
 	SESN_STATE_UNCONNECTED     BleSesnState = 0
-	SESN_STATE_CONNECTING                   = 1
-	SESN_STATE_CONNECTED                    = 2
-	SESN_STATE_EXCHANGING_MTU               = 3
-	SESN_STATE_EXCHANGED_MTU                = 4
-	SESN_STATE_DISCOVERING_SVC              = 5
-	SESN_STATE_DISCOVERED_SVC               = 6
-	SESN_STATE_DISCOVERING_CHR              = 7
-	SESN_STATE_DISCOVERED_CHR               = 8
-	SESN_STATE_TERMINATING                  = 9
-	SESN_STATE_CONN_CANCELLING              = 10
+	SESN_STATE_SCANNING                     = 1
+	SESN_STATE_CONNECTING                   = 2
+	SESN_STATE_CONNECTED                    = 3
+	SESN_STATE_EXCHANGING_MTU               = 4
+	SESN_STATE_EXCHANGED_MTU                = 5
+	SESN_STATE_DISCOVERING_SVC              = 6
+	SESN_STATE_DISCOVERED_SVC               = 7
+	SESN_STATE_DISCOVERING_CHR              = 8
+	SESN_STATE_DISCOVERED_CHR               = 9
+	SESN_STATE_TERMINATING                  = 10
+	SESN_STATE_CONN_CANCELLING              = 11
 )
 
 type BleRxNmpFn func(data []byte)
@@ -37,7 +38,7 @@ type BleDisconnectFn func(err error)
 type BleFsmParams struct {
 	Bx           *BleXport
 	OwnAddrType  BleAddrType
-	Peer         BleDev
+	PeerSpec     BlePeerSpec
 	SvcUuid      BleUuid
 	ReqChrUuid   BleUuid
 	RspChrUuid   BleUuid
@@ -47,8 +48,9 @@ type BleFsmParams struct {
 
 type BleFsm struct {
 	bx           *BleXport
+	peerSpec     BlePeerSpec
 	ownAddrType  BleAddrType
-	peer         BleDev
+	peer         *BleDev
 	svcUuid      BleUuid
 	reqChrUuid   BleUuid
 	rspChrUuid   BleUuid
@@ -71,10 +73,10 @@ type BleFsm struct {
 }
 
 func NewBleFsm(p BleFsmParams) *BleFsm {
-	return &BleFsm{
+	bf := &BleFsm{
 		bx:           p.Bx,
+		peerSpec:     p.PeerSpec,
 		ownAddrType:  p.OwnAddrType,
-		peer:         p.Peer,
 		svcUuid:      p.SvcUuid,
 		reqChrUuid:   p.ReqChrUuid,
 		rspChrUuid:   p.RspChrUuid,
@@ -84,6 +86,12 @@ func NewBleFsm(p BleFsmParams) *BleFsm {
 		bls:    map[*BleListener]struct{}{},
 		attMtu: DFLT_ATT_MTU,
 	}
+
+	if bf.peerSpec.Name == "" {
+		bf.peer = &bf.peerSpec.Dev
+	}
+
+	return bf
 }
 
 func (bf *BleFsm) disconnectError(reason int) error {
@@ -347,6 +355,56 @@ func (bf *BleFsm) connect() error {
 	return nil
 }
 
+func (bf *BleFsm) scan() error {
+	r := NewBleScanReq()
+	r.OwnAddrType = bf.ownAddrType
+	r.DurationMs = 15000
+	r.FilterPolicy = BLE_SCAN_FILT_NO_WL
+	r.Limited = false
+	r.Passive = false
+	r.FilterDuplicates = true
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	abortChan := make(chan struct{}, 1)
+
+	scanCb := func(evt *BleScanEvt) {
+		if evt.DataName == bf.peerSpec.Name {
+			bf.peer = &BleDev{
+				AddrType: evt.AddrType,
+				Addr:     evt.Addr,
+			}
+			abortChan <- struct{}{}
+		}
+	}
+	if err := scan(bf.bx, bl, r, abortChan, scanCb); err != nil {
+		return err
+	}
+
+	// Scanning still in progress; cancel the operation.
+	return bf.scanCancel()
+}
+
+func (bf *BleFsm) scanCancel() error {
+	r := NewBleScanCancelReq()
+
+	bl, err := bf.addBleSeqListener(r.Seq)
+	if err != nil {
+		return err
+	}
+	defer bf.removeBleSeqListener(r.Seq)
+
+	if err := scanCancel(bf.bx, bl, r); err != nil {
+		return err
+	}
+
+	return nil
+}
+
 func (bf *BleFsm) terminateSetState() error {
 	bf.mtx.Lock()
 	defer bf.mtx.Unlock()
@@ -537,12 +595,22 @@ func (bf *BleFsm) Start() error {
 		state := bf.getState()
 		switch state {
 		case SESN_STATE_UNCONNECTED:
-			cb := func() error { return bf.connect() }
-			err := bf.action(
-				SESN_STATE_UNCONNECTED,
-				SESN_STATE_CONNECTING,
-				SESN_STATE_CONNECTED,
-				cb)
+			var err error
+			if bf.peer == nil {
+				cb := func() error { return bf.scan() }
+				err = bf.action(
+					SESN_STATE_UNCONNECTED,
+					SESN_STATE_SCANNING,
+					SESN_STATE_UNCONNECTED,
+					cb)
+			} else {
+				cb := func() error { return bf.connect() }
+				err = bf.action(
+					SESN_STATE_UNCONNECTED,
+					SESN_STATE_CONNECTING,
+					SESN_STATE_CONNECTED,
+					cb)
+			}
 
 			if err != nil {
 				return err

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/4bcaec22/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
index 6c6de2f..f0dead2 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
@@ -49,7 +49,7 @@ func NewBleOicSesn(bx *BleXport, cfg sesn.SesnCfg) *BleOicSesn {
 	bos.bf = NewBleFsm(BleFsmParams{
 		Bx:           bx,
 		OwnAddrType:  cfg.Ble.OwnAddrType,
-		Peer:         cfg.Ble.Peer,
+		PeerSpec:     cfg.Ble.Peer,
 		SvcUuid:      svcUuid,
 		ReqChrUuid:   reqChrUuid,
 		RspChrUuid:   rspChrUuid,

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/4bcaec22/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
index 967e320..c4b24c6 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
@@ -43,7 +43,7 @@ func NewBlePlainSesn(bx *BleXport, cfg sesn.SesnCfg) *BlePlainSesn {
 	bps.bf = NewBleFsm(BleFsmParams{
 		Bx:           bx,
 		OwnAddrType:  cfg.Ble.OwnAddrType,
-		Peer:         cfg.Ble.Peer,
+		PeerSpec:     cfg.Ble.Peer,
 		SvcUuid:      svcUuid,
 		ReqChrUuid:   chrUuid,
 		RspChrUuid:   chrUuid,

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/4bcaec22/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_proto.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_proto.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_proto.go
index f8f936b..80ef2a0 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_proto.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_proto.go
@@ -227,6 +227,8 @@ const (
 	MSG_TYPE_GEN_RAND_ADDR         = 12
 	MSG_TYPE_SET_RAND_ADDR         = 13
 	MSG_TYPE_CONN_CANCEL           = 14
+	MSG_TYPE_SCAN                  = 15
+	MSG_TYPE_SCAN_CANCEL           = 16
 
 	MSG_TYPE_SYNC_EVT       = 2049
 	MSG_TYPE_CONNECT_EVT    = 2050
@@ -236,6 +238,7 @@ const (
 	MSG_TYPE_WRITE_ACK_EVT  = 2054
 	MSG_TYPE_NOTIFY_RX_EVT  = 2055
 	MSG_TYPE_MTU_CHANGE_EVT = 2056
+	MSG_TYPE_SCAN_EVT       = 2057
 )
 
 var MsgOpStringMap = map[MsgOp]string{
@@ -255,6 +258,8 @@ var MsgTypeStringMap = map[MsgType]string{
 	MSG_TYPE_WRITE_CMD:     "write_cmd",
 	MSG_TYPE_EXCHANGE_MTU:  "exchange_mtu",
 	MSG_TYPE_CONN_CANCEL:   "conn_cancel",
+	MSG_TYPE_SCAN:          "scan",
+	MSG_TYPE_SCAN_CANCEL:   "scan_cancel",
 
 	MSG_TYPE_SYNC_EVT:       "sync_evt",
 	MSG_TYPE_CONNECT_EVT:    "connect_evt",
@@ -263,6 +268,7 @@ var MsgTypeStringMap = map[MsgType]string{
 	MSG_TYPE_DISC_CHR_EVT:   "disc_chr_evt",
 	MSG_TYPE_NOTIFY_RX_EVT:  "notify_rx_evt",
 	MSG_TYPE_MTU_CHANGE_EVT: "mtu_change_evt",
+	MSG_TYPE_SCAN_EVT:       "scan_evt",
 }
 
 type BleHdr struct {
@@ -579,6 +585,69 @@ type BleMtuChangeEvt struct {
 	Mtu        int `json:"mtu"`
 }
 
+type BleScanReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	OwnAddrType      BleAddrType         `json:"own_addr_type"`
+	DurationMs       int                 `json:"duration_ms"`
+	Itvl             int                 `json:"itvl"`
+	Window           int                 `json:"window"`
+	FilterPolicy     BleScanFilterPolicy `json:"filter_policy"`
+	Limited          bool                `json:"limited"`
+	Passive          bool                `json:"passive"`
+	FilterDuplicates bool                `json:"filter_duplicates"`
+}
+
+type BleScanRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
+type BleScanEvt struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	EventType BleAdvEventType `json:"event_type"`
+	AddrType  BleAddrType     `json:"addr_type"`
+	Addr      BleAddr         `json:"addr"`
+	Rssi      int8            `json:"rssi"`
+	Data      BleBytes        `json:"data"`
+
+	// Optional
+	DataFlags          uint8  `json:"data_flags"`
+	DataName           string `json:"data_name"`
+	DataNameIsComplete bool   `json:"data_name_is_complete"`
+}
+
+type BleScanCancelReq struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+}
+
+type BleScanCancelRsp struct {
+	// Header
+	Op   MsgOp   `json:"op"`
+	Type MsgType `json:"type"`
+	Seq  int     `json:"seq"`
+
+	// Mandatory
+	Status int `json:"status"`
+}
+
 func ErrCodeToString(e int) string {
 	var s string
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/4bcaec22/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_util.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_util.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_util.go
index a202186..08eb8d9 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_util.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_util.go
@@ -156,3 +156,19 @@ func NewBleWriteCmdReq() *BleWriteCmdReq {
 		Data:       BleBytes{},
 	}
 }
+
+func NewBleScanReq() *BleScanReq {
+	return &BleScanReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_SCAN,
+		Seq:  NextSeq(),
+	}
+}
+
+func NewBleScanCancelReq() *BleScanCancelReq {
+	return &BleScanCancelReq{
+		Op:   MSG_OP_REQ,
+		Type: MSG_TYPE_SCAN_CANCEL,
+		Seq:  NextSeq(),
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/4bcaec22/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/dispatch.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/dispatch.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/dispatch.go
index cb1f864..546fc11 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/dispatch.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/dispatch.go
@@ -94,6 +94,8 @@ func discChrUuidRspCtor() BleMsg { return &BleDiscChrUuidRsp{} }
 func writeCmdRspCtor() BleMsg    { return &BleWriteCmdRsp{} }
 func exchangeMtuRspCtor() BleMsg { return &BleExchangeMtuRsp{} }
 func connCancelRspCtor() BleMsg  { return &BleConnCancelRsp{} }
+func scanRspCtor() BleMsg        { return &BleScanRsp{} }
+func scanCancelRspCtor() BleMsg  { return &BleScanCancelRsp{} }
 
 func syncEvtCtor() BleMsg       { return &BleSyncEvt{} }
 func connectEvtCtor() BleMsg    { return &BleConnectEvt{} }
@@ -102,6 +104,7 @@ func discSvcEvtCtor() BleMsg    { return &BleDiscSvcEvt{} }
 func discChrEvtCtor() BleMsg    { return &BleDiscChrEvt{} }
 func notifyRxEvtCtor() BleMsg   { return &BleNotifyRxEvt{} }
 func mtuChangeEvtCtor() BleMsg  { return &BleMtuChangeEvt{} }
+func scanEvtCtor() BleMsg       { return &BleScanEvt{} }
 
 var msgCtorMap = map[OpTypePair]msgCtor{
 	{MSG_OP_RSP, MSG_TYPE_ERR}:           errRspCtor,
@@ -114,6 +117,8 @@ var msgCtorMap = map[OpTypePair]msgCtor{
 	{MSG_OP_RSP, MSG_TYPE_WRITE_CMD}:     writeCmdRspCtor,
 	{MSG_OP_RSP, MSG_TYPE_EXCHANGE_MTU}:  exchangeMtuRspCtor,
 	{MSG_OP_RSP, MSG_TYPE_CONN_CANCEL}:   connCancelRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_SCAN}:          scanRspCtor,
+	{MSG_OP_RSP, MSG_TYPE_SCAN_CANCEL}:   scanCancelRspCtor,
 
 	{MSG_OP_EVT, MSG_TYPE_SYNC_EVT}:       syncEvtCtor,
 	{MSG_OP_EVT, MSG_TYPE_CONNECT_EVT}:    connectEvtCtor,
@@ -122,6 +127,7 @@ var msgCtorMap = map[OpTypePair]msgCtor{
 	{MSG_OP_EVT, MSG_TYPE_DISC_CHR_EVT}:   discChrEvtCtor,
 	{MSG_OP_EVT, MSG_TYPE_NOTIFY_RX_EVT}:  notifyRxEvtCtor,
 	{MSG_OP_EVT, MSG_TYPE_MTU_CHANGE_EVT}: mtuChangeEvtCtor,
+	{MSG_OP_EVT, MSG_TYPE_SCAN_EVT}:       scanEvtCtor,
 }
 
 func NewBleDispatcher() *BleDispatcher {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/4bcaec22/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn_cfg.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn_cfg.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn_cfg.go
index 21def4b..cb6dce6 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn_cfg.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/sesn/sesn_cfg.go
@@ -17,7 +17,7 @@ type OnCloseFn func(s Sesn, err error)
 
 type SesnCfgBle struct {
 	OwnAddrType  bledefs.BleAddrType
-	Peer         bledefs.BleDev
+	Peer         bledefs.BlePeerSpec
 	CloseTimeout time.Duration
 }
 


[26/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
deleted file mode 100644
index 49b6c35..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ /dev/null
@@ -1,1820 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x28
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x1008
-	B110                             = 0x3
-	B115200                          = 0x1002
-	B1152000                         = 0x1009
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x100a
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x100b
-	B230400                          = 0x1003
-	B2400                            = 0xb
-	B2500000                         = 0x100c
-	B300                             = 0x7
-	B3000000                         = 0x100d
-	B3500000                         = 0x100e
-	B38400                           = 0xf
-	B4000000                         = 0x100f
-	B460800                          = 0x1004
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x1005
-	B57600                           = 0x1001
-	B576000                          = 0x1006
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x1007
-	B9600                            = 0xd
-	BOTHER                           = 0x1000
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BRKINT                           = 0x2
-	BS0                              = 0x0
-	BS1                              = 0x2000
-	BSDLY                            = 0x2000
-	CBAUD                            = 0x100f
-	CBAUDEX                          = 0x1000
-	CFLUSH                           = 0xf
-	CIBAUD                           = 0x100f0000
-	CLOCAL                           = 0x800
-	CLOCK_BOOTTIME                   = 0x7
-	CLOCK_BOOTTIME_ALARM             = 0x9
-	CLOCK_DEFAULT                    = 0x0
-	CLOCK_EXT                        = 0x1
-	CLOCK_INT                        = 0x2
-	CLOCK_MONOTONIC                  = 0x1
-	CLOCK_MONOTONIC_COARSE           = 0x6
-	CLOCK_MONOTONIC_RAW              = 0x4
-	CLOCK_PROCESS_CPUTIME_ID         = 0x2
-	CLOCK_REALTIME                   = 0x0
-	CLOCK_REALTIME_ALARM             = 0x8
-	CLOCK_REALTIME_COARSE            = 0x5
-	CLOCK_THREAD_CPUTIME_ID          = 0x3
-	CLOCK_TXFROMRX                   = 0x4
-	CLOCK_TXINT                      = 0x3
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWCGROUP                  = 0x2000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CMSPAR                           = 0x40000000
-	CR0                              = 0x0
-	CR1                              = 0x200
-	CR2                              = 0x400
-	CR3                              = 0x600
-	CRDLY                            = 0x600
-	CREAD                            = 0x80
-	CRTSCTS                          = 0x80000000
-	CS5                              = 0x0
-	CS6                              = 0x10
-	CS7                              = 0x20
-	CS8                              = 0x30
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x30
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x40
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x200
-	ECHOE                            = 0x10
-	ECHOK                            = 0x20
-	ECHOKE                           = 0x800
-	ECHONL                           = 0x40
-	ECHOPRT                          = 0x400
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	EPOLL_NONBLOCK                   = 0x800
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FF0                              = 0x0
-	FF1                              = 0x8000
-	FFDLY                            = 0x8000
-	FLUSHO                           = 0x1000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0x5
-	F_GETLK64                        = 0x5
-	F_GETOWN                         = 0x9
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x6
-	F_SETLK64                        = 0x6
-	F_SETLKW                         = 0x7
-	F_SETLKW64                       = 0x7
-	F_SETOWN                         = 0x8
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x400
-	IBSHIFT                          = 0x10
-	ICANON                           = 0x2
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x8000
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_NODAD                      = 0x2
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x7
-	IFF_802_1Q_VLAN                  = 0x1
-	IFF_ALLMULTI                     = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BONDING                      = 0x20
-	IFF_BRIDGE_PORT                  = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DISABLE_NETPOLL              = 0x1000
-	IFF_DONT_BRIDGE                  = 0x800
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_EBRIDGE                      = 0x2
-	IFF_ECHO                         = 0x40000
-	IFF_ISATAP                       = 0x80
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MACVLAN_PORT                 = 0x2000
-	IFF_MASTER                       = 0x400
-	IFF_MASTER_8023AD                = 0x8
-	IFF_MASTER_ALB                   = 0x10
-	IFF_MASTER_ARPMON                = 0x100
-	IFF_MULTICAST                    = 0x1000
-	IFF_NOARP                        = 0x80
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_OVS_DATAPATH                 = 0x8000
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_SLAVE_INACTIVE               = 0x4
-	IFF_SLAVE_NEEDARP                = 0x40
-	IFF_TAP                          = 0x2
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_TX_SKB_SHARING               = 0x10000
-	IFF_UNICAST_FLT                  = 0x20000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFF_WAN_HDLC                     = 0x200
-	IFF_XMIT_DST_RELEASE             = 0x400
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x800
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x1
-	ISTRIP                           = 0x20
-	IUCLC                            = 0x200
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x1000
-	IXON                             = 0x400
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DOFORK                      = 0xb
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_32BIT                        = 0x40
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x100
-	MAP_HUGETLB                      = 0x40000
-	MAP_LOCKED                       = 0x2000
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x4000
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x20000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x1
-	MCL_FUTURE                       = 0x2
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NL0                              = 0x0
-	NL1                              = 0x100
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLDLY                            = 0x100
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	OLCUC                            = 0x2
-	ONLCR                            = 0x4
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x400
-	O_ASYNC                          = 0x2000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x40
-	O_DIRECT                         = 0x4000
-	O_DIRECTORY                      = 0x10000
-	O_DSYNC                          = 0x1000
-	O_EXCL                           = 0x80
-	O_FSYNC                          = 0x101000
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x800
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x100
-	O_NOFOLLOW                       = 0x20000
-	O_NONBLOCK                       = 0x800
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x101000
-	O_SYNC                           = 0x101000
-	O_TMPFILE                        = 0x410000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x100
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x200
-	PENDIN                           = 0x4000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ARCH_PRCTL                = 0x1e
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETFPREGS                 = 0xe
-	PTRACE_GETFPXREGS                = 0x12
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GET_THREAD_AREA           = 0x19
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_OLDSETOPTIONS             = 0x15
-	PTRACE_O_MASK                    = 0xff
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SEIZE_DEVEL               = 0x80000000
-	PTRACE_SETFPREGS                 = 0xf
-	PTRACE_SETFPXREGS                = 0x13
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SET_THREAD_AREA           = 0x1a
-	PTRACE_SINGLEBLOCK               = 0x21
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_SYSEMU                    = 0x1f
-	PTRACE_SYSEMU_SINGLESTEP         = 0x20
-	PTRACE_TRACEME                   = 0x0
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x7
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0xe
-	RTAX_MTU                         = 0x2
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x10
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x4f
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x10
-	RTM_NR_MSGTYPES                  = 0x40
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x800
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0x1
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1e
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BROADCAST                     = 0x6
-	SO_BSDCOMPAT                     = 0xe
-	SO_DEBUG                         = 0x1
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x27
-	SO_DONTROUTE                     = 0x5
-	SO_ERROR                         = 0x4
-	SO_KEEPALIVE                     = 0x9
-	SO_LINGER                        = 0xd
-	SO_MARK                          = 0x24
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0xa
-	SO_PASSCRED                      = 0x10
-	SO_PASSSEC                       = 0x22
-	SO_PEERCRED                      = 0x11
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1f
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x26
-	SO_RCVBUF                        = 0x8
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x12
-	SO_RCVTIMEO                      = 0x14
-	SO_REUSEADDR                     = 0x2
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SNDBUF                        = 0x7
-	SO_SNDBUFFORCE                   = 0x20
-	SO_SNDLOWAT                      = 0x13
-	SO_SNDTIMEO                      = 0x15
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x3
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TAB0                             = 0x0
-	TAB1                             = 0x800
-	TAB2                             = 0x1000
-	TAB3                             = 0x1800
-	TABDLY                           = 0x1800
-	TCFLSH                           = 0x540b
-	TCGETA                           = 0x5405
-	TCGETS                           = 0x5401
-	TCGETS2                          = 0x802c542a
-	TCGETX                           = 0x5432
-	TCIFLUSH                         = 0x0
-	TCIOFF                           = 0x2
-	TCIOFLUSH                        = 0x2
-	TCION                            = 0x3
-	TCOFLUSH                         = 0x1
-	TCOOFF                           = 0x0
-	TCOON                            = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_NODELAY                      = 0x1
-	TCP_QUICKACK                     = 0xc
-	TCP_SYNCNT                       = 0x7
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TCSBRK                           = 0x5409
-	TCSBRKP                          = 0x5425
-	TCSETA                           = 0x5406
-	TCSETAF                          = 0x5408
-	TCSETAW                          = 0x5407
-	TCSETS                           = 0x5402
-	TCSETS2                          = 0x402c542b
-	TCSETSF                          = 0x5404
-	TCSETSF2                         = 0x402c542d
-	TCSETSW                          = 0x5403
-	TCSETSW2                         = 0x402c542c
-	TCSETX                           = 0x5433
-	TCSETXF                          = 0x5434
-	TCSETXW                          = 0x5435
-	TCXONC                           = 0x540a
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x541d
-	TIOCEXCL                         = 0x540c
-	TIOCGDEV                         = 0x80045432
-	TIOCGETD                         = 0x5424
-	TIOCGEXCL                        = 0x80045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGPGRP                        = 0x540f
-	TIOCGPKT                         = 0x80045438
-	TIOCGPTLCK                       = 0x80045439
-	TIOCGPTN                         = 0x80045430
-	TIOCGRS485                       = 0x542e
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x5429
-	TIOCGSOFTCAR                     = 0x5419
-	TIOCGWINSZ                       = 0x5413
-	TIOCINQ                          = 0x541b
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x5417
-	TIOCMBIS                         = 0x5416
-	TIOCMGET                         = 0x5415
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x5418
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x5422
-	TIOCNXCL                         = 0x540d
-	TIOCOUTQ                         = 0x5411
-	TIOCPKT                          = 0x5420
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x540e
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETD                         = 0x5423
-	TIOCSIG                          = 0x40045436
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSPGRP                        = 0x5410
-	TIOCSPTLCK                       = 0x40045431
-	TIOCSRS485                       = 0x542f
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x541a
-	TIOCSTI                          = 0x5412
-	TIOCSWINSZ                       = 0x5414
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x100
-	TUNATTACHFILTER                  = 0x401054d5
-	TUNDETACHFILTER                  = 0x401054d6
-	TUNGETFEATURES                   = 0x800454cf
-	TUNGETIFF                        = 0x800454d2
-	TUNGETSNDBUF                     = 0x800454d3
-	TUNGETVNETHDRSZ                  = 0x800454d7
-	TUNSETDEBUG                      = 0x400454c9
-	TUNSETGROUP                      = 0x400454ce
-	TUNSETIFF                        = 0x400454ca
-	TUNSETLINK                       = 0x400454cd
-	TUNSETNOCSUM                     = 0x400454c8
-	TUNSETOFFLOAD                    = 0x400454d0
-	TUNSETOWNER                      = 0x400454cc
-	TUNSETPERSIST                    = 0x400454cb
-	TUNSETSNDBUF                     = 0x400454d4
-	TUNSETTXFILTER                   = 0x400454d1
-	TUNSETVNETHDRSZ                  = 0x400454d8
-	VDISCARD                         = 0xd
-	VEOF                             = 0x4
-	VEOL                             = 0xb
-	VEOL2                            = 0x10
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x6
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xc
-	VSTART                           = 0x8
-	VSTOP                            = 0x9
-	VSUSP                            = 0xa
-	VSWTC                            = 0x7
-	VT0                              = 0x0
-	VT1                              = 0x4000
-	VTDLY                            = 0x4000
-	VTIME                            = 0x5
-	VWERASE                          = 0xe
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-	XCASE                            = 0x4
-	XTABS                            = 0x1800
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x62)
-	EADDRNOTAVAIL   = syscall.Errno(0x63)
-	EADV            = syscall.Errno(0x44)
-	EAFNOSUPPORT    = syscall.Errno(0x61)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x72)
-	EBADE           = syscall.Errno(0x34)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x4d)
-	EBADMSG         = syscall.Errno(0x4a)
-	EBADR           = syscall.Errno(0x35)
-	EBADRQC         = syscall.Errno(0x38)
-	EBADSLT         = syscall.Errno(0x39)
-	EBFONT          = syscall.Errno(0x3b)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x7d)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x2c)
-	ECOMM           = syscall.Errno(0x46)
-	ECONNABORTED    = syscall.Errno(0x67)
-	ECONNREFUSED    = syscall.Errno(0x6f)
-	ECONNRESET      = syscall.Errno(0x68)
-	EDEADLK         = syscall.Errno(0x23)
-	EDEADLOCK       = syscall.Errno(0x23)
-	EDESTADDRREQ    = syscall.Errno(0x59)
-	EDOM            = syscall.Errno(0x21)
-	EDOTDOT         = syscall.Errno(0x49)
-	EDQUOT          = syscall.Errno(0x7a)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x70)
-	EHOSTUNREACH    = syscall.Errno(0x71)
-	EHWPOISON       = syscall.Errno(0x85)
-	EIDRM           = syscall.Errno(0x2b)
-	EILSEQ          = syscall.Errno(0x54)
-	EINPROGRESS     = syscall.Errno(0x73)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x6a)
-	EISDIR          = syscall.Errno(0x15)
-	EISNAM          = syscall.Errno(0x78)
-	EKEYEXPIRED     = syscall.Errno(0x7f)
-	EKEYREJECTED    = syscall.Errno(0x81)
-	EKEYREVOKED     = syscall.Errno(0x80)
-	EL2HLT          = syscall.Errno(0x33)
-	EL2NSYNC        = syscall.Errno(0x2d)
-	EL3HLT          = syscall.Errno(0x2e)
-	EL3RST          = syscall.Errno(0x2f)
-	ELIBACC         = syscall.Errno(0x4f)
-	ELIBBAD         = syscall.Errno(0x50)
-	ELIBEXEC        = syscall.Errno(0x53)
-	ELIBMAX         = syscall.Errno(0x52)
-	ELIBSCN         = syscall.Errno(0x51)
-	ELNRNG          = syscall.Errno(0x30)
-	ELOOP           = syscall.Errno(0x28)
-	EMEDIUMTYPE     = syscall.Errno(0x7c)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x5a)
-	EMULTIHOP       = syscall.Errno(0x48)
-	ENAMETOOLONG    = syscall.Errno(0x24)
-	ENAVAIL         = syscall.Errno(0x77)
-	ENETDOWN        = syscall.Errno(0x64)
-	ENETRESET       = syscall.Errno(0x66)
-	ENETUNREACH     = syscall.Errno(0x65)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x37)
-	ENOBUFS         = syscall.Errno(0x69)
-	ENOCSI          = syscall.Errno(0x32)
-	ENODATA         = syscall.Errno(0x3d)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOKEY          = syscall.Errno(0x7e)
-	ENOLCK          = syscall.Errno(0x25)
-	ENOLINK         = syscall.Errno(0x43)
-	ENOMEDIUM       = syscall.Errno(0x7b)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x2a)
-	ENONET          = syscall.Errno(0x40)
-	ENOPKG          = syscall.Errno(0x41)
-	ENOPROTOOPT     = syscall.Errno(0x5c)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x3f)
-	ENOSTR          = syscall.Errno(0x3c)
-	ENOSYS          = syscall.Errno(0x26)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x6b)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x27)
-	ENOTNAM         = syscall.Errno(0x76)
-	ENOTRECOVERABLE = syscall.Errno(0x83)
-	ENOTSOCK        = syscall.Errno(0x58)
-	ENOTSUP         = syscall.Errno(0x5f)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x4c)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x5f)
-	EOVERFLOW       = syscall.Errno(0x4b)
-	EOWNERDEAD      = syscall.Errno(0x82)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x60)
-	EPIPE           = syscall.Errno(0x20)
-	EPROTO          = syscall.Errno(0x47)
-	EPROTONOSUPPORT = syscall.Errno(0x5d)
-	EPROTOTYPE      = syscall.Errno(0x5b)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x4e)
-	EREMOTE         = syscall.Errno(0x42)
-	EREMOTEIO       = syscall.Errno(0x79)
-	ERESTART        = syscall.Errno(0x55)
-	ERFKILL         = syscall.Errno(0x84)
-	EROFS           = syscall.Errno(0x1e)
-	ESHUTDOWN       = syscall.Errno(0x6c)
-	ESOCKTNOSUPPORT = syscall.Errno(0x5e)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x45)
-	ESTALE          = syscall.Errno(0x74)
-	ESTRPIPE        = syscall.Errno(0x56)
-	ETIME           = syscall.Errno(0x3e)
-	ETIMEDOUT       = syscall.Errno(0x6e)
-	ETOOMANYREFS    = syscall.Errno(0x6d)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUCLEAN         = syscall.Errno(0x75)
-	EUNATCH         = syscall.Errno(0x31)
-	EUSERS          = syscall.Errno(0x57)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x36)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0x7)
-	SIGCHLD   = syscall.Signal(0x11)
-	SIGCLD    = syscall.Signal(0x11)
-	SIGCONT   = syscall.Signal(0x12)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x1d)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPOLL   = syscall.Signal(0x1d)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x1e)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTKFLT = syscall.Signal(0x10)
-	SIGSTOP   = syscall.Signal(0x13)
-	SIGSYS    = syscall.Signal(0x1f)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x14)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGUNUSED = syscall.Signal(0x1f)
-	SIGURG    = syscall.Signal(0x17)
-	SIGUSR1   = syscall.Signal(0xa)
-	SIGUSR2   = syscall.Signal(0xc)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	35:  "resource deadlock avoided",
-	36:  "file name too long",
-	37:  "no locks available",
-	38:  "function not implemented",
-	39:  "directory not empty",
-	40:  "too many levels of symbolic links",
-	42:  "no message of desired type",
-	43:  "identifier removed",
-	44:  "channel number out of range",
-	45:  "level 2 not synchronized",
-	46:  "level 3 halted",
-	47:  "level 3 reset",
-	48:  "link number out of range",
-	49:  "protocol driver not attached",
-	50:  "no CSI structure available",
-	51:  "level 2 halted",
-	52:  "invalid exchange",
-	53:  "invalid request descriptor",
-	54:  "exchange full",
-	55:  "no anode",
-	56:  "invalid request code",
-	57:  "invalid slot",
-	59:  "bad font file format",
-	60:  "device not a stream",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of streams resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "multihop attempted",
-	73:  "RFS specific error",
-	74:  "bad message",
-	75:  "value too large for defined data type",
-	76:  "name not unique on network",
-	77:  "file descriptor in bad state",
-	78:  "remote address changed",
-	79:  "can not access a needed shared library",
-	80:  "accessing a corrupted shared library",
-	81:  ".lib section in a.out corrupted",
-	82:  "attempting to link in too many shared libraries",
-	83:  "cannot exec a shared library directly",
-	84:  "invalid or incomplete multibyte or wide character",
-	85:  "interrupted system call should be restarted",
-	86:  "streams pipe error",
-	87:  "too many users",
-	88:  "socket operation on non-socket",
-	89:  "destination address required",
-	90:  "message too long",
-	91:  "protocol wrong type for socket",
-	92:  "protocol not available",
-	93:  "protocol not supported",
-	94:  "socket type not supported",
-	95:  "operation not supported",
-	96:  "protocol family not supported",
-	97:  "address family not supported by protocol",
-	98:  "address already in use",
-	99:  "cannot assign requested address",
-	100: "network is down",
-	101: "network is unreachable",
-	102: "network dropped connection on reset",
-	103: "software caused connection abort",
-	104: "connection reset by peer",
-	105: "no buffer space available",
-	106: "transport endpoint is already connected",
-	107: "transport endpoint is not connected",
-	108: "cannot send after transport endpoint shutdown",
-	109: "too many references: cannot splice",
-	110: "connection timed out",
-	111: "connection refused",
-	112: "host is down",
-	113: "no route to host",
-	114: "operation already in progress",
-	115: "operation now in progress",
-	116: "stale NFS file handle",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "disk quota exceeded",
-	123: "no medium found",
-	124: "wrong medium type",
-	125: "operation canceled",
-	126: "required key not available",
-	127: "key has expired",
-	128: "key has been revoked",
-	129: "key was rejected by service",
-	130: "owner died",
-	131: "state not recoverable",
-	132: "operation not possible due to RF-kill",
-	133: "unknown error 133",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "bus error",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "user defined signal 1",
-	11: "segmentation fault",
-	12: "user defined signal 2",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "stack fault",
-	17: "child exited",
-	18: "continued",
-	19: "stopped (signal)",
-	20: "stopped",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "urgent I/O condition",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "I/O possible",
-	30: "power failure",
-	31: "bad system call",
-}


[23/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
deleted file mode 100644
index 36535b2..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ /dev/null
@@ -1,1917 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build mips64,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IB                            = 0x1b
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x29
-	AF_MPLS                          = 0x1c
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_VSOCK                         = 0x28
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_6LOWPAN                   = 0x339
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_MONITOR        = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IP6GRE                    = 0x337
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETLINK                   = 0x338
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x1008
-	B110                             = 0x3
-	B115200                          = 0x1002
-	B1152000                         = 0x1009
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x100a
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x100b
-	B230400                          = 0x1003
-	B2400                            = 0xb
-	B2500000                         = 0x100c
-	B300                             = 0x7
-	B3000000                         = 0x100d
-	B3500000                         = 0x100e
-	B38400                           = 0xf
-	B4000000                         = 0x100f
-	B460800                          = 0x1004
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x1005
-	B57600                           = 0x1001
-	B576000                          = 0x1006
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x1007
-	B9600                            = 0xd
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LL_OFF                       = -0x200000
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MOD                          = 0x90
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_NET_OFF                      = -0x100000
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BPF_XOR                          = 0xa0
-	BRKINT                           = 0x2
-	CFLUSH                           = 0xf
-	CLOCAL                           = 0x800
-	CLOCK_BOOTTIME                   = 0x7
-	CLOCK_BOOTTIME_ALARM             = 0x9
-	CLOCK_DEFAULT                    = 0x0
-	CLOCK_EXT                        = 0x1
-	CLOCK_INT                        = 0x2
-	CLOCK_MONOTONIC                  = 0x1
-	CLOCK_MONOTONIC_COARSE           = 0x6
-	CLOCK_MONOTONIC_RAW              = 0x4
-	CLOCK_PROCESS_CPUTIME_ID         = 0x2
-	CLOCK_REALTIME                   = 0x0
-	CLOCK_REALTIME_ALARM             = 0x8
-	CLOCK_REALTIME_COARSE            = 0x5
-	CLOCK_TAI                        = 0xb
-	CLOCK_THREAD_CPUTIME_ID          = 0x3
-	CLOCK_TXFROMRX                   = 0x4
-	CLOCK_TXINT                      = 0x3
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWCGROUP                  = 0x2000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CREAD                            = 0x80
-	CS5                              = 0x0
-	CS6                              = 0x10
-	CS7                              = 0x20
-	CS8                              = 0x30
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x30
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x40
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x200
-	ECHOE                            = 0x10
-	ECHOK                            = 0x20
-	ECHOKE                           = 0x800
-	ECHONL                           = 0x40
-	ECHOPRT                          = 0x400
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWAKEUP                      = 0x20000000
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_80221                      = 0x8917
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_802_3_MIN                  = 0x600
-	ETH_P_802_EX1                    = 0x88b5
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BATMAN                     = 0x4305
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CANFD                      = 0xd
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_LOOPBACK                   = 0x9000
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_MVRP                       = 0x88f5
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PRP                        = 0x88fb
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_TSN                        = 0x22f0
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	ETH_P_XDSA                       = 0xf8
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FLUSHO                           = 0x2000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0xe
-	F_GETLK64                        = 0xe
-	F_GETOWN                         = 0x17
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OFD_GETLK                      = 0x24
-	F_OFD_SETLK                      = 0x25
-	F_OFD_SETLKW                     = 0x26
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x6
-	F_SETLK64                        = 0x6
-	F_SETLKW                         = 0x7
-	F_SETLKW64                       = 0x7
-	F_SETOWN                         = 0x18
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x400
-	ICANON                           = 0x2
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x100
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_MANAGETEMPADDR             = 0x100
-	IFA_F_MCAUTOJOIN                 = 0x400
-	IFA_F_NODAD                      = 0x2
-	IFA_F_NOPREFIXROUTE              = 0x200
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_STABLE_PRIVACY             = 0x800
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x8
-	IFF_ALLMULTI                     = 0x200
-	IFF_ATTACH_QUEUE                 = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DETACH_QUEUE                 = 0x400
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_ECHO                         = 0x40000
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MASTER                       = 0x400
-	IFF_MULTICAST                    = 0x1000
-	IFF_MULTI_QUEUE                  = 0x100
-	IFF_NOARP                        = 0x80
-	IFF_NOFILTER                     = 0x1000
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_PERSIST                      = 0x800
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_TAP                          = 0x2
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x80
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_BEETPH                   = 0x5e
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MH                       = 0x87
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DONTFRAG                    = 0x3e
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PATHMTU                     = 0x3d
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_INTERFACE          = 0x4
-	IPV6_PMTUDISC_OMIT               = 0x5
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPATHMTU                 = 0x3c
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_CHECKSUM                      = 0x17
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_NODEFRAG                      = 0x16
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_INTERFACE            = 0x4
-	IP_PMTUDISC_OMIT                 = 0x5
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_UNICAST_IF                    = 0x32
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x1
-	ISTRIP                           = 0x20
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x1000
-	IXON                             = 0x400
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DODUMP                      = 0x11
-	MADV_DOFORK                      = 0xb
-	MADV_DONTDUMP                    = 0x10
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x800
-	MAP_ANONYMOUS                    = 0x800
-	MAP_DENYWRITE                    = 0x2000
-	MAP_EXECUTABLE                   = 0x4000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x1000
-	MAP_HUGETLB                      = 0x80000
-	MAP_HUGE_MASK                    = 0x3f
-	MAP_HUGE_SHIFT                   = 0x1a
-	MAP_LOCKED                       = 0x8000
-	MAP_NONBLOCK                     = 0x20000
-	MAP_NORESERVE                    = 0x400
-	MAP_POPULATE                     = 0x10000
-	MAP_PRIVATE                      = 0x2
-	MAP_RENAME                       = 0x800
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x40000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x1
-	MCL_FUTURE                       = 0x2
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_LAZYTIME                      = 0x2000000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x2800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CAP_ACK                  = 0xa
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_LISTEN_ALL_NSID          = 0x8
-	NETLINK_LIST_MEMBERSHIPS         = 0x9
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_RX_RING                  = 0x6
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_SOCK_DIAG                = 0x4
-	NETLINK_TX_RING                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	ONLCR                            = 0x4
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x8
-	O_ASYNC                          = 0x1000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x100
-	O_DIRECT                         = 0x8000
-	O_DIRECTORY                      = 0x10000
-	O_DSYNC                          = 0x10
-	O_EXCL                           = 0x400
-	O_FSYNC                          = 0x4010
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x80
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x800
-	O_NOFOLLOW                       = 0x20000
-	O_NONBLOCK                       = 0x80
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x4010
-	O_SYNC                           = 0x4010
-	O_TMPFILE                        = 0x410000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CBPF               = 0x6
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_DATA               = 0x16
-	PACKET_FANOUT_EBPF               = 0x7
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_FLAG_ROLLOVER      = 0x1000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FANOUT_QM                 = 0x5
-	PACKET_FANOUT_RND                = 0x4
-	PACKET_FANOUT_ROLLOVER           = 0x3
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_KERNEL                    = 0x7
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_QDISC_BYPASS              = 0x14
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_ROLLOVER_STATS            = 0x15
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_HAS_OFF                = 0x13
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_USER                      = 0x6
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x100
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x200
-	PENDIN                           = 0x4000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_CAP_AMBIENT                   = 0x2f
-	PR_CAP_AMBIENT_CLEAR_ALL         = 0x4
-	PR_CAP_AMBIENT_IS_SET            = 0x1
-	PR_CAP_AMBIENT_LOWER             = 0x3
-	PR_CAP_AMBIENT_RAISE             = 0x2
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_FP_MODE_FR                    = 0x1
-	PR_FP_MODE_FRE                   = 0x2
-	PR_GET_CHILD_SUBREAPER           = 0x25
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_FP_MODE                   = 0x2e
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_THP_DISABLE               = 0x2a
-	PR_GET_TID_ADDRESS               = 0x28
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_MPX_DISABLE_MANAGEMENT        = 0x2c
-	PR_MPX_ENABLE_MANAGEMENT         = 0x2b
-	PR_SET_CHILD_SUBREAPER           = 0x24
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_FP_MODE                   = 0x2d
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_ARG_END                = 0x9
-	PR_SET_MM_ARG_START              = 0x8
-	PR_SET_MM_AUXV                   = 0xc
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_ENV_END                = 0xb
-	PR_SET_MM_ENV_START              = 0xa
-	PR_SET_MM_EXE_FILE               = 0xd
-	PR_SET_MM_MAP                    = 0xe
-	PR_SET_MM_MAP_SIZE               = 0xf
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_THP_DISABLE               = 0x29
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETFPREGS                 = 0xe
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETSIGMASK                = 0x420a
-	PTRACE_GET_THREAD_AREA           = 0x19
-	PTRACE_GET_THREAD_AREA_3264      = 0xc4
-	PTRACE_GET_WATCH_REGS            = 0xd0
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_OLDSETOPTIONS             = 0x15
-	PTRACE_O_EXITKILL                = 0x100000
-	PTRACE_O_MASK                    = 0x3000ff
-	PTRACE_O_SUSPEND_SECCOMP         = 0x200000
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKDATA_3264             = 0xc1
-	PTRACE_PEEKSIGINFO               = 0x4209
-	PTRACE_PEEKSIGINFO_SHARED        = 0x1
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKTEXT_3264             = 0xc0
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKEDATA_3264             = 0xc3
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKETEXT_3264             = 0xc2
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SETFPREGS                 = 0xf
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETSIGMASK                = 0x420b
-	PTRACE_SET_THREAD_AREA           = 0x1a
-	PTRACE_SET_WATCH_REGS            = 0xd1
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TRACEME                   = 0x0
-	RLIMIT_AS                        = 0x6
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x5
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CC_ALGO                     = 0x10
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_MASK                = 0xf
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0x10
-	RTAX_MTU                         = 0x2
-	RTAX_QUICKACK                    = 0xf
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x16
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELMDB                       = 0x55
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELNSID                      = 0x59
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMDB                       = 0x56
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETNETCONF                   = 0x52
-	RTM_GETNSID                      = 0x5a
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x5b
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWMDB                       = 0x54
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWNETCONF                   = 0x50
-	RTM_NEWNSID                      = 0x58
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x13
-	RTM_NR_MSGTYPES                  = 0x4c
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_COMPARE_MASK                = 0x11
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_LINKDOWN                  = 0x10
-	RTNH_F_OFFLOAD                   = 0x8
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BABEL                     = 0x2a
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MROUTED                   = 0x11
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SCM_WIFI_STATUS                  = 0x29
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x40047307
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x40047309
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x80047308
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x1
-	SOCK_NONBLOCK                    = 0x80
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x2
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0xffff
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1009
-	SO_ATTACH_BPF                    = 0x32
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BPF_EXTENSIONS                = 0x30
-	SO_BROADCAST                     = 0x20
-	SO_BSDCOMPAT                     = 0xe
-	SO_BUSY_POLL                     = 0x2e
-	SO_DEBUG                         = 0x1
-	SO_DETACH_BPF                    = 0x1b
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x1029
-	SO_DONTROUTE                     = 0x10
-	SO_ERROR                         = 0x1007
-	SO_GET_FILTER                    = 0x1a
-	SO_INCOMING_CPU                  = 0x31
-	SO_KEEPALIVE                     = 0x8
-	SO_LINGER                        = 0x80
-	SO_LOCK_FILTER                   = 0x2c
-	SO_MARK                          = 0x24
-	SO_MAX_PACING_RATE               = 0x2f
-	SO_NOFCS                         = 0x2b
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0x100
-	SO_PASSCRED                      = 0x11
-	SO_PASSSEC                       = 0x22
-	SO_PEEK_OFF                      = 0x2a
-	SO_PEERCRED                      = 0x12
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1e
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x1028
-	SO_RCVBUF                        = 0x1002
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x1004
-	SO_RCVTIMEO                      = 0x1006
-	SO_REUSEADDR                     = 0x4
-	SO_REUSEPORT                     = 0x200
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SELECT_ERR_QUEUE              = 0x2d
-	SO_SNDBUF                        = 0x1001
-	SO_SNDBUFFORCE                   = 0x1f
-	SO_SNDLOWAT                      = 0x1003
-	SO_SNDTIMEO                      = 0x1005
-	SO_STYLE                         = 0x1008
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x1008
-	SO_WIFI_STATUS                   = 0x29
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TCFLSH                           = 0x5407
-	TCIFLUSH                         = 0x0
-	TCIOFLUSH                        = 0x2
-	TCOFLUSH                         = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_COOKIE_IN_ALWAYS             = 0x1
-	TCP_COOKIE_MAX                   = 0x10
-	TCP_COOKIE_MIN                   = 0x8
-	TCP_COOKIE_OUT_NEVER             = 0x2
-	TCP_COOKIE_PAIR_SIZE             = 0x20
-	TCP_COOKIE_TRANSACTIONS          = 0xf
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_FASTOPEN                     = 0x17
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_MSS_DEFAULT                  = 0x218
-	TCP_MSS_DESIRED                  = 0x4c4
-	TCP_NODELAY                      = 0x1
-	TCP_QUEUE_SEQ                    = 0x15
-	TCP_QUICKACK                     = 0xc
-	TCP_REPAIR                       = 0x13
-	TCP_REPAIR_OPTIONS               = 0x16
-	TCP_REPAIR_QUEUE                 = 0x14
-	TCP_SYNCNT                       = 0x7
-	TCP_S_DATA_IN                    = 0x4
-	TCP_S_DATA_OUT                   = 0x8
-	TCP_THIN_DUPACK                  = 0x11
-	TCP_THIN_LINEAR_TIMEOUTS         = 0x10
-	TCP_TIMESTAMP                    = 0x18
-	TCP_USER_TIMEOUT                 = 0x12
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x5410
-	TCSBRK                           = 0x5405
-	TCXONC                           = 0x5406
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x80047478
-	TIOCEXCL                         = 0x740d
-	TIOCGDEV                         = 0x40045432
-	TIOCGETD                         = 0x7400
-	TIOCGETP                         = 0x7408
-	TIOCGEXCL                        = 0x40045440
-	TIOCGICOUNT                      = 0x5492
-	TIOCGLCKTRMIOS                   = 0x548b
-	TIOCGLTC                         = 0x7474
-	TIOCGPGRP                        = 0x40047477
-	TIOCGPKT                         = 0x40045438
-	TIOCGPTLCK                       = 0x40045439
-	TIOCGPTN                         = 0x40045430
-	TIOCGRS485                       = 0x4020542e
-	TIOCGSERIAL                      = 0x5484
-	TIOCGSID                         = 0x7416
-	TIOCGSOFTCAR                     = 0x5481
-	TIOCGWINSZ                       = 0x40087468
-	TIOCINQ                          = 0x467f
-	TIOCLINUX                        = 0x5483
-	TIOCMBIC                         = 0x741c
-	TIOCMBIS                         = 0x741b
-	TIOCMGET                         = 0x741d
-	TIOCMIWAIT                       = 0x5491
-	TIOCMSET                         = 0x741a
-	TIOCM_CAR                        = 0x100
-	TIOCM_CD                         = 0x100
-	TIOCM_CTS                        = 0x40
-	TIOCM_DSR                        = 0x400
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_RI                         = 0x200
-	TIOCM_RNG                        = 0x200
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x20
-	TIOCM_ST                         = 0x10
-	TIOCNOTTY                        = 0x5471
-	TIOCNXCL                         = 0x740e
-	TIOCOUTQ                         = 0x7472
-	TIOCPKT                          = 0x5470
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x5480
-	TIOCSERCONFIG                    = 0x5488
-	TIOCSERGETLSR                    = 0x548e
-	TIOCSERGETMULTI                  = 0x548f
-	TIOCSERGSTRUCT                   = 0x548d
-	TIOCSERGWILD                     = 0x5489
-	TIOCSERSETMULTI                  = 0x5490
-	TIOCSERSWILD                     = 0x548a
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETD                         = 0x7401
-	TIOCSETN                         = 0x740a
-	TIOCSETP                         = 0x7409
-	TIOCSIG                          = 0x80045436
-	TIOCSLCKTRMIOS                   = 0x548c
-	TIOCSLTC                         = 0x7475
-	TIOCSPGRP                        = 0x80047476
-	TIOCSPTLCK                       = 0x80045431
-	TIOCSRS485                       = 0xc020542f
-	TIOCSSERIAL                      = 0x5485
-	TIOCSSOFTCAR                     = 0x5482
-	TIOCSTI                          = 0x5472
-	TIOCSWINSZ                       = 0x80087467
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x8000
-	TUNATTACHFILTER                  = 0x801054d5
-	TUNDETACHFILTER                  = 0x801054d6
-	TUNGETFEATURES                   = 0x400454cf
-	TUNGETFILTER                     = 0x401054db
-	TUNGETIFF                        = 0x400454d2
-	TUNGETSNDBUF                     = 0x400454d3
-	TUNGETVNETBE                     = 0x400454df
-	TUNGETVNETHDRSZ                  = 0x400454d7
-	TUNGETVNETLE                     = 0x400454dd
-	TUNSETDEBUG                      = 0x800454c9
-	TUNSETGROUP                      = 0x800454ce
-	TUNSETIFF                        = 0x800454ca
-	TUNSETIFINDEX                    = 0x800454da
-	TUNSETLINK                       = 0x800454cd
-	TUNSETNOCSUM                     = 0x800454c8
-	TUNSETOFFLOAD                    = 0x800454d0
-	TUNSETOWNER                      = 0x800454cc
-	TUNSETPERSIST                    = 0x800454cb
-	TUNSETQUEUE                      = 0x800454d9
-	TUNSETSNDBUF                     = 0x800454d4
-	TUNSETTXFILTER                   = 0x800454d1
-	TUNSETVNETBE                     = 0x800454de
-	TUNSETVNETHDRSZ                  = 0x800454d8
-	TUNSETVNETLE                     = 0x800454dc
-	VDISCARD                         = 0xd
-	VEOF                             = 0x10
-	VEOL                             = 0x11
-	VEOL2                            = 0x6
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x4
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xc
-	VSTART                           = 0x8
-	VSTOP                            = 0x9
-	VSUSP                            = 0xa
-	VSWTC                            = 0x7
-	VSWTCH                           = 0x7
-	VT0                              = 0x0
-	VT1                              = 0x4000
-	VTDLY                            = 0x4000
-	VTIME                            = 0x5
-	VWERASE                          = 0xe
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x7d)
-	EADDRNOTAVAIL   = syscall.Errno(0x7e)
-	EADV            = syscall.Errno(0x44)
-	EAFNOSUPPORT    = syscall.Errno(0x7c)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x95)
-	EBADE           = syscall.Errno(0x32)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x51)
-	EBADMSG         = syscall.Errno(0x4d)
-	EBADR           = syscall.Errno(0x33)
-	EBADRQC         = syscall.Errno(0x36)
-	EBADSLT         = syscall.Errno(0x37)
-	EBFONT          = syscall.Errno(0x3b)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x9e)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x25)
-	ECOMM           = syscall.Errno(0x46)
-	ECONNABORTED    = syscall.Errno(0x82)
-	ECONNREFUSED    = syscall.Errno(0x92)
-	ECONNRESET      = syscall.Errno(0x83)
-	EDEADLK         = syscall.Errno(0x2d)
-	EDEADLOCK       = syscall.Errno(0x38)
-	EDESTADDRREQ    = syscall.Errno(0x60)
-	EDOM            = syscall.Errno(0x21)
-	EDOTDOT         = syscall.Errno(0x49)
-	EDQUOT          = syscall.Errno(0x46d)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x93)
-	EHOSTUNREACH    = syscall.Errno(0x94)
-	EHWPOISON       = syscall.Errno(0xa8)
-	EIDRM           = syscall.Errno(0x24)
-	EILSEQ          = syscall.Errno(0x58)
-	EINIT           = syscall.Errno(0x8d)
-	EINPROGRESS     = syscall.Errno(0x96)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x85)
-	EISDIR          = syscall.Errno(0x15)
-	EISNAM          = syscall.Errno(0x8b)
-	EKEYEXPIRED     = syscall.Errno(0xa2)
-	EKEYREJECTED    = syscall.Errno(0xa4)
-	EKEYREVOKED     = syscall.Errno(0xa3)
-	EL2HLT          = syscall.Errno(0x2c)
-	EL2NSYNC        = syscall.Errno(0x26)
-	EL3HLT          = syscall.Errno(0x27)
-	EL3RST          = syscall.Errno(0x28)
-	ELIBACC         = syscall.Errno(0x53)
-	ELIBBAD         = syscall.Errno(0x54)
-	ELIBEXEC        = syscall.Errno(0x57)
-	ELIBMAX         = syscall.Errno(0x56)
-	ELIBSCN         = syscall.Errno(0x55)
-	ELNRNG          = syscall.Errno(0x29)
-	ELOOP           = syscall.Errno(0x5a)
-	EMEDIUMTYPE     = syscall.Errno(0xa0)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x61)
-	EMULTIHOP       = syscall.Errno(0x4a)
-	ENAMETOOLONG    = syscall.Errno(0x4e)
-	ENAVAIL         = syscall.Errno(0x8a)
-	ENETDOWN        = syscall.Errno(0x7f)
-	ENETRESET       = syscall.Errno(0x81)
-	ENETUNREACH     = syscall.Errno(0x80)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x35)
-	ENOBUFS         = syscall.Errno(0x84)
-	ENOCSI          = syscall.Errno(0x2b)
-	ENODATA         = syscall.Errno(0x3d)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOKEY          = syscall.Errno(0xa1)
-	ENOLCK          = syscall.Errno(0x2e)
-	ENOLINK         = syscall.Errno(0x43)
-	ENOMEDIUM       = syscall.Errno(0x9f)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x23)
-	ENONET          = syscall.Errno(0x40)
-	ENOPKG          = syscall.Errno(0x41)
-	ENOPROTOOPT     = syscall.Errno(0x63)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x3f)
-	ENOSTR          = syscall.Errno(0x3c)
-	ENOSYS          = syscall.Errno(0x59)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x86)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x5d)
-	ENOTNAM         = syscall.Errno(0x89)
-	ENOTRECOVERABLE = syscall.Errno(0xa6)
-	ENOTSOCK        = syscall.Errno(0x5f)
-	ENOTSUP         = syscall.Errno(0x7a)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x50)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x7a)
-	EOVERFLOW       = syscall.Errno(0x4f)
-	EOWNERDEAD      = syscall.Errno(0xa5)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x7b)
-	EPIPE           = syscall.Errno(0x20)
-	EPROTO          = syscall.Errno(0x47)
-	EPROTONOSUPPORT = syscall.Errno(0x78)
-	EPROTOTYPE      = syscall.Errno(0x62)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x52)
-	EREMDEV         = syscall.Errno(0x8e)
-	EREMOTE         = syscall.Errno(0x42)
-	EREMOTEIO       = syscall.Errno(0x8c)
-	ERESTART        = syscall.Errno(0x5b)
-	ERFKILL         = syscall.Errno(0xa7)
-	EROFS           = syscall.Errno(0x1e)
-	ESHUTDOWN       = syscall.Errno(0x8f)
-	ESOCKTNOSUPPORT = syscall.Errno(0x79)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x45)
-	ESTALE          = syscall.Errno(0x97)
-	ESTRPIPE        = syscall.Errno(0x5c)
-	ETIME           = syscall.Errno(0x3e)
-	ETIMEDOUT       = syscall.Errno(0x91)
-	ETOOMANYREFS    = syscall.Errno(0x90)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUCLEAN         = syscall.Errno(0x87)
-	EUNATCH         = syscall.Errno(0x2a)
-	EUSERS          = syscall.Errno(0x5e)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x34)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x12)
-	SIGCLD    = syscall.Signal(0x12)
-	SIGCONT   = syscall.Signal(0x19)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x16)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPOLL   = syscall.Signal(0x16)
-	SIGPROF   = syscall.Signal(0x1d)
-	SIGPWR    = syscall.Signal(0x13)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x17)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x18)
-	SIGTTIN   = syscall.Signal(0x1a)
-	SIGTTOU   = syscall.Signal(0x1b)
-	SIGURG    = syscall.Signal(0x15)
-	SIGUSR1   = syscall.Signal(0x10)
-	SIGUSR2   = syscall.Signal(0x11)
-	SIGVTALRM = syscall.Signal(0x1c)
-	SIGWINCH  = syscall.Signal(0x14)
-	SIGXCPU   = syscall.Signal(0x1e)
-	SIGXFSZ   = syscall.Signal(0x1f)
-)
-
-// Error table
-var errors = [...]string{
-	1:    "operation not permitted",
-	2:    "no such file or directory",
-	3:    "no such process",
-	4:    "interrupted system call",
-	5:    "input/output error",
-	6:    "no such device or address",
-	7:    "argument list too long",
-	8:    "exec format error",
-	9:    "bad file descriptor",
-	10:   "no child processes",
-	11:   "resource temporarily unavailable",
-	12:   "cannot allocate memory",
-	13:   "permission denied",
-	14:   "bad address",
-	15:   "block device required",
-	16:   "device or resource busy",
-	17:   "file exists",
-	18:   "invalid cross-device link",
-	19:   "no such device",
-	20:   "not a directory",
-	21:   "is a directory",
-	22:   "invalid argument",
-	23:   "too many open files in system",
-	24:   "too many open files",
-	25:   "inappropriate ioctl for device",
-	26:   "text file busy",
-	27:   "file too large",
-	28:   "no space left on device",
-	29:   "illegal seek",
-	30:   "read-only file system",
-	31:   "too many links",
-	32:   "broken pipe",
-	33:   "numerical argument out of domain",
-	34:   "numerical result out of range",
-	35:   "no message of desired type",
-	36:   "identifier removed",
-	37:   "channel number out of range",
-	38:   "level 2 not synchronized",
-	39:   "level 3 halted",
-	40:   "level 3 reset",
-	41:   "link number out of range",
-	42:   "protocol driver not attached",
-	43:   "no CSI structure available",
-	44:   "level 2 halted",
-	45:   "resource deadlock avoided",
-	46:   "no locks available",
-	50:   "invalid exchange",
-	51:   "invalid request descriptor",
-	52:   "exchange full",
-	53:   "no anode",
-	54:   "invalid request code",
-	55:   "invalid slot",
-	56:   "file locking deadlock error",
-	59:   "bad font file format",
-	60:   "device not a stream",
-	61:   "no data available",
-	62:   "timer expired",
-	63:   "out of streams resources",
-	64:   "machine is not on the network",
-	65:   "package not installed",
-	66:   "object is remote",
-	67:   "link has been severed",
-	68:   "advertise error",
-	69:   "srmount error",
-	70:   "communication error on send",
-	71:   "protocol error",
-	73:   "RFS specific error",
-	74:   "multihop attempted",
-	77:   "bad message",
-	78:   "file name too long",
-	79:   "value too large for defined data type",
-	80:   "name not unique on network",
-	81:   "file descriptor in bad state",
-	82:   "remote address changed",
-	83:   "can not access a needed shared library",
-	84:   "accessing a corrupted shared library",
-	85:   ".lib section in a.out corrupted",
-	86:   "attempting to link in too many shared libraries",
-	87:   "cannot exec a shared library directly",
-	88:   "invalid or incomplete multibyte or wide character",
-	89:   "function not implemented",
-	90:   "too many levels of symbolic links",
-	91:   "interrupted system call should be restarted",
-	92:   "streams pipe error",
-	93:   "directory not empty",
-	94:   "too many users",
-	95:   "socket operation on non-socket",
-	96:   "destination address required",
-	97:   "message too long",
-	98:   "protocol wrong type for socket",
-	99:   "protocol not available",
-	120:  "protocol not supported",
-	121:  "socket type not supported",
-	122:  "operation not supported",
-	123:  "protocol family not supported",
-	124:  "address family not supported by protocol",
-	125:  "address already in use",
-	126:  "cannot assign requested address",
-	127:  "network is down",
-	128:  "network is unreachable",
-	129:  "network dropped connection on reset",
-	130:  "software caused connection abort",
-	131:  "connection reset by peer",
-	132:  "no buffer space available",
-	133:  "transport endpoint is already connected",
-	134:  "transport endpoint is not connected",
-	135:  "structure needs cleaning",
-	137:  "not a XENIX named type file",
-	138:  "no XENIX semaphores available",
-	139:  "is a named type file",
-	140:  "remote I/O error",
-	141:  "unknown error 141",
-	142:  "unknown error 142",
-	143:  "cannot send after transport endpoint shutdown",
-	144:  "too many references: cannot splice",
-	145:  "connection timed out",
-	146:  "connection refused",
-	147:  "host is down",
-	148:  "no route to host",
-	149:  "operation already in progress",
-	150:  "operation now in progress",
-	151:  "stale file handle",
-	158:  "operation canceled",
-	159:  "no medium found",
-	160:  "wrong medium type",
-	161:  "required key not available",
-	162:  "key has expired",
-	163:  "key has been revoked",
-	164:  "key was rejected by service",
-	165:  "owner died",
-	166:  "state not recoverable",
-	167:  "operation not possible due to RF-kill",
-	168:  "memory page has hardware error",
-	1133: "disk quota exceeded",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "user defined signal 1",
-	17: "user defined signal 2",
-	18: "child exited",
-	19: "power failure",
-	20: "window changed",
-	21: "urgent I/O condition",
-	22: "I/O possible",
-	23: "stopped (signal)",
-	24: "stopped",
-	25: "continued",
-	26: "stopped (tty input)",
-	27: "stopped (tty output)",
-	28: "virtual timer expired",
-	29: "profiling timer expired",
-	30: "CPU time limit exceeded",
-	31: "file size limit exceeded",
-}


[67/67] [abbrv] incubator-mynewt-newtmgr git commit: newtmgr - use newtmgr repo, not newt repo.

Posted by cc...@apache.org.
newtmgr - use newtmgr repo, not newt repo.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/15498bdc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/15498bdc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/15498bdc

Branch: refs/heads/master
Commit: 15498bdcff2206a39e062527090f21269ff34983
Parents: e31a7d3
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Mar 28 15:31:40 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:37 2017 -0700

----------------------------------------------------------------------
 newtmgr/Godeps/Godeps.json                      |  80 +-
 newtmgr/cli/commands.go                         |   2 +-
 newtmgr/cli/common.go                           |  10 +-
 newtmgr/cli/config.go                           |   6 +-
 newtmgr/cli/connprofile.go                      |   2 +-
 newtmgr/cli/crash.go                            |   4 +-
 newtmgr/cli/datetime.go                         |   6 +-
 newtmgr/cli/echo.go                             |   4 +-
 newtmgr/cli/fs.go                               |   6 +-
 newtmgr/cli/image.go                            |   8 +-
 newtmgr/cli/log.go                              |   6 +-
 newtmgr/cli/mpstat.go                           |   4 +-
 newtmgr/cli/reset.go                            |   4 +-
 newtmgr/cli/run.go                              |   4 +-
 newtmgr/cli/stat.go                             |   4 +-
 newtmgr/cli/taskstat.go                         |   4 +-
 newtmgr/config/ble_config.go                    |   6 +-
 newtmgr/config/serial_config.go                 |   4 +-
 newtmgr/newtmgr.go                              |   6 +-
 newtmgr/nmutil/nmutil.go                        |   2 +-
 .../newt/nmxact/bledefs/bledefs.go              | 270 ------
 .../newt/nmxact/nmble/ble_act.go                | 363 --------
 .../newt/nmxact/nmble/ble_fsm.go                | 766 -----------------
 .../newt/nmxact/nmble/ble_oic_sesn.go           | 198 -----
 .../newt/nmxact/nmble/ble_plain_sesn.go         | 186 -----
 .../newt/nmxact/nmble/ble_proto.go              | 829 -------------------
 .../newt/nmxact/nmble/ble_util.go               | 174 ----
 .../newt/nmxact/nmble/ble_xport.go              | 319 -------
 .../newt/nmxact/nmble/dispatch.go               | 297 -------
 .../mynewt.apache.org/newt/nmxact/nmp/config.go |  80 --
 .../mynewt.apache.org/newt/nmxact/nmp/crash.go  |  46 -
 .../newt/nmxact/nmp/datetime.go                 |  78 --
 .../mynewt.apache.org/newt/nmxact/nmp/decode.go | 121 ---
 .../mynewt.apache.org/newt/nmxact/nmp/defs.go   |  88 --
 .../newt/nmxact/nmp/dispatch.go                 | 167 ----
 .../mynewt.apache.org/newt/nmxact/nmp/echo.go   |  47 --
 .../mynewt.apache.org/newt/nmxact/nmp/frag.go   |  61 --
 .../mynewt.apache.org/newt/nmxact/nmp/fs.go     |  86 --
 .../mynewt.apache.org/newt/nmxact/nmp/image.go  | 215 -----
 .../mynewt.apache.org/newt/nmxact/nmp/log.go    | 260 ------
 .../mynewt.apache.org/newt/nmxact/nmp/mpstat.go |  46 -
 .../mynewt.apache.org/newt/nmxact/nmp/nmp.go    | 165 ----
 .../mynewt.apache.org/newt/nmxact/nmp/reset.go  |  44 -
 .../mynewt.apache.org/newt/nmxact/nmp/run.go    |  79 --
 .../mynewt.apache.org/newt/nmxact/nmp/stat.go   |  81 --
 .../newt/nmxact/nmp/taskstat.go                 |  46 -
 .../newt/nmxact/nmserial/packet.go              |  40 -
 .../newt/nmxact/nmserial/serial_plain_sesn.go   | 137 ---
 .../newt/nmxact/nmserial/serial_xport.go        | 217 -----
 .../newt/nmxact/nmxutil/nmxerr.go               | 160 ----
 .../newt/nmxact/nmxutil/nmxutil.go              |  25 -
 .../newt/nmxact/omp/dispatch.go                 |  66 --
 .../mynewt.apache.org/newt/nmxact/omp/frag.go   |  47 --
 .../mynewt.apache.org/newt/nmxact/omp/omp.go    | 125 ---
 .../mynewt.apache.org/newt/nmxact/sesn/sesn.go  |  79 --
 .../newt/nmxact/sesn/sesn_cfg.go                |  65 --
 .../mynewt.apache.org/newt/nmxact/xact/cmd.go   |  65 --
 .../newt/nmxact/xact/config.go                  |  88 --
 .../mynewt.apache.org/newt/nmxact/xact/crash.go |  87 --
 .../newt/nmxact/xact/datetime.go                |  84 --
 .../mynewt.apache.org/newt/nmxact/xact/echo.go  |  42 -
 .../mynewt.apache.org/newt/nmxact/xact/fs.go    | 178 ----
 .../mynewt.apache.org/newt/nmxact/xact/image.go | 332 --------
 .../mynewt.apache.org/newt/nmxact/xact/log.go   | 202 -----
 .../newt/nmxact/xact/mpstat.go                  |  40 -
 .../mynewt.apache.org/newt/nmxact/xact/reset.go |  41 -
 .../mynewt.apache.org/newt/nmxact/xact/run.go   |  86 --
 .../mynewt.apache.org/newt/nmxact/xact/stat.go  |  84 --
 .../newt/nmxact/xact/taskstat.go                |  40 -
 .../mynewt.apache.org/newt/nmxact/xact/xact.go  |  47 --
 .../newt/nmxact/xport/xport.go                  |  15 -
 .../newtmgr/nmxact/bledefs/bledefs.go           | 270 ++++++
 .../newtmgr/nmxact/nmble/ble_act.go             | 363 ++++++++
 .../newtmgr/nmxact/nmble/ble_fsm.go             | 766 +++++++++++++++++
 .../newtmgr/nmxact/nmble/ble_oic_sesn.go        | 198 +++++
 .../newtmgr/nmxact/nmble/ble_plain_sesn.go      | 186 +++++
 .../newtmgr/nmxact/nmble/ble_proto.go           | 829 +++++++++++++++++++
 .../newtmgr/nmxact/nmble/ble_util.go            | 174 ++++
 .../newtmgr/nmxact/nmble/ble_xport.go           | 319 +++++++
 .../newtmgr/nmxact/nmble/dispatch.go            | 297 +++++++
 .../newtmgr/nmxact/nmp/config.go                |  80 ++
 .../newtmgr/nmxact/nmp/crash.go                 |  46 +
 .../newtmgr/nmxact/nmp/datetime.go              |  78 ++
 .../newtmgr/nmxact/nmp/decode.go                | 121 +++
 .../newtmgr/nmxact/nmp/defs.go                  |  88 ++
 .../newtmgr/nmxact/nmp/dispatch.go              | 167 ++++
 .../newtmgr/nmxact/nmp/echo.go                  |  47 ++
 .../newtmgr/nmxact/nmp/frag.go                  |  61 ++
 .../mynewt.apache.org/newtmgr/nmxact/nmp/fs.go  |  86 ++
 .../newtmgr/nmxact/nmp/image.go                 | 215 +++++
 .../mynewt.apache.org/newtmgr/nmxact/nmp/log.go | 260 ++++++
 .../newtmgr/nmxact/nmp/mpstat.go                |  46 +
 .../mynewt.apache.org/newtmgr/nmxact/nmp/nmp.go | 165 ++++
 .../newtmgr/nmxact/nmp/reset.go                 |  44 +
 .../mynewt.apache.org/newtmgr/nmxact/nmp/run.go |  79 ++
 .../newtmgr/nmxact/nmp/stat.go                  |  81 ++
 .../newtmgr/nmxact/nmp/taskstat.go              |  46 +
 .../newtmgr/nmxact/nmserial/packet.go           |  40 +
 .../nmxact/nmserial/serial_plain_sesn.go        | 137 +++
 .../newtmgr/nmxact/nmserial/serial_xport.go     | 217 +++++
 .../newtmgr/nmxact/nmxutil/nmxerr.go            | 160 ++++
 .../newtmgr/nmxact/nmxutil/nmxutil.go           |  25 +
 .../newtmgr/nmxact/omp/dispatch.go              |  66 ++
 .../newtmgr/nmxact/omp/frag.go                  |  47 ++
 .../mynewt.apache.org/newtmgr/nmxact/omp/omp.go | 125 +++
 .../newtmgr/nmxact/sesn/sesn.go                 |  79 ++
 .../newtmgr/nmxact/sesn/sesn_cfg.go             |  65 ++
 .../newtmgr/nmxact/xact/cmd.go                  |  65 ++
 .../newtmgr/nmxact/xact/config.go               |  88 ++
 .../newtmgr/nmxact/xact/crash.go                |  87 ++
 .../newtmgr/nmxact/xact/datetime.go             |  84 ++
 .../newtmgr/nmxact/xact/echo.go                 |  42 +
 .../mynewt.apache.org/newtmgr/nmxact/xact/fs.go | 178 ++++
 .../newtmgr/nmxact/xact/image.go                | 332 ++++++++
 .../newtmgr/nmxact/xact/log.go                  | 202 +++++
 .../newtmgr/nmxact/xact/mpstat.go               |  40 +
 .../newtmgr/nmxact/xact/reset.go                |  41 +
 .../newtmgr/nmxact/xact/run.go                  |  86 ++
 .../newtmgr/nmxact/xact/stat.go                 |  84 ++
 .../newtmgr/nmxact/xact/taskstat.go             |  40 +
 .../newtmgr/nmxact/xact/xact.go                 |  47 ++
 .../newtmgr/nmxact/xport/xport.go               |  15 +
 nmxact/example/ble_plain/ble_plain.go           |   8 +-
 nmxact/example/serial_plain/serial_plain.go     |   6 +-
 nmxact/nmble/ble_act.go                         |   2 +-
 nmxact/nmble/ble_fsm.go                         |   8 +-
 nmxact/nmble/ble_oic_sesn.go                    |   8 +-
 nmxact/nmble/ble_plain_sesn.go                  |   6 +-
 nmxact/nmble/ble_proto.go                       |   2 +-
 nmxact/nmble/ble_util.go                        |   4 +-
 nmxact/nmble/ble_xport.go                       |   4 +-
 nmxact/nmp/nmp.go                               |   2 +-
 nmxact/nmserial/serial_plain_sesn.go            |   6 +-
 nmxact/nmserial/serial_xport.go                 |   4 +-
 nmxact/omp/dispatch.go                          |   2 +-
 nmxact/omp/omp.go                               |   2 +-
 nmxact/sesn/sesn.go                             |   4 +-
 nmxact/sesn/sesn_cfg.go                         |   2 +-
 nmxact/xact/cmd.go                              |   2 +-
 nmxact/xact/config.go                           |   4 +-
 nmxact/xact/crash.go                            |   4 +-
 nmxact/xact/datetime.go                         |   4 +-
 nmxact/xact/echo.go                             |   4 +-
 nmxact/xact/fs.go                               |   4 +-
 nmxact/xact/image.go                            |   4 +-
 nmxact/xact/log.go                              |   4 +-
 nmxact/xact/mpstat.go                           |   4 +-
 nmxact/xact/reset.go                            |   4 +-
 nmxact/xact/run.go                              |   4 +-
 nmxact/xact/stat.go                             |   4 +-
 nmxact/xact/taskstat.go                         |   4 +-
 nmxact/xact/xact.go                             |   4 +-
 nmxact/xport/xport.go                           |   2 +-
 153 files changed, 7653 insertions(+), 7653 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/Godeps/Godeps.json
----------------------------------------------------------------------
diff --git a/newtmgr/Godeps/Godeps.json b/newtmgr/Godeps/Godeps.json
index 48ffcc0..fbbd835 100644
--- a/newtmgr/Godeps/Godeps.json
+++ b/newtmgr/Godeps/Godeps.json
@@ -1,5 +1,5 @@
 {
-	"ImportPath": "mynewt.apache.org/newt/newtmgr",
+	"ImportPath": "mynewt.apache.org/newtmgr/newtmgr",
 	"GoVersion": "go1.7",
 	"GodepVersion": "v74",
 	"Deps": [
@@ -75,69 +75,69 @@
 			"Rev": "629574ca2a5df945712d3079857300b5e4da0236"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/nmxact/bledefs",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newt/util",
+			"Comment": "mynewt_1_0_0_b1_tag-208-g150c666",
+			"Rev": "150c6666bab17ce5a5805c1eda8a223d88cd109e"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/nmxact/nmble",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newt/util/unixchild",
+			"Comment": "mynewt_1_0_0_b1_tag-208-g150c666",
+			"Rev": "150c6666bab17ce5a5805c1eda8a223d88cd109e"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/nmxact/nmp",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newt/viper",
+			"Comment": "mynewt_1_0_0_b1_tag-208-g150c666",
+			"Rev": "150c6666bab17ce5a5805c1eda8a223d88cd109e"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/nmxact/nmserial",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newt/yaml",
+			"Comment": "mynewt_1_0_0_b1_tag-208-g150c666",
+			"Rev": "150c6666bab17ce5a5805c1eda8a223d88cd109e"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/nmxact/nmxutil",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/bledefs",
+			"Comment": "mynewt_0_9_0_tag-446-gabaa035",
+			"Rev": "abaa03594e726b6d2b749bc405f4006eb4820c1b"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/nmxact/omp",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmble",
+			"Comment": "mynewt_0_9_0_tag-446-gabaa035",
+			"Rev": "abaa03594e726b6d2b749bc405f4006eb4820c1b"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/nmxact/sesn",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmp",
+			"Comment": "mynewt_0_9_0_tag-446-gabaa035",
+			"Rev": "abaa03594e726b6d2b749bc405f4006eb4820c1b"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/nmxact/xact",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmserial",
+			"Comment": "mynewt_0_9_0_tag-446-gabaa035",
+			"Rev": "abaa03594e726b6d2b749bc405f4006eb4820c1b"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/nmxact/xport",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/nmxutil",
+			"Comment": "mynewt_0_9_0_tag-446-gabaa035",
+			"Rev": "abaa03594e726b6d2b749bc405f4006eb4820c1b"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/util",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/omp",
+			"Comment": "mynewt_0_9_0_tag-446-gabaa035",
+			"Rev": "abaa03594e726b6d2b749bc405f4006eb4820c1b"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/util/unixchild",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/sesn",
+			"Comment": "mynewt_0_9_0_tag-446-gabaa035",
+			"Rev": "abaa03594e726b6d2b749bc405f4006eb4820c1b"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/viper",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/xact",
+			"Comment": "mynewt_0_9_0_tag-446-gabaa035",
+			"Rev": "abaa03594e726b6d2b749bc405f4006eb4820c1b"
 		},
 		{
-			"ImportPath": "mynewt.apache.org/newt/yaml",
-			"Comment": "mynewt_1_0_0_b1_tag-209-gba7af48",
-			"Rev": "ba7af483399e5b3de83f3995d6f092546b199751"
+			"ImportPath": "mynewt.apache.org/newtmgr/nmxact/xport",
+			"Comment": "mynewt_0_9_0_tag-446-gabaa035",
+			"Rev": "abaa03594e726b6d2b749bc405f4006eb4820c1b"
 		}
 	]
 }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/commands.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/commands.go b/newtmgr/cli/commands.go
index 91828e7..d0ab758 100644
--- a/newtmgr/cli/commands.go
+++ b/newtmgr/cli/commands.go
@@ -23,7 +23,7 @@ import (
 	log "github.com/Sirupsen/logrus"
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/common.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/common.go b/newtmgr/cli/common.go
index 07703e9..da3c348 100644
--- a/newtmgr/cli/common.go
+++ b/newtmgr/cli/common.go
@@ -22,11 +22,11 @@ package cli
 import (
 	"fmt"
 
-	"mynewt.apache.org/newt/newtmgr/config"
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/nmserial"
-	"mynewt.apache.org/newt/nmxact/sesn"
-	"mynewt.apache.org/newt/nmxact/xport"
+	"mynewt.apache.org/newtmgr/newtmgr/config"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/nmserial"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/xport"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/config.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/config.go b/newtmgr/cli/config.go
index cf9ba1e..1287557 100644
--- a/newtmgr/cli/config.go
+++ b/newtmgr/cli/config.go
@@ -24,9 +24,9 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/sesn"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/connprofile.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/connprofile.go b/newtmgr/cli/connprofile.go
index 33de3bd..5558156 100644
--- a/newtmgr/cli/connprofile.go
+++ b/newtmgr/cli/connprofile.go
@@ -23,7 +23,7 @@ import (
 	"fmt"
 	"strings"
 
-	"mynewt.apache.org/newt/newtmgr/config"
+	"mynewt.apache.org/newtmgr/newtmgr/config"
 	"mynewt.apache.org/newt/util"
 
 	"github.com/spf13/cobra"

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/crash.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/crash.go b/newtmgr/cli/crash.go
index b1abade..c32c135 100644
--- a/newtmgr/cli/crash.go
+++ b/newtmgr/cli/crash.go
@@ -25,8 +25,8 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/datetime.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/datetime.go b/newtmgr/cli/datetime.go
index ce1336f..67598d3 100644
--- a/newtmgr/cli/datetime.go
+++ b/newtmgr/cli/datetime.go
@@ -24,9 +24,9 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/sesn"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/echo.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/echo.go b/newtmgr/cli/echo.go
index 6859cac..13bfc9d 100644
--- a/newtmgr/cli/echo.go
+++ b/newtmgr/cli/echo.go
@@ -24,8 +24,8 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/fs.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/fs.go b/newtmgr/cli/fs.go
index 3ea6652..a866e08 100644
--- a/newtmgr/cli/fs.go
+++ b/newtmgr/cli/fs.go
@@ -26,9 +26,9 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/image.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/image.go b/newtmgr/cli/image.go
index 65f7af5..78739c8 100644
--- a/newtmgr/cli/image.go
+++ b/newtmgr/cli/image.go
@@ -28,10 +28,10 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/core"
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/core"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/log.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/log.go b/newtmgr/cli/log.go
index cba1e5b..e3a2586 100644
--- a/newtmgr/cli/log.go
+++ b/newtmgr/cli/log.go
@@ -26,9 +26,9 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/mpstat.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/mpstat.go b/newtmgr/cli/mpstat.go
index 65dffff..3a5e9e2 100644
--- a/newtmgr/cli/mpstat.go
+++ b/newtmgr/cli/mpstat.go
@@ -25,8 +25,8 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/reset.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/reset.go b/newtmgr/cli/reset.go
index 6329354..85f3952 100644
--- a/newtmgr/cli/reset.go
+++ b/newtmgr/cli/reset.go
@@ -24,8 +24,8 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/run.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/run.go b/newtmgr/cli/run.go
index 5550d53..801d000 100644
--- a/newtmgr/cli/run.go
+++ b/newtmgr/cli/run.go
@@ -25,8 +25,8 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/stat.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/stat.go b/newtmgr/cli/stat.go
index a6b9c82..7615278 100644
--- a/newtmgr/cli/stat.go
+++ b/newtmgr/cli/stat.go
@@ -25,8 +25,8 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/cli/taskstat.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/taskstat.go b/newtmgr/cli/taskstat.go
index bfb82d4..7102a49 100644
--- a/newtmgr/cli/taskstat.go
+++ b/newtmgr/cli/taskstat.go
@@ -25,8 +25,8 @@ import (
 
 	"github.com/spf13/cobra"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/xact"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/xact"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/config/ble_config.go
----------------------------------------------------------------------
diff --git a/newtmgr/config/ble_config.go b/newtmgr/config/ble_config.go
index 77e98a3..d8fd643 100644
--- a/newtmgr/config/ble_config.go
+++ b/newtmgr/config/ble_config.go
@@ -24,9 +24,9 @@ import (
 	"strings"
 	"time"
 
-	"mynewt.apache.org/newt/nmxact/bledefs"
-	"mynewt.apache.org/newt/nmxact/nmble"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/bledefs"
+	"mynewt.apache.org/newtmgr/nmxact/nmble"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/config/serial_config.go
----------------------------------------------------------------------
diff --git a/newtmgr/config/serial_config.go b/newtmgr/config/serial_config.go
index 8b03116..1b6af08 100644
--- a/newtmgr/config/serial_config.go
+++ b/newtmgr/config/serial_config.go
@@ -5,8 +5,8 @@ import (
 	"strconv"
 	"strings"
 
-	"mynewt.apache.org/newt/newtmgr/nmutil"
-	"mynewt.apache.org/newt/nmxact/nmserial"
+	"mynewt.apache.org/newtmgr/newtmgr/nmutil"
+	"mynewt.apache.org/newtmgr/nmxact/nmserial"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/newtmgr.go
----------------------------------------------------------------------
diff --git a/newtmgr/newtmgr.go b/newtmgr/newtmgr.go
index 4a841dc..0307020 100644
--- a/newtmgr/newtmgr.go
+++ b/newtmgr/newtmgr.go
@@ -25,9 +25,9 @@ import (
 	"os/signal"
 	"syscall"
 
-	"mynewt.apache.org/newt/newtmgr/cli"
-	"mynewt.apache.org/newt/newtmgr/config"
-	"mynewt.apache.org/newt/nmxact/nmserial"
+	"mynewt.apache.org/newtmgr/newtmgr/cli"
+	"mynewt.apache.org/newtmgr/newtmgr/config"
+	"mynewt.apache.org/newtmgr/nmxact/nmserial"
 	"mynewt.apache.org/newt/util"
 )
 

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/nmutil/nmutil.go
----------------------------------------------------------------------
diff --git a/newtmgr/nmutil/nmutil.go b/newtmgr/nmutil/nmutil.go
index 40ba7ac..aca8111 100644
--- a/newtmgr/nmutil/nmutil.go
+++ b/newtmgr/nmutil/nmutil.go
@@ -22,7 +22,7 @@ package nmutil
 import (
 	"time"
 
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 var Timeout float64

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/bledefs/bledefs.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/bledefs/bledefs.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/bledefs/bledefs.go
deleted file mode 100644
index 3bb2772..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/bledefs/bledefs.go
+++ /dev/null
@@ -1,270 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package bledefs
-
-import (
-	"bytes"
-	"encoding/json"
-	"fmt"
-	"strconv"
-	"strings"
-)
-
-const BLE_ATT_ATTR_MAX_LEN = 512
-
-type BleAddrType int
-
-const (
-	BLE_ADDR_TYPE_PUBLIC  BleAddrType = 0
-	BLE_ADDR_TYPE_RANDOM              = 1
-	BLE_ADDR_TYPE_RPA_PUB             = 2
-	BLE_ADDR_TYPE_RPA_RND             = 3
-)
-
-var BleAddrTypeStringMap = map[BleAddrType]string{
-	BLE_ADDR_TYPE_PUBLIC:  "public",
-	BLE_ADDR_TYPE_RANDOM:  "random",
-	BLE_ADDR_TYPE_RPA_PUB: "rpa_pub",
-	BLE_ADDR_TYPE_RPA_RND: "rpa_rnd",
-}
-
-func BleAddrTypeToString(addrType BleAddrType) string {
-	s := BleAddrTypeStringMap[addrType]
-	if s == "" {
-		panic(fmt.Sprintf("Invalid BleAddrType: %d", int(addrType)))
-	}
-
-	return s
-}
-
-func BleAddrTypeFromString(s string) (BleAddrType, error) {
-	for addrType, name := range BleAddrTypeStringMap {
-		if s == name {
-			return addrType, nil
-		}
-	}
-
-	return BleAddrType(0), fmt.Errorf("Invalid BleAddrType string: %s", s)
-}
-
-func (a BleAddrType) MarshalJSON() ([]byte, error) {
-	return json.Marshal(BleAddrTypeToString(a))
-}
-
-func (a *BleAddrType) UnmarshalJSON(data []byte) error {
-	var err error
-
-	var s string
-	if err := json.Unmarshal(data, &s); err != nil {
-		return err
-	}
-
-	*a, err = BleAddrTypeFromString(s)
-	return err
-}
-
-type BleAddr struct {
-	Bytes [6]byte
-}
-
-func ParseBleAddr(s string) (BleAddr, error) {
-	ba := BleAddr{}
-
-	toks := strings.Split(strings.ToLower(s), ":")
-	if len(toks) != 6 {
-		return ba, fmt.Errorf("invalid BLE addr string: %s", s)
-	}
-
-	for i, t := range toks {
-		u64, err := strconv.ParseUint(t, 16, 8)
-		if err != nil {
-			return ba, err
-		}
-		ba.Bytes[i] = byte(u64)
-	}
-
-	return ba, nil
-}
-
-func (ba *BleAddr) String() string {
-	var buf bytes.Buffer
-	buf.Grow(len(ba.Bytes) * 3)
-
-	for i, b := range ba.Bytes {
-		if i != 0 {
-			buf.WriteString(":")
-		}
-		fmt.Fprintf(&buf, "%02x", b)
-	}
-
-	return buf.String()
-}
-
-func (ba *BleAddr) MarshalJSON() ([]byte, error) {
-	return json.Marshal(ba.String())
-}
-
-func (ba *BleAddr) UnmarshalJSON(data []byte) error {
-	var s string
-	if err := json.Unmarshal(data, &s); err != nil {
-		return err
-	}
-
-	var err error
-	*ba, err = ParseBleAddr(s)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-type BleDev struct {
-	AddrType BleAddrType
-	Addr     BleAddr
-}
-
-func (bd *BleDev) String() string {
-	return fmt.Sprintf("%s,%s",
-		BleAddrTypeToString(bd.AddrType),
-		bd.Addr.String())
-}
-
-type BleScanFilterPolicy int
-
-const (
-	BLE_SCAN_FILT_NO_WL        BleScanFilterPolicy = 0
-	BLE_SCAN_FILT_USE_WL                           = 1
-	BLE_SCAN_FILT_NO_WL_INITA                      = 2
-	BLE_SCAN_FILT_USE_WL_INITA                     = 3
-)
-
-var BleScanFilterPolicyStringMap = map[BleScanFilterPolicy]string{
-	BLE_SCAN_FILT_NO_WL:        "no_wl",
-	BLE_SCAN_FILT_USE_WL:       "use_wl",
-	BLE_SCAN_FILT_NO_WL_INITA:  "no_wl_inita",
-	BLE_SCAN_FILT_USE_WL_INITA: "use_wl_inita",
-}
-
-func BleScanFilterPolicyToString(filtPolicy BleScanFilterPolicy) string {
-	s := BleScanFilterPolicyStringMap[filtPolicy]
-	if s == "" {
-		panic(fmt.Sprintf("Invalid BleScanFilterPolicy: %d", int(filtPolicy)))
-	}
-
-	return s
-}
-
-func BleScanFilterPolicyFromString(s string) (BleScanFilterPolicy, error) {
-	for filtPolicy, name := range BleScanFilterPolicyStringMap {
-		if s == name {
-			return filtPolicy, nil
-		}
-	}
-
-	return BleScanFilterPolicy(0),
-		fmt.Errorf("Invalid BleScanFilterPolicy string: %s", s)
-}
-
-func (a BleScanFilterPolicy) MarshalJSON() ([]byte, error) {
-	return json.Marshal(BleScanFilterPolicyToString(a))
-}
-
-func (a *BleScanFilterPolicy) UnmarshalJSON(data []byte) error {
-	var err error
-
-	var s string
-	if err := json.Unmarshal(data, &s); err != nil {
-		return err
-	}
-
-	*a, err = BleScanFilterPolicyFromString(s)
-	return err
-}
-
-type BleAdvEventType int
-
-const (
-	BLE_ADV_EVENT_IND           BleAdvEventType = 0
-	BLE_ADV_EVENT_DIRECT_IND_HD                 = 1
-	BLE_ADV_EVENT_SCAN_IND                      = 2
-	BLE_ADV_EVENT_NONCONN_IND                   = 3
-	BLE_ADV_EVENT_DIRECT_IND_LD                 = 4
-)
-
-var BleAdvEventTypeStringMap = map[BleAdvEventType]string{
-	BLE_ADV_EVENT_IND:           "ind",
-	BLE_ADV_EVENT_DIRECT_IND_HD: "direct_ind_hd",
-	BLE_ADV_EVENT_SCAN_IND:      "scan_ind",
-	BLE_ADV_EVENT_NONCONN_IND:   "nonconn_ind",
-	BLE_ADV_EVENT_DIRECT_IND_LD: "direct_ind_ld",
-}
-
-func BleAdvEventTypeToString(advEventType BleAdvEventType) string {
-	s := BleAdvEventTypeStringMap[advEventType]
-	if s == "" {
-		panic(fmt.Sprintf("Invalid BleAdvEventType: %d", int(advEventType)))
-	}
-
-	return s
-}
-
-func BleAdvEventTypeFromString(s string) (BleAdvEventType, error) {
-	for advEventType, name := range BleAdvEventTypeStringMap {
-		if s == name {
-			return advEventType, nil
-		}
-	}
-
-	return BleAdvEventType(0),
-		fmt.Errorf("Invalid BleAdvEventType string: %s", s)
-}
-
-func (a BleAdvEventType) MarshalJSON() ([]byte, error) {
-	return json.Marshal(BleAdvEventTypeToString(a))
-}
-
-func (a *BleAdvEventType) UnmarshalJSON(data []byte) error {
-	var err error
-
-	var s string
-	if err := json.Unmarshal(data, &s); err != nil {
-		return err
-	}
-
-	*a, err = BleAdvEventTypeFromString(s)
-	return err
-}
-
-type BleAdvReport struct {
-	// These fields are always present.
-	EventType BleAdvEventType
-	Sender    BleDev
-	Rssi      int8
-	Data      []byte
-
-	// These fields are only present if the sender included them in its
-	// advertisement.
-	Flags          uint8  // 0 if not present.
-	Name           string // "" if not present.
-	NameIsComplete bool   // false if not present.
-}
-
-type BleAdvPredicate func(adv BleAdvReport) bool

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_act.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_act.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_act.go
deleted file mode 100644
index 08c396f..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_act.go
+++ /dev/null
@@ -1,363 +0,0 @@
-package nmble
-
-import (
-	"encoding/json"
-
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-)
-
-// Blocking
-func connect(x *BleXport, connChan chan error, r *BleConnectReq) error {
-	j, err := json.Marshal(r)
-	if err != nil {
-		return err
-	}
-
-	if err := x.Tx(j); err != nil {
-		return err
-	}
-
-	err = <-connChan
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-// Blocking
-func terminate(x *BleXport, bl *BleListener, r *BleTerminateReq) error {
-	j, err := json.Marshal(r)
-	if err != nil {
-		return err
-	}
-
-	if err := x.Tx(j); err != nil {
-		return err
-	}
-
-	for {
-		select {
-		case err := <-bl.ErrChan:
-			return err
-
-		case bm := <-bl.BleChan:
-			switch msg := bm.(type) {
-			case *BleTerminateRsp:
-				bl.Acked = true
-				if msg.Status != 0 {
-					return StatusError(MSG_OP_RSP,
-						MSG_TYPE_TERMINATE,
-						msg.Status)
-				} else {
-					return nil
-				}
-
-			default:
-			}
-
-		case <-bl.AfterTimeout(x.rspTimeout):
-			return BhdTimeoutError(MSG_TYPE_TERMINATE)
-		}
-	}
-}
-
-func connCancel(x *BleXport, bl *BleListener, r *BleConnCancelReq) error {
-	j, err := json.Marshal(r)
-	if err != nil {
-		return err
-	}
-
-	if err := x.Tx(j); err != nil {
-		return err
-	}
-
-	for {
-		select {
-		case err := <-bl.ErrChan:
-			return err
-
-		case bm := <-bl.BleChan:
-			switch msg := bm.(type) {
-			case *BleConnCancelRsp:
-				bl.Acked = true
-				if msg.Status != 0 {
-					return StatusError(MSG_OP_RSP,
-						MSG_TYPE_CONN_CANCEL,
-						msg.Status)
-				} else {
-					return nil
-				}
-
-			default:
-			}
-
-		case <-bl.AfterTimeout(x.rspTimeout):
-			return BhdTimeoutError(MSG_TYPE_TERMINATE)
-		}
-	}
-}
-
-// Blocking.
-func discSvcUuid(x *BleXport, bl *BleListener, r *BleDiscSvcUuidReq) (
-	*BleSvc, error) {
-
-	j, err := json.Marshal(r)
-	if err != nil {
-		return nil, err
-	}
-
-	if err := x.Tx(j); err != nil {
-		return nil, err
-	}
-
-	var svc *BleSvc
-	for {
-		select {
-		case err := <-bl.ErrChan:
-			return nil, err
-
-		case bm := <-bl.BleChan:
-			switch msg := bm.(type) {
-			case *BleDiscSvcUuidRsp:
-				bl.Acked = true
-				if msg.Status != 0 {
-					return nil, StatusError(MSG_OP_RSP,
-						MSG_TYPE_DISC_SVC_UUID,
-						msg.Status)
-				}
-
-			case *BleDiscSvcEvt:
-				switch msg.Status {
-				case 0:
-					svc = &msg.Svc
-				case ERR_CODE_EDONE:
-					if svc == nil {
-						return nil, nmxutil.FmtBleHostError(
-							msg.Status,
-							"Peer doesn't support required service: %s",
-							r.Uuid.String())
-					}
-					return svc, nil
-				default:
-					return nil, StatusError(MSG_OP_EVT,
-						MSG_TYPE_DISC_SVC_EVT,
-						msg.Status)
-				}
-
-			default:
-			}
-
-		case <-bl.AfterTimeout(x.rspTimeout):
-			return nil, BhdTimeoutError(MSG_TYPE_DISC_SVC_UUID)
-		}
-	}
-}
-
-// Blocking.
-func discAllChrs(x *BleXport, bl *BleListener, r *BleDiscAllChrsReq) (
-	[]*BleChr, error) {
-
-	j, err := json.Marshal(r)
-	if err != nil {
-		return nil, err
-	}
-
-	if err := x.Tx(j); err != nil {
-		return nil, err
-	}
-
-	chrs := []*BleChr{}
-	for {
-		select {
-		case err := <-bl.ErrChan:
-			return nil, err
-
-		case bm := <-bl.BleChan:
-			switch msg := bm.(type) {
-			case *BleDiscAllChrsRsp:
-				bl.Acked = true
-				if msg.Status != 0 {
-					return nil, StatusError(MSG_OP_RSP,
-						MSG_TYPE_DISC_ALL_CHRS,
-						msg.Status)
-				}
-
-			case *BleDiscChrEvt:
-				switch msg.Status {
-				case 0:
-					chrs = append(chrs, &msg.Chr)
-				case ERR_CODE_EDONE:
-					return chrs, nil
-				default:
-					return nil, StatusError(MSG_OP_EVT,
-						MSG_TYPE_DISC_CHR_EVT,
-						msg.Status)
-				}
-
-			default:
-			}
-
-		case <-bl.AfterTimeout(x.rspTimeout):
-			return nil, BhdTimeoutError(MSG_TYPE_DISC_ALL_CHRS)
-		}
-	}
-}
-
-// Blocking.
-func writeCmd(x *BleXport, bl *BleListener, r *BleWriteCmdReq) error {
-	j, err := json.Marshal(r)
-	if err != nil {
-		return err
-	}
-
-	if err := x.Tx(j); err != nil {
-		return err
-	}
-
-	for {
-		select {
-		case err := <-bl.ErrChan:
-			return err
-
-		case bm := <-bl.BleChan:
-			switch msg := bm.(type) {
-			case *BleWriteCmdRsp:
-				bl.Acked = true
-				if msg.Status != 0 {
-					return StatusError(MSG_OP_RSP,
-						MSG_TYPE_WRITE_CMD,
-						msg.Status)
-				} else {
-					return nil
-				}
-
-			default:
-			}
-
-		case <-bl.AfterTimeout(x.rspTimeout):
-			return BhdTimeoutError(MSG_TYPE_WRITE_CMD)
-		}
-	}
-}
-
-// Blocking.
-func exchangeMtu(x *BleXport, bl *BleListener, r *BleExchangeMtuReq) (
-	int, error) {
-
-	j, err := json.Marshal(r)
-	if err != nil {
-		return 0, err
-	}
-
-	if err := x.Tx(j); err != nil {
-		return 0, err
-	}
-
-	for {
-		select {
-		case err := <-bl.ErrChan:
-			return 0, err
-
-		case bm := <-bl.BleChan:
-			switch msg := bm.(type) {
-			case *BleExchangeMtuRsp:
-				bl.Acked = true
-				if msg.Status != 0 {
-					return 0, StatusError(MSG_OP_RSP,
-						MSG_TYPE_EXCHANGE_MTU,
-						msg.Status)
-				}
-
-			case *BleMtuChangeEvt:
-				if msg.Status != 0 {
-					return 0, StatusError(MSG_OP_EVT,
-						MSG_TYPE_MTU_CHANGE_EVT,
-						msg.Status)
-				} else {
-					return msg.Mtu, nil
-				}
-
-			default:
-			}
-
-		case <-bl.AfterTimeout(x.rspTimeout):
-			return 0, BhdTimeoutError(MSG_TYPE_EXCHANGE_MTU)
-		}
-	}
-}
-
-type scanFn func(evt *BleScanEvt)
-
-func scan(x *BleXport, bl *BleListener, r *BleScanReq,
-	abortChan chan struct{}, scanCb scanFn) error {
-
-	j, err := json.Marshal(r)
-	if err != nil {
-		return err
-	}
-
-	if err := x.Tx(j); err != nil {
-		return err
-	}
-
-	for {
-		select {
-		case err := <-bl.ErrChan:
-			return err
-
-		case bm := <-bl.BleChan:
-			switch msg := bm.(type) {
-			case *BleScanRsp:
-				bl.Acked = true
-				if msg.Status != 0 {
-					return StatusError(MSG_OP_RSP, MSG_TYPE_SCAN, msg.Status)
-				}
-
-			case *BleScanEvt:
-				scanCb(msg)
-
-			default:
-			}
-
-		case <-bl.AfterTimeout(x.rspTimeout):
-			return BhdTimeoutError(MSG_TYPE_EXCHANGE_MTU)
-
-		case <-abortChan:
-			return nil
-		}
-	}
-}
-
-func scanCancel(x *BleXport, bl *BleListener, r *BleScanCancelReq) error {
-	j, err := json.Marshal(r)
-	if err != nil {
-		return err
-	}
-
-	if err := x.Tx(j); err != nil {
-		return err
-	}
-
-	for {
-		select {
-		case err := <-bl.ErrChan:
-			return err
-
-		case bm := <-bl.BleChan:
-			switch msg := bm.(type) {
-			case *BleScanCancelRsp:
-				bl.Acked = true
-				if msg.Status != 0 {
-					return StatusError(MSG_OP_RSP, MSG_TYPE_SCAN, msg.Status)
-				}
-				return nil
-
-			default:
-			}
-
-		case <-bl.AfterTimeout(x.rspTimeout):
-			return BhdTimeoutError(MSG_TYPE_EXCHANGE_MTU)
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
deleted file mode 100644
index daa930b..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_fsm.go
+++ /dev/null
@@ -1,766 +0,0 @@
-package nmble
-
-import (
-	"encoding/hex"
-	"fmt"
-	"sync"
-	"time"
-
-	log "github.com/Sirupsen/logrus"
-
-	. "mynewt.apache.org/newt/nmxact/bledefs"
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-type BleSesnState int32
-
-const DFLT_ATT_MTU = 23
-
-const (
-	SESN_STATE_UNCONNECTED     BleSesnState = 0
-	SESN_STATE_SCANNING                     = 1
-	SESN_STATE_CONNECTING                   = 2
-	SESN_STATE_CONNECTED                    = 3
-	SESN_STATE_EXCHANGING_MTU               = 4
-	SESN_STATE_EXCHANGED_MTU                = 5
-	SESN_STATE_DISCOVERING_SVC              = 6
-	SESN_STATE_DISCOVERED_SVC               = 7
-	SESN_STATE_DISCOVERING_CHR              = 8
-	SESN_STATE_DISCOVERED_CHR               = 9
-	SESN_STATE_TERMINATING                  = 10
-	SESN_STATE_CONN_CANCELLING              = 11
-)
-
-type BleRxNmpFn func(data []byte)
-type BleDisconnectFn func(peer BleDev, err error)
-
-type BleFsmParams struct {
-	Bx           *BleXport
-	OwnAddrType  BleAddrType
-	PeerSpec     sesn.BlePeerSpec
-	SvcUuid      BleUuid
-	ReqChrUuid   BleUuid
-	RspChrUuid   BleUuid
-	RxNmpCb      BleRxNmpFn
-	DisconnectCb BleDisconnectFn
-}
-
-type BleFsm struct {
-	bx           *BleXport
-	ownAddrType  BleAddrType
-	peerSpec     sesn.BlePeerSpec
-	peerDev      *BleDev
-	svcUuid      BleUuid
-	reqChrUuid   BleUuid
-	rspChrUuid   BleUuid
-	rxNmpCb      BleRxNmpFn
-	disconnectCb BleDisconnectFn
-
-	connHandle int
-	nmpSvc     *BleSvc
-	nmpReqChr  *BleChr
-	nmpRspChr  *BleChr
-	attMtu     int
-	connChan   chan error
-
-	mtx             sync.Mutex
-	lastStateChange time.Time
-
-	// These variables must be protected by the mutex.
-	bls   map[*BleListener]struct{}
-	state BleSesnState
-}
-
-func NewBleFsm(p BleFsmParams) *BleFsm {
-	bf := &BleFsm{
-		bx:           p.Bx,
-		peerSpec:     p.PeerSpec,
-		ownAddrType:  p.OwnAddrType,
-		svcUuid:      p.SvcUuid,
-		reqChrUuid:   p.ReqChrUuid,
-		rspChrUuid:   p.RspChrUuid,
-		rxNmpCb:      p.RxNmpCb,
-		disconnectCb: p.DisconnectCb,
-
-		bls:    map[*BleListener]struct{}{},
-		attMtu: DFLT_ATT_MTU,
-	}
-
-	return bf
-}
-
-func (bf *BleFsm) disconnectError(reason int) error {
-	str := fmt.Sprintf("BLE peer disconnected; "+
-		"reason=\"%s\" (%d) peer=%s handle=%d",
-		ErrCodeToString(reason), reason, bf.peerDev.String(), bf.connHandle)
-	return nmxutil.NewBleSesnDisconnectError(reason, str)
-}
-
-func (bf *BleFsm) closedError(msg string) error {
-	return nmxutil.NewSesnClosedError(fmt.Sprintf(
-		"%s; state=%d last-state-change=%s",
-		msg, bf.getState(), bf.lastStateChange))
-}
-
-func (bf *BleFsm) getState() BleSesnState {
-	bf.mtx.Lock()
-	defer bf.mtx.Unlock()
-
-	return bf.state
-}
-
-func (bf *BleFsm) setState(toState BleSesnState) {
-	bf.mtx.Lock()
-	defer bf.mtx.Unlock()
-
-	bf.state = toState
-	bf.lastStateChange = time.Now()
-}
-
-func (bf *BleFsm) transitionState(fromState BleSesnState,
-	toState BleSesnState) error {
-
-	bf.mtx.Lock()
-	defer bf.mtx.Unlock()
-
-	if bf.state != fromState {
-		return fmt.Errorf(
-			"Can't set BleFsm state to %d; current state != required "+
-				"value: %d",
-			toState, fromState)
-	}
-
-	bf.state = toState
-	return nil
-}
-
-func (bf *BleFsm) addBleListener(base BleMsgBase) (*BleListener, error) {
-	bl := NewBleListener()
-
-	bf.mtx.Lock()
-	bf.bls[bl] = struct{}{}
-	bf.mtx.Unlock()
-
-	if err := bf.bx.Bd.AddListener(base, bl); err != nil {
-		delete(bf.bls, bl)
-		return nil, err
-	}
-
-	return bl, nil
-}
-
-func (bf *BleFsm) addBleSeqListener(seq int) (*BleListener, error) {
-	base := BleMsgBase{
-		Op:         -1,
-		Type:       -1,
-		Seq:        seq,
-		ConnHandle: -1,
-	}
-	bl, err := bf.addBleListener(base)
-	if err != nil {
-		return nil, err
-	}
-
-	return bl, nil
-}
-
-func (bf *BleFsm) removeBleListener(base BleMsgBase) {
-	bl := bf.bx.Bd.RemoveListener(base)
-	if bl != nil {
-		bf.mtx.Lock()
-		delete(bf.bls, bl)
-		bf.mtx.Unlock()
-	}
-}
-
-func (bf *BleFsm) removeBleSeqListener(seq int) {
-	base := BleMsgBase{
-		Op:         -1,
-		Type:       -1,
-		Seq:        seq,
-		ConnHandle: -1,
-	}
-
-	bf.removeBleListener(base)
-}
-
-func (bf *BleFsm) action(
-	preState BleSesnState,
-	inState BleSesnState,
-	postState BleSesnState,
-	cb func() error) error {
-
-	if err := bf.transitionState(preState, inState); err != nil {
-		return err
-	}
-
-	if err := cb(); err != nil {
-		bf.setState(preState)
-		return err
-	}
-
-	bf.setState(postState)
-	return nil
-}
-
-func (bf *BleFsm) connectListen(seq int) error {
-	bf.connChan = make(chan error, 1)
-
-	bl, err := bf.addBleSeqListener(seq)
-	if err != nil {
-		return err
-	}
-
-	go func() {
-		defer bf.removeBleSeqListener(seq)
-		for {
-			select {
-			case <-bl.ErrChan:
-				return
-
-			case bm := <-bl.BleChan:
-				switch msg := bm.(type) {
-				case *BleConnectRsp:
-					bl.Acked = true
-					if msg.Status != 0 {
-						str := fmt.Sprintf("BLE connection attempt failed; "+
-							"status=%s (%d) peer=%s",
-							ErrCodeToString(msg.Status), msg.Status,
-							bf.peerDev.String())
-						log.Debugf(str)
-						bf.connChan <- nmxutil.NewBleHostError(msg.Status, str)
-						return
-					}
-
-				case *BleConnectEvt:
-					if msg.Status == 0 {
-						bl.Acked = true
-						log.Debugf("BLE connection attempt succeeded; "+
-							"peer=%d handle=%d", bf.peerDev.String(),
-							msg.ConnHandle)
-						bf.connHandle = msg.ConnHandle
-						if err := bf.nmpRspListen(); err != nil {
-							bf.connChan <- err
-							return
-						}
-						bf.connChan <- nil
-					} else {
-						str := fmt.Sprintf("BLE connection attempt failed; "+
-							"status=%s (%d) peer=%s",
-							ErrCodeToString(msg.Status), msg.Status,
-							bf.peerDev.String())
-						log.Debugf(str)
-						bf.connChan <- nmxutil.NewBleHostError(msg.Status, str)
-						return
-					}
-
-				case *BleMtuChangeEvt:
-					if msg.Status != 0 {
-						err := StatusError(MSG_OP_EVT,
-							MSG_TYPE_MTU_CHANGE_EVT,
-							msg.Status)
-						log.Debugf(err.Error())
-					} else {
-						log.Debugf("BLE ATT MTU updated; from=%d to=%d",
-							bf.attMtu, msg.Mtu)
-						bf.attMtu = msg.Mtu
-					}
-
-				case *BleDisconnectEvt:
-					err := bf.disconnectError(msg.Reason)
-					log.Debugf(err.Error())
-
-					bf.mtx.Lock()
-					bls := make([]*BleListener, 0, len(bf.bls))
-					for bl, _ := range bf.bls {
-						bls = append(bls, bl)
-					}
-					bf.mtx.Unlock()
-
-					for _, bl := range bls {
-						bl.ErrChan <- err
-					}
-
-					bf.setState(SESN_STATE_UNCONNECTED)
-					peer := *bf.peerDev
-					bf.peerDev = nil
-					bf.disconnectCb(peer, err)
-					return
-
-				default:
-				}
-
-			case <-bl.AfterTimeout(bf.bx.rspTimeout):
-				bf.connChan <- BhdTimeoutError(MSG_TYPE_CONNECT)
-			}
-		}
-	}()
-	return nil
-}
-
-func (bf *BleFsm) nmpRspListen() error {
-	base := BleMsgBase{
-		Op:         MSG_OP_EVT,
-		Type:       MSG_TYPE_NOTIFY_RX_EVT,
-		Seq:        -1,
-		ConnHandle: bf.connHandle,
-	}
-
-	bl, err := bf.addBleListener(base)
-	if err != nil {
-		return err
-	}
-
-	go func() {
-		defer bf.removeBleListener(base)
-		for {
-			select {
-			case <-bl.ErrChan:
-				// The session encountered an error; stop listening.
-				return
-			case bm := <-bl.BleChan:
-				switch msg := bm.(type) {
-				case *BleNotifyRxEvt:
-					if bf.nmpRspChr != nil &&
-						msg.AttrHandle == bf.nmpRspChr.ValHandle {
-
-						bf.rxNmpCb(msg.Data.Bytes)
-					}
-
-				default:
-				}
-			}
-		}
-	}()
-	return nil
-}
-
-func (bf *BleFsm) connect() error {
-	r := NewBleConnectReq()
-	r.OwnAddrType = bf.ownAddrType
-	r.PeerAddrType = bf.peerDev.AddrType
-	r.PeerAddr = bf.peerDev.Addr
-
-	if err := bf.connectListen(r.Seq); err != nil {
-		return err
-	}
-
-	if err := connect(bf.bx, bf.connChan, r); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (bf *BleFsm) scan() error {
-	r := NewBleScanReq()
-	r.OwnAddrType = bf.ownAddrType
-	r.DurationMs = 15000
-	r.FilterPolicy = BLE_SCAN_FILT_NO_WL
-	r.Limited = false
-	r.Passive = false
-	r.FilterDuplicates = true
-
-	bl, err := bf.addBleSeqListener(r.Seq)
-	if err != nil {
-		return err
-	}
-	defer bf.removeBleSeqListener(r.Seq)
-
-	abortChan := make(chan struct{}, 1)
-
-	// This function gets called for each incoming advertisement.
-	scanCb := func(evt *BleScanEvt) {
-		r := BleAdvReport{
-			EventType: evt.EventType,
-			Sender: BleDev{
-				AddrType: evt.AddrType,
-				Addr:     evt.Addr,
-			},
-			Rssi: evt.Rssi,
-			Data: evt.Data.Bytes,
-
-			Flags:          evt.DataFlags,
-			Name:           evt.DataName,
-			NameIsComplete: evt.DataNameIsComplete,
-		}
-
-		// Ask client if we should connect to this advertiser.
-		if bf.peerSpec.ScanPred(r) {
-			bf.peerDev = &r.Sender
-			abortChan <- struct{}{}
-		}
-	}
-
-	if err := scan(bf.bx, bl, r, abortChan, scanCb); err != nil {
-		return err
-	}
-
-	// Scanning still in progress; cancel the operation.
-	return bf.scanCancel()
-}
-
-func (bf *BleFsm) scanCancel() error {
-	r := NewBleScanCancelReq()
-
-	bl, err := bf.addBleSeqListener(r.Seq)
-	if err != nil {
-		return err
-	}
-	defer bf.removeBleSeqListener(r.Seq)
-
-	if err := scanCancel(bf.bx, bl, r); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (bf *BleFsm) terminateSetState() error {
-	bf.mtx.Lock()
-	defer bf.mtx.Unlock()
-
-	switch bf.state {
-	case SESN_STATE_UNCONNECTED,
-		SESN_STATE_CONNECTING,
-		SESN_STATE_CONN_CANCELLING:
-		return fmt.Errorf("BLE terminate failed; not connected")
-	case SESN_STATE_TERMINATING:
-		return fmt.Errorf(
-			"BLE terminate failed; session already being closed")
-	default:
-		bf.state = SESN_STATE_TERMINATING
-	}
-
-	return nil
-}
-
-func (bf *BleFsm) terminate() error {
-	if err := bf.terminateSetState(); err != nil {
-		return err
-	}
-
-	r := NewBleTerminateReq()
-	r.ConnHandle = bf.connHandle
-	r.HciReason = ERR_CODE_HCI_REM_USER_CONN_TERM
-
-	bl, err := bf.addBleSeqListener(r.Seq)
-	if err != nil {
-		return err
-	}
-	defer bf.removeBleSeqListener(r.Seq)
-
-	if err := terminate(bf.bx, bl, r); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (bf *BleFsm) connCancel() error {
-	if err := bf.transitionState(
-		SESN_STATE_CONNECTING,
-		SESN_STATE_CONN_CANCELLING); err != nil {
-
-		return fmt.Errorf("BLE connect cancel failed; not connecting")
-	}
-
-	r := NewBleConnCancelReq()
-	bl, err := bf.addBleSeqListener(r.Seq)
-	if err != nil {
-		return err
-	}
-	defer bf.removeBleSeqListener(r.Seq)
-
-	if err := connCancel(bf.bx, bl, r); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (bf *BleFsm) discSvcUuid() error {
-	r := NewBleDiscSvcUuidReq()
-	r.ConnHandle = bf.connHandle
-	r.Uuid = bf.svcUuid
-
-	bl, err := bf.addBleSeqListener(r.Seq)
-	if err != nil {
-		return err
-	}
-	defer bf.removeBleSeqListener(r.Seq)
-
-	bf.nmpSvc, err = discSvcUuid(bf.bx, bl, r)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (bf *BleFsm) discAllChrs() error {
-	r := NewBleDiscAllChrsReq()
-	r.ConnHandle = bf.connHandle
-	r.StartHandle = bf.nmpSvc.StartHandle
-	r.EndHandle = bf.nmpSvc.EndHandle
-
-	bl, err := bf.addBleSeqListener(r.Seq)
-	if err != nil {
-		return err
-	}
-	defer bf.removeBleSeqListener(r.Seq)
-
-	chrs, err := discAllChrs(bf.bx, bl, r)
-	if err != nil {
-		return err
-	}
-
-	for _, c := range chrs {
-		if CompareUuids(bf.reqChrUuid, c.Uuid) == 0 {
-			bf.nmpReqChr = c
-		}
-		if CompareUuids(bf.rspChrUuid, c.Uuid) == 0 {
-			bf.nmpRspChr = c
-		}
-	}
-
-	if bf.nmpReqChr == nil {
-		return fmt.Errorf(
-			"Peer doesn't support required characteristic: %s",
-			bf.reqChrUuid.String())
-	}
-
-	if bf.nmpRspChr == nil {
-		return fmt.Errorf(
-			"Peer doesn't support required characteristic: %s",
-			bf.rspChrUuid.String())
-	}
-
-	return nil
-}
-
-func (bf *BleFsm) exchangeMtu() error {
-	r := NewBleExchangeMtuReq()
-	r.ConnHandle = bf.connHandle
-
-	bl, err := bf.addBleSeqListener(r.Seq)
-	if err != nil {
-		return err
-	}
-	defer bf.removeBleSeqListener(r.Seq)
-
-	mtu, err := exchangeMtu(bf.bx, bl, r)
-	if err != nil {
-		return err
-	}
-
-	bf.attMtu = mtu
-	return nil
-}
-
-func (bf *BleFsm) writeCmd(data []byte) error {
-	r := NewBleWriteCmdReq()
-	r.ConnHandle = bf.connHandle
-	r.AttrHandle = bf.nmpReqChr.ValHandle
-	r.Data.Bytes = data
-
-	bl, err := bf.addBleSeqListener(r.Seq)
-	if err != nil {
-		return err
-	}
-	defer bf.removeBleSeqListener(r.Seq)
-
-	if err := writeCmd(bf.bx, bl, r); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (bf *BleFsm) subscribe() error {
-	r := NewBleWriteCmdReq()
-	r.ConnHandle = bf.connHandle
-	r.AttrHandle = bf.nmpRspChr.ValHandle + 1
-	r.Data.Bytes = []byte{1, 0}
-
-	bl, err := bf.addBleSeqListener(r.Seq)
-	if err != nil {
-		return err
-	}
-	defer bf.removeBleSeqListener(r.Seq)
-
-	if err := writeCmd(bf.bx, bl, r); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-// Tries to populate the FSM's peerDev field.  This function succeeds if the
-// client specified the address of the peer to connect to.
-func (bf *BleFsm) tryFillPeerDev() bool {
-	// The peer spec contains one of:
-	//     * Peer address;
-	//     * Predicate function to call during scanning.
-	// If a peer address is specified, fill in the peer field now so the
-	// scanning step can be skipped.  Otherwise, the peer field gets populated
-	// during scanning.
-	if bf.peerSpec.ScanPred == nil {
-		bf.peerDev = &bf.peerSpec.Dev
-		return true
-	}
-
-	return false
-}
-
-func (bf *BleFsm) Start() error {
-	if bf.getState() != SESN_STATE_UNCONNECTED {
-		return nmxutil.NewSesnAlreadyOpenError(
-			"Attempt to open an already-open BLE session")
-	}
-
-	for {
-		state := bf.getState()
-		switch state {
-		case SESN_STATE_UNCONNECTED:
-			var err error
-
-			// Determine if we can immediately initiate a connection, or if we
-			// need to scan for a peer first.  If the client specified a peer
-			// address, or if we have already successfully scanned, we initiate
-			// a connection now.  Otherwise, we need to scan to determine which
-			// peer meets the specified scan criteria.
-			bf.tryFillPeerDev()
-			if bf.peerDev == nil {
-				// Peer not inferred yet.  Initiate scan.
-				cb := func() error { return bf.scan() }
-				err = bf.action(
-					SESN_STATE_UNCONNECTED,
-					SESN_STATE_SCANNING,
-					SESN_STATE_UNCONNECTED,
-					cb)
-			} else {
-				// We already know the address we want to connect to.  Initiate
-				// a connection.
-				cb := func() error { return bf.connect() }
-				err = bf.action(
-					SESN_STATE_UNCONNECTED,
-					SESN_STATE_CONNECTING,
-					SESN_STATE_CONNECTED,
-					cb)
-			}
-
-			if err != nil {
-				return err
-			}
-
-		case SESN_STATE_CONNECTED:
-			cb := func() error { return bf.exchangeMtu() }
-			err := bf.action(
-				SESN_STATE_CONNECTED,
-				SESN_STATE_EXCHANGING_MTU,
-				SESN_STATE_EXCHANGED_MTU,
-				cb)
-			if err != nil {
-				return err
-			}
-
-		case SESN_STATE_EXCHANGED_MTU:
-			cb := func() error { return bf.discSvcUuid() }
-			err := bf.action(
-				SESN_STATE_EXCHANGED_MTU,
-				SESN_STATE_DISCOVERING_SVC,
-				SESN_STATE_DISCOVERED_SVC,
-				cb)
-			if err != nil {
-				return err
-			}
-
-		case SESN_STATE_DISCOVERED_SVC:
-			cb := func() error {
-				return bf.discAllChrs()
-			}
-
-			err := bf.action(
-				SESN_STATE_DISCOVERED_SVC,
-				SESN_STATE_DISCOVERING_CHR,
-				SESN_STATE_DISCOVERED_CHR,
-				cb)
-			if err != nil {
-				return err
-			}
-
-			if err := bf.subscribe(); err != nil {
-				return err
-			}
-
-		case SESN_STATE_DISCOVERED_CHR:
-			/* Open complete. */
-			return nil
-
-		case SESN_STATE_CONNECTING,
-			SESN_STATE_DISCOVERING_SVC,
-			SESN_STATE_DISCOVERING_CHR,
-			SESN_STATE_TERMINATING:
-			return fmt.Errorf("BleFsm already being opened")
-		}
-	}
-}
-
-// @return bool                 true if stop complete;
-//                              false if disconnect is now pending.
-func (bf *BleFsm) Stop() (bool, error) {
-	state := bf.getState()
-
-	switch state {
-	case SESN_STATE_UNCONNECTED,
-		SESN_STATE_TERMINATING,
-		SESN_STATE_CONN_CANCELLING:
-
-		return false,
-			bf.closedError("Attempt to close an unopened BLE session")
-
-	case SESN_STATE_CONNECTING:
-		if err := bf.connCancel(); err != nil {
-			return false, err
-		}
-		return true, nil
-
-	default:
-		if err := bf.terminate(); err != nil {
-			return false, err
-		}
-		return false, nil
-	}
-}
-
-func (bf *BleFsm) IsOpen() bool {
-	return bf.getState() == SESN_STATE_DISCOVERED_CHR
-}
-
-func (bf *BleFsm) TxNmp(payload []byte, nl *nmp.NmpListener,
-	timeout time.Duration) (nmp.NmpRsp, error) {
-
-	log.Debugf("Tx NMP request: %s", hex.Dump(payload))
-	if err := bf.writeCmd(payload); err != nil {
-		return nil, err
-	}
-
-	// Now wait for NMP response.
-	for {
-		select {
-		case err := <-nl.ErrChan:
-			return nil, err
-		case rsp := <-nl.RspChan:
-			// Only accept NMP responses if the session is still open.  This is
-			// to help prevent race conditions in client code.
-			if bf.IsOpen() {
-				return rsp, nil
-			}
-		case <-nl.AfterTimeout(timeout):
-			return nil, nmxutil.NewNmpTimeoutError("NMP timeout")
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
deleted file mode 100644
index 949d7aa..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_oic_sesn.go
+++ /dev/null
@@ -1,198 +0,0 @@
-package nmble
-
-import (
-	"fmt"
-	"sync"
-	"time"
-
-	. "mynewt.apache.org/newt/nmxact/bledefs"
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/omp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-	"mynewt.apache.org/newt/util"
-)
-
-type BleOicSesn struct {
-	bf           *BleFsm
-	nls          map[*nmp.NmpListener]struct{}
-	od           *omp.OmpDispatcher
-	closeTimeout time.Duration
-	onCloseCb    sesn.BleOnCloseFn
-
-	closeChan chan error
-	mx        sync.Mutex
-}
-
-func NewBleOicSesn(bx *BleXport, cfg sesn.SesnCfg) *BleOicSesn {
-	bos := &BleOicSesn{
-		nls:          map[*nmp.NmpListener]struct{}{},
-		od:           omp.NewOmpDispatcher(),
-		closeTimeout: cfg.Ble.CloseTimeout,
-		onCloseCb:    cfg.Ble.OnCloseCb,
-	}
-
-	svcUuid, err := ParseUuid(NmpOicSvcUuid)
-	if err != nil {
-		panic(err.Error())
-	}
-
-	reqChrUuid, err := ParseUuid(NmpOicReqChrUuid)
-	if err != nil {
-		panic(err.Error())
-	}
-
-	rspChrUuid, err := ParseUuid(NmpOicRspChrUuid)
-	if err != nil {
-		panic(err.Error())
-	}
-
-	bos.bf = NewBleFsm(BleFsmParams{
-		Bx:           bx,
-		OwnAddrType:  cfg.Ble.OwnAddrType,
-		PeerSpec:     cfg.Ble.PeerSpec,
-		SvcUuid:      svcUuid,
-		ReqChrUuid:   reqChrUuid,
-		RspChrUuid:   rspChrUuid,
-		RxNmpCb:      func(d []byte) { bos.onRxNmp(d) },
-		DisconnectCb: func(p BleDev, e error) { bos.onDisconnect(p, e) },
-	})
-
-	return bos
-}
-
-func (bos *BleOicSesn) addNmpListener(seq uint8) (*nmp.NmpListener, error) {
-	nl := nmp.NewNmpListener()
-	bos.nls[nl] = struct{}{}
-
-	if err := bos.od.AddListener(seq, nl); err != nil {
-		delete(bos.nls, nl)
-		return nil, err
-	}
-
-	return nl, nil
-}
-
-func (bos *BleOicSesn) removeNmpListener(seq uint8) {
-	listener := bos.od.RemoveListener(seq)
-	if listener != nil {
-		delete(bos.nls, listener)
-	}
-}
-
-// Returns true if a new channel was assigned.
-func (bos *BleOicSesn) setCloseChan() bool {
-	bos.mx.Lock()
-	defer bos.mx.Unlock()
-
-	if bos.closeChan != nil {
-		return false
-	}
-
-	bos.closeChan = make(chan error, 1)
-	return true
-}
-
-func (bos *BleOicSesn) clearCloseChan() {
-	bos.mx.Lock()
-	defer bos.mx.Unlock()
-
-	bos.closeChan = nil
-}
-
-func (bos *BleOicSesn) AbortRx(seq uint8) error {
-	return bos.od.FakeRxError(seq, fmt.Errorf("Rx aborted"))
-}
-
-func (bos *BleOicSesn) Open() error {
-	return bos.bf.Start()
-}
-
-func (bos *BleOicSesn) Close() error {
-	if !bos.setCloseChan() {
-		return bos.bf.closedError(
-			"Attempt to close an unopened BLE session")
-	}
-	defer bos.clearCloseChan()
-
-	done, err := bos.bf.Stop()
-	if err != nil {
-		return err
-	}
-
-	if done {
-		// Close complete.
-		return nil
-	}
-
-	// Block until close completes or timeout.
-	select {
-	case <-bos.closeChan:
-	case <-time.After(bos.closeTimeout):
-	}
-
-	return nil
-}
-
-func (bos *BleOicSesn) IsOpen() bool {
-	return bos.bf.IsOpen()
-}
-
-func (bos *BleOicSesn) onRxNmp(data []byte) {
-	bos.od.Dispatch(data)
-}
-
-func (bos *BleOicSesn) onDisconnect(peer BleDev, err error) {
-	for nl, _ := range bos.nls {
-		nl.ErrChan <- err
-	}
-
-	// If the session is being closed, unblock the close() call.
-	if bos.closeChan != nil {
-		bos.closeChan <- err
-	}
-	if bos.onCloseCb != nil {
-		bos.onCloseCb(bos, peer, err)
-	}
-}
-
-func (bos *BleOicSesn) EncodeNmpMsg(m *nmp.NmpMsg) ([]byte, error) {
-	return omp.EncodeOmpTcp(m)
-}
-
-// Blocking.
-func (bos *BleOicSesn) TxNmpOnce(m *nmp.NmpMsg, opt sesn.TxOptions) (
-	nmp.NmpRsp, error) {
-
-	if !bos.IsOpen() {
-		return nil, bos.bf.closedError(
-			"Attempt to transmit over closed BLE session")
-	}
-
-	nl, err := bos.addNmpListener(m.Hdr.Seq)
-	if err != nil {
-		return nil, err
-	}
-	defer bos.removeNmpListener(m.Hdr.Seq)
-
-	b, err := bos.EncodeNmpMsg(m)
-	if err != nil {
-		return nil, err
-	}
-
-	return bos.bf.TxNmp(b, nl, opt.Timeout)
-}
-
-func (bos *BleOicSesn) MtuIn() int {
-	return bos.bf.attMtu -
-		NOTIFY_CMD_BASE_SZ -
-		omp.OMP_MSG_OVERHEAD -
-		nmp.NMP_HDR_SIZE
-}
-
-func (bos *BleOicSesn) MtuOut() int {
-	mtu := bos.bf.attMtu -
-		WRITE_CMD_BASE_SZ -
-		omp.OMP_MSG_OVERHEAD -
-		nmp.NMP_HDR_SIZE
-	return util.IntMin(mtu, BLE_ATT_ATTR_MAX_LEN)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
deleted file mode 100644
index 71133e7..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_plain_sesn.go
+++ /dev/null
@@ -1,186 +0,0 @@
-package nmble
-
-import (
-	"fmt"
-	"sync"
-	"time"
-
-	. "mynewt.apache.org/newt/nmxact/bledefs"
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
-	"mynewt.apache.org/newt/util"
-)
-
-type BlePlainSesn struct {
-	bf           *BleFsm
-	nls          map[*nmp.NmpListener]struct{}
-	nd           *nmp.NmpDispatcher
-	closeTimeout time.Duration
-	onCloseCb    sesn.BleOnCloseFn
-
-	closeChan chan error
-	mx        sync.Mutex
-}
-
-func NewBlePlainSesn(bx *BleXport, cfg sesn.SesnCfg) *BlePlainSesn {
-	bps := &BlePlainSesn{
-		nls:          map[*nmp.NmpListener]struct{}{},
-		nd:           nmp.NewNmpDispatcher(),
-		closeTimeout: cfg.Ble.CloseTimeout,
-		onCloseCb:    cfg.Ble.OnCloseCb,
-	}
-
-	svcUuid, err := ParseUuid(NmpPlainSvcUuid)
-	if err != nil {
-		panic(err.Error())
-	}
-
-	chrUuid, err := ParseUuid(NmpPlainChrUuid)
-	if err != nil {
-		panic(err.Error())
-	}
-
-	bps.bf = NewBleFsm(BleFsmParams{
-		Bx:           bx,
-		OwnAddrType:  cfg.Ble.OwnAddrType,
-		PeerSpec:     cfg.Ble.PeerSpec,
-		SvcUuid:      svcUuid,
-		ReqChrUuid:   chrUuid,
-		RspChrUuid:   chrUuid,
-		RxNmpCb:      func(d []byte) { bps.onRxNmp(d) },
-		DisconnectCb: func(p BleDev, e error) { bps.onDisconnect(p, e) },
-	})
-
-	return bps
-}
-
-func (bps *BlePlainSesn) addNmpListener(seq uint8) (*nmp.NmpListener, error) {
-	nl := nmp.NewNmpListener()
-	bps.nls[nl] = struct{}{}
-
-	if err := bps.nd.AddListener(seq, nl); err != nil {
-		delete(bps.nls, nl)
-		return nil, err
-	}
-
-	return nl, nil
-}
-
-func (bps *BlePlainSesn) removeNmpListener(seq uint8) {
-	listener := bps.nd.RemoveListener(seq)
-	if listener != nil {
-		delete(bps.nls, listener)
-	}
-}
-
-// Returns true if a new channel was assigned.
-func (bps *BlePlainSesn) setCloseChan() bool {
-	bps.mx.Lock()
-	defer bps.mx.Unlock()
-
-	if bps.closeChan != nil {
-		return false
-	}
-
-	bps.closeChan = make(chan error, 1)
-	return true
-}
-
-func (bps *BlePlainSesn) clearCloseChan() {
-	bps.mx.Lock()
-	defer bps.mx.Unlock()
-
-	bps.closeChan = nil
-}
-
-func (bps *BlePlainSesn) AbortRx(seq uint8) error {
-	return bps.nd.FakeRxError(seq, fmt.Errorf("Rx aborted"))
-}
-
-func (bps *BlePlainSesn) Open() error {
-	return bps.bf.Start()
-}
-
-func (bps *BlePlainSesn) Close() error {
-	if !bps.setCloseChan() {
-		return bps.bf.closedError(
-			"Attempt to close an unopened BLE session")
-	}
-	defer bps.clearCloseChan()
-
-	done, err := bps.bf.Stop()
-	if err != nil {
-		return err
-	}
-
-	if done {
-		// Close complete.
-		return nil
-	}
-
-	// Block until close completes or timeout.
-	select {
-	case <-bps.closeChan:
-	case <-time.After(bps.closeTimeout):
-	}
-
-	return nil
-}
-
-func (bps *BlePlainSesn) IsOpen() bool {
-	return bps.bf.IsOpen()
-}
-
-func (bps *BlePlainSesn) onRxNmp(data []byte) {
-	bps.nd.Dispatch(data)
-}
-
-func (bps *BlePlainSesn) onDisconnect(peer BleDev, err error) {
-	for nl, _ := range bps.nls {
-		nl.ErrChan <- err
-	}
-
-	// If the session is being closed, unblock the close() call.
-	if bps.closeChan != nil {
-		bps.closeChan <- err
-	}
-	if bps.onCloseCb != nil {
-		bps.onCloseCb(bps, peer, err)
-	}
-}
-
-func (bps *BlePlainSesn) EncodeNmpMsg(m *nmp.NmpMsg) ([]byte, error) {
-	return nmp.EncodeNmpPlain(m)
-}
-
-// Blocking.
-func (bps *BlePlainSesn) TxNmpOnce(msg *nmp.NmpMsg, opt sesn.TxOptions) (
-	nmp.NmpRsp, error) {
-
-	if !bps.IsOpen() {
-		return nil, bps.bf.closedError(
-			"Attempt to transmit over closed BLE session")
-	}
-
-	nl, err := bps.addNmpListener(msg.Hdr.Seq)
-	if err != nil {
-		return nil, err
-	}
-	defer bps.removeNmpListener(msg.Hdr.Seq)
-
-	b, err := bps.EncodeNmpMsg(msg)
-	if err != nil {
-		return nil, err
-	}
-
-	return bps.bf.TxNmp(b, nl, opt.Timeout)
-}
-
-func (bps *BlePlainSesn) MtuIn() int {
-	return bps.bf.attMtu - NOTIFY_CMD_BASE_SZ - nmp.NMP_HDR_SIZE
-}
-
-func (bps *BlePlainSesn) MtuOut() int {
-	mtu := bps.bf.attMtu - WRITE_CMD_BASE_SZ - nmp.NMP_HDR_SIZE
-	return util.IntMin(mtu, BLE_ATT_ATTR_MAX_LEN)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_proto.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_proto.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_proto.go
deleted file mode 100644
index 85a26f8..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_proto.go
+++ /dev/null
@@ -1,829 +0,0 @@
-package nmble
-
-import (
-	"bytes"
-	"encoding/json"
-	"errors"
-	"fmt"
-	"strconv"
-	"strings"
-
-	. "mynewt.apache.org/newt/nmxact/bledefs"
-)
-
-type MsgOp int
-type MsgType int
-
-type BleBytes struct {
-	Bytes []byte
-}
-
-type BleUuid struct {
-	Bytes [16]byte
-}
-
-const ERR_CODE_ATT_BASE = 0x100
-const ERR_CODE_HCI_BASE = 0x200
-const ERR_CODE_L2C_BASE = 0x300
-const ERR_CODE_SM_US_BASE = 0x400
-const ERR_CODE_SM_PEER_BASE = 0x500
-
-const (
-	ERR_CODE_EAGAIN       int = 1
-	ERR_CODE_EALREADY         = 2
-	ERR_CODE_EINVAL           = 3
-	ERR_CODE_EMSGSIZE         = 4
-	ERR_CODE_ENOENT           = 5
-	ERR_CODE_ENOMEM           = 6
-	ERR_CODE_ENOTCONN         = 7
-	ERR_CODE_ENOTSUP          = 8
-	ERR_CODE_EAPP             = 9
-	ERR_CODE_EBADDATA         = 10
-	ERR_CODE_EOS              = 11
-	ERR_CODE_ECONTROLLER      = 12
-	ERR_CODE_ETIMEOUT         = 13
-	ERR_CODE_EDONE            = 14
-	ERR_CODE_EBUSY            = 15
-	ERR_CODE_EREJECT          = 16
-	ERR_CODE_EUNKNOWN         = 17
-	ERR_CODE_EROLE            = 18
-	ERR_CODE_ETIMEOUT_HCI     = 19
-	ERR_CODE_ENOMEM_EVT       = 20
-	ERR_CODE_ENOADDR          = 21
-	ERR_CODE_ENOTSYNCED       = 22
-)
-
-var ErrCodeStringMap = map[int]string{
-	ERR_CODE_EAGAIN:       "eagain",
-	ERR_CODE_EALREADY:     "ealready",
-	ERR_CODE_EINVAL:       "einval",
-	ERR_CODE_EMSGSIZE:     "emsgsize",
-	ERR_CODE_ENOENT:       "enoent",
-	ERR_CODE_ENOMEM:       "enomem",
-	ERR_CODE_ENOTCONN:     "enotconn",
-	ERR_CODE_ENOTSUP:      "enotsup",
-	ERR_CODE_EAPP:         "eapp",
-	ERR_CODE_EBADDATA:     "ebaddata",
-	ERR_CODE_EOS:          "eos",
-	ERR_CODE_ECONTROLLER:  "econtroller",
-	ERR_CODE_ETIMEOUT:     "etimeout",
-	ERR_CODE_EDONE:        "edone",
-	ERR_CODE_EBUSY:        "ebusy",
-	ERR_CODE_EREJECT:      "ereject",
-	ERR_CODE_EUNKNOWN:     "eunknown",
-	ERR_CODE_EROLE:        "erole",
-	ERR_CODE_ETIMEOUT_HCI: "etimeout_hci",
-	ERR_CODE_ENOMEM_EVT:   "enomem_evt",
-	ERR_CODE_ENOADDR:      "enoaddr",
-	ERR_CODE_ENOTSYNCED:   "enotsynced",
-}
-
-const (
-	ERR_CODE_HCI_UNKNOWN_HCI_CMD     int = 1
-	ERR_CODE_HCI_UNK_CONN_ID             = 2
-	ERR_CODE_HCI_HW_FAIL                 = 3
-	ERR_CODE_HCI_PAGE_TMO                = 4
-	ERR_CODE_HCI_AUTH_FAIL               = 5
-	ERR_CODE_HCI_PINKEY_MISSING          = 6
-	ERR_CODE_HCI_MEM_CAPACITY            = 7
-	ERR_CODE_HCI_CONN_SPVN_TMO           = 8
-	ERR_CODE_HCI_CONN_LIMIT              = 9
-	ERR_CODE_HCI_SYNCH_CONN_LIMIT        = 10
-	ERR_CODE_HCI_ACL_CONN_EXISTS         = 11
-	ERR_CODE_HCI_CMD_DISALLOWED          = 12
-	ERR_CODE_HCI_CONN_REJ_RESOURCES      = 13
-	ERR_CODE_HCI_CONN_REJ_SECURITY       = 14
-	ERR_CODE_HCI_CONN_REJ_BD_ADDR        = 15
-	ERR_CODE_HCI_CONN_ACCEPT_TMO         = 16
-	ERR_CODE_HCI_UNSUPPORTED             = 17
-	ERR_CODE_HCI_INV_HCI_CMD_PARMS       = 18
-	ERR_CODE_HCI_REM_USER_CONN_TERM      = 19
-	ERR_CODE_HCI_RD_CONN_TERM_RESRCS     = 20
-	ERR_CODE_HCI_RD_CONN_TERM_PWROFF     = 21
-	ERR_CODE_HCI_CONN_TERM_LOCAL         = 22
-	ERR_CODE_HCI_REPEATED_ATTEMPTS       = 23
-	ERR_CODE_HCI_NO_PAIRING              = 24
-	ERR_CODE_HCI_UNK_LMP                 = 25
-	ERR_CODE_HCI_UNSUPP_REM_FEATURE      = 26
-	ERR_CODE_HCI_SCO_OFFSET              = 27
-	ERR_CODE_HCI_SCO_ITVL                = 28
-	ERR_CODE_HCI_SCO_AIR_MODE            = 29
-	ERR_CODE_HCI_INV_LMP_LL_PARM         = 30
-	ERR_CODE_HCI_UNSPECIFIED             = 31
-	ERR_CODE_HCI_UNSUPP_LMP_LL_PARM      = 32
-	ERR_CODE_HCI_NO_ROLE_CHANGE          = 33
-	ERR_CODE_HCI_LMP_LL_RSP_TMO          = 34
-	ERR_CODE_HCI_LMP_COLLISION           = 35
-	ERR_CODE_HCI_LMP_PDU                 = 36
-	ERR_CODE_HCI_ENCRYPTION_MODE         = 37
-	ERR_CODE_HCI_LINK_KEY_CHANGE         = 38
-	ERR_CODE_HCI_UNSUPP_QOS              = 39
-	ERR_CODE_HCI_INSTANT_PASSED          = 40
-	ERR_CODE_HCI_UNIT_KEY_PAIRING        = 41
-	ERR_CODE_HCI_DIFF_TRANS_COLL         = 42
-	ERR_CODE_HCI_QOS_PARM                = 44
-	ERR_CODE_HCI_QOS_REJECTED            = 45
-	ERR_CODE_HCI_CHAN_CLASS              = 46
-	ERR_CODE_HCI_INSUFFICIENT_SEC        = 47
-	ERR_CODE_HCI_PARM_OUT_OF_RANGE       = 48
-	ERR_CODE_HCI_PENDING_ROLE_SW         = 50
-	ERR_CODE_HCI_RESERVED_SLOT           = 52
-	ERR_CODE_HCI_ROLE_SW_FAIL            = 53
-	ERR_CODE_HCI_INQ_RSP_TOO_BIG         = 54
-	ERR_CODE_HCI_SEC_SIMPLE_PAIR         = 55
-	ERR_CODE_HCI_HOST_BUSY_PAIR          = 56
-	ERR_CODE_HCI_CONN_REJ_CHANNEL        = 57
-	ERR_CODE_HCI_CTLR_BUSY               = 58
-	ERR_CODE_HCI_CONN_PARMS              = 59
-	ERR_CODE_HCI_DIR_ADV_TMO             = 60
-	ERR_CODE_HCI_CONN_TERM_MIC           = 61
-	ERR_CODE_HCI_CONN_ESTABLISHMENT      = 62
-	ERR_CODE_HCI_MAC_CONN_FAIL           = 63
-	ERR_CODE_HCI_COARSE_CLK_ADJ          = 64
-)
-
-var HciErrCodeStringMap = map[int]string{
-	ERR_CODE_HCI_UNKNOWN_HCI_CMD:     "unknown hci cmd",
-	ERR_CODE_HCI_UNK_CONN_ID:         "unknown connection id",
-	ERR_CODE_HCI_HW_FAIL:             "hw fail",
-	ERR_CODE_HCI_PAGE_TMO:            "page tmo",
-	ERR_CODE_HCI_AUTH_FAIL:           "auth fail",
-	ERR_CODE_HCI_PINKEY_MISSING:      "pinkey missing",
-	ERR_CODE_HCI_MEM_CAPACITY:        "mem capacity",
-	ERR_CODE_HCI_CONN_SPVN_TMO:       "connection supervision timeout",
-	ERR_CODE_HCI_CONN_LIMIT:          "conn limit",
-	ERR_CODE_HCI_SYNCH_CONN_LIMIT:    "synch conn limit",
-	ERR_CODE_HCI_ACL_CONN_EXISTS:     "acl conn exists",
-	ERR_CODE_HCI_CMD_DISALLOWED:      "cmd disallowed",
-	ERR_CODE_HCI_CONN_REJ_RESOURCES:  "conn rej resources",
-	ERR_CODE_HCI_CONN_REJ_SECURITY:   "conn rej security",
-	ERR_CODE_HCI_CONN_REJ_BD_ADDR:    "conn rej bd addr",
-	ERR_CODE_HCI_CONN_ACCEPT_TMO:     "conn accept tmo",
-	ERR_CODE_HCI_UNSUPPORTED:         "unsupported",
-	ERR_CODE_HCI_INV_HCI_CMD_PARMS:   "inv hci cmd parms",
-	ERR_CODE_HCI_REM_USER_CONN_TERM:  "rem user conn term",
-	ERR_CODE_HCI_RD_CONN_TERM_RESRCS: "rd conn term resrcs",
-	ERR_CODE_HCI_RD_CONN_TERM_PWROFF: "rd conn term pwroff",
-	ERR_CODE_HCI_CONN_TERM_LOCAL:     "conn term local",
-	ERR_CODE_HCI_REPEATED_ATTEMPTS:   "repeated attempts",
-	ERR_CODE_HCI_NO_PAIRING:          "no pairing",
-	ERR_CODE_HCI_UNK_LMP:             "unk lmp",
-	ERR_CODE_HCI_UNSUPP_REM_FEATURE:  "unsupp rem feature",
-	ERR_CODE_HCI_SCO_OFFSET:          "sco offset",
-	ERR_CODE_HCI_SCO_ITVL:            "sco itvl",
-	ERR_CODE_HCI_SCO_AIR_MODE:        "sco air mode",
-	ERR_CODE_HCI_INV_LMP_LL_PARM:     "inv lmp ll parm",
-	ERR_CODE_HCI_UNSPECIFIED:         "unspecified",
-	ERR_CODE_HCI_UNSUPP_LMP_LL_PARM:  "unsupp lmp ll parm",
-	ERR_CODE_HCI_NO_ROLE_CHANGE:      "no role change",
-	ERR_CODE_HCI_LMP_LL_RSP_TMO:      "lmp ll rsp tmo",
-	ERR_CODE_HCI_LMP_COLLISION:       "lmp collision",
-	ERR_CODE_HCI_LMP_PDU:             "lmp pdu",
-	ERR_CODE_HCI_ENCRYPTION_MODE:     "encryption mode",
-	ERR_CODE_HCI_LINK_KEY_CHANGE:     "link key change",
-	ERR_CODE_HCI_UNSUPP_QOS:          "unsupp qos",
-	ERR_CODE_HCI_INSTANT_PASSED:      "instant passed",
-	ERR_CODE_HCI_UNIT_KEY_PAIRING:    "unit key pairing",
-	ERR_CODE_HCI_DIFF_TRANS_COLL:     "diff trans coll",
-	ERR_CODE_HCI_QOS_PARM:            "qos parm",
-	ERR_CODE_HCI_QOS_REJECTED:        "qos rejected",
-	ERR_CODE_HCI_CHAN_CLASS:          "chan class",
-	ERR_CODE_HCI_INSUFFICIENT_SEC:    "insufficient sec",
-	ERR_CODE_HCI_PARM_OUT_OF_RANGE:   "parm out of range",
-	ERR_CODE_HCI_PENDING_ROLE_SW:     "pending role sw",
-	ERR_CODE_HCI_RESERVED_SLOT:       "reserved slot",
-	ERR_CODE_HCI_ROLE_SW_FAIL:        "role sw fail",
-	ERR_CODE_HCI_INQ_RSP_TOO_BIG:     "inq rsp too big",
-	ERR_CODE_HCI_SEC_SIMPLE_PAIR:     "sec simple pair",
-	ERR_CODE_HCI_HOST_BUSY_PAIR:      "host busy pair",
-	ERR_CODE_HCI_CONN_REJ_CHANNEL:    "conn rej channel",
-	ERR_CODE_HCI_CTLR_BUSY:           "ctlr busy",
-	ERR_CODE_HCI_CONN_PARMS:          "conn parms",
-	ERR_CODE_HCI_DIR_ADV_TMO:         "dir adv tmo",
-	ERR_CODE_HCI_CONN_TERM_MIC:       "conn term mic",
-	ERR_CODE_HCI_CONN_ESTABLISHMENT:  "conn establishment",
-	ERR_CODE_HCI_MAC_CONN_FAIL:       "mac conn fail",
-	ERR_CODE_HCI_COARSE_CLK_ADJ:      "coarse clk adj",
-}
-
-const (
-	MSG_OP_REQ MsgOp = 0
-	MSG_OP_RSP       = 1
-	MSG_OP_EVT       = 2
-)
-
-const (
-	MSG_TYPE_ERR           MsgType = 1
-	MSG_TYPE_SYNC                  = 2
-	MSG_TYPE_CONNECT               = 3
-	MSG_TYPE_TERMINATE             = 4
-	MSG_TYPE_DISC_ALL_SVCS         = 5
-	MSG_TYPE_DISC_SVC_UUID         = 6
-	MSG_TYPE_DISC_ALL_CHRS         = 7
-	MSG_TYPE_DISC_CHR_UUID         = 8
-	MSG_TYPE_WRITE                 = 9
-	MSG_TYPE_WRITE_CMD             = 10
-	MSG_TYPE_EXCHANGE_MTU          = 11
-	MSG_TYPE_GEN_RAND_ADDR         = 12
-	MSG_TYPE_SET_RAND_ADDR         = 13
-	MSG_TYPE_CONN_CANCEL           = 14
-	MSG_TYPE_SCAN                  = 15
-	MSG_TYPE_SCAN_CANCEL           = 16
-
-	MSG_TYPE_SYNC_EVT       = 2049
-	MSG_TYPE_CONNECT_EVT    = 2050
-	MSG_TYPE_DISCONNECT_EVT = 2051
-	MSG_TYPE_DISC_SVC_EVT   = 2052
-	MSG_TYPE_DISC_CHR_EVT   = 2053
-	MSG_TYPE_WRITE_ACK_EVT  = 2054
-	MSG_TYPE_NOTIFY_RX_EVT  = 2055
-	MSG_TYPE_MTU_CHANGE_EVT = 2056
-	MSG_TYPE_SCAN_EVT       = 2057
-)
-
-var MsgOpStringMap = map[MsgOp]string{
-	MSG_OP_REQ: "request",
-	MSG_OP_RSP: "response",
-	MSG_OP_EVT: "event",
-}
-
-var MsgTypeStringMap = map[MsgType]string{
-	MSG_TYPE_ERR:           "error",
-	MSG_TYPE_SYNC:          "sync",
-	MSG_TYPE_CONNECT:       "connect",
-	MSG_TYPE_TERMINATE:     "terminate",
-	MSG_TYPE_DISC_SVC_UUID: "disc_svc_uuid",
-	MSG_TYPE_DISC_CHR_UUID: "disc_chr_uuid",
-	MSG_TYPE_DISC_ALL_CHRS: "disc_all_chrs",
-	MSG_TYPE_WRITE_CMD:     "write_cmd",
-	MSG_TYPE_EXCHANGE_MTU:  "exchange_mtu",
-	MSG_TYPE_CONN_CANCEL:   "conn_cancel",
-	MSG_TYPE_SCAN:          "scan",
-	MSG_TYPE_SCAN_CANCEL:   "scan_cancel",
-
-	MSG_TYPE_SYNC_EVT:       "sync_evt",
-	MSG_TYPE_CONNECT_EVT:    "connect_evt",
-	MSG_TYPE_DISCONNECT_EVT: "disconnect_evt",
-	MSG_TYPE_DISC_SVC_EVT:   "disc_svc_evt",
-	MSG_TYPE_DISC_CHR_EVT:   "disc_chr_evt",
-	MSG_TYPE_NOTIFY_RX_EVT:  "notify_rx_evt",
-	MSG_TYPE_MTU_CHANGE_EVT: "mtu_change_evt",
-	MSG_TYPE_SCAN_EVT:       "scan_evt",
-}
-
-type BleHdr struct {
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-}
-
-type BleMsg interface{}
-
-type BleSvc struct {
-	StartHandle int     `json:"start_handle"`
-	EndHandle   int     `json:"end_handle"`
-	Uuid        BleUuid `json:"uuid"`
-}
-
-type BleChr struct {
-	DefHandle  int     `json:"def_handle"`
-	ValHandle  int     `json:"val_handle"`
-	Properties int     `json:"properties"`
-	Uuid       BleUuid `json:"uuid"`
-}
-
-type BleSyncReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-}
-
-type BleConnectReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	OwnAddrType  BleAddrType `json:"own_addr_type"`
-	PeerAddrType BleAddrType `json:"peer_addr_type"`
-	PeerAddr     BleAddr     `json:"peer_addr"`
-
-	// Optional
-	DurationMs         int `json:"duration_ms"`
-	ScanItvl           int `json:"scan_itvl"`
-	ScanWindow         int `json:"scan_window"`
-	ItvlMin            int `json:"itvl_min"`
-	ItvlMax            int `json:"itvl_max"`
-	Latency            int `json:"latency"`
-	SupervisionTimeout int `json:"supervision_timeout"`
-	MinCeLen           int `json:"min_ce_len"`
-	MaxCeLen           int `json:"max_ce_len"`
-}
-
-type BleConnectRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int `json:"status"`
-}
-
-type BleConnectEvt struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status          int         `json:"status"`
-	ConnHandle      int         `json:"conn_handle"`
-	OwnIdAddrType   BleAddrType `json:"own_id_addr_type"`
-	OwnIdAddr       BleAddr     `json:"own_id_addr"`
-	OwnOtaAddrType  BleAddrType `json:"own_ota_addr_type"`
-	OwnOtaAddr      BleAddr     `json:"own_ota_addr"`
-	PeerIdAddrType  BleAddrType `json:"peer_id_addr_type"`
-	PeerIdAddr      BleAddr     `json:"peer_id_addr"`
-	PeerOtaAddrType BleAddrType `json:"peer_ota_addr_type"`
-	PeerOtaAddr     BleAddr     `json:"peer_ota_addr"`
-}
-
-type BleTerminateReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	ConnHandle int `json:"conn_handle"`
-	HciReason  int `json:"hci_reason"`
-}
-
-type BleTerminateRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int `json:"status"`
-}
-
-type BleConnCancelReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-}
-
-type BleConnCancelRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int `json:"status"`
-}
-
-type BleDisconnectEvt struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Reason     int `json:"reason"`
-	ConnHandle int `json:"conn_handle"`
-}
-
-type BleDiscSvcUuidReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	ConnHandle int     `json:"conn_handle"`
-	Uuid       BleUuid `json:"svc_uuid"`
-}
-
-type BleDiscSvcUuidRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int `json:"status"`
-}
-
-type BleDiscSvcEvt struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int    `json:"status"`
-	Svc    BleSvc `json:"service"`
-}
-
-type BleDiscChrUuidReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	ConnHandle  int     `json:"conn_handle"`
-	StartHandle int     `json:"start_handle"`
-	EndHandle   int     `json:"end_handle"`
-	Uuid        BleUuid `json:"chr_uuid"`
-}
-
-type BleDiscAllChrsReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	ConnHandle  int `json:"conn_handle"`
-	StartHandle int `json:"start_handle"`
-	EndHandle   int `json:"end_handle"`
-}
-
-type BleDiscAllChrsRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int `json:"status"`
-}
-
-type BleErrRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int    `json:"status"`
-	Msg    string `json:"msg"`
-}
-
-type BleSyncRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Synced bool `json:"synced"`
-}
-
-type BleDiscChrUuidRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int `json:"status"`
-}
-
-type BleDiscChrEvt struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int    `json:"status"`
-	Chr    BleChr `json:"characteristic"`
-}
-
-type BleWriteCmdReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	ConnHandle int      `json:"conn_handle"`
-	AttrHandle int      `json:"attr_handle"`
-	Data       BleBytes `json:"data"`
-}
-
-type BleWriteCmdRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int `json:"status"`
-}
-
-type BleSyncEvt struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Synced bool `json:"synced"`
-}
-
-type BleNotifyRxEvt struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	ConnHandle int      `json:"conn_handle"`
-	AttrHandle int      `json:"attr_handle"`
-	Indication bool     `json:"indication"`
-	Data       BleBytes `json:"data"`
-}
-
-type BleExchangeMtuReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	ConnHandle int `json:"conn_handle"`
-}
-
-type BleExchangeMtuRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int `json:"status"`
-}
-
-type BleMtuChangeEvt struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status     int `json:"status"`
-	ConnHandle int `json:"conn_handle"`
-	Mtu        int `json:"mtu"`
-}
-
-type BleScanReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	OwnAddrType      BleAddrType         `json:"own_addr_type"`
-	DurationMs       int                 `json:"duration_ms"`
-	Itvl             int                 `json:"itvl"`
-	Window           int                 `json:"window"`
-	FilterPolicy     BleScanFilterPolicy `json:"filter_policy"`
-	Limited          bool                `json:"limited"`
-	Passive          bool                `json:"passive"`
-	FilterDuplicates bool                `json:"filter_duplicates"`
-}
-
-type BleScanRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int `json:"status"`
-}
-
-type BleScanEvt struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	EventType BleAdvEventType `json:"event_type"`
-	AddrType  BleAddrType     `json:"addr_type"`
-	Addr      BleAddr         `json:"addr"`
-	Rssi      int8            `json:"rssi"`
-	Data      BleBytes        `json:"data"`
-
-	// Optional
-	DataFlags          uint8  `json:"data_flags"`
-	DataName           string `json:"data_name"`
-	DataNameIsComplete bool   `json:"data_name_is_complete"`
-}
-
-type BleScanCancelReq struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-}
-
-type BleScanCancelRsp struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Mandatory
-	Status int `json:"status"`
-}
-
-func ErrCodeToString(e int) string {
-	var s string
-
-	switch {
-	case e >= ERR_CODE_SM_PEER_BASE:
-	case e >= ERR_CODE_SM_US_BASE:
-	case e >= ERR_CODE_L2C_BASE:
-	case e >= ERR_CODE_HCI_BASE:
-		s = HciErrCodeStringMap[e-ERR_CODE_HCI_BASE]
-
-	case e >= ERR_CODE_ATT_BASE:
-	default:
-		s = ErrCodeStringMap[e]
-	}
-
-	if s == "" {
-		s = "unknown"
-	}
-
-	return s
-}
-
-func MsgOpToString(op MsgOp) string {
-	s := MsgOpStringMap[op]
-	if s == "" {
-		panic(fmt.Sprintf("Invalid MsgOp: %d", int(op)))
-	}
-
-	return s
-}
-
-func MsgOpFromString(s string) (MsgOp, error) {
-	for op, name := range MsgOpStringMap {
-		if s == name {
-			return op, nil
-		}
-	}
-
-	return MsgOp(0), errors.New("Invalid MsgOp string: " + s)
-}
-
-func MsgTypeToString(msgType MsgType) string {
-	s := MsgTypeStringMap[msgType]
-	if s == "" {
-		panic(fmt.Sprintf("Invalid MsgType: %d", int(msgType)))
-	}
-
-	return s
-}
-
-func MsgTypeFromString(s string) (MsgType, error) {
-	for addrType, name := range MsgTypeStringMap {
-		if s == name {
-			return addrType, nil
-		}
-	}
-
-	return MsgType(0), errors.New("Invalid MsgType string: " + s)
-}
-
-func (o MsgOp) MarshalJSON() ([]byte, error) {
-	return json.Marshal(MsgOpToString(o))
-}
-
-func (o *MsgOp) UnmarshalJSON(data []byte) error {
-	var err error
-
-	var s string
-	if err := json.Unmarshal(data, &s); err != nil {
-		return err
-	}
-
-	*o, err = MsgOpFromString(s)
-	return err
-}
-
-func (t MsgType) MarshalJSON() ([]byte, error) {
-	return json.Marshal(MsgTypeToString(t))
-}
-
-func (t *MsgType) UnmarshalJSON(data []byte) error {
-	var err error
-
-	var s string
-	if err := json.Unmarshal(data, &s); err != nil {
-		return err
-	}
-
-	*t, err = MsgTypeFromString(s)
-	return err
-}
-
-func (bb *BleBytes) MarshalJSON() ([]byte, error) {
-	var buf bytes.Buffer
-	buf.Grow(len(bb.Bytes) * 5)
-
-	for i, b := range bb.Bytes {
-		if i != 0 {
-			buf.WriteString(":")
-		}
-		fmt.Fprintf(&buf, "0x%02x", b)
-	}
-
-	s := buf.String()
-	return json.Marshal(s)
-
-	return buf.Bytes(), nil
-}
-
-func (bb *BleBytes) UnmarshalJSON(data []byte) error {
-	var s string
-	if err := json.Unmarshal(data, &s); err != nil {
-		return err
-	}
-
-	// strings.Split() appears to return { nil } when passed an empty string.
-	if len(s) == 0 {
-		return nil
-	}
-
-	toks := strings.Split(strings.ToLower(s), ":")
-	bb.Bytes = make([]byte, len(toks))
-
-	for i, t := range toks {
-		if !strings.HasPrefix(t, "0x") {
-			return fmt.Errorf(
-				"Byte stream contains invalid token; token=%s stream=%s", t, s)
-		}
-
-		u64, err := strconv.ParseUint(t, 0, 8)
-		if err != nil {
-			return err
-		}
-		bb.Bytes[i] = byte(u64)
-	}
-
-	return nil
-}
-
-func (bu *BleUuid) String() string {
-	var buf bytes.Buffer
-	buf.Grow(len(bu.Bytes)*2 + 3)
-
-	// XXX: For now, only support 128-bit UUIDs.
-
-	for i, b := range bu.Bytes {
-		switch i {
-		case 4, 6, 8, 10:
-			buf.WriteString("-")
-		}
-
-		fmt.Fprintf(&buf, "%02x", b)
-	}
-
-	return buf.String()
-}
-
-func (bu *BleUuid) MarshalJSON() ([]byte, error) {
-	return json.Marshal(bu.String())
-}
-
-func (bu *BleUuid) UnmarshalJSON(data []byte) error {
-	var s string
-	if err := json.Unmarshal(data, &s); err != nil {
-		return err
-	}
-
-	var err error
-	*bu, err = ParseUuid(s)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func CompareUuids(a BleUuid, b BleUuid) int {
-	return bytes.Compare(a.Bytes[:], b.Bytes[:])
-}



[53/67] [abbrv] incubator-mynewt-newtmgr git commit: nmxact - Scan on each conn in case peer chgs addr.

Posted by cc...@apache.org.
nmxact - Scan on each conn in case peer chgs addr.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/ae52880d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/ae52880d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/ae52880d

Branch: refs/heads/master
Commit: ae52880d6b2048e9765f6870b5d5487a2ccda038
Parents: 06f33c0
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Mar 28 11:51:05 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 nmxact/nmble/ble_fsm.go | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/ae52880d/nmxact/nmble/ble_fsm.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_fsm.go b/nmxact/nmble/ble_fsm.go
index 411ce59..52f61b8 100644
--- a/nmxact/nmble/ble_fsm.go
+++ b/nmxact/nmble/ble_fsm.go
@@ -88,16 +88,6 @@ func NewBleFsm(p BleFsmParams) *BleFsm {
 		attMtu: DFLT_ATT_MTU,
 	}
 
-	// The peer spec contains one of:
-	//     * Peer address;
-	//     * Predicate function to call during scanning.
-	// If a peer address is specified, fill in the peer field now so the
-	// scanning step can be skipped.  Otherwise, the peer field gets populated
-	// during scanning.
-	if bf.peerSpec.ScanPred == nil {
-		bf.peerDev = &bf.peerSpec.Dev
-	}
-
 	return bf
 }
 
@@ -294,6 +284,7 @@ func (bf *BleFsm) connectListen(seq int) error {
 					}
 
 					bf.setState(SESN_STATE_UNCONNECTED)
+					bf.peerDev = nil
 					bf.disconnectCb(err)
 					return
 
@@ -606,6 +597,23 @@ func (bf *BleFsm) subscribe() error {
 	return nil
 }
 
+// Tries to populate the FSM's peerDev field.  This function succeeds if the
+// client specified the address of the peer to connect to.
+func (bf *BleFsm) tryFillPeerDev() bool {
+	// The peer spec contains one of:
+	//     * Peer address;
+	//     * Predicate function to call during scanning.
+	// If a peer address is specified, fill in the peer field now so the
+	// scanning step can be skipped.  Otherwise, the peer field gets populated
+	// during scanning.
+	if bf.peerSpec.ScanPred == nil {
+		bf.peerDev = &bf.peerSpec.Dev
+		return true
+	}
+
+	return false
+}
+
 func (bf *BleFsm) Start() error {
 	if bf.getState() != SESN_STATE_UNCONNECTED {
 		return nmxutil.NewSesnAlreadyOpenError(
@@ -623,6 +631,7 @@ func (bf *BleFsm) Start() error {
 			// address, or if we have already successfully scanned, we initiate
 			// a connection now.  Otherwise, we need to scan to determine which
 			// peer meets the specified scan criteria.
+			bf.tryFillPeerDev()
 			if bf.peerDev == nil {
 				// Peer not inferred yet.  Initiate scan.
 				cb := func() error { return bf.scan() }


[17/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
deleted file mode 100644
index b4338d5..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go
+++ /dev/null
@@ -1,1712 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,netbsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_ARP                            = 0x1c
-	AF_BLUETOOTH                      = 0x1f
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1a
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x20
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x18
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1a
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x23
-	AF_MPLS                           = 0x21
-	AF_NATM                           = 0x1b
-	AF_NS                             = 0x6
-	AF_OROUTE                         = 0x11
-	AF_OSI                            = 0x7
-	AF_PUP                            = 0x4
-	AF_ROUTE                          = 0x22
-	AF_SNA                            = 0xb
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	ARPHRD_ARCNET                     = 0x7
-	ARPHRD_ETHER                      = 0x1
-	ARPHRD_FRELAY                     = 0xf
-	ARPHRD_IEEE1394                   = 0x18
-	ARPHRD_IEEE802                    = 0x6
-	ARPHRD_STRIP                      = 0x17
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B460800                           = 0x70800
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B921600                           = 0xe1000
-	B9600                             = 0x2580
-	BIOCFEEDBACK                      = 0x8004427d
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc0084277
-	BIOCGETIF                         = 0x4090426b
-	BIOCGFEEDBACK                     = 0x4004427c
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRTIMEOUT                     = 0x400c427b
-	BIOCGSEESENT                      = 0x40044278
-	BIOCGSTATS                        = 0x4080426f
-	BIOCGSTATSOLD                     = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDLT                          = 0x80044276
-	BIOCSETF                          = 0x80084267
-	BIOCSETIF                         = 0x8090426c
-	BIOCSFEEDBACK                     = 0x8004427d
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRTIMEOUT                     = 0x800c427a
-	BIOCSSEESENT                      = 0x80044279
-	BIOCSTCPF                         = 0x80084272
-	BIOCSUDPF                         = 0x80084273
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALIGNMENT32                   = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DFLTBUFSIZE                   = 0x100000
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x1000000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CLONE_CSIGNAL                     = 0xff
-	CLONE_FILES                       = 0x400
-	CLONE_FS                          = 0x200
-	CLONE_PID                         = 0x1000
-	CLONE_PTRACE                      = 0x2000
-	CLONE_SIGHAND                     = 0x800
-	CLONE_VFORK                       = 0x4000
-	CLONE_VM                          = 0x100
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	CTL_QUERY                         = -0x2
-	DIOCBSFLUSH                       = 0x20006478
-	DLT_A429                          = 0xb8
-	DLT_A653_ICM                      = 0xb9
-	DLT_AIRONET_HEADER                = 0x78
-	DLT_AOS                           = 0xde
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ARCNET_LINUX                  = 0x81
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AURORA                        = 0x7e
-	DLT_AX25                          = 0x3
-	DLT_AX25_KISS                     = 0xca
-	DLT_BACNET_MS_TP                  = 0xa5
-	DLT_BLUETOOTH_HCI_H4              = 0xbb
-	DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-	DLT_CAN20B                        = 0xbe
-	DLT_CAN_SOCKETCAN                 = 0xe3
-	DLT_CHAOS                         = 0x5
-	DLT_CISCO_IOS                     = 0x76
-	DLT_C_HDLC                        = 0x68
-	DLT_C_HDLC_WITH_DIR               = 0xcd
-	DLT_DECT                          = 0xdd
-	DLT_DOCSIS                        = 0x8f
-	DLT_ECONET                        = 0x73
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0x6d
-	DLT_ERF                           = 0xc5
-	DLT_ERF_ETH                       = 0xaf
-	DLT_ERF_POS                       = 0xb0
-	DLT_FC_2                          = 0xe0
-	DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-	DLT_FDDI                          = 0xa
-	DLT_FLEXRAY                       = 0xd2
-	DLT_FRELAY                        = 0x6b
-	DLT_FRELAY_WITH_DIR               = 0xce
-	DLT_GCOM_SERIAL                   = 0xad
-	DLT_GCOM_T1E1                     = 0xac
-	DLT_GPF_F                         = 0xab
-	DLT_GPF_T                         = 0xaa
-	DLT_GPRS_LLC                      = 0xa9
-	DLT_GSMTAP_ABIS                   = 0xda
-	DLT_GSMTAP_UM                     = 0xd9
-	DLT_HDLC                          = 0x10
-	DLT_HHDLC                         = 0x79
-	DLT_HIPPI                         = 0xf
-	DLT_IBM_SN                        = 0x92
-	DLT_IBM_SP                        = 0x91
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_IEEE802_15_4                  = 0xc3
-	DLT_IEEE802_15_4_LINUX            = 0xbf
-	DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-	DLT_IEEE802_16_MAC_CPS            = 0xbc
-	DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-	DLT_IPMB                          = 0xc7
-	DLT_IPMB_LINUX                    = 0xd1
-	DLT_IPNET                         = 0xe2
-	DLT_IPV4                          = 0xe4
-	DLT_IPV6                          = 0xe5
-	DLT_IP_OVER_FC                    = 0x7a
-	DLT_JUNIPER_ATM1                  = 0x89
-	DLT_JUNIPER_ATM2                  = 0x87
-	DLT_JUNIPER_CHDLC                 = 0xb5
-	DLT_JUNIPER_ES                    = 0x84
-	DLT_JUNIPER_ETHER                 = 0xb2
-	DLT_JUNIPER_FRELAY                = 0xb4
-	DLT_JUNIPER_GGSN                  = 0x85
-	DLT_JUNIPER_ISM                   = 0xc2
-	DLT_JUNIPER_MFR                   = 0x86
-	DLT_JUNIPER_MLFR                  = 0x83
-	DLT_JUNIPER_MLPPP                 = 0x82
-	DLT_JUNIPER_MONITOR               = 0xa4
-	DLT_JUNIPER_PIC_PEER              = 0xae
-	DLT_JUNIPER_PPP                   = 0xb3
-	DLT_JUNIPER_PPPOE                 = 0xa7
-	DLT_JUNIPER_PPPOE_ATM             = 0xa8
-	DLT_JUNIPER_SERVICES              = 0x88
-	DLT_JUNIPER_ST                    = 0xc8
-	DLT_JUNIPER_VP                    = 0xb7
-	DLT_LAPB_WITH_DIR                 = 0xcf
-	DLT_LAPD                          = 0xcb
-	DLT_LIN                           = 0xd4
-	DLT_LINUX_EVDEV                   = 0xd8
-	DLT_LINUX_IRDA                    = 0x90
-	DLT_LINUX_LAPD                    = 0xb1
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_LTALK                         = 0x72
-	DLT_MFR                           = 0xb6
-	DLT_MOST                          = 0xd3
-	DLT_MPLS                          = 0xdb
-	DLT_MTP2                          = 0x8c
-	DLT_MTP2_WITH_PHDR                = 0x8b
-	DLT_MTP3                          = 0x8d
-	DLT_NULL                          = 0x0
-	DLT_PCI_EXP                       = 0x7d
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPI                           = 0xc0
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0xe
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_PPPD                      = 0xa6
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PPP_WITH_DIR                  = 0xcc
-	DLT_PRISM_HEADER                  = 0x77
-	DLT_PRONET                        = 0x4
-	DLT_RAIF1                         = 0xc6
-	DLT_RAW                           = 0xc
-	DLT_RAWAF_MASK                    = 0x2240000
-	DLT_RIO                           = 0x7c
-	DLT_SCCP                          = 0x8e
-	DLT_SITA                          = 0xc4
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xd
-	DLT_SUNATM                        = 0x7b
-	DLT_SYMANTEC_FIREWALL             = 0x63
-	DLT_TZSP                          = 0x80
-	DLT_USB                           = 0xba
-	DLT_USB_LINUX                     = 0xbd
-	DLT_USB_LINUX_MMAPPED             = 0xdc
-	DLT_WIHART                        = 0xdf
-	DLT_X2E_SERIAL                    = 0xd5
-	DLT_X2E_XORAYA                    = 0xd6
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EMUL_LINUX                        = 0x1
-	EMUL_LINUX32                      = 0x5
-	EMUL_MAXID                        = 0x6
-	EN_SW_CTL_INF                     = 0x1000
-	EN_SW_CTL_PREC                    = 0x300
-	EN_SW_CTL_ROUND                   = 0xc00
-	EN_SW_DATACHAIN                   = 0x80
-	EN_SW_DENORM                      = 0x2
-	EN_SW_INVOP                       = 0x1
-	EN_SW_OVERFLOW                    = 0x8
-	EN_SW_PRECLOSS                    = 0x20
-	EN_SW_UNDERFLOW                   = 0x10
-	EN_SW_ZERODIV                     = 0x4
-	ETHERCAP_JUMBO_MTU                = 0x4
-	ETHERCAP_VLAN_HWTAGGING           = 0x2
-	ETHERCAP_VLAN_MTU                 = 0x1
-	ETHERMIN                          = 0x2e
-	ETHERMTU                          = 0x5dc
-	ETHERMTU_JUMBO                    = 0x2328
-	ETHERTYPE_8023                    = 0x4
-	ETHERTYPE_AARP                    = 0x80f3
-	ETHERTYPE_ACCTON                  = 0x8390
-	ETHERTYPE_AEONIC                  = 0x8036
-	ETHERTYPE_ALPHA                   = 0x814a
-	ETHERTYPE_AMBER                   = 0x6008
-	ETHERTYPE_AMOEBA                  = 0x8145
-	ETHERTYPE_APOLLO                  = 0x80f7
-	ETHERTYPE_APOLLODOMAIN            = 0x8019
-	ETHERTYPE_APPLETALK               = 0x809b
-	ETHERTYPE_APPLITEK                = 0x80c7
-	ETHERTYPE_ARGONAUT                = 0x803a
-	ETHERTYPE_ARP                     = 0x806
-	ETHERTYPE_AT                      = 0x809b
-	ETHERTYPE_ATALK                   = 0x809b
-	ETHERTYPE_ATOMIC                  = 0x86df
-	ETHERTYPE_ATT                     = 0x8069
-	ETHERTYPE_ATTSTANFORD             = 0x8008
-	ETHERTYPE_AUTOPHON                = 0x806a
-	ETHERTYPE_AXIS                    = 0x8856
-	ETHERTYPE_BCLOOP                  = 0x9003
-	ETHERTYPE_BOFL                    = 0x8102
-	ETHERTYPE_CABLETRON               = 0x7034
-	ETHERTYPE_CHAOS                   = 0x804
-	ETHERTYPE_COMDESIGN               = 0x806c
-	ETHERTYPE_COMPUGRAPHIC            = 0x806d
-	ETHERTYPE_COUNTERPOINT            = 0x8062
-	ETHERTYPE_CRONUS                  = 0x8004
-	ETHERTYPE_CRONUSVLN               = 0x8003
-	ETHERTYPE_DCA                     = 0x1234
-	ETHERTYPE_DDE                     = 0x807b
-	ETHERTYPE_DEBNI                   = 0xaaaa
-	ETHERTYPE_DECAM                   = 0x8048
-	ETHERTYPE_DECCUST                 = 0x6006
-	ETHERTYPE_DECDIAG                 = 0x6005
-	ETHERTYPE_DECDNS                  = 0x803c
-	ETHERTYPE_DECDTS                  = 0x803e
-	ETHERTYPE_DECEXPER                = 0x6000
-	ETHERTYPE_DECLAST                 = 0x8041
-	ETHERTYPE_DECLTM                  = 0x803f
-	ETHERTYPE_DECMUMPS                = 0x6009
-	ETHERTYPE_DECNETBIOS              = 0x8040
-	ETHERTYPE_DELTACON                = 0x86de
-	ETHERTYPE_DIDDLE                  = 0x4321
-	ETHERTYPE_DLOG1                   = 0x660
-	ETHERTYPE_DLOG2                   = 0x661
-	ETHERTYPE_DN                      = 0x6003
-	ETHERTYPE_DOGFIGHT                = 0x1989
-	ETHERTYPE_DSMD                    = 0x8039
-	ETHERTYPE_ECMA                    = 0x803
-	ETHERTYPE_ENCRYPT                 = 0x803d
-	ETHERTYPE_ES                      = 0x805d
-	ETHERTYPE_EXCELAN                 = 0x8010
-	ETHERTYPE_EXPERDATA               = 0x8049
-	ETHERTYPE_FLIP                    = 0x8146
-	ETHERTYPE_FLOWCONTROL             = 0x8808
-	ETHERTYPE_FRARP                   = 0x808
-	ETHERTYPE_GENDYN                  = 0x8068
-	ETHERTYPE_HAYES                   = 0x8130
-	ETHERTYPE_HIPPI_FP                = 0x8180
-	ETHERTYPE_HITACHI                 = 0x8820
-	ETHERTYPE_HP                      = 0x8005
-	ETHERTYPE_IEEEPUP                 = 0xa00
-	ETHERTYPE_IEEEPUPAT               = 0xa01
-	ETHERTYPE_IMLBL                   = 0x4c42
-	ETHERTYPE_IMLBLDIAG               = 0x424c
-	ETHERTYPE_IP                      = 0x800
-	ETHERTYPE_IPAS                    = 0x876c
-	ETHERTYPE_IPV6                    = 0x86dd
-	ETHERTYPE_IPX                     = 0x8137
-	ETHERTYPE_IPXNEW                  = 0x8037
-	ETHERTYPE_KALPANA                 = 0x8582
-	ETHERTYPE_LANBRIDGE               = 0x8038
-	ETHERTYPE_LANPROBE                = 0x8888
-	ETHERTYPE_LAT                     = 0x6004
-	ETHERTYPE_LBACK                   = 0x9000
-	ETHERTYPE_LITTLE                  = 0x8060
-	ETHERTYPE_LOGICRAFT               = 0x8148
-	ETHERTYPE_LOOPBACK                = 0x9000
-	ETHERTYPE_MATRA                   = 0x807a
-	ETHERTYPE_MAX                     = 0xffff
-	ETHERTYPE_MERIT                   = 0x807c
-	ETHERTYPE_MICP                    = 0x873a
-	ETHERTYPE_MOPDL                   = 0x6001
-	ETHERTYPE_MOPRC                   = 0x6002
-	ETHERTYPE_MOTOROLA                = 0x818d
-	ETHERTYPE_MPLS                    = 0x8847
-	ETHERTYPE_MPLS_MCAST              = 0x8848
-	ETHERTYPE_MUMPS                   = 0x813f
-	ETHERTYPE_NBPCC                   = 0x3c04
-	ETHERTYPE_NBPCLAIM                = 0x3c09
-	ETHERTYPE_NBPCLREQ                = 0x3c05
-	ETHERTYPE_NBPCLRSP                = 0x3c06
-	ETHERTYPE_NBPCREQ                 = 0x3c02
-	ETHERTYPE_NBPCRSP                 = 0x3c03
-	ETHERTYPE_NBPDG                   = 0x3c07
-	ETHERTYPE_NBPDGB                  = 0x3c08
-	ETHERTYPE_NBPDLTE                 = 0x3c0a
-	ETHERTYPE_NBPRAR                  = 0x3c0c
-	ETHERTYPE_NBPRAS                  = 0x3c0b
-	ETHERTYPE_NBPRST                  = 0x3c0d
-	ETHERTYPE_NBPSCD                  = 0x3c01
-	ETHERTYPE_NBPVCD                  = 0x3c00
-	ETHERTYPE_NBS                     = 0x802
-	ETHERTYPE_NCD                     = 0x8149
-	ETHERTYPE_NESTAR                  = 0x8006
-	ETHERTYPE_NETBEUI                 = 0x8191
-	ETHERTYPE_NOVELL                  = 0x8138
-	ETHERTYPE_NS                      = 0x600
-	ETHERTYPE_NSAT                    = 0x601
-	ETHERTYPE_NSCOMPAT                = 0x807
-	ETHERTYPE_NTRAILER                = 0x10
-	ETHERTYPE_OS9                     = 0x7007
-	ETHERTYPE_OS9NET                  = 0x7009
-	ETHERTYPE_PACER                   = 0x80c6
-	ETHERTYPE_PAE                     = 0x888e
-	ETHERTYPE_PCS                     = 0x4242
-	ETHERTYPE_PLANNING                = 0x8044
-	ETHERTYPE_PPP                     = 0x880b
-	ETHERTYPE_PPPOE                   = 0x8864
-	ETHERTYPE_PPPOEDISC               = 0x8863
-	ETHERTYPE_PRIMENTS                = 0x7031
-	ETHERTYPE_PUP                     = 0x200
-	ETHERTYPE_PUPAT                   = 0x200
-	ETHERTYPE_RACAL                   = 0x7030
-	ETHERTYPE_RATIONAL                = 0x8150
-	ETHERTYPE_RAWFR                   = 0x6559
-	ETHERTYPE_RCL                     = 0x1995
-	ETHERTYPE_RDP                     = 0x8739
-	ETHERTYPE_RETIX                   = 0x80f2
-	ETHERTYPE_REVARP                  = 0x8035
-	ETHERTYPE_SCA                     = 0x6007
-	ETHERTYPE_SECTRA                  = 0x86db
-	ETHERTYPE_SECUREDATA              = 0x876d
-	ETHERTYPE_SGITW                   = 0x817e
-	ETHERTYPE_SG_BOUNCE               = 0x8016
-	ETHERTYPE_SG_DIAG                 = 0x8013
-	ETHERTYPE_SG_NETGAMES             = 0x8014
-	ETHERTYPE_SG_RESV                 = 0x8015
-	ETHERTYPE_SIMNET                  = 0x5208
-	ETHERTYPE_SLOWPROTOCOLS           = 0x8809
-	ETHERTYPE_SNA                     = 0x80d5
-	ETHERTYPE_SNMP                    = 0x814c
-	ETHERTYPE_SONIX                   = 0xfaf5
-	ETHERTYPE_SPIDER                  = 0x809f
-	ETHERTYPE_SPRITE                  = 0x500
-	ETHERTYPE_STP                     = 0x8181
-	ETHERTYPE_TALARIS                 = 0x812b
-	ETHERTYPE_TALARISMC               = 0x852b
-	ETHERTYPE_TCPCOMP                 = 0x876b
-	ETHERTYPE_TCPSM                   = 0x9002
-	ETHERTYPE_TEC                     = 0x814f
-	ETHERTYPE_TIGAN                   = 0x802f
-	ETHERTYPE_TRAIL                   = 0x1000
-	ETHERTYPE_TRANSETHER              = 0x6558
-	ETHERTYPE_TYMSHARE                = 0x802e
-	ETHERTYPE_UBBST                   = 0x7005
-	ETHERTYPE_UBDEBUG                 = 0x900
-	ETHERTYPE_UBDIAGLOOP              = 0x7002
-	ETHERTYPE_UBDL                    = 0x7000
-	ETHERTYPE_UBNIU                   = 0x7001
-	ETHERTYPE_UBNMC                   = 0x7003
-	ETHERTYPE_VALID                   = 0x1600
-	ETHERTYPE_VARIAN                  = 0x80dd
-	ETHERTYPE_VAXELN                  = 0x803b
-	ETHERTYPE_VEECO                   = 0x8067
-	ETHERTYPE_VEXP                    = 0x805b
-	ETHERTYPE_VGLAB                   = 0x8131
-	ETHERTYPE_VINES                   = 0xbad
-	ETHERTYPE_VINESECHO               = 0xbaf
-	ETHERTYPE_VINESLOOP               = 0xbae
-	ETHERTYPE_VITAL                   = 0xff00
-	ETHERTYPE_VLAN                    = 0x8100
-	ETHERTYPE_VLTLMAN                 = 0x8080
-	ETHERTYPE_VPROD                   = 0x805c
-	ETHERTYPE_VURESERVED              = 0x8147
-	ETHERTYPE_WATERLOO                = 0x8130
-	ETHERTYPE_WELLFLEET               = 0x8103
-	ETHERTYPE_X25                     = 0x805
-	ETHERTYPE_X75                     = 0x801
-	ETHERTYPE_XNSSM                   = 0x9001
-	ETHERTYPE_XTP                     = 0x817d
-	ETHER_ADDR_LEN                    = 0x6
-	ETHER_CRC_LEN                     = 0x4
-	ETHER_CRC_POLY_BE                 = 0x4c11db6
-	ETHER_CRC_POLY_LE                 = 0xedb88320
-	ETHER_HDR_LEN                     = 0xe
-	ETHER_MAX_LEN                     = 0x5ee
-	ETHER_MAX_LEN_JUMBO               = 0x233a
-	ETHER_MIN_LEN                     = 0x40
-	ETHER_PPPOE_ENCAP_LEN             = 0x8
-	ETHER_TYPE_LEN                    = 0x2
-	ETHER_VLAN_ENCAP_LEN              = 0x4
-	EVFILT_AIO                        = 0x2
-	EVFILT_PROC                       = 0x4
-	EVFILT_READ                       = 0x0
-	EVFILT_SIGNAL                     = 0x5
-	EVFILT_SYSCOUNT                   = 0x7
-	EVFILT_TIMER                      = 0x6
-	EVFILT_VNODE                      = 0x3
-	EVFILT_WRITE                      = 0x1
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x100
-	FLUSHO                            = 0x800000
-	F_CLOSEM                          = 0xa
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0xc
-	F_FSCTL                           = -0x80000000
-	F_FSDIRMASK                       = 0x70000000
-	F_FSIN                            = 0x10000000
-	F_FSINOUT                         = 0x30000000
-	F_FSOUT                           = 0x20000000
-	F_FSPRIV                          = 0x8000
-	F_FSVOID                          = 0x40000000
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETNOSIGPIPE                    = 0xd
-	F_GETOWN                          = 0x5
-	F_MAXFD                           = 0xb
-	F_OK                              = 0x0
-	F_PARAM_MASK                      = 0xfff
-	F_PARAM_MAX                       = 0xfff
-	F_RDLCK                           = 0x1
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETNOSIGPIPE                    = 0xe
-	F_SETOWN                          = 0x6
-	F_UNLCK                           = 0x2
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFAN_ARRIVAL                      = 0x0
-	IFAN_DEPARTURE                    = 0x1
-	IFA_ROUTE                         = 0x1
-	IFF_ALLMULTI                      = 0x200
-	IFF_BROADCAST                     = 0x2
-	IFF_CANTCHANGE                    = 0x8f52
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_A12MPPSWITCH                  = 0x82
-	IFT_AAL2                          = 0xbb
-	IFT_AAL5                          = 0x31
-	IFT_ADSL                          = 0x5e
-	IFT_AFLANE8023                    = 0x3b
-	IFT_AFLANE8025                    = 0x3c
-	IFT_ARAP                          = 0x58
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ASYNC                         = 0x54
-	IFT_ATM                           = 0x25
-	IFT_ATMDXI                        = 0x69
-	IFT_ATMFUNI                       = 0x6a
-	IFT_ATMIMA                        = 0x6b
-	IFT_ATMLOGICAL                    = 0x50
-	IFT_ATMRADIO                      = 0xbd
-	IFT_ATMSUBINTERFACE               = 0x86
-	IFT_ATMVCIENDPT                   = 0xc2
-	IFT_ATMVIRTUAL                    = 0x95
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
-	IFT_BRIDGE                        = 0xd1
-	IFT_BSC                           = 0x53
-	IFT_CARP                          = 0xf8
-	IFT_CCTEMUL                       = 0x3d
-	IFT_CEPT                          = 0x13
-	IFT_CES                           = 0x85
-	IFT_CHANNEL                       = 0x46
-	IFT_CNR                           = 0x55
-	IFT_COFFEE                        = 0x84
-	IFT_COMPOSITELINK                 = 0x9b
-	IFT_DCN                           = 0x8d
-	IFT_DIGITALPOWERLINE              = 0x8a
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-	IFT_DLSW                          = 0x4a
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
-	IFT_DOCSCABLEMACLAYER             = 0x7f
-	IFT_DOCSCABLEUPSTREAM             = 0x81
-	IFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd
-	IFT_DS0                           = 0x51
-	IFT_DS0BUNDLE                     = 0x52
-	IFT_DS1FDL                        = 0xaa
-	IFT_DS3                           = 0x1e
-	IFT_DTM                           = 0x8c
-	IFT_DVBASILN                      = 0xac
-	IFT_DVBASIOUT                     = 0xad
-	IFT_DVBRCCDOWNSTREAM              = 0x93
-	IFT_DVBRCCMACLAYER                = 0x92
-	IFT_DVBRCCUPSTREAM                = 0x94
-	IFT_ECONET                        = 0xce
-	IFT_EON                           = 0x19
-	IFT_EPLRS                         = 0x57
-	IFT_ESCON                         = 0x49
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0xf2
-	IFT_FAST                          = 0x7d
-	IFT_FASTETHER                     = 0x3e
-	IFT_FASTETHERFX                   = 0x45
-	IFT_FDDI                          = 0xf
-	IFT_FIBRECHANNEL                  = 0x38
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
-	IFT_FRAMERELAYMPI                 = 0x5c
-	IFT_FRDLCIENDPT                   = 0xc1
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_FRF16MFRBUNDLE                = 0xa3
-	IFT_FRFORWARD                     = 0x9e
-	IFT_G703AT2MB                     = 0x43
-	IFT_G703AT64K                     = 0x42
-	IFT_GIF                           = 0xf0
-	IFT_GIGABITETHERNET               = 0x75
-	IFT_GR303IDT                      = 0xb2
-	IFT_GR303RDT                      = 0xb1
-	IFT_H323GATEKEEPER                = 0xa4
-	IFT_H323PROXY                     = 0xa5
-	IFT_HDH1822                       = 0x3
-	IFT_HDLC                          = 0x76
-	IFT_HDSL2                         = 0xa8
-	IFT_HIPERLAN2                     = 0xb7
-	IFT_HIPPI                         = 0x2f
-	IFT_HIPPIINTERFACE                = 0x39
-	IFT_HOSTPAD                       = 0x5a
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IBM370PARCHAN                 = 0x48
-	IFT_IDSL                          = 0x9a
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE80211                     = 0x47
-	IFT_IEEE80212                     = 0x37
-	IFT_IEEE8023ADLAG                 = 0xa1
-	IFT_IFGSN                         = 0x91
-	IFT_IMT                           = 0xbe
-	IFT_INFINIBAND                    = 0xc7
-	IFT_INTERLEAVE                    = 0x7c
-	IFT_IP                            = 0x7e
-	IFT_IPFORWARD                     = 0x8e
-	IFT_IPOVERATM                     = 0x72
-	IFT_IPOVERCDLC                    = 0x6d
-	IFT_IPOVERCLAW                    = 0x6e
-	IFT_IPSWITCH                      = 0x4e
-	IFT_ISDN                          = 0x3f
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISDNS                         = 0x4b
-	IFT_ISDNU                         = 0x4c
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88025CRFPINT               = 0x62
-	IFT_ISO88025DTR                   = 0x56
-	IFT_ISO88025FIBER                 = 0x73
-	IFT_ISO88026                      = 0xa
-	IFT_ISUP                          = 0xb3
-	IFT_L2VLAN                        = 0x87
-	IFT_L3IPVLAN                      = 0x88
-	IFT_L3IPXVLAN                     = 0x89
-	IFT_LAPB                          = 0x10
-	IFT_LAPD                          = 0x4d
-	IFT_LAPF                          = 0x77
-	IFT_LINEGROUP                     = 0xd2
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MEDIAMAILOVERIP               = 0x8b
-	IFT_MFSIGLINK                     = 0xa7
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_MPC                           = 0x71
-	IFT_MPLS                          = 0xa6
-	IFT_MPLSTUNNEL                    = 0x96
-	IFT_MSDSL                         = 0x8f
-	IFT_MVL                           = 0xbf
-	IFT_MYRINET                       = 0x63
-	IFT_NFAS                          = 0xaf
-	IFT_NSIP                          = 0x1b
-	IFT_OPTICALCHANNEL                = 0xc3
-	IFT_OPTICALTRANSPORT              = 0xc4
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PFLOG                         = 0xf5
-	IFT_PFSYNC                        = 0xf6
-	IFT_PLC                           = 0xae
-	IFT_PON155                        = 0xcf
-	IFT_PON622                        = 0xd0
-	IFT_POS                           = 0xab
-	IFT_PPP                           = 0x17
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
-	IFT_PROPATM                       = 0xc5
-	IFT_PROPBWAP2MP                   = 0xb8
-	IFT_PROPCNLS                      = 0x59
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PROPWIRELESSP2P               = 0x9d
-	IFT_PTPSERIAL                     = 0x16
-	IFT_PVC                           = 0xf1
-	IFT_Q2931                         = 0xc9
-	IFT_QLLC                          = 0x44
-	IFT_RADIOMAC                      = 0xbc
-	IFT_RADSL                         = 0x5f
-	IFT_REACHDSL                      = 0xc0
-	IFT_RFC1483                       = 0x9f
-	IFT_RS232                         = 0x21
-	IFT_RSRB                          = 0x4f
-	IFT_SDLC                          = 0x11
-	IFT_SDSL                          = 0x60
-	IFT_SHDSL                         = 0xa9
-	IFT_SIP                           = 0x1f
-	IFT_SIPSIG                        = 0xcc
-	IFT_SIPTG                         = 0xcb
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_SRP                           = 0x97
-	IFT_SS7SIGLINK                    = 0x9c
-	IFT_STACKTOSTACK                  = 0x6f
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0xd7
-	IFT_T1                            = 0x12
-	IFT_TDLC                          = 0x74
-	IFT_TELINK                        = 0xc8
-	IFT_TERMPAD                       = 0x5b
-	IFT_TR008                         = 0xb0
-	IFT_TRANSPHDLC                    = 0x7b
-	IFT_TUNNEL                        = 0x83
-	IFT_ULTRA                         = 0x1d
-	IFT_USB                           = 0xa0
-	IFT_V11                           = 0x40
-	IFT_V35                           = 0x2d
-	IFT_V36                           = 0x41
-	IFT_V37                           = 0x78
-	IFT_VDSL                          = 0x61
-	IFT_VIRTUALIPADDRESS              = 0x70
-	IFT_VIRTUALTG                     = 0xca
-	IFT_VOICEDID                      = 0xd5
-	IFT_VOICEEM                       = 0x64
-	IFT_VOICEEMFGD                    = 0xd3
-	IFT_VOICEENCAP                    = 0x67
-	IFT_VOICEFGDEANA                  = 0xd4
-	IFT_VOICEFXO                      = 0x65
-	IFT_VOICEFXS                      = 0x66
-	IFT_VOICEOVERATM                  = 0x98
-	IFT_VOICEOVERCABLE                = 0xc6
-	IFT_VOICEOVERFRAMERELAY           = 0x99
-	IFT_VOICEOVERIP                   = 0x68
-	IFT_X213                          = 0x5d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25HUNTGROUP                  = 0x7a
-	IFT_X25MLP                        = 0x79
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LOOPBACKNET                    = 0x7f
-	IPPROTO_AH                        = 0x33
-	IPPROTO_CARP                      = 0x70
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IPV6_ICMP                 = 0x3a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MOBILE                    = 0x37
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_PFSYNC                    = 0xf0
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_VRRP                      = 0x70
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_DONTFRAG                     = 0x3e
-	IPV6_DSTOPTS                      = 0x32
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_HOPLIMIT                     = 0x2f
-	IPV6_HOPOPTS                      = 0x31
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_NEXTHOP                      = 0x30
-	IPV6_PATHMTU                      = 0x2c
-	IPV6_PKTINFO                      = 0x2e
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVDSTOPTS                  = 0x28
-	IPV6_RECVHOPLIMIT                 = 0x25
-	IPV6_RECVHOPOPTS                  = 0x27
-	IPV6_RECVPATHMTU                  = 0x2b
-	IPV6_RECVPKTINFO                  = 0x24
-	IPV6_RECVRTHDR                    = 0x26
-	IPV6_RECVTCLASS                   = 0x39
-	IPV6_RTHDR                        = 0x33
-	IPV6_RTHDRDSTOPTS                 = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x3d
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_USE_MIN_MTU                  = 0x2a
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_EF                             = 0x8000
-	IP_ERRORMTU                       = 0x15
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x16
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_MEMBERSHIPS                = 0x14
-	IP_MF                             = 0x2000
-	IP_MINFRAGSIZE                    = 0x45
-	IP_MINTTL                         = 0x18
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_OFFMASK                        = 0x1fff
-	IP_OPTIONS                        = 0x1
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTTL                        = 0x17
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_TOS                            = 0x3
-	IP_TTL                            = 0x4
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x6
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_SPACEAVAIL                   = 0x5
-	MADV_WILLNEED                     = 0x3
-	MAP_ALIGNMENT_16MB                = 0x18000000
-	MAP_ALIGNMENT_1TB                 = 0x28000000
-	MAP_ALIGNMENT_256TB               = 0x30000000
-	MAP_ALIGNMENT_4GB                 = 0x20000000
-	MAP_ALIGNMENT_64KB                = 0x10000000
-	MAP_ALIGNMENT_64PB                = 0x38000000
-	MAP_ALIGNMENT_MASK                = -0x1000000
-	MAP_ALIGNMENT_SHIFT               = 0x18
-	MAP_ANON                          = 0x1000
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_INHERIT                       = 0x80
-	MAP_INHERIT_COPY                  = 0x1
-	MAP_INHERIT_DEFAULT               = 0x1
-	MAP_INHERIT_DONATE_COPY           = 0x3
-	MAP_INHERIT_NONE                  = 0x2
-	MAP_INHERIT_SHARE                 = 0x0
-	MAP_NORESERVE                     = 0x40
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_SHARED                        = 0x1
-	MAP_STACK                         = 0x2000
-	MAP_TRYFIXED                      = 0x400
-	MAP_WIRED                         = 0x800
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_BCAST                         = 0x100
-	MSG_CMSG_CLOEXEC                  = 0x800
-	MSG_CONTROLMBUF                   = 0x2000000
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOR                           = 0x8
-	MSG_IOVUSRSPACE                   = 0x4000000
-	MSG_LENUSRSPACE                   = 0x8000000
-	MSG_MCAST                         = 0x200
-	MSG_NAMEMBUF                      = 0x1000000
-	MSG_NBIO                          = 0x1000
-	MSG_NOSIGNAL                      = 0x400
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_TRUNC                         = 0x10
-	MSG_USERFLAGS                     = 0xffffff
-	MSG_WAITALL                       = 0x40
-	MS_ASYNC                          = 0x1
-	MS_INVALIDATE                     = 0x2
-	MS_SYNC                           = 0x4
-	NAME_MAX                          = 0x1ff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x5
-	NET_RT_MAXID                      = 0x6
-	NET_RT_OIFLIST                    = 0x4
-	NET_RT_OOIFLIST                   = 0x3
-	NOFLSH                            = 0x80000000
-	NOTE_ATTRIB                       = 0x8
-	NOTE_CHILD                        = 0x4
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FORK                         = 0x40000000
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_PCTRLMASK                    = 0xf0000000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	OFIOGETBMAP                       = 0xc004667a
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_ALT_IO                          = 0x40000
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x400000
-	O_CREAT                           = 0x200
-	O_DIRECT                          = 0x80000
-	O_DIRECTORY                       = 0x200000
-	O_DSYNC                           = 0x10000
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x8000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_NOSIGPIPE                       = 0x1000000
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_RSYNC                           = 0x20000
-	O_SHLOCK                          = 0x10
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PRI_IOFLUSH                       = 0x7c
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	RLIMIT_AS                         = 0xa
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x9
-	RTAX_NETMASK                      = 0x2
-	RTAX_TAG                          = 0x8
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTA_TAG                           = 0x100
-	RTF_ANNOUNCE                      = 0x20000
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_CLONED                        = 0x2000
-	RTF_CLONING                       = 0x100
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_LLINFO                        = 0x400
-	RTF_MASK                          = 0x80
-	RTF_MODIFIED                      = 0x20
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_REJECT                        = 0x8
-	RTF_SRC                           = 0x10000
-	RTF_STATIC                        = 0x800
-	RTF_UP                            = 0x1
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_CHGADDR                       = 0x15
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_GET                           = 0x4
-	RTM_IEEE80211                     = 0x11
-	RTM_IFANNOUNCE                    = 0x10
-	RTM_IFINFO                        = 0x14
-	RTM_LLINFO_UPD                    = 0x13
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_OIFINFO                       = 0xf
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_OOIFINFO                      = 0xe
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_SETGATE                       = 0x12
-	RTM_VERSION                       = 0x4
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	SCM_CREDS                         = 0x4
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x8
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80906931
-	SIOCADDRT                         = 0x8030720a
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCALIFADDR                      = 0x8118691c
-	SIOCATMARK                        = 0x40047307
-	SIOCDELMULTI                      = 0x80906932
-	SIOCDELRT                         = 0x8030720b
-	SIOCDIFADDR                       = 0x80906919
-	SIOCDIFPHYADDR                    = 0x80906949
-	SIOCDLIFADDR                      = 0x8118691e
-	SIOCGDRVSPEC                      = 0xc01c697b
-	SIOCGETPFSYNC                     = 0xc09069f8
-	SIOCGETSGCNT                      = 0xc0147534
-	SIOCGETVIFCNT                     = 0xc0147533
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0906921
-	SIOCGIFADDRPREF                   = 0xc0946920
-	SIOCGIFALIAS                      = 0xc040691b
-	SIOCGIFBRDADDR                    = 0xc0906923
-	SIOCGIFCAP                        = 0xc0206976
-	SIOCGIFCONF                       = 0xc0086926
-	SIOCGIFDATA                       = 0xc0946985
-	SIOCGIFDLT                        = 0xc0906977
-	SIOCGIFDSTADDR                    = 0xc0906922
-	SIOCGIFFLAGS                      = 0xc0906911
-	SIOCGIFGENERIC                    = 0xc090693a
-	SIOCGIFMEDIA                      = 0xc0286936
-	SIOCGIFMETRIC                     = 0xc0906917
-	SIOCGIFMTU                        = 0xc090697e
-	SIOCGIFNETMASK                    = 0xc0906925
-	SIOCGIFPDSTADDR                   = 0xc0906948
-	SIOCGIFPSRCADDR                   = 0xc0906947
-	SIOCGLIFADDR                      = 0xc118691d
-	SIOCGLIFPHYADDR                   = 0xc118694b
-	SIOCGLINKSTR                      = 0xc01c6987
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCGVH                           = 0xc0906983
-	SIOCIFCREATE                      = 0x8090697a
-	SIOCIFDESTROY                     = 0x80906979
-	SIOCIFGCLONERS                    = 0xc00c6978
-	SIOCINITIFADDR                    = 0xc0446984
-	SIOCSDRVSPEC                      = 0x801c697b
-	SIOCSETPFSYNC                     = 0x809069f7
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8090690c
-	SIOCSIFADDRPREF                   = 0x8094691f
-	SIOCSIFBRDADDR                    = 0x80906913
-	SIOCSIFCAP                        = 0x80206975
-	SIOCSIFDSTADDR                    = 0x8090690e
-	SIOCSIFFLAGS                      = 0x80906910
-	SIOCSIFGENERIC                    = 0x80906939
-	SIOCSIFMEDIA                      = 0xc0906935
-	SIOCSIFMETRIC                     = 0x80906918
-	SIOCSIFMTU                        = 0x8090697f
-	SIOCSIFNETMASK                    = 0x80906916
-	SIOCSIFPHYADDR                    = 0x80406946
-	SIOCSLIFPHYADDR                   = 0x8118694a
-	SIOCSLINKSTR                      = 0x801c6988
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SIOCSVH                           = 0xc0906982
-	SIOCZIFDATA                       = 0xc0946986
-	SOCK_CLOEXEC                      = 0x10000000
-	SOCK_DGRAM                        = 0x2
-	SOCK_FLAGS_MASK                   = 0xf0000000
-	SOCK_NONBLOCK                     = 0x20000000
-	SOCK_NOSIGPIPE                    = 0x40000000
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_ACCEPTFILTER                   = 0x1000
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LINGER                         = 0x80
-	SO_NOHEADER                       = 0x100a
-	SO_NOSIGPIPE                      = 0x800
-	SO_OOBINLINE                      = 0x100
-	SO_OVERFLOWED                     = 0x1009
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x100c
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x100b
-	SO_TIMESTAMP                      = 0x2000
-	SO_TYPE                           = 0x1008
-	SO_USELOOPBACK                    = 0x40
-	SYSCTL_VERSION                    = 0x1000000
-	SYSCTL_VERS_0                     = 0x0
-	SYSCTL_VERS_1                     = 0x1000000
-	SYSCTL_VERS_MASK                  = 0xff000000
-	S_ARCH1                           = 0x10000
-	S_ARCH2                           = 0x20000
-	S_BLKSIZE                         = 0x200
-	S_IEXEC                           = 0x40
-	S_IFBLK                           = 0x6000
-	S_IFCHR                           = 0x2000
-	S_IFDIR                           = 0x4000
-	S_IFIFO                           = 0x1000
-	S_IFLNK                           = 0xa000
-	S_IFMT                            = 0xf000
-	S_IFREG                           = 0x8000
-	S_IFSOCK                          = 0xc000
-	S_IFWHT                           = 0xe000
-	S_IREAD                           = 0x100
-	S_IRGRP                           = 0x20
-	S_IROTH                           = 0x4
-	S_IRUSR                           = 0x100
-	S_IRWXG                           = 0x38
-	S_IRWXO                           = 0x7
-	S_IRWXU                           = 0x1c0
-	S_ISGID                           = 0x400
-	S_ISTXT                           = 0x200
-	S_ISUID                           = 0x800
-	S_ISVTX                           = 0x200
-	S_IWGRP                           = 0x10
-	S_IWOTH                           = 0x2
-	S_IWRITE                          = 0x80
-	S_IWUSR                           = 0x80
-	S_IXGRP                           = 0x8
-	S_IXOTH                           = 0x1
-	S_IXUSR                           = 0x40
-	S_LOGIN_SET                       = 0x1
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CONGCTL                       = 0x20
-	TCP_KEEPCNT                       = 0x6
-	TCP_KEEPIDLE                      = 0x3
-	TCP_KEEPINIT                      = 0x7
-	TCP_KEEPINTVL                     = 0x5
-	TCP_MAXBURST                      = 0x4
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MD5SIG                        = 0x10
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x218
-	TCP_NODELAY                       = 0x1
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDCDTIMESTAMP                  = 0x400c7458
-	TIOCDRAIN                         = 0x2000745e
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLAG_CDTRCTS                  = 0x10
-	TIOCFLAG_CLOCAL                   = 0x2
-	TIOCFLAG_CRTSCTS                  = 0x4
-	TIOCFLAG_MDMBUF                   = 0x8
-	TIOCFLAG_SOFTCAR                  = 0x1
-	TIOCFLUSH                         = 0x80047410
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGFLAGS                        = 0x4004745d
-	TIOCGLINED                        = 0x40207442
-	TIOCGPGRP                         = 0x40047477
-	TIOCGQSIZE                        = 0x40047481
-	TIOCGRANTPT                       = 0x20007447
-	TIOCGSID                          = 0x40047463
-	TIOCGSIZE                         = 0x40087468
-	TIOCGWINSZ                        = 0x40087468
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGET                          = 0x4004746a
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTMGET                        = 0x40287446
-	TIOCPTSNAME                       = 0x40287448
-	TIOCRCVFRAME                      = 0x80047445
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSFLAGS                        = 0x8004745c
-	TIOCSIG                           = 0x2000745f
-	TIOCSLINED                        = 0x80207443
-	TIOCSPGRP                         = 0x80047476
-	TIOCSQSIZE                        = 0x80047480
-	TIOCSSIZE                         = 0x80087467
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x80047465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCUCNTL                         = 0x80047466
-	TIOCXMTFRAME                      = 0x80047444
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WALL                              = 0x8
-	WALLSIG                           = 0x8
-	WALTSIG                           = 0x4
-	WCLONE                            = 0x4
-	WCOREFLAG                         = 0x80
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x10000
-	WNOZOMBIE                         = 0x20000
-	WOPTSCHECKED                      = 0x40000
-	WSTOPPED                          = 0x7f
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADF           = syscall.Errno(0x9)
-	EBADMSG         = syscall.Errno(0x58)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x57)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDOM            = syscall.Errno(0x21)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x52)
-	EILSEQ          = syscall.Errno(0x55)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x60)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5e)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x5d)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODATA         = syscall.Errno(0x59)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x5f)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x53)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x5a)
-	ENOSTR          = syscall.Errno(0x5b)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x56)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x2d)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x60)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIME           = syscall.Errno(0x5c)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x20)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:  "operation not permitted",
-	2:  "no such file or directory",
-	3:  "no such process",
-	4:  "interrupted system call",
-	5:  "input/output error",
-	6:  "device not configured",
-	7:  "argument list too long",
-	8:  "exec format error",
-	9:  "bad file descriptor",
-	10: "no child processes",
-	11: "resource deadlock avoided",
-	12: "cannot allocate memory",
-	13: "permission denied",
-	14: "bad address",
-	15: "block device required",
-	16: "device busy",
-	17: "file exists",
-	18: "cross-device link",
-	19: "operation not supported by device",
-	20: "not a directory",
-	21: "is a directory",
-	22: "invalid argument",
-	23: "too many open files in system",
-	24: "too many open files",
-	25: "inappropriate ioctl for device",
-	26: "text file busy",
-	27: "file too large",
-	28: "no space left on device",
-	29: "illegal seek",
-	30: "read-only file system",
-	31: "too many links",
-	32: "broken pipe",
-	33: "numerical argument out of domain",
-	34: "result too large or too small",
-	35: "resource temporarily unavailable",
-	36: "operation now in progress",
-	37: "operation already in progress",
-	38: "socket operation on non-socket",
-	39: "destination address required",
-	40: "message too long",
-	41: "protocol wrong type for socket",
-	42: "protocol option not available",
-	43: "protocol not supported",
-	44: "socket type not supported",
-	45: "operation not supported",
-	46: "protocol family not supported",
-	47: "address family not supported by protocol family",
-	48: "address already in use",
-	49: "can't assign requested address",
-	50: "network is down",
-	51: "network is unreachable",
-	52: "network dropped connection on reset",
-	53: "software caused connection abort",
-	54: "connection reset by peer",
-	55: "no buffer space available",
-	56: "socket is already connected",
-	57: "socket is not connected",
-	58: "can't send after socket shutdown",
-	59: "too many references: can't splice",
-	60: "connection timed out",
-	61: "connection refused",
-	62: "too many levels of symbolic links",
-	63: "file name too long",
-	64: "host is down",
-	65: "no route to host",
-	66: "directory not empty",
-	67: "too many processes",
-	68: "too many users",
-	69: "disc quota exceeded",
-	70: "stale NFS file handle",
-	71: "too many levels of remote in path",
-	72: "RPC struct is bad",
-	73: "RPC version wrong",
-	74: "RPC prog. not avail",
-	75: "program version wrong",
-	76: "bad procedure for program",
-	77: "no locks available",
-	78: "function not implemented",
-	79: "inappropriate file type or format",
-	80: "authentication error",
-	81: "need authenticator",
-	82: "identifier removed",
-	83: "no message of desired type",
-	84: "value too large to be stored in data type",
-	85: "illegal byte sequence",
-	86: "not supported",
-	87: "operation Canceled",
-	88: "bad or Corrupt message",
-	89: "no message available",
-	90: "no STREAM resources",
-	91: "not a STREAM",
-	92: "STREAM ioctl timeout",
-	93: "attribute not found",
-	94: "multihop attempted",
-	95: "link has been severed",
-	96: "protocol error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "stopped (signal)",
-	18: "stopped",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-	32: "power fail/restart",
-}


[37/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/newt/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
deleted file mode 100644
index 8119fde..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ /dev/null
@@ -1,208 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build mips64 mips64le
-
-package unix
-
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (euid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Getuid() (uid int)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Listen(s int, n int) (err error)
-//sys	Pause() (err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6
-//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys	Setfsgid(gid int) (err error)
-//sys	Setfsuid(uid int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sys	Shutdown(fd int, how int) (err error)
-//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys	Statfs(path string, buf *Statfs_t) (err error)
-//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys	Truncate(path string, length int64) (err error)
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb	setgroups(n int, list *_Gid_t) (err error)
-//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-
-func Time(t *Time_t) (tt Time_t, err error) {
-	var tv Timeval
-	err = Gettimeofday(&tv)
-	if err != nil {
-		return 0, err
-	}
-	if t != nil {
-		*t = Time_t(tv.Sec)
-	}
-	return Time_t(tv.Sec), nil
-}
-
-//sys	Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Sec = nsec / 1e9
-	tv.Usec = nsec % 1e9 / 1e3
-	return
-}
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, 0)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, flags)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-func Ioperm(from int, num int, on int) (err error) {
-	return ENOSYS
-}
-
-func Iopl(level int) (err error) {
-	return ENOSYS
-}
-
-type stat_t struct {
-	Dev        uint32
-	Pad0       [3]int32
-	Ino        uint64
-	Mode       uint32
-	Nlink      uint32
-	Uid        uint32
-	Gid        uint32
-	Rdev       uint32
-	Pad1       [3]uint32
-	Size       int64
-	Atime      uint32
-	Atime_nsec uint32
-	Mtime      uint32
-	Mtime_nsec uint32
-	Ctime      uint32
-	Ctime_nsec uint32
-	Blksize    uint32
-	Pad2       uint32
-	Blocks     int64
-}
-
-//sys	fstat(fd int, st *stat_t) (err error)
-//sys	lstat(path string, st *stat_t) (err error)
-//sys	stat(path string, st *stat_t) (err error)
-
-func Fstat(fd int, s *Stat_t) (err error) {
-	st := &stat_t{}
-	err = fstat(fd, st)
-	fillStat_t(s, st)
-	return
-}
-
-func Lstat(path string, s *Stat_t) (err error) {
-	st := &stat_t{}
-	err = lstat(path, st)
-	fillStat_t(s, st)
-	return
-}
-
-func Stat(path string, s *Stat_t) (err error) {
-	st := &stat_t{}
-	err = stat(path, st)
-	fillStat_t(s, st)
-	return
-}
-
-func fillStat_t(s *Stat_t, st *stat_t) {
-	s.Dev = st.Dev
-	s.Ino = st.Ino
-	s.Mode = st.Mode
-	s.Nlink = st.Nlink
-	s.Uid = st.Uid
-	s.Gid = st.Gid
-	s.Rdev = st.Rdev
-	s.Size = st.Size
-	s.Atim = Timespec{int64(st.Atime), int64(st.Atime_nsec)}
-	s.Mtim = Timespec{int64(st.Mtime), int64(st.Mtime_nsec)}
-	s.Ctim = Timespec{int64(st.Ctime), int64(st.Ctime_nsec)}
-	s.Blksize = st.Blksize
-	s.Blocks = st.Blocks
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Regs[64] }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = pc }
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint64(length)
-}
-
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-	if len(fds) == 0 {
-		return poll(nil, 0, timeout)
-	}
-	return poll(&fds[0], len(fds), timeout)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/newt/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
deleted file mode 100644
index 60770f6..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-
-package unix
-
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys	Dup2(oldfd int, newfd int) (err error)
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (euid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
-//sysnb	Getuid() (uid int)
-//sysnb	InotifyInit() (fd int, err error)
-//sys	Ioperm(from int, num int, on int) (err error)
-//sys	Iopl(level int) (err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Listen(s int, n int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error)
-//sys	Pause() (err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys	Setfsgid(gid int) (err error)
-//sys	Setfsuid(uid int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sys	Shutdown(fd int, how int) (err error)
-//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys	Stat(path string, stat *Stat_t) (err error)
-//sys	Statfs(path string, buf *Statfs_t) (err error)
-//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2
-//sys	Truncate(path string, length int64) (err error)
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb	setgroups(n int, list *_Gid_t) (err error)
-//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-//sysnb	Time(t *Time_t) (tt Time_t, err error)
-
-//sys	Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Sec = nsec / 1e9
-	tv.Usec = nsec % 1e9 / 1e3
-	return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Nip }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Nip = pc }
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint64(length)
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe(&pp)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, flags)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-	if len(fds) == 0 {
-		return poll(nil, 0, timeout)
-	}
-	return poll(&fds[0], len(fds), timeout)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/newt/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
deleted file mode 100644
index 81c5f47..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ /dev/null
@@ -1,329 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build s390x,linux
-
-package unix
-
-import (
-	"unsafe"
-)
-
-//sys	Dup2(oldfd int, newfd int) (err error)
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys	Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (euid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Getuid() (uid int)
-//sysnb	InotifyInit() (fd int, err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error)
-//sys	Pause() (err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys	Setfsgid(gid int) (err error)
-//sys	Setfsuid(uid int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys	Stat(path string, stat *Stat_t) (err error)
-//sys	Statfs(path string, buf *Statfs_t) (err error)
-//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys	Truncate(path string, length int64) (err error)
-//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb	setgroups(n int, list *_Gid_t) (err error)
-
-func Getpagesize() int { return 4096 }
-
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-
-func Time(t *Time_t) (tt Time_t, err error) {
-	var tv Timeval
-	err = Gettimeofday(&tv)
-	if err != nil {
-		return 0, err
-	}
-	if t != nil {
-		*t = Time_t(tv.Sec)
-	}
-	return Time_t(tv.Sec), nil
-}
-
-//sys	Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Sec = nsec / 1e9
-	tv.Usec = nsec % 1e9 / 1e3
-	return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-func Pipe2(p []int, flags int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, flags)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-func Ioperm(from int, num int, on int) (err error) {
-	return ENOSYS
-}
-
-func Iopl(level int) (err error) {
-	return ENOSYS
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc }
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint64(length)
-}
-
-// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
-// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in <asm/unistd.h>.
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	mmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)}
-	r0, _, e1 := Syscall(SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0)
-	use(unsafe.Pointer(&mmap_args[0]))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// On s390x Linux, all the socket calls go through an extra indirection.
-// The arguments to the underlying system call (SYS_SOCKETCALL) are the
-// number below and a pointer to an array of uintptr.
-const (
-	// see linux/net.h
-	netSocket      = 1
-	netBind        = 2
-	netConnect     = 3
-	netListen      = 4
-	netAccept      = 5
-	netGetSockName = 6
-	netGetPeerName = 7
-	netSocketPair  = 8
-	netSend        = 9
-	netRecv        = 10
-	netSendTo      = 11
-	netRecvFrom    = 12
-	netShutdown    = 13
-	netSetSockOpt  = 14
-	netGetSockOpt  = 15
-	netSendMsg     = 16
-	netRecvMsg     = 17
-	netAccept4     = 18
-	netRecvMMsg    = 19
-	netSendMMsg    = 20
-)
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
-	args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
-	fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return 0, err
-	}
-	return int(fd), nil
-}
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
-	args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
-	fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return 0, err
-	}
-	return int(fd), nil
-}
-
-func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {
-	args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
-	_, _, err := RawSyscall(SYS_SOCKETCALL, netGetSockName, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
-
-func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {
-	args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
-	_, _, err := RawSyscall(SYS_SOCKETCALL, netGetPeerName, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) error {
-	args := [4]uintptr{uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd))}
-	_, _, err := RawSyscall(SYS_SOCKETCALL, netSocketPair, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) error {
-	args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}
-	_, _, err := Syscall(SYS_SOCKETCALL, netBind, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) error {
-	args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}
-	_, _, err := Syscall(SYS_SOCKETCALL, netConnect, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
-
-func socket(domain int, typ int, proto int) (int, error) {
-	args := [3]uintptr{uintptr(domain), uintptr(typ), uintptr(proto)}
-	fd, _, err := RawSyscall(SYS_SOCKETCALL, netSocket, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return 0, err
-	}
-	return int(fd), nil
-}
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) error {
-	args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))}
-	_, _, err := Syscall(SYS_SOCKETCALL, netGetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {
-	args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)}
-	_, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
-
-func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (int, error) {
-	var base uintptr
-	if len(p) > 0 {
-		base = uintptr(unsafe.Pointer(&p[0]))
-	}
-	args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))}
-	n, _, err := Syscall(SYS_SOCKETCALL, netRecvFrom, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return 0, err
-	}
-	return int(n), nil
-}
-
-func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) error {
-	var base uintptr
-	if len(p) > 0 {
-		base = uintptr(unsafe.Pointer(&p[0]))
-	}
-	args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)}
-	_, _, err := Syscall(SYS_SOCKETCALL, netSendTo, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
-
-func recvmsg(s int, msg *Msghdr, flags int) (int, error) {
-	args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}
-	n, _, err := Syscall(SYS_SOCKETCALL, netRecvMsg, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return 0, err
-	}
-	return int(n), nil
-}
-
-func sendmsg(s int, msg *Msghdr, flags int) (int, error) {
-	args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}
-	n, _, err := Syscall(SYS_SOCKETCALL, netSendMsg, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return 0, err
-	}
-	return int(n), nil
-}
-
-func Listen(s int, n int) error {
-	args := [2]uintptr{uintptr(s), uintptr(n)}
-	_, _, err := Syscall(SYS_SOCKETCALL, netListen, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
-
-func Shutdown(s, how int) error {
-	args := [2]uintptr{uintptr(s), uintptr(how)}
-	_, _, err := Syscall(SYS_SOCKETCALL, netShutdown, uintptr(unsafe.Pointer(&args)), 0)
-	if err != 0 {
-		return err
-	}
-	return nil
-}
-
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-	if len(fds) == 0 {
-		return poll(nil, 0, timeout)
-	}
-	return poll(&fds[0], len(fds), timeout)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/newt/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
deleted file mode 100644
index 20b7454..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build sparc64,linux
-
-package unix
-
-import (
-	"sync/atomic"
-	"syscall"
-)
-
-//sys	EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys	Dup2(oldfd int, newfd int) (err error)
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (euid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Getuid() (uid int)
-//sysnb	InotifyInit() (fd int, err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Listen(s int, n int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error)
-//sys	Pause() (err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys	Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys	Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys	Setfsgid(gid int) (err error)
-//sys	Setfsuid(uid int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sys	Shutdown(fd int, how int) (err error)
-//sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys	Stat(path string, stat *Stat_t) (err error)
-//sys	Statfs(path string, buf *Statfs_t) (err error)
-//sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys	Truncate(path string, length int64) (err error)
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys	accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb	getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb	setgroups(n int, list *_Gid_t) (err error)
-//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb	socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys	mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func sysconf(name int) (n int64, err syscall.Errno)
-
-// pageSize caches the value of Getpagesize, since it can't change
-// once the system is booted.
-var pageSize int64 // accessed atomically
-
-func Getpagesize() int {
-	n := atomic.LoadInt64(&pageSize)
-	if n == 0 {
-		n, _ = sysconf(_SC_PAGESIZE)
-		atomic.StoreInt64(&pageSize, n)
-	}
-	return int(n)
-}
-
-func Ioperm(from int, num int, on int) (err error) {
-	return ENOSYS
-}
-
-func Iopl(level int) (err error) {
-	return ENOSYS
-}
-
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-
-func Time(t *Time_t) (tt Time_t, err error) {
-	var tv Timeval
-	err = Gettimeofday(&tv)
-	if err != nil {
-		return 0, err
-	}
-	if t != nil {
-		*t = Time_t(tv.Sec)
-	}
-	return Time_t(tv.Sec), nil
-}
-
-//sys	Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Sec = nsec / 1e9
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Tpc }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Tpc = pc }
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint64(length)
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe(&pp)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe2(&pp, flags)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sys	poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
-	if len(fds) == 0 {
-		return poll(nil, 0, timeout)
-	}
-	return poll(&fds[0], len(fds), timeout)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_netbsd.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/newt/vendor/golang.org/x/sys/unix/syscall_netbsd.go
deleted file mode 100644
index c4e945c..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ /dev/null
@@ -1,492 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// NetBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-type SockaddrDatalink struct {
-	Len    uint8
-	Family uint8
-	Index  uint16
-	Type   uint8
-	Nlen   uint8
-	Alen   uint8
-	Slen   uint8
-	Data   [12]int8
-	raw    RawSockaddrDatalink
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {
-	var olen uintptr
-
-	// Get a list of all sysctl nodes below the given MIB by performing
-	// a sysctl for the given MIB with CTL_QUERY appended.
-	mib = append(mib, CTL_QUERY)
-	qnode := Sysctlnode{Flags: SYSCTL_VERS_1}
-	qp := (*byte)(unsafe.Pointer(&qnode))
-	sz := unsafe.Sizeof(qnode)
-	if err = sysctl(mib, nil, &olen, qp, sz); err != nil {
-		return nil, err
-	}
-
-	// Now that we know the size, get the actual nodes.
-	nodes = make([]Sysctlnode, olen/sz)
-	np := (*byte)(unsafe.Pointer(&nodes[0]))
-	if err = sysctl(mib, np, &olen, qp, sz); err != nil {
-		return nil, err
-	}
-
-	return nodes, nil
-}
-
-func nametomib(name string) (mib []_C_int, err error) {
-
-	// Split name into components.
-	var parts []string
-	last := 0
-	for i := 0; i < len(name); i++ {
-		if name[i] == '.' {
-			parts = append(parts, name[last:i])
-			last = i + 1
-		}
-	}
-	parts = append(parts, name[last:])
-
-	// Discover the nodes and construct the MIB OID.
-	for partno, part := range parts {
-		nodes, err := sysctlNodes(mib)
-		if err != nil {
-			return nil, err
-		}
-		for _, node := range nodes {
-			n := make([]byte, 0)
-			for i := range node.Name {
-				if node.Name[i] != 0 {
-					n = append(n, byte(node.Name[i]))
-				}
-			}
-			if string(n) == part {
-				mib = append(mib, _C_int(node.Num))
-				break
-			}
-		}
-		if len(mib) != partno+1 {
-			return nil, EINVAL
-		}
-	}
-
-	return mib, nil
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
-	origlen := len(buf)
-	for max != 0 && len(buf) > 0 {
-		dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
-		if dirent.Reclen == 0 {
-			buf = nil
-			break
-		}
-		buf = buf[dirent.Reclen:]
-		if dirent.Fileno == 0 { // File absent in directory.
-			continue
-		}
-		bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
-		var name = string(bytes[0:dirent.Namlen])
-		if name == "." || name == ".." { // Useless names
-			continue
-		}
-		max--
-		count++
-		names = append(names, name)
-	}
-	return origlen - len(buf), count, names
-}
-
-//sysnb pipe() (fd1 int, fd2 int, err error)
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	p[0], p[1], err = pipe()
-	return
-}
-
-//sys getdents(fd int, buf []byte) (n int, err error)
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	return getdents(fd, buf)
-}
-
-// TODO
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	return -1, ENOSYS
-}
-
-/*
- * Exposed directly
- */
-//sys	Access(path string, mode uint32) (err error)
-//sys	Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys	Chdir(path string) (err error)
-//sys	Chflags(path string, flags int) (err error)
-//sys	Chmod(path string, mode uint32) (err error)
-//sys	Chown(path string, uid int, gid int) (err error)
-//sys	Chroot(path string) (err error)
-//sys	Close(fd int) (err error)
-//sys	Dup(fd int) (nfd int, err error)
-//sys	Dup2(from int, to int) (err error)
-//sys	Exit(code int)
-//sys	Fchdir(fd int) (err error)
-//sys	Fchflags(fd int, flags int) (err error)
-//sys	Fchmod(fd int, mode uint32) (err error)
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Flock(fd int, how int) (err error)
-//sys	Fpathconf(fd int, name int) (val int, err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fsync(fd int) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (uid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getpgid(pid int) (pgid int, err error)
-//sysnb	Getpgrp() (pgrp int)
-//sysnb	Getpid() (pid int)
-//sysnb	Getppid() (ppid int)
-//sys	Getpriority(which int, who int) (prio int, err error)
-//sysnb	Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Getrusage(who int, rusage *Rusage) (err error)
-//sysnb	Getsid(pid int) (sid int, err error)
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-//sysnb	Getuid() (uid int)
-//sys	Issetugid() (tainted bool)
-//sys	Kill(pid int, signum syscall.Signal) (err error)
-//sys	Kqueue() (fd int, err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Link(path string, link string) (err error)
-//sys	Listen(s int, backlog int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error)
-//sys	Mkdir(path string, mode uint32) (err error)
-//sys	Mkfifo(path string, mode uint32) (err error)
-//sys	Mknod(path string, mode uint32, dev int) (err error)
-//sys	Mlock(b []byte) (err error)
-//sys	Mlockall(flags int) (err error)
-//sys	Mprotect(b []byte, prot int) (err error)
-//sys	Munlock(b []byte) (err error)
-//sys	Munlockall() (err error)
-//sys	Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys	Open(path string, mode int, perm uint32) (fd int, err error)
-//sys	Pathconf(path string, name int) (val int, err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys	read(fd int, p []byte) (n int, err error)
-//sys	Readlink(path string, buf []byte) (n int, err error)
-//sys	Rename(from string, to string) (err error)
-//sys	Revoke(path string) (err error)
-//sys	Rmdir(path string) (err error)
-//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb	Setegid(egid int) (err error)
-//sysnb	Seteuid(euid int) (err error)
-//sysnb	Setgid(gid int) (err error)
-//sysnb	Setpgid(pid int, pgid int) (err error)
-//sys	Setpriority(which int, who int, prio int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Setsid() (pid int, err error)
-//sysnb	Settimeofday(tp *Timeval) (err error)
-//sysnb	Setuid(uid int) (err error)
-//sys	Stat(path string, stat *Stat_t) (err error)
-//sys	Symlink(path string, link string) (err error)
-//sys	Sync() (err error)
-//sys	Truncate(path string, length int64) (err error)
-//sys	Umask(newmask int) (oldmask int)
-//sys	Unlink(path string) (err error)
-//sys	Unmount(path string, flags int) (err error)
-//sys	write(fd int, p []byte) (n int, err error)
-//sys	mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys	munmap(addr uintptr, length uintptr) (err error)
-//sys	readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys	writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// ____semctl13
-// __clone
-// __fhopen40
-// __fhstat40
-// __fhstatvfs140
-// __fstat30
-// __getcwd
-// __getfh30
-// __getlogin
-// __lstat30
-// __mount50
-// __msgctl13
-// __msync13
-// __ntp_gettime30
-// __posix_chown
-// __posix_fadvise50
-// __posix_fchown
-// __posix_lchown
-// __posix_rename
-// __setlogin
-// __shmctl13
-// __sigaction_sigtramp
-// __sigaltstack14
-// __sigpending14
-// __sigprocmask14
-// __sigsuspend14
-// __sigtimedwait
-// __stat30
-// __syscall
-// __vfork14
-// _ksem_close
-// _ksem_destroy
-// _ksem_getvalue
-// _ksem_init
-// _ksem_open
-// _ksem_post
-// _ksem_trywait
-// _ksem_unlink
-// _ksem_wait
-// _lwp_continue
-// _lwp_create
-// _lwp_ctl
-// _lwp_detach
-// _lwp_exit
-// _lwp_getname
-// _lwp_getprivate
-// _lwp_kill
-// _lwp_park
-// _lwp_self
-// _lwp_setname
-// _lwp_setprivate
-// _lwp_suspend
-// _lwp_unpark
-// _lwp_unpark_all
-// _lwp_wait
-// _lwp_wakeup
-// _pset_bind
-// _sched_getaffinity
-// _sched_getparam
-// _sched_setaffinity
-// _sched_setparam
-// acct
-// aio_cancel
-// aio_error
-// aio_fsync
-// aio_read
-// aio_return
-// aio_suspend
-// aio_write
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// compat_09_ogetdomainname
-// compat_09_osetdomainname
-// compat_09_ouname
-// compat_10_omsgsys
-// compat_10_osemsys
-// compat_10_oshmsys
-// compat_12_fstat12
-// compat_12_getdirentries
-// compat_12_lstat12
-// compat_12_msync
-// compat_12_oreboot
-// compat_12_oswapon
-// compat_12_stat12
-// compat_13_sigaction13
-// compat_13_sigaltstack13
-// compat_13_sigpending13
-// compat_13_sigprocmask13
-// compat_13_sigreturn13
-// compat_13_sigsuspend13
-// compat_14___semctl
-// compat_14_msgctl
-// compat_14_shmctl
-// compat_16___sigaction14
-// compat_16___sigreturn14
-// compat_20_fhstatfs
-// compat_20_fstatfs
-// compat_20_getfsstat
-// compat_20_statfs
-// compat_30___fhstat30
-// compat_30___fstat13
-// compat_30___lstat13
-// compat_30___stat13
-// compat_30_fhopen
-// compat_30_fhstat
-// compat_30_fhstatvfs1
-// compat_30_getdents
-// compat_30_getfh
-// compat_30_ntp_gettime
-// compat_30_socket
-// compat_40_mount
-// compat_43_fstat43
-// compat_43_lstat43
-// compat_43_oaccept
-// compat_43_ocreat
-// compat_43_oftruncate
-// compat_43_ogetdirentries
-// compat_43_ogetdtablesize
-// compat_43_ogethostid
-// compat_43_ogethostname
-// compat_43_ogetkerninfo
-// compat_43_ogetpagesize
-// compat_43_ogetpeername
-// compat_43_ogetrlimit
-// compat_43_ogetsockname
-// compat_43_okillpg
-// compat_43_olseek
-// compat_43_ommap
-// compat_43_oquota
-// compat_43_orecv
-// compat_43_orecvfrom
-// compat_43_orecvmsg
-// compat_43_osend
-// compat_43_osendmsg
-// compat_43_osethostid
-// compat_43_osethostname
-// compat_43_osetrlimit
-// compat_43_osigblock
-// compat_43_osigsetmask
-// compat_43_osigstack
-// compat_43_osigvec
-// compat_43_otruncate
-// compat_43_owait
-// compat_43_stat43
-// execve
-// extattr_delete_fd
-// extattr_delete_file
-// extattr_delete_link
-// extattr_get_fd
-// extattr_get_file
-// extattr_get_link
-// extattr_list_fd
-// extattr_list_file
-// extattr_list_link
-// extattr_set_fd
-// extattr_set_file
-// extattr_set_link
-// extattrctl
-// fchroot
-// fdatasync
-// fgetxattr
-// fktrace
-// flistxattr
-// fork
-// fremovexattr
-// fsetxattr
-// fstatvfs1
-// fsync_range
-// getcontext
-// getitimer
-// getvfsstat
-// getxattr
-// ioctl
-// ktrace
-// lchflags
-// lchmod
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// lgetxattr
-// lio_listio
-// listxattr
-// llistxattr
-// lremovexattr
-// lseek
-// lsetxattr
-// lutimes
-// madvise
-// mincore
-// minherit
-// modctl
-// mq_close
-// mq_getattr
-// mq_notify
-// mq_open
-// mq_receive
-// mq_send
-// mq_setattr
-// mq_timedreceive
-// mq_timedsend
-// mq_unlink
-// mremap
-// msgget
-// msgrcv
-// msgsnd
-// nfssvc
-// ntp_adjtime
-// pmc_control
-// pmc_get_info
-// poll
-// pollts
-// preadv
-// profil
-// pselect
-// pset_assign
-// pset_create
-// pset_destroy
-// ptrace
-// pwritev
-// quotactl
-// rasctl
-// readv
-// reboot
-// removexattr
-// sa_enable
-// sa_preempt
-// sa_register
-// sa_setconcurrency
-// sa_stacks
-// sa_yield
-// sbrk
-// sched_yield
-// semconfig
-// semget
-// semop
-// setcontext
-// setitimer
-// setxattr
-// shmat
-// shmdt
-// shmget
-// sstk
-// statvfs1
-// swapctl
-// sysarch
-// syscall
-// timer_create
-// timer_delete
-// timer_getoverrun
-// timer_gettime
-// timer_settime
-// undelete
-// utrace
-// uuidgen
-// vadvise
-// vfork
-// writev

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
deleted file mode 100644
index afaca09..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int64(nsec / 1e9)
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint32(fd)
-	k.Filter = uint32(mode)
-	k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
deleted file mode 100644
index a6ff04c..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int64(nsec / 1e9)
-	ts.Nsec = int64(nsec % 1e9)
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint64(fd)
-	k.Filter = uint32(mode)
-	k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
deleted file mode 100644
index 68a6969..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int64(nsec / 1e9)
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint32(fd)
-	k.Filter = uint32(mode)
-	k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_no_getwd.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_no_getwd.go b/newt/vendor/golang.org/x/sys/unix/syscall_no_getwd.go
deleted file mode 100644
index 530792e..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_no_getwd.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build dragonfly freebsd netbsd openbsd
-
-package unix
-
-const ImplementsGetwd = false
-
-func Getwd() (string, error) { return "", ENOTSUP }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_openbsd.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/newt/vendor/golang.org/x/sys/unix/syscall_openbsd.go
deleted file mode 100644
index 554a823..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ /dev/null
@@ -1,304 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// OpenBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-type SockaddrDatalink struct {
-	Len    uint8
-	Family uint8
-	Index  uint16
-	Type   uint8
-	Nlen   uint8
-	Alen   uint8
-	Slen   uint8
-	Data   [24]int8
-	raw    RawSockaddrDatalink
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-func nametomib(name string) (mib []_C_int, err error) {
-
-	// Perform lookup via a binary search
-	left := 0
-	right := len(sysctlMib) - 1
-	for {
-		idx := left + (right-left)/2
-		switch {
-		case name == sysctlMib[idx].ctlname:
-			return sysctlMib[idx].ctloid, nil
-		case name > sysctlMib[idx].ctlname:
-			left = idx + 1
-		default:
-			right = idx - 1
-		}
-		if left > right {
-			break
-		}
-	}
-	return nil, EINVAL
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
-	origlen := len(buf)
-	for max != 0 && len(buf) > 0 {
-		dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
-		if dirent.Reclen == 0 {
-			buf = nil
-			break
-		}
-		buf = buf[dirent.Reclen:]
-		if dirent.Fileno == 0 { // File absent in directory.
-			continue
-		}
-		bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
-		var name = string(bytes[0:dirent.Namlen])
-		if name == "." || name == ".." { // Useless names
-			continue
-		}
-		max--
-		count++
-		names = append(names, name)
-	}
-	return origlen - len(buf), count, names
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	err = pipe(&pp)
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return
-}
-
-//sys getdents(fd int, buf []byte) (n int, err error)
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	return getdents(fd, buf)
-}
-
-// TODO
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	return -1, ENOSYS
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	var bufsize uintptr
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-		bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
-	}
-	r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-/*
- * Exposed directly
- */
-//sys	Access(path string, mode uint32) (err error)
-//sys	Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys	Chdir(path string) (err error)
-//sys	Chflags(path string, flags int) (err error)
-//sys	Chmod(path string, mode uint32) (err error)
-//sys	Chown(path string, uid int, gid int) (err error)
-//sys	Chroot(path string) (err error)
-//sys	Close(fd int) (err error)
-//sys	Dup(fd int) (nfd int, err error)
-//sys	Dup2(from int, to int) (err error)
-//sys	Exit(code int)
-//sys	Fchdir(fd int) (err error)
-//sys	Fchflags(fd int, flags int) (err error)
-//sys	Fchmod(fd int, mode uint32) (err error)
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Flock(fd int, how int) (err error)
-//sys	Fpathconf(fd int, name int) (val int, err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys	Fsync(fd int) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sysnb	Getegid() (egid int)
-//sysnb	Geteuid() (uid int)
-//sysnb	Getgid() (gid int)
-//sysnb	Getpgid(pid int) (pgid int, err error)
-//sysnb	Getpgrp() (pgrp int)
-//sysnb	Getpid() (pid int)
-//sysnb	Getppid() (ppid int)
-//sys	Getpriority(which int, who int) (prio int, err error)
-//sysnb	Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Getrusage(who int, rusage *Rusage) (err error)
-//sysnb	Getsid(pid int) (sid int, err error)
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-//sysnb	Getuid() (uid int)
-//sys	Issetugid() (tainted bool)
-//sys	Kill(pid int, signum syscall.Signal) (err error)
-//sys	Kqueue() (fd int, err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Link(path string, link string) (err error)
-//sys	Listen(s int, backlog int) (err error)
-//sys	Lstat(path string, stat *Stat_t) (err error)
-//sys	Mkdir(path string, mode uint32) (err error)
-//sys	Mkfifo(path string, mode uint32) (err error)
-//sys	Mknod(path string, mode uint32, dev int) (err error)
-//sys	Mlock(b []byte) (err error)
-//sys	Mlockall(flags int) (err error)
-//sys	Mprotect(b []byte, prot int) (err error)
-//sys	Munlock(b []byte) (err error)
-//sys	Munlockall() (err error)
-//sys	Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys	Open(path string, mode int, perm uint32) (fd int, err error)
-//sys	Pathconf(path string, name int) (val int, err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys	read(fd int, p []byte) (n int, err error)
-//sys	Readlink(path string, buf []byte) (n int, err error)
-//sys	Rename(from string, to string) (err error)
-//sys	Revoke(path string) (err error)
-//sys	Rmdir(path string) (err error)
-//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys	Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb	Setegid(egid int) (err error)
-//sysnb	Seteuid(euid int) (err error)
-//sysnb	Setgid(gid int) (err error)
-//sys	Setlogin(name string) (err error)
-//sysnb	Setpgid(pid int, pgid int) (err error)
-//sys	Setpriority(which int, who int, prio int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sysnb	Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb	Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Setsid() (pid int, err error)
-//sysnb	Settimeofday(tp *Timeval) (err error)
-//sysnb	Setuid(uid int) (err error)
-//sys	Stat(path string, stat *Stat_t) (err error)
-//sys	Statfs(path string, stat *Statfs_t) (err error)
-//sys	Symlink(path string, link string) (err error)
-//sys	Sync() (err error)
-//sys	Truncate(path string, length int64) (err error)
-//sys	Umask(newmask int) (oldmask int)
-//sys	Unlink(path string) (err error)
-//sys	Unmount(path string, flags int) (err error)
-//sys	write(fd int, p []byte) (n int, err error)
-//sys	mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys	munmap(addr uintptr, length uintptr) (err error)
-//sys	readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys	writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// __getcwd
-// __semctl
-// __syscall
-// __sysctl
-// adjfreq
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// closefrom
-// execve
-// faccessat
-// fchmodat
-// fchownat
-// fcntl
-// fhopen
-// fhstat
-// fhstatfs
-// fork
-// fstatat
-// futimens
-// getfh
-// getgid
-// getitimer
-// getlogin
-// getresgid
-// getresuid
-// getrtable
-// getthrid
-// ioctl
-// ktrace
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// linkat
-// mincore
-// minherit
-// mkdirat
-// mkfifoat
-// mknodat
-// mount
-// mquery
-// msgctl
-// msgget
-// msgrcv
-// msgsnd
-// nfssvc
-// nnpfspioctl
-// openat
-// poll
-// preadv
-// profil
-// pwritev
-// quotactl
-// readlinkat
-// readv
-// reboot
-// renameat
-// rfork
-// sched_yield
-// semget
-// semop
-// setgroups
-// setitimer
-// setrtable
-// setsockopt
-// shmat
-// shmctl
-// shmdt
-// shmget
-// sigaction
-// sigaltstack
-// sigpending
-// sigprocmask
-// sigreturn
-// sigsuspend
-// symlinkat
-// sysarch
-// syscall
-// threxit
-// thrsigdivert
-// thrsleep
-// thrwakeup
-// unlinkat
-// utimensat
-// vfork
-// writev

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/newt/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
deleted file mode 100644
index a66ddc5..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,openbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = int64(nsec / 1e9)
-	ts.Nsec = int32(nsec % 1e9)
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = int32(nsec % 1e9 / 1e3)
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint32(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/newt/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
deleted file mode 100644
index 0776c1f..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,openbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = nsec % 1e9 / 1e3
-	tv.Sec = nsec / 1e9
-	return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
-	k.Ident = uint64(fd)
-	k.Filter = int16(mode)
-	k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
-	msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_solaris.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_solaris.go b/newt/vendor/golang.org/x/sys/unix/syscall_solaris.go
deleted file mode 100644
index acb74b1..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ /dev/null
@@ -1,725 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Solaris system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_solaris.go or syscall_unix.go.
-
-package unix
-
-import (
-	"sync/atomic"
-	"syscall"
-	"unsafe"
-)
-
-// Implemented in runtime/syscall_solaris.go.
-type syscallFunc uintptr
-
-func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-type SockaddrDatalink struct {
-	Family uint16
-	Index  uint16
-	Type   uint8
-	Nlen   uint8
-	Alen   uint8
-	Slen   uint8
-	Data   [244]int8
-	raw    RawSockaddrDatalink
-}
-
-func clen(n []byte) int {
-	for i := 0; i < len(n); i++ {
-		if n[i] == 0 {
-			return i
-		}
-	}
-	return len(n)
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names.  It returns the number
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
-	origlen := len(buf)
-	for max != 0 && len(buf) > 0 {
-		dirent := (*Dirent)(unsafe.Pointer(&buf[0]))
-		if dirent.Reclen == 0 {
-			buf = nil
-			break
-		}
-		buf = buf[dirent.Reclen:]
-		if dirent.Ino == 0 { // File absent in directory.
-			continue
-		}
-		bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0]))
-		var name = string(bytes[0:clen(bytes[:])])
-		if name == "." || name == ".." { // Useless names
-			continue
-		}
-		max--
-		count++
-		names = append(names, name)
-	}
-	return origlen - len(buf), count, names
-}
-
-//sysnb	pipe(p *[2]_C_int) (n int, err error)
-
-func Pipe(p []int) (err error) {
-	if len(p) != 2 {
-		return EINVAL
-	}
-	var pp [2]_C_int
-	n, err := pipe(&pp)
-	if n != 0 {
-		return err
-	}
-	p[0] = int(pp[0])
-	p[1] = int(pp[1])
-	return nil
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	if sa.Port < 0 || sa.Port > 0xFFFF {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Family = AF_INET
-	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
-	p[0] = byte(sa.Port >> 8)
-	p[1] = byte(sa.Port)
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
-	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	if sa.Port < 0 || sa.Port > 0xFFFF {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Family = AF_INET6
-	p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
-	p[0] = byte(sa.Port >> 8)
-	p[1] = byte(sa.Port)
-	sa.raw.Scope_id = sa.ZoneId
-	for i := 0; i < len(sa.Addr); i++ {
-		sa.raw.Addr[i] = sa.Addr[i]
-	}
-	return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
-	name := sa.Name
-	n := len(name)
-	if n >= len(sa.raw.Path) {
-		return nil, 0, EINVAL
-	}
-	sa.raw.Family = AF_UNIX
-	for i := 0; i < n; i++ {
-		sa.raw.Path[i] = int8(name[i])
-	}
-	// length is family (uint16), name, NUL.
-	sl := _Socklen(2)
-	if n > 0 {
-		sl += _Socklen(n) + 1
-	}
-	if sa.raw.Path[0] == '@' {
-		sa.raw.Path[0] = 0
-		// Don't count trailing NUL for abstract address.
-		sl--
-	}
-
-	return unsafe.Pointer(&sa.raw), sl, nil
-}
-
-//sys	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getsockname
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
-	var rsa RawSockaddrAny
-	var len _Socklen = SizeofSockaddrAny
-	if err = getsockname(fd, &rsa, &len); err != nil {
-		return
-	}
-	return anyToSockaddr(&rsa)
-}
-
-const ImplementsGetwd = true
-
-//sys	Getcwd(buf []byte) (n int, err error)
-
-func Getwd() (wd string, err error) {
-	var buf [PathMax]byte
-	// Getcwd will return an error if it failed for any reason.
-	_, err = Getcwd(buf[0:])
-	if err != nil {
-		return "", err
-	}
-	n := clen(buf[:])
-	if n < 1 {
-		return "", EINVAL
-	}
-	return string(buf[:n]), nil
-}
-
-/*
- * Wrapped
- */
-
-//sysnb	getgroups(ngid int, gid *_Gid_t) (n int, err error)
-//sysnb	setgroups(ngid int, gid *_Gid_t) (err error)
-
-func Getgroups() (gids []int, err error) {
-	n, err := getgroups(0, nil)
-	// Check for error and sanity check group count.  Newer versions of
-	// Solaris allow up to 1024 (NGROUPS_MAX).
-	if n < 0 || n > 1024 {
-		if err != nil {
-			return nil, err
-		}
-		return nil, EINVAL
-	} else if n == 0 {
-		return nil, nil
-	}
-
-	a := make([]_Gid_t, n)
-	n, err = getgroups(n, &a[0])
-	if n == -1 {
-		return nil, err
-	}
-	gids = make([]int, n)
-	for i, v := range a[0:n] {
-		gids[i] = int(v)
-	}
-	return
-}
-
-func Setgroups(gids []int) (err error) {
-	if len(gids) == 0 {
-		return setgroups(0, nil)
-	}
-
-	a := make([]_Gid_t, len(gids))
-	for i, v := range gids {
-		a[i] = _Gid_t(v)
-	}
-	return setgroups(len(a), &a[0])
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
-	// Final argument is (basep *uintptr) and the syscall doesn't take nil.
-	// TODO(rsc): Can we use a single global basep for all calls?
-	return Getdents(fd, buf, new(uintptr))
-}
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.
-
-type WaitStatus uint32
-
-const (
-	mask  = 0x7F
-	core  = 0x80
-	shift = 8
-
-	exited  = 0
-	stopped = 0x7F
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) ExitStatus() int {
-	if w&mask != exited {
-		return -1
-	}
-	return int(w >> shift)
-}
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
-
-func (w WaitStatus) Signal() syscall.Signal {
-	sig := syscall.Signal(w & mask)
-	if sig == stopped || sig == 0 {
-		return -1
-	}
-	return sig
-}
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }
-
-func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }
-
-func (w WaitStatus) StopSignal() syscall.Signal {
-	if !w.Stopped() {
-		return -1
-	}
-	return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-//sys	wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, error) {
-	var status _C_int
-	rpid, err := wait4(int32(pid), &status, options, rusage)
-	wpid := int(rpid)
-	if wpid == -1 {
-		return wpid, err
-	}
-	if wstatus != nil {
-		*wstatus = WaitStatus(status)
-	}
-	return wpid, nil
-}
-
-//sys	gethostname(buf []byte) (n int, err error)
-
-func Gethostname() (name string, err error) {
-	var buf [MaxHostNameLen]byte
-	n, err := gethostname(buf[:])
-	if n != 0 {
-		return "", err
-	}
-	n = clen(buf[:])
-	if n < 1 {
-		return "", EFAULT
-	}
-	return string(buf[:n]), nil
-}
-
-//sys	utimes(path string, times *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) (err error) {
-	if tv == nil {
-		return utimes(path, nil)
-	}
-	if len(tv) != 2 {
-		return EINVAL
-	}
-	return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys	utimensat(fd int, path string, times *[2]Timespec, flag int) (err error)
-
-func UtimesNano(path string, ts []Timespec) error {
-	if ts == nil {
-		return utimensat(AT_FDCWD, path, nil, 0)
-	}
-	if len(ts) != 2 {
-		return EINVAL
-	}
-	return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
-}
-
-func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
-	if ts == nil {
-		return utimensat(dirfd, path, nil, flags)
-	}
-	if len(ts) != 2 {
-		return EINVAL
-	}
-	return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
-}
-
-//sys	fcntl(fd int, cmd int, arg int) (val int, err error)
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
-	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0)
-	if e1 != 0 {
-		return e1
-	}
-	return nil
-}
-
-//sys	futimesat(fildes int, path *byte, times *[2]Timeval) (err error)
-
-func Futimesat(dirfd int, path string, tv []Timeval) error {
-	pathp, err := BytePtrFromString(path)
-	if err != nil {
-		return err
-	}
-	if tv == nil {
-		return futimesat(dirfd, pathp, nil)
-	}
-	if len(tv) != 2 {
-		return EINVAL
-	}
-	return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-// Solaris doesn't have an futimes function because it allows NULL to be
-// specified as the path for futimesat.  However, Go doesn't like
-// NULL-style string interfaces, so this simple wrapper is provided.
-func Futimes(fd int, tv []Timeval) error {
-	if tv == nil {
-		return futimesat(fd, nil, nil)
-	}
-	if len(tv) != 2 {
-		return EINVAL
-	}
-	return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
-	switch rsa.Addr.Family {
-	case AF_UNIX:
-		pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
-		sa := new(SockaddrUnix)
-		// Assume path ends at NUL.
-		// This is not technically the Solaris semantics for
-		// abstract Unix domain sockets -- they are supposed
-		// to be uninterpreted fixed-size binary blobs -- but
-		// everyone uses this convention.
-		n := 0
-		for n < len(pp.Path) && pp.Path[n] != 0 {
-			n++
-		}
-		bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
-		sa.Name = string(bytes)
-		return sa, nil
-
-	case AF_INET:
-		pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
-		sa := new(SockaddrInet4)
-		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
-		sa.Port = int(p[0])<<8 + int(p[1])
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
-		return sa, nil
-
-	case AF_INET6:
-		pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
-		sa := new(SockaddrInet6)
-		p := (*[2]byte)(unsafe.Pointer(&pp.Port))
-		sa.Port = int(p[0])<<8 + int(p[1])
-		sa.ZoneId = pp.Scope_id
-		for i := 0; i < len(sa.Addr); i++ {
-			sa.Addr[i] = pp.Addr[i]
-		}
-		return sa, nil
-	}
-	return nil, EAFNOSUPPORT
-}
-
-//sys	accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = libsocket.accept
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
-	var rsa RawSockaddrAny
-	var len _Socklen = SizeofSockaddrAny
-	nfd, err = accept(fd, &rsa, &len)
-	if nfd == -1 {
-		return
-	}
-	sa, err = anyToSockaddr(&rsa)
-	if err != nil {
-		Close(nfd)
-		nfd = 0
-	}
-	return
-}
-
-//sys	recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.recvmsg
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
-	var msg Msghdr
-	var rsa RawSockaddrAny
-	msg.Name = (*byte)(unsafe.Pointer(&rsa))
-	msg.Namelen = uint32(SizeofSockaddrAny)
-	var iov Iovec
-	if len(p) > 0 {
-		iov.Base = (*int8)(unsafe.Pointer(&p[0]))
-		iov.SetLen(len(p))
-	}
-	var dummy int8
-	if len(oob) > 0 {
-		// receive at least one normal byte
-		if len(p) == 0 {
-			iov.Base = &dummy
-			iov.SetLen(1)
-		}
-		msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
-	}
-	msg.Iov = &iov
-	msg.Iovlen = 1
-	if n, err = recvmsg(fd, &msg, flags); n == -1 {
-		return
-	}
-	oobn = int(msg.Accrightslen)
-	// source address is only specified if the socket is unconnected
-	if rsa.Addr.Family != AF_UNSPEC {
-		from, err = anyToSockaddr(&rsa)
-	}
-	return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
-	_, err = SendmsgN(fd, p, oob, to, flags)
-	return
-}
-
-//sys	sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.sendmsg
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
-	var ptr unsafe.Pointer
-	var salen _Socklen
-	if to != nil {
-		ptr, salen, err = to.sockaddr()
-		if err != nil {
-			return 0, err
-		}
-	}
-	var msg Msghdr
-	msg.Name = (*byte)(unsafe.Pointer(ptr))
-	msg.Namelen = uint32(salen)
-	var iov Iovec
-	if len(p) > 0 {
-		iov.Base = (*int8)(unsafe.Pointer(&p[0]))
-		iov.SetLen(len(p))
-	}
-	var dummy int8
-	if len(oob) > 0 {
-		// send at least one normal byte
-		if len(p) == 0 {
-			iov.Base = &dummy
-			iov.SetLen(1)
-		}
-		msg.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
-	}
-	msg.Iov = &iov
-	msg.Iovlen = 1
-	if n, err = sendmsg(fd, &msg, flags); err != nil {
-		return 0, err
-	}
-	if len(oob) > 0 && len(p) == 0 {
-		n = 0
-	}
-	return n, nil
-}
-
-//sys	acct(path *byte) (err error)
-
-func Acct(path string) (err error) {
-	if len(path) == 0 {
-		// Assume caller wants to disable accounting.
-		return acct(nil)
-	}
-
-	pathp, err := BytePtrFromString(path)
-	if err != nil {
-		return err
-	}
-	return acct(pathp)
-}
-
-/*
- * Expose the ioctl function
- */
-
-//sys	ioctl(fd int, req int, arg uintptr) (err error)
-
-func IoctlSetInt(fd int, req int, value int) (err error) {
-	return ioctl(fd, req, uintptr(value))
-}
-
-func IoctlSetWinsize(fd int, req int, value *Winsize) (err error) {
-	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlSetTermios(fd int, req int, value *Termios) (err error) {
-	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlSetTermio(fd int, req int, value *Termio) (err error) {
-	return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlGetInt(fd int, req int) (int, error) {
-	var value int
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
-	return value, err
-}
-
-func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
-	var value Winsize
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
-	return &value, err
-}
-
-func IoctlGetTermios(fd int, req int) (*Termios, error) {
-	var value Termios
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
-	return &value, err
-}
-
-func IoctlGetTermio(fd int, req int) (*Termio, error) {
-	var value Termio
-	err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
-	return &value, err
-}
-
-/*
- * Exposed directly
- */
-//sys	Access(path string, mode uint32) (err error)
-//sys	Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys	Chdir(path string) (err error)
-//sys	Chmod(path string, mode uint32) (err error)
-//sys	Chown(path string, uid int, gid int) (err error)
-//sys	Chroot(path string) (err error)
-//sys	Close(fd int) (err error)
-//sys	Creat(path string, mode uint32) (fd int, err error)
-//sys	Dup(fd int) (nfd int, err error)
-//sys	Dup2(oldfd int, newfd int) (err error)
-//sys	Exit(code int)
-//sys	Fchdir(fd int) (err error)
-//sys	Fchmod(fd int, mode uint32) (err error)
-//sys	Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys	Fchown(fd int, uid int, gid int) (err error)
-//sys	Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
-//sys	Fdatasync(fd int) (err error)
-//sys	Fpathconf(fd int, name int) (val int, err error)
-//sys	Fstat(fd int, stat *Stat_t) (err error)
-//sys	Getdents(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sysnb	Getgid() (gid int)
-//sysnb	Getpid() (pid int)
-//sysnb	Getpgid(pid int) (pgid int, err error)
-//sysnb	Getpgrp() (pgid int, err error)
-//sys	Geteuid() (euid int)
-//sys	Getegid() (egid int)
-//sys	Getppid() (ppid int)
-//sys	Getpriority(which int, who int) (n int, err error)
-//sysnb	Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Getrusage(who int, rusage *Rusage) (err error)
-//sysnb	Gettimeofday(tv *Timeval) (err error)
-//sysnb	Getuid() (uid int)
-//sys	Kill(pid int, signum syscall.Signal) (err error)
-//sys	Lchown(path string, uid int, gid int) (err error)
-//sys	Link(path string, link string) (err error)
-//sys	Listen(s int, backlog int) (err error) = libsocket.listen
-//sys	Lstat(path string, stat *Stat_t) (err error)
-//sys	Madvise(b []byte, advice int) (err error)
-//sys	Mkdir(path string, mode uint32) (err error)
-//sys	Mkdirat(dirfd int, path string, mode uint32) (err error)
-//sys	Mkfifo(path string, mode uint32) (err error)
-//sys	Mkfifoat(dirfd int, path string, mode uint32) (err error)
-//sys	Mknod(path string, mode uint32, dev int) (err error)
-//sys	Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
-//sys	Mlock(b []byte) (err error)
-//sys	Mlockall(flags int) (err error)
-//sys	Mprotect(b []byte, prot int) (err error)
-//sys	Munlock(b []byte) (err error)
-//sys	Munlockall() (err error)
-//sys	Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys	Open(path string, mode int, perm uint32) (fd int, err error)
-//sys	Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
-//sys	Pathconf(path string, name int) (val int, err error)
-//sys	Pause() (err error)
-//sys	Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys	Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys	read(fd int, p []byte) (n int, err error)
-//sys	Readlink(path string, buf []byte) (n int, err error)
-//sys	Rename(from string, to string) (err error)
-//sys	Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
-//sys	Rmdir(path string) (err error)
-//sys	Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek
-//sysnb	Setegid(egid int) (err error)
-//sysnb	Seteuid(euid int) (err error)
-//sysnb	Setgid(gid int) (err error)
-//sys	Sethostname(p []byte) (err error)
-//sysnb	Setpgid(pid int, pgid int) (err error)
-//sys	Setpriority(which int, who int, prio int) (err error)
-//sysnb	Setregid(rgid int, egid int) (err error)
-//sysnb	Setreuid(ruid int, euid int) (err error)
-//sysnb	Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb	Setsid() (pid int, err error)
-//sysnb	Setuid(uid int) (err error)
-//sys	Shutdown(s int, how int) (err error) = libsocket.shutdown
-//sys	Stat(path string, stat *Stat_t) (err error)
-//sys	Symlink(path string, link string) (err error)
-//sys	Sync() (err error)
-//sysnb	Times(tms *Tms) (ticks uintptr, err error)
-//sys	Truncate(path string, length int64) (err error)
-//sys	Fsync(fd int) (err error)
-//sys	Ftruncate(fd int, length int64) (err error)
-//sys	Umask(mask int) (oldmask int)
-//sysnb	Uname(buf *Utsname) (err error)
-//sys	Unmount(target string, flags int) (err error) = libc.umount
-//sys	Unlink(path string) (err error)
-//sys	Unlinkat(dirfd int, path string, flags int) (err error)
-//sys	Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys	Utime(path string, buf *Utimbuf) (err error)
-//sys	bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.bind
-//sys	connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.connect
-//sys	mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys	munmap(addr uintptr, length uintptr) (err error)
-//sys	sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.sendto
-//sys	socket(domain int, typ int, proto int) (fd int, err error) = libsocket.socket
-//sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.socketpair
-//sys	write(fd int, p []byte) (n int, err error)
-//sys	getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.getsockopt
-//sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername
-//sys	setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt
-//sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = e1
-	}
-	return
-}
-
-var mapper = &mmapper{
-	active: make(map[*byte][]byte),
-	mmap:   mmap,
-	munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
-	return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
-	return mapper.Munmap(b)
-}
-
-//sys	sysconf(name int) (n int64, err error)
-
-// pageSize caches the value of Getpagesize, since it can't change
-// once the system is booted.
-var pageSize int64 // accessed atomically
-
-func Getpagesize() int {
-	n := atomic.LoadInt64(&pageSize)
-	if n == 0 {
-		n, _ = sysconf(_SC_PAGESIZE)
-		atomic.StoreInt64(&pageSize, n)
-	}
-	return int(n)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/newt/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
deleted file mode 100644
index 5aff62c..0000000
--- a/newt/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,solaris
-
-package unix
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
-	ts.Sec = nsec / 1e9
-	ts.Nsec = nsec % 1e9
-	return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
-	nsec += 999 // round up to microsecond
-	tv.Usec = nsec % 1e9 / 1e3
-	tv.Sec = int64(nsec / 1e9)
-	return
-}
-
-func (iov *Iovec) SetLen(length int) {
-	iov.Len = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
-	cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	// TODO(aram): implement this, see issue 5847.
-	panic("unimplemented")
-}


[13/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
deleted file mode 100644
index 1758ecc..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go
+++ /dev/null
@@ -1,1583 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,openbsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_BLUETOOTH                      = 0x20
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1a
-	AF_ECMA                           = 0x8
-	AF_ENCAP                          = 0x1c
-	AF_HYLINK                         = 0xf
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x18
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1a
-	AF_ISO                            = 0x7
-	AF_KEY                            = 0x1e
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x24
-	AF_MPLS                           = 0x21
-	AF_NATM                           = 0x1b
-	AF_NS                             = 0x6
-	AF_OSI                            = 0x7
-	AF_PUP                            = 0x4
-	AF_ROUTE                          = 0x11
-	AF_SIP                            = 0x1d
-	AF_SNA                            = 0xb
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	ARPHRD_ETHER                      = 0x1
-	ARPHRD_FRELAY                     = 0xf
-	ARPHRD_IEEE1394                   = 0x18
-	ARPHRD_IEEE802                    = 0x6
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B9600                             = 0x2580
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDIRFILT                      = 0x4004427c
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc010427b
-	BIOCGETIF                         = 0x4020426b
-	BIOCGFILDROP                      = 0x40044278
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044273
-	BIOCGRTIMEOUT                     = 0x4010426e
-	BIOCGSTATS                        = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCLOCK                          = 0x20004276
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDIRFILT                      = 0x8004427d
-	BIOCSDLT                          = 0x8004427a
-	BIOCSETF                          = 0x80104267
-	BIOCSETIF                         = 0x8020426c
-	BIOCSETWF                         = 0x80104277
-	BIOCSFILDROP                      = 0x80044279
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044272
-	BIOCSRTIMEOUT                     = 0x8010426d
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DIRECTION_IN                  = 0x1
-	BPF_DIRECTION_OUT                 = 0x2
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x200000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0xff
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	DIOCOSFPFLUSH                     = 0x2000444e
-	DLT_ARCNET                        = 0x7
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AX25                          = 0x3
-	DLT_CHAOS                         = 0x5
-	DLT_C_HDLC                        = 0x68
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0xd
-	DLT_FDDI                          = 0xa
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_LOOP                          = 0xc
-	DLT_MPLS                          = 0xdb
-	DLT_NULL                          = 0x0
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PRONET                        = 0x4
-	DLT_RAW                           = 0xe
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EMT_TAGOVF                        = 0x1
-	EMUL_ENABLED                      = 0x1
-	EMUL_NATIVE                       = 0x2
-	ENDRUNDISC                        = 0x9
-	ETHERMIN                          = 0x2e
-	ETHERMTU                          = 0x5dc
-	ETHERTYPE_8023                    = 0x4
-	ETHERTYPE_AARP                    = 0x80f3
-	ETHERTYPE_ACCTON                  = 0x8390
-	ETHERTYPE_AEONIC                  = 0x8036
-	ETHERTYPE_ALPHA                   = 0x814a
-	ETHERTYPE_AMBER                   = 0x6008
-	ETHERTYPE_AMOEBA                  = 0x8145
-	ETHERTYPE_AOE                     = 0x88a2
-	ETHERTYPE_APOLLO                  = 0x80f7
-	ETHERTYPE_APOLLODOMAIN            = 0x8019
-	ETHERTYPE_APPLETALK               = 0x809b
-	ETHERTYPE_APPLITEK                = 0x80c7
-	ETHERTYPE_ARGONAUT                = 0x803a
-	ETHERTYPE_ARP                     = 0x806
-	ETHERTYPE_AT                      = 0x809b
-	ETHERTYPE_ATALK                   = 0x809b
-	ETHERTYPE_ATOMIC                  = 0x86df
-	ETHERTYPE_ATT                     = 0x8069
-	ETHERTYPE_ATTSTANFORD             = 0x8008
-	ETHERTYPE_AUTOPHON                = 0x806a
-	ETHERTYPE_AXIS                    = 0x8856
-	ETHERTYPE_BCLOOP                  = 0x9003
-	ETHERTYPE_BOFL                    = 0x8102
-	ETHERTYPE_CABLETRON               = 0x7034
-	ETHERTYPE_CHAOS                   = 0x804
-	ETHERTYPE_COMDESIGN               = 0x806c
-	ETHERTYPE_COMPUGRAPHIC            = 0x806d
-	ETHERTYPE_COUNTERPOINT            = 0x8062
-	ETHERTYPE_CRONUS                  = 0x8004
-	ETHERTYPE_CRONUSVLN               = 0x8003
-	ETHERTYPE_DCA                     = 0x1234
-	ETHERTYPE_DDE                     = 0x807b
-	ETHERTYPE_DEBNI                   = 0xaaaa
-	ETHERTYPE_DECAM                   = 0x8048
-	ETHERTYPE_DECCUST                 = 0x6006
-	ETHERTYPE_DECDIAG                 = 0x6005
-	ETHERTYPE_DECDNS                  = 0x803c
-	ETHERTYPE_DECDTS                  = 0x803e
-	ETHERTYPE_DECEXPER                = 0x6000
-	ETHERTYPE_DECLAST                 = 0x8041
-	ETHERTYPE_DECLTM                  = 0x803f
-	ETHERTYPE_DECMUMPS                = 0x6009
-	ETHERTYPE_DECNETBIOS              = 0x8040
-	ETHERTYPE_DELTACON                = 0x86de
-	ETHERTYPE_DIDDLE                  = 0x4321
-	ETHERTYPE_DLOG1                   = 0x660
-	ETHERTYPE_DLOG2                   = 0x661
-	ETHERTYPE_DN                      = 0x6003
-	ETHERTYPE_DOGFIGHT                = 0x1989
-	ETHERTYPE_DSMD                    = 0x8039
-	ETHERTYPE_ECMA                    = 0x803
-	ETHERTYPE_ENCRYPT                 = 0x803d
-	ETHERTYPE_ES                      = 0x805d
-	ETHERTYPE_EXCELAN                 = 0x8010
-	ETHERTYPE_EXPERDATA               = 0x8049
-	ETHERTYPE_FLIP                    = 0x8146
-	ETHERTYPE_FLOWCONTROL             = 0x8808
-	ETHERTYPE_FRARP                   = 0x808
-	ETHERTYPE_GENDYN                  = 0x8068
-	ETHERTYPE_HAYES                   = 0x8130
-	ETHERTYPE_HIPPI_FP                = 0x8180
-	ETHERTYPE_HITACHI                 = 0x8820
-	ETHERTYPE_HP                      = 0x8005
-	ETHERTYPE_IEEEPUP                 = 0xa00
-	ETHERTYPE_IEEEPUPAT               = 0xa01
-	ETHERTYPE_IMLBL                   = 0x4c42
-	ETHERTYPE_IMLBLDIAG               = 0x424c
-	ETHERTYPE_IP                      = 0x800
-	ETHERTYPE_IPAS                    = 0x876c
-	ETHERTYPE_IPV6                    = 0x86dd
-	ETHERTYPE_IPX                     = 0x8137
-	ETHERTYPE_IPXNEW                  = 0x8037
-	ETHERTYPE_KALPANA                 = 0x8582
-	ETHERTYPE_LANBRIDGE               = 0x8038
-	ETHERTYPE_LANPROBE                = 0x8888
-	ETHERTYPE_LAT                     = 0x6004
-	ETHERTYPE_LBACK                   = 0x9000
-	ETHERTYPE_LITTLE                  = 0x8060
-	ETHERTYPE_LLDP                    = 0x88cc
-	ETHERTYPE_LOGICRAFT               = 0x8148
-	ETHERTYPE_LOOPBACK                = 0x9000
-	ETHERTYPE_MATRA                   = 0x807a
-	ETHERTYPE_MAX                     = 0xffff
-	ETHERTYPE_MERIT                   = 0x807c
-	ETHERTYPE_MICP                    = 0x873a
-	ETHERTYPE_MOPDL                   = 0x6001
-	ETHERTYPE_MOPRC                   = 0x6002
-	ETHERTYPE_MOTOROLA                = 0x818d
-	ETHERTYPE_MPLS                    = 0x8847
-	ETHERTYPE_MPLS_MCAST              = 0x8848
-	ETHERTYPE_MUMPS                   = 0x813f
-	ETHERTYPE_NBPCC                   = 0x3c04
-	ETHERTYPE_NBPCLAIM                = 0x3c09
-	ETHERTYPE_NBPCLREQ                = 0x3c05
-	ETHERTYPE_NBPCLRSP                = 0x3c06
-	ETHERTYPE_NBPCREQ                 = 0x3c02
-	ETHERTYPE_NBPCRSP                 = 0x3c03
-	ETHERTYPE_NBPDG                   = 0x3c07
-	ETHERTYPE_NBPDGB                  = 0x3c08
-	ETHERTYPE_NBPDLTE                 = 0x3c0a
-	ETHERTYPE_NBPRAR                  = 0x3c0c
-	ETHERTYPE_NBPRAS                  = 0x3c0b
-	ETHERTYPE_NBPRST                  = 0x3c0d
-	ETHERTYPE_NBPSCD                  = 0x3c01
-	ETHERTYPE_NBPVCD                  = 0x3c00
-	ETHERTYPE_NBS                     = 0x802
-	ETHERTYPE_NCD                     = 0x8149
-	ETHERTYPE_NESTAR                  = 0x8006
-	ETHERTYPE_NETBEUI                 = 0x8191
-	ETHERTYPE_NOVELL                  = 0x8138
-	ETHERTYPE_NS                      = 0x600
-	ETHERTYPE_NSAT                    = 0x601
-	ETHERTYPE_NSCOMPAT                = 0x807
-	ETHERTYPE_NTRAILER                = 0x10
-	ETHERTYPE_OS9                     = 0x7007
-	ETHERTYPE_OS9NET                  = 0x7009
-	ETHERTYPE_PACER                   = 0x80c6
-	ETHERTYPE_PAE                     = 0x888e
-	ETHERTYPE_PCS                     = 0x4242
-	ETHERTYPE_PLANNING                = 0x8044
-	ETHERTYPE_PPP                     = 0x880b
-	ETHERTYPE_PPPOE                   = 0x8864
-	ETHERTYPE_PPPOEDISC               = 0x8863
-	ETHERTYPE_PRIMENTS                = 0x7031
-	ETHERTYPE_PUP                     = 0x200
-	ETHERTYPE_PUPAT                   = 0x200
-	ETHERTYPE_QINQ                    = 0x88a8
-	ETHERTYPE_RACAL                   = 0x7030
-	ETHERTYPE_RATIONAL                = 0x8150
-	ETHERTYPE_RAWFR                   = 0x6559
-	ETHERTYPE_RCL                     = 0x1995
-	ETHERTYPE_RDP                     = 0x8739
-	ETHERTYPE_RETIX                   = 0x80f2
-	ETHERTYPE_REVARP                  = 0x8035
-	ETHERTYPE_SCA                     = 0x6007
-	ETHERTYPE_SECTRA                  = 0x86db
-	ETHERTYPE_SECUREDATA              = 0x876d
-	ETHERTYPE_SGITW                   = 0x817e
-	ETHERTYPE_SG_BOUNCE               = 0x8016
-	ETHERTYPE_SG_DIAG                 = 0x8013
-	ETHERTYPE_SG_NETGAMES             = 0x8014
-	ETHERTYPE_SG_RESV                 = 0x8015
-	ETHERTYPE_SIMNET                  = 0x5208
-	ETHERTYPE_SLOW                    = 0x8809
-	ETHERTYPE_SNA                     = 0x80d5
-	ETHERTYPE_SNMP                    = 0x814c
-	ETHERTYPE_SONIX                   = 0xfaf5
-	ETHERTYPE_SPIDER                  = 0x809f
-	ETHERTYPE_SPRITE                  = 0x500
-	ETHERTYPE_STP                     = 0x8181
-	ETHERTYPE_TALARIS                 = 0x812b
-	ETHERTYPE_TALARISMC               = 0x852b
-	ETHERTYPE_TCPCOMP                 = 0x876b
-	ETHERTYPE_TCPSM                   = 0x9002
-	ETHERTYPE_TEC                     = 0x814f
-	ETHERTYPE_TIGAN                   = 0x802f
-	ETHERTYPE_TRAIL                   = 0x1000
-	ETHERTYPE_TRANSETHER              = 0x6558
-	ETHERTYPE_TYMSHARE                = 0x802e
-	ETHERTYPE_UBBST                   = 0x7005
-	ETHERTYPE_UBDEBUG                 = 0x900
-	ETHERTYPE_UBDIAGLOOP              = 0x7002
-	ETHERTYPE_UBDL                    = 0x7000
-	ETHERTYPE_UBNIU                   = 0x7001
-	ETHERTYPE_UBNMC                   = 0x7003
-	ETHERTYPE_VALID                   = 0x1600
-	ETHERTYPE_VARIAN                  = 0x80dd
-	ETHERTYPE_VAXELN                  = 0x803b
-	ETHERTYPE_VEECO                   = 0x8067
-	ETHERTYPE_VEXP                    = 0x805b
-	ETHERTYPE_VGLAB                   = 0x8131
-	ETHERTYPE_VINES                   = 0xbad
-	ETHERTYPE_VINESECHO               = 0xbaf
-	ETHERTYPE_VINESLOOP               = 0xbae
-	ETHERTYPE_VITAL                   = 0xff00
-	ETHERTYPE_VLAN                    = 0x8100
-	ETHERTYPE_VLTLMAN                 = 0x8080
-	ETHERTYPE_VPROD                   = 0x805c
-	ETHERTYPE_VURESERVED              = 0x8147
-	ETHERTYPE_WATERLOO                = 0x8130
-	ETHERTYPE_WELLFLEET               = 0x8103
-	ETHERTYPE_X25                     = 0x805
-	ETHERTYPE_X75                     = 0x801
-	ETHERTYPE_XNSSM                   = 0x9001
-	ETHERTYPE_XTP                     = 0x817d
-	ETHER_ADDR_LEN                    = 0x6
-	ETHER_ALIGN                       = 0x2
-	ETHER_CRC_LEN                     = 0x4
-	ETHER_CRC_POLY_BE                 = 0x4c11db6
-	ETHER_CRC_POLY_LE                 = 0xedb88320
-	ETHER_HDR_LEN                     = 0xe
-	ETHER_MAX_DIX_LEN                 = 0x600
-	ETHER_MAX_LEN                     = 0x5ee
-	ETHER_MIN_LEN                     = 0x40
-	ETHER_TYPE_LEN                    = 0x2
-	ETHER_VLAN_ENCAP_LEN              = 0x4
-	EVFILT_AIO                        = -0x3
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0x7
-	EVFILT_TIMER                      = -0x7
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0xa
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETOWN                          = 0x5
-	F_OK                              = 0x0
-	F_RDLCK                           = 0x1
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETOWN                          = 0x6
-	F_UNLCK                           = 0x2
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFAN_ARRIVAL                      = 0x0
-	IFAN_DEPARTURE                    = 0x1
-	IFA_ROUTE                         = 0x1
-	IFF_ALLMULTI                      = 0x200
-	IFF_BROADCAST                     = 0x2
-	IFF_CANTCHANGE                    = 0x8e52
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_A12MPPSWITCH                  = 0x82
-	IFT_AAL2                          = 0xbb
-	IFT_AAL5                          = 0x31
-	IFT_ADSL                          = 0x5e
-	IFT_AFLANE8023                    = 0x3b
-	IFT_AFLANE8025                    = 0x3c
-	IFT_ARAP                          = 0x58
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ASYNC                         = 0x54
-	IFT_ATM                           = 0x25
-	IFT_ATMDXI                        = 0x69
-	IFT_ATMFUNI                       = 0x6a
-	IFT_ATMIMA                        = 0x6b
-	IFT_ATMLOGICAL                    = 0x50
-	IFT_ATMRADIO                      = 0xbd
-	IFT_ATMSUBINTERFACE               = 0x86
-	IFT_ATMVCIENDPT                   = 0xc2
-	IFT_ATMVIRTUAL                    = 0x95
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
-	IFT_BLUETOOTH                     = 0xf8
-	IFT_BRIDGE                        = 0xd1
-	IFT_BSC                           = 0x53
-	IFT_CARP                          = 0xf7
-	IFT_CCTEMUL                       = 0x3d
-	IFT_CEPT                          = 0x13
-	IFT_CES                           = 0x85
-	IFT_CHANNEL                       = 0x46
-	IFT_CNR                           = 0x55
-	IFT_COFFEE                        = 0x84
-	IFT_COMPOSITELINK                 = 0x9b
-	IFT_DCN                           = 0x8d
-	IFT_DIGITALPOWERLINE              = 0x8a
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-	IFT_DLSW                          = 0x4a
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
-	IFT_DOCSCABLEMACLAYER             = 0x7f
-	IFT_DOCSCABLEUPSTREAM             = 0x81
-	IFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd
-	IFT_DS0                           = 0x51
-	IFT_DS0BUNDLE                     = 0x52
-	IFT_DS1FDL                        = 0xaa
-	IFT_DS3                           = 0x1e
-	IFT_DTM                           = 0x8c
-	IFT_DUMMY                         = 0xf1
-	IFT_DVBASILN                      = 0xac
-	IFT_DVBASIOUT                     = 0xad
-	IFT_DVBRCCDOWNSTREAM              = 0x93
-	IFT_DVBRCCMACLAYER                = 0x92
-	IFT_DVBRCCUPSTREAM                = 0x94
-	IFT_ECONET                        = 0xce
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_EPLRS                         = 0x57
-	IFT_ESCON                         = 0x49
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0xf3
-	IFT_FAST                          = 0x7d
-	IFT_FASTETHER                     = 0x3e
-	IFT_FASTETHERFX                   = 0x45
-	IFT_FDDI                          = 0xf
-	IFT_FIBRECHANNEL                  = 0x38
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
-	IFT_FRAMERELAYMPI                 = 0x5c
-	IFT_FRDLCIENDPT                   = 0xc1
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_FRF16MFRBUNDLE                = 0xa3
-	IFT_FRFORWARD                     = 0x9e
-	IFT_G703AT2MB                     = 0x43
-	IFT_G703AT64K                     = 0x42
-	IFT_GIF                           = 0xf0
-	IFT_GIGABITETHERNET               = 0x75
-	IFT_GR303IDT                      = 0xb2
-	IFT_GR303RDT                      = 0xb1
-	IFT_H323GATEKEEPER                = 0xa4
-	IFT_H323PROXY                     = 0xa5
-	IFT_HDH1822                       = 0x3
-	IFT_HDLC                          = 0x76
-	IFT_HDSL2                         = 0xa8
-	IFT_HIPERLAN2                     = 0xb7
-	IFT_HIPPI                         = 0x2f
-	IFT_HIPPIINTERFACE                = 0x39
-	IFT_HOSTPAD                       = 0x5a
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IBM370PARCHAN                 = 0x48
-	IFT_IDSL                          = 0x9a
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE80211                     = 0x47
-	IFT_IEEE80212                     = 0x37
-	IFT_IEEE8023ADLAG                 = 0xa1
-	IFT_IFGSN                         = 0x91
-	IFT_IMT                           = 0xbe
-	IFT_INFINIBAND                    = 0xc7
-	IFT_INTERLEAVE                    = 0x7c
-	IFT_IP                            = 0x7e
-	IFT_IPFORWARD                     = 0x8e
-	IFT_IPOVERATM                     = 0x72
-	IFT_IPOVERCDLC                    = 0x6d
-	IFT_IPOVERCLAW                    = 0x6e
-	IFT_IPSWITCH                      = 0x4e
-	IFT_ISDN                          = 0x3f
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISDNS                         = 0x4b
-	IFT_ISDNU                         = 0x4c
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88025CRFPINT               = 0x62
-	IFT_ISO88025DTR                   = 0x56
-	IFT_ISO88025FIBER                 = 0x73
-	IFT_ISO88026                      = 0xa
-	IFT_ISUP                          = 0xb3
-	IFT_L2VLAN                        = 0x87
-	IFT_L3IPVLAN                      = 0x88
-	IFT_L3IPXVLAN                     = 0x89
-	IFT_LAPB                          = 0x10
-	IFT_LAPD                          = 0x4d
-	IFT_LAPF                          = 0x77
-	IFT_LINEGROUP                     = 0xd2
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MEDIAMAILOVERIP               = 0x8b
-	IFT_MFSIGLINK                     = 0xa7
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_MPC                           = 0x71
-	IFT_MPLS                          = 0xa6
-	IFT_MPLSTUNNEL                    = 0x96
-	IFT_MSDSL                         = 0x8f
-	IFT_MVL                           = 0xbf
-	IFT_MYRINET                       = 0x63
-	IFT_NFAS                          = 0xaf
-	IFT_NSIP                          = 0x1b
-	IFT_OPTICALCHANNEL                = 0xc3
-	IFT_OPTICALTRANSPORT              = 0xc4
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PFLOG                         = 0xf5
-	IFT_PFLOW                         = 0xf9
-	IFT_PFSYNC                        = 0xf6
-	IFT_PLC                           = 0xae
-	IFT_PON155                        = 0xcf
-	IFT_PON622                        = 0xd0
-	IFT_POS                           = 0xab
-	IFT_PPP                           = 0x17
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
-	IFT_PROPATM                       = 0xc5
-	IFT_PROPBWAP2MP                   = 0xb8
-	IFT_PROPCNLS                      = 0x59
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PROPWIRELESSP2P               = 0x9d
-	IFT_PTPSERIAL                     = 0x16
-	IFT_PVC                           = 0xf2
-	IFT_Q2931                         = 0xc9
-	IFT_QLLC                          = 0x44
-	IFT_RADIOMAC                      = 0xbc
-	IFT_RADSL                         = 0x5f
-	IFT_REACHDSL                      = 0xc0
-	IFT_RFC1483                       = 0x9f
-	IFT_RS232                         = 0x21
-	IFT_RSRB                          = 0x4f
-	IFT_SDLC                          = 0x11
-	IFT_SDSL                          = 0x60
-	IFT_SHDSL                         = 0xa9
-	IFT_SIP                           = 0x1f
-	IFT_SIPSIG                        = 0xcc
-	IFT_SIPTG                         = 0xcb
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_SRP                           = 0x97
-	IFT_SS7SIGLINK                    = 0x9c
-	IFT_STACKTOSTACK                  = 0x6f
-	IFT_STARLAN                       = 0xb
-	IFT_T1                            = 0x12
-	IFT_TDLC                          = 0x74
-	IFT_TELINK                        = 0xc8
-	IFT_TERMPAD                       = 0x5b
-	IFT_TR008                         = 0xb0
-	IFT_TRANSPHDLC                    = 0x7b
-	IFT_TUNNEL                        = 0x83
-	IFT_ULTRA                         = 0x1d
-	IFT_USB                           = 0xa0
-	IFT_V11                           = 0x40
-	IFT_V35                           = 0x2d
-	IFT_V36                           = 0x41
-	IFT_V37                           = 0x78
-	IFT_VDSL                          = 0x61
-	IFT_VIRTUALIPADDRESS              = 0x70
-	IFT_VIRTUALTG                     = 0xca
-	IFT_VOICEDID                      = 0xd5
-	IFT_VOICEEM                       = 0x64
-	IFT_VOICEEMFGD                    = 0xd3
-	IFT_VOICEENCAP                    = 0x67
-	IFT_VOICEFGDEANA                  = 0xd4
-	IFT_VOICEFXO                      = 0x65
-	IFT_VOICEFXS                      = 0x66
-	IFT_VOICEOVERATM                  = 0x98
-	IFT_VOICEOVERCABLE                = 0xc6
-	IFT_VOICEOVERFRAMERELAY           = 0x99
-	IFT_VOICEOVERIP                   = 0x68
-	IFT_X213                          = 0x5d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25HUNTGROUP                  = 0x7a
-	IFT_X25MLP                        = 0x79
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LOOPBACKNET                    = 0x7f
-	IN_RFC3021_HOST                   = 0x1
-	IN_RFC3021_NET                    = 0xfffffffe
-	IN_RFC3021_NSHIFT                 = 0x1f
-	IPPROTO_AH                        = 0x33
-	IPPROTO_CARP                      = 0x70
-	IPPROTO_DIVERT                    = 0x102
-	IPPROTO_DIVERT_INIT               = 0x2
-	IPPROTO_DIVERT_RESP               = 0x1
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x103
-	IPPROTO_MOBILE                    = 0x37
-	IPPROTO_MPLS                      = 0x89
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_PFSYNC                    = 0xf0
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_UDP                       = 0x11
-	IPV6_AUTH_LEVEL                   = 0x35
-	IPV6_AUTOFLOWLABEL                = 0x3b
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_DONTFRAG                     = 0x3e
-	IPV6_DSTOPTS                      = 0x32
-	IPV6_ESP_NETWORK_LEVEL            = 0x37
-	IPV6_ESP_TRANS_LEVEL              = 0x36
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_HOPLIMIT                     = 0x2f
-	IPV6_HOPOPTS                      = 0x31
-	IPV6_IPCOMP_LEVEL                 = 0x3c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_NEXTHOP                      = 0x30
-	IPV6_OPTIONS                      = 0x1
-	IPV6_PATHMTU                      = 0x2c
-	IPV6_PIPEX                        = 0x3f
-	IPV6_PKTINFO                      = 0x2e
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVDSTOPTS                  = 0x28
-	IPV6_RECVDSTPORT                  = 0x40
-	IPV6_RECVHOPLIMIT                 = 0x25
-	IPV6_RECVHOPOPTS                  = 0x27
-	IPV6_RECVPATHMTU                  = 0x2b
-	IPV6_RECVPKTINFO                  = 0x24
-	IPV6_RECVRTHDR                    = 0x26
-	IPV6_RECVTCLASS                   = 0x39
-	IPV6_RTABLE                       = 0x1021
-	IPV6_RTHDR                        = 0x33
-	IPV6_RTHDRDSTOPTS                 = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x3d
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_USE_MIN_MTU                  = 0x2a
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_AUTH_LEVEL                     = 0x14
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DIVERTFL                       = 0x1022
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_ESP_NETWORK_LEVEL              = 0x16
-	IP_ESP_TRANS_LEVEL                = 0x15
-	IP_HDRINCL                        = 0x2
-	IP_IPCOMP_LEVEL                   = 0x1d
-	IP_IPSECFLOWINFO                  = 0x24
-	IP_IPSEC_LOCAL_AUTH               = 0x1b
-	IP_IPSEC_LOCAL_CRED               = 0x19
-	IP_IPSEC_LOCAL_ID                 = 0x17
-	IP_IPSEC_REMOTE_AUTH              = 0x1c
-	IP_IPSEC_REMOTE_CRED              = 0x1a
-	IP_IPSEC_REMOTE_ID                = 0x18
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MF                             = 0x2000
-	IP_MINTTL                         = 0x20
-	IP_MIN_MEMBERSHIPS                = 0xf
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_OFFMASK                        = 0x1fff
-	IP_OPTIONS                        = 0x1
-	IP_PIPEX                          = 0x22
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVDSTPORT                    = 0x21
-	IP_RECVIF                         = 0x1e
-	IP_RECVOPTS                       = 0x5
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVRTABLE                     = 0x23
-	IP_RECVTTL                        = 0x1f
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RTABLE                         = 0x1021
-	IP_TOS                            = 0x3
-	IP_TTL                            = 0x4
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LCNT_OVERLOAD_FLUSH               = 0x6
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x6
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_SPACEAVAIL                   = 0x5
-	MADV_WILLNEED                     = 0x3
-	MAP_ANON                          = 0x1000
-	MAP_COPY                          = 0x4
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_FLAGMASK                      = 0x1ff7
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_INHERIT                       = 0x80
-	MAP_INHERIT_COPY                  = 0x1
-	MAP_INHERIT_DONATE_COPY           = 0x3
-	MAP_INHERIT_NONE                  = 0x2
-	MAP_INHERIT_SHARE                 = 0x0
-	MAP_NOEXTEND                      = 0x100
-	MAP_NORESERVE                     = 0x40
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_SHARED                        = 0x1
-	MAP_TRYFIXED                      = 0x400
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_BCAST                         = 0x100
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOR                           = 0x8
-	MSG_MCAST                         = 0x200
-	MSG_NOSIGNAL                      = 0x400
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MS_ASYNC                          = 0x1
-	MS_INVALIDATE                     = 0x4
-	MS_SYNC                           = 0x2
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_MAXID                      = 0x6
-	NET_RT_STATS                      = 0x4
-	NET_RT_TABLE                      = 0x5
-	NOFLSH                            = 0x80000000
-	NOTE_ATTRIB                       = 0x8
-	NOTE_CHILD                        = 0x4
-	NOTE_DELETE                       = 0x1
-	NOTE_EOF                          = 0x2
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FORK                         = 0x40000000
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_PCTRLMASK                    = 0xf0000000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRUNCATE                     = 0x80
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	ONLCR                             = 0x2
-	ONLRET                            = 0x80
-	ONOCR                             = 0x40
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x10000
-	O_CREAT                           = 0x200
-	O_DIRECTORY                       = 0x20000
-	O_DSYNC                           = 0x80
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x8000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_RSYNC                           = 0x80
-	O_SHLOCK                          = 0x10
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PF_FLUSH                          = 0x1
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_LABEL                        = 0xa
-	RTAX_MAX                          = 0xb
-	RTAX_NETMASK                      = 0x2
-	RTAX_SRC                          = 0x8
-	RTAX_SRCMASK                      = 0x9
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_LABEL                         = 0x400
-	RTA_NETMASK                       = 0x4
-	RTA_SRC                           = 0x100
-	RTA_SRCMASK                       = 0x200
-	RTF_ANNOUNCE                      = 0x4000
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_CLONED                        = 0x10000
-	RTF_CLONING                       = 0x100
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_FMASK                         = 0x10f808
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_LLINFO                        = 0x400
-	RTF_MASK                          = 0x80
-	RTF_MODIFIED                      = 0x20
-	RTF_MPATH                         = 0x40000
-	RTF_MPLS                          = 0x100000
-	RTF_PERMANENT_ARP                 = 0x2000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x2000
-	RTF_REJECT                        = 0x8
-	RTF_SOURCE                        = 0x20000
-	RTF_STATIC                        = 0x800
-	RTF_TUNNEL                        = 0x100000
-	RTF_UP                            = 0x1
-	RTF_USETRAILERS                   = 0x8000
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DESYNC                        = 0x10
-	RTM_GET                           = 0x4
-	RTM_IFANNOUNCE                    = 0xf
-	RTM_IFINFO                        = 0xe
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MAXSIZE                       = 0x800
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RT_TABLEID_MAX                    = 0xff
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	RUSAGE_THREAD                     = 0x1
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x4
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCAIFGROUP                      = 0x80286987
-	SIOCALIFADDR                      = 0x8218691c
-	SIOCATMARK                        = 0x40047307
-	SIOCBRDGADD                       = 0x8058693c
-	SIOCBRDGADDS                      = 0x80586941
-	SIOCBRDGARL                       = 0x806e694d
-	SIOCBRDGDADDR                     = 0x81286947
-	SIOCBRDGDEL                       = 0x8058693d
-	SIOCBRDGDELS                      = 0x80586942
-	SIOCBRDGFLUSH                     = 0x80586948
-	SIOCBRDGFRL                       = 0x806e694e
-	SIOCBRDGGCACHE                    = 0xc0146941
-	SIOCBRDGGFD                       = 0xc0146952
-	SIOCBRDGGHT                       = 0xc0146951
-	SIOCBRDGGIFFLGS                   = 0xc058693e
-	SIOCBRDGGMA                       = 0xc0146953
-	SIOCBRDGGPARAM                    = 0xc0406958
-	SIOCBRDGGPRI                      = 0xc0146950
-	SIOCBRDGGRL                       = 0xc030694f
-	SIOCBRDGGSIFS                     = 0xc058693c
-	SIOCBRDGGTO                       = 0xc0146946
-	SIOCBRDGIFS                       = 0xc0586942
-	SIOCBRDGRTS                       = 0xc0206943
-	SIOCBRDGSADDR                     = 0xc1286944
-	SIOCBRDGSCACHE                    = 0x80146940
-	SIOCBRDGSFD                       = 0x80146952
-	SIOCBRDGSHT                       = 0x80146951
-	SIOCBRDGSIFCOST                   = 0x80586955
-	SIOCBRDGSIFFLGS                   = 0x8058693f
-	SIOCBRDGSIFPRIO                   = 0x80586954
-	SIOCBRDGSMA                       = 0x80146953
-	SIOCBRDGSPRI                      = 0x80146950
-	SIOCBRDGSPROTO                    = 0x8014695a
-	SIOCBRDGSTO                       = 0x80146945
-	SIOCBRDGSTXHC                     = 0x80146959
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFGROUP                      = 0x80286989
-	SIOCDIFPHYADDR                    = 0x80206949
-	SIOCDLIFADDR                      = 0x8218691e
-	SIOCGETKALIVE                     = 0xc01869a4
-	SIOCGETLABEL                      = 0x8020699a
-	SIOCGETPFLOW                      = 0xc02069fe
-	SIOCGETPFSYNC                     = 0xc02069f8
-	SIOCGETSGCNT                      = 0xc0207534
-	SIOCGETVIFCNT                     = 0xc0287533
-	SIOCGETVLAN                       = 0xc0206990
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFASYNCMAP                   = 0xc020697c
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCONF                       = 0xc0106924
-	SIOCGIFDATA                       = 0xc020691b
-	SIOCGIFDESCR                      = 0xc0206981
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGATTR                      = 0xc028698b
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFGMEMB                      = 0xc028698a
-	SIOCGIFGROUP                      = 0xc0286988
-	SIOCGIFHARDMTU                    = 0xc02069a5
-	SIOCGIFMEDIA                      = 0xc0306936
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc020697e
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206948
-	SIOCGIFPRIORITY                   = 0xc020699c
-	SIOCGIFPSRCADDR                   = 0xc0206947
-	SIOCGIFRDOMAIN                    = 0xc02069a0
-	SIOCGIFRTLABEL                    = 0xc0206983
-	SIOCGIFTIMESLOT                   = 0xc0206986
-	SIOCGIFXFLAGS                     = 0xc020699e
-	SIOCGLIFADDR                      = 0xc218691d
-	SIOCGLIFPHYADDR                   = 0xc218694b
-	SIOCGLIFPHYRTABLE                 = 0xc02069a2
-	SIOCGLIFPHYTTL                    = 0xc02069a9
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCGSPPPPARAMS                   = 0xc0206994
-	SIOCGVH                           = 0xc02069f6
-	SIOCGVNETID                       = 0xc02069a7
-	SIOCIFCREATE                      = 0x8020697a
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc0106978
-	SIOCSETKALIVE                     = 0x801869a3
-	SIOCSETLABEL                      = 0x80206999
-	SIOCSETPFLOW                      = 0x802069fd
-	SIOCSETPFSYNC                     = 0x802069f7
-	SIOCSETVLAN                       = 0x8020698f
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFASYNCMAP                   = 0x8020697d
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFDESCR                      = 0x80206980
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGATTR                      = 0x8028698c
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFLLADDR                     = 0x8020691f
-	SIOCSIFMEDIA                      = 0xc0206935
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x8020697f
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x80406946
-	SIOCSIFPRIORITY                   = 0x8020699b
-	SIOCSIFRDOMAIN                    = 0x8020699f
-	SIOCSIFRTLABEL                    = 0x80206982
-	SIOCSIFTIMESLOT                   = 0x80206985
-	SIOCSIFXFLAGS                     = 0x8020699d
-	SIOCSLIFPHYADDR                   = 0x8218694a
-	SIOCSLIFPHYRTABLE                 = 0x802069a1
-	SIOCSLIFPHYTTL                    = 0x802069a8
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SIOCSSPPPPARAMS                   = 0x80206993
-	SIOCSVH                           = 0xc02069f5
-	SIOCSVNETID                       = 0x802069a6
-	SOCK_DGRAM                        = 0x2
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_BINDANY                        = 0x1000
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LINGER                         = 0x80
-	SO_NETPROC                        = 0x1020
-	SO_OOBINLINE                      = 0x100
-	SO_PEERCRED                       = 0x1022
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_RTABLE                         = 0x1021
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_SPLICE                         = 0x1023
-	SO_TIMESTAMP                      = 0x800
-	SO_TYPE                           = 0x1008
-	SO_USELOOPBACK                    = 0x40
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_MAXBURST                      = 0x4
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x3
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MD5SIG                        = 0x4
-	TCP_MSS                           = 0x200
-	TCP_NODELAY                       = 0x1
-	TCP_NOPUSH                        = 0x10
-	TCP_NSTATES                       = 0xb
-	TCP_SACK_ENABLE                   = 0x8
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDRAIN                         = 0x2000745e
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLAG_CLOCAL                   = 0x2
-	TIOCFLAG_CRTSCTS                  = 0x4
-	TIOCFLAG_MDMBUF                   = 0x8
-	TIOCFLAG_PPS                      = 0x10
-	TIOCFLAG_SOFTCAR                  = 0x1
-	TIOCFLUSH                         = 0x80047410
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGFLAGS                        = 0x4004745d
-	TIOCGPGRP                         = 0x40047477
-	TIOCGSID                          = 0x40047463
-	TIOCGTSTAMP                       = 0x4010745b
-	TIOCGWINSZ                        = 0x40087468
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGET                          = 0x4004746a
-	TIOCMODG                          = 0x4004746a
-	TIOCMODS                          = 0x8004746d
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSFLAGS                        = 0x8004745c
-	TIOCSIG                           = 0x8004745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x80047465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSTSTAMP                       = 0x8008745a
-	TIOCSWINSZ                        = 0x80087467
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WALTSIG                           = 0x4
-	WCONTINUED                        = 0x8
-	WCOREFLAG                         = 0x80
-	WNOHANG                           = 0x1
-	WSTOPPED                          = 0x7f
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADF           = syscall.Errno(0x9)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x58)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDOM            = syscall.Errno(0x21)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x59)
-	EILSEQ          = syscall.Errno(0x54)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EIPSEC          = syscall.Errno(0x52)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x5b)
-	ELOOP           = syscall.Errno(0x3e)
-	EMEDIUMTYPE     = syscall.Errno(0x56)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x53)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOMEDIUM       = syscall.Errno(0x55)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x5a)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x5b)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x2d)
-	EOVERFLOW       = syscall.Errno(0x57)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTHR    = syscall.Signal(0x20)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:  "operation not permitted",
-	2:  "no such file or directory",
-	3:  "no such process",
-	4:  "interrupted system call",
-	5:  "input/output error",
-	6:  "device not configured",
-	7:  "argument list too long",
-	8:  "exec format error",
-	9:  "bad file descriptor",
-	10: "no child processes",
-	11: "resource deadlock avoided",
-	12: "cannot allocate memory",
-	13: "permission denied",
-	14: "bad address",
-	15: "block device required",
-	16: "device busy",
-	17: "file exists",
-	18: "cross-device link",
-	19: "operation not supported by device",
-	20: "not a directory",
-	21: "is a directory",
-	22: "invalid argument",
-	23: "too many open files in system",
-	24: "too many open files",
-	25: "inappropriate ioctl for device",
-	26: "text file busy",
-	27: "file too large",
-	28: "no space left on device",
-	29: "illegal seek",
-	30: "read-only file system",
-	31: "too many links",
-	32: "broken pipe",
-	33: "numerical argument out of domain",
-	34: "result too large",
-	35: "resource temporarily unavailable",
-	36: "operation now in progress",
-	37: "operation already in progress",
-	38: "socket operation on non-socket",
-	39: "destination address required",
-	40: "message too long",
-	41: "protocol wrong type for socket",
-	42: "protocol not available",
-	43: "protocol not supported",
-	44: "socket type not supported",
-	45: "operation not supported",
-	46: "protocol family not supported",
-	47: "address family not supported by protocol family",
-	48: "address already in use",
-	49: "can't assign requested address",
-	50: "network is down",
-	51: "network is unreachable",
-	52: "network dropped connection on reset",
-	53: "software caused connection abort",
-	54: "connection reset by peer",
-	55: "no buffer space available",
-	56: "socket is already connected",
-	57: "socket is not connected",
-	58: "can't send after socket shutdown",
-	59: "too many references: can't splice",
-	60: "connection timed out",
-	61: "connection refused",
-	62: "too many levels of symbolic links",
-	63: "file name too long",
-	64: "host is down",
-	65: "no route to host",
-	66: "directory not empty",
-	67: "too many processes",
-	68: "too many users",
-	69: "disc quota exceeded",
-	70: "stale NFS file handle",
-	71: "too many levels of remote in path",
-	72: "RPC struct is bad",
-	73: "RPC version wrong",
-	74: "RPC prog. not avail",
-	75: "program version wrong",
-	76: "bad procedure for program",
-	77: "no locks available",
-	78: "function not implemented",
-	79: "inappropriate file type or format",
-	80: "authentication error",
-	81: "need authenticator",
-	82: "IPsec processing failure",
-	83: "attribute not found",
-	84: "illegal byte sequence",
-	85: "no medium found",
-	86: "wrong medium type",
-	87: "value too large to be stored in data type",
-	88: "operation canceled",
-	89: "identifier removed",
-	90: "no message of desired type",
-	91: "not supported",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "stopped (signal)",
-	18: "stopped",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-	32: "thread AST",
-}


[20/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/newt/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
deleted file mode 100644
index e8d12b5..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ /dev/null
@@ -1,1969 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build ppc64le,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x29
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_VSOCK                         = 0x28
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_MONITOR        = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IP6GRE                    = 0x337
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETLINK                   = 0x338
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x17
-	B110                             = 0x3
-	B115200                          = 0x11
-	B1152000                         = 0x18
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x19
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x1a
-	B230400                          = 0x12
-	B2400                            = 0xb
-	B2500000                         = 0x1b
-	B300                             = 0x7
-	B3000000                         = 0x1c
-	B3500000                         = 0x1d
-	B38400                           = 0xf
-	B4000000                         = 0x1e
-	B460800                          = 0x13
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x14
-	B57600                           = 0x10
-	B576000                          = 0x15
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x16
-	B9600                            = 0xd
-	BOTHER                           = 0x1f
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MOD                          = 0x90
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BPF_XOR                          = 0xa0
-	BRKINT                           = 0x2
-	BS0                              = 0x0
-	BS1                              = 0x8000
-	BSDLY                            = 0x8000
-	CBAUD                            = 0xff
-	CBAUDEX                          = 0x0
-	CFLUSH                           = 0xf
-	CIBAUD                           = 0xff0000
-	CLOCAL                           = 0x8000
-	CLOCK_BOOTTIME                   = 0x7
-	CLOCK_BOOTTIME_ALARM             = 0x9
-	CLOCK_DEFAULT                    = 0x0
-	CLOCK_EXT                        = 0x1
-	CLOCK_INT                        = 0x2
-	CLOCK_MONOTONIC                  = 0x1
-	CLOCK_MONOTONIC_COARSE           = 0x6
-	CLOCK_MONOTONIC_RAW              = 0x4
-	CLOCK_PROCESS_CPUTIME_ID         = 0x2
-	CLOCK_REALTIME                   = 0x0
-	CLOCK_REALTIME_ALARM             = 0x8
-	CLOCK_REALTIME_COARSE            = 0x5
-	CLOCK_THREAD_CPUTIME_ID          = 0x3
-	CLOCK_TXFROMRX                   = 0x4
-	CLOCK_TXINT                      = 0x3
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWCGROUP                  = 0x2000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CMSPAR                           = 0x40000000
-	CR0                              = 0x0
-	CR1                              = 0x1000
-	CR2                              = 0x2000
-	CR3                              = 0x3000
-	CRDLY                            = 0x3000
-	CREAD                            = 0x800
-	CRTSCTS                          = 0x80000000
-	CS5                              = 0x0
-	CS6                              = 0x100
-	CS7                              = 0x200
-	CS8                              = 0x300
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x300
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x400
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x40
-	ECHOE                            = 0x2
-	ECHOK                            = 0x4
-	ECHOKE                           = 0x1
-	ECHONL                           = 0x10
-	ECHOPRT                          = 0x20
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWAKEUP                      = 0x20000000
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_802_3_MIN                  = 0x600
-	ETH_P_802_EX1                    = 0x88b5
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BATMAN                     = 0x4305
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CANFD                      = 0xd
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_MVRP                       = 0x88f5
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PRP                        = 0x88fb
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FF0                              = 0x0
-	FF1                              = 0x4000
-	FFDLY                            = 0x4000
-	FLUSHO                           = 0x800000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0x5
-	F_GETLK64                        = 0xc
-	F_GETOWN                         = 0x9
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x6
-	F_SETLK64                        = 0xd
-	F_SETLKW                         = 0x7
-	F_SETLKW64                       = 0xe
-	F_SETOWN                         = 0x8
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x4000
-	IBSHIFT                          = 0x10
-	ICANON                           = 0x100
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x400
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_NODAD                      = 0x2
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x7
-	IFF_802_1Q_VLAN                  = 0x1
-	IFF_ALLMULTI                     = 0x200
-	IFF_ATTACH_QUEUE                 = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BONDING                      = 0x20
-	IFF_BRIDGE_PORT                  = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DETACH_QUEUE                 = 0x400
-	IFF_DISABLE_NETPOLL              = 0x1000
-	IFF_DONT_BRIDGE                  = 0x800
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_EBRIDGE                      = 0x2
-	IFF_ECHO                         = 0x40000
-	IFF_ISATAP                       = 0x80
-	IFF_LIVE_ADDR_CHANGE             = 0x100000
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MACVLAN                      = 0x200000
-	IFF_MACVLAN_PORT                 = 0x2000
-	IFF_MASTER                       = 0x400
-	IFF_MASTER_8023AD                = 0x8
-	IFF_MASTER_ALB                   = 0x10
-	IFF_MASTER_ARPMON                = 0x100
-	IFF_MULTICAST                    = 0x1000
-	IFF_MULTI_QUEUE                  = 0x100
-	IFF_NOARP                        = 0x80
-	IFF_NOFILTER                     = 0x1000
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_OVS_DATAPATH                 = 0x8000
-	IFF_PERSIST                      = 0x800
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_SLAVE_INACTIVE               = 0x4
-	IFF_SLAVE_NEEDARP                = 0x40
-	IFF_SUPP_NOFCS                   = 0x80000
-	IFF_TAP                          = 0x2
-	IFF_TEAM_PORT                    = 0x40000
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_TX_SKB_SHARING               = 0x10000
-	IFF_UNICAST_FLT                  = 0x20000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFF_WAN_HDLC                     = 0x200
-	IFF_XMIT_DST_RELEASE             = 0x400
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x800
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_BEETPH                   = 0x5e
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MH                       = 0x87
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_UNICAST_IF                    = 0x32
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x80
-	ISTRIP                           = 0x20
-	IUCLC                            = 0x1000
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x400
-	IXON                             = 0x200
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DODUMP                      = 0x11
-	MADV_DOFORK                      = 0xb
-	MADV_DONTDUMP                    = 0x10
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x100
-	MAP_HUGETLB                      = 0x40000
-	MAP_HUGE_MASK                    = 0x3f
-	MAP_HUGE_SHIFT                   = 0x1a
-	MAP_LOCKED                       = 0x80
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x40
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x20000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x2000
-	MCL_FUTURE                       = 0x4000
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_RX_RING                  = 0x6
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_SOCK_DIAG                = 0x4
-	NETLINK_TX_RING                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NL0                              = 0x0
-	NL1                              = 0x100
-	NL2                              = 0x200
-	NL3                              = 0x300
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLDLY                            = 0x300
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80000000
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	OLCUC                            = 0x4
-	ONLCR                            = 0x2
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x400
-	O_ASYNC                          = 0x2000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x40
-	O_DIRECT                         = 0x20000
-	O_DIRECTORY                      = 0x4000
-	O_DSYNC                          = 0x1000
-	O_EXCL                           = 0x80
-	O_FSYNC                          = 0x101000
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x800
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x100
-	O_NOFOLLOW                       = 0x8000
-	O_NONBLOCK                       = 0x800
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x101000
-	O_SYNC                           = 0x101000
-	O_TMPFILE                        = 0x410000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_FLAG_ROLLOVER      = 0x1000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FANOUT_RND                = 0x4
-	PACKET_FANOUT_ROLLOVER           = 0x3
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_HAS_OFF                = 0x13
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x1000
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x2000
-	PENDIN                           = 0x20000000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_SAO                         = 0x10
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_GET_CHILD_SUBREAPER           = 0x25
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_TID_ADDRESS               = 0x28
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_SET_CHILD_SUBREAPER           = 0x24
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_ARG_END                = 0x9
-	PR_SET_MM_ARG_START              = 0x8
-	PR_SET_MM_AUXV                   = 0xc
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_ENV_END                = 0xb
-	PR_SET_MM_ENV_START              = 0xa
-	PR_SET_MM_EXE_FILE               = 0xd
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETEVRREGS                = 0x14
-	PTRACE_GETFPREGS                 = 0xe
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGS64                 = 0x16
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETSIGMASK                = 0x420a
-	PTRACE_GETVRREGS                 = 0x12
-	PTRACE_GETVSRREGS                = 0x1b
-	PTRACE_GET_DEBUGREG              = 0x19
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_O_EXITKILL                = 0x100000
-	PTRACE_O_MASK                    = 0x1000ff
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKSIGINFO               = 0x4209
-	PTRACE_PEEKSIGINFO_SHARED        = 0x1
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SETEVRREGS                = 0x15
-	PTRACE_SETFPREGS                 = 0xf
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGS64                 = 0x17
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETSIGMASK                = 0x420b
-	PTRACE_SETVRREGS                 = 0x13
-	PTRACE_SETVSRREGS                = 0x1c
-	PTRACE_SET_DEBUGREG              = 0x1a
-	PTRACE_SINGLEBLOCK               = 0x100
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TRACEME                   = 0x0
-	PT_CCR                           = 0x26
-	PT_CTR                           = 0x23
-	PT_DAR                           = 0x29
-	PT_DSCR                          = 0x2c
-	PT_DSISR                         = 0x2a
-	PT_FPR0                          = 0x30
-	PT_FPSCR                         = 0x50
-	PT_LNK                           = 0x24
-	PT_MSR                           = 0x21
-	PT_NIP                           = 0x20
-	PT_ORIG_R3                       = 0x22
-	PT_R0                            = 0x0
-	PT_R1                            = 0x1
-	PT_R10                           = 0xa
-	PT_R11                           = 0xb
-	PT_R12                           = 0xc
-	PT_R13                           = 0xd
-	PT_R14                           = 0xe
-	PT_R15                           = 0xf
-	PT_R16                           = 0x10
-	PT_R17                           = 0x11
-	PT_R18                           = 0x12
-	PT_R19                           = 0x13
-	PT_R2                            = 0x2
-	PT_R20                           = 0x14
-	PT_R21                           = 0x15
-	PT_R22                           = 0x16
-	PT_R23                           = 0x17
-	PT_R24                           = 0x18
-	PT_R25                           = 0x19
-	PT_R26                           = 0x1a
-	PT_R27                           = 0x1b
-	PT_R28                           = 0x1c
-	PT_R29                           = 0x1d
-	PT_R3                            = 0x3
-	PT_R30                           = 0x1e
-	PT_R31                           = 0x1f
-	PT_R4                            = 0x4
-	PT_R5                            = 0x5
-	PT_R6                            = 0x6
-	PT_R7                            = 0x7
-	PT_R8                            = 0x8
-	PT_R9                            = 0x9
-	PT_REGS_COUNT                    = 0x2c
-	PT_RESULT                        = 0x2b
-	PT_SOFTE                         = 0x27
-	PT_TRAP                          = 0x28
-	PT_VR0                           = 0x52
-	PT_VRSAVE                        = 0x94
-	PT_VSCR                          = 0x93
-	PT_VSR0                          = 0x96
-	PT_VSR31                         = 0xd4
-	PT_XER                           = 0x25
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x7
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0xf
-	RTAX_MTU                         = 0x2
-	RTAX_QUICKACK                    = 0xf
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x11
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELMDB                       = 0x55
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMDB                       = 0x56
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETNETCONF                   = 0x52
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x57
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWMDB                       = 0x54
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWNETCONF                   = 0x50
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x12
-	RTM_NR_MSGTYPES                  = 0x48
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MROUTED                   = 0x11
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SCM_WIFI_STATUS                  = 0x29
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x800
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0x1
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1e
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BROADCAST                     = 0x6
-	SO_BSDCOMPAT                     = 0xe
-	SO_BUSY_POLL                     = 0x2e
-	SO_DEBUG                         = 0x1
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x27
-	SO_DONTROUTE                     = 0x5
-	SO_ERROR                         = 0x4
-	SO_GET_FILTER                    = 0x1a
-	SO_KEEPALIVE                     = 0x9
-	SO_LINGER                        = 0xd
-	SO_LOCK_FILTER                   = 0x2c
-	SO_MARK                          = 0x24
-	SO_MAX_PACING_RATE               = 0x2f
-	SO_NOFCS                         = 0x2b
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0xa
-	SO_PASSCRED                      = 0x14
-	SO_PASSSEC                       = 0x22
-	SO_PEEK_OFF                      = 0x2a
-	SO_PEERCRED                      = 0x15
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1f
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x26
-	SO_RCVBUF                        = 0x8
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x10
-	SO_RCVTIMEO                      = 0x12
-	SO_REUSEADDR                     = 0x2
-	SO_REUSEPORT                     = 0xf
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SELECT_ERR_QUEUE              = 0x2d
-	SO_SNDBUF                        = 0x7
-	SO_SNDBUFFORCE                   = 0x20
-	SO_SNDLOWAT                      = 0x11
-	SO_SNDTIMEO                      = 0x13
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x3
-	SO_WIFI_STATUS                   = 0x29
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TAB0                             = 0x0
-	TAB1                             = 0x400
-	TAB2                             = 0x800
-	TAB3                             = 0xc00
-	TABDLY                           = 0xc00
-	TCFLSH                           = 0x2000741f
-	TCGETA                           = 0x40147417
-	TCGETS                           = 0x402c7413
-	TCIFLUSH                         = 0x0
-	TCIOFF                           = 0x2
-	TCIOFLUSH                        = 0x2
-	TCION                            = 0x3
-	TCOFLUSH                         = 0x1
-	TCOOFF                           = 0x0
-	TCOON                            = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_COOKIE_IN_ALWAYS             = 0x1
-	TCP_COOKIE_MAX                   = 0x10
-	TCP_COOKIE_MIN                   = 0x8
-	TCP_COOKIE_OUT_NEVER             = 0x2
-	TCP_COOKIE_PAIR_SIZE             = 0x20
-	TCP_COOKIE_TRANSACTIONS          = 0xf
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_FASTOPEN                     = 0x17
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_MSS_DEFAULT                  = 0x218
-	TCP_MSS_DESIRED                  = 0x4c4
-	TCP_NODELAY                      = 0x1
-	TCP_QUEUE_SEQ                    = 0x15
-	TCP_QUICKACK                     = 0xc
-	TCP_REPAIR                       = 0x13
-	TCP_REPAIR_OPTIONS               = 0x16
-	TCP_REPAIR_QUEUE                 = 0x14
-	TCP_SYNCNT                       = 0x7
-	TCP_S_DATA_IN                    = 0x4
-	TCP_S_DATA_OUT                   = 0x8
-	TCP_THIN_DUPACK                  = 0x11
-	TCP_THIN_LINEAR_TIMEOUTS         = 0x10
-	TCP_TIMESTAMP                    = 0x18
-	TCP_USER_TIMEOUT                 = 0x12
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TCSBRK                           = 0x2000741d
-	TCSBRKP                          = 0x5425
-	TCSETA                           = 0x80147418
-	TCSETAF                          = 0x8014741c
-	TCSETAW                          = 0x80147419
-	TCSETS                           = 0x802c7414
-	TCSETSF                          = 0x802c7416
-	TCSETSW                          = 0x802c7415
-	TCXONC                           = 0x2000741e
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x541d
-	TIOCEXCL                         = 0x540c
-	TIOCGDEV                         = 0x40045432
-	TIOCGETC                         = 0x40067412
-	TIOCGETD                         = 0x5424
-	TIOCGETP                         = 0x40067408
-	TIOCGEXCL                        = 0x40045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGLTC                         = 0x40067474
-	TIOCGPGRP                        = 0x40047477
-	TIOCGPKT                         = 0x40045438
-	TIOCGPTLCK                       = 0x40045439
-	TIOCGPTN                         = 0x40045430
-	TIOCGRS485                       = 0x542e
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x5429
-	TIOCGSOFTCAR                     = 0x5419
-	TIOCGWINSZ                       = 0x40087468
-	TIOCINQ                          = 0x4004667f
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x5417
-	TIOCMBIS                         = 0x5416
-	TIOCMGET                         = 0x5415
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x5418
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_LOOP                       = 0x8000
-	TIOCM_OUT1                       = 0x2000
-	TIOCM_OUT2                       = 0x4000
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x5422
-	TIOCNXCL                         = 0x540d
-	TIOCOUTQ                         = 0x40047473
-	TIOCPKT                          = 0x5420
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x540e
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETC                         = 0x80067411
-	TIOCSETD                         = 0x5423
-	TIOCSETN                         = 0x8006740a
-	TIOCSETP                         = 0x80067409
-	TIOCSIG                          = 0x80045436
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSLTC                         = 0x80067475
-	TIOCSPGRP                        = 0x80047476
-	TIOCSPTLCK                       = 0x80045431
-	TIOCSRS485                       = 0x542f
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x541a
-	TIOCSTART                        = 0x2000746e
-	TIOCSTI                          = 0x5412
-	TIOCSTOP                         = 0x2000746f
-	TIOCSWINSZ                       = 0x80087467
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x400000
-	TUNATTACHFILTER                  = 0x801054d5
-	TUNDETACHFILTER                  = 0x801054d6
-	TUNGETFEATURES                   = 0x400454cf
-	TUNGETFILTER                     = 0x401054db
-	TUNGETIFF                        = 0x400454d2
-	TUNGETSNDBUF                     = 0x400454d3
-	TUNGETVNETHDRSZ                  = 0x400454d7
-	TUNSETDEBUG                      = 0x800454c9
-	TUNSETGROUP                      = 0x800454ce
-	TUNSETIFF                        = 0x800454ca
-	TUNSETIFINDEX                    = 0x800454da
-	TUNSETLINK                       = 0x800454cd
-	TUNSETNOCSUM                     = 0x800454c8
-	TUNSETOFFLOAD                    = 0x800454d0
-	TUNSETOWNER                      = 0x800454cc
-	TUNSETPERSIST                    = 0x800454cb
-	TUNSETQUEUE                      = 0x800454d9
-	TUNSETSNDBUF                     = 0x800454d4
-	TUNSETTXFILTER                   = 0x800454d1
-	TUNSETVNETHDRSZ                  = 0x800454d8
-	VDISCARD                         = 0x10
-	VEOF                             = 0x4
-	VEOL                             = 0x6
-	VEOL2                            = 0x8
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x5
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xb
-	VSTART                           = 0xd
-	VSTOP                            = 0xe
-	VSUSP                            = 0xc
-	VSWTC                            = 0x9
-	VT0                              = 0x0
-	VT1                              = 0x10000
-	VTDLY                            = 0x10000
-	VTIME                            = 0x7
-	VWERASE                          = 0xa
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-	XCASE                            = 0x4000
-	XTABS                            = 0xc00
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x62)
-	EADDRNOTAVAIL   = syscall.Errno(0x63)
-	EADV            = syscall.Errno(0x44)
-	EAFNOSUPPORT    = syscall.Errno(0x61)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x72)
-	EBADE           = syscall.Errno(0x34)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x4d)
-	EBADMSG         = syscall.Errno(0x4a)
-	EBADR           = syscall.Errno(0x35)
-	EBADRQC         = syscall.Errno(0x38)
-	EBADSLT         = syscall.Errno(0x39)
-	EBFONT          = syscall.Errno(0x3b)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x7d)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x2c)
-	ECOMM           = syscall.Errno(0x46)
-	ECONNABORTED    = syscall.Errno(0x67)
-	ECONNREFUSED    = syscall.Errno(0x6f)
-	ECONNRESET      = syscall.Errno(0x68)
-	EDEADLK         = syscall.Errno(0x23)
-	EDEADLOCK       = syscall.Errno(0x3a)
-	EDESTADDRREQ    = syscall.Errno(0x59)
-	EDOM            = syscall.Errno(0x21)
-	EDOTDOT         = syscall.Errno(0x49)
-	EDQUOT          = syscall.Errno(0x7a)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x70)
-	EHOSTUNREACH    = syscall.Errno(0x71)
-	EHWPOISON       = syscall.Errno(0x85)
-	EIDRM           = syscall.Errno(0x2b)
-	EILSEQ          = syscall.Errno(0x54)
-	EINPROGRESS     = syscall.Errno(0x73)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x6a)
-	EISDIR          = syscall.Errno(0x15)
-	EISNAM          = syscall.Errno(0x78)
-	EKEYEXPIRED     = syscall.Errno(0x7f)
-	EKEYREJECTED    = syscall.Errno(0x81)
-	EKEYREVOKED     = syscall.Errno(0x80)
-	EL2HLT          = syscall.Errno(0x33)
-	EL2NSYNC        = syscall.Errno(0x2d)
-	EL3HLT          = syscall.Errno(0x2e)
-	EL3RST          = syscall.Errno(0x2f)
-	ELIBACC         = syscall.Errno(0x4f)
-	ELIBBAD         = syscall.Errno(0x50)
-	ELIBEXEC        = syscall.Errno(0x53)
-	ELIBMAX         = syscall.Errno(0x52)
-	ELIBSCN         = syscall.Errno(0x51)
-	ELNRNG          = syscall.Errno(0x30)
-	ELOOP           = syscall.Errno(0x28)
-	EMEDIUMTYPE     = syscall.Errno(0x7c)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x5a)
-	EMULTIHOP       = syscall.Errno(0x48)
-	ENAMETOOLONG    = syscall.Errno(0x24)
-	ENAVAIL         = syscall.Errno(0x77)
-	ENETDOWN        = syscall.Errno(0x64)
-	ENETRESET       = syscall.Errno(0x66)
-	ENETUNREACH     = syscall.Errno(0x65)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x37)
-	ENOBUFS         = syscall.Errno(0x69)
-	ENOCSI          = syscall.Errno(0x32)
-	ENODATA         = syscall.Errno(0x3d)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOKEY          = syscall.Errno(0x7e)
-	ENOLCK          = syscall.Errno(0x25)
-	ENOLINK         = syscall.Errno(0x43)
-	ENOMEDIUM       = syscall.Errno(0x7b)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x2a)
-	ENONET          = syscall.Errno(0x40)
-	ENOPKG          = syscall.Errno(0x41)
-	ENOPROTOOPT     = syscall.Errno(0x5c)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x3f)
-	ENOSTR          = syscall.Errno(0x3c)
-	ENOSYS          = syscall.Errno(0x26)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x6b)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x27)
-	ENOTNAM         = syscall.Errno(0x76)
-	ENOTRECOVERABLE = syscall.Errno(0x83)
-	ENOTSOCK        = syscall.Errno(0x58)
-	ENOTSUP         = syscall.Errno(0x5f)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x4c)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x5f)
-	EOVERFLOW       = syscall.Errno(0x4b)
-	EOWNERDEAD      = syscall.Errno(0x82)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x60)
-	EPIPE           = syscall.Errno(0x20)
-	EPROTO          = syscall.Errno(0x47)
-	EPROTONOSUPPORT = syscall.Errno(0x5d)
-	EPROTOTYPE      = syscall.Errno(0x5b)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x4e)
-	EREMOTE         = syscall.Errno(0x42)
-	EREMOTEIO       = syscall.Errno(0x79)
-	ERESTART        = syscall.Errno(0x55)
-	ERFKILL         = syscall.Errno(0x84)
-	EROFS           = syscall.Errno(0x1e)
-	ESHUTDOWN       = syscall.Errno(0x6c)
-	ESOCKTNOSUPPORT = syscall.Errno(0x5e)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x45)
-	ESTALE          = syscall.Errno(0x74)
-	ESTRPIPE        = syscall.Errno(0x56)
-	ETIME           = syscall.Errno(0x3e)
-	ETIMEDOUT       = syscall.Errno(0x6e)
-	ETOOMANYREFS    = syscall.Errno(0x6d)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUCLEAN         = syscall.Errno(0x75)
-	EUNATCH         = syscall.Errno(0x31)
-	EUSERS          = syscall.Errno(0x57)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x36)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0x7)
-	SIGCHLD   = syscall.Signal(0x11)
-	SIGCLD    = syscall.Signal(0x11)
-	SIGCONT   = syscall.Signal(0x12)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x1d)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPOLL   = syscall.Signal(0x1d)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x1e)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTKFLT = syscall.Signal(0x10)
-	SIGSTOP   = syscall.Signal(0x13)
-	SIGSYS    = syscall.Signal(0x1f)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x14)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGUNUSED = syscall.Signal(0x1f)
-	SIGURG    = syscall.Signal(0x17)
-	SIGUSR1   = syscall.Signal(0xa)
-	SIGUSR2   = syscall.Signal(0xc)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	35:  "resource deadlock avoided",
-	36:  "file name too long",
-	37:  "no locks available",
-	38:  "function not implemented",
-	39:  "directory not empty",
-	40:  "too many levels of symbolic links",
-	42:  "no message of desired type",
-	43:  "identifier removed",
-	44:  "channel number out of range",
-	45:  "level 2 not synchronized",
-	46:  "level 3 halted",
-	47:  "level 3 reset",
-	48:  "link number out of range",
-	49:  "protocol driver not attached",
-	50:  "no CSI structure available",
-	51:  "level 2 halted",
-	52:  "invalid exchange",
-	53:  "invalid request descriptor",
-	54:  "exchange full",
-	55:  "no anode",
-	56:  "invalid request code",
-	57:  "invalid slot",
-	58:  "file locking deadlock error",
-	59:  "bad font file format",
-	60:  "device not a stream",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of streams resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "multihop attempted",
-	73:  "RFS specific error",
-	74:  "bad message",
-	75:  "value too large for defined data type",
-	76:  "name not unique on network",
-	77:  "file descriptor in bad state",
-	78:  "remote address changed",
-	79:  "can not access a needed shared library",
-	80:  "accessing a corrupted shared library",
-	81:  ".lib section in a.out corrupted",
-	82:  "attempting to link in too many shared libraries",
-	83:  "cannot exec a shared library directly",
-	84:  "invalid or incomplete multibyte or wide character",
-	85:  "interrupted system call should be restarted",
-	86:  "streams pipe error",
-	87:  "too many users",
-	88:  "socket operation on non-socket",
-	89:  "destination address required",
-	90:  "message too long",
-	91:  "protocol wrong type for socket",
-	92:  "protocol not available",
-	93:  "protocol not supported",
-	94:  "socket type not supported",
-	95:  "operation not supported",
-	96:  "protocol family not supported",
-	97:  "address family not supported by protocol",
-	98:  "address already in use",
-	99:  "cannot assign requested address",
-	100: "network is down",
-	101: "network is unreachable",
-	102: "network dropped connection on reset",
-	103: "software caused connection abort",
-	104: "connection reset by peer",
-	105: "no buffer space available",
-	106: "transport endpoint is already connected",
-	107: "transport endpoint is not connected",
-	108: "cannot send after transport endpoint shutdown",
-	109: "too many references: cannot splice",
-	110: "connection timed out",
-	111: "connection refused",
-	112: "host is down",
-	113: "no route to host",
-	114: "operation already in progress",
-	115: "operation now in progress",
-	116: "stale file handle",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "disk quota exceeded",
-	123: "no medium found",
-	124: "wrong medium type",
-	125: "operation canceled",
-	126: "required key not available",
-	127: "key has expired",
-	128: "key has been revoked",
-	129: "key was rejected by service",
-	130: "owner died",
-	131: "state not recoverable",
-	132: "operation not possible due to RF-kill",
-	133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "bus error",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "user defined signal 1",
-	11: "segmentation fault",
-	12: "user defined signal 2",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "stack fault",
-	17: "child exited",
-	18: "continued",
-	19: "stopped (signal)",
-	20: "stopped",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "urgent I/O condition",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "I/O possible",
-	30: "power failure",
-	31: "bad system call",
-}


[43/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/.mailmap
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/.mailmap b/newt/vendor/github.com/spf13/cobra/.mailmap
deleted file mode 100644
index 94ec530..0000000
--- a/newt/vendor/github.com/spf13/cobra/.mailmap
+++ /dev/null
@@ -1,3 +0,0 @@
-Steve Francia <st...@gmail.com>
-Bj�rn Erik Pedersen <bj...@gmail.com>
-Fabiano Franz <ff...@redhat.com>                   <co...@fabianofranz.com>

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/.travis.yml
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/.travis.yml b/newt/vendor/github.com/spf13/cobra/.travis.yml
deleted file mode 100644
index bd72adf..0000000
--- a/newt/vendor/github.com/spf13/cobra/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: go
-
-matrix:
-  include:
-    - go: 1.4.3
-      env: NOVET=true # No bundled vet.
-    - go: 1.5.4
-    - go: 1.6.3
-    - go: 1.7
-    - go: tip
-  allow_failures:
-    - go: tip
-
-before_install:
-  - mkdir -p bin
-  - curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.4.3/shellcheck
-  - chmod +x bin/shellcheck
-script:
-  - PATH=$PATH:$PWD/bin go test -v ./...
-  - go build
-  - diff -u <(echo -n) <(gofmt -d -s .)
-  - if [ -z $NOVET ]; then
-      diff -u <(echo -n) <(go tool vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint');
-    fi

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/LICENSE.txt
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/LICENSE.txt b/newt/vendor/github.com/spf13/cobra/LICENSE.txt
deleted file mode 100644
index 298f0e2..0000000
--- a/newt/vendor/github.com/spf13/cobra/LICENSE.txt
+++ /dev/null
@@ -1,174 +0,0 @@
-                                Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/README.md
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/README.md b/newt/vendor/github.com/spf13/cobra/README.md
deleted file mode 100644
index 5d2504b..0000000
--- a/newt/vendor/github.com/spf13/cobra/README.md
+++ /dev/null
@@ -1,898 +0,0 @@
-![cobra logo](https://cloud.githubusercontent.com/assets/173412/10886352/ad566232-814f-11e5-9cd0-aa101788c117.png)
-
-Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files.
-
-Many of the most widely used Go projects are built using Cobra including:
-
-* [Kubernetes](http://kubernetes.io/)
-* [Hugo](http://gohugo.io)
-* [rkt](https://github.com/coreos/rkt)
-* [etcd](https://github.com/coreos/etcd)
-* [Docker (distribution)](https://github.com/docker/distribution)
-* [OpenShift](https://www.openshift.com/)
-* [Delve](https://github.com/derekparker/delve)
-* [GopherJS](http://www.gopherjs.org/)
-* [CockroachDB](http://www.cockroachlabs.com/)
-* [Bleve](http://www.blevesearch.com/)
-* [ProjectAtomic (enterprise)](http://www.projectatomic.io/)
-* [Parse (CLI)](https://parse.com/)
-* [GiantSwarm's swarm](https://github.com/giantswarm/cli)
-* [Nanobox](https://github.com/nanobox-io/nanobox)/[Nanopack](https://github.com/nanopack)
-
-
-[![Build Status](https://travis-ci.org/spf13/cobra.svg "Travis CI status")](https://travis-ci.org/spf13/cobra)
-[![CircleCI status](https://circleci.com/gh/spf13/cobra.png?circle-token=:circle-token "CircleCI status")](https://circleci.com/gh/spf13/cobra)
-[![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/spf13/cobra) 
-
-![cobra](https://cloud.githubusercontent.com/assets/173412/10911369/84832a8e-8212-11e5-9f82-cc96660a4794.gif)
-
-# Overview
-
-Cobra is a library providing a simple interface to create powerful modern CLI
-interfaces similar to git & go tools.
-
-Cobra is also an application that will generate your application scaffolding to rapidly
-develop a Cobra-based application.
-
-Cobra provides:
-* Easy subcommand-based CLIs: `app server`, `app fetch`, etc.
-* Fully POSIX-compliant flags (including short & long versions)
-* Nested subcommands
-* Global, local and cascading flags
-* Easy generation of applications & commands with `cobra create appname` & `cobra add cmdname`
-* Intelligent suggestions (`app srver`... did you mean `app server`?)
-* Automatic help generation for commands and flags
-* Automatic detailed help for `app help [command]`
-* Automatic help flag recognition of `-h`, `--help`, etc.
-* Automatically generated bash autocomplete for your application
-* Automatically generated man pages for your application
-* Command aliases so you can change things without breaking them
-* The flexibilty to define your own help, usage, etc.
-* Optional tight integration with [viper](http://github.com/spf13/viper) for 12-factor apps
-
-Cobra has an exceptionally clean interface and simple design without needless
-constructors or initialization methods.
-
-Applications built with Cobra commands are designed to be as user-friendly as
-possible. Flags can be placed before or after the command (as long as a
-confusing space isn\u2019t provided). Both short and long flags can be used. A
-command need not even be fully typed.  Help is automatically generated and
-available for the application or for a specific command using either the help
-command or the `--help` flag.
-
-# Concepts
-
-Cobra is built on a structure of commands, arguments & flags.
-
-**Commands** represent actions, **Args** are things and **Flags** are modifiers for those actions.
-
-The best applications will read like sentences when used. Users will know how
-to use the application because they will natively understand how to use it.
-
-The pattern to follow is
-`APPNAME VERB NOUN --ADJECTIVE.`
-    or
-`APPNAME COMMAND ARG --FLAG`
-
-A few good real world examples may better illustrate this point.
-
-In the following example, 'server' is a command, and 'port' is a flag:
-
-    > hugo server --port=1313
-
-In this command we are telling Git to clone the url bare.
-
-    > git clone URL --bare
-
-## Commands
-
-Command is the central point of the application. Each interaction that
-the application supports will be contained in a Command. A command can
-have children commands and optionally run an action.
-
-In the example above, 'server' is the command.
-
-A Command has the following structure:
-
-```go
-type Command struct {
-    Use string // The one-line usage message.
-    Short string // The short description shown in the 'help' output.
-    Long string // The long message shown in the 'help <this-command>' output.
-    Run func(cmd *Command, args []string) // Run runs the command.
-}
-```
-
-## Flags
-
-A Flag is a way to modify the behavior of a command. Cobra supports
-fully POSIX-compliant flags as well as the Go [flag package](https://golang.org/pkg/flag/).
-A Cobra command can define flags that persist through to children commands
-and flags that are only available to that command.
-
-In the example above, 'port' is the flag.
-
-Flag functionality is provided by the [pflag
-library](https://github.com/ogier/pflag), a fork of the flag standard library
-which maintains the same interface while adding POSIX compliance.
-
-## Usage
-
-Cobra works by creating a set of commands and then organizing them into a tree.
-The tree defines the structure of the application.
-
-Once each command is defined with its corresponding flags, then the
-tree is assigned to the commander which is finally executed.
-
-# Installing
-Using Cobra is easy. First, use `go get` to install the latest version
-of the library. This command will install the `cobra` generator executible
-along with the library:
-
-    > go get -v github.com/spf13/cobra/cobra
-
-Next, include Cobra in your application:
-
-```go
-import "github.com/spf13/cobra"
-```
-
-# Getting Started
-
-While you are welcome to provide your own organization, typically a Cobra based
-application will follow the following organizational structure.
-
-```
-  \u25be appName/
-    \u25be cmd/
-        add.go
-        your.go
-        commands.go
-        here.go
-      main.go
-```
-
-In a Cobra app, typically the main.go file is very bare. It serves, one purpose, to initialize Cobra.
-
-```go
-package main
-
-import "{pathToYourApp}/cmd"
-
-func main() {
-	if err := cmd.RootCmd.Execute(); err != nil {
-		fmt.Println(err)
-		os.Exit(-1)
-	}
-}
-```
-
-## Using the Cobra Generator
-
-Cobra provides its own program that will create your application and add any
-commands you want. It's the easiest way to incorporate Cobra into your application.
-
-In order to use the cobra command, compile it using the following command:
-
-    > go install github.com/spf13/cobra/cobra
-
-This will create the cobra executable under your go path bin directory!
-
-### cobra init
-
-The `cobra init [yourApp]` command will create your initial application code
-for you. It is a very powerful application that will populate your program with
-the right structure so you can immediately enjoy all the benefits of Cobra. It
-will also automatically apply the license you specify to your application.
-
-Cobra init is pretty smart. You can provide it a full path, or simply a path
-similar to what is expected in the import.
-
-```
-cobra init github.com/spf13/newAppName
-```
-
-### cobra add
-
-Once an application is initialized Cobra can create additional commands for you.
-Let's say you created an app and you wanted the following commands for it:
-
-* app serve
-* app config
-* app config create
-
-In your project directory (where your main.go file is) you would run the following:
-
-```
-cobra add serve
-cobra add config
-cobra add create -p 'configCmd'
-```
-
-Once you have run these three commands you would have an app structure that would look like:
-
-```
-  \u25be app/
-    \u25be cmd/
-        serve.go
-        config.go
-        create.go
-      main.go
-```
-
-at this point you can run `go run main.go` and it would run your app. `go run
-main.go serve`, `go run main.go config`, `go run main.go config create` along
-with `go run main.go help serve`, etc would all work.
-
-Obviously you haven't added your own code to these yet, the commands are ready
-for you to give them their tasks. Have fun.
-
-### Configuring the cobra generator
-
-The cobra generator will be easier to use if you provide a simple configuration
-file which will help you eliminate providing a bunch of repeated information in
-flags over and over.
-
-An example ~/.cobra.yaml file:
-
-```yaml
-author: Steve Francia <sp...@spf13.com>
-license: MIT
-```
-
-You can specify no license by setting `license` to `none` or you can specify
-a custom license:
-
-```yaml
-license:
-  header: This file is part of {{ .appName }}.
-  text: |
-    {{ .copyright }}
-
-    This is my license. There are many like it, but this one is mine.
-    My license is my best friend. It is my life. I must master it as I must
-    master my life.  
-```
-
-## Manually implementing Cobra
-
-To manually implement cobra you need to create a bare main.go file and a RootCmd file.
-You will optionally provide additional commands as you see fit.
-
-### Create the root command
-
-The root command represents your binary itself.
-
-
-#### Manually create rootCmd
-
-Cobra doesn't require any special constructors. Simply create your commands.
-
-Ideally you place this in app/cmd/root.go:
-
-```go
-var RootCmd = &cobra.Command{
-	Use:   "hugo",
-	Short: "Hugo is a very fast static site generator",
-	Long: `A Fast and Flexible Static Site Generator built with
-                love by spf13 and friends in Go.
-                Complete documentation is available at http://hugo.spf13.com`,
-	Run: func(cmd *cobra.Command, args []string) {
-		// Do Stuff Here
-	},
-}
-```
-
-You will additionally define flags and handle configuration in your init() function.
-
-for example cmd/root.go:
-
-```go
-func init() {
-	cobra.OnInitialize(initConfig)
-	RootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)")
-	RootCmd.PersistentFlags().StringVarP(&projectBase, "projectbase", "b", "", "base project directory eg. github.com/spf13/")
-	RootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "Author name for copyright attribution")
-	RootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "Name of license for the project (can provide `licensetext` in config)")
-	RootCmd.PersistentFlags().Bool("viper", true, "Use Viper for configuration")
-	viper.BindPFlag("author", RootCmd.PersistentFlags().Lookup("author"))
-	viper.BindPFlag("projectbase", RootCmd.PersistentFlags().Lookup("projectbase"))
-	viper.BindPFlag("useViper", RootCmd.PersistentFlags().Lookup("viper"))
-	viper.SetDefault("author", "NAME HERE <EMAIL ADDRESS>")
-	viper.SetDefault("license", "apache")
-}
-```
-
-### Create your main.go
-
-With the root command you need to have your main function execute it.
-Execute should be run on the root for clarity, though it can be called on any command.
-
-In a Cobra app, typically the main.go file is very bare. It serves, one purpose, to initialize Cobra.
-
-```go
-package main
-
-import "{pathToYourApp}/cmd"
-
-func main() {
-	if err := cmd.RootCmd.Execute(); err != nil {
-		fmt.Println(err)
-		os.Exit(-1)
-	}
-}
-```
-
-
-### Create additional commands
-
-Additional commands can be defined and typically are each given their own file
-inside of the cmd/ directory.
-
-If you wanted to create a version command you would create cmd/version.go and
-populate it with the following:
-
-```go
-package cmd
-
-import (
-	"github.com/spf13/cobra"
-)
-
-func init() {
-	RootCmd.AddCommand(versionCmd)
-}
-
-var versionCmd = &cobra.Command{
-	Use:   "version",
-	Short: "Print the version number of Hugo",
-	Long:  `All software has versions. This is Hugo's`,
-	Run: func(cmd *cobra.Command, args []string) {
-		fmt.Println("Hugo Static Site Generator v0.9 -- HEAD")
-	},
-}
-```
-
-### Attach command to its parent
-
-
-If you notice in the above example we attach the command to its parent. In
-this case the parent is the rootCmd. In this example we are attaching it to the
-root, but commands can be attached at any level.
-
-```go
-RootCmd.AddCommand(versionCmd)
-```
-
-### Remove a command from its parent
-
-Removing a command is not a common action in simple programs, but it allows 3rd
-parties to customize an existing command tree.
-
-In this example, we remove the existing `VersionCmd` command of an existing
-root command, and we replace it with our own version:
-
-```go
-mainlib.RootCmd.RemoveCommand(mainlib.VersionCmd)
-mainlib.RootCmd.AddCommand(versionCmd)
-```
-
-## Working with Flags
-
-Flags provide modifiers to control how the action command operates.
-
-### Assign flags to a command
-
-Since the flags are defined and used in different locations, we need to
-define a variable outside with the correct scope to assign the flag to
-work with.
-
-```go
-var Verbose bool
-var Source string
-```
-
-There are two different approaches to assign a flag.
-
-### Persistent Flags
-
-A flag can be 'persistent' meaning that this flag will be available to the
-command it's assigned to as well as every command under that command. For
-global flags, assign a flag as a persistent flag on the root.
-
-```go
-RootCmd.PersistentFlags().BoolVarP(&Verbose, "verbose", "v", false, "verbose output")
-```
-
-### Local Flags
-
-A flag can also be assigned locally which will only apply to that specific command.
-
-```go
-RootCmd.Flags().StringVarP(&Source, "source", "s", "", "Source directory to read from")
-```
-
-
-## Example
-
-In the example below, we have defined three commands. Two are at the top level
-and one (cmdTimes) is a child of one of the top commands. In this case the root
-is not executable meaning that a subcommand is required. This is accomplished
-by not providing a 'Run' for the 'rootCmd'.
-
-We have only defined one flag for a single command.
-
-More documentation about flags is available at https://github.com/spf13/pflag
-
-```go
-package main
-
-import (
-	"fmt"
-	"strings"
-
-	"github.com/spf13/cobra"
-)
-
-func main() {
-
-	var echoTimes int
-
-	var cmdPrint = &cobra.Command{
-		Use:   "print [string to print]",
-		Short: "Print anything to the screen",
-		Long: `print is for printing anything back to the screen.
-            For many years people have printed back to the screen.
-            `,
-		Run: func(cmd *cobra.Command, args []string) {
-			fmt.Println("Print: " + strings.Join(args, " "))
-		},
-	}
-
-	var cmdEcho = &cobra.Command{
-		Use:   "echo [string to echo]",
-		Short: "Echo anything to the screen",
-		Long: `echo is for echoing anything back.
-            Echo works a lot like print, except it has a child command.
-            `,
-		Run: func(cmd *cobra.Command, args []string) {
-			fmt.Println("Print: " + strings.Join(args, " "))
-		},
-	}
-
-	var cmdTimes = &cobra.Command{
-		Use:   "times [# times] [string to echo]",
-		Short: "Echo anything to the screen more times",
-		Long: `echo things multiple times back to the user by providing
-            a count and a string.`,
-		Run: func(cmd *cobra.Command, args []string) {
-			for i := 0; i < echoTimes; i++ {
-				fmt.Println("Echo: " + strings.Join(args, " "))
-			}
-		},
-	}
-
-	cmdTimes.Flags().IntVarP(&echoTimes, "times", "t", 1, "times to echo the input")
-
-	var rootCmd = &cobra.Command{Use: "app"}
-	rootCmd.AddCommand(cmdPrint, cmdEcho)
-	cmdEcho.AddCommand(cmdTimes)
-	rootCmd.Execute()
-}
-```
-
-For a more complete example of a larger application, please checkout [Hugo](http://gohugo.io/).
-
-## The Help Command
-
-Cobra automatically adds a help command to your application when you have subcommands.
-This will be called when a user runs 'app help'. Additionally, help will also
-support all other commands as input. Say, for instance, you have a command called
-'create' without any additional configuration; Cobra will work when 'app help
-create' is called.  Every command will automatically have the '--help' flag added.
-
-### Example
-
-The following output is automatically generated by Cobra. Nothing beyond the
-command and flag definitions are needed.
-
-    > hugo help
-
-    hugo is the main command, used to build your Hugo site.
-
-    Hugo is a Fast and Flexible Static Site Generator
-    built with love by spf13 and friends in Go.
-
-    Complete documentation is available at http://gohugo.io/.
-
-    Usage:
-      hugo [flags]
-      hugo [command]
-
-    Available Commands:
-      server          Hugo runs its own webserver to render the files
-      version         Print the version number of Hugo
-      config          Print the site configuration
-      check           Check content in the source directory
-      benchmark       Benchmark hugo by building a site a number of times.
-      convert         Convert your content to different formats
-      new             Create new content for your site
-      list            Listing out various types of content
-      undraft         Undraft changes the content's draft status from 'True' to 'False'
-      genautocomplete Generate shell autocompletion script for Hugo
-      gendoc          Generate Markdown documentation for the Hugo CLI.
-      genman          Generate man page for Hugo
-      import          Import your site from others.
-
-    Flags:
-      -b, --baseURL="": hostname (and path) to the root, e.g. http://spf13.com/
-      -D, --buildDrafts[=false]: include content marked as draft
-      -F, --buildFuture[=false]: include content with publishdate in the future
-          --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
-          --canonifyURLs[=false]: if true, all relative URLs will be canonicalized using baseURL
-          --config="": config file (default is path/config.yaml|json|toml)
-      -d, --destination="": filesystem path to write files to
-          --disableRSS[=false]: Do not build RSS files
-          --disableSitemap[=false]: Do not build Sitemap file
-          --editor="": edit new content with this editor, if provided
-          --ignoreCache[=false]: Ignores the cache directory for reading but still writes to it
-          --log[=false]: Enable Logging
-          --logFile="": Log File path (if set, logging enabled automatically)
-          --noTimes[=false]: Don't sync modification time of files
-          --pluralizeListTitles[=true]: Pluralize titles in lists using inflect
-          --preserveTaxonomyNames[=false]: Preserve taxonomy names as written ("G�rard Depardieu" vs "gerard-depardieu")
-      -s, --source="": filesystem path to read files relative from
-          --stepAnalysis[=false]: display memory and timing of different steps of the program
-      -t, --theme="": theme to use (located in /themes/THEMENAME/)
-          --uglyURLs[=false]: if true, use /filename.html instead of /filename/
-      -v, --verbose[=false]: verbose output
-          --verboseLog[=false]: verbose logging
-      -w, --watch[=false]: watch filesystem for changes and recreate as needed
-
-    Use "hugo [command] --help" for more information about a command.
-
-
-Help is just a command like any other. There is no special logic or behavior
-around it. In fact, you can provide your own if you want.
-
-### Defining your own help
-
-You can provide your own Help command or your own template for the default command to use.
-
-The default help command is
-
-```go
-func (c *Command) initHelp() {
-	if c.helpCommand == nil {
-		c.helpCommand = &Command{
-			Use:   "help [command]",
-			Short: "Help about any command",
-			Long: `Help provides help for any command in the application.
-        Simply type ` + c.Name() + ` help [path to command] for full details.`,
-			Run: c.HelpFunc(),
-		}
-	}
-	c.AddCommand(c.helpCommand)
-}
-```
-
-You can provide your own command, function or template through the following methods:
-
-```go
-command.SetHelpCommand(cmd *Command)
-
-command.SetHelpFunc(f func(*Command, []string))
-
-command.SetHelpTemplate(s string)
-```
-
-The latter two will also apply to any children commands.
-
-## Usage
-
-When the user provides an invalid flag or invalid command, Cobra responds by
-showing the user the 'usage'.
-
-### Example
-You may recognize this from the help above. That's because the default help
-embeds the usage as part of its output.
-
-    Usage:
-      hugo [flags]
-      hugo [command]
-
-    Available Commands:
-      server          Hugo runs its own webserver to render the files
-      version         Print the version number of Hugo
-      config          Print the site configuration
-      check           Check content in the source directory
-      benchmark       Benchmark hugo by building a site a number of times.
-      convert         Convert your content to different formats
-      new             Create new content for your site
-      list            Listing out various types of content
-      undraft         Undraft changes the content's draft status from 'True' to 'False'
-      genautocomplete Generate shell autocompletion script for Hugo
-      gendoc          Generate Markdown documentation for the Hugo CLI.
-      genman          Generate man page for Hugo
-      import          Import your site from others.
-
-    Flags:
-      -b, --baseURL="": hostname (and path) to the root, e.g. http://spf13.com/
-      -D, --buildDrafts[=false]: include content marked as draft
-      -F, --buildFuture[=false]: include content with publishdate in the future
-          --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
-          --canonifyURLs[=false]: if true, all relative URLs will be canonicalized using baseURL
-          --config="": config file (default is path/config.yaml|json|toml)
-      -d, --destination="": filesystem path to write files to
-          --disableRSS[=false]: Do not build RSS files
-          --disableSitemap[=false]: Do not build Sitemap file
-          --editor="": edit new content with this editor, if provided
-          --ignoreCache[=false]: Ignores the cache directory for reading but still writes to it
-          --log[=false]: Enable Logging
-          --logFile="": Log File path (if set, logging enabled automatically)
-          --noTimes[=false]: Don't sync modification time of files
-          --pluralizeListTitles[=true]: Pluralize titles in lists using inflect
-          --preserveTaxonomyNames[=false]: Preserve taxonomy names as written ("G�rard Depardieu" vs "gerard-depardieu")
-      -s, --source="": filesystem path to read files relative from
-          --stepAnalysis[=false]: display memory and timing of different steps of the program
-      -t, --theme="": theme to use (located in /themes/THEMENAME/)
-          --uglyURLs[=false]: if true, use /filename.html instead of /filename/
-      -v, --verbose[=false]: verbose output
-          --verboseLog[=false]: verbose logging
-      -w, --watch[=false]: watch filesystem for changes and recreate as needed
-
-### Defining your own usage
-You can provide your own usage function or template for Cobra to use.
-
-The default usage function is:
-
-```go
-return func(c *Command) error {
-	err := tmpl(c.Out(), c.UsageTemplate(), c)
-	return err
-}
-```
-
-Like help, the function and template are overridable through public methods:
-
-```go
-command.SetUsageFunc(f func(*Command) error)
-
-command.SetUsageTemplate(s string)
-```
-
-## PreRun or PostRun Hooks
-
-It is possible to run functions before or after the main `Run` function of your command. The `PersistentPreRun` and `PreRun` functions will be executed before `Run`. `PersistentPostRun` and `PostRun` will be executed after `Run`.  The `Persistent*Run` functions will be inherited by children if they do not declare their own.  These functions are run in the following order:
-
-- `PersistentPreRun`
-- `PreRun`
-- `Run`
-- `PostRun`
-- `PersistentPostRun`
-
-An example of two commands which use all of these features is below.  When the subcommand is executed, it will run the root command's `PersistentPreRun` but not the root command's `PersistentPostRun`:
-
-```go
-package main
-
-import (
-	"fmt"
-
-	"github.com/spf13/cobra"
-)
-
-func main() {
-
-	var rootCmd = &cobra.Command{
-		Use:   "root [sub]",
-		Short: "My root command",
-		PersistentPreRun: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("Inside rootCmd PersistentPreRun with args: %v\n", args)
-		},
-		PreRun: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("Inside rootCmd PreRun with args: %v\n", args)
-		},
-		Run: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("Inside rootCmd Run with args: %v\n", args)
-		},
-		PostRun: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("Inside rootCmd PostRun with args: %v\n", args)
-		},
-		PersistentPostRun: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("Inside rootCmd PersistentPostRun with args: %v\n", args)
-		},
-	}
-
-	var subCmd = &cobra.Command{
-		Use:   "sub [no options!]",
-		Short: "My subcommand",
-		PreRun: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("Inside subCmd PreRun with args: %v\n", args)
-		},
-		Run: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("Inside subCmd Run with args: %v\n", args)
-		},
-		PostRun: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("Inside subCmd PostRun with args: %v\n", args)
-		},
-		PersistentPostRun: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("Inside subCmd PersistentPostRun with args: %v\n", args)
-		},
-	}
-
-	rootCmd.AddCommand(subCmd)
-
-	rootCmd.SetArgs([]string{""})
-	_ = rootCmd.Execute()
-	fmt.Print("\n")
-	rootCmd.SetArgs([]string{"sub", "arg1", "arg2"})
-	_ = rootCmd.Execute()
-}
-```
-
-
-## Alternative Error Handling
-
-Cobra also has functions where the return signature is an error. This allows for errors to bubble up to the top,
-providing a way to handle the errors in one location. The current list of functions that return an error is:
-
-* PersistentPreRunE
-* PreRunE
-* RunE
-* PostRunE
-* PersistentPostRunE
-
-If you would like to silence the default `error` and `usage` output in favor of your own, you can set `SilenceUsage`
-and `SilenceErrors` to `false` on the command. A child command respects these flags if they are set on the parent
-command.
-
-**Example Usage using RunE:**
-
-```go
-package main
-
-import (
-	"errors"
-	"log"
-
-	"github.com/spf13/cobra"
-)
-
-func main() {
-	var rootCmd = &cobra.Command{
-		Use:   "hugo",
-		Short: "Hugo is a very fast static site generator",
-		Long: `A Fast and Flexible Static Site Generator built with
-                love by spf13 and friends in Go.
-                Complete documentation is available at http://hugo.spf13.com`,
-		RunE: func(cmd *cobra.Command, args []string) error {
-			// Do Stuff Here
-			return errors.New("some random error")
-		},
-	}
-
-	if err := rootCmd.Execute(); err != nil {
-		log.Fatal(err)
-	}
-}
-```
-
-## Suggestions when "unknown command" happens
-
-Cobra will print automatic suggestions when "unknown command" errors happen. This allows Cobra to behave similarly to the `git` command when a typo happens. For example:
-
-```
-$ hugo srever
-Error: unknown command "srever" for "hugo"
-
-Did you mean this?
-        server
-
-Run 'hugo --help' for usage.
-```
-
-Suggestions are automatic based on every subcommand registered and use an implementation of [Levenshtein distance](http://en.wikipedia.org/wiki/Levenshtein_distance). Every registered command that matches a minimum distance of 2 (ignoring case) will be displayed as a suggestion.
-
-If you need to disable suggestions or tweak the string distance in your command, use:
-
-```go
-command.DisableSuggestions = true
-```
-
-or
-
-```go
-command.SuggestionsMinimumDistance = 1
-```
-
-You can also explicitly set names for which a given command will be suggested using the `SuggestFor` attribute. This allows suggestions for strings that are not close in terms of string distance, but makes sense in your set of commands and for some which you don't want aliases. Example:
-
-```
-$ kubectl remove
-Error: unknown command "remove" for "kubectl"
-
-Did you mean this?
-        delete
-
-Run 'kubectl help' for usage.
-```
-
-## Generating Markdown-formatted documentation for your command
-
-Cobra can generate a Markdown-formatted document based on the subcommands, flags, etc. A simple example of how to do this for your command can be found in [Markdown Docs](doc/md_docs.md).
-
-## Generating man pages for your command
-
-Cobra can generate a man page based on the subcommands, flags, etc. A simple example of how to do this for your command can be found in [Man Docs](doc/man_docs.md).
-
-## Generating bash completions for your command
-
-Cobra can generate a bash-completion file. If you add more information to your command, these completions can be amazingly powerful and flexible.  Read more about it in [Bash Completions](bash_completions.md).
-
-## Debugging
-
-Cobra provides a \u2018DebugFlags\u2019 method on a command which, when called, will print
-out everything Cobra knows about the flags for each command.
-
-### Example
-
-```go
-command.DebugFlags()
-```
-
-## Release Notes
-* **0.9.0** June 17, 2014
-  * flags can appears anywhere in the args (provided they are unambiguous)
-  * --help prints usage screen for app or command
-  * Prefix matching for commands
-  * Cleaner looking help and usage output
-  * Extensive test suite
-* **0.8.0** Nov 5, 2013
-  * Reworked interface to remove commander completely
-  * Command now primary structure
-  * No initialization needed
-  * Usage & Help templates & functions definable at any level
-  * Updated Readme
-* **0.7.0** Sept 24, 2013
-  * Needs more eyes
-  * Test suite
-  * Support for automatic error messages
-  * Support for help command
-  * Support for printing to any io.Writer instead of os.Stderr
-  * Support for persistent flags which cascade down tree
-  * Ready for integration into Hugo
-* **0.1.0** Sept 3, 2013
-  * Implement first draft
-
-## Extensions
-
-Libraries for extending Cobra:
-
-* [cmdns](https://github.com/gosuri/cmdns): Enables name spacing a command's immediate children. It provides an alternative way to structure subcommands, similar to `heroku apps:create` and `ovrclk clusters:launch`.
-
-## ToDo
-* Launch proper documentation site
-
-## Contributing
-
-1. Fork it
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Commit your changes (`git commit -am 'Add some feature'`)
-4. Push to the branch (`git push origin my-new-feature`)
-5. Create new Pull Request
-
-## Contributors
-
-Names in no particular order:
-
-* [spf13](https://github.com/spf13),
-[eparis](https://github.com/eparis),
-[bep](https://github.com/bep), and many more!
-
-## License
-
-Cobra is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/spf13/cobra/blob/master/LICENSE.txt)
-
-
-[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/spf13/cobra/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/bash_completions.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/bash_completions.go b/newt/vendor/github.com/spf13/cobra/bash_completions.go
deleted file mode 100644
index 7a5bd4d..0000000
--- a/newt/vendor/github.com/spf13/cobra/bash_completions.go
+++ /dev/null
@@ -1,641 +0,0 @@
-package cobra
-
-import (
-	"fmt"
-	"io"
-	"os"
-	"sort"
-	"strings"
-
-	"github.com/spf13/pflag"
-)
-
-const (
-	BashCompFilenameExt     = "cobra_annotation_bash_completion_filename_extensions"
-	BashCompCustom          = "cobra_annotation_bash_completion_custom"
-	BashCompOneRequiredFlag = "cobra_annotation_bash_completion_one_required_flag"
-	BashCompSubdirsInDir    = "cobra_annotation_bash_completion_subdirs_in_dir"
-)
-
-func preamble(out io.Writer, name string) error {
-	_, err := fmt.Fprintf(out, "# bash completion for %-36s -*- shell-script -*-\n", name)
-	if err != nil {
-		return err
-	}
-	_, err = fmt.Fprint(out, `
-__debug()
-{
-    if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
-        echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
-    fi
-}
-
-# Homebrew on Macs have version 1.3 of bash-completion which doesn't include
-# _init_completion. This is a very minimal version of that function.
-__my_init_completion()
-{
-    COMPREPLY=()
-    _get_comp_words_by_ref "$@" cur prev words cword
-}
-
-__index_of_word()
-{
-    local w word=$1
-    shift
-    index=0
-    for w in "$@"; do
-        [[ $w = "$word" ]] && return
-        index=$((index+1))
-    done
-    index=-1
-}
-
-__contains_word()
-{
-    local w word=$1; shift
-    for w in "$@"; do
-        [[ $w = "$word" ]] && return
-    done
-    return 1
-}
-
-__handle_reply()
-{
-    __debug "${FUNCNAME[0]}"
-    case $cur in
-        -*)
-            if [[ $(type -t compopt) = "builtin" ]]; then
-                compopt -o nospace
-            fi
-            local allflags
-            if [ ${#must_have_one_flag[@]} -ne 0 ]; then
-                allflags=("${must_have_one_flag[@]}")
-            else
-                allflags=("${flags[*]} ${two_word_flags[*]}")
-            fi
-            COMPREPLY=( $(compgen -W "${allflags[*]}" -- "$cur") )
-            if [[ $(type -t compopt) = "builtin" ]]; then
-                [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace
-            fi
-
-            # complete after --flag=abc
-            if [[ $cur == *=* ]]; then
-                if [[ $(type -t compopt) = "builtin" ]]; then
-                    compopt +o nospace
-                fi
-
-                local index flag
-                flag="${cur%%=*}"
-                __index_of_word "${flag}" "${flags_with_completion[@]}"
-                if [[ ${index} -ge 0 ]]; then
-                    COMPREPLY=()
-                    PREFIX=""
-                    cur="${cur#*=}"
-                    ${flags_completion[${index}]}
-                    if [ -n "${ZSH_VERSION}" ]; then
-                        # zfs completion needs --flag= prefix
-                        eval "COMPREPLY=( \"\${COMPREPLY[@]/#/${flag}=}\" )"
-                    fi
-                fi
-            fi
-            return 0;
-            ;;
-    esac
-
-    # check if we are handling a flag with special work handling
-    local index
-    __index_of_word "${prev}" "${flags_with_completion[@]}"
-    if [[ ${index} -ge 0 ]]; then
-        ${flags_completion[${index}]}
-        return
-    fi
-
-    # we are parsing a flag and don't have a special handler, no completion
-    if [[ ${cur} != "${words[cword]}" ]]; then
-        return
-    fi
-
-    local completions
-    completions=("${commands[@]}")
-    if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then
-        completions=("${must_have_one_noun[@]}")
-    fi
-    if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then
-        completions+=("${must_have_one_flag[@]}")
-    fi
-    COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") )
-
-    if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then
-        COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") )
-    fi
-
-    if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
-        declare -F __custom_func >/dev/null && __custom_func
-    fi
-
-    __ltrim_colon_completions "$cur"
-}
-
-# The arguments should be in the form "ext1|ext2|extn"
-__handle_filename_extension_flag()
-{
-    local ext="$1"
-    _filedir "@(${ext})"
-}
-
-__handle_subdirs_in_dir_flag()
-{
-    local dir="$1"
-    pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1
-}
-
-__handle_flag()
-{
-    __debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
-
-    # if a command required a flag, and we found it, unset must_have_one_flag()
-    local flagname=${words[c]}
-    local flagvalue
-    # if the word contained an =
-    if [[ ${words[c]} == *"="* ]]; then
-        flagvalue=${flagname#*=} # take in as flagvalue after the =
-        flagname=${flagname%%=*} # strip everything after the =
-        flagname="${flagname}=" # but put the = back
-    fi
-    __debug "${FUNCNAME[0]}: looking for ${flagname}"
-    if __contains_word "${flagname}" "${must_have_one_flag[@]}"; then
-        must_have_one_flag=()
-    fi
-
-    # if you set a flag which only applies to this command, don't show subcommands
-    if __contains_word "${flagname}" "${local_nonpersistent_flags[@]}"; then
-      commands=()
-    fi
-
-    # keep flag value with flagname as flaghash
-    if [ -n "${flagvalue}" ] ; then
-        flaghash[${flagname}]=${flagvalue}
-    elif [ -n "${words[ $((c+1)) ]}" ] ; then
-        flaghash[${flagname}]=${words[ $((c+1)) ]}
-    else
-        flaghash[${flagname}]="true" # pad "true" for bool flag
-    fi
-
-    # skip the argument to a two word flag
-    if __contains_word "${words[c]}" "${two_word_flags[@]}"; then
-        c=$((c+1))
-        # if we are looking for a flags value, don't show commands
-        if [[ $c -eq $cword ]]; then
-            commands=()
-        fi
-    fi
-
-    c=$((c+1))
-
-}
-
-__handle_noun()
-{
-    __debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
-
-    if __contains_word "${words[c]}" "${must_have_one_noun[@]}"; then
-        must_have_one_noun=()
-    elif __contains_word "${words[c]}" "${noun_aliases[@]}"; then
-        must_have_one_noun=()
-    fi
-
-    nouns+=("${words[c]}")
-    c=$((c+1))
-}
-
-__handle_command()
-{
-    __debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
-
-    local next_command
-    if [[ -n ${last_command} ]]; then
-        next_command="_${last_command}_${words[c]//:/__}"
-    else
-        if [[ $c -eq 0 ]]; then
-            next_command="_$(basename "${words[c]//:/__}")"
-        else
-            next_command="_${words[c]//:/__}"
-        fi
-    fi
-    c=$((c+1))
-    __debug "${FUNCNAME[0]}: looking for ${next_command}"
-    declare -F $next_command >/dev/null && $next_command
-}
-
-__handle_word()
-{
-    if [[ $c -ge $cword ]]; then
-        __handle_reply
-        return
-    fi
-    __debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
-    if [[ "${words[c]}" == -* ]]; then
-        __handle_flag
-    elif __contains_word "${words[c]}" "${commands[@]}"; then
-        __handle_command
-    elif [[ $c -eq 0 ]] && __contains_word "$(basename "${words[c]}")" "${commands[@]}"; then
-        __handle_command
-    else
-        __handle_noun
-    fi
-    __handle_word
-}
-
-`)
-	return err
-}
-
-func postscript(w io.Writer, name string) error {
-	name = strings.Replace(name, ":", "__", -1)
-	_, err := fmt.Fprintf(w, "__start_%s()\n", name)
-	if err != nil {
-		return err
-	}
-	_, err = fmt.Fprintf(w, `{
-    local cur prev words cword
-    declare -A flaghash 2>/dev/null || :
-    if declare -F _init_completion >/dev/null 2>&1; then
-        _init_completion -s || return
-    else
-        __my_init_completion -n "=" || return
-    fi
-
-    local c=0
-    local flags=()
-    local two_word_flags=()
-    local local_nonpersistent_flags=()
-    local flags_with_completion=()
-    local flags_completion=()
-    local commands=("%s")
-    local must_have_one_flag=()
-    local must_have_one_noun=()
-    local last_command
-    local nouns=()
-
-    __handle_word
-}
-
-`, name)
-	if err != nil {
-		return err
-	}
-	_, err = fmt.Fprintf(w, `if [[ $(type -t compopt) = "builtin" ]]; then
-    complete -o default -F __start_%s %s
-else
-    complete -o default -o nospace -F __start_%s %s
-fi
-
-`, name, name, name, name)
-	if err != nil {
-		return err
-	}
-	_, err = fmt.Fprintf(w, "# ex: ts=4 sw=4 et filetype=sh\n")
-	return err
-}
-
-func writeCommands(cmd *Command, w io.Writer) error {
-	if _, err := fmt.Fprintf(w, "    commands=()\n"); err != nil {
-		return err
-	}
-	for _, c := range cmd.Commands() {
-		if !c.IsAvailableCommand() || c == cmd.helpCommand {
-			continue
-		}
-		if _, err := fmt.Fprintf(w, "    commands+=(%q)\n", c.Name()); err != nil {
-			return err
-		}
-	}
-	_, err := fmt.Fprintf(w, "\n")
-	return err
-}
-
-func writeFlagHandler(name string, annotations map[string][]string, w io.Writer) error {
-	for key, value := range annotations {
-		switch key {
-		case BashCompFilenameExt:
-			_, err := fmt.Fprintf(w, "    flags_with_completion+=(%q)\n", name)
-			if err != nil {
-				return err
-			}
-
-			if len(value) > 0 {
-				ext := "__handle_filename_extension_flag " + strings.Join(value, "|")
-				_, err = fmt.Fprintf(w, "    flags_completion+=(%q)\n", ext)
-			} else {
-				ext := "_filedir"
-				_, err = fmt.Fprintf(w, "    flags_completion+=(%q)\n", ext)
-			}
-			if err != nil {
-				return err
-			}
-		case BashCompCustom:
-			_, err := fmt.Fprintf(w, "    flags_with_completion+=(%q)\n", name)
-			if err != nil {
-				return err
-			}
-			if len(value) > 0 {
-				handlers := strings.Join(value, "; ")
-				_, err = fmt.Fprintf(w, "    flags_completion+=(%q)\n", handlers)
-			} else {
-				_, err = fmt.Fprintf(w, "    flags_completion+=(:)\n")
-			}
-			if err != nil {
-				return err
-			}
-		case BashCompSubdirsInDir:
-			_, err := fmt.Fprintf(w, "    flags_with_completion+=(%q)\n", name)
-
-			if len(value) == 1 {
-				ext := "__handle_subdirs_in_dir_flag " + value[0]
-				_, err = fmt.Fprintf(w, "    flags_completion+=(%q)\n", ext)
-			} else {
-				ext := "_filedir -d"
-				_, err = fmt.Fprintf(w, "    flags_completion+=(%q)\n", ext)
-			}
-			if err != nil {
-				return err
-			}
-		}
-	}
-	return nil
-}
-
-func writeShortFlag(flag *pflag.Flag, w io.Writer) error {
-	b := (len(flag.NoOptDefVal) > 0)
-	name := flag.Shorthand
-	format := "    "
-	if !b {
-		format += "two_word_"
-	}
-	format += "flags+=(\"-%s\")\n"
-	if _, err := fmt.Fprintf(w, format, name); err != nil {
-		return err
-	}
-	return writeFlagHandler("-"+name, flag.Annotations, w)
-}
-
-func writeFlag(flag *pflag.Flag, w io.Writer) error {
-	b := (len(flag.NoOptDefVal) > 0)
-	name := flag.Name
-	format := "    flags+=(\"--%s"
-	if !b {
-		format += "="
-	}
-	format += "\")\n"
-	if _, err := fmt.Fprintf(w, format, name); err != nil {
-		return err
-	}
-	return writeFlagHandler("--"+name, flag.Annotations, w)
-}
-
-func writeLocalNonPersistentFlag(flag *pflag.Flag, w io.Writer) error {
-	b := (len(flag.NoOptDefVal) > 0)
-	name := flag.Name
-	format := "    local_nonpersistent_flags+=(\"--%s"
-	if !b {
-		format += "="
-	}
-	format += "\")\n"
-	_, err := fmt.Fprintf(w, format, name)
-	return err
-}
-
-func writeFlags(cmd *Command, w io.Writer) error {
-	_, err := fmt.Fprintf(w, `    flags=()
-    two_word_flags=()
-    local_nonpersistent_flags=()
-    flags_with_completion=()
-    flags_completion=()
-
-`)
-	if err != nil {
-		return err
-	}
-	localNonPersistentFlags := cmd.LocalNonPersistentFlags()
-	var visitErr error
-	cmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) {
-		if nonCompletableFlag(flag) {
-			return
-		}
-		if err := writeFlag(flag, w); err != nil {
-			visitErr = err
-			return
-		}
-		if len(flag.Shorthand) > 0 {
-			if err := writeShortFlag(flag, w); err != nil {
-				visitErr = err
-				return
-			}
-		}
-		if localNonPersistentFlags.Lookup(flag.Name) != nil {
-			if err := writeLocalNonPersistentFlag(flag, w); err != nil {
-				visitErr = err
-				return
-			}
-		}
-	})
-	if visitErr != nil {
-		return visitErr
-	}
-	cmd.InheritedFlags().VisitAll(func(flag *pflag.Flag) {
-		if nonCompletableFlag(flag) {
-			return
-		}
-		if err := writeFlag(flag, w); err != nil {
-			visitErr = err
-			return
-		}
-		if len(flag.Shorthand) > 0 {
-			if err := writeShortFlag(flag, w); err != nil {
-				visitErr = err
-				return
-			}
-		}
-	})
-	if visitErr != nil {
-		return visitErr
-	}
-
-	_, err = fmt.Fprintf(w, "\n")
-	return err
-}
-
-func writeRequiredFlag(cmd *Command, w io.Writer) error {
-	if _, err := fmt.Fprintf(w, "    must_have_one_flag=()\n"); err != nil {
-		return err
-	}
-	flags := cmd.NonInheritedFlags()
-	var visitErr error
-	flags.VisitAll(func(flag *pflag.Flag) {
-		if nonCompletableFlag(flag) {
-			return
-		}
-		for key := range flag.Annotations {
-			switch key {
-			case BashCompOneRequiredFlag:
-				format := "    must_have_one_flag+=(\"--%s"
-				b := (flag.Value.Type() == "bool")
-				if !b {
-					format += "="
-				}
-				format += "\")\n"
-				if _, err := fmt.Fprintf(w, format, flag.Name); err != nil {
-					visitErr = err
-					return
-				}
-
-				if len(flag.Shorthand) > 0 {
-					if _, err := fmt.Fprintf(w, "    must_have_one_flag+=(\"-%s\")\n", flag.Shorthand); err != nil {
-						visitErr = err
-						return
-					}
-				}
-			}
-		}
-	})
-	return visitErr
-}
-
-func writeRequiredNouns(cmd *Command, w io.Writer) error {
-	if _, err := fmt.Fprintf(w, "    must_have_one_noun=()\n"); err != nil {
-		return err
-	}
-	sort.Sort(sort.StringSlice(cmd.ValidArgs))
-	for _, value := range cmd.ValidArgs {
-		if _, err := fmt.Fprintf(w, "    must_have_one_noun+=(%q)\n", value); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-func writeArgAliases(cmd *Command, w io.Writer) error {
-	if _, err := fmt.Fprintf(w, "    noun_aliases=()\n"); err != nil {
-		return err
-	}
-	sort.Sort(sort.StringSlice(cmd.ArgAliases))
-	for _, value := range cmd.ArgAliases {
-		if _, err := fmt.Fprintf(w, "    noun_aliases+=(%q)\n", value); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-func gen(cmd *Command, w io.Writer) error {
-	for _, c := range cmd.Commands() {
-		if !c.IsAvailableCommand() || c == cmd.helpCommand {
-			continue
-		}
-		if err := gen(c, w); err != nil {
-			return err
-		}
-	}
-	commandName := cmd.CommandPath()
-	commandName = strings.Replace(commandName, " ", "_", -1)
-	commandName = strings.Replace(commandName, ":", "__", -1)
-	if _, err := fmt.Fprintf(w, "_%s()\n{\n", commandName); err != nil {
-		return err
-	}
-	if _, err := fmt.Fprintf(w, "    last_command=%q\n", commandName); err != nil {
-		return err
-	}
-	if err := writeCommands(cmd, w); err != nil {
-		return err
-	}
-	if err := writeFlags(cmd, w); err != nil {
-		return err
-	}
-	if err := writeRequiredFlag(cmd, w); err != nil {
-		return err
-	}
-	if err := writeRequiredNouns(cmd, w); err != nil {
-		return err
-	}
-	if err := writeArgAliases(cmd, w); err != nil {
-		return err
-	}
-	if _, err := fmt.Fprintf(w, "}\n\n"); err != nil {
-		return err
-	}
-	return nil
-}
-
-func (cmd *Command) GenBashCompletion(w io.Writer) error {
-	if err := preamble(w, cmd.Name()); err != nil {
-		return err
-	}
-	if len(cmd.BashCompletionFunction) > 0 {
-		if _, err := fmt.Fprintf(w, "%s\n", cmd.BashCompletionFunction); err != nil {
-			return err
-		}
-	}
-	if err := gen(cmd, w); err != nil {
-		return err
-	}
-	return postscript(w, cmd.Name())
-}
-
-func nonCompletableFlag(flag *pflag.Flag) bool {
-	return flag.Hidden || len(flag.Deprecated) > 0
-}
-
-func (cmd *Command) GenBashCompletionFile(filename string) error {
-	outFile, err := os.Create(filename)
-	if err != nil {
-		return err
-	}
-	defer outFile.Close()
-
-	return cmd.GenBashCompletion(outFile)
-}
-
-// MarkFlagRequired adds the BashCompOneRequiredFlag annotation to the named flag, if it exists.
-func (cmd *Command) MarkFlagRequired(name string) error {
-	return MarkFlagRequired(cmd.Flags(), name)
-}
-
-// MarkPersistentFlagRequired adds the BashCompOneRequiredFlag annotation to the named persistent flag, if it exists.
-func (cmd *Command) MarkPersistentFlagRequired(name string) error {
-	return MarkFlagRequired(cmd.PersistentFlags(), name)
-}
-
-// MarkFlagRequired adds the BashCompOneRequiredFlag annotation to the named flag in the flag set, if it exists.
-func MarkFlagRequired(flags *pflag.FlagSet, name string) error {
-	return flags.SetAnnotation(name, BashCompOneRequiredFlag, []string{"true"})
-}
-
-// MarkFlagFilename adds the BashCompFilenameExt annotation to the named flag, if it exists.
-// Generated bash autocompletion will select filenames for the flag, limiting to named extensions if provided.
-func (cmd *Command) MarkFlagFilename(name string, extensions ...string) error {
-	return MarkFlagFilename(cmd.Flags(), name, extensions...)
-}
-
-// MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists.
-// Generated bash autocompletion will call the bash function f for the flag.
-func (cmd *Command) MarkFlagCustom(name string, f string) error {
-	return MarkFlagCustom(cmd.Flags(), name, f)
-}
-
-// MarkPersistentFlagFilename adds the BashCompFilenameExt annotation to the named persistent flag, if it exists.
-// Generated bash autocompletion will select filenames for the flag, limiting to named extensions if provided.
-func (cmd *Command) MarkPersistentFlagFilename(name string, extensions ...string) error {
-	return MarkFlagFilename(cmd.PersistentFlags(), name, extensions...)
-}
-
-// MarkFlagFilename adds the BashCompFilenameExt annotation to the named flag in the flag set, if it exists.
-// Generated bash autocompletion will select filenames for the flag, limiting to named extensions if provided.
-func MarkFlagFilename(flags *pflag.FlagSet, name string, extensions ...string) error {
-	return flags.SetAnnotation(name, BashCompFilenameExt, extensions)
-}
-
-// MarkFlagCustom adds the BashCompCustom annotation to the named flag in the flag set, if it exists.
-// Generated bash autocompletion will call the bash function f for the flag.
-func MarkFlagCustom(flags *pflag.FlagSet, name string, f string) error {
-	return flags.SetAnnotation(name, BashCompCustom, []string{f})
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/bash_completions.md
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/bash_completions.md b/newt/vendor/github.com/spf13/cobra/bash_completions.md
deleted file mode 100644
index 6e3b71f..0000000
--- a/newt/vendor/github.com/spf13/cobra/bash_completions.md
+++ /dev/null
@@ -1,206 +0,0 @@
-# Generating Bash Completions For Your Own cobra.Command
-
-Generating bash completions from a cobra command is incredibly easy. An actual program which does so for the kubernetes kubectl binary is as follows:
-
-```go
-package main
-
-import (
-        "io/ioutil"
-        "os"
-
-        "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd"
-)
-
-func main() {
-        kubectl := cmd.NewFactory(nil).NewKubectlCommand(os.Stdin, ioutil.Discard, ioutil.Discard)
-        kubectl.GenBashCompletionFile("out.sh")
-}
-```
-
-That will get you completions of subcommands and flags. If you make additional annotations to your code, you can get even more intelligent and flexible behavior.
-
-## Creating your own custom functions
-
-Some more actual code that works in kubernetes:
-
-```bash
-const (
-        bash_completion_func = `__kubectl_parse_get()
-{
-    local kubectl_output out
-    if kubectl_output=$(kubectl get --no-headers "$1" 2>/dev/null); then
-        out=($(echo "${kubectl_output}" | awk '{print $1}'))
-        COMPREPLY=( $( compgen -W "${out[*]}" -- "$cur" ) )
-    fi
-}
-
-__kubectl_get_resource()
-{
-    if [[ ${#nouns[@]} -eq 0 ]]; then
-        return 1
-    fi
-    __kubectl_parse_get ${nouns[${#nouns[@]} -1]}
-    if [[ $? -eq 0 ]]; then
-        return 0
-    fi
-}
-
-__custom_func() {
-    case ${last_command} in
-        kubectl_get | kubectl_describe | kubectl_delete | kubectl_stop)
-            __kubectl_get_resource
-            return
-            ;;
-        *)
-            ;;
-    esac
-}
-`)
-```
-
-And then I set that in my command definition:
-
-```go
-cmds := &cobra.Command{
-	Use:   "kubectl",
-	Short: "kubectl controls the Kubernetes cluster manager",
-	Long: `kubectl controls the Kubernetes cluster manager.
-
-Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`,
-	Run: runHelp,
-	BashCompletionFunction: bash_completion_func,
-}
-```
-
-The `BashCompletionFunction` option is really only valid/useful on the root command. Doing the above will cause `__custom_func()` to be called when the built in processor was unable to find a solution. In the case of kubernetes a valid command might look something like `kubectl get pod [mypod]`. If you type `kubectl get pod [tab][tab]` the `__customc_func()` will run because the cobra.Command only understood "kubectl" and "get." `__custom_func()` will see that the cobra.Command is "kubectl_get" and will thus call another helper `__kubectl_get_resource()`.  `__kubectl_get_resource` will look at the 'nouns' collected. In our example the only noun will be `pod`.  So it will call `__kubectl_parse_get pod`.  `__kubectl_parse_get` will actually call out to kubernetes and get any pods.  It will then set `COMPREPLY` to valid pods!
-
-## Have the completions code complete your 'nouns'
-
-In the above example "pod" was assumed to already be typed. But if you want `kubectl get [tab][tab]` to show a list of valid "nouns" you have to set them. Simplified code from `kubectl get` looks like:
-
-```go
-validArgs []string = { "pod", "node", "service", "replicationcontroller" }
-
-cmd := &cobra.Command{
-	Use:     "get [(-o|--output=)json|yaml|template|...] (RESOURCE [NAME] | RESOURCE/NAME ...)",
-	Short:   "Display one or many resources",
-	Long:    get_long,
-	Example: get_example,
-	Run: func(cmd *cobra.Command, args []string) {
-		err := RunGet(f, out, cmd, args)
-		util.CheckErr(err)
-	},
-	ValidArgs: validArgs,
-}
-```
-
-Notice we put the "ValidArgs" on the "get" subcommand. Doing so will give results like
-
-```bash
-# kubectl get [tab][tab]
-node                 pod                    replicationcontroller  service
-```
-
-## Plural form and shortcuts for nouns
-
-If your nouns have a number of aliases, you can define them alongside `ValidArgs` using `ArgAliases`:
-
-```go`
-argAliases []string = { "pods", "nodes", "services", "svc", "replicationcontrollers", "rc" }
-
-cmd := &cobra.Command{
-    ...
-	ValidArgs:  validArgs,
-	ArgAliases: argAliases
-}
-```
-
-The aliases are not shown to the user on tab completion, but they are accepted as valid nouns by
-the completion algorithm if entered manually, e.g. in:
-
-```bash
-# kubectl get rc [tab][tab]
-backend        frontend       database 
-```
-
-Note that without declaring `rc` as an alias, the completion algorithm would show the list of nouns
-in this example again instead of the replication controllers.
-
-## Mark flags as required
-
-Most of the time completions will only show subcommands. But if a flag is required to make a subcommand work, you probably want it to show up when the user types [tab][tab].  Marking a flag as 'Required' is incredibly easy.
-
-```go
-cmd.MarkFlagRequired("pod")
-cmd.MarkFlagRequired("container")
-```
-
-and you'll get something like
-
-```bash
-# kubectl exec [tab][tab][tab]
--c            --container=  -p            --pod=  
-```
-
-# Specify valid filename extensions for flags that take a filename
-
-In this example we use --filename= and expect to get a json or yaml file as the argument. To make this easier we annotate the --filename flag with valid filename extensions.
-
-```go
-	annotations := []string{"json", "yaml", "yml"}
-	annotation := make(map[string][]string)
-	annotation[cobra.BashCompFilenameExt] = annotations
-
-	flag := &pflag.Flag{
-		Name:        "filename",
-		Shorthand:   "f",
-		Usage:       usage,
-		Value:       value,
-		DefValue:    value.String(),
-		Annotations: annotation,
-	}
-	cmd.Flags().AddFlag(flag)
-```
-
-Now when you run a command with this filename flag you'll get something like
-
-```bash
-# kubectl create -f 
-test/                         example/                      rpmbuild/
-hello.yml                     test.json
-```
-
-So while there are many other files in the CWD it only shows me subdirs and those with valid extensions.
-
-# Specifiy custom flag completion
-
-Similar to the filename completion and filtering using cobra.BashCompFilenameExt, you can specifiy
-a custom flag completion function with cobra.BashCompCustom:
-
-```go
-	annotation := make(map[string][]string)
-	annotation[cobra.BashCompFilenameExt] = []string{"__kubectl_get_namespaces"}
-
-	flag := &pflag.Flag{
-		Name:        "namespace",
-		Usage:       usage,
-		Annotations: annotation,
-	}
-	cmd.Flags().AddFlag(flag)
-```
-
-In addition add the `__handle_namespace_flag` implementation in the `BashCompletionFunction`
-value, e.g.:
-
-```bash
-__kubectl_get_namespaces()
-{
-    local template
-    template="{{ range .items  }}{{ .metadata.name }} {{ end }}"
-    local kubectl_out
-    if kubectl_out=$(kubectl get -o template --template="${template}" namespace 2>/dev/null); then
-        COMPREPLY=( $( compgen -W "${kubectl_out}[*]" -- "$cur" ) )
-    fi
-}
-```

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/github.com/spf13/cobra/cobra.go
----------------------------------------------------------------------
diff --git a/newt/vendor/github.com/spf13/cobra/cobra.go b/newt/vendor/github.com/spf13/cobra/cobra.go
deleted file mode 100644
index b39c715..0000000
--- a/newt/vendor/github.com/spf13/cobra/cobra.go
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright � 2013 Steve Francia <sp...@spf13.com>.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// Commands similar to git, go tools and other modern CLI tools
-// inspired by go, go-Commander, gh and subcommand
-
-package cobra
-
-import (
-	"fmt"
-	"io"
-	"reflect"
-	"strconv"
-	"strings"
-	"text/template"
-	"unicode"
-)
-
-var templateFuncs = template.FuncMap{
-	"trim":               strings.TrimSpace,
-	"trimRightSpace":     trimRightSpace,
-	"appendIfNotPresent": appendIfNotPresent,
-	"rpad":               rpad,
-	"gt":                 Gt,
-	"eq":                 Eq,
-}
-
-var initializers []func()
-
-// Automatic prefix matching can be a dangerous thing to automatically enable in CLI tools.
-// Set this to true to enable it.
-var EnablePrefixMatching = false
-
-// EnableCommandSorting controls sorting of the slice of commands, which is turned on by default.
-// To disable sorting, set it to false.
-var EnableCommandSorting = true
-
-// AddTemplateFunc adds a template function that's available to Usage and Help
-// template generation.
-func AddTemplateFunc(name string, tmplFunc interface{}) {
-	templateFuncs[name] = tmplFunc
-}
-
-// AddTemplateFuncs adds multiple template functions availalble to Usage and
-// Help template generation.
-func AddTemplateFuncs(tmplFuncs template.FuncMap) {
-	for k, v := range tmplFuncs {
-		templateFuncs[k] = v
-	}
-}
-
-// OnInitialize takes a series of func() arguments and appends them to a slice of func().
-func OnInitialize(y ...func()) {
-	initializers = append(initializers, y...)
-}
-
-// Gt takes two types and checks whether the first type is greater than the second. In case of types Arrays, Chans,
-// Maps and Slices, Gt will compare their lengths. Ints are compared directly while strings are first parsed as
-// ints and then compared.
-func Gt(a interface{}, b interface{}) bool {
-	var left, right int64
-	av := reflect.ValueOf(a)
-
-	switch av.Kind() {
-	case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
-		left = int64(av.Len())
-	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
-		left = av.Int()
-	case reflect.String:
-		left, _ = strconv.ParseInt(av.String(), 10, 64)
-	}
-
-	bv := reflect.ValueOf(b)
-
-	switch bv.Kind() {
-	case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
-		right = int64(bv.Len())
-	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
-		right = bv.Int()
-	case reflect.String:
-		right, _ = strconv.ParseInt(bv.String(), 10, 64)
-	}
-
-	return left > right
-}
-
-// Eq takes two types and checks whether they are equal. Supported types are int and string. Unsupported types will panic.
-func Eq(a interface{}, b interface{}) bool {
-	av := reflect.ValueOf(a)
-	bv := reflect.ValueOf(b)
-
-	switch av.Kind() {
-	case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
-		panic("Eq called on unsupported type")
-	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
-		return av.Int() == bv.Int()
-	case reflect.String:
-		return av.String() == bv.String()
-	}
-	return false
-}
-
-func trimRightSpace(s string) string {
-	return strings.TrimRightFunc(s, unicode.IsSpace)
-}
-
-// appendIfNotPresent will append stringToAppend to the end of s, but only if it's not yet present in s.
-func appendIfNotPresent(s, stringToAppend string) string {
-	if strings.Contains(s, stringToAppend) {
-		return s
-	}
-	return s + " " + stringToAppend
-}
-
-// rpad adds padding to the right of a string.
-func rpad(s string, padding int) string {
-	template := fmt.Sprintf("%%-%ds", padding)
-	return fmt.Sprintf(template, s)
-}
-
-// tmpl executes the given template text on data, writing the result to w.
-func tmpl(w io.Writer, text string, data interface{}) error {
-	t := template.New("top")
-	t.Funcs(templateFuncs)
-	template.Must(t.Parse(text))
-	return t.Execute(w, data)
-}
-
-// ld compares two strings and returns the levenshtein distance between them.
-func ld(s, t string, ignoreCase bool) int {
-	if ignoreCase {
-		s = strings.ToLower(s)
-		t = strings.ToLower(t)
-	}
-	d := make([][]int, len(s)+1)
-	for i := range d {
-		d[i] = make([]int, len(t)+1)
-	}
-	for i := range d {
-		d[i][0] = i
-	}
-	for j := range d[0] {
-		d[0][j] = j
-	}
-	for j := 1; j <= len(t); j++ {
-		for i := 1; i <= len(s); i++ {
-			if s[i-1] == t[j-1] {
-				d[i][j] = d[i-1][j-1]
-			} else {
-				min := d[i-1][j]
-				if d[i][j-1] < min {
-					min = d[i][j-1]
-				}
-				if d[i-1][j-1] < min {
-					min = d[i-1][j-1]
-				}
-				d[i][j] = min + 1
-			}
-		}
-
-	}
-	return d[len(s)][len(t)]
-}


[47/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/pkg/localpackage.go
----------------------------------------------------------------------
diff --git a/newt/pkg/localpackage.go b/newt/pkg/localpackage.go
deleted file mode 100644
index 3ce55e6..0000000
--- a/newt/pkg/localpackage.go
+++ /dev/null
@@ -1,463 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package pkg
-
-import (
-	"bytes"
-	"crypto/sha1"
-	"fmt"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"sort"
-	"strconv"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/repo"
-	"mynewt.apache.org/newt/util"
-	"mynewt.apache.org/newt/viper"
-	"mynewt.apache.org/newt/yaml"
-)
-
-var PackageHashIgnoreDirs = map[string]bool{
-	"obj": true,
-	"bin": true,
-	".":   true,
-}
-
-var LocalPackageSpecialNames = map[string]bool{
-	"src":     true,
-	"include": true,
-	"bin":     true,
-}
-
-type LocalPackage struct {
-	repo        *repo.Repo
-	name        string
-	basePath    string
-	packageType interfaces.PackageType
-
-	// General information about the package
-	desc *PackageDesc
-
-	// Package init function name and stage.  These are used to generate the
-	// sysinit C file.
-	init map[string]int
-
-	// Extra package-specific settings that don't come from syscfg.  For
-	// example, SELFTEST gets set when the newt test command is used.
-	injectedSettings map[string]string
-
-	// Settings read from pkg.yml.
-	PkgV *viper.Viper
-
-	// Settings read from syscfg.yml.
-	SyscfgV *viper.Viper
-
-	// Names of all source yml files; used to determine if rebuild required.
-	cfgFilenames []string
-}
-
-func NewLocalPackage(r *repo.Repo, pkgDir string) *LocalPackage {
-	pkg := &LocalPackage{
-		desc:             &PackageDesc{},
-		PkgV:             viper.New(),
-		SyscfgV:          viper.New(),
-		repo:             r,
-		basePath:         filepath.ToSlash(filepath.Clean(pkgDir)),
-		init:             map[string]int{},
-		injectedSettings: map[string]string{},
-	}
-	return pkg
-}
-
-func (pkg *LocalPackage) Name() string {
-	return pkg.name
-}
-
-func (pkg *LocalPackage) FullName() string {
-	r := pkg.Repo()
-	if r.IsLocal() {
-		return pkg.Name()
-	} else {
-		return newtutil.BuildPackageString(r.Name(), pkg.Name())
-	}
-}
-
-func (pkg *LocalPackage) BasePath() string {
-	return pkg.basePath
-}
-
-func (pkg *LocalPackage) RelativePath() string {
-	proj := interfaces.GetProject()
-	return strings.TrimPrefix(pkg.BasePath(), proj.Path())
-}
-
-func (pkg *LocalPackage) Type() interfaces.PackageType {
-	return pkg.packageType
-}
-
-func (pkg *LocalPackage) Repo() interfaces.RepoInterface {
-	return pkg.repo
-}
-
-func (pkg *LocalPackage) Desc() *PackageDesc {
-	return pkg.desc
-}
-
-func (pkg *LocalPackage) SetName(name string) {
-	pkg.name = name
-	// XXX: Also set "pkg.name" in viper object (possibly just remove cached
-	// variable from code entirely).
-}
-
-func (pkg *LocalPackage) SetBasePath(basePath string) {
-	pkg.basePath = filepath.ToSlash(filepath.Clean(basePath))
-}
-
-func (pkg *LocalPackage) SetType(packageType interfaces.PackageType) {
-	pkg.packageType = packageType
-	// XXX: Also set "pkg.type" in viper object (possibly just remove cached
-	// variable from code entirely).
-}
-
-func (pkg *LocalPackage) SetDesc(desc *PackageDesc) {
-	pkg.desc = desc
-	// XXX: Also set desc fields in viper object (possibly just remove cached
-	// variable from code entirely).
-}
-
-func (pkg *LocalPackage) SetRepo(r *repo.Repo) {
-	pkg.repo = r
-}
-
-func (pkg *LocalPackage) Hash() (string, error) {
-	hash := sha1.New()
-
-	err := filepath.Walk(pkg.basePath,
-		func(path string, info os.FileInfo, err error) error {
-			name := info.Name()
-			if PackageHashIgnoreDirs[name] {
-				return filepath.SkipDir
-			}
-
-			if info.IsDir() {
-				// SHA the directory name into the hash
-				hash.Write([]byte(name))
-			} else {
-				// SHA the file name & contents into the hash
-				contents, err := ioutil.ReadFile(path)
-				if err != nil {
-					return err
-				}
-				hash.Write(contents)
-			}
-			return nil
-		})
-	if err != nil && err != filepath.SkipDir {
-		return "", util.NewNewtError(err.Error())
-	}
-
-	hashStr := fmt.Sprintf("%x", hash.Sum(nil))
-
-	return hashStr, nil
-}
-
-func (pkg *LocalPackage) CfgFilenames() []string {
-	return pkg.cfgFilenames
-}
-
-func (pkg *LocalPackage) AddCfgFilename(cfgFilename string) {
-	pkg.cfgFilenames = append(pkg.cfgFilenames, cfgFilename)
-}
-
-func (pkg *LocalPackage) readDesc(v *viper.Viper) (*PackageDesc, error) {
-	pdesc := &PackageDesc{}
-
-	pdesc.Author = v.GetString("pkg.author")
-	pdesc.Homepage = v.GetString("pkg.homepage")
-	pdesc.Description = v.GetString("pkg.description")
-	pdesc.Keywords = v.GetStringSlice("pkg.keywords")
-
-	return pdesc, nil
-}
-
-func (pkg *LocalPackage) sequenceString(key string) string {
-	var buffer bytes.Buffer
-
-	if pkg.PkgV != nil {
-		for _, f := range pkg.PkgV.GetStringSlice(key) {
-			buffer.WriteString("    - " + yaml.EscapeString(f) + "\n")
-		}
-	}
-
-	if buffer.Len() == 0 {
-		return ""
-	} else {
-		return key + ":\n" + buffer.String()
-	}
-}
-
-func (lpkg *LocalPackage) SaveSyscfgVals() error {
-	dirpath := lpkg.BasePath()
-	if err := os.MkdirAll(dirpath, 0755); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	filepath := dirpath + "/" + SYSCFG_YAML_FILENAME
-
-	syscfgVals := lpkg.SyscfgV.GetStringMapString("syscfg.vals")
-	if syscfgVals == nil || len(syscfgVals) == 0 {
-		os.Remove(filepath)
-		return nil
-	}
-
-	file, err := os.Create(filepath)
-	if err != nil {
-		return util.NewNewtError(err.Error())
-	}
-	defer file.Close()
-
-	names := make([]string, 0, len(syscfgVals))
-	for k, _ := range syscfgVals {
-		names = append(names, k)
-	}
-	sort.Strings(names)
-
-	fmt.Fprintf(file, "### Package: %s\n", lpkg.Name())
-	fmt.Fprintf(file, "\n")
-	fmt.Fprintf(file, "syscfg.vals:\n")
-	for _, name := range names {
-		fmt.Fprintf(file, "    %s: %s\n", name, syscfgVals[name])
-	}
-
-	return nil
-}
-
-// Saves the package's pkg.yml file.
-// NOTE: This does not save every field in the package.  Only the fields
-// necessary for creating a new target get saved.
-func (pkg *LocalPackage) Save() error {
-	dirpath := pkg.BasePath()
-	if err := os.MkdirAll(dirpath, 0755); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	filepath := dirpath + "/" + PACKAGE_FILE_NAME
-	file, err := os.Create(filepath)
-	if err != nil {
-		return util.NewNewtError(err.Error())
-	}
-	defer file.Close()
-
-	file.WriteString("### Package: " + pkg.Name() + "\n")
-
-	// XXX: Just iterate viper object's settings rather than calling out
-	// cached settings individually.
-	file.WriteString("pkg.name: " + yaml.EscapeString(pkg.Name()) + "\n")
-	file.WriteString("pkg.type: " +
-		yaml.EscapeString(PackageTypeNames[pkg.Type()]) + "\n")
-	file.WriteString("pkg.description: " +
-		yaml.EscapeString(pkg.Desc().Description) + "\n")
-	file.WriteString("pkg.author: " +
-		yaml.EscapeString(pkg.Desc().Author) + "\n")
-	file.WriteString("pkg.homepage: " +
-		yaml.EscapeString(pkg.Desc().Homepage) + "\n")
-
-	file.WriteString("\n")
-
-	file.WriteString(pkg.sequenceString("pkg.aflags"))
-	file.WriteString(pkg.sequenceString("pkg.cflags"))
-	file.WriteString(pkg.sequenceString("pkg.lflags"))
-
-	return nil
-}
-
-// Load reads everything that isn't identity specific into the
-// package
-func (pkg *LocalPackage) Load() error {
-	// Load configuration
-	log.Debugf("Loading configuration for package %s", pkg.basePath)
-
-	var err error
-
-	pkg.PkgV, err = util.ReadConfig(pkg.basePath,
-		strings.TrimSuffix(PACKAGE_FILE_NAME, ".yml"))
-	if err != nil {
-		return err
-	}
-	pkg.AddCfgFilename(pkg.basePath + "/" + PACKAGE_FILE_NAME)
-
-	// Set package name from the package
-	pkg.name = pkg.PkgV.GetString("pkg.name")
-
-	typeString := pkg.PkgV.GetString("pkg.type")
-	pkg.packageType = PACKAGE_TYPE_LIB
-	for t, n := range PackageTypeNames {
-		if typeString == n {
-			pkg.packageType = t
-			break
-		}
-	}
-
-	init := pkg.PkgV.GetStringMapString("pkg.init")
-	for name, stageStr := range init {
-		stage, err := strconv.ParseInt(stageStr, 10, 64)
-		if err != nil {
-			return util.NewNewtError(fmt.Sprintf("Parsing pkg %s config: %s",
-				pkg.FullName(), err.Error()))
-		}
-		pkg.init[name] = int(stage)
-	}
-	initFnName := pkg.PkgV.GetString("pkg.init_function")
-	initStage := pkg.PkgV.GetInt("pkg.init_stage")
-
-	if initFnName != "" {
-		pkg.init[initFnName] = initStage
-	}
-
-	// Read the package description from the file
-	pkg.desc, err = pkg.readDesc(pkg.PkgV)
-	if err != nil {
-		return err
-	}
-
-	// Load syscfg settings.
-	if util.NodeExist(pkg.basePath + "/" + SYSCFG_YAML_FILENAME) {
-		pkg.SyscfgV, err = util.ReadConfig(pkg.basePath,
-			strings.TrimSuffix(SYSCFG_YAML_FILENAME, ".yml"))
-		if err != nil {
-			return err
-		}
-		pkg.AddCfgFilename(pkg.basePath + "/" + SYSCFG_YAML_FILENAME)
-	}
-
-	return nil
-}
-
-func (pkg *LocalPackage) Init() map[string]int {
-	return pkg.init
-}
-
-func (pkg *LocalPackage) InjectedSettings() map[string]string {
-	return pkg.injectedSettings
-}
-
-func (pkg *LocalPackage) Clone(newRepo *repo.Repo,
-	newName string) *LocalPackage {
-
-	// XXX: Validate name.
-
-	// Copy the package.
-	newPkg := *pkg
-	newPkg.repo = newRepo
-	newPkg.name = newName
-	newPkg.basePath = newRepo.Path() + "/" + newPkg.name
-
-	// Insert the clone into the global package map.
-	proj := interfaces.GetProject()
-	pMap := proj.PackageList()
-
-	(*pMap[newRepo.Name()])[newPkg.name] = &newPkg
-
-	return &newPkg
-}
-
-func LoadLocalPackage(repo *repo.Repo, pkgDir string) (*LocalPackage, error) {
-	pkg := NewLocalPackage(repo, pkgDir)
-	err := pkg.Load()
-	return pkg, err
-}
-
-func LocalPackageSpecialName(dirName string) bool {
-	_, ok := LocalPackageSpecialNames[dirName]
-	return ok
-}
-
-func ReadLocalPackageRecursive(repo *repo.Repo,
-	pkgList map[string]interfaces.PackageInterface, basePath string,
-	pkgName string, searchedMap map[string]struct{}) ([]string, error) {
-
-	var warnings []string
-
-	dirList, err := repo.FilteredSearchList(pkgName, searchedMap)
-	if err != nil {
-		return warnings, util.NewNewtError(err.Error())
-	}
-
-	for _, name := range dirList {
-		if LocalPackageSpecialName(name) || strings.HasPrefix(name, ".") {
-			continue
-		}
-
-		subWarnings, err := ReadLocalPackageRecursive(repo, pkgList,
-			basePath, filepath.Join(pkgName, name), searchedMap)
-		warnings = append(warnings, subWarnings...)
-		if err != nil {
-			return warnings, err
-		}
-	}
-
-	if util.NodeNotExist(filepath.Join(basePath, pkgName,
-		PACKAGE_FILE_NAME)) {
-
-		return warnings, nil
-	}
-
-	pkg, err := LoadLocalPackage(repo, filepath.Join(basePath, pkgName))
-	if err != nil {
-		warnings = append(warnings, err.Error())
-		return warnings, nil
-	}
-
-	if oldPkg, ok := pkgList[pkg.Name()]; ok {
-		oldlPkg := oldPkg.(*LocalPackage)
-		warnings = append(warnings,
-			fmt.Sprintf("Multiple packages with same pkg.name=%s "+
-				"in repo %s; path1=%s path2=%s", oldlPkg.Name(), repo.Name(),
-				oldlPkg.BasePath(), pkg.BasePath()))
-
-		return warnings, nil
-	}
-
-	pkgList[pkg.Name()] = pkg
-
-	return warnings, nil
-}
-
-func ReadLocalPackages(repo *repo.Repo, basePath string) (
-	*map[string]interfaces.PackageInterface, []string, error) {
-
-	pkgMap := &map[string]interfaces.PackageInterface{}
-
-	// Keep track of which directories we have traversed.  Prevent infinite
-	// loops caused by symlink cycles by not inspecting the same directory
-	// twice.
-	searchedMap := map[string]struct{}{}
-
-	warnings, err := ReadLocalPackageRecursive(repo, *pkgMap,
-		basePath, "", searchedMap)
-
-	return pkgMap, warnings, err
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/pkg/package.go
----------------------------------------------------------------------
diff --git a/newt/pkg/package.go b/newt/pkg/package.go
deleted file mode 100644
index 58bf523..0000000
--- a/newt/pkg/package.go
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*  http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
- */
-
-package pkg
-
-import "mynewt.apache.org/newt/newt/interfaces"
-
-const PACKAGE_FILE_NAME = "pkg.yml"
-const SYSCFG_YAML_FILENAME = "syscfg.yml"
-
-const (
-	PACKAGE_STABILITY_STABLE = "stable"
-	PACKAGE_STABILITY_LATEST = "latest"
-	PACKAGE_STABILITY_DEV    = "dev"
-)
-
-// Define constants with values of increasing priority.
-const (
-	PACKAGE_TYPE_COMPILER interfaces.PackageType = iota
-	PACKAGE_TYPE_MFG
-	PACKAGE_TYPE_SDK
-	PACKAGE_TYPE_GENERATED
-	PACKAGE_TYPE_LIB
-	PACKAGE_TYPE_BSP
-	PACKAGE_TYPE_UNITTEST
-	PACKAGE_TYPE_APP
-	PACKAGE_TYPE_TARGET
-)
-
-var PackageTypeNames = map[interfaces.PackageType]string{
-	PACKAGE_TYPE_COMPILER:  "compiler",
-	PACKAGE_TYPE_MFG:       "mfg",
-	PACKAGE_TYPE_SDK:       "sdk",
-	PACKAGE_TYPE_GENERATED: "generated",
-	PACKAGE_TYPE_LIB:       "lib",
-	PACKAGE_TYPE_BSP:       "bsp",
-	PACKAGE_TYPE_UNITTEST:  "unittest",
-	PACKAGE_TYPE_APP:       "app",
-	PACKAGE_TYPE_TARGET:    "target",
-}
-
-// An interface, representing information about a Package
-// This interface is implemented by both packages in the
-// local directory, but also packages that are stored in
-// remote repositories.  It is abstracted so that routines
-// that do package search & installation can work across
-// both local & remote packages without needing to special
-// case.
-type Package interface {
-	// The repository this package belongs to
-	Repo() interfaces.RepoInterface
-	// The name of this package
-	Name() string
-	// The full name of this package, including repo
-	FullName() string
-	// The type of package (lib, target, bsp, etc.)
-	Type() interfaces.PackageType
-	// BasePath is the path on disk if it's a local package
-	BasePath() string
-	// Hash of the contents of the package
-	Hash() (string, error)
-	// Description of this package
-	Desc() *PackageDesc
-	// APIs exported by this package
-	Apis() []string
-	// APIs required by this package
-	ReqApis() []string
-}
-
-// Description of a package
-type PackageDesc struct {
-	// Author of the package
-	Author string
-	// Homepage of the package for more information
-	Homepage    string
-	Description string
-	Keywords    []string
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/pkg/packageutil.go
----------------------------------------------------------------------
diff --git a/newt/pkg/packageutil.go b/newt/pkg/packageutil.go
deleted file mode 100644
index 27b463c..0000000
--- a/newt/pkg/packageutil.go
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*  http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
- */
-
-package pkg
-
-import (
-	"path/filepath"
-	"sort"
-
-	"mynewt.apache.org/newt/newt/interfaces"
-)
-
-type lpkgSorter struct {
-	pkgs []*LocalPackage
-}
-
-func (s lpkgSorter) Len() int {
-	return len(s.pkgs)
-}
-func (s lpkgSorter) Swap(i, j int) {
-	s.pkgs[i], s.pkgs[j] = s.pkgs[j], s.pkgs[i]
-}
-func (s lpkgSorter) Less(i, j int) bool {
-	return s.pkgs[i].FullName() < s.pkgs[j].FullName()
-}
-
-func SortLclPkgs(pkgs []*LocalPackage) []*LocalPackage {
-	sorter := lpkgSorter{
-		pkgs: make([]*LocalPackage, 0, len(pkgs)),
-	}
-
-	for _, p := range pkgs {
-		sorter.pkgs = append(sorter.pkgs, p)
-	}
-
-	sort.Sort(sorter)
-	return sorter.pkgs
-}
-
-func ShortName(p interfaces.PackageInterface) string {
-	return filepath.Base(p.Name())
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/project/pkgwriter.go
----------------------------------------------------------------------
diff --git a/newt/project/pkgwriter.go b/newt/project/pkgwriter.go
deleted file mode 100644
index 6e39245..0000000
--- a/newt/project/pkgwriter.go
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package project
-
-import (
-	"fmt"
-	"io/ioutil"
-	"os"
-	"path"
-	"regexp"
-	"strings"
-
-	"mynewt.apache.org/newt/newt/downloader"
-	"mynewt.apache.org/newt/util"
-)
-
-type PackageWriter struct {
-	downloader *downloader.GithubDownloader
-	repo       string
-	targetPath string
-	template   string
-	fullName   string
-	project    *Project
-}
-
-var TemplateRepoMap = map[string]string{
-	"SDK": "incubator-incubator-mynewt-pkg-sdk",
-	"BSP": "incubator-incubator-mynewt-pkg-bsp",
-	"PKG": "incubator-incubator-mynewt-pkg-pkg",
-}
-
-const PACKAGEWRITER_GITHUB_DOWNLOAD_USER = "apache"
-const PACKAGEWRITER_GITHUB_DOWNLOAD_BRANCH = "master"
-
-func (pw *PackageWriter) ConfigurePackage(template string, loc string) error {
-	str, ok := TemplateRepoMap[template]
-	if !ok {
-		return util.NewNewtError(fmt.Sprintf("Cannot find matching "+
-			"repository for template %s", template))
-	}
-	pw.repo = str
-
-	pw.fullName = path.Clean(loc)
-	path := pw.project.Path()
-	path = path + "/" + pw.fullName
-
-	if util.NodeExist(path) {
-		return util.NewNewtError(fmt.Sprintf("Cannot place a new package in "+
-			"%s, path already exists.", path))
-	}
-
-	pw.template = template
-	pw.targetPath = path
-
-	return nil
-}
-
-func (pw *PackageWriter) cleanupPackageFile(pfile string) error {
-	f, err := os.Open(pfile)
-	if err != nil {
-		return util.ChildNewtError(err)
-	}
-	defer f.Close()
-
-	data, _ := ioutil.ReadAll(f)
-
-	// Search & replace file contents
-	re := regexp.MustCompile("your-pkg-name")
-	res := re.ReplaceAllString(string(data), pw.fullName)
-
-	if err := ioutil.WriteFile(pfile, []byte(res), 0666); err != nil {
-		return util.ChildNewtError(err)
-	}
-
-	return nil
-}
-
-func (pw *PackageWriter) fixupPKG() error {
-	pkgBase := path.Base(pw.fullName)
-
-	// Move include file to name after package name
-	if err := util.MoveFile(pw.targetPath+"/include/your-path/your-file.h",
-		pw.targetPath+"/include/your-path/"+pkgBase+".h"); err != nil {
-		return err
-	}
-
-	// Move source file
-	if err := util.MoveFile(pw.targetPath+"/src/your-source.c",
-		pw.targetPath+"/src/"+pkgBase+".c"); err != nil {
-		return err
-	}
-
-	if err := util.CopyDir(pw.targetPath+"/include/your-path/",
-		pw.targetPath+"/include/"+pkgBase+"/"); err != nil {
-		return err
-	}
-
-	if err := os.RemoveAll(pw.targetPath + "/include/your-path/"); err != nil {
-		return util.ChildNewtError(err)
-	}
-
-	if err := pw.cleanupPackageFile(pw.targetPath + "/pkg.yml"); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (pw *PackageWriter) WritePackage() error {
-	dl := pw.downloader
-
-	dl.User = PACKAGEWRITER_GITHUB_DOWNLOAD_USER
-	dl.Repo = pw.repo
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"Download package template for package type %s.\n",
-		strings.ToLower(pw.template))
-
-	tmpdir, err := dl.DownloadRepo(PACKAGEWRITER_GITHUB_DOWNLOAD_BRANCH)
-	if err != nil {
-		return err
-	}
-
-	if err := os.RemoveAll(tmpdir + "/.git/"); err != nil {
-		return util.NewNewtError(err.Error())
-	}
-
-	if err := util.CopyDir(tmpdir, pw.targetPath); err != nil {
-		return err
-	}
-
-	switch pw.template {
-	case "PKG":
-		if err := pw.fixupPKG(); err != nil {
-			return err
-		}
-	}
-
-	util.StatusMessage(util.VERBOSITY_DEFAULT,
-		"Package successfuly installed into %s.\n", pw.targetPath)
-
-	return nil
-}
-
-/**
- * Create new PackageWriter structure, and return it
- */
-func NewPackageWriter() *PackageWriter {
-	proj := GetProject()
-
-	pw := &PackageWriter{
-		project:    proj,
-		downloader: downloader.NewGithubDownloader(),
-	}
-
-	return pw
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/project/project.go
----------------------------------------------------------------------
diff --git a/newt/project/project.go b/newt/project/project.go
deleted file mode 100644
index 75b0b31..0000000
--- a/newt/project/project.go
+++ /dev/null
@@ -1,719 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package project
-
-import (
-	"bufio"
-	"fmt"
-	"os"
-	"path"
-	"path/filepath"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/newt/compat"
-	"mynewt.apache.org/newt/newt/downloader"
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/repo"
-	"mynewt.apache.org/newt/util"
-	"mynewt.apache.org/newt/viper"
-)
-
-var globalProject *Project = nil
-
-const PROJECT_FILE_NAME = "project.yml"
-
-var ignoreSearchDirs []string = []string{
-	"bin",
-	"repos",
-}
-
-type Project struct {
-	// Name of this project
-	name string
-
-	// Base path of the project
-	BasePath string
-
-	packages interfaces.PackageList
-
-	projState *ProjectState
-
-	// Repositories configured on this project
-	repos    map[string]*repo.Repo
-	warnings []string
-
-	localRepo *repo.Repo
-
-	v *viper.Viper
-}
-
-func initProject(dir string) error {
-	var err error
-
-	globalProject, err = LoadProject(dir)
-	if err != nil {
-		return err
-	}
-	if err := globalProject.loadPackageList(); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func initialize() error {
-	if globalProject == nil {
-		wd, err := os.Getwd()
-		if err != nil {
-			return util.NewNewtError(err.Error())
-		}
-		if err := initProject(wd); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-func TryGetProject() (*Project, error) {
-	if err := initialize(); err != nil {
-		return nil, err
-	}
-	return globalProject, nil
-}
-
-func GetProject() *Project {
-	if _, err := TryGetProject(); err != nil {
-		panic(err.Error())
-	}
-
-	return globalProject
-}
-
-func ResetProject() {
-	globalProject = nil
-}
-
-func ResetDeps(newList interfaces.PackageList) interfaces.PackageList {
-	return nil
-	if globalProject == nil {
-		return nil
-	}
-	oldList := globalProject.packages
-	globalProject.packages = newList
-
-	if newList == nil {
-		globalProject.loadPackageList()
-	}
-	return oldList
-}
-
-func NewProject(dir string) (*Project, error) {
-	proj := &Project{}
-
-	if err := proj.Init(dir); err != nil {
-		return nil, err
-	}
-
-	return proj, nil
-}
-
-func (proj *Project) Path() string {
-	return proj.BasePath
-}
-
-func (proj *Project) Name() string {
-	return proj.name
-}
-
-func (proj *Project) Repos() map[string]*repo.Repo {
-	return proj.repos
-}
-
-func (proj *Project) FindRepo(rname string) *repo.Repo {
-	if rname == repo.REPO_NAME_LOCAL {
-		return proj.LocalRepo()
-	} else {
-		r, _ := proj.repos[rname]
-		return r
-	}
-}
-
-func (proj *Project) FindRepoPath(rname string) string {
-	r := proj.FindRepo(rname)
-	if r == nil {
-		return ""
-	}
-
-	return r.Path()
-}
-
-func (proj *Project) LocalRepo() *repo.Repo {
-	return proj.localRepo
-}
-
-func (proj *Project) Warnings() []string {
-	return proj.warnings
-}
-
-func (proj *Project) upgradeCheck(r *repo.Repo, vers *repo.Version,
-	force bool) (bool, error) {
-	rdesc, err := r.GetRepoDesc()
-	if err != nil {
-		return false, err
-	}
-
-	branch, newVers, _ := rdesc.Match(r)
-	if newVers == nil {
-		util.StatusMessage(util.VERBOSITY_DEFAULT,
-			"No matching version to upgrade to "+
-				"found for %s.  Please check your project requirements.",
-			r.Name())
-		return false, util.NewNewtError(fmt.Sprintf("Cannot find a "+
-			"version of repository %s that matches project requirements.",
-			r.Name()))
-	}
-
-	// If the change between the old repository and the new repository would cause
-	// and upgrade.  Then prompt for an upgrade response, unless the force option
-	// is present.
-	if vers.CompareVersions(newVers, vers) != 0 ||
-		vers.Stability() != newVers.Stability() {
-		if !force {
-			str := ""
-			if newVers.Stability() != repo.VERSION_STABILITY_NONE {
-				str += "(" + branch + ")"
-			}
-
-			fmt.Printf("Would you like to upgrade repository %s from %s to %s %s? [Yn] ",
-				r.Name(), vers.String(), newVers.String(), str)
-			line, more, err := bufio.NewReader(os.Stdin).ReadLine()
-			if more || err != nil {
-				return false, util.NewNewtError(fmt.Sprintf(
-					"Couldn't read upgrade response: %s\n", err.Error()))
-			}
-
-			// Anything but no means yes.
-			answer := strings.ToUpper(strings.Trim(string(line), " "))
-			if answer == "N" || answer == "NO" {
-				fmt.Printf("User says don't upgrade, skipping upgrade of %s\n",
-					r.Name())
-				return true, nil
-			}
-		}
-	} else {
-		util.StatusMessage(util.VERBOSITY_VERBOSE,
-			"Repository %s doesn't need to be upgraded, latest "+
-				"version installed.\n", r.Name())
-		return true, nil
-	}
-
-	return false, nil
-}
-
-func (proj *Project) checkVersionRequirements(r *repo.Repo, upgrade bool, force bool) (bool, error) {
-	rdesc, err := r.GetRepoDesc()
-	if err != nil {
-		return false, err
-	}
-
-	rname := r.Name()
-
-	vers := proj.projState.GetInstalledVersion(rname)
-	if vers != nil {
-		ok := rdesc.SatisfiesVersion(vers, r.VersionRequirements())
-		if !ok && !upgrade {
-			util.StatusMessage(util.VERBOSITY_QUIET, "WARNING: Installed "+
-				"version %s of repository %s does not match desired "+
-				"version %s in project file.  You can fix this by either upgrading"+
-				" your repository, or modifying the project.yml file.\n",
-				vers, rname, r.VersionRequirementsString())
-			return true, err
-		} else {
-			if !upgrade {
-				util.StatusMessage(util.VERBOSITY_VERBOSE, "%s correct version already installed\n", r.Name())
-				return true, nil
-			} else {
-				skip, err := proj.upgradeCheck(r, vers, force)
-				return skip, err
-			}
-		}
-	} else {
-		// Fallthrough and perform the installation.
-		// Check to make sure that this repository contains a version
-		// that can satisfy.
-		_, _, ok := rdesc.Match(r)
-		if !ok {
-			fmt.Printf("WARNING: No matching repository version found for repository "+
-				"%s specified in project.\n", r.Name())
-			return true, err
-		}
-	}
-
-	return false, nil
-}
-
-func (proj *Project) checkDeps(r *repo.Repo) error {
-	repos, updated, err := r.UpdateDesc()
-	if err != nil {
-		return err
-	}
-
-	if !updated {
-		return nil
-	}
-
-	for _, newRepo := range repos {
-		curRepo, ok := proj.repos[newRepo.Name()]
-		if !ok {
-			proj.repos[newRepo.Name()] = newRepo
-			return proj.UpdateRepos()
-		} else {
-			// Add any dependencies we might have found here.
-			for _, dep := range newRepo.Deps() {
-				newRepo.DownloadDesc()
-				newRepo.ReadDesc()
-				curRepo.AddDependency(dep)
-			}
-		}
-	}
-
-	return nil
-}
-
-func (proj *Project) UpdateRepos() error {
-	repoList := proj.Repos()
-	for _, r := range repoList {
-		if r.IsLocal() {
-			continue
-		}
-
-		err := proj.checkDeps(r)
-		if err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-func (proj *Project) Install(upgrade bool, force bool) error {
-	repoList := proj.Repos()
-
-	for rname, _ := range repoList {
-		// Ignore the local repo on install
-		if rname == repo.REPO_NAME_LOCAL {
-			continue
-		}
-
-		// First thing we do is update repository description.  This
-		// will get us available branches and versions in the repository.
-		if err := proj.UpdateRepos(); err != nil {
-			return err
-		}
-	}
-
-	// Get repository list, and print every repo and it's dependencies.
-	if err := repo.CheckDeps(upgrade, proj.Repos()); err != nil {
-		return err
-	}
-
-	for rname, r := range proj.Repos() {
-		if r.IsLocal() {
-			continue
-		}
-		// Check the version requirements on this repository, and see
-		// whether or not we need to install/upgrade it.
-		skip, err := proj.checkVersionRequirements(r, upgrade, force)
-		if err != nil {
-			return err
-		}
-		if skip {
-			continue
-		}
-
-		// Do the hard work of actually copying and installing the repository.
-		rvers, err := r.Install(upgrade || force)
-		if err != nil {
-			return err
-		}
-
-		if upgrade {
-			util.StatusMessage(util.VERBOSITY_VERBOSE, "%s successfully upgraded to version %s\n",
-				r.Name(), rvers.String())
-		} else {
-			util.StatusMessage(util.VERBOSITY_VERBOSE, "%s successfully installed version %s\n",
-				r.Name(), rvers.String())
-		}
-
-		// Update the project state with the new repository version information.
-		proj.projState.Replace(rname, rvers)
-	}
-
-	// Save the project state, including any updates or changes to the project
-	// information that either install or upgrade caused.
-	if err := proj.projState.Save(); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (proj *Project) Upgrade(force bool) error {
-	return proj.Install(true, force)
-}
-
-func (proj *Project) loadRepo(rname string, v *viper.Viper) error {
-	varName := fmt.Sprintf("repository.%s", rname)
-
-	repoVars := v.GetStringMapString(varName)
-	if len(repoVars) == 0 {
-		return util.NewNewtError(fmt.Sprintf("Missing configuration for "+
-			"repository %s.", rname))
-	}
-	if repoVars["type"] == "" {
-		return util.NewNewtError(fmt.Sprintf("Missing type for repository " +
-			rname))
-	}
-
-	dl, err := downloader.LoadDownloader(rname, repoVars)
-	if err != nil {
-		return err
-	}
-
-	rversreq := repoVars["vers"]
-	r, err := repo.NewRepo(rname, rversreq, dl)
-	if err != nil {
-		return err
-	}
-
-	for _, ignDir := range ignoreSearchDirs {
-		r.AddIgnoreDir(ignDir)
-	}
-
-	rd, err := repo.NewRepoDependency(rname, rversreq)
-	if err != nil {
-		return err
-	}
-	rd.Storerepo = r
-
-	proj.localRepo.AddDependency(rd)
-
-	// Read the repo's descriptor file so that we have its newt version
-	// compatibility map.
-	r.ReadDesc()
-
-	rvers := proj.projState.GetInstalledVersion(rname)
-	code, msg := r.CheckNewtCompatibility(rvers, newtutil.NewtVersion)
-	switch code {
-	case compat.NEWT_COMPAT_GOOD:
-	case compat.NEWT_COMPAT_WARN:
-		util.StatusMessage(util.VERBOSITY_QUIET, "WARNING: %s.\n", msg)
-	case compat.NEWT_COMPAT_ERROR:
-		return util.NewNewtError(msg)
-	}
-
-	log.Debugf("Loaded repository %s (type: %s, user: %s, repo: %s)", rname,
-		repoVars["type"], repoVars["user"], repoVars["repo"])
-
-	proj.repos[r.Name()] = r
-	return nil
-}
-
-func (proj *Project) checkNewtVer() error {
-	compatSms := proj.v.GetStringMapString("project.newt_compatibility")
-	// If this project doesn't have a newt compatibility map, just assume there
-	// is no incompatibility.
-	if len(compatSms) == 0 {
-		return nil
-	}
-
-	tbl, err := compat.ParseNcTable(compatSms)
-	if err != nil {
-		return util.FmtNewtError("Error reading project.yml: %s", err.Error())
-	}
-
-	code, msg := tbl.CheckNewtVer(newtutil.NewtVersion)
-	msg = fmt.Sprintf("This version of newt (%s) is incompatible with "+
-		"your project; %s", newtutil.NewtVersion.String(), msg)
-
-	switch code {
-	case compat.NEWT_COMPAT_GOOD:
-		return nil
-	case compat.NEWT_COMPAT_WARN:
-		util.StatusMessage(util.VERBOSITY_QUIET, "WARNING: %s.\n", msg)
-		return nil
-	case compat.NEWT_COMPAT_ERROR:
-		return util.NewNewtError(msg)
-	default:
-		return nil
-	}
-}
-
-func (proj *Project) loadConfig() error {
-	v, err := util.ReadConfig(proj.BasePath,
-		strings.TrimSuffix(PROJECT_FILE_NAME, ".yml"))
-	if err != nil {
-		return util.NewNewtError(err.Error())
-	}
-	// Store configuration object for access to future values,
-	// this avoids keeping every string around as a project variable when
-	// we need to process it later.
-	proj.v = v
-
-	proj.projState, err = LoadProjectState()
-	if err != nil {
-		return err
-	}
-
-	proj.name = v.GetString("project.name")
-
-	// Local repository always included in initialization
-	r, err := repo.NewLocalRepo(proj.name)
-	if err != nil {
-		return err
-	}
-
-	proj.repos[proj.name] = r
-	proj.localRepo = r
-	for _, ignDir := range ignoreSearchDirs {
-		r.AddIgnoreDir(ignDir)
-	}
-
-	rstrs := v.GetStringSlice("project.repositories")
-	for _, repoName := range rstrs {
-		if err := proj.loadRepo(repoName, v); err != nil {
-			return err
-		}
-	}
-
-	ignoreDirs := v.GetStringSlice("project.ignore_dirs")
-	for _, ignDir := range ignoreDirs {
-		repoName, dirName, err := newtutil.ParsePackageString(ignDir)
-		if err != nil {
-			return err
-		}
-		if repoName == "" {
-			r = proj.LocalRepo()
-		} else {
-			r = proj.FindRepo(repoName)
-		}
-		if r == nil {
-			return util.NewNewtError(
-				fmt.Sprintf("ignore_dirs: unknown repo %s", repoName))
-		}
-		r.AddIgnoreDir(dirName)
-	}
-
-	if err := proj.checkNewtVer(); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (proj *Project) Init(dir string) error {
-	proj.BasePath = filepath.ToSlash(filepath.Clean(dir))
-
-	// Only one project per system, when created, set it as the global project
-	interfaces.SetProject(proj)
-
-	proj.repos = map[string]*repo.Repo{}
-
-	// Load Project configuration
-	if err := proj.loadConfig(); err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func matchNamePath(name, path string) bool {
-	// assure that name and path use the same path separator...
-	names := filepath.SplitList(name)
-	name = filepath.Join(names...)
-
-	if strings.HasSuffix(path, name) {
-		return true
-	}
-	return false
-}
-
-func (proj *Project) ResolveDependency(dep interfaces.DependencyInterface) interfaces.PackageInterface {
-	type NamePath struct {
-		name string
-		path string
-	}
-
-	var errorPkgs []NamePath
-	for _, pkgList := range proj.packages {
-		for _, pkg := range *pkgList {
-			name := pkg.Name()
-			path := pkg.BasePath()
-			if !matchNamePath(name, path) {
-				errorPkgs = append(errorPkgs, NamePath{name: name, path: path})
-			}
-			if dep.SatisfiesDependency(pkg) {
-				return pkg
-			}
-		}
-	}
-
-	for _, namepath := range errorPkgs {
-		util.StatusMessage(util.VERBOSITY_VERBOSE,
-			"Package name \"%s\" doesn't match path \"%s\"\n", namepath.name, namepath.path)
-	}
-
-	return nil
-}
-
-func (proj *Project) ResolvePackage(
-	dfltRepo interfaces.RepoInterface, name string) (*pkg.LocalPackage, error) {
-	// Trim trailing slash from name.  This is necessary when tab
-	// completion is used to specify the name.
-	name = strings.TrimSuffix(name, "/")
-
-	repoName, pkgName, err := newtutil.ParsePackageString(name)
-	if err != nil {
-		return nil, util.FmtNewtError("invalid package name: %s (%s)", name,
-			err.Error())
-	}
-
-	var repo interfaces.RepoInterface
-	if repoName == "" {
-		repo = dfltRepo
-	} else {
-		repo = proj.repos[repoName]
-	}
-
-	dep, err := pkg.NewDependency(repo, pkgName)
-	if err != nil {
-		return nil, util.FmtNewtError("invalid package name: %s (%s)", name,
-			err.Error())
-	}
-	if dep == nil {
-		return nil, util.NewNewtError("invalid package name: " + name)
-	}
-	pack := proj.ResolveDependency(dep)
-	if pack == nil {
-		return nil, util.NewNewtError("unknown package: " + name)
-	}
-
-	return pack.(*pkg.LocalPackage), nil
-}
-
-// Resolves a path with an optional repo prefix (e.g., "@apache-mynewt-core").
-func (proj *Project) ResolvePath(
-	basePath string, name string) (string, error) {
-
-	repoName, subPath, err := newtutil.ParsePackageString(name)
-	if err != nil {
-		return "", util.FmtNewtError("invalid path: %s (%s)", name,
-			err.Error())
-	}
-
-	if repoName == "" {
-		return basePath + "/" + subPath, nil
-	} else {
-		repo := proj.repos[repoName]
-		if repo == nil {
-			return "", util.FmtNewtError("Unknown repository: %s", repoName)
-		}
-
-		return repo.Path() + "/" + subPath, nil
-	}
-}
-
-func findProjectDir(dir string) (string, error) {
-	for {
-		projFile := path.Clean(dir) + "/" + PROJECT_FILE_NAME
-
-		log.Debugf("Searching for project file %s", projFile)
-		if util.NodeExist(projFile) {
-			break
-		}
-
-		// Move back one directory and continue searching
-		dir = path.Clean(dir + "../../")
-		if dir == "/" {
-			return "", util.NewNewtError("No project file found!")
-		}
-	}
-
-	return dir, nil
-}
-
-func (proj *Project) loadPackageList() error {
-	proj.packages = interfaces.PackageList{}
-
-	// Go through a list of repositories, starting with local, and search for
-	// packages / store them in the project package list.
-	repos := proj.Repos()
-	for name, repo := range repos {
-		list, warnings, err := pkg.ReadLocalPackages(repo, repo.Path())
-		if err != nil {
-			/* Failed to read the repo's package list.  Report the failure as a
-			 * warning if the project state indicates that this repo should be
-			 * installed.
-			 */
-			if proj.projState.installedRepos[name] != nil {
-				util.StatusMessage(util.VERBOSITY_QUIET, err.Error()+"\n")
-			}
-		} else {
-			proj.packages[name] = list
-		}
-
-		proj.warnings = append(proj.warnings, warnings...)
-	}
-
-	return nil
-}
-
-func (proj *Project) PackageList() interfaces.PackageList {
-	return proj.packages
-}
-
-func (proj *Project) PackagesOfType(pkgType interfaces.PackageType) []interfaces.PackageInterface {
-	matches := []interfaces.PackageInterface{}
-
-	packs := proj.PackageList()
-	for _, packHash := range packs {
-		for _, pack := range *packHash {
-			if pkgType == -1 || pack.Type() == pkgType {
-				matches = append(matches, pack)
-			}
-		}
-	}
-
-	return matches
-}
-
-func LoadProject(dir string) (*Project, error) {
-	projDir, err := findProjectDir(dir)
-	if err != nil {
-		return nil, err
-	}
-
-	proj, err := NewProject(projDir)
-
-	return proj, err
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/project/projectstate.go
----------------------------------------------------------------------
diff --git a/newt/project/projectstate.go b/newt/project/projectstate.go
deleted file mode 100644
index 2c14359..0000000
--- a/newt/project/projectstate.go
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package project
-
-import (
-	"bufio"
-	"fmt"
-	"os"
-	"strings"
-
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/repo"
-	"mynewt.apache.org/newt/util"
-)
-
-const PROJECT_STATE_FILE = "project.state"
-
-type ProjectState struct {
-	installedRepos map[string]*repo.Version
-}
-
-func (ps *ProjectState) GetInstalledVersion(rname string) *repo.Version {
-	v, _ := ps.installedRepos[rname]
-	return v
-}
-
-func (ps *ProjectState) Replace(rname string, rvers *repo.Version) {
-	ps.installedRepos[rname] = rvers
-}
-
-func (ps *ProjectState) StateFile() string {
-	return interfaces.GetProject().Path() + "/" + PROJECT_STATE_FILE
-}
-
-func (ps *ProjectState) Save() error {
-	file, err := os.Create(ps.StateFile())
-	if err != nil {
-		return util.NewNewtError(err.Error())
-	}
-	defer file.Close()
-
-	for k, v := range ps.installedRepos {
-		str := fmt.Sprintf("%s,%d.%d.%d\n", k, v.Major(), v.Minor(), v.Revision())
-		file.WriteString(str)
-	}
-
-	return nil
-}
-
-func (ps *ProjectState) Init() error {
-	ps.installedRepos = map[string]*repo.Version{}
-
-	path := ps.StateFile()
-
-	// Read project state file.  If doesn't exist, it will be empty until somebody
-	// installs a repo
-	if util.NodeNotExist(path) {
-		return nil
-	}
-
-	file, err := os.Open(path)
-	if err != nil {
-		return err
-	}
-	defer file.Close()
-
-	scanner := bufio.NewScanner(file)
-	for scanner.Scan() {
-		line := strings.Split(scanner.Text(), ",")
-		if len(line) != 2 {
-			return util.NewNewtError(fmt.Sprintf(
-				"Invalid format for line in project.state file: %s\n", line))
-		}
-
-		repoName := line[0]
-		repoVers, err := repo.LoadVersion(line[1])
-		if err != nil {
-			return err
-		}
-
-		ps.installedRepos[repoName] = repoVers
-	}
-	return nil
-}
-
-func LoadProjectState() (*ProjectState, error) {
-	ps := &ProjectState{}
-	if err := ps.Init(); err != nil {
-		return nil, err
-	}
-	return ps, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/repo/repo.go
----------------------------------------------------------------------
diff --git a/newt/repo/repo.go b/newt/repo/repo.go
deleted file mode 100644
index e058466..0000000
--- a/newt/repo/repo.go
+++ /dev/null
@@ -1,757 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package repo
-
-import (
-	"fmt"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"strings"
-	"time"
-
-	log "github.com/Sirupsen/logrus"
-	"github.com/spf13/cast"
-
-	"mynewt.apache.org/newt/newt/compat"
-	"mynewt.apache.org/newt/newt/downloader"
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/util"
-	"mynewt.apache.org/newt/viper"
-)
-
-const REPO_NAME_LOCAL = "local"
-const REPO_DEFAULT_PERMS = 0755
-
-const REPO_FILE_NAME = "repository.yml"
-const REPOS_DIR = "repos"
-
-type Repo struct {
-	name       string
-	downloader downloader.Downloader
-	localPath  string
-	versreq    []interfaces.VersionReqInterface
-	rdesc      *RepoDesc
-	deps       []*RepoDependency
-	ignDirs    []string
-	updated    bool
-	local      bool
-	ncMap      compat.NewtCompatMap
-}
-
-type RepoDesc struct {
-	name string
-	vers map[*Version]string
-}
-
-type RepoDependency struct {
-	versreq   []interfaces.VersionReqInterface
-	name      string
-	Storerepo *Repo
-}
-
-func (r *Repo) Deps() []*RepoDependency {
-	return r.deps
-}
-
-func (r *Repo) AddDependency(rd *RepoDependency) {
-	r.deps = append(r.deps, rd)
-}
-
-func (rd *RepoDependency) Name() string {
-	return rd.name
-}
-
-func (r *Repo) AddIgnoreDir(ignDir string) {
-	r.ignDirs = append(r.ignDirs, ignDir)
-}
-
-func (r *Repo) ignoreDir(dir string) bool {
-	for _, idir := range r.ignDirs {
-		if idir == dir {
-			return true
-		}
-	}
-	return false
-}
-
-func (repo *Repo) FilteredSearchList(
-	curPath string, searchedMap map[string]struct{}) ([]string, error) {
-
-	list := []string{}
-
-	path := filepath.Join(repo.Path(), curPath)
-	dirList, err := ioutil.ReadDir(path)
-	if err != nil {
-		return list, util.FmtNewtError("failed to read repo \"%s\": %s",
-			repo.Name(), err.Error())
-	}
-
-	for _, dirEnt := range dirList {
-		// Resolve symbolic links.
-		entPath := filepath.Join(path, dirEnt.Name())
-		entry, err := os.Stat(entPath)
-		if err != nil {
-			return nil, util.ChildNewtError(err)
-		}
-
-		name := entry.Name()
-		if err != nil {
-			continue
-		}
-
-		if !entry.IsDir() {
-			continue
-		}
-
-		// Don't search the same directory twice.  This check is necessary in
-		// case of symlink cycles.
-		absPath, err := filepath.EvalSymlinks(entPath)
-		if err != nil {
-			return nil, util.ChildNewtError(err)
-		}
-		if _, ok := searchedMap[absPath]; ok {
-			continue
-		}
-		searchedMap[absPath] = struct{}{}
-
-		if strings.HasPrefix(name, ".") {
-			continue
-		}
-		if repo.ignoreDir(filepath.Join(curPath, name)) {
-			continue
-		}
-		list = append(list, name)
-	}
-	return list, nil
-}
-
-func NewRepoDependency(rname string, verstr string) (*RepoDependency, error) {
-	var err error
-
-	rd := &RepoDependency{}
-	rd.versreq, err = LoadVersionMatches(verstr)
-	if err != nil {
-		return nil, err
-	}
-	rd.name = rname
-
-	return rd, nil
-}
-
-func CheckDeps(upgrade bool, checkRepos map[string]*Repo) error {
-	// For each dependency, get it's version
-	depArray := map[string][]*Version{}
-
-	for _, checkRepo := range checkRepos {
-		for _, rd := range checkRepo.Deps() {
-			lookupRepo := checkRepos[rd.Name()]
-
-			_, vers, ok := lookupRepo.rdesc.Match(rd.Storerepo)
-			if !ok {
-				return util.NewNewtError(fmt.Sprintf("No "+
-					"matching version for dependent repository %s", rd.name))
-			}
-			log.Debugf("Dependency for %s: %s (%s)", checkRepo.Name(), rd.Name(), vers.String())
-
-			_, ok = depArray[rd.Name()]
-			if !ok {
-				depArray[rd.Name()] = []*Version{}
-			}
-			depArray[rd.Name()] = append(depArray[rd.Name()], vers)
-		}
-	}
-
-	for repoName, depVersList := range depArray {
-		for _, depVers := range depVersList {
-			for _, curVers := range depVersList {
-				if depVers.CompareVersions(depVers, curVers) != 0 ||
-					depVers.Stability() != curVers.Stability() {
-					return util.NewNewtError(fmt.Sprintf(
-						"Conflict detected.  Repository %s has multiple dependency versions on %s. "+
-							"Notion of repository version is %s, whereas required is %s ",
-						repoName, curVers, depVers))
-				}
-			}
-		}
-	}
-
-	return nil
-}
-
-func (rd *RepoDesc) MatchVersion(searchVers *Version) (string, *Version, bool) {
-	for vers, curBranch := range rd.vers {
-		if vers.CompareVersions(vers, searchVers) == 0 &&
-			searchVers.Stability() == vers.Stability() {
-			return curBranch, vers, true
-		}
-	}
-	return "", nil, false
-}
-
-func (rd *RepoDesc) Match(r *Repo) (string, *Version, bool) {
-	for vers, branch := range rd.vers {
-		log.Debugf("Repository version requires for %s are %s\n", r.Name(), r.VersionRequirements())
-		if vers.SatisfiesVersion(r.VersionRequirements()) {
-			log.Debugf("Found matching version %s for repo %s",
-				vers.String(), r.Name())
-			if vers.Stability() != VERSION_STABILITY_NONE {
-				// Load the branch as a version, and search for it
-				searchVers, err := LoadVersion(branch)
-				if err != nil {
-					return "", nil, false
-				}
-				// Need to match the NONE stability in order to find the right
-				// branch.
-				searchVers.stability = VERSION_STABILITY_NONE
-
-				var ok bool
-				branch, vers, ok = rd.MatchVersion(searchVers)
-				if !ok {
-					return "", nil, false
-				}
-				log.Debugf("Founding matching version %s for search version %s, related branch is %s\n",
-					vers, searchVers, branch)
-
-			}
-
-			return branch, vers, true
-		}
-	}
-
-	return "", nil, false
-}
-
-func (rd *RepoDesc) SatisfiesVersion(vers *Version, versReqs []interfaces.VersionReqInterface) bool {
-	var err error
-	versMatches := []interfaces.VersionReqInterface{}
-	for _, versReq := range versReqs {
-		versMatch := &VersionMatch{}
-		versMatch.compareType = versReq.CompareType()
-
-		if versReq.Version().Stability() != VERSION_STABILITY_NONE {
-			// Look up this item in the RepoDescription, and get a version
-			searchVers := versReq.Version().(*Version)
-			branch, _, ok := rd.MatchVersion(searchVers)
-			if !ok {
-				return false
-			}
-			versMatch.Vers, err = LoadVersion(branch)
-			if err != nil {
-				return false
-			}
-		} else {
-			versMatch.Vers = versReq.Version().(*Version)
-		}
-
-		versMatches = append(versMatches, versMatch)
-	}
-
-	return vers.SatisfiesVersion(versMatches)
-}
-
-func (rd *RepoDesc) Init(name string, versBranchMap map[string]string) error {
-	rd.name = name
-	rd.vers = map[*Version]string{}
-
-	for versStr, branch := range versBranchMap {
-		log.Debugf("Printing version %s for remote repo %s", versStr, name)
-		vers, err := LoadVersion(versStr)
-		if err != nil {
-			return err
-		}
-
-		// store branch->version mapping
-		rd.vers[vers] = branch
-	}
-
-	return nil
-}
-
-func (rd *RepoDesc) String() string {
-	name := rd.name + "@"
-	for k, v := range rd.vers {
-		name += fmt.Sprintf("%s=%s", k.String(), v)
-		name += "#"
-	}
-
-	return name
-}
-
-func NewRepoDesc(name string, versBranchMap map[string]string) (*RepoDesc, error) {
-	rd := &RepoDesc{}
-
-	if err := rd.Init(name, versBranchMap); err != nil {
-		return nil, err
-	}
-
-	return rd, nil
-}
-
-func (r *Repo) GetRepoDesc() (*RepoDesc, error) {
-	if r.rdesc == nil {
-		return nil, util.NewNewtError(fmt.Sprintf(
-			"Repository description for %s not yet initialized.  Must "+
-				"download it first. ", r.Name()))
-	} else {
-		return r.rdesc, nil
-	}
-}
-
-func (r *Repo) Name() string {
-	return r.name
-}
-
-func (r *Repo) Path() string {
-	return r.localPath
-}
-
-func (r *Repo) IsLocal() bool {
-	return r.local
-}
-
-func (r *Repo) VersionRequirements() []interfaces.VersionReqInterface {
-	return r.versreq
-}
-
-func (r *Repo) VersionRequirementsString() string {
-	str := ""
-	for _, vreq := range r.versreq {
-		str += vreq.String()
-	}
-
-	return str
-}
-
-func (r *Repo) repoFilePath() string {
-	return interfaces.GetProject().Path() + "/" + REPOS_DIR + "/" +
-		".configs/" + r.name + "/"
-}
-
-func (r *Repo) patchesFilePath() string {
-	return interfaces.GetProject().Path() + "/" + REPOS_DIR +
-		"/.patches/"
-}
-
-func (r *Repo) downloadRepo(branchName string) error {
-	dl := r.downloader
-
-	// Download the git repo, returns the git repo, checked out to that branch
-	tmpdir, err := dl.DownloadRepo(branchName)
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Error download repository %s, : %s",
-			r.Name(), err.Error()))
-	}
-
-	// Copy the Git repo into the the desired local path of the repo
-	if err := util.CopyDir(tmpdir, r.Path()); err != nil {
-		// Cleanup any directory that might have been created if we error out
-		// here.
-		os.RemoveAll(r.Path())
-		return err
-	}
-
-	return nil
-}
-
-func (r *Repo) checkExists() bool {
-	return util.NodeExist(r.Path())
-}
-
-func (r *Repo) updateRepo(branchName string) error {
-	dl := r.downloader
-	err := dl.UpdateRepo(r.Path(), branchName)
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Error updating\n"))
-	}
-	return nil
-}
-
-func (r *Repo) cleanupRepo(branchName string) error {
-	dl := r.downloader
-	err := dl.CleanupRepo(r.Path(), branchName)
-	if err != nil {
-		return util.NewNewtError(fmt.Sprintf("Error cleaning and updating\n"))
-	}
-	return nil
-}
-
-func (r *Repo) saveLocalDiff() (string, error) {
-	dl := r.downloader
-	diff, err := dl.LocalDiff(r.Path())
-	if err != nil {
-		return "", util.NewNewtError(fmt.Sprintf(
-			"Error creating diff for \"%s\" : %s", r.Name(), err.Error()))
-	}
-
-	// NOTE: date was not a typo: https://golang.org/pkg/time/#Time.Format
-	timenow := time.Now().Format("20060102_150405")
-	filename := r.patchesFilePath() + r.Name() + "_" + timenow + ".diff"
-
-	f, err := os.Create(filename)
-	if err != nil {
-		return "", util.NewNewtError(fmt.Sprintf(
-			"Error creating repo diff file \"%s\"", filename))
-	}
-	defer f.Close()
-
-	_, err = f.Write(diff)
-	if err != nil {
-		return "", util.NewNewtError(fmt.Sprintf(
-			"Error writing repo diff file \"%s\"", filename))
-	}
-
-	return filename, nil
-}
-
-func (r *Repo) currentBranch() (string, error) {
-	dl := r.downloader
-	branch, err := dl.CurrentBranch(r.Path())
-	if err != nil {
-		return "", util.NewNewtError(fmt.Sprintf("Error finding current branch for \"%s\" : %s",
-			r.Name(), err.Error()))
-	}
-	return filepath.Base(branch), nil
-}
-
-func (r *Repo) Install(force bool) (*Version, error) {
-	exists := util.NodeExist(r.Path())
-	if exists && !force {
-		return nil, util.NewNewtError(fmt.Sprintf(
-			"Repository %s already exists, provide the -f option "+
-				"to overwrite", r.Name()))
-	}
-
-	branchName, vers, found := r.rdesc.Match(r)
-	if !found {
-		return nil, util.NewNewtError(fmt.Sprintf("No repository matching description %s found",
-			r.rdesc.String()))
-	}
-
-	// if the repo is already cloned, try to cleanup and checkout the requested branch
-	if exists {
-		err := r.cleanupRepo(branchName)
-		if err == nil {
-			return vers, nil
-		}
-
-		// cleanup failed, so remove current copy and let download clone again...
-		if err := os.RemoveAll(r.Path()); err != nil {
-			return nil, util.NewNewtError(err.Error())
-		}
-	}
-
-	// repo was not already cloned or cleanup failed...
-	if err := r.downloadRepo(branchName); err != nil {
-		return nil, err
-	}
-
-	return vers, nil
-}
-
-func (r *Repo) Sync(vers *Version, force bool) (bool, bool, error) {
-	var exists bool
-	var err error
-	var currBranch string
-
-	exists = r.checkExists()
-
-	// Update the repo description
-	if _, updated, err := r.UpdateDesc(); updated != true || err != nil {
-		return exists, false, util.NewNewtError("Cannot update repository description.")
-	}
-
-	branchName, _, found := r.rdesc.MatchVersion(vers)
-	if found == false {
-		return exists, false, util.NewNewtError(fmt.Sprintf(
-			"Branch description for %s not found", r.Name()))
-	}
-
-	if exists {
-		// Here assuming that if the branch was changed by the user,
-		// the user must know what he's doing...
-		// but, if -f is passed let's just save the work and re-clone
-		currBranch, err = r.currentBranch()
-
-		// currBranch == HEAD means we're dettached from HEAD, so
-		// ignore and move to "new" tag
-		if err != nil {
-			return exists, false, err
-		} else if currBranch != "HEAD" && currBranch != branchName {
-			msg := "Unexpected local branch for %s: \"%s\" != \"%s\"\n"
-			if force {
-				util.StatusMessage(util.VERBOSITY_VERBOSE,
-					msg, r.rdesc.name, currBranch, branchName)
-			} else {
-				err = util.NewNewtError(
-					fmt.Sprintf(msg, r.rdesc.name, currBranch, branchName))
-				return exists, false, err
-			}
-		}
-
-		// Don't try updating if on an invalid branch...
-		if currBranch == "HEAD" || currBranch == branchName {
-			util.StatusMessage(util.VERBOSITY_VERBOSE, "Updating repository...\n")
-			err = r.updateRepo(branchName)
-			if err == nil {
-				util.StatusMessage(util.VERBOSITY_VERBOSE, "Update successful!\n")
-				return exists, true, err
-			} else {
-				util.StatusMessage(util.VERBOSITY_VERBOSE, "Update failed!\n")
-				if !force {
-					return exists, false, err
-				}
-			}
-		}
-
-		filename, err := r.saveLocalDiff()
-		if err != nil {
-			return exists, false, err
-		}
-		wd, _ := os.Getwd()
-		filename, _ = filepath.Rel(wd, filename)
-
-		util.StatusMessage(util.VERBOSITY_DEFAULT, "Saved local diff: "+
-			"\"%s\"\n", filename)
-
-		err = r.cleanupRepo(branchName)
-		if err != nil {
-			return exists, false, err
-		}
-
-	} else {
-		// fresh or updating was unsuccessfull and force was given...
-		err = r.downloadRepo(branchName)
-		if err != nil {
-			return exists, false, err
-		}
-	}
-
-	return exists, true, nil
-}
-
-func (r *Repo) UpdateDesc() ([]*Repo, bool, error) {
-	var err error
-
-	if r.updated {
-		return nil, false, nil
-	}
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "[%s]:\n", r.Name())
-
-	if err = r.DownloadDesc(); err != nil {
-		return nil, false, err
-	}
-
-	_, repos, err := r.ReadDesc()
-	if err != nil {
-		fmt.Printf("ReadDesc: %v\n", err)
-		return nil, false, err
-	}
-
-	r.updated = true
-
-	return repos, true, nil
-}
-
-// Download the repository description.
-func (r *Repo) DownloadDesc() error {
-	dl := r.downloader
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Downloading "+
-		"repository description\n")
-
-	// Configuration path
-	cpath := r.repoFilePath()
-	if util.NodeNotExist(cpath) {
-		if err := os.MkdirAll(cpath, REPO_DEFAULT_PERMS); err != nil {
-			return util.NewNewtError(err.Error())
-		}
-	}
-
-	dl.SetBranch("master")
-	if err := dl.FetchFile(REPO_FILE_NAME,
-		cpath+"/"+REPO_FILE_NAME); err != nil {
-		util.StatusMessage(util.VERBOSITY_VERBOSE, "Download failed\n")
-		return err
-	}
-
-	// also create a directory to save diffs for sync
-	cpath = r.patchesFilePath()
-	if util.NodeNotExist(cpath) {
-		if err := os.MkdirAll(cpath, REPO_DEFAULT_PERMS); err != nil {
-			return util.NewNewtError(err.Error())
-		}
-	}
-
-	util.StatusMessage(util.VERBOSITY_VERBOSE, "Download successful!\n")
-
-	return nil
-}
-
-func (r *Repo) readDepRepos(v *viper.Viper) ([]*Repo, error) {
-	rdesc := r.rdesc
-	repos := []*Repo{}
-
-	branch, _, ok := rdesc.Match(r)
-	if !ok {
-		// No matching branch, barf!
-		return nil, util.NewNewtError(fmt.Sprintf("No "+
-			"matching branch for %s repo", r.Name()))
-	}
-
-	repoTag := fmt.Sprintf("%s.repositories", branch)
-
-	repoList := v.GetStringMap(repoTag)
-	for repoName, repoItf := range repoList {
-		repoVars := cast.ToStringMapString(repoItf)
-
-		dl, err := downloader.LoadDownloader(repoName, repoVars)
-		if err != nil {
-			return nil, err
-		}
-
-		rversreq := repoVars["vers"]
-		newRepo, err := NewRepo(repoName, rversreq, dl)
-		if err != nil {
-			return nil, err
-		}
-
-		rd, err := NewRepoDependency(repoName, rversreq)
-		if err != nil {
-			return nil, err
-		}
-		rd.Storerepo = newRepo
-
-		r.AddDependency(rd)
-
-		repos = append(repos, newRepo)
-	}
-	return repos, nil
-}
-
-func (r *Repo) ReadDesc() (*RepoDesc, []*Repo, error) {
-	if util.NodeNotExist(r.repoFilePath() + REPO_FILE_NAME) {
-		return nil, nil,
-			util.NewNewtError("No configuration exists for repository " + r.name)
-	}
-
-	v, err := util.ReadConfig(r.repoFilePath(),
-		strings.TrimSuffix(REPO_FILE_NAME, ".yml"))
-	if err != nil {
-		return nil, nil, err
-	}
-
-	name := v.GetString("repo.name")
-	versMap := v.GetStringMapString("repo.versions")
-
-	rdesc, err := NewRepoDesc(name, versMap)
-	if err != nil {
-		return nil, nil, err
-	}
-	r.rdesc = rdesc
-
-	repos, err := r.readDepRepos(v)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	// Read the newt version compatibility map.
-	r.ncMap, err = compat.ReadNcMap(v)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	return rdesc, repos, nil
-}
-
-func (r *Repo) Init(repoName string, rversreq string, d downloader.Downloader) error {
-	var err error
-
-	r.name = repoName
-	r.downloader = d
-	r.deps = []*RepoDependency{}
-	r.versreq, err = LoadVersionMatches(rversreq)
-	if err != nil {
-		return err
-	}
-
-	path := interfaces.GetProject().Path()
-
-	if r.local {
-		r.localPath = filepath.ToSlash(filepath.Clean(path))
-	} else {
-		r.localPath = filepath.ToSlash(filepath.Clean(path + "/" + REPOS_DIR + "/" + r.name))
-	}
-
-	return nil
-}
-
-func (r *Repo) CheckNewtCompatibility(rvers *Version, nvers newtutil.Version) (
-	compat.NewtCompatCode, string) {
-
-	// If this repo doesn't have a newt compatibility map, just assume there is
-	// no incompatibility.
-	if len(r.ncMap) == 0 {
-		return compat.NEWT_COMPAT_GOOD, ""
-	}
-
-	rnuver := rvers.ToNuVersion()
-	tbl, ok := r.ncMap[rnuver]
-	if !ok {
-		// Unknown repo version.
-		return compat.NEWT_COMPAT_WARN,
-			"Repo version missing from compatibility map"
-	}
-
-	code, text := tbl.CheckNewtVer(nvers)
-	if code == compat.NEWT_COMPAT_GOOD {
-		return code, text
-	}
-
-	return code, fmt.Sprintf("This version of newt (%s) is incompatible with "+
-		"your version of the %s repo (%s); %s",
-		nvers.String(), r.name, rnuver.String(), text)
-}
-
-func NewRepo(repoName string, rversreq string, d downloader.Downloader) (*Repo, error) {
-	r := &Repo{
-		local: false,
-	}
-
-	if err := r.Init(repoName, rversreq, d); err != nil {
-		return nil, err
-	}
-
-	return r, nil
-}
-
-func NewLocalRepo(repoName string) (*Repo, error) {
-	r := &Repo{
-		local: true,
-	}
-
-	if err := r.Init(repoName, "", nil); err != nil {
-		return nil, err
-	}
-
-	return r, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/repo/version.go
----------------------------------------------------------------------
diff --git a/newt/repo/version.go b/newt/repo/version.go
deleted file mode 100644
index bbf5b56..0000000
--- a/newt/repo/version.go
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package repo
-
-import (
-	"fmt"
-	"regexp"
-	"strconv"
-	"strings"
-
-	"mynewt.apache.org/newt/newt/interfaces"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/util"
-)
-
-const VERSION_FORMAT = "%d.%d.%d-%s"
-
-const (
-	VERSION_STABILITY_NONE   = "none"
-	VERSION_STABILITY_STABLE = "stable"
-	VERSION_STABILITY_DEV    = "dev"
-	VERSION_STABILITY_LATEST = "latest"
-)
-
-type VersionMatch struct {
-	compareType string
-	Vers        *Version
-}
-
-type Version struct {
-	major     int64
-	minor     int64
-	revision  int64
-	stability string
-}
-
-func (vm *VersionMatch) CompareType() string {
-	return vm.compareType
-}
-
-func (vm *VersionMatch) Version() interfaces.VersionInterface {
-	return vm.Vers
-}
-
-func (vm *VersionMatch) String() string {
-	return vm.compareType + vm.Vers.String()
-}
-
-func (v *Version) Major() int64 {
-	return v.major
-}
-
-func (v *Version) Minor() int64 {
-	return v.minor
-}
-
-func (v *Version) Revision() int64 {
-	return v.revision
-}
-
-func (v *Version) Stability() string {
-	return v.stability
-}
-
-func (v *Version) CompareVersions(vers1 interfaces.VersionInterface,
-	vers2 interfaces.VersionInterface) int64 {
-	if r := vers1.Major() - vers2.Major(); r != 0 {
-		return r
-	}
-
-	if r := vers1.Minor() - vers2.Minor(); r != 0 {
-		return r
-	}
-
-	if r := vers1.Revision() - vers2.Revision(); r != 0 {
-		return r
-	}
-
-	return 0
-}
-
-func (v *Version) SatisfiesVersion(versMatches []interfaces.VersionReqInterface) bool {
-	if versMatches == nil {
-		return true
-	}
-
-	for _, match := range versMatches {
-		r := v.CompareVersions(match.Version(), v)
-		switch match.CompareType() {
-		case "<":
-			if r <= 0 {
-				return false
-			}
-		case "<=":
-			if r < 0 {
-				return false
-			}
-		case ">":
-			if r >= 0 {
-				return false
-			}
-		case ">=":
-			if r > 0 {
-				return false
-			}
-		case "==":
-			if r != 0 {
-				return false
-			}
-		}
-
-		if match.Version().Stability() != v.Stability() {
-			return false
-		}
-	}
-
-	return true
-}
-
-func (vers *Version) String() string {
-	return fmt.Sprintf(VERSION_FORMAT, vers.Major(), vers.Minor(), vers.Revision(), vers.Stability())
-}
-
-func (vers *Version) ToNuVersion() newtutil.Version {
-	return newtutil.Version{
-		Major:    vers.major,
-		Minor:    vers.minor,
-		Revision: vers.revision,
-	}
-}
-
-func LoadVersion(versStr string) (*Version, error) {
-	var err error
-
-	// Split to get stability level first
-	sparts := strings.Split(versStr, "-")
-	stability := VERSION_STABILITY_NONE
-	if len(sparts) > 1 {
-		stability = strings.Trim(sparts[1], " ")
-		switch stability {
-		case VERSION_STABILITY_STABLE:
-			fallthrough
-		case VERSION_STABILITY_DEV:
-			fallthrough
-		case VERSION_STABILITY_LATEST:
-		default:
-			return nil, util.NewNewtError(
-				fmt.Sprintf("Unknown stability (%s) in version ", stability) + versStr)
-		}
-	}
-
-	parts := strings.Split(sparts[0], ".")
-	if len(parts) > 3 {
-		return nil, util.NewNewtError(fmt.Sprintf("Invalid version string: %s", versStr))
-	}
-
-	if strings.Trim(parts[0], " ") == "" || strings.Trim(parts[0], " ") == "none" {
-		return nil, nil
-	}
-
-	vers := &Version{}
-	vers.stability = stability
-
-	// convert first string to an int
-	if vers.major, err = strconv.ParseInt(parts[0], 10, 64); err != nil {
-		return nil, util.NewNewtError(err.Error())
-	}
-	if len(parts) >= 2 {
-		if vers.minor, err = strconv.ParseInt(parts[1], 10, 64); err != nil {
-			return nil, util.NewNewtError(err.Error())
-		}
-	}
-	if len(parts) == 3 {
-		if vers.revision, err = strconv.ParseInt(parts[2], 10, 64); err != nil {
-			return nil, util.NewNewtError(err.Error())
-		}
-	}
-
-	return vers, nil
-}
-
-func NewVersion(major int64, minor int64, rev int64) *Version {
-	vers := &Version{}
-
-	vers.major = major
-	vers.minor = minor
-	vers.revision = rev
-
-	return vers
-}
-
-// Parse a set of version string constraints on a dependency.
-// This function
-// The version string contains a list of version constraints in the following format:
-//    - <comparison><version>
-// Where <comparison> can be any one of the following comparison
-//   operators: <=, <, >, >=, ==
-// And <version> is specified in the form: X.Y.Z where X, Y and Z are all
-// int64 types in decimal form
-func LoadVersionMatches(versStr string) ([]interfaces.VersionReqInterface, error) {
-	var err error
-
-	versMatches := []interfaces.VersionReqInterface{}
-
-	re, err := regexp.Compile(`(<=|>=|==|>|<)([\d\.]+)`)
-	if err != nil {
-		return nil, err
-	}
-
-	matches := re.FindAllStringSubmatch(versStr, -1)
-	if matches != nil {
-		for _, match := range matches {
-			vm := &VersionMatch{}
-			vm.compareType = match[1]
-			if vm.Vers, err = LoadVersion(match[2]); err != nil {
-				return nil, err
-			}
-
-			if vm.Vers != nil {
-				versMatches = append(versMatches, vm)
-			}
-		}
-	} else {
-		vm := &VersionMatch{}
-		vm.compareType = "=="
-		if vm.Vers, err = LoadVersion(versStr); err != nil {
-			return nil, err
-		}
-
-		if vm.Vers != nil {
-			versMatches = append(versMatches, vm)
-		}
-	}
-
-	if len(versMatches) == 0 {
-		versMatches = nil
-	}
-
-	return versMatches, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/resolve/resolve.go
----------------------------------------------------------------------
diff --git a/newt/resolve/resolve.go b/newt/resolve/resolve.go
deleted file mode 100644
index 6e03592..0000000
--- a/newt/resolve/resolve.go
+++ /dev/null
@@ -1,626 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package resolve
-
-import (
-	"fmt"
-	"sort"
-	"strings"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/newt/flash"
-	"mynewt.apache.org/newt/newt/newtutil"
-	"mynewt.apache.org/newt/newt/pkg"
-	"mynewt.apache.org/newt/newt/project"
-	"mynewt.apache.org/newt/newt/syscfg"
-	"mynewt.apache.org/newt/util"
-)
-
-type Resolver struct {
-	apis             map[string]*ResolvePackage
-	pkgMap           map[*pkg.LocalPackage]*ResolvePackage
-	injectedSettings map[string]string
-	flashMap         flash.FlashMap
-	cfg              syscfg.Cfg
-}
-
-type ResolveDep struct {
-	// Package being depended on.
-	Rpkg *ResolvePackage
-
-	// Name of API that generated the dependency; "" if a hard dependency.
-	Api string
-
-	// XXX: slice of syscfg settings that generated this dependency.
-}
-
-type ResolvePackage struct {
-	Lpkg *pkg.LocalPackage
-	Deps map[*ResolvePackage]*ResolveDep
-
-	// Keeps track of API requirements and whether they are satisfied.
-	reqApiMap map[string]bool
-
-	depsResolved  bool
-	apisSatisfied bool
-}
-
-type ResolveSet struct {
-	// Parent resoluion.  Contains this ResolveSet.
-	Res *Resolution
-
-	// All seed pacakges and their dependencies.
-	Rpkgs []*ResolvePackage
-}
-
-// The result of resolving a target's configuration, APIs, and dependencies.
-type Resolution struct {
-	Cfg             syscfg.Cfg
-	ApiMap          map[string]*ResolvePackage
-	UnsatisfiedApis map[string][]*ResolvePackage
-
-	LpkgRpkgMap map[*pkg.LocalPackage]*ResolvePackage
-
-	// Contains all dependencies; union of loader and app.
-	MasterSet *ResolveSet
-
-	LoaderSet *ResolveSet
-	AppSet    *ResolveSet
-}
-
-func newResolver(
-	seedPkgs []*pkg.LocalPackage,
-	injectedSettings map[string]string,
-	flashMap flash.FlashMap) *Resolver {
-
-	r := &Resolver{
-		apis:             map[string]*ResolvePackage{},
-		pkgMap:           map[*pkg.LocalPackage]*ResolvePackage{},
-		injectedSettings: injectedSettings,
-		flashMap:         flashMap,
-		cfg:              syscfg.NewCfg(),
-	}
-
-	if injectedSettings == nil {
-		r.injectedSettings = map[string]string{}
-	}
-
-	for _, lpkg := range seedPkgs {
-		r.addPkg(lpkg)
-	}
-
-	return r
-}
-
-func newResolution() *Resolution {
-	r := &Resolution{
-		ApiMap:          map[string]*ResolvePackage{},
-		UnsatisfiedApis: map[string][]*ResolvePackage{},
-	}
-
-	r.MasterSet = &ResolveSet{Res: r}
-	r.LoaderSet = &ResolveSet{Res: r}
-	r.AppSet = &ResolveSet{Res: r}
-
-	return r
-}
-
-func NewResolvePkg(lpkg *pkg.LocalPackage) *ResolvePackage {
-	return &ResolvePackage{
-		Lpkg:      lpkg,
-		reqApiMap: map[string]bool{},
-		Deps:      map[*ResolvePackage]*ResolveDep{},
-	}
-}
-
-func (r *Resolver) resolveDep(dep *pkg.Dependency, depender string) (*pkg.LocalPackage, error) {
-	proj := project.GetProject()
-
-	if proj.ResolveDependency(dep) == nil {
-		return nil, util.FmtNewtError("Could not resolve package dependency: "+
-			"%s; depender: %s", dep.String(), depender)
-	}
-	lpkg := proj.ResolveDependency(dep).(*pkg.LocalPackage)
-
-	return lpkg, nil
-}
-
-// @return                      true if rhe package's dependency list was
-//                                  modified.
-func (rpkg *ResolvePackage) AddDep(apiPkg *ResolvePackage, api string) bool {
-	if dep := rpkg.Deps[apiPkg]; dep != nil {
-		if dep.Api != "" && api == "" {
-			dep.Api = api
-			return true
-		} else {
-			return false
-		}
-	} else {
-		rpkg.Deps[apiPkg] = &ResolveDep{
-			Rpkg: apiPkg,
-			Api:  api,
-		}
-		return true
-	}
-}
-
-func (r *Resolver) rpkgSlice() []*ResolvePackage {
-	rpkgs := make([]*ResolvePackage, len(r.pkgMap))
-
-	i := 0
-	for _, rpkg := range r.pkgMap {
-		rpkgs[i] = rpkg
-		i++
-	}
-
-	return rpkgs
-}
-
-func (r *Resolver) apiSlice() []string {
-	apis := make([]string, len(r.apis))
-
-	i := 0
-	for api, _ := range r.apis {
-		apis[i] = api
-		i++
-	}
-
-	return apis
-}
-
-// @return ResolvePackage		The rpkg corresponding to the specified lpkg.
-//                                  This is a new package if a package was
-//                                  added; old if it was already present.
-//         bool					true if this is a new package.
-func (r *Resolver) addPkg(lpkg *pkg.LocalPackage) (*ResolvePackage, bool) {
-	if rpkg := r.pkgMap[lpkg]; rpkg != nil {
-		return rpkg, false
-	}
-
-	rpkg := NewResolvePkg(lpkg)
-	r.pkgMap[lpkg] = rpkg
-	return rpkg, true
-}
-
-// @return bool                 true if this is a new API.
-func (r *Resolver) addApi(apiString string, rpkg *ResolvePackage) bool {
-	curRpkg := r.apis[apiString]
-	if curRpkg == nil {
-		r.apis[apiString] = rpkg
-		return true
-	} else {
-		if curRpkg != rpkg {
-			util.StatusMessage(util.VERBOSITY_QUIET,
-				"Warning: API conflict: %s (%s <-> %s)\n", apiString,
-				curRpkg.Lpkg.Name(), rpkg.Lpkg.Name())
-		}
-		return false
-	}
-}
-
-// Searches for a package which can satisfy bpkg's API requirement.  If such a
-// package is found, bpkg's API requirement is marked as satisfied, and the
-// package is added to bpkg's dependency list.
-//
-// @return bool                 true if the API is now satisfied.
-func (r *Resolver) satisfyApi(rpkg *ResolvePackage, reqApi string) bool {
-	depRpkg := r.apis[reqApi]
-	if depRpkg == nil {
-		// Insert nil to indicate an unsatisfied API.
-		r.apis[reqApi] = nil
-		return false
-	}
-
-	rpkg.reqApiMap[reqApi] = true
-
-	// This package now has a new unresolved dependency.
-	rpkg.depsResolved = false
-
-	log.Debugf("API requirement satisfied; pkg=%s API=(%s, %s)",
-		rpkg.Lpkg.Name(), reqApi, depRpkg.Lpkg.FullName())
-
-	return true
-}
-
-// @return bool                 true if a new dependency was detected as a
-//                                  result of satisfying an API for this
-//                                  package.
-func (r *Resolver) satisfyApis(rpkg *ResolvePackage) bool {
-	// Assume all this package's APIs are satisfied and that no new
-	// dependencies will be detected.
-	rpkg.apisSatisfied = true
-	newDeps := false
-
-	features := r.cfg.FeaturesForLpkg(rpkg.Lpkg)
-
-	// Determine if any of the package's API requirements can now be satisfied.
-	// If so, another full iteration is required.
-	reqApis := newtutil.GetStringSliceFeatures(rpkg.Lpkg.PkgV, features,
-		"pkg.req_apis")
-	for _, reqApi := range reqApis {
-		reqStatus := rpkg.reqApiMap[reqApi]
-		if !reqStatus {
-			apiSatisfied := r.satisfyApi(rpkg, reqApi)
-			if apiSatisfied {
-				// An API was satisfied; the package now has a new dependency
-				// that needs to be resolved.
-				newDeps = true
-				reqStatus = true
-			} else {
-				rpkg.reqApiMap[reqApi] = false
-				rpkg.apisSatisfied = false
-			}
-		}
-	}
-
-	return newDeps
-}
-
-// @return bool                 True if this this function changed the resolver
-//                                  state; another full iteration is required
-//                                  in this case.
-//         error                non-nil on failure.
-func (r *Resolver) loadDepsForPkg(rpkg *ResolvePackage) (bool, error) {
-	features := r.cfg.FeaturesForLpkg(rpkg.Lpkg)
-
-	changed := false
-	newDeps := newtutil.GetStringSliceFeatures(rpkg.Lpkg.PkgV, features,
-		"pkg.deps")
-	depender := rpkg.Lpkg.Name()
-	for _, newDepStr := range newDeps {
-		newDep, err := pkg.NewDependency(rpkg.Lpkg.Repo(), newDepStr)
-		if err != nil {
-			return false, err
-		}
-
-		lpkg, err := r.resolveDep(newDep, depender)
-		if err != nil {
-			return false, err
-		}
-
-		depRpkg, _ := r.addPkg(lpkg)
-		if rpkg.AddDep(depRpkg, "") {
-			changed = true
-		}
-	}
-
-	// Determine if this package supports any APIs that we haven't seen
-	// yet.  If so, another full iteration is required.
-	apis := newtutil.GetStringSliceFeatures(rpkg.Lpkg.PkgV, features,
-		"pkg.apis")
-	for _, api := range apis {
-		if r.addApi(api, rpkg) {
-			changed = true
-		}
-	}
-
-	return changed, nil
-}
-
-// Attempts to resolve all of a build package's dependencies, APIs, and
-// required APIs.  This function should be called repeatedly until the package
-// is fully resolved.
-//
-// If a dependency is resolved by this function, the new dependency needs to be
-// processed.  The caller should attempt to resolve all packages again.
-//
-// @return bool                 true if >=1 dependencies were resolved.
-//         error                non-nil on failure.
-func (r *Resolver) resolvePkg(rpkg *ResolvePackage) (bool, error) {
-	var err error
-	newDeps := false
-
-	if !rpkg.depsResolved {
-		newDeps, err = r.loadDepsForPkg(rpkg)
-		if err != nil {
-			return false, err
-		}
-
-		rpkg.depsResolved = !newDeps
-	}
-
-	if !rpkg.apisSatisfied {
-		newApiDep := r.satisfyApis(rpkg)
-		if newApiDep {
-			newDeps = true
-		}
-	}
-
-	return newDeps, nil
-}
-
-// @return                      changed,err
-func (r *Resolver) reloadCfg() (bool, error) {
-	lpkgs := RpkgSliceToLpkgSlice(r.rpkgSlice())
-	apis := r.apiSlice()
-
-	// Determine which features have been detected so far.  The feature map is
-	// required for reloading syscfg, as features may unlock additional
-	// settings.
-	features := r.cfg.Features()
-	cfg, err := syscfg.Read(lpkgs, apis, r.injectedSettings, features,
-		r.flashMap)
-	if err != nil {
-		return false, err
-	}
-
-	changed := false
-	for k, v := range cfg.Settings {
-		oldval, ok := r.cfg.Settings[k]
-		if !ok || len(oldval.History) != len(v.History) {
-			r.cfg = cfg
-			changed = true
-		}
-	}
-
-	return changed, nil
-}
-
-func (r *Resolver) resolveDepsOnce() (bool, error) {
-	// Circularly resolve dependencies, APIs, and required APIs until no new
-	// ones exist.
-	newDeps := false
-	for {
-		reprocess := false
-		for _, rpkg := range r.pkgMap {
-			newDeps, err := r.resolvePkg(rpkg)
-			if err != nil {
-				return false, err
-			}
-
-			if newDeps {
-				// The new dependencies need to be processed.  Iterate again
-				// after this iteration completes.
-				reprocess = true
-			}
-		}
-
-		if !reprocess {
-			break
-		}
-	}
-
-	return newDeps, nil
-}
-
-func (r *Resolver) resolveDeps() ([]*ResolvePackage, error) {
-	if _, err := r.resolveDepsOnce(); err != nil {
-		return nil, err
-	}
-
-	// Satisfy API requirements.
-	if err := r.resolveApiDeps(); err != nil {
-		return nil, err
-	}
-
-	rpkgs := r.rpkgSlice()
-	return rpkgs, nil
-}
-
-func (r *Resolver) resolveDepsAndCfg() error {
-	if _, err := r.resolveDepsOnce(); err != nil {
-		return err
-	}
-
-	for {
-		cfgChanged, err := r.reloadCfg()
-		if err != nil {
-			return err
-		}
-		if cfgChanged {
-			// A new supported feature was discovered.  It is impossible
-			// to determine what new dependency and API requirements are
-			// generated as a result.  All packages need to be
-			// reprocessed.
-			for _, rpkg := range r.pkgMap {
-				rpkg.depsResolved = false
-				rpkg.apisSatisfied = false
-			}
-		}
-
-		newDeps, err := r.resolveDepsOnce()
-		if err != nil {
-			return err
-		}
-
-		if !newDeps && !cfgChanged {
-			break
-		}
-	}
-
-	// Satisfy API requirements.
-	if err := r.resolveApiDeps(); err != nil {
-		return err
-	}
-
-	// Log the final syscfg.
-	r.cfg.Log()
-
-	return nil
-}
-
-// Transforms each package's required APIs to hard dependencies.  That is, this
-// function determines which package supplies each required API, and adds the
-// corresponding dependecy to each package which requires the API.
-func (r *Resolver) resolveApiDeps() error {
-	for _, rpkg := range r.pkgMap {
-		for api, _ := range rpkg.reqApiMap {
-			apiPkg := r.apis[api]
-			if apiPkg != nil {
-				rpkg.AddDep(apiPkg, api)
-			}
-		}
-	}
-
-	return nil
-}
-
-func (r *Resolver) apiResolution() (
-	map[string]*ResolvePackage,
-	map[string][]*ResolvePackage) {
-
-	apiMap := make(map[string]*ResolvePackage, len(r.apis))
-	anyUnsatisfied := false
-	for api, rpkg := range r.apis {
-		if rpkg == nil {
-			anyUnsatisfied = true
-		} else {
-			apiMap[api] = rpkg
-		}
-	}
-
-	unsatisfied := map[string][]*ResolvePackage{}
-	if anyUnsatisfied {
-		for _, rpkg := range r.pkgMap {
-			for api, satisfied := range rpkg.reqApiMap {
-				if !satisfied {
-					slice := unsatisfied[api]
-					slice = append(slice, rpkg)
-					unsatisfied[api] = slice
-				}
-			}
-		}
-	}
-
-	return apiMap, unsatisfied
-}
-
-func ResolveFull(
-	loaderSeeds []*pkg.LocalPackage,
-	appSeeds []*pkg.LocalPackage,
-	injectedSettings map[string]string,
-	flashMap flash.FlashMap) (*Resolution, error) {
-
-	// First, calculate syscfg and determine which package provides each
-	// required API.  Syscfg and APIs are project-wide; that is, they are
-	// calculated across the aggregate of all app packages and loader packages
-	// (if any).  The dependency graph for the entire set of packages gets
-	// calculated here as a byproduct.
-
-	allSeeds := append(loaderSeeds, appSeeds...)
-	r := newResolver(allSeeds, injectedSettings, flashMap)
-
-	if err := r.resolveDepsAndCfg(); err != nil {
-		return nil, err
-	}
-
-	res := newResolution()
-	res.Cfg = r.cfg
-	if err := r.resolveApiDeps(); err != nil {
-		return nil, err
-	}
-
-	// Determine which package satisfies each API and which APIs are
-	// unsatisfied.
-	apiMap := map[string]*ResolvePackage{}
-	apiMap, res.UnsatisfiedApis = r.apiResolution()
-
-	res.LpkgRpkgMap = r.pkgMap
-
-	res.MasterSet.Rpkgs = r.rpkgSlice()
-
-	// If there is no loader, then the set of all packages is just the app
-	// packages.  We already resolved the necessary dependency information when
-	// syscfg was calculated above.
-	if loaderSeeds == nil {
-		res.AppSet.Rpkgs = r.rpkgSlice()
-		res.LoaderSet = nil
-		return res, nil
-	}
-
-	// Otherwise, we need to resolve dependencies separately for:
-	// 1. The set of loader pacakges, and
-	// 2. The set of app packages.
-	//
-	// These need to be resolved separately so that it is possible later to
-	// determine which packages need to be shared between loader and app.
-
-	// It is OK if the app requires an API that is supplied by the loader.
-	// Ensure each set of packages has access to the API-providers.
-	for _, rpkg := range apiMap {
-		loaderSeeds = append(loaderSeeds, rpkg.Lpkg)
-		appSeeds = append(appSeeds, rpkg.Lpkg)
-	}
-
-	// Resolve loader dependencies.
-	r = newResolver(loaderSeeds, injectedSettings, flashMap)
-	r.cfg = res.Cfg
-
-	var err error
-
-	res.LoaderSet.Rpkgs, err = r.resolveDeps()
-	if err != nil {
-		return nil, err
-	}
-
-	// Resolve app dependencies.  The app automtically gets all the packages
-	// from the loader except for the loader-app-package.
-	for _, rpkg := range res.LoaderSet.Rpkgs {
-		if rpkg.Lpkg.Type() != pkg.PACKAGE_TYPE_APP {
-			appSeeds = append(appSeeds, rpkg.Lpkg)
-		}
-	}
-
-	r = newResolver(appSeeds, injectedSettings, flashMap)
-	r.cfg = res.Cfg
-
-	res.AppSet.Rpkgs, err = r.resolveDeps()
-	if err != nil {
-		return nil, err
-	}
-
-	return res, nil
-}
-
-func (res *Resolution) ErrorText() string {
-	str := ""
-
-	if len(res.UnsatisfiedApis) > 0 {
-		apiNames := make([]string, 0, len(res.UnsatisfiedApis))
-		for api, _ := range res.UnsatisfiedApis {
-			apiNames = append(apiNames, api)
-		}
-		sort.Strings(apiNames)
-
-		str += "Unsatisfied APIs detected:\n"
-		for _, api := range apiNames {
-			str += fmt.Sprintf("    * %s, required by: ", api)
-
-			rpkgs := res.UnsatisfiedApis[api]
-			pkgNames := make([]string, len(rpkgs))
-			for i, rpkg := range rpkgs {
-				pkgNames[i] = rpkg.Lpkg.Name()
-			}
-			sort.Strings(pkgNames)
-
-			str += strings.Join(pkgNames, ", ")
-			str += "\n"
-		}
-	}
-
-	str += res.Cfg.ErrorText()
-
-	return strings.TrimSpace(str)
-}
-
-func (res *Resolution) WarningText() string {
-	return res.Cfg.WarningText()
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/resolve/resolveutil.go
----------------------------------------------------------------------
diff --git a/newt/resolve/resolveutil.go b/newt/resolve/resolveutil.go
deleted file mode 100644
index 23884d3..0000000
--- a/newt/resolve/resolveutil.go
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*  http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
- */
-
-package resolve
-
-import (
-	"sort"
-
-	"mynewt.apache.org/newt/newt/pkg"
-)
-
-type rpkgSorter struct {
-	pkgs []*ResolvePackage
-}
-
-func (s rpkgSorter) Len() int {
-	return len(s.pkgs)
-}
-func (s rpkgSorter) Swap(i, j int) {
-	s.pkgs[i], s.pkgs[j] = s.pkgs[j], s.pkgs[i]
-}
-func (s rpkgSorter) Less(i, j int) bool {
-	return s.pkgs[i].Lpkg.FullName() < s.pkgs[j].Lpkg.FullName()
-}
-
-func SortResolvePkgs(pkgs []*ResolvePackage) []*ResolvePackage {
-	sorter := rpkgSorter{
-		pkgs: make([]*ResolvePackage, 0, len(pkgs)),
-	}
-
-	for _, p := range pkgs {
-		sorter.pkgs = append(sorter.pkgs, p)
-	}
-
-	sort.Sort(sorter)
-	return sorter.pkgs
-}
-
-type rdepSorter struct {
-	deps []*ResolveDep
-}
-
-func (s rdepSorter) Len() int {
-	return len(s.deps)
-}
-func (s rdepSorter) Swap(i, j int) {
-	s.deps[i], s.deps[j] = s.deps[j], s.deps[i]
-}
-
-func (s rdepSorter) Less(i, j int) bool {
-	return s.deps[i].Rpkg.Lpkg.FullName() < s.deps[j].Rpkg.Lpkg.FullName()
-}
-func SortResolveDeps(deps []*ResolveDep) []*ResolveDep {
-	sorter := rdepSorter{
-		deps: make([]*ResolveDep, 0, len(deps)),
-	}
-
-	for _, d := range deps {
-		sorter.deps = append(sorter.deps, d)
-	}
-
-	sort.Sort(sorter)
-	return sorter.deps
-}
-
-func RpkgSliceToLpkgSlice(rpkgs []*ResolvePackage) []*pkg.LocalPackage {
-	lpkgs := make([]*pkg.LocalPackage, len(rpkgs))
-
-	i := 0
-	for _, rpkg := range rpkgs {
-		lpkgs[i] = rpkg.Lpkg
-		i++
-	}
-
-	return lpkgs
-}



[10/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
deleted file mode 100644
index e52cd0d..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
+++ /dev/null
@@ -1,1427 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,darwin
-
-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, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	use(_p0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
-	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-	r = int(r0)
-	w = int(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path1)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(path2)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
-	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
-	size = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	newoffset = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
-	r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	sec = int32(r0)
-	usec = int32(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
deleted file mode 100644
index 9863ef9..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ /dev/null
@@ -1,1427 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm64,darwin
-
-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, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	use(_p0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
-	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-	r = int(r0)
-	w = int(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path1)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(path2)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
-	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
-	size = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	newoffset = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
-	r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	sec = int64(r0)
-	usec = int32(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}


[52/67] [abbrv] incubator-mynewt-newtmgr git commit: nmxact - Generic adv predicate during scanning.

Posted by cc...@apache.org.
nmxact - Generic adv predicate during scanning.

If the client doesn't know the address of the peer it wants to connect
to, it can supply a predicate which gets called for each incoming
advertisement.  If the callback returns true, nmxact will connect to the
sender of the corresponding advertisement.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/06f33c03
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/06f33c03
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/06f33c03

Branch: refs/heads/master
Commit: 06f33c03ececeac75b39fabea922d657958a6118
Parents: 4bcaec2
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Mar 28 11:11:51 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 nmxact/bledefs/bledefs.go      | 21 +++++++++----
 nmxact/nmble/ble_fsm.go        | 60 +++++++++++++++++++++++++++----------
 nmxact/nmble/ble_oic_sesn.go   |  2 +-
 nmxact/nmble/ble_plain_sesn.go |  2 +-
 nmxact/sesn/sesn_cfg.go        | 28 ++++++++++++++++-
 5 files changed, 90 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/06f33c03/nmxact/bledefs/bledefs.go
----------------------------------------------------------------------
diff --git a/nmxact/bledefs/bledefs.go b/nmxact/bledefs/bledefs.go
index 5b12d0a..3bb2772 100644
--- a/nmxact/bledefs/bledefs.go
+++ b/nmxact/bledefs/bledefs.go
@@ -147,11 +147,6 @@ func (bd *BleDev) String() string {
 		bd.Addr.String())
 }
 
-type BlePeerSpec struct {
-	Name string
-	Dev  BleDev // Only used if name not present.
-}
-
 type BleScanFilterPolicy int
 
 const (
@@ -257,3 +252,19 @@ func (a *BleAdvEventType) UnmarshalJSON(data []byte) error {
 	*a, err = BleAdvEventTypeFromString(s)
 	return err
 }
+
+type BleAdvReport struct {
+	// These fields are always present.
+	EventType BleAdvEventType
+	Sender    BleDev
+	Rssi      int8
+	Data      []byte
+
+	// These fields are only present if the sender included them in its
+	// advertisement.
+	Flags          uint8  // 0 if not present.
+	Name           string // "" if not present.
+	NameIsComplete bool   // false if not present.
+}
+
+type BleAdvPredicate func(adv BleAdvReport) bool

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/06f33c03/nmxact/nmble/ble_fsm.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_fsm.go b/nmxact/nmble/ble_fsm.go
index 88ce90e..411ce59 100644
--- a/nmxact/nmble/ble_fsm.go
+++ b/nmxact/nmble/ble_fsm.go
@@ -11,6 +11,7 @@ import (
 	. "mynewt.apache.org/newt/nmxact/bledefs"
 	"mynewt.apache.org/newt/nmxact/nmp"
 	"mynewt.apache.org/newt/nmxact/nmxutil"
+	"mynewt.apache.org/newt/nmxact/sesn"
 )
 
 type BleSesnState int32
@@ -38,7 +39,7 @@ type BleDisconnectFn func(err error)
 type BleFsmParams struct {
 	Bx           *BleXport
 	OwnAddrType  BleAddrType
-	PeerSpec     BlePeerSpec
+	PeerSpec     sesn.BlePeerSpec
 	SvcUuid      BleUuid
 	ReqChrUuid   BleUuid
 	RspChrUuid   BleUuid
@@ -48,9 +49,9 @@ type BleFsmParams struct {
 
 type BleFsm struct {
 	bx           *BleXport
-	peerSpec     BlePeerSpec
 	ownAddrType  BleAddrType
-	peer         *BleDev
+	peerSpec     sesn.BlePeerSpec
+	peerDev      *BleDev
 	svcUuid      BleUuid
 	reqChrUuid   BleUuid
 	rspChrUuid   BleUuid
@@ -87,8 +88,14 @@ func NewBleFsm(p BleFsmParams) *BleFsm {
 		attMtu: DFLT_ATT_MTU,
 	}
 
-	if bf.peerSpec.Name == "" {
-		bf.peer = &bf.peerSpec.Dev
+	// The peer spec contains one of:
+	//     * Peer address;
+	//     * Predicate function to call during scanning.
+	// If a peer address is specified, fill in the peer field now so the
+	// scanning step can be skipped.  Otherwise, the peer field gets populated
+	// during scanning.
+	if bf.peerSpec.ScanPred == nil {
+		bf.peerDev = &bf.peerSpec.Dev
 	}
 
 	return bf
@@ -97,7 +104,7 @@ func NewBleFsm(p BleFsmParams) *BleFsm {
 func (bf *BleFsm) disconnectError(reason int) error {
 	str := fmt.Sprintf("BLE peer disconnected; "+
 		"reason=\"%s\" (%d) peer=%s handle=%d",
-		ErrCodeToString(reason), reason, bf.peer.String(), bf.connHandle)
+		ErrCodeToString(reason), reason, bf.peerDev.String(), bf.connHandle)
 	return nmxutil.NewBleSesnDisconnectError(reason, str)
 }
 
@@ -231,7 +238,7 @@ func (bf *BleFsm) connectListen(seq int) error {
 						str := fmt.Sprintf("BLE connection attempt failed; "+
 							"status=%s (%d) peer=%s",
 							ErrCodeToString(msg.Status), msg.Status,
-							bf.peer.String())
+							bf.peerDev.String())
 						log.Debugf(str)
 						bf.connChan <- nmxutil.NewBleHostError(msg.Status, str)
 						return
@@ -241,7 +248,7 @@ func (bf *BleFsm) connectListen(seq int) error {
 					if msg.Status == 0 {
 						bl.Acked = true
 						log.Debugf("BLE connection attempt succeeded; "+
-							"peer=%d handle=%d", bf.peer.String(),
+							"peer=%d handle=%d", bf.peerDev.String(),
 							msg.ConnHandle)
 						bf.connHandle = msg.ConnHandle
 						if err := bf.nmpRspListen(); err != nil {
@@ -253,7 +260,7 @@ func (bf *BleFsm) connectListen(seq int) error {
 						str := fmt.Sprintf("BLE connection attempt failed; "+
 							"status=%s (%d) peer=%s",
 							ErrCodeToString(msg.Status), msg.Status,
-							bf.peer.String())
+							bf.peerDev.String())
 						log.Debugf(str)
 						bf.connChan <- nmxutil.NewBleHostError(msg.Status, str)
 						return
@@ -341,8 +348,8 @@ func (bf *BleFsm) nmpRspListen() error {
 func (bf *BleFsm) connect() error {
 	r := NewBleConnectReq()
 	r.OwnAddrType = bf.ownAddrType
-	r.PeerAddrType = bf.peer.AddrType
-	r.PeerAddr = bf.peer.Addr
+	r.PeerAddrType = bf.peerDev.AddrType
+	r.PeerAddr = bf.peerDev.Addr
 
 	if err := bf.connectListen(r.Seq); err != nil {
 		return err
@@ -372,15 +379,29 @@ func (bf *BleFsm) scan() error {
 
 	abortChan := make(chan struct{}, 1)
 
+	// This function gets called for each incoming advertisement.
 	scanCb := func(evt *BleScanEvt) {
-		if evt.DataName == bf.peerSpec.Name {
-			bf.peer = &BleDev{
+		r := BleAdvReport{
+			EventType: evt.EventType,
+			Sender: BleDev{
 				AddrType: evt.AddrType,
 				Addr:     evt.Addr,
-			}
+			},
+			Rssi: evt.Rssi,
+			Data: evt.Data.Bytes,
+
+			Flags:          evt.DataFlags,
+			Name:           evt.DataName,
+			NameIsComplete: evt.DataNameIsComplete,
+		}
+
+		// Ask client if we should connect to this advertiser.
+		if bf.peerSpec.ScanPred(r) {
+			bf.peerDev = &r.Sender
 			abortChan <- struct{}{}
 		}
 	}
+
 	if err := scan(bf.bx, bl, r, abortChan, scanCb); err != nil {
 		return err
 	}
@@ -596,7 +617,14 @@ func (bf *BleFsm) Start() error {
 		switch state {
 		case SESN_STATE_UNCONNECTED:
 			var err error
-			if bf.peer == nil {
+
+			// Determine if we can immediately initiate a connection, or if we
+			// need to scan for a peer first.  If the client specified a peer
+			// address, or if we have already successfully scanned, we initiate
+			// a connection now.  Otherwise, we need to scan to determine which
+			// peer meets the specified scan criteria.
+			if bf.peerDev == nil {
+				// Peer not inferred yet.  Initiate scan.
 				cb := func() error { return bf.scan() }
 				err = bf.action(
 					SESN_STATE_UNCONNECTED,
@@ -604,6 +632,8 @@ func (bf *BleFsm) Start() error {
 					SESN_STATE_UNCONNECTED,
 					cb)
 			} else {
+				// We already know the address we want to connect to.  Initiate
+				// a connection.
 				cb := func() error { return bf.connect() }
 				err = bf.action(
 					SESN_STATE_UNCONNECTED,

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/06f33c03/nmxact/nmble/ble_oic_sesn.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_oic_sesn.go b/nmxact/nmble/ble_oic_sesn.go
index f0dead2..98a30e9 100644
--- a/nmxact/nmble/ble_oic_sesn.go
+++ b/nmxact/nmble/ble_oic_sesn.go
@@ -49,7 +49,7 @@ func NewBleOicSesn(bx *BleXport, cfg sesn.SesnCfg) *BleOicSesn {
 	bos.bf = NewBleFsm(BleFsmParams{
 		Bx:           bx,
 		OwnAddrType:  cfg.Ble.OwnAddrType,
-		PeerSpec:     cfg.Ble.Peer,
+		PeerSpec:     cfg.Ble.PeerSpec,
 		SvcUuid:      svcUuid,
 		ReqChrUuid:   reqChrUuid,
 		RspChrUuid:   rspChrUuid,

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/06f33c03/nmxact/nmble/ble_plain_sesn.go
----------------------------------------------------------------------
diff --git a/nmxact/nmble/ble_plain_sesn.go b/nmxact/nmble/ble_plain_sesn.go
index c4b24c6..b4fda8e 100644
--- a/nmxact/nmble/ble_plain_sesn.go
+++ b/nmxact/nmble/ble_plain_sesn.go
@@ -43,7 +43,7 @@ func NewBlePlainSesn(bx *BleXport, cfg sesn.SesnCfg) *BlePlainSesn {
 	bps.bf = NewBleFsm(BleFsmParams{
 		Bx:           bx,
 		OwnAddrType:  cfg.Ble.OwnAddrType,
-		PeerSpec:     cfg.Ble.Peer,
+		PeerSpec:     cfg.Ble.PeerSpec,
 		SvcUuid:      svcUuid,
 		ReqChrUuid:   chrUuid,
 		RspChrUuid:   chrUuid,

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/06f33c03/nmxact/sesn/sesn_cfg.go
----------------------------------------------------------------------
diff --git a/nmxact/sesn/sesn_cfg.go b/nmxact/sesn/sesn_cfg.go
index cb6dce6..c511d10 100644
--- a/nmxact/sesn/sesn_cfg.go
+++ b/nmxact/sesn/sesn_cfg.go
@@ -15,9 +15,35 @@ const (
 
 type OnCloseFn func(s Sesn, err error)
 
+// Specifies the BLE peer to connect to.
+type BlePeerSpec struct {
+	// This is filled in if you know the address of the peer to connect to.
+	Dev bledefs.BleDev
+
+	// Otherwise, we must scan for a peer to connect to.  This points to a
+	// function that indicates whether we should connect to the sender of the
+	// specified advertisement.  This function gets called each time an
+	// incoming advertisement is received.  If it returns true, the session
+	// will connect to the sender of the corresponding advertisement.  Set this
+	// to nil if you populate the Dev field.
+	ScanPred bledefs.BleAdvPredicate
+}
+
+func BlePeerSpecDev(dev bledefs.BleDev) BlePeerSpec {
+	return BlePeerSpec{Dev: dev}
+}
+
+func BlePeerSpecName(name string) BlePeerSpec {
+	return BlePeerSpec{
+		ScanPred: func(r bledefs.BleAdvReport) bool {
+			return r.Name == name
+		},
+	}
+}
+
 type SesnCfgBle struct {
 	OwnAddrType  bledefs.BleAddrType
-	Peer         bledefs.BlePeerSpec
+	PeerSpec     BlePeerSpec
 	CloseTimeout time.Duration
 }
 


[32/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
deleted file mode 100644
index 3189c6b..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ /dev/null
@@ -1,1576 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm64,darwin
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1c
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x25
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x1e
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1c
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x28
-	AF_NATM                           = 0x1f
-	AF_NDRV                           = 0x1b
-	AF_NETBIOS                        = 0x21
-	AF_NS                             = 0x6
-	AF_OSI                            = 0x7
-	AF_PPP                            = 0x22
-	AF_PUP                            = 0x4
-	AF_RESERVED_36                    = 0x24
-	AF_ROUTE                          = 0x11
-	AF_SIP                            = 0x18
-	AF_SNA                            = 0xb
-	AF_SYSTEM                         = 0x20
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	AF_UTUN                           = 0x26
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B9600                             = 0x2580
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc00c4279
-	BIOCGETIF                         = 0x4020426b
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044272
-	BIOCGRTIMEOUT                     = 0x4010426e
-	BIOCGSEESENT                      = 0x40044276
-	BIOCGSTATS                        = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDLT                          = 0x80044278
-	BIOCSETF                          = 0x80104267
-	BIOCSETFNR                        = 0x8010427e
-	BIOCSETIF                         = 0x8020426c
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044273
-	BIOCSRTIMEOUT                     = 0x8010426d
-	BIOCSSEESENT                      = 0x80044277
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x80000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	DLT_A429                          = 0xb8
-	DLT_A653_ICM                      = 0xb9
-	DLT_AIRONET_HEADER                = 0x78
-	DLT_AOS                           = 0xde
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ARCNET_LINUX                  = 0x81
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AURORA                        = 0x7e
-	DLT_AX25                          = 0x3
-	DLT_AX25_KISS                     = 0xca
-	DLT_BACNET_MS_TP                  = 0xa5
-	DLT_BLUETOOTH_HCI_H4              = 0xbb
-	DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-	DLT_CAN20B                        = 0xbe
-	DLT_CAN_SOCKETCAN                 = 0xe3
-	DLT_CHAOS                         = 0x5
-	DLT_CHDLC                         = 0x68
-	DLT_CISCO_IOS                     = 0x76
-	DLT_C_HDLC                        = 0x68
-	DLT_C_HDLC_WITH_DIR               = 0xcd
-	DLT_DBUS                          = 0xe7
-	DLT_DECT                          = 0xdd
-	DLT_DOCSIS                        = 0x8f
-	DLT_DVB_CI                        = 0xeb
-	DLT_ECONET                        = 0x73
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0x6d
-	DLT_ERF                           = 0xc5
-	DLT_ERF_ETH                       = 0xaf
-	DLT_ERF_POS                       = 0xb0
-	DLT_FC_2                          = 0xe0
-	DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-	DLT_FDDI                          = 0xa
-	DLT_FLEXRAY                       = 0xd2
-	DLT_FRELAY                        = 0x6b
-	DLT_FRELAY_WITH_DIR               = 0xce
-	DLT_GCOM_SERIAL                   = 0xad
-	DLT_GCOM_T1E1                     = 0xac
-	DLT_GPF_F                         = 0xab
-	DLT_GPF_T                         = 0xaa
-	DLT_GPRS_LLC                      = 0xa9
-	DLT_GSMTAP_ABIS                   = 0xda
-	DLT_GSMTAP_UM                     = 0xd9
-	DLT_HHDLC                         = 0x79
-	DLT_IBM_SN                        = 0x92
-	DLT_IBM_SP                        = 0x91
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_IEEE802_15_4                  = 0xc3
-	DLT_IEEE802_15_4_LINUX            = 0xbf
-	DLT_IEEE802_15_4_NOFCS            = 0xe6
-	DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-	DLT_IEEE802_16_MAC_CPS            = 0xbc
-	DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-	DLT_IPFILTER                      = 0x74
-	DLT_IPMB                          = 0xc7
-	DLT_IPMB_LINUX                    = 0xd1
-	DLT_IPNET                         = 0xe2
-	DLT_IPOIB                         = 0xf2
-	DLT_IPV4                          = 0xe4
-	DLT_IPV6                          = 0xe5
-	DLT_IP_OVER_FC                    = 0x7a
-	DLT_JUNIPER_ATM1                  = 0x89
-	DLT_JUNIPER_ATM2                  = 0x87
-	DLT_JUNIPER_ATM_CEMIC             = 0xee
-	DLT_JUNIPER_CHDLC                 = 0xb5
-	DLT_JUNIPER_ES                    = 0x84
-	DLT_JUNIPER_ETHER                 = 0xb2
-	DLT_JUNIPER_FIBRECHANNEL          = 0xea
-	DLT_JUNIPER_FRELAY                = 0xb4
-	DLT_JUNIPER_GGSN                  = 0x85
-	DLT_JUNIPER_ISM                   = 0xc2
-	DLT_JUNIPER_MFR                   = 0x86
-	DLT_JUNIPER_MLFR                  = 0x83
-	DLT_JUNIPER_MLPPP                 = 0x82
-	DLT_JUNIPER_MONITOR               = 0xa4
-	DLT_JUNIPER_PIC_PEER              = 0xae
-	DLT_JUNIPER_PPP                   = 0xb3
-	DLT_JUNIPER_PPPOE                 = 0xa7
-	DLT_JUNIPER_PPPOE_ATM             = 0xa8
-	DLT_JUNIPER_SERVICES              = 0x88
-	DLT_JUNIPER_SRX_E2E               = 0xe9
-	DLT_JUNIPER_ST                    = 0xc8
-	DLT_JUNIPER_VP                    = 0xb7
-	DLT_JUNIPER_VS                    = 0xe8
-	DLT_LAPB_WITH_DIR                 = 0xcf
-	DLT_LAPD                          = 0xcb
-	DLT_LIN                           = 0xd4
-	DLT_LINUX_EVDEV                   = 0xd8
-	DLT_LINUX_IRDA                    = 0x90
-	DLT_LINUX_LAPD                    = 0xb1
-	DLT_LINUX_PPP_WITHDIRECTION       = 0xa6
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_LTALK                         = 0x72
-	DLT_MATCHING_MAX                  = 0xf5
-	DLT_MATCHING_MIN                  = 0x68
-	DLT_MFR                           = 0xb6
-	DLT_MOST                          = 0xd3
-	DLT_MPEG_2_TS                     = 0xf3
-	DLT_MPLS                          = 0xdb
-	DLT_MTP2                          = 0x8c
-	DLT_MTP2_WITH_PHDR                = 0x8b
-	DLT_MTP3                          = 0x8d
-	DLT_MUX27010                      = 0xec
-	DLT_NETANALYZER                   = 0xf0
-	DLT_NETANALYZER_TRANSPARENT       = 0xf1
-	DLT_NFC_LLCP                      = 0xf5
-	DLT_NFLOG                         = 0xef
-	DLT_NG40                          = 0xf4
-	DLT_NULL                          = 0x0
-	DLT_PCI_EXP                       = 0x7d
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPI                           = 0xc0
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_PPPD                      = 0xa6
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PPP_WITH_DIR                  = 0xcc
-	DLT_PPP_WITH_DIRECTION            = 0xa6
-	DLT_PRISM_HEADER                  = 0x77
-	DLT_PRONET                        = 0x4
-	DLT_RAIF1                         = 0xc6
-	DLT_RAW                           = 0xc
-	DLT_RIO                           = 0x7c
-	DLT_SCCP                          = 0x8e
-	DLT_SITA                          = 0xc4
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DLT_STANAG_5066_D_PDU             = 0xed
-	DLT_SUNATM                        = 0x7b
-	DLT_SYMANTEC_FIREWALL             = 0x63
-	DLT_TZSP                          = 0x80
-	DLT_USB                           = 0xba
-	DLT_USB_LINUX                     = 0xbd
-	DLT_USB_LINUX_MMAPPED             = 0xdc
-	DLT_USER0                         = 0x93
-	DLT_USER1                         = 0x94
-	DLT_USER10                        = 0x9d
-	DLT_USER11                        = 0x9e
-	DLT_USER12                        = 0x9f
-	DLT_USER13                        = 0xa0
-	DLT_USER14                        = 0xa1
-	DLT_USER15                        = 0xa2
-	DLT_USER2                         = 0x95
-	DLT_USER3                         = 0x96
-	DLT_USER4                         = 0x97
-	DLT_USER5                         = 0x98
-	DLT_USER6                         = 0x99
-	DLT_USER7                         = 0x9a
-	DLT_USER8                         = 0x9b
-	DLT_USER9                         = 0x9c
-	DLT_WIHART                        = 0xdf
-	DLT_X2E_SERIAL                    = 0xd5
-	DLT_X2E_XORAYA                    = 0xd6
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EVFILT_AIO                        = -0x3
-	EVFILT_FS                         = -0x9
-	EVFILT_MACHPORT                   = -0x8
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0xe
-	EVFILT_THREADMARKER               = 0xe
-	EVFILT_TIMER                      = -0x7
-	EVFILT_USER                       = -0xa
-	EVFILT_VM                         = -0xc
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_DISPATCH                       = 0x80
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG0                          = 0x1000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_OOBAND                         = 0x2000
-	EV_POLL                           = 0x1000
-	EV_RECEIPT                        = 0x40
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_ADDFILESIGS                     = 0x3d
-	F_ADDSIGS                         = 0x3b
-	F_ALLOCATEALL                     = 0x4
-	F_ALLOCATECONTIG                  = 0x2
-	F_CHKCLEAN                        = 0x29
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0x43
-	F_FINDSIGS                        = 0x4e
-	F_FLUSH_DATA                      = 0x28
-	F_FREEZE_FS                       = 0x35
-	F_FULLFSYNC                       = 0x33
-	F_GETCODEDIR                      = 0x48
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETLKPID                        = 0x42
-	F_GETNOSIGPIPE                    = 0x4a
-	F_GETOWN                          = 0x5
-	F_GETPATH                         = 0x32
-	F_GETPATH_MTMINFO                 = 0x47
-	F_GETPROTECTIONCLASS              = 0x3f
-	F_GETPROTECTIONLEVEL              = 0x4d
-	F_GLOBAL_NOCACHE                  = 0x37
-	F_LOG2PHYS                        = 0x31
-	F_LOG2PHYS_EXT                    = 0x41
-	F_NOCACHE                         = 0x30
-	F_NODIRECT                        = 0x3e
-	F_OK                              = 0x0
-	F_PATHPKG_CHECK                   = 0x34
-	F_PEOFPOSMODE                     = 0x3
-	F_PREALLOCATE                     = 0x2a
-	F_RDADVISE                        = 0x2c
-	F_RDAHEAD                         = 0x2d
-	F_RDLCK                           = 0x1
-	F_SETBACKINGSTORE                 = 0x46
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETLKWTIMEOUT                   = 0xa
-	F_SETNOSIGPIPE                    = 0x49
-	F_SETOWN                          = 0x6
-	F_SETPROTECTIONCLASS              = 0x40
-	F_SETSIZE                         = 0x2b
-	F_SINGLE_WRITER                   = 0x4c
-	F_THAW_FS                         = 0x36
-	F_TRANSCODEKEY                    = 0x4b
-	F_UNLCK                           = 0x2
-	F_VOLPOSMODE                      = 0x4
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFF_ALLMULTI                      = 0x200
-	IFF_ALTPHYS                       = 0x4000
-	IFF_BROADCAST                     = 0x2
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_AAL5                          = 0x31
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ATM                           = 0x25
-	IFT_BRIDGE                        = 0xd1
-	IFT_CARP                          = 0xf8
-	IFT_CELLULAR                      = 0xff
-	IFT_CEPT                          = 0x13
-	IFT_DS3                           = 0x1e
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0x38
-	IFT_FDDI                          = 0xf
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_GIF                           = 0x37
-	IFT_HDH1822                       = 0x3
-	IFT_HIPPI                         = 0x2f
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE8023ADLAG                 = 0x88
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88026                      = 0xa
-	IFT_L2VLAN                        = 0x87
-	IFT_LAPB                          = 0x10
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_NSIP                          = 0x1b
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PDP                           = 0xff
-	IFT_PFLOG                         = 0xf5
-	IFT_PFSYNC                        = 0xf6
-	IFT_PKTAP                         = 0xfe
-	IFT_PPP                           = 0x17
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PTPSERIAL                     = 0x16
-	IFT_RS232                         = 0x21
-	IFT_SDLC                          = 0x11
-	IFT_SIP                           = 0x1f
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0x39
-	IFT_T1                            = 0x12
-	IFT_ULTRA                         = 0x1d
-	IFT_V35                           = 0x2d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LINKLOCALNETNUM                = 0xa9fe0000
-	IN_LOOPBACKNET                    = 0x7f
-	IPPROTO_3PC                       = 0x22
-	IPPROTO_ADFS                      = 0x44
-	IPPROTO_AH                        = 0x33
-	IPPROTO_AHIP                      = 0x3d
-	IPPROTO_APES                      = 0x63
-	IPPROTO_ARGUS                     = 0xd
-	IPPROTO_AX25                      = 0x5d
-	IPPROTO_BHA                       = 0x31
-	IPPROTO_BLT                       = 0x1e
-	IPPROTO_BRSATMON                  = 0x4c
-	IPPROTO_CFTP                      = 0x3e
-	IPPROTO_CHAOS                     = 0x10
-	IPPROTO_CMTP                      = 0x26
-	IPPROTO_CPHB                      = 0x49
-	IPPROTO_CPNX                      = 0x48
-	IPPROTO_DDP                       = 0x25
-	IPPROTO_DGP                       = 0x56
-	IPPROTO_DIVERT                    = 0xfe
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_EMCON                     = 0xe
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GMTP                      = 0x64
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HELLO                     = 0x3f
-	IPPROTO_HMP                       = 0x14
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IDPR                      = 0x23
-	IPPROTO_IDRP                      = 0x2d
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IGP                       = 0x55
-	IPPROTO_IGRP                      = 0x58
-	IPPROTO_IL                        = 0x28
-	IPPROTO_INLSP                     = 0x34
-	IPPROTO_INP                       = 0x20
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPCV                      = 0x47
-	IPPROTO_IPEIP                     = 0x5e
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPPC                      = 0x43
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IRTP                      = 0x1c
-	IPPROTO_KRYPTOLAN                 = 0x41
-	IPPROTO_LARP                      = 0x5b
-	IPPROTO_LEAF1                     = 0x19
-	IPPROTO_LEAF2                     = 0x1a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MEAS                      = 0x13
-	IPPROTO_MHRP                      = 0x30
-	IPPROTO_MICP                      = 0x5f
-	IPPROTO_MTP                       = 0x5c
-	IPPROTO_MUX                       = 0x12
-	IPPROTO_ND                        = 0x4d
-	IPPROTO_NHRP                      = 0x36
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_NSP                       = 0x1f
-	IPPROTO_NVPII                     = 0xb
-	IPPROTO_OSPFIGP                   = 0x59
-	IPPROTO_PGM                       = 0x71
-	IPPROTO_PIGP                      = 0x9
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PRM                       = 0x15
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_PVP                       = 0x4b
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_RCCMON                    = 0xa
-	IPPROTO_RDP                       = 0x1b
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_RVD                       = 0x42
-	IPPROTO_SATEXPAK                  = 0x40
-	IPPROTO_SATMON                    = 0x45
-	IPPROTO_SCCSP                     = 0x60
-	IPPROTO_SCTP                      = 0x84
-	IPPROTO_SDRP                      = 0x2a
-	IPPROTO_SEP                       = 0x21
-	IPPROTO_SRPC                      = 0x5a
-	IPPROTO_ST                        = 0x7
-	IPPROTO_SVMTP                     = 0x52
-	IPPROTO_SWIPE                     = 0x35
-	IPPROTO_TCF                       = 0x57
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_TPXX                      = 0x27
-	IPPROTO_TRUNK1                    = 0x17
-	IPPROTO_TRUNK2                    = 0x18
-	IPPROTO_TTP                       = 0x54
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_VINES                     = 0x53
-	IPPROTO_VISA                      = 0x46
-	IPPROTO_VMTP                      = 0x51
-	IPPROTO_WBEXPAK                   = 0x4f
-	IPPROTO_WBMON                     = 0x4e
-	IPPROTO_WSN                       = 0x4a
-	IPPROTO_XNET                      = 0xf
-	IPPROTO_XTP                       = 0x24
-	IPV6_2292DSTOPTS                  = 0x17
-	IPV6_2292HOPLIMIT                 = 0x14
-	IPV6_2292HOPOPTS                  = 0x16
-	IPV6_2292NEXTHOP                  = 0x15
-	IPV6_2292PKTINFO                  = 0x13
-	IPV6_2292PKTOPTIONS               = 0x19
-	IPV6_2292RTHDR                    = 0x18
-	IPV6_BINDV6ONLY                   = 0x1b
-	IPV6_BOUND_IF                     = 0x7d
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x3c
-	IPV6_FW_ADD                       = 0x1e
-	IPV6_FW_DEL                       = 0x1f
-	IPV6_FW_FLUSH                     = 0x20
-	IPV6_FW_GET                       = 0x22
-	IPV6_FW_ZERO                      = 0x21
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXOPTHDR                    = 0x800
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MAX_GROUP_SRC_FILTER         = 0x200
-	IPV6_MAX_MEMBERSHIPS              = 0xfff
-	IPV6_MAX_SOCK_SRC_FILTER          = 0x80
-	IPV6_MIN_MEMBERSHIPS              = 0x1f
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVTCLASS                   = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x24
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_ADD_SOURCE_MEMBERSHIP          = 0x46
-	IP_BLOCK_SOURCE                   = 0x48
-	IP_BOUND_IF                       = 0x19
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_DROP_SOURCE_MEMBERSHIP         = 0x47
-	IP_DUMMYNET_CONFIGURE             = 0x3c
-	IP_DUMMYNET_DEL                   = 0x3d
-	IP_DUMMYNET_FLUSH                 = 0x3e
-	IP_DUMMYNET_GET                   = 0x40
-	IP_FAITH                          = 0x16
-	IP_FW_ADD                         = 0x28
-	IP_FW_DEL                         = 0x29
-	IP_FW_FLUSH                       = 0x2a
-	IP_FW_GET                         = 0x2c
-	IP_FW_RESETLOG                    = 0x2d
-	IP_FW_ZERO                        = 0x2b
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x15
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_GROUP_SRC_FILTER           = 0x200
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MAX_SOCK_MUTE_FILTER           = 0x80
-	IP_MAX_SOCK_SRC_FILTER            = 0x80
-	IP_MF                             = 0x2000
-	IP_MIN_MEMBERSHIPS                = 0x1f
-	IP_MSFILTER                       = 0x4a
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_IFINDEX              = 0x42
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_MULTICAST_VIF                  = 0xe
-	IP_NAT__XXX                       = 0x37
-	IP_OFFMASK                        = 0x1fff
-	IP_OLD_FW_ADD                     = 0x32
-	IP_OLD_FW_DEL                     = 0x33
-	IP_OLD_FW_FLUSH                   = 0x34
-	IP_OLD_FW_GET                     = 0x36
-	IP_OLD_FW_RESETLOG                = 0x38
-	IP_OLD_FW_ZERO                    = 0x35
-	IP_OPTIONS                        = 0x1
-	IP_PKTINFO                        = 0x1a
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVPKTINFO                    = 0x1a
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTTL                        = 0x18
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RSVP_OFF                       = 0x10
-	IP_RSVP_ON                        = 0xf
-	IP_RSVP_VIF_OFF                   = 0x12
-	IP_RSVP_VIF_ON                    = 0x11
-	IP_STRIPHDR                       = 0x17
-	IP_TOS                            = 0x3
-	IP_TRAFFIC_MGT_BACKGROUND         = 0x41
-	IP_TTL                            = 0x4
-	IP_UNBLOCK_SOURCE                 = 0x49
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IUTF8                             = 0x4000
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_CAN_REUSE                    = 0x9
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x5
-	MADV_FREE_REUSABLE                = 0x7
-	MADV_FREE_REUSE                   = 0x8
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_WILLNEED                     = 0x3
-	MADV_ZERO_WIRED_PAGES             = 0x6
-	MAP_ANON                          = 0x1000
-	MAP_COPY                          = 0x2
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_JIT                           = 0x800
-	MAP_NOCACHE                       = 0x400
-	MAP_NOEXTEND                      = 0x100
-	MAP_NORESERVE                     = 0x40
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_RESERVED0080                  = 0x80
-	MAP_SHARED                        = 0x1
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOF                           = 0x100
-	MSG_EOR                           = 0x8
-	MSG_FLUSH                         = 0x400
-	MSG_HAVEMORE                      = 0x2000
-	MSG_HOLD                          = 0x800
-	MSG_NEEDSA                        = 0x10000
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_RCVMORE                       = 0x4000
-	MSG_SEND                          = 0x1000
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MSG_WAITSTREAM                    = 0x200
-	MS_ASYNC                          = 0x1
-	MS_DEACTIVATE                     = 0x8
-	MS_INVALIDATE                     = 0x2
-	MS_KILLPAGES                      = 0x4
-	MS_SYNC                           = 0x10
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_DUMP2                      = 0x7
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_IFLIST2                    = 0x6
-	NET_RT_MAXID                      = 0xa
-	NET_RT_STAT                       = 0x4
-	NET_RT_TRASH                      = 0x5
-	NOFLSH                            = 0x80000000
-	NOTE_ABSOLUTE                     = 0x8
-	NOTE_ATTRIB                       = 0x8
-	NOTE_BACKGROUND                   = 0x40
-	NOTE_CHILD                        = 0x4
-	NOTE_CRITICAL                     = 0x20
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXITSTATUS                   = 0x4000000
-	NOTE_EXIT_CSERROR                 = 0x40000
-	NOTE_EXIT_DECRYPTFAIL             = 0x10000
-	NOTE_EXIT_DETAIL                  = 0x2000000
-	NOTE_EXIT_DETAIL_MASK             = 0x70000
-	NOTE_EXIT_MEMORY                  = 0x20000
-	NOTE_EXIT_REPARENTED              = 0x80000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FFAND                        = 0x40000000
-	NOTE_FFCOPY                       = 0xc0000000
-	NOTE_FFCTRLMASK                   = 0xc0000000
-	NOTE_FFLAGSMASK                   = 0xffffff
-	NOTE_FFNOP                        = 0x0
-	NOTE_FFOR                         = 0x80000000
-	NOTE_FORK                         = 0x40000000
-	NOTE_LEEWAY                       = 0x10
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_NONE                         = 0x80
-	NOTE_NSECONDS                     = 0x4
-	NOTE_PCTRLMASK                    = -0x100000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_REAP                         = 0x10000000
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_SECONDS                      = 0x1
-	NOTE_SIGNAL                       = 0x8000000
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRIGGER                      = 0x1000000
-	NOTE_USECONDS                     = 0x2
-	NOTE_VM_ERROR                     = 0x10000000
-	NOTE_VM_PRESSURE                  = 0x80000000
-	NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
-	NOTE_VM_PRESSURE_TERMINATE        = 0x40000000
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	OFDEL                             = 0x20000
-	OFILL                             = 0x80
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_ALERT                           = 0x20000000
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x1000000
-	O_CREAT                           = 0x200
-	O_DIRECTORY                       = 0x100000
-	O_DP_GETRAWENCRYPTED              = 0x1
-	O_DSYNC                           = 0x400000
-	O_EVTONLY                         = 0x8000
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x20000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_POPUP                           = 0x80000000
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_SHLOCK                          = 0x10
-	O_SYMLINK                         = 0x200000
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	PT_ATTACH                         = 0xa
-	PT_ATTACHEXC                      = 0xe
-	PT_CONTINUE                       = 0x7
-	PT_DENY_ATTACH                    = 0x1f
-	PT_DETACH                         = 0xb
-	PT_FIRSTMACH                      = 0x20
-	PT_FORCEQUOTA                     = 0x1e
-	PT_KILL                           = 0x8
-	PT_READ_D                         = 0x2
-	PT_READ_I                         = 0x1
-	PT_READ_U                         = 0x3
-	PT_SIGEXC                         = 0xc
-	PT_STEP                           = 0x9
-	PT_THUPDATE                       = 0xd
-	PT_TRACE_ME                       = 0x0
-	PT_WRITE_D                        = 0x5
-	PT_WRITE_I                        = 0x4
-	PT_WRITE_U                        = 0x6
-	RLIMIT_AS                         = 0x5
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_CPU_USAGE_MONITOR          = 0x2
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x8
-	RTAX_NETMASK                      = 0x2
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_BROADCAST                     = 0x400000
-	RTF_CLONING                       = 0x100
-	RTF_CONDEMNED                     = 0x2000000
-	RTF_DELCLONE                      = 0x80
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_IFREF                         = 0x4000000
-	RTF_IFSCOPE                       = 0x1000000
-	RTF_LLINFO                        = 0x400
-	RTF_LOCAL                         = 0x200000
-	RTF_MODIFIED                      = 0x20
-	RTF_MULTICAST                     = 0x800000
-	RTF_NOIFREF                       = 0x2000
-	RTF_PINNED                        = 0x100000
-	RTF_PRCLONING                     = 0x10000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x40000
-	RTF_PROXY                         = 0x8000000
-	RTF_REJECT                        = 0x8
-	RTF_ROUTER                        = 0x10000000
-	RTF_STATIC                        = 0x800
-	RTF_UP                            = 0x1
-	RTF_WASCLONED                     = 0x20000
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DELMADDR                      = 0x10
-	RTM_GET                           = 0x4
-	RTM_GET2                          = 0x14
-	RTM_IFINFO                        = 0xe
-	RTM_IFINFO2                       = 0x12
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_NEWMADDR                      = 0xf
-	RTM_NEWMADDR2                     = 0x13
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	SCM_CREDS                         = 0x3
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x2
-	SCM_TIMESTAMP_MONOTONIC           = 0x4
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCARPIPLL                       = 0xc0206928
-	SIOCATMARK                        = 0x40047307
-	SIOCAUTOADDR                      = 0xc0206926
-	SIOCAUTONETMASK                   = 0x80206927
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFPHYADDR                    = 0x80206941
-	SIOCGDRVSPEC                      = 0xc028697b
-	SIOCGETVLAN                       = 0xc020697f
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFALTMTU                     = 0xc0206948
-	SIOCGIFASYNCMAP                   = 0xc020697c
-	SIOCGIFBOND                       = 0xc0206947
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCAP                        = 0xc020695b
-	SIOCGIFCONF                       = 0xc00c6924
-	SIOCGIFDEVMTU                     = 0xc0206944
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFKPI                        = 0xc0206987
-	SIOCGIFMAC                        = 0xc0206982
-	SIOCGIFMEDIA                      = 0xc02c6938
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc0206933
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206940
-	SIOCGIFPHYS                       = 0xc0206935
-	SIOCGIFPSRCADDR                   = 0xc020693f
-	SIOCGIFSTATUS                     = 0xc331693d
-	SIOCGIFVLAN                       = 0xc020697f
-	SIOCGIFWAKEFLAGS                  = 0xc0206988
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCIFCREATE                      = 0xc0206978
-	SIOCIFCREATE2                     = 0xc020697a
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc0106981
-	SIOCRSLVMULTI                     = 0xc010693b
-	SIOCSDRVSPEC                      = 0x8028697b
-	SIOCSETVLAN                       = 0x8020697e
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFALTMTU                     = 0x80206945
-	SIOCSIFASYNCMAP                   = 0x8020697d
-	SIOCSIFBOND                       = 0x80206946
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFCAP                        = 0x8020695a
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFKPI                        = 0x80206986
-	SIOCSIFLLADDR                     = 0x8020693c
-	SIOCSIFMAC                        = 0x80206983
-	SIOCSIFMEDIA                      = 0xc0206937
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x80206934
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x8040693e
-	SIOCSIFPHYS                       = 0x80206936
-	SIOCSIFVLAN                       = 0x8020697e
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SOCK_DGRAM                        = 0x2
-	SOCK_MAXADDRLEN                   = 0xff
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_DONTTRUNC                      = 0x2000
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LABEL                          = 0x1010
-	SO_LINGER                         = 0x80
-	SO_LINGER_SEC                     = 0x1080
-	SO_NKE                            = 0x1021
-	SO_NOADDRERR                      = 0x1023
-	SO_NOSIGPIPE                      = 0x1022
-	SO_NOTIFYCONFLICT                 = 0x1026
-	SO_NP_EXTENSIONS                  = 0x1083
-	SO_NREAD                          = 0x1020
-	SO_NUMRCVPKT                      = 0x1112
-	SO_NWRITE                         = 0x1024
-	SO_OOBINLINE                      = 0x100
-	SO_PEERLABEL                      = 0x1011
-	SO_RANDOMPORT                     = 0x1082
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_REUSESHAREUID                  = 0x1025
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_TIMESTAMP                      = 0x400
-	SO_TIMESTAMP_MONOTONIC            = 0x800
-	SO_TYPE                           = 0x1008
-	SO_UPCALLCLOSEWAIT                = 0x1027
-	SO_USELOOPBACK                    = 0x40
-	SO_WANTMORE                       = 0x4000
-	SO_WANTOOBFLAG                    = 0x8000
-	S_IEXEC                           = 0x40
-	S_IFBLK                           = 0x6000
-	S_IFCHR                           = 0x2000
-	S_IFDIR                           = 0x4000
-	S_IFIFO                           = 0x1000
-	S_IFLNK                           = 0xa000
-	S_IFMT                            = 0xf000
-	S_IFREG                           = 0x8000
-	S_IFSOCK                          = 0xc000
-	S_IFWHT                           = 0xe000
-	S_IREAD                           = 0x100
-	S_IRGRP                           = 0x20
-	S_IROTH                           = 0x4
-	S_IRUSR                           = 0x100
-	S_IRWXG                           = 0x38
-	S_IRWXO                           = 0x7
-	S_IRWXU                           = 0x1c0
-	S_ISGID                           = 0x400
-	S_ISTXT                           = 0x200
-	S_ISUID                           = 0x800
-	S_ISVTX                           = 0x200
-	S_IWGRP                           = 0x10
-	S_IWOTH                           = 0x2
-	S_IWRITE                          = 0x80
-	S_IWUSR                           = 0x80
-	S_IXGRP                           = 0x8
-	S_IXOTH                           = 0x1
-	S_IXUSR                           = 0x40
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CONNECTIONTIMEOUT             = 0x20
-	TCP_ENABLE_ECN                    = 0x104
-	TCP_KEEPALIVE                     = 0x10
-	TCP_KEEPCNT                       = 0x102
-	TCP_KEEPINTVL                     = 0x101
-	TCP_MAXHLEN                       = 0x3c
-	TCP_MAXOLEN                       = 0x28
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x4
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x200
-	TCP_NODELAY                       = 0x1
-	TCP_NOOPT                         = 0x8
-	TCP_NOPUSH                        = 0x4
-	TCP_NOTSENT_LOWAT                 = 0x201
-	TCP_RXT_CONNDROPTIME              = 0x80
-	TCP_RXT_FINDROP                   = 0x100
-	TCP_SENDMOREACKS                  = 0x103
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDCDTIMESTAMP                  = 0x40107458
-	TIOCDRAIN                         = 0x2000745e
-	TIOCDSIMICROCODE                  = 0x20007455
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLUSH                         = 0x80047410
-	TIOCGDRAINWAIT                    = 0x40047456
-	TIOCGETA                          = 0x40487413
-	TIOCGETD                          = 0x4004741a
-	TIOCGPGRP                         = 0x40047477
-	TIOCGWINSZ                        = 0x40087468
-	TIOCIXOFF                         = 0x20007480
-	TIOCIXON                          = 0x20007481
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGDTRWAIT                     = 0x4004745a
-	TIOCMGET                          = 0x4004746a
-	TIOCMODG                          = 0x40047403
-	TIOCMODS                          = 0x80047404
-	TIOCMSDTRWAIT                     = 0x8004745b
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTYGNAME                      = 0x40807453
-	TIOCPTYGRANT                      = 0x20007454
-	TIOCPTYUNLK                       = 0x20007452
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCONS                         = 0x20007463
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDRAINWAIT                    = 0x80047457
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x80487414
-	TIOCSETAF                         = 0x80487416
-	TIOCSETAW                         = 0x80487415
-	TIOCSETD                          = 0x8004741b
-	TIOCSIG                           = 0x2000745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x20007465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCTIMESTAMP                     = 0x40107459
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VT0                               = 0x0
-	VT1                               = 0x10000
-	VTDLY                             = 0x10000
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WCONTINUED                        = 0x10
-	WCOREFLAG                         = 0x80
-	WEXITED                           = 0x4
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x20
-	WORDSIZE                          = 0x40
-	WSTOPPED                          = 0x8
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADARCH        = syscall.Errno(0x56)
-	EBADEXEC        = syscall.Errno(0x55)
-	EBADF           = syscall.Errno(0x9)
-	EBADMACHO       = syscall.Errno(0x58)
-	EBADMSG         = syscall.Errno(0x5e)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x59)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDEVERR         = syscall.Errno(0x53)
-	EDOM            = syscall.Errno(0x21)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x5a)
-	EILSEQ          = syscall.Errno(0x5c)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x6a)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5f)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x5d)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODATA         = syscall.Errno(0x60)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x61)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x5b)
-	ENOPOLICY       = syscall.Errno(0x67)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x62)
-	ENOSTR          = syscall.Errno(0x63)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTRECOVERABLE = syscall.Errno(0x68)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x2d)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x66)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EOWNERDEAD      = syscall.Errno(0x69)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x64)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	EPWROFF         = syscall.Errno(0x52)
-	EQFULL          = syscall.Errno(0x6a)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHLIBVERS      = syscall.Errno(0x57)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIME           = syscall.Errno(0x65)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "device not configured",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource deadlock avoided",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "resource busy",
-	17:  "file exists",
-	18:  "cross-device link",
-	19:  "operation not supported by device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "result too large",
-	35:  "resource temporarily unavailable",
-	36:  "operation now in progress",
-	37:  "operation already in progress",
-	38:  "socket operation on non-socket",
-	39:  "destination address required",
-	40:  "message too long",
-	41:  "protocol wrong type for socket",
-	42:  "protocol not available",
-	43:  "protocol not supported",
-	44:  "socket type not supported",
-	45:  "operation not supported",
-	46:  "protocol family not supported",
-	47:  "address family not supported by protocol family",
-	48:  "address already in use",
-	49:  "can't assign requested address",
-	50:  "network is down",
-	51:  "network is unreachable",
-	52:  "network dropped connection on reset",
-	53:  "software caused connection abort",
-	54:  "connection reset by peer",
-	55:  "no buffer space available",
-	56:  "socket is already connected",
-	57:  "socket is not connected",
-	58:  "can't send after socket shutdown",
-	59:  "too many references: can't splice",
-	60:  "operation timed out",
-	61:  "connection refused",
-	62:  "too many levels of symbolic links",
-	63:  "file name too long",
-	64:  "host is down",
-	65:  "no route to host",
-	66:  "directory not empty",
-	67:  "too many processes",
-	68:  "too many users",
-	69:  "disc quota exceeded",
-	70:  "stale NFS file handle",
-	71:  "too many levels of remote in path",
-	72:  "RPC struct is bad",
-	73:  "RPC version wrong",
-	74:  "RPC prog. not avail",
-	75:  "program version wrong",
-	76:  "bad procedure for program",
-	77:  "no locks available",
-	78:  "function not implemented",
-	79:  "inappropriate file type or format",
-	80:  "authentication error",
-	81:  "need authenticator",
-	82:  "device power is off",
-	83:  "device error",
-	84:  "value too large to be stored in data type",
-	85:  "bad executable (or shared library)",
-	86:  "bad CPU type in executable",
-	87:  "shared library version mismatch",
-	88:  "malformed Mach-o file",
-	89:  "operation canceled",
-	90:  "identifier removed",
-	91:  "no message of desired type",
-	92:  "illegal byte sequence",
-	93:  "attribute not found",
-	94:  "bad message",
-	95:  "EMULTIHOP (Reserved)",
-	96:  "no message available on STREAM",
-	97:  "ENOLINK (Reserved)",
-	98:  "no STREAM resources",
-	99:  "not a STREAM",
-	100: "protocol error",
-	101: "STREAM ioctl timeout",
-	102: "operation not supported on socket",
-	103: "policy not found",
-	104: "state not recoverable",
-	105: "previous owner died",
-	106: "interface output queue is full",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "suspended (signal)",
-	18: "suspended",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-}


[14/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/newt/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
deleted file mode 100644
index 3322e99..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go
+++ /dev/null
@@ -1,1584 +0,0 @@
-// mkerrors.sh -m32
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,openbsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m32 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_BLUETOOTH                      = 0x20
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1a
-	AF_ECMA                           = 0x8
-	AF_ENCAP                          = 0x1c
-	AF_HYLINK                         = 0xf
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x18
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1a
-	AF_ISO                            = 0x7
-	AF_KEY                            = 0x1e
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x24
-	AF_MPLS                           = 0x21
-	AF_NATM                           = 0x1b
-	AF_NS                             = 0x6
-	AF_OSI                            = 0x7
-	AF_PUP                            = 0x4
-	AF_ROUTE                          = 0x11
-	AF_SIP                            = 0x1d
-	AF_SNA                            = 0xb
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	ARPHRD_ETHER                      = 0x1
-	ARPHRD_FRELAY                     = 0xf
-	ARPHRD_IEEE1394                   = 0x18
-	ARPHRD_IEEE802                    = 0x6
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B9600                             = 0x2580
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDIRFILT                      = 0x4004427c
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc008427b
-	BIOCGETIF                         = 0x4020426b
-	BIOCGFILDROP                      = 0x40044278
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044273
-	BIOCGRTIMEOUT                     = 0x400c426e
-	BIOCGSTATS                        = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCLOCK                          = 0x20004276
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDIRFILT                      = 0x8004427d
-	BIOCSDLT                          = 0x8004427a
-	BIOCSETF                          = 0x80084267
-	BIOCSETIF                         = 0x8020426c
-	BIOCSETWF                         = 0x80084277
-	BIOCSFILDROP                      = 0x80044279
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044272
-	BIOCSRTIMEOUT                     = 0x800c426d
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DIRECTION_IN                  = 0x1
-	BPF_DIRECTION_OUT                 = 0x2
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x200000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0xff
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	DIOCOSFPFLUSH                     = 0x2000444e
-	DLT_ARCNET                        = 0x7
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AX25                          = 0x3
-	DLT_CHAOS                         = 0x5
-	DLT_C_HDLC                        = 0x68
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0xd
-	DLT_FDDI                          = 0xa
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_LOOP                          = 0xc
-	DLT_MPLS                          = 0xdb
-	DLT_NULL                          = 0x0
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PRONET                        = 0x4
-	DLT_RAW                           = 0xe
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EMT_TAGOVF                        = 0x1
-	EMUL_ENABLED                      = 0x1
-	EMUL_NATIVE                       = 0x2
-	ENDRUNDISC                        = 0x9
-	ETHERMIN                          = 0x2e
-	ETHERMTU                          = 0x5dc
-	ETHERTYPE_8023                    = 0x4
-	ETHERTYPE_AARP                    = 0x80f3
-	ETHERTYPE_ACCTON                  = 0x8390
-	ETHERTYPE_AEONIC                  = 0x8036
-	ETHERTYPE_ALPHA                   = 0x814a
-	ETHERTYPE_AMBER                   = 0x6008
-	ETHERTYPE_AMOEBA                  = 0x8145
-	ETHERTYPE_AOE                     = 0x88a2
-	ETHERTYPE_APOLLO                  = 0x80f7
-	ETHERTYPE_APOLLODOMAIN            = 0x8019
-	ETHERTYPE_APPLETALK               = 0x809b
-	ETHERTYPE_APPLITEK                = 0x80c7
-	ETHERTYPE_ARGONAUT                = 0x803a
-	ETHERTYPE_ARP                     = 0x806
-	ETHERTYPE_AT                      = 0x809b
-	ETHERTYPE_ATALK                   = 0x809b
-	ETHERTYPE_ATOMIC                  = 0x86df
-	ETHERTYPE_ATT                     = 0x8069
-	ETHERTYPE_ATTSTANFORD             = 0x8008
-	ETHERTYPE_AUTOPHON                = 0x806a
-	ETHERTYPE_AXIS                    = 0x8856
-	ETHERTYPE_BCLOOP                  = 0x9003
-	ETHERTYPE_BOFL                    = 0x8102
-	ETHERTYPE_CABLETRON               = 0x7034
-	ETHERTYPE_CHAOS                   = 0x804
-	ETHERTYPE_COMDESIGN               = 0x806c
-	ETHERTYPE_COMPUGRAPHIC            = 0x806d
-	ETHERTYPE_COUNTERPOINT            = 0x8062
-	ETHERTYPE_CRONUS                  = 0x8004
-	ETHERTYPE_CRONUSVLN               = 0x8003
-	ETHERTYPE_DCA                     = 0x1234
-	ETHERTYPE_DDE                     = 0x807b
-	ETHERTYPE_DEBNI                   = 0xaaaa
-	ETHERTYPE_DECAM                   = 0x8048
-	ETHERTYPE_DECCUST                 = 0x6006
-	ETHERTYPE_DECDIAG                 = 0x6005
-	ETHERTYPE_DECDNS                  = 0x803c
-	ETHERTYPE_DECDTS                  = 0x803e
-	ETHERTYPE_DECEXPER                = 0x6000
-	ETHERTYPE_DECLAST                 = 0x8041
-	ETHERTYPE_DECLTM                  = 0x803f
-	ETHERTYPE_DECMUMPS                = 0x6009
-	ETHERTYPE_DECNETBIOS              = 0x8040
-	ETHERTYPE_DELTACON                = 0x86de
-	ETHERTYPE_DIDDLE                  = 0x4321
-	ETHERTYPE_DLOG1                   = 0x660
-	ETHERTYPE_DLOG2                   = 0x661
-	ETHERTYPE_DN                      = 0x6003
-	ETHERTYPE_DOGFIGHT                = 0x1989
-	ETHERTYPE_DSMD                    = 0x8039
-	ETHERTYPE_ECMA                    = 0x803
-	ETHERTYPE_ENCRYPT                 = 0x803d
-	ETHERTYPE_ES                      = 0x805d
-	ETHERTYPE_EXCELAN                 = 0x8010
-	ETHERTYPE_EXPERDATA               = 0x8049
-	ETHERTYPE_FLIP                    = 0x8146
-	ETHERTYPE_FLOWCONTROL             = 0x8808
-	ETHERTYPE_FRARP                   = 0x808
-	ETHERTYPE_GENDYN                  = 0x8068
-	ETHERTYPE_HAYES                   = 0x8130
-	ETHERTYPE_HIPPI_FP                = 0x8180
-	ETHERTYPE_HITACHI                 = 0x8820
-	ETHERTYPE_HP                      = 0x8005
-	ETHERTYPE_IEEEPUP                 = 0xa00
-	ETHERTYPE_IEEEPUPAT               = 0xa01
-	ETHERTYPE_IMLBL                   = 0x4c42
-	ETHERTYPE_IMLBLDIAG               = 0x424c
-	ETHERTYPE_IP                      = 0x800
-	ETHERTYPE_IPAS                    = 0x876c
-	ETHERTYPE_IPV6                    = 0x86dd
-	ETHERTYPE_IPX                     = 0x8137
-	ETHERTYPE_IPXNEW                  = 0x8037
-	ETHERTYPE_KALPANA                 = 0x8582
-	ETHERTYPE_LANBRIDGE               = 0x8038
-	ETHERTYPE_LANPROBE                = 0x8888
-	ETHERTYPE_LAT                     = 0x6004
-	ETHERTYPE_LBACK                   = 0x9000
-	ETHERTYPE_LITTLE                  = 0x8060
-	ETHERTYPE_LLDP                    = 0x88cc
-	ETHERTYPE_LOGICRAFT               = 0x8148
-	ETHERTYPE_LOOPBACK                = 0x9000
-	ETHERTYPE_MATRA                   = 0x807a
-	ETHERTYPE_MAX                     = 0xffff
-	ETHERTYPE_MERIT                   = 0x807c
-	ETHERTYPE_MICP                    = 0x873a
-	ETHERTYPE_MOPDL                   = 0x6001
-	ETHERTYPE_MOPRC                   = 0x6002
-	ETHERTYPE_MOTOROLA                = 0x818d
-	ETHERTYPE_MPLS                    = 0x8847
-	ETHERTYPE_MPLS_MCAST              = 0x8848
-	ETHERTYPE_MUMPS                   = 0x813f
-	ETHERTYPE_NBPCC                   = 0x3c04
-	ETHERTYPE_NBPCLAIM                = 0x3c09
-	ETHERTYPE_NBPCLREQ                = 0x3c05
-	ETHERTYPE_NBPCLRSP                = 0x3c06
-	ETHERTYPE_NBPCREQ                 = 0x3c02
-	ETHERTYPE_NBPCRSP                 = 0x3c03
-	ETHERTYPE_NBPDG                   = 0x3c07
-	ETHERTYPE_NBPDGB                  = 0x3c08
-	ETHERTYPE_NBPDLTE                 = 0x3c0a
-	ETHERTYPE_NBPRAR                  = 0x3c0c
-	ETHERTYPE_NBPRAS                  = 0x3c0b
-	ETHERTYPE_NBPRST                  = 0x3c0d
-	ETHERTYPE_NBPSCD                  = 0x3c01
-	ETHERTYPE_NBPVCD                  = 0x3c00
-	ETHERTYPE_NBS                     = 0x802
-	ETHERTYPE_NCD                     = 0x8149
-	ETHERTYPE_NESTAR                  = 0x8006
-	ETHERTYPE_NETBEUI                 = 0x8191
-	ETHERTYPE_NOVELL                  = 0x8138
-	ETHERTYPE_NS                      = 0x600
-	ETHERTYPE_NSAT                    = 0x601
-	ETHERTYPE_NSCOMPAT                = 0x807
-	ETHERTYPE_NTRAILER                = 0x10
-	ETHERTYPE_OS9                     = 0x7007
-	ETHERTYPE_OS9NET                  = 0x7009
-	ETHERTYPE_PACER                   = 0x80c6
-	ETHERTYPE_PAE                     = 0x888e
-	ETHERTYPE_PCS                     = 0x4242
-	ETHERTYPE_PLANNING                = 0x8044
-	ETHERTYPE_PPP                     = 0x880b
-	ETHERTYPE_PPPOE                   = 0x8864
-	ETHERTYPE_PPPOEDISC               = 0x8863
-	ETHERTYPE_PRIMENTS                = 0x7031
-	ETHERTYPE_PUP                     = 0x200
-	ETHERTYPE_PUPAT                   = 0x200
-	ETHERTYPE_QINQ                    = 0x88a8
-	ETHERTYPE_RACAL                   = 0x7030
-	ETHERTYPE_RATIONAL                = 0x8150
-	ETHERTYPE_RAWFR                   = 0x6559
-	ETHERTYPE_RCL                     = 0x1995
-	ETHERTYPE_RDP                     = 0x8739
-	ETHERTYPE_RETIX                   = 0x80f2
-	ETHERTYPE_REVARP                  = 0x8035
-	ETHERTYPE_SCA                     = 0x6007
-	ETHERTYPE_SECTRA                  = 0x86db
-	ETHERTYPE_SECUREDATA              = 0x876d
-	ETHERTYPE_SGITW                   = 0x817e
-	ETHERTYPE_SG_BOUNCE               = 0x8016
-	ETHERTYPE_SG_DIAG                 = 0x8013
-	ETHERTYPE_SG_NETGAMES             = 0x8014
-	ETHERTYPE_SG_RESV                 = 0x8015
-	ETHERTYPE_SIMNET                  = 0x5208
-	ETHERTYPE_SLOW                    = 0x8809
-	ETHERTYPE_SNA                     = 0x80d5
-	ETHERTYPE_SNMP                    = 0x814c
-	ETHERTYPE_SONIX                   = 0xfaf5
-	ETHERTYPE_SPIDER                  = 0x809f
-	ETHERTYPE_SPRITE                  = 0x500
-	ETHERTYPE_STP                     = 0x8181
-	ETHERTYPE_TALARIS                 = 0x812b
-	ETHERTYPE_TALARISMC               = 0x852b
-	ETHERTYPE_TCPCOMP                 = 0x876b
-	ETHERTYPE_TCPSM                   = 0x9002
-	ETHERTYPE_TEC                     = 0x814f
-	ETHERTYPE_TIGAN                   = 0x802f
-	ETHERTYPE_TRAIL                   = 0x1000
-	ETHERTYPE_TRANSETHER              = 0x6558
-	ETHERTYPE_TYMSHARE                = 0x802e
-	ETHERTYPE_UBBST                   = 0x7005
-	ETHERTYPE_UBDEBUG                 = 0x900
-	ETHERTYPE_UBDIAGLOOP              = 0x7002
-	ETHERTYPE_UBDL                    = 0x7000
-	ETHERTYPE_UBNIU                   = 0x7001
-	ETHERTYPE_UBNMC                   = 0x7003
-	ETHERTYPE_VALID                   = 0x1600
-	ETHERTYPE_VARIAN                  = 0x80dd
-	ETHERTYPE_VAXELN                  = 0x803b
-	ETHERTYPE_VEECO                   = 0x8067
-	ETHERTYPE_VEXP                    = 0x805b
-	ETHERTYPE_VGLAB                   = 0x8131
-	ETHERTYPE_VINES                   = 0xbad
-	ETHERTYPE_VINESECHO               = 0xbaf
-	ETHERTYPE_VINESLOOP               = 0xbae
-	ETHERTYPE_VITAL                   = 0xff00
-	ETHERTYPE_VLAN                    = 0x8100
-	ETHERTYPE_VLTLMAN                 = 0x8080
-	ETHERTYPE_VPROD                   = 0x805c
-	ETHERTYPE_VURESERVED              = 0x8147
-	ETHERTYPE_WATERLOO                = 0x8130
-	ETHERTYPE_WELLFLEET               = 0x8103
-	ETHERTYPE_X25                     = 0x805
-	ETHERTYPE_X75                     = 0x801
-	ETHERTYPE_XNSSM                   = 0x9001
-	ETHERTYPE_XTP                     = 0x817d
-	ETHER_ADDR_LEN                    = 0x6
-	ETHER_ALIGN                       = 0x2
-	ETHER_CRC_LEN                     = 0x4
-	ETHER_CRC_POLY_BE                 = 0x4c11db6
-	ETHER_CRC_POLY_LE                 = 0xedb88320
-	ETHER_HDR_LEN                     = 0xe
-	ETHER_MAX_DIX_LEN                 = 0x600
-	ETHER_MAX_LEN                     = 0x5ee
-	ETHER_MIN_LEN                     = 0x40
-	ETHER_TYPE_LEN                    = 0x2
-	ETHER_VLAN_ENCAP_LEN              = 0x4
-	EVFILT_AIO                        = -0x3
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0x7
-	EVFILT_TIMER                      = -0x7
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0xa
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETOWN                          = 0x5
-	F_OK                              = 0x0
-	F_RDLCK                           = 0x1
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETOWN                          = 0x6
-	F_UNLCK                           = 0x2
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFAN_ARRIVAL                      = 0x0
-	IFAN_DEPARTURE                    = 0x1
-	IFA_ROUTE                         = 0x1
-	IFF_ALLMULTI                      = 0x200
-	IFF_BROADCAST                     = 0x2
-	IFF_CANTCHANGE                    = 0x8e52
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_A12MPPSWITCH                  = 0x82
-	IFT_AAL2                          = 0xbb
-	IFT_AAL5                          = 0x31
-	IFT_ADSL                          = 0x5e
-	IFT_AFLANE8023                    = 0x3b
-	IFT_AFLANE8025                    = 0x3c
-	IFT_ARAP                          = 0x58
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ASYNC                         = 0x54
-	IFT_ATM                           = 0x25
-	IFT_ATMDXI                        = 0x69
-	IFT_ATMFUNI                       = 0x6a
-	IFT_ATMIMA                        = 0x6b
-	IFT_ATMLOGICAL                    = 0x50
-	IFT_ATMRADIO                      = 0xbd
-	IFT_ATMSUBINTERFACE               = 0x86
-	IFT_ATMVCIENDPT                   = 0xc2
-	IFT_ATMVIRTUAL                    = 0x95
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
-	IFT_BLUETOOTH                     = 0xf8
-	IFT_BRIDGE                        = 0xd1
-	IFT_BSC                           = 0x53
-	IFT_CARP                          = 0xf7
-	IFT_CCTEMUL                       = 0x3d
-	IFT_CEPT                          = 0x13
-	IFT_CES                           = 0x85
-	IFT_CHANNEL                       = 0x46
-	IFT_CNR                           = 0x55
-	IFT_COFFEE                        = 0x84
-	IFT_COMPOSITELINK                 = 0x9b
-	IFT_DCN                           = 0x8d
-	IFT_DIGITALPOWERLINE              = 0x8a
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-	IFT_DLSW                          = 0x4a
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
-	IFT_DOCSCABLEMACLAYER             = 0x7f
-	IFT_DOCSCABLEUPSTREAM             = 0x81
-	IFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd
-	IFT_DS0                           = 0x51
-	IFT_DS0BUNDLE                     = 0x52
-	IFT_DS1FDL                        = 0xaa
-	IFT_DS3                           = 0x1e
-	IFT_DTM                           = 0x8c
-	IFT_DUMMY                         = 0xf1
-	IFT_DVBASILN                      = 0xac
-	IFT_DVBASIOUT                     = 0xad
-	IFT_DVBRCCDOWNSTREAM              = 0x93
-	IFT_DVBRCCMACLAYER                = 0x92
-	IFT_DVBRCCUPSTREAM                = 0x94
-	IFT_ECONET                        = 0xce
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_EPLRS                         = 0x57
-	IFT_ESCON                         = 0x49
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0xf3
-	IFT_FAST                          = 0x7d
-	IFT_FASTETHER                     = 0x3e
-	IFT_FASTETHERFX                   = 0x45
-	IFT_FDDI                          = 0xf
-	IFT_FIBRECHANNEL                  = 0x38
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
-	IFT_FRAMERELAYMPI                 = 0x5c
-	IFT_FRDLCIENDPT                   = 0xc1
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_FRF16MFRBUNDLE                = 0xa3
-	IFT_FRFORWARD                     = 0x9e
-	IFT_G703AT2MB                     = 0x43
-	IFT_G703AT64K                     = 0x42
-	IFT_GIF                           = 0xf0
-	IFT_GIGABITETHERNET               = 0x75
-	IFT_GR303IDT                      = 0xb2
-	IFT_GR303RDT                      = 0xb1
-	IFT_H323GATEKEEPER                = 0xa4
-	IFT_H323PROXY                     = 0xa5
-	IFT_HDH1822                       = 0x3
-	IFT_HDLC                          = 0x76
-	IFT_HDSL2                         = 0xa8
-	IFT_HIPERLAN2                     = 0xb7
-	IFT_HIPPI                         = 0x2f
-	IFT_HIPPIINTERFACE                = 0x39
-	IFT_HOSTPAD                       = 0x5a
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IBM370PARCHAN                 = 0x48
-	IFT_IDSL                          = 0x9a
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE80211                     = 0x47
-	IFT_IEEE80212                     = 0x37
-	IFT_IEEE8023ADLAG                 = 0xa1
-	IFT_IFGSN                         = 0x91
-	IFT_IMT                           = 0xbe
-	IFT_INFINIBAND                    = 0xc7
-	IFT_INTERLEAVE                    = 0x7c
-	IFT_IP                            = 0x7e
-	IFT_IPFORWARD                     = 0x8e
-	IFT_IPOVERATM                     = 0x72
-	IFT_IPOVERCDLC                    = 0x6d
-	IFT_IPOVERCLAW                    = 0x6e
-	IFT_IPSWITCH                      = 0x4e
-	IFT_ISDN                          = 0x3f
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISDNS                         = 0x4b
-	IFT_ISDNU                         = 0x4c
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88025CRFPINT               = 0x62
-	IFT_ISO88025DTR                   = 0x56
-	IFT_ISO88025FIBER                 = 0x73
-	IFT_ISO88026                      = 0xa
-	IFT_ISUP                          = 0xb3
-	IFT_L2VLAN                        = 0x87
-	IFT_L3IPVLAN                      = 0x88
-	IFT_L3IPXVLAN                     = 0x89
-	IFT_LAPB                          = 0x10
-	IFT_LAPD                          = 0x4d
-	IFT_LAPF                          = 0x77
-	IFT_LINEGROUP                     = 0xd2
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MEDIAMAILOVERIP               = 0x8b
-	IFT_MFSIGLINK                     = 0xa7
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_MPC                           = 0x71
-	IFT_MPLS                          = 0xa6
-	IFT_MPLSTUNNEL                    = 0x96
-	IFT_MSDSL                         = 0x8f
-	IFT_MVL                           = 0xbf
-	IFT_MYRINET                       = 0x63
-	IFT_NFAS                          = 0xaf
-	IFT_NSIP                          = 0x1b
-	IFT_OPTICALCHANNEL                = 0xc3
-	IFT_OPTICALTRANSPORT              = 0xc4
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PFLOG                         = 0xf5
-	IFT_PFLOW                         = 0xf9
-	IFT_PFSYNC                        = 0xf6
-	IFT_PLC                           = 0xae
-	IFT_PON155                        = 0xcf
-	IFT_PON622                        = 0xd0
-	IFT_POS                           = 0xab
-	IFT_PPP                           = 0x17
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
-	IFT_PROPATM                       = 0xc5
-	IFT_PROPBWAP2MP                   = 0xb8
-	IFT_PROPCNLS                      = 0x59
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PROPWIRELESSP2P               = 0x9d
-	IFT_PTPSERIAL                     = 0x16
-	IFT_PVC                           = 0xf2
-	IFT_Q2931                         = 0xc9
-	IFT_QLLC                          = 0x44
-	IFT_RADIOMAC                      = 0xbc
-	IFT_RADSL                         = 0x5f
-	IFT_REACHDSL                      = 0xc0
-	IFT_RFC1483                       = 0x9f
-	IFT_RS232                         = 0x21
-	IFT_RSRB                          = 0x4f
-	IFT_SDLC                          = 0x11
-	IFT_SDSL                          = 0x60
-	IFT_SHDSL                         = 0xa9
-	IFT_SIP                           = 0x1f
-	IFT_SIPSIG                        = 0xcc
-	IFT_SIPTG                         = 0xcb
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_SRP                           = 0x97
-	IFT_SS7SIGLINK                    = 0x9c
-	IFT_STACKTOSTACK                  = 0x6f
-	IFT_STARLAN                       = 0xb
-	IFT_T1                            = 0x12
-	IFT_TDLC                          = 0x74
-	IFT_TELINK                        = 0xc8
-	IFT_TERMPAD                       = 0x5b
-	IFT_TR008                         = 0xb0
-	IFT_TRANSPHDLC                    = 0x7b
-	IFT_TUNNEL                        = 0x83
-	IFT_ULTRA                         = 0x1d
-	IFT_USB                           = 0xa0
-	IFT_V11                           = 0x40
-	IFT_V35                           = 0x2d
-	IFT_V36                           = 0x41
-	IFT_V37                           = 0x78
-	IFT_VDSL                          = 0x61
-	IFT_VIRTUALIPADDRESS              = 0x70
-	IFT_VIRTUALTG                     = 0xca
-	IFT_VOICEDID                      = 0xd5
-	IFT_VOICEEM                       = 0x64
-	IFT_VOICEEMFGD                    = 0xd3
-	IFT_VOICEENCAP                    = 0x67
-	IFT_VOICEFGDEANA                  = 0xd4
-	IFT_VOICEFXO                      = 0x65
-	IFT_VOICEFXS                      = 0x66
-	IFT_VOICEOVERATM                  = 0x98
-	IFT_VOICEOVERCABLE                = 0xc6
-	IFT_VOICEOVERFRAMERELAY           = 0x99
-	IFT_VOICEOVERIP                   = 0x68
-	IFT_X213                          = 0x5d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25HUNTGROUP                  = 0x7a
-	IFT_X25MLP                        = 0x79
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LOOPBACKNET                    = 0x7f
-	IN_RFC3021_HOST                   = 0x1
-	IN_RFC3021_NET                    = 0xfffffffe
-	IN_RFC3021_NSHIFT                 = 0x1f
-	IPPROTO_AH                        = 0x33
-	IPPROTO_CARP                      = 0x70
-	IPPROTO_DIVERT                    = 0x102
-	IPPROTO_DIVERT_INIT               = 0x2
-	IPPROTO_DIVERT_RESP               = 0x1
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x103
-	IPPROTO_MOBILE                    = 0x37
-	IPPROTO_MPLS                      = 0x89
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_PFSYNC                    = 0xf0
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_UDP                       = 0x11
-	IPV6_AUTH_LEVEL                   = 0x35
-	IPV6_AUTOFLOWLABEL                = 0x3b
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_DONTFRAG                     = 0x3e
-	IPV6_DSTOPTS                      = 0x32
-	IPV6_ESP_NETWORK_LEVEL            = 0x37
-	IPV6_ESP_TRANS_LEVEL              = 0x36
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_HOPLIMIT                     = 0x2f
-	IPV6_HOPOPTS                      = 0x31
-	IPV6_IPCOMP_LEVEL                 = 0x3c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_NEXTHOP                      = 0x30
-	IPV6_OPTIONS                      = 0x1
-	IPV6_PATHMTU                      = 0x2c
-	IPV6_PIPEX                        = 0x3f
-	IPV6_PKTINFO                      = 0x2e
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVDSTOPTS                  = 0x28
-	IPV6_RECVDSTPORT                  = 0x40
-	IPV6_RECVHOPLIMIT                 = 0x25
-	IPV6_RECVHOPOPTS                  = 0x27
-	IPV6_RECVPATHMTU                  = 0x2b
-	IPV6_RECVPKTINFO                  = 0x24
-	IPV6_RECVRTHDR                    = 0x26
-	IPV6_RECVTCLASS                   = 0x39
-	IPV6_RTABLE                       = 0x1021
-	IPV6_RTHDR                        = 0x33
-	IPV6_RTHDRDSTOPTS                 = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x3d
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_USE_MIN_MTU                  = 0x2a
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_AUTH_LEVEL                     = 0x14
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DIVERTFL                       = 0x1022
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_ESP_NETWORK_LEVEL              = 0x16
-	IP_ESP_TRANS_LEVEL                = 0x15
-	IP_HDRINCL                        = 0x2
-	IP_IPCOMP_LEVEL                   = 0x1d
-	IP_IPSECFLOWINFO                  = 0x24
-	IP_IPSEC_LOCAL_AUTH               = 0x1b
-	IP_IPSEC_LOCAL_CRED               = 0x19
-	IP_IPSEC_LOCAL_ID                 = 0x17
-	IP_IPSEC_REMOTE_AUTH              = 0x1c
-	IP_IPSEC_REMOTE_CRED              = 0x1a
-	IP_IPSEC_REMOTE_ID                = 0x18
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MF                             = 0x2000
-	IP_MINTTL                         = 0x20
-	IP_MIN_MEMBERSHIPS                = 0xf
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_OFFMASK                        = 0x1fff
-	IP_OPTIONS                        = 0x1
-	IP_PIPEX                          = 0x22
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVDSTPORT                    = 0x21
-	IP_RECVIF                         = 0x1e
-	IP_RECVOPTS                       = 0x5
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVRTABLE                     = 0x23
-	IP_RECVTTL                        = 0x1f
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RTABLE                         = 0x1021
-	IP_TOS                            = 0x3
-	IP_TTL                            = 0x4
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LCNT_OVERLOAD_FLUSH               = 0x6
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x6
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_SPACEAVAIL                   = 0x5
-	MADV_WILLNEED                     = 0x3
-	MAP_ANON                          = 0x1000
-	MAP_COPY                          = 0x4
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_FLAGMASK                      = 0x1ff7
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_INHERIT                       = 0x80
-	MAP_INHERIT_COPY                  = 0x1
-	MAP_INHERIT_DONATE_COPY           = 0x3
-	MAP_INHERIT_NONE                  = 0x2
-	MAP_INHERIT_SHARE                 = 0x0
-	MAP_NOEXTEND                      = 0x100
-	MAP_NORESERVE                     = 0x40
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_SHARED                        = 0x1
-	MAP_TRYFIXED                      = 0x400
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_BCAST                         = 0x100
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOR                           = 0x8
-	MSG_MCAST                         = 0x200
-	MSG_NOSIGNAL                      = 0x400
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MS_ASYNC                          = 0x1
-	MS_INVALIDATE                     = 0x4
-	MS_SYNC                           = 0x2
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_MAXID                      = 0x6
-	NET_RT_STATS                      = 0x4
-	NET_RT_TABLE                      = 0x5
-	NOFLSH                            = 0x80000000
-	NOTE_ATTRIB                       = 0x8
-	NOTE_CHILD                        = 0x4
-	NOTE_DELETE                       = 0x1
-	NOTE_EOF                          = 0x2
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FORK                         = 0x40000000
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_PCTRLMASK                    = 0xf0000000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRUNCATE                     = 0x80
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	ONLCR                             = 0x2
-	ONLRET                            = 0x80
-	ONOCR                             = 0x40
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x10000
-	O_CREAT                           = 0x200
-	O_DIRECTORY                       = 0x20000
-	O_DSYNC                           = 0x80
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x8000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_RSYNC                           = 0x80
-	O_SHLOCK                          = 0x10
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PF_FLUSH                          = 0x1
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	PT_MASK                           = 0x3ff000
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_LABEL                        = 0xa
-	RTAX_MAX                          = 0xb
-	RTAX_NETMASK                      = 0x2
-	RTAX_SRC                          = 0x8
-	RTAX_SRCMASK                      = 0x9
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_LABEL                         = 0x400
-	RTA_NETMASK                       = 0x4
-	RTA_SRC                           = 0x100
-	RTA_SRCMASK                       = 0x200
-	RTF_ANNOUNCE                      = 0x4000
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_CLONED                        = 0x10000
-	RTF_CLONING                       = 0x100
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_FMASK                         = 0x10f808
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_LLINFO                        = 0x400
-	RTF_MASK                          = 0x80
-	RTF_MODIFIED                      = 0x20
-	RTF_MPATH                         = 0x40000
-	RTF_MPLS                          = 0x100000
-	RTF_PERMANENT_ARP                 = 0x2000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x2000
-	RTF_REJECT                        = 0x8
-	RTF_SOURCE                        = 0x20000
-	RTF_STATIC                        = 0x800
-	RTF_TUNNEL                        = 0x100000
-	RTF_UP                            = 0x1
-	RTF_USETRAILERS                   = 0x8000
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DESYNC                        = 0x10
-	RTM_GET                           = 0x4
-	RTM_IFANNOUNCE                    = 0xf
-	RTM_IFINFO                        = 0xe
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MAXSIZE                       = 0x800
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RT_TABLEID_MAX                    = 0xff
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	RUSAGE_THREAD                     = 0x1
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x4
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCAIFGROUP                      = 0x80246987
-	SIOCALIFADDR                      = 0x8218691c
-	SIOCATMARK                        = 0x40047307
-	SIOCBRDGADD                       = 0x8054693c
-	SIOCBRDGADDS                      = 0x80546941
-	SIOCBRDGARL                       = 0x806e694d
-	SIOCBRDGDADDR                     = 0x81286947
-	SIOCBRDGDEL                       = 0x8054693d
-	SIOCBRDGDELS                      = 0x80546942
-	SIOCBRDGFLUSH                     = 0x80546948
-	SIOCBRDGFRL                       = 0x806e694e
-	SIOCBRDGGCACHE                    = 0xc0146941
-	SIOCBRDGGFD                       = 0xc0146952
-	SIOCBRDGGHT                       = 0xc0146951
-	SIOCBRDGGIFFLGS                   = 0xc054693e
-	SIOCBRDGGMA                       = 0xc0146953
-	SIOCBRDGGPARAM                    = 0xc03c6958
-	SIOCBRDGGPRI                      = 0xc0146950
-	SIOCBRDGGRL                       = 0xc028694f
-	SIOCBRDGGSIFS                     = 0xc054693c
-	SIOCBRDGGTO                       = 0xc0146946
-	SIOCBRDGIFS                       = 0xc0546942
-	SIOCBRDGRTS                       = 0xc0186943
-	SIOCBRDGSADDR                     = 0xc1286944
-	SIOCBRDGSCACHE                    = 0x80146940
-	SIOCBRDGSFD                       = 0x80146952
-	SIOCBRDGSHT                       = 0x80146951
-	SIOCBRDGSIFCOST                   = 0x80546955
-	SIOCBRDGSIFFLGS                   = 0x8054693f
-	SIOCBRDGSIFPRIO                   = 0x80546954
-	SIOCBRDGSMA                       = 0x80146953
-	SIOCBRDGSPRI                      = 0x80146950
-	SIOCBRDGSPROTO                    = 0x8014695a
-	SIOCBRDGSTO                       = 0x80146945
-	SIOCBRDGSTXHC                     = 0x80146959
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFGROUP                      = 0x80246989
-	SIOCDIFPHYADDR                    = 0x80206949
-	SIOCDLIFADDR                      = 0x8218691e
-	SIOCGETKALIVE                     = 0xc01869a4
-	SIOCGETLABEL                      = 0x8020699a
-	SIOCGETPFLOW                      = 0xc02069fe
-	SIOCGETPFSYNC                     = 0xc02069f8
-	SIOCGETSGCNT                      = 0xc0147534
-	SIOCGETVIFCNT                     = 0xc0147533
-	SIOCGETVLAN                       = 0xc0206990
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFASYNCMAP                   = 0xc020697c
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCONF                       = 0xc0086924
-	SIOCGIFDATA                       = 0xc020691b
-	SIOCGIFDESCR                      = 0xc0206981
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGATTR                      = 0xc024698b
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFGMEMB                      = 0xc024698a
-	SIOCGIFGROUP                      = 0xc0246988
-	SIOCGIFHARDMTU                    = 0xc02069a5
-	SIOCGIFMEDIA                      = 0xc0286936
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc020697e
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206948
-	SIOCGIFPRIORITY                   = 0xc020699c
-	SIOCGIFPSRCADDR                   = 0xc0206947
-	SIOCGIFRDOMAIN                    = 0xc02069a0
-	SIOCGIFRTLABEL                    = 0xc0206983
-	SIOCGIFTIMESLOT                   = 0xc0206986
-	SIOCGIFXFLAGS                     = 0xc020699e
-	SIOCGLIFADDR                      = 0xc218691d
-	SIOCGLIFPHYADDR                   = 0xc218694b
-	SIOCGLIFPHYRTABLE                 = 0xc02069a2
-	SIOCGLIFPHYTTL                    = 0xc02069a9
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCGSPPPPARAMS                   = 0xc0206994
-	SIOCGVH                           = 0xc02069f6
-	SIOCGVNETID                       = 0xc02069a7
-	SIOCIFCREATE                      = 0x8020697a
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc00c6978
-	SIOCSETKALIVE                     = 0x801869a3
-	SIOCSETLABEL                      = 0x80206999
-	SIOCSETPFLOW                      = 0x802069fd
-	SIOCSETPFSYNC                     = 0x802069f7
-	SIOCSETVLAN                       = 0x8020698f
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFASYNCMAP                   = 0x8020697d
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFDESCR                      = 0x80206980
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGATTR                      = 0x8024698c
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFLLADDR                     = 0x8020691f
-	SIOCSIFMEDIA                      = 0xc0206935
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x8020697f
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x80406946
-	SIOCSIFPRIORITY                   = 0x8020699b
-	SIOCSIFRDOMAIN                    = 0x8020699f
-	SIOCSIFRTLABEL                    = 0x80206982
-	SIOCSIFTIMESLOT                   = 0x80206985
-	SIOCSIFXFLAGS                     = 0x8020699d
-	SIOCSLIFPHYADDR                   = 0x8218694a
-	SIOCSLIFPHYRTABLE                 = 0x802069a1
-	SIOCSLIFPHYTTL                    = 0x802069a8
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SIOCSSPPPPARAMS                   = 0x80206993
-	SIOCSVH                           = 0xc02069f5
-	SIOCSVNETID                       = 0x802069a6
-	SOCK_DGRAM                        = 0x2
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_BINDANY                        = 0x1000
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LINGER                         = 0x80
-	SO_NETPROC                        = 0x1020
-	SO_OOBINLINE                      = 0x100
-	SO_PEERCRED                       = 0x1022
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_RTABLE                         = 0x1021
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_SPLICE                         = 0x1023
-	SO_TIMESTAMP                      = 0x800
-	SO_TYPE                           = 0x1008
-	SO_USELOOPBACK                    = 0x40
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_MAXBURST                      = 0x4
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x3
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MD5SIG                        = 0x4
-	TCP_MSS                           = 0x200
-	TCP_NODELAY                       = 0x1
-	TCP_NOPUSH                        = 0x10
-	TCP_NSTATES                       = 0xb
-	TCP_SACK_ENABLE                   = 0x8
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDRAIN                         = 0x2000745e
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLAG_CLOCAL                   = 0x2
-	TIOCFLAG_CRTSCTS                  = 0x4
-	TIOCFLAG_MDMBUF                   = 0x8
-	TIOCFLAG_PPS                      = 0x10
-	TIOCFLAG_SOFTCAR                  = 0x1
-	TIOCFLUSH                         = 0x80047410
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGFLAGS                        = 0x4004745d
-	TIOCGPGRP                         = 0x40047477
-	TIOCGSID                          = 0x40047463
-	TIOCGTSTAMP                       = 0x400c745b
-	TIOCGWINSZ                        = 0x40087468
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGET                          = 0x4004746a
-	TIOCMODG                          = 0x4004746a
-	TIOCMODS                          = 0x8004746d
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSFLAGS                        = 0x8004745c
-	TIOCSIG                           = 0x8004745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x80047465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSTSTAMP                       = 0x8008745a
-	TIOCSWINSZ                        = 0x80087467
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WALTSIG                           = 0x4
-	WCONTINUED                        = 0x8
-	WCOREFLAG                         = 0x80
-	WNOHANG                           = 0x1
-	WSTOPPED                          = 0x7f
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADF           = syscall.Errno(0x9)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x58)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDOM            = syscall.Errno(0x21)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x59)
-	EILSEQ          = syscall.Errno(0x54)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EIPSEC          = syscall.Errno(0x52)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x5b)
-	ELOOP           = syscall.Errno(0x3e)
-	EMEDIUMTYPE     = syscall.Errno(0x56)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x53)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOMEDIUM       = syscall.Errno(0x55)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x5a)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x5b)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x2d)
-	EOVERFLOW       = syscall.Errno(0x57)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTHR    = syscall.Signal(0x20)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:  "operation not permitted",
-	2:  "no such file or directory",
-	3:  "no such process",
-	4:  "interrupted system call",
-	5:  "input/output error",
-	6:  "device not configured",
-	7:  "argument list too long",
-	8:  "exec format error",
-	9:  "bad file descriptor",
-	10: "no child processes",
-	11: "resource deadlock avoided",
-	12: "cannot allocate memory",
-	13: "permission denied",
-	14: "bad address",
-	15: "block device required",
-	16: "device busy",
-	17: "file exists",
-	18: "cross-device link",
-	19: "operation not supported by device",
-	20: "not a directory",
-	21: "is a directory",
-	22: "invalid argument",
-	23: "too many open files in system",
-	24: "too many open files",
-	25: "inappropriate ioctl for device",
-	26: "text file busy",
-	27: "file too large",
-	28: "no space left on device",
-	29: "illegal seek",
-	30: "read-only file system",
-	31: "too many links",
-	32: "broken pipe",
-	33: "numerical argument out of domain",
-	34: "result too large",
-	35: "resource temporarily unavailable",
-	36: "operation now in progress",
-	37: "operation already in progress",
-	38: "socket operation on non-socket",
-	39: "destination address required",
-	40: "message too long",
-	41: "protocol wrong type for socket",
-	42: "protocol not available",
-	43: "protocol not supported",
-	44: "socket type not supported",
-	45: "operation not supported",
-	46: "protocol family not supported",
-	47: "address family not supported by protocol family",
-	48: "address already in use",
-	49: "can't assign requested address",
-	50: "network is down",
-	51: "network is unreachable",
-	52: "network dropped connection on reset",
-	53: "software caused connection abort",
-	54: "connection reset by peer",
-	55: "no buffer space available",
-	56: "socket is already connected",
-	57: "socket is not connected",
-	58: "can't send after socket shutdown",
-	59: "too many references: can't splice",
-	60: "connection timed out",
-	61: "connection refused",
-	62: "too many levels of symbolic links",
-	63: "file name too long",
-	64: "host is down",
-	65: "no route to host",
-	66: "directory not empty",
-	67: "too many processes",
-	68: "too many users",
-	69: "disc quota exceeded",
-	70: "stale NFS file handle",
-	71: "too many levels of remote in path",
-	72: "RPC struct is bad",
-	73: "RPC version wrong",
-	74: "RPC prog. not avail",
-	75: "program version wrong",
-	76: "bad procedure for program",
-	77: "no locks available",
-	78: "function not implemented",
-	79: "inappropriate file type or format",
-	80: "authentication error",
-	81: "need authenticator",
-	82: "IPsec processing failure",
-	83: "attribute not found",
-	84: "illegal byte sequence",
-	85: "no medium found",
-	86: "wrong medium type",
-	87: "value too large to be stored in data type",
-	88: "operation canceled",
-	89: "identifier removed",
-	90: "no message of desired type",
-	91: "not supported",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "stopped (signal)",
-	18: "stopped",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-	32: "thread AST",
-}


[03/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
deleted file mode 100644
index bf6f360..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ /dev/null
@@ -1,1814 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_mips64x.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build mips64,linux
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(arg)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(source)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	var _p2 *byte
-	_p2, err = BytePtrFromString(fstype)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	use(unsafe.Pointer(_p2))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
-	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
-	state = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
-	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
-	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
-	tid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(dest) > 0 {
-		_p2 = unsafe.Pointer(&dest[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(pathname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
-	use(unsafe.Pointer(_p0))
-	watchdesc = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
-	success = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(dest) > 0 {
-		_p1 = unsafe.Pointer(&dest[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
-	use(unsafe.Pointer(_p0))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(newroot)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(putold)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
-	_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(data) > 0 {
-		_p2 = unsafe.Pointer(&data[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
-	Syscall(SYS_SYNC, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
-	ticks = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
-	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
-	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
-	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
-	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(events) > 0 {
-		_p0 = unsafe.Pointer(&events[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	euid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
-	_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	off = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
-	written = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
-	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	nn = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fstat(fd int, st *stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func lstat(path string, st *stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func stat(path string, st *stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}



[54/67] [abbrv] incubator-mynewt-newtmgr git commit: MYNEWT-677 NMP: Include next_index in log show rsp

Posted by cc...@apache.org.
MYNEWT-677 NMP: Include next_index in log show rsp

The next_index value (index of next log entry to be written) is useful
for determining if a device's flash has been wiped since the last time
logs were scoured.

The new value is at the top-level of the log show response with the
following name: next_index.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/f58e088a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/f58e088a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/f58e088a

Branch: refs/heads/master
Commit: f58e088afe150825556f0d7c47020c4490ea9dba
Parents: 02401c9
Author: Christopher Collins <cc...@apache.org>
Authored: Fri Mar 17 12:50:47 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 newtmgr/cli/log.go                                      | 1 +
 newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/log.go | 5 +++--
 nmxact/nmp/log.go                                       | 5 +++--
 3 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/f58e088a/newtmgr/cli/log.go
----------------------------------------------------------------------
diff --git a/newtmgr/cli/log.go b/newtmgr/cli/log.go
index c6658a8..cba1e5b 100644
--- a/newtmgr/cli/log.go
+++ b/newtmgr/cli/log.go
@@ -74,6 +74,7 @@ func logShowCmd(cmd *cobra.Command, args []string) {
 
 	sres := res.(*xact.LogShowResult)
 	fmt.Printf("Status: %d\n", sres.Status())
+	fmt.Printf("Next index: %d\n", sres.Rsp.NextIndex)
 	if len(sres.Rsp.Logs) == 0 {
 		fmt.Printf("(no logs retrieved)\n")
 		return

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/f58e088a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/log.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/log.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/log.go
index 3b3eff5..e03376f 100644
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/log.go
+++ b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/log.go
@@ -129,8 +129,9 @@ type LogShowLog struct {
 
 type LogShowRsp struct {
 	NmpBase
-	Rc   int          `codec:"rc" codec:",omitempty"`
-	Logs []LogShowLog `codec:"logs"`
+	Rc        int          `codec:"rc" codec:",omitempty"`
+	NextIndex uint32       `codec:"next_index"`
+	Logs      []LogShowLog `codec:"logs"`
 }
 
 func NewLogShowReq() *LogShowReq {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/f58e088a/nmxact/nmp/log.go
----------------------------------------------------------------------
diff --git a/nmxact/nmp/log.go b/nmxact/nmp/log.go
index 3b3eff5..e03376f 100644
--- a/nmxact/nmp/log.go
+++ b/nmxact/nmp/log.go
@@ -129,8 +129,9 @@ type LogShowLog struct {
 
 type LogShowRsp struct {
 	NmpBase
-	Rc   int          `codec:"rc" codec:",omitempty"`
-	Logs []LogShowLog `codec:"logs"`
+	Rc        int          `codec:"rc" codec:",omitempty"`
+	NextIndex uint32       `codec:"next_index"`
+	Logs      []LogShowLog `codec:"logs"`
 }
 
 func NewLogShowReq() *LogShowReq {


[62/67] [abbrv] incubator-mynewt-newtmgr git commit: newtmgr - use newtmgr repo, not newt repo.

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/crash.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/crash.go b/nmxact/xact/crash.go
index 002e277..ebb94c7 100644
--- a/nmxact/xact/crash.go
+++ b/nmxact/xact/crash.go
@@ -4,8 +4,8 @@ import (
 	"fmt"
 	"sort"
 
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 type CrashType int

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/datetime.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/datetime.go b/nmxact/xact/datetime.go
index 09738f5..27bd089 100644
--- a/nmxact/xact/datetime.go
+++ b/nmxact/xact/datetime.go
@@ -1,8 +1,8 @@
 package xact
 
 import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 ///////////////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/echo.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/echo.go b/nmxact/xact/echo.go
index 0be55b4..09622b2 100644
--- a/nmxact/xact/echo.go
+++ b/nmxact/xact/echo.go
@@ -1,8 +1,8 @@
 package xact
 
 import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 type EchoCmd struct {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/fs.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/fs.go b/nmxact/xact/fs.go
index 9f150fa..0fe32c6 100644
--- a/nmxact/xact/fs.go
+++ b/nmxact/xact/fs.go
@@ -3,8 +3,8 @@ package xact
 import (
 	"fmt"
 
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 //////////////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/image.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/image.go b/nmxact/xact/image.go
index 1f236a4..615dd74 100644
--- a/nmxact/xact/image.go
+++ b/nmxact/xact/image.go
@@ -3,8 +3,8 @@ package xact
 import (
 	"fmt"
 
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 //////////////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/log.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/log.go b/nmxact/xact/log.go
index d40d523..86b348f 100644
--- a/nmxact/xact/log.go
+++ b/nmxact/xact/log.go
@@ -1,8 +1,8 @@
 package xact
 
 import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 //////////////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/mpstat.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/mpstat.go b/nmxact/xact/mpstat.go
index cc2784c..acff3e2 100644
--- a/nmxact/xact/mpstat.go
+++ b/nmxact/xact/mpstat.go
@@ -1,8 +1,8 @@
 package xact
 
 import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 type MempoolStatCmd struct {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/reset.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/reset.go b/nmxact/xact/reset.go
index c7adf83..397ad60 100644
--- a/nmxact/xact/reset.go
+++ b/nmxact/xact/reset.go
@@ -1,8 +1,8 @@
 package xact
 
 import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 type ResetCmd struct {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/run.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/run.go b/nmxact/xact/run.go
index ff1e1e9..28d71a9 100644
--- a/nmxact/xact/run.go
+++ b/nmxact/xact/run.go
@@ -1,8 +1,8 @@
 package xact
 
 import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 //////////////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/stat.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/stat.go b/nmxact/xact/stat.go
index 6aa4dc3..a38eba9 100644
--- a/nmxact/xact/stat.go
+++ b/nmxact/xact/stat.go
@@ -1,8 +1,8 @@
 package xact
 
 import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 //////////////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/taskstat.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/taskstat.go b/nmxact/xact/taskstat.go
index 9ec7774..bb03357 100644
--- a/nmxact/xact/taskstat.go
+++ b/nmxact/xact/taskstat.go
@@ -1,8 +1,8 @@
 package xact
 
 import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 type TaskStatCmd struct {

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xact/xact.go
----------------------------------------------------------------------
diff --git a/nmxact/xact/xact.go b/nmxact/xact/xact.go
index 2cdf150..00c177f 100644
--- a/nmxact/xact/xact.go
+++ b/nmxact/xact/xact.go
@@ -20,8 +20,8 @@
 package xact
 
 import (
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/nmp"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 func txReq(s sesn.Sesn, m *nmp.NmpMsg, c *CmdBase) (

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/nmxact/xport/xport.go
----------------------------------------------------------------------
diff --git a/nmxact/xport/xport.go b/nmxact/xport/xport.go
index 3cdf8b5..85ef2b2 100644
--- a/nmxact/xport/xport.go
+++ b/nmxact/xport/xport.go
@@ -1,7 +1,7 @@
 package xport
 
 import (
-	"mynewt.apache.org/newt/nmxact/sesn"
+	"mynewt.apache.org/newtmgr/nmxact/sesn"
 )
 
 type RxFn func(data []byte)


[15/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
deleted file mode 100644
index ac85ca6..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go
+++ /dev/null
@@ -1,1688 +0,0 @@
-// mkerrors.sh -marm
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,netbsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -marm _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_ARP                            = 0x1c
-	AF_BLUETOOTH                      = 0x1f
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1a
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x20
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x18
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1a
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x23
-	AF_MPLS                           = 0x21
-	AF_NATM                           = 0x1b
-	AF_NS                             = 0x6
-	AF_OROUTE                         = 0x11
-	AF_OSI                            = 0x7
-	AF_PUP                            = 0x4
-	AF_ROUTE                          = 0x22
-	AF_SNA                            = 0xb
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	ARPHRD_ARCNET                     = 0x7
-	ARPHRD_ETHER                      = 0x1
-	ARPHRD_FRELAY                     = 0xf
-	ARPHRD_IEEE1394                   = 0x18
-	ARPHRD_IEEE802                    = 0x6
-	ARPHRD_STRIP                      = 0x17
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B460800                           = 0x70800
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B921600                           = 0xe1000
-	B9600                             = 0x2580
-	BIOCFEEDBACK                      = 0x8004427d
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc0084277
-	BIOCGETIF                         = 0x4090426b
-	BIOCGFEEDBACK                     = 0x4004427c
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRTIMEOUT                     = 0x400c427b
-	BIOCGSEESENT                      = 0x40044278
-	BIOCGSTATS                        = 0x4080426f
-	BIOCGSTATSOLD                     = 0x4008426f
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCPROMISC                       = 0x20004269
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDLT                          = 0x80044276
-	BIOCSETF                          = 0x80084267
-	BIOCSETIF                         = 0x8090426c
-	BIOCSFEEDBACK                     = 0x8004427d
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRTIMEOUT                     = 0x800c427a
-	BIOCSSEESENT                      = 0x80044279
-	BIOCSTCPF                         = 0x80084272
-	BIOCSUDPF                         = 0x80084273
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x4
-	BPF_ALIGNMENT32                   = 0x4
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_DFLTBUFSIZE                   = 0x100000
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x1000000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0xc
-	CTL_NET                           = 0x4
-	CTL_QUERY                         = -0x2
-	DIOCBSFLUSH                       = 0x20006478
-	DLT_A429                          = 0xb8
-	DLT_A653_ICM                      = 0xb9
-	DLT_AIRONET_HEADER                = 0x78
-	DLT_AOS                           = 0xde
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ARCNET_LINUX                  = 0x81
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AURORA                        = 0x7e
-	DLT_AX25                          = 0x3
-	DLT_AX25_KISS                     = 0xca
-	DLT_BACNET_MS_TP                  = 0xa5
-	DLT_BLUETOOTH_HCI_H4              = 0xbb
-	DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-	DLT_CAN20B                        = 0xbe
-	DLT_CAN_SOCKETCAN                 = 0xe3
-	DLT_CHAOS                         = 0x5
-	DLT_CISCO_IOS                     = 0x76
-	DLT_C_HDLC                        = 0x68
-	DLT_C_HDLC_WITH_DIR               = 0xcd
-	DLT_DECT                          = 0xdd
-	DLT_DOCSIS                        = 0x8f
-	DLT_ECONET                        = 0x73
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0x6d
-	DLT_ERF                           = 0xc5
-	DLT_ERF_ETH                       = 0xaf
-	DLT_ERF_POS                       = 0xb0
-	DLT_FC_2                          = 0xe0
-	DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-	DLT_FDDI                          = 0xa
-	DLT_FLEXRAY                       = 0xd2
-	DLT_FRELAY                        = 0x6b
-	DLT_FRELAY_WITH_DIR               = 0xce
-	DLT_GCOM_SERIAL                   = 0xad
-	DLT_GCOM_T1E1                     = 0xac
-	DLT_GPF_F                         = 0xab
-	DLT_GPF_T                         = 0xaa
-	DLT_GPRS_LLC                      = 0xa9
-	DLT_GSMTAP_ABIS                   = 0xda
-	DLT_GSMTAP_UM                     = 0xd9
-	DLT_HDLC                          = 0x10
-	DLT_HHDLC                         = 0x79
-	DLT_HIPPI                         = 0xf
-	DLT_IBM_SN                        = 0x92
-	DLT_IBM_SP                        = 0x91
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_IEEE802_15_4                  = 0xc3
-	DLT_IEEE802_15_4_LINUX            = 0xbf
-	DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-	DLT_IEEE802_16_MAC_CPS            = 0xbc
-	DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-	DLT_IPMB                          = 0xc7
-	DLT_IPMB_LINUX                    = 0xd1
-	DLT_IPNET                         = 0xe2
-	DLT_IPV4                          = 0xe4
-	DLT_IPV6                          = 0xe5
-	DLT_IP_OVER_FC                    = 0x7a
-	DLT_JUNIPER_ATM1                  = 0x89
-	DLT_JUNIPER_ATM2                  = 0x87
-	DLT_JUNIPER_CHDLC                 = 0xb5
-	DLT_JUNIPER_ES                    = 0x84
-	DLT_JUNIPER_ETHER                 = 0xb2
-	DLT_JUNIPER_FRELAY                = 0xb4
-	DLT_JUNIPER_GGSN                  = 0x85
-	DLT_JUNIPER_ISM                   = 0xc2
-	DLT_JUNIPER_MFR                   = 0x86
-	DLT_JUNIPER_MLFR                  = 0x83
-	DLT_JUNIPER_MLPPP                 = 0x82
-	DLT_JUNIPER_MONITOR               = 0xa4
-	DLT_JUNIPER_PIC_PEER              = 0xae
-	DLT_JUNIPER_PPP                   = 0xb3
-	DLT_JUNIPER_PPPOE                 = 0xa7
-	DLT_JUNIPER_PPPOE_ATM             = 0xa8
-	DLT_JUNIPER_SERVICES              = 0x88
-	DLT_JUNIPER_ST                    = 0xc8
-	DLT_JUNIPER_VP                    = 0xb7
-	DLT_LAPB_WITH_DIR                 = 0xcf
-	DLT_LAPD                          = 0xcb
-	DLT_LIN                           = 0xd4
-	DLT_LINUX_EVDEV                   = 0xd8
-	DLT_LINUX_IRDA                    = 0x90
-	DLT_LINUX_LAPD                    = 0xb1
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_LTALK                         = 0x72
-	DLT_MFR                           = 0xb6
-	DLT_MOST                          = 0xd3
-	DLT_MPLS                          = 0xdb
-	DLT_MTP2                          = 0x8c
-	DLT_MTP2_WITH_PHDR                = 0x8b
-	DLT_MTP3                          = 0x8d
-	DLT_NULL                          = 0x0
-	DLT_PCI_EXP                       = 0x7d
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x12
-	DLT_PPI                           = 0xc0
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0xe
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_PPPD                      = 0xa6
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PPP_WITH_DIR                  = 0xcc
-	DLT_PRISM_HEADER                  = 0x77
-	DLT_PRONET                        = 0x4
-	DLT_RAIF1                         = 0xc6
-	DLT_RAW                           = 0xc
-	DLT_RAWAF_MASK                    = 0x2240000
-	DLT_RIO                           = 0x7c
-	DLT_SCCP                          = 0x8e
-	DLT_SITA                          = 0xc4
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xd
-	DLT_SUNATM                        = 0x7b
-	DLT_SYMANTEC_FIREWALL             = 0x63
-	DLT_TZSP                          = 0x80
-	DLT_USB                           = 0xba
-	DLT_USB_LINUX                     = 0xbd
-	DLT_USB_LINUX_MMAPPED             = 0xdc
-	DLT_WIHART                        = 0xdf
-	DLT_X2E_SERIAL                    = 0xd5
-	DLT_X2E_XORAYA                    = 0xd6
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EMUL_LINUX                        = 0x1
-	EMUL_LINUX32                      = 0x5
-	EMUL_MAXID                        = 0x6
-	ETHERCAP_JUMBO_MTU                = 0x4
-	ETHERCAP_VLAN_HWTAGGING           = 0x2
-	ETHERCAP_VLAN_MTU                 = 0x1
-	ETHERMIN                          = 0x2e
-	ETHERMTU                          = 0x5dc
-	ETHERMTU_JUMBO                    = 0x2328
-	ETHERTYPE_8023                    = 0x4
-	ETHERTYPE_AARP                    = 0x80f3
-	ETHERTYPE_ACCTON                  = 0x8390
-	ETHERTYPE_AEONIC                  = 0x8036
-	ETHERTYPE_ALPHA                   = 0x814a
-	ETHERTYPE_AMBER                   = 0x6008
-	ETHERTYPE_AMOEBA                  = 0x8145
-	ETHERTYPE_APOLLO                  = 0x80f7
-	ETHERTYPE_APOLLODOMAIN            = 0x8019
-	ETHERTYPE_APPLETALK               = 0x809b
-	ETHERTYPE_APPLITEK                = 0x80c7
-	ETHERTYPE_ARGONAUT                = 0x803a
-	ETHERTYPE_ARP                     = 0x806
-	ETHERTYPE_AT                      = 0x809b
-	ETHERTYPE_ATALK                   = 0x809b
-	ETHERTYPE_ATOMIC                  = 0x86df
-	ETHERTYPE_ATT                     = 0x8069
-	ETHERTYPE_ATTSTANFORD             = 0x8008
-	ETHERTYPE_AUTOPHON                = 0x806a
-	ETHERTYPE_AXIS                    = 0x8856
-	ETHERTYPE_BCLOOP                  = 0x9003
-	ETHERTYPE_BOFL                    = 0x8102
-	ETHERTYPE_CABLETRON               = 0x7034
-	ETHERTYPE_CHAOS                   = 0x804
-	ETHERTYPE_COMDESIGN               = 0x806c
-	ETHERTYPE_COMPUGRAPHIC            = 0x806d
-	ETHERTYPE_COUNTERPOINT            = 0x8062
-	ETHERTYPE_CRONUS                  = 0x8004
-	ETHERTYPE_CRONUSVLN               = 0x8003
-	ETHERTYPE_DCA                     = 0x1234
-	ETHERTYPE_DDE                     = 0x807b
-	ETHERTYPE_DEBNI                   = 0xaaaa
-	ETHERTYPE_DECAM                   = 0x8048
-	ETHERTYPE_DECCUST                 = 0x6006
-	ETHERTYPE_DECDIAG                 = 0x6005
-	ETHERTYPE_DECDNS                  = 0x803c
-	ETHERTYPE_DECDTS                  = 0x803e
-	ETHERTYPE_DECEXPER                = 0x6000
-	ETHERTYPE_DECLAST                 = 0x8041
-	ETHERTYPE_DECLTM                  = 0x803f
-	ETHERTYPE_DECMUMPS                = 0x6009
-	ETHERTYPE_DECNETBIOS              = 0x8040
-	ETHERTYPE_DELTACON                = 0x86de
-	ETHERTYPE_DIDDLE                  = 0x4321
-	ETHERTYPE_DLOG1                   = 0x660
-	ETHERTYPE_DLOG2                   = 0x661
-	ETHERTYPE_DN                      = 0x6003
-	ETHERTYPE_DOGFIGHT                = 0x1989
-	ETHERTYPE_DSMD                    = 0x8039
-	ETHERTYPE_ECMA                    = 0x803
-	ETHERTYPE_ENCRYPT                 = 0x803d
-	ETHERTYPE_ES                      = 0x805d
-	ETHERTYPE_EXCELAN                 = 0x8010
-	ETHERTYPE_EXPERDATA               = 0x8049
-	ETHERTYPE_FLIP                    = 0x8146
-	ETHERTYPE_FLOWCONTROL             = 0x8808
-	ETHERTYPE_FRARP                   = 0x808
-	ETHERTYPE_GENDYN                  = 0x8068
-	ETHERTYPE_HAYES                   = 0x8130
-	ETHERTYPE_HIPPI_FP                = 0x8180
-	ETHERTYPE_HITACHI                 = 0x8820
-	ETHERTYPE_HP                      = 0x8005
-	ETHERTYPE_IEEEPUP                 = 0xa00
-	ETHERTYPE_IEEEPUPAT               = 0xa01
-	ETHERTYPE_IMLBL                   = 0x4c42
-	ETHERTYPE_IMLBLDIAG               = 0x424c
-	ETHERTYPE_IP                      = 0x800
-	ETHERTYPE_IPAS                    = 0x876c
-	ETHERTYPE_IPV6                    = 0x86dd
-	ETHERTYPE_IPX                     = 0x8137
-	ETHERTYPE_IPXNEW                  = 0x8037
-	ETHERTYPE_KALPANA                 = 0x8582
-	ETHERTYPE_LANBRIDGE               = 0x8038
-	ETHERTYPE_LANPROBE                = 0x8888
-	ETHERTYPE_LAT                     = 0x6004
-	ETHERTYPE_LBACK                   = 0x9000
-	ETHERTYPE_LITTLE                  = 0x8060
-	ETHERTYPE_LOGICRAFT               = 0x8148
-	ETHERTYPE_LOOPBACK                = 0x9000
-	ETHERTYPE_MATRA                   = 0x807a
-	ETHERTYPE_MAX                     = 0xffff
-	ETHERTYPE_MERIT                   = 0x807c
-	ETHERTYPE_MICP                    = 0x873a
-	ETHERTYPE_MOPDL                   = 0x6001
-	ETHERTYPE_MOPRC                   = 0x6002
-	ETHERTYPE_MOTOROLA                = 0x818d
-	ETHERTYPE_MPLS                    = 0x8847
-	ETHERTYPE_MPLS_MCAST              = 0x8848
-	ETHERTYPE_MUMPS                   = 0x813f
-	ETHERTYPE_NBPCC                   = 0x3c04
-	ETHERTYPE_NBPCLAIM                = 0x3c09
-	ETHERTYPE_NBPCLREQ                = 0x3c05
-	ETHERTYPE_NBPCLRSP                = 0x3c06
-	ETHERTYPE_NBPCREQ                 = 0x3c02
-	ETHERTYPE_NBPCRSP                 = 0x3c03
-	ETHERTYPE_NBPDG                   = 0x3c07
-	ETHERTYPE_NBPDGB                  = 0x3c08
-	ETHERTYPE_NBPDLTE                 = 0x3c0a
-	ETHERTYPE_NBPRAR                  = 0x3c0c
-	ETHERTYPE_NBPRAS                  = 0x3c0b
-	ETHERTYPE_NBPRST                  = 0x3c0d
-	ETHERTYPE_NBPSCD                  = 0x3c01
-	ETHERTYPE_NBPVCD                  = 0x3c00
-	ETHERTYPE_NBS                     = 0x802
-	ETHERTYPE_NCD                     = 0x8149
-	ETHERTYPE_NESTAR                  = 0x8006
-	ETHERTYPE_NETBEUI                 = 0x8191
-	ETHERTYPE_NOVELL                  = 0x8138
-	ETHERTYPE_NS                      = 0x600
-	ETHERTYPE_NSAT                    = 0x601
-	ETHERTYPE_NSCOMPAT                = 0x807
-	ETHERTYPE_NTRAILER                = 0x10
-	ETHERTYPE_OS9                     = 0x7007
-	ETHERTYPE_OS9NET                  = 0x7009
-	ETHERTYPE_PACER                   = 0x80c6
-	ETHERTYPE_PAE                     = 0x888e
-	ETHERTYPE_PCS                     = 0x4242
-	ETHERTYPE_PLANNING                = 0x8044
-	ETHERTYPE_PPP                     = 0x880b
-	ETHERTYPE_PPPOE                   = 0x8864
-	ETHERTYPE_PPPOEDISC               = 0x8863
-	ETHERTYPE_PRIMENTS                = 0x7031
-	ETHERTYPE_PUP                     = 0x200
-	ETHERTYPE_PUPAT                   = 0x200
-	ETHERTYPE_RACAL                   = 0x7030
-	ETHERTYPE_RATIONAL                = 0x8150
-	ETHERTYPE_RAWFR                   = 0x6559
-	ETHERTYPE_RCL                     = 0x1995
-	ETHERTYPE_RDP                     = 0x8739
-	ETHERTYPE_RETIX                   = 0x80f2
-	ETHERTYPE_REVARP                  = 0x8035
-	ETHERTYPE_SCA                     = 0x6007
-	ETHERTYPE_SECTRA                  = 0x86db
-	ETHERTYPE_SECUREDATA              = 0x876d
-	ETHERTYPE_SGITW                   = 0x817e
-	ETHERTYPE_SG_BOUNCE               = 0x8016
-	ETHERTYPE_SG_DIAG                 = 0x8013
-	ETHERTYPE_SG_NETGAMES             = 0x8014
-	ETHERTYPE_SG_RESV                 = 0x8015
-	ETHERTYPE_SIMNET                  = 0x5208
-	ETHERTYPE_SLOWPROTOCOLS           = 0x8809
-	ETHERTYPE_SNA                     = 0x80d5
-	ETHERTYPE_SNMP                    = 0x814c
-	ETHERTYPE_SONIX                   = 0xfaf5
-	ETHERTYPE_SPIDER                  = 0x809f
-	ETHERTYPE_SPRITE                  = 0x500
-	ETHERTYPE_STP                     = 0x8181
-	ETHERTYPE_TALARIS                 = 0x812b
-	ETHERTYPE_TALARISMC               = 0x852b
-	ETHERTYPE_TCPCOMP                 = 0x876b
-	ETHERTYPE_TCPSM                   = 0x9002
-	ETHERTYPE_TEC                     = 0x814f
-	ETHERTYPE_TIGAN                   = 0x802f
-	ETHERTYPE_TRAIL                   = 0x1000
-	ETHERTYPE_TRANSETHER              = 0x6558
-	ETHERTYPE_TYMSHARE                = 0x802e
-	ETHERTYPE_UBBST                   = 0x7005
-	ETHERTYPE_UBDEBUG                 = 0x900
-	ETHERTYPE_UBDIAGLOOP              = 0x7002
-	ETHERTYPE_UBDL                    = 0x7000
-	ETHERTYPE_UBNIU                   = 0x7001
-	ETHERTYPE_UBNMC                   = 0x7003
-	ETHERTYPE_VALID                   = 0x1600
-	ETHERTYPE_VARIAN                  = 0x80dd
-	ETHERTYPE_VAXELN                  = 0x803b
-	ETHERTYPE_VEECO                   = 0x8067
-	ETHERTYPE_VEXP                    = 0x805b
-	ETHERTYPE_VGLAB                   = 0x8131
-	ETHERTYPE_VINES                   = 0xbad
-	ETHERTYPE_VINESECHO               = 0xbaf
-	ETHERTYPE_VINESLOOP               = 0xbae
-	ETHERTYPE_VITAL                   = 0xff00
-	ETHERTYPE_VLAN                    = 0x8100
-	ETHERTYPE_VLTLMAN                 = 0x8080
-	ETHERTYPE_VPROD                   = 0x805c
-	ETHERTYPE_VURESERVED              = 0x8147
-	ETHERTYPE_WATERLOO                = 0x8130
-	ETHERTYPE_WELLFLEET               = 0x8103
-	ETHERTYPE_X25                     = 0x805
-	ETHERTYPE_X75                     = 0x801
-	ETHERTYPE_XNSSM                   = 0x9001
-	ETHERTYPE_XTP                     = 0x817d
-	ETHER_ADDR_LEN                    = 0x6
-	ETHER_CRC_LEN                     = 0x4
-	ETHER_CRC_POLY_BE                 = 0x4c11db6
-	ETHER_CRC_POLY_LE                 = 0xedb88320
-	ETHER_HDR_LEN                     = 0xe
-	ETHER_MAX_LEN                     = 0x5ee
-	ETHER_MAX_LEN_JUMBO               = 0x233a
-	ETHER_MIN_LEN                     = 0x40
-	ETHER_PPPOE_ENCAP_LEN             = 0x8
-	ETHER_TYPE_LEN                    = 0x2
-	ETHER_VLAN_ENCAP_LEN              = 0x4
-	EVFILT_AIO                        = 0x2
-	EVFILT_PROC                       = 0x4
-	EVFILT_READ                       = 0x0
-	EVFILT_SIGNAL                     = 0x5
-	EVFILT_SYSCOUNT                   = 0x7
-	EVFILT_TIMER                      = 0x6
-	EVFILT_VNODE                      = 0x3
-	EVFILT_WRITE                      = 0x1
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x100
-	FLUSHO                            = 0x800000
-	F_CLOSEM                          = 0xa
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0xc
-	F_FSCTL                           = -0x80000000
-	F_FSDIRMASK                       = 0x70000000
-	F_FSIN                            = 0x10000000
-	F_FSINOUT                         = 0x30000000
-	F_FSOUT                           = 0x20000000
-	F_FSPRIV                          = 0x8000
-	F_FSVOID                          = 0x40000000
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0x7
-	F_GETNOSIGPIPE                    = 0xd
-	F_GETOWN                          = 0x5
-	F_MAXFD                           = 0xb
-	F_OK                              = 0x0
-	F_PARAM_MASK                      = 0xfff
-	F_PARAM_MAX                       = 0xfff
-	F_RDLCK                           = 0x1
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0x8
-	F_SETLKW                          = 0x9
-	F_SETNOSIGPIPE                    = 0xe
-	F_SETOWN                          = 0x6
-	F_UNLCK                           = 0x2
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFAN_ARRIVAL                      = 0x0
-	IFAN_DEPARTURE                    = 0x1
-	IFA_ROUTE                         = 0x1
-	IFF_ALLMULTI                      = 0x200
-	IFF_BROADCAST                     = 0x2
-	IFF_CANTCHANGE                    = 0x8f52
-	IFF_DEBUG                         = 0x4
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_NOTRAILERS                    = 0x20
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PROMISC                       = 0x100
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_A12MPPSWITCH                  = 0x82
-	IFT_AAL2                          = 0xbb
-	IFT_AAL5                          = 0x31
-	IFT_ADSL                          = 0x5e
-	IFT_AFLANE8023                    = 0x3b
-	IFT_AFLANE8025                    = 0x3c
-	IFT_ARAP                          = 0x58
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ASYNC                         = 0x54
-	IFT_ATM                           = 0x25
-	IFT_ATMDXI                        = 0x69
-	IFT_ATMFUNI                       = 0x6a
-	IFT_ATMIMA                        = 0x6b
-	IFT_ATMLOGICAL                    = 0x50
-	IFT_ATMRADIO                      = 0xbd
-	IFT_ATMSUBINTERFACE               = 0x86
-	IFT_ATMVCIENDPT                   = 0xc2
-	IFT_ATMVIRTUAL                    = 0x95
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
-	IFT_BRIDGE                        = 0xd1
-	IFT_BSC                           = 0x53
-	IFT_CARP                          = 0xf8
-	IFT_CCTEMUL                       = 0x3d
-	IFT_CEPT                          = 0x13
-	IFT_CES                           = 0x85
-	IFT_CHANNEL                       = 0x46
-	IFT_CNR                           = 0x55
-	IFT_COFFEE                        = 0x84
-	IFT_COMPOSITELINK                 = 0x9b
-	IFT_DCN                           = 0x8d
-	IFT_DIGITALPOWERLINE              = 0x8a
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-	IFT_DLSW                          = 0x4a
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
-	IFT_DOCSCABLEMACLAYER             = 0x7f
-	IFT_DOCSCABLEUPSTREAM             = 0x81
-	IFT_DOCSCABLEUPSTREAMCHANNEL      = 0xcd
-	IFT_DS0                           = 0x51
-	IFT_DS0BUNDLE                     = 0x52
-	IFT_DS1FDL                        = 0xaa
-	IFT_DS3                           = 0x1e
-	IFT_DTM                           = 0x8c
-	IFT_DVBASILN                      = 0xac
-	IFT_DVBASIOUT                     = 0xad
-	IFT_DVBRCCDOWNSTREAM              = 0x93
-	IFT_DVBRCCMACLAYER                = 0x92
-	IFT_DVBRCCUPSTREAM                = 0x94
-	IFT_ECONET                        = 0xce
-	IFT_EON                           = 0x19
-	IFT_EPLRS                         = 0x57
-	IFT_ESCON                         = 0x49
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0xf2
-	IFT_FAST                          = 0x7d
-	IFT_FASTETHER                     = 0x3e
-	IFT_FASTETHERFX                   = 0x45
-	IFT_FDDI                          = 0xf
-	IFT_FIBRECHANNEL                  = 0x38
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
-	IFT_FRAMERELAYMPI                 = 0x5c
-	IFT_FRDLCIENDPT                   = 0xc1
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_FRF16MFRBUNDLE                = 0xa3
-	IFT_FRFORWARD                     = 0x9e
-	IFT_G703AT2MB                     = 0x43
-	IFT_G703AT64K                     = 0x42
-	IFT_GIF                           = 0xf0
-	IFT_GIGABITETHERNET               = 0x75
-	IFT_GR303IDT                      = 0xb2
-	IFT_GR303RDT                      = 0xb1
-	IFT_H323GATEKEEPER                = 0xa4
-	IFT_H323PROXY                     = 0xa5
-	IFT_HDH1822                       = 0x3
-	IFT_HDLC                          = 0x76
-	IFT_HDSL2                         = 0xa8
-	IFT_HIPERLAN2                     = 0xb7
-	IFT_HIPPI                         = 0x2f
-	IFT_HIPPIINTERFACE                = 0x39
-	IFT_HOSTPAD                       = 0x5a
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IBM370PARCHAN                 = 0x48
-	IFT_IDSL                          = 0x9a
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE80211                     = 0x47
-	IFT_IEEE80212                     = 0x37
-	IFT_IEEE8023ADLAG                 = 0xa1
-	IFT_IFGSN                         = 0x91
-	IFT_IMT                           = 0xbe
-	IFT_INFINIBAND                    = 0xc7
-	IFT_INTERLEAVE                    = 0x7c
-	IFT_IP                            = 0x7e
-	IFT_IPFORWARD                     = 0x8e
-	IFT_IPOVERATM                     = 0x72
-	IFT_IPOVERCDLC                    = 0x6d
-	IFT_IPOVERCLAW                    = 0x6e
-	IFT_IPSWITCH                      = 0x4e
-	IFT_ISDN                          = 0x3f
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISDNS                         = 0x4b
-	IFT_ISDNU                         = 0x4c
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88025CRFPINT               = 0x62
-	IFT_ISO88025DTR                   = 0x56
-	IFT_ISO88025FIBER                 = 0x73
-	IFT_ISO88026                      = 0xa
-	IFT_ISUP                          = 0xb3
-	IFT_L2VLAN                        = 0x87
-	IFT_L3IPVLAN                      = 0x88
-	IFT_L3IPXVLAN                     = 0x89
-	IFT_LAPB                          = 0x10
-	IFT_LAPD                          = 0x4d
-	IFT_LAPF                          = 0x77
-	IFT_LINEGROUP                     = 0xd2
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MEDIAMAILOVERIP               = 0x8b
-	IFT_MFSIGLINK                     = 0xa7
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_MPC                           = 0x71
-	IFT_MPLS                          = 0xa6
-	IFT_MPLSTUNNEL                    = 0x96
-	IFT_MSDSL                         = 0x8f
-	IFT_MVL                           = 0xbf
-	IFT_MYRINET                       = 0x63
-	IFT_NFAS                          = 0xaf
-	IFT_NSIP                          = 0x1b
-	IFT_OPTICALCHANNEL                = 0xc3
-	IFT_OPTICALTRANSPORT              = 0xc4
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PFLOG                         = 0xf5
-	IFT_PFSYNC                        = 0xf6
-	IFT_PLC                           = 0xae
-	IFT_PON155                        = 0xcf
-	IFT_PON622                        = 0xd0
-	IFT_POS                           = 0xab
-	IFT_PPP                           = 0x17
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
-	IFT_PROPATM                       = 0xc5
-	IFT_PROPBWAP2MP                   = 0xb8
-	IFT_PROPCNLS                      = 0x59
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PROPWIRELESSP2P               = 0x9d
-	IFT_PTPSERIAL                     = 0x16
-	IFT_PVC                           = 0xf1
-	IFT_Q2931                         = 0xc9
-	IFT_QLLC                          = 0x44
-	IFT_RADIOMAC                      = 0xbc
-	IFT_RADSL                         = 0x5f
-	IFT_REACHDSL                      = 0xc0
-	IFT_RFC1483                       = 0x9f
-	IFT_RS232                         = 0x21
-	IFT_RSRB                          = 0x4f
-	IFT_SDLC                          = 0x11
-	IFT_SDSL                          = 0x60
-	IFT_SHDSL                         = 0xa9
-	IFT_SIP                           = 0x1f
-	IFT_SIPSIG                        = 0xcc
-	IFT_SIPTG                         = 0xcb
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_SRP                           = 0x97
-	IFT_SS7SIGLINK                    = 0x9c
-	IFT_STACKTOSTACK                  = 0x6f
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0xd7
-	IFT_T1                            = 0x12
-	IFT_TDLC                          = 0x74
-	IFT_TELINK                        = 0xc8
-	IFT_TERMPAD                       = 0x5b
-	IFT_TR008                         = 0xb0
-	IFT_TRANSPHDLC                    = 0x7b
-	IFT_TUNNEL                        = 0x83
-	IFT_ULTRA                         = 0x1d
-	IFT_USB                           = 0xa0
-	IFT_V11                           = 0x40
-	IFT_V35                           = 0x2d
-	IFT_V36                           = 0x41
-	IFT_V37                           = 0x78
-	IFT_VDSL                          = 0x61
-	IFT_VIRTUALIPADDRESS              = 0x70
-	IFT_VIRTUALTG                     = 0xca
-	IFT_VOICEDID                      = 0xd5
-	IFT_VOICEEM                       = 0x64
-	IFT_VOICEEMFGD                    = 0xd3
-	IFT_VOICEENCAP                    = 0x67
-	IFT_VOICEFGDEANA                  = 0xd4
-	IFT_VOICEFXO                      = 0x65
-	IFT_VOICEFXS                      = 0x66
-	IFT_VOICEOVERATM                  = 0x98
-	IFT_VOICEOVERCABLE                = 0xc6
-	IFT_VOICEOVERFRAMERELAY           = 0x99
-	IFT_VOICEOVERIP                   = 0x68
-	IFT_X213                          = 0x5d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25HUNTGROUP                  = 0x7a
-	IFT_X25MLP                        = 0x79
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LOOPBACKNET                    = 0x7f
-	IPPROTO_AH                        = 0x33
-	IPPROTO_CARP                      = 0x70
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IPV6_ICMP                 = 0x3a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MOBILE                    = 0x37
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_PFSYNC                    = 0xf0
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_VRRP                      = 0x70
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_DONTFRAG                     = 0x3e
-	IPV6_DSTOPTS                      = 0x32
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_HOPLIMIT                     = 0x2f
-	IPV6_HOPOPTS                      = 0x31
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MMTU                         = 0x500
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_NEXTHOP                      = 0x30
-	IPV6_PATHMTU                      = 0x2c
-	IPV6_PKTINFO                      = 0x2e
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_RECVDSTOPTS                  = 0x28
-	IPV6_RECVHOPLIMIT                 = 0x25
-	IPV6_RECVHOPOPTS                  = 0x27
-	IPV6_RECVPATHMTU                  = 0x2b
-	IPV6_RECVPKTINFO                  = 0x24
-	IPV6_RECVRTHDR                    = 0x26
-	IPV6_RECVTCLASS                   = 0x39
-	IPV6_RTHDR                        = 0x33
-	IPV6_RTHDRDSTOPTS                 = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x3d
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_USE_MIN_MTU                  = 0x2a
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_EF                             = 0x8000
-	IP_ERRORMTU                       = 0x15
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x16
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_MEMBERSHIPS                = 0x14
-	IP_MF                             = 0x2000
-	IP_MINFRAGSIZE                    = 0x45
-	IP_MINTTL                         = 0x18
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_OFFMASK                        = 0x1fff
-	IP_OPTIONS                        = 0x1
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTTL                        = 0x17
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_TOS                            = 0x3
-	IP_TTL                            = 0x4
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x6
-	MADV_NORMAL                       = 0x0
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_SPACEAVAIL                   = 0x5
-	MADV_WILLNEED                     = 0x3
-	MAP_ALIGNMENT_16MB                = 0x18000000
-	MAP_ALIGNMENT_1TB                 = 0x28000000
-	MAP_ALIGNMENT_256TB               = 0x30000000
-	MAP_ALIGNMENT_4GB                 = 0x20000000
-	MAP_ALIGNMENT_64KB                = 0x10000000
-	MAP_ALIGNMENT_64PB                = 0x38000000
-	MAP_ALIGNMENT_MASK                = -0x1000000
-	MAP_ALIGNMENT_SHIFT               = 0x18
-	MAP_ANON                          = 0x1000
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_INHERIT                       = 0x80
-	MAP_INHERIT_COPY                  = 0x1
-	MAP_INHERIT_DEFAULT               = 0x1
-	MAP_INHERIT_DONATE_COPY           = 0x3
-	MAP_INHERIT_NONE                  = 0x2
-	MAP_INHERIT_SHARE                 = 0x0
-	MAP_NORESERVE                     = 0x40
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_SHARED                        = 0x1
-	MAP_STACK                         = 0x2000
-	MAP_TRYFIXED                      = 0x400
-	MAP_WIRED                         = 0x800
-	MSG_BCAST                         = 0x100
-	MSG_CMSG_CLOEXEC                  = 0x800
-	MSG_CONTROLMBUF                   = 0x2000000
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOR                           = 0x8
-	MSG_IOVUSRSPACE                   = 0x4000000
-	MSG_LENUSRSPACE                   = 0x8000000
-	MSG_MCAST                         = 0x200
-	MSG_NAMEMBUF                      = 0x1000000
-	MSG_NBIO                          = 0x1000
-	MSG_NOSIGNAL                      = 0x400
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_TRUNC                         = 0x10
-	MSG_USERFLAGS                     = 0xffffff
-	MSG_WAITALL                       = 0x40
-	NAME_MAX                          = 0x1ff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x5
-	NET_RT_MAXID                      = 0x6
-	NET_RT_OIFLIST                    = 0x4
-	NET_RT_OOIFLIST                   = 0x3
-	NOFLSH                            = 0x80000000
-	NOTE_ATTRIB                       = 0x8
-	NOTE_CHILD                        = 0x4
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FORK                         = 0x40000000
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_PCTRLMASK                    = 0xf0000000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	OFIOGETBMAP                       = 0xc004667a
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_ALT_IO                          = 0x40000
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x400000
-	O_CREAT                           = 0x200
-	O_DIRECT                          = 0x80000
-	O_DIRECTORY                       = 0x200000
-	O_DSYNC                           = 0x10000
-	O_EXCL                            = 0x800
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x8000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_NOSIGPIPE                       = 0x1000000
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_RSYNC                           = 0x20000
-	O_SHLOCK                          = 0x10
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	PRI_IOFLUSH                       = 0x7c
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	RLIMIT_AS                         = 0xa
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x9
-	RTAX_NETMASK                      = 0x2
-	RTAX_TAG                          = 0x8
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTA_TAG                           = 0x100
-	RTF_ANNOUNCE                      = 0x20000
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_CLONED                        = 0x2000
-	RTF_CLONING                       = 0x100
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_GATEWAY                       = 0x2
-	RTF_HOST                          = 0x4
-	RTF_LLINFO                        = 0x400
-	RTF_MASK                          = 0x80
-	RTF_MODIFIED                      = 0x20
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_REJECT                        = 0x8
-	RTF_SRC                           = 0x10000
-	RTF_STATIC                        = 0x800
-	RTF_UP                            = 0x1
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_CHGADDR                       = 0x15
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_GET                           = 0x4
-	RTM_IEEE80211                     = 0x11
-	RTM_IFANNOUNCE                    = 0x10
-	RTM_IFINFO                        = 0x14
-	RTM_LLINFO_UPD                    = 0x13
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_OIFINFO                       = 0xf
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_OOIFINFO                      = 0xe
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_SETGATE                       = 0x12
-	RTM_VERSION                       = 0x4
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	SCM_CREDS                         = 0x4
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x8
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80906931
-	SIOCADDRT                         = 0x8030720a
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCALIFADDR                      = 0x8118691c
-	SIOCATMARK                        = 0x40047307
-	SIOCDELMULTI                      = 0x80906932
-	SIOCDELRT                         = 0x8030720b
-	SIOCDIFADDR                       = 0x80906919
-	SIOCDIFPHYADDR                    = 0x80906949
-	SIOCDLIFADDR                      = 0x8118691e
-	SIOCGDRVSPEC                      = 0xc01c697b
-	SIOCGETPFSYNC                     = 0xc09069f8
-	SIOCGETSGCNT                      = 0xc0147534
-	SIOCGETVIFCNT                     = 0xc0147533
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0906921
-	SIOCGIFADDRPREF                   = 0xc0946920
-	SIOCGIFALIAS                      = 0xc040691b
-	SIOCGIFBRDADDR                    = 0xc0906923
-	SIOCGIFCAP                        = 0xc0206976
-	SIOCGIFCONF                       = 0xc0086926
-	SIOCGIFDATA                       = 0xc0946985
-	SIOCGIFDLT                        = 0xc0906977
-	SIOCGIFDSTADDR                    = 0xc0906922
-	SIOCGIFFLAGS                      = 0xc0906911
-	SIOCGIFGENERIC                    = 0xc090693a
-	SIOCGIFMEDIA                      = 0xc0286936
-	SIOCGIFMETRIC                     = 0xc0906917
-	SIOCGIFMTU                        = 0xc090697e
-	SIOCGIFNETMASK                    = 0xc0906925
-	SIOCGIFPDSTADDR                   = 0xc0906948
-	SIOCGIFPSRCADDR                   = 0xc0906947
-	SIOCGLIFADDR                      = 0xc118691d
-	SIOCGLIFPHYADDR                   = 0xc118694b
-	SIOCGLINKSTR                      = 0xc01c6987
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCGVH                           = 0xc0906983
-	SIOCIFCREATE                      = 0x8090697a
-	SIOCIFDESTROY                     = 0x80906979
-	SIOCIFGCLONERS                    = 0xc00c6978
-	SIOCINITIFADDR                    = 0xc0446984
-	SIOCSDRVSPEC                      = 0x801c697b
-	SIOCSETPFSYNC                     = 0x809069f7
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8090690c
-	SIOCSIFADDRPREF                   = 0x8094691f
-	SIOCSIFBRDADDR                    = 0x80906913
-	SIOCSIFCAP                        = 0x80206975
-	SIOCSIFDSTADDR                    = 0x8090690e
-	SIOCSIFFLAGS                      = 0x80906910
-	SIOCSIFGENERIC                    = 0x80906939
-	SIOCSIFMEDIA                      = 0xc0906935
-	SIOCSIFMETRIC                     = 0x80906918
-	SIOCSIFMTU                        = 0x8090697f
-	SIOCSIFNETMASK                    = 0x80906916
-	SIOCSIFPHYADDR                    = 0x80406946
-	SIOCSLIFPHYADDR                   = 0x8118694a
-	SIOCSLINKSTR                      = 0x801c6988
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SIOCSVH                           = 0xc0906982
-	SIOCZIFDATA                       = 0xc0946986
-	SOCK_CLOEXEC                      = 0x10000000
-	SOCK_DGRAM                        = 0x2
-	SOCK_FLAGS_MASK                   = 0xf0000000
-	SOCK_NONBLOCK                     = 0x20000000
-	SOCK_NOSIGPIPE                    = 0x40000000
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_ACCEPTFILTER                   = 0x1000
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LINGER                         = 0x80
-	SO_NOHEADER                       = 0x100a
-	SO_NOSIGPIPE                      = 0x800
-	SO_OOBINLINE                      = 0x100
-	SO_OVERFLOWED                     = 0x1009
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x100c
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x100b
-	SO_TIMESTAMP                      = 0x2000
-	SO_TYPE                           = 0x1008
-	SO_USELOOPBACK                    = 0x40
-	SYSCTL_VERSION                    = 0x1000000
-	SYSCTL_VERS_0                     = 0x0
-	SYSCTL_VERS_1                     = 0x1000000
-	SYSCTL_VERS_MASK                  = 0xff000000
-	S_ARCH1                           = 0x10000
-	S_ARCH2                           = 0x20000
-	S_BLKSIZE                         = 0x200
-	S_IEXEC                           = 0x40
-	S_IFBLK                           = 0x6000
-	S_IFCHR                           = 0x2000
-	S_IFDIR                           = 0x4000
-	S_IFIFO                           = 0x1000
-	S_IFLNK                           = 0xa000
-	S_IFMT                            = 0xf000
-	S_IFREG                           = 0x8000
-	S_IFSOCK                          = 0xc000
-	S_IFWHT                           = 0xe000
-	S_IREAD                           = 0x100
-	S_IRGRP                           = 0x20
-	S_IROTH                           = 0x4
-	S_IRUSR                           = 0x100
-	S_IRWXG                           = 0x38
-	S_IRWXO                           = 0x7
-	S_IRWXU                           = 0x1c0
-	S_ISGID                           = 0x400
-	S_ISTXT                           = 0x200
-	S_ISUID                           = 0x800
-	S_ISVTX                           = 0x200
-	S_IWGRP                           = 0x10
-	S_IWOTH                           = 0x2
-	S_IWRITE                          = 0x80
-	S_IWUSR                           = 0x80
-	S_IXGRP                           = 0x8
-	S_IXOTH                           = 0x1
-	S_IXUSR                           = 0x40
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CONGCTL                       = 0x20
-	TCP_KEEPCNT                       = 0x6
-	TCP_KEEPIDLE                      = 0x3
-	TCP_KEEPINIT                      = 0x7
-	TCP_KEEPINTVL                     = 0x5
-	TCP_MAXBURST                      = 0x4
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MD5SIG                        = 0x10
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x218
-	TCP_NODELAY                       = 0x1
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDCDTIMESTAMP                  = 0x400c7458
-	TIOCDRAIN                         = 0x2000745e
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLAG_CDTRCTS                  = 0x10
-	TIOCFLAG_CLOCAL                   = 0x2
-	TIOCFLAG_CRTSCTS                  = 0x4
-	TIOCFLAG_MDMBUF                   = 0x8
-	TIOCFLAG_SOFTCAR                  = 0x1
-	TIOCFLUSH                         = 0x80047410
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGFLAGS                        = 0x4004745d
-	TIOCGLINED                        = 0x40207442
-	TIOCGPGRP                         = 0x40047477
-	TIOCGQSIZE                        = 0x40047481
-	TIOCGRANTPT                       = 0x20007447
-	TIOCGSID                          = 0x40047463
-	TIOCGSIZE                         = 0x40087468
-	TIOCGWINSZ                        = 0x40087468
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGET                          = 0x4004746a
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTMGET                        = 0x48087446
-	TIOCPTSNAME                       = 0x48087448
-	TIOCRCVFRAME                      = 0x80047445
-	TIOCREMOTE                        = 0x80047469
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSFLAGS                        = 0x8004745c
-	TIOCSIG                           = 0x2000745f
-	TIOCSLINED                        = 0x80207443
-	TIOCSPGRP                         = 0x80047476
-	TIOCSQSIZE                        = 0x80047480
-	TIOCSSIZE                         = 0x80087467
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x80047465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCUCNTL                         = 0x80047466
-	TIOCXMTFRAME                      = 0x80047444
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WALL                              = 0x8
-	WALLSIG                           = 0x8
-	WALTSIG                           = 0x4
-	WCLONE                            = 0x4
-	WCOREFLAG                         = 0x80
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x10000
-	WNOZOMBIE                         = 0x20000
-	WOPTSCHECKED                      = 0x40000
-	WSTOPPED                          = 0x7f
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADF           = syscall.Errno(0x9)
-	EBADMSG         = syscall.Errno(0x58)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x57)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDOM            = syscall.Errno(0x21)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x52)
-	EILSEQ          = syscall.Errno(0x55)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x60)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5e)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x5d)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODATA         = syscall.Errno(0x59)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x5f)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x53)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x5a)
-	ENOSTR          = syscall.Errno(0x5b)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x56)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x2d)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x60)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIME           = syscall.Errno(0x5c)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x20)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:  "operation not permitted",
-	2:  "no such file or directory",
-	3:  "no such process",
-	4:  "interrupted system call",
-	5:  "input/output error",
-	6:  "device not configured",
-	7:  "argument list too long",
-	8:  "exec format error",
-	9:  "bad file descriptor",
-	10: "no child processes",
-	11: "resource deadlock avoided",
-	12: "cannot allocate memory",
-	13: "permission denied",
-	14: "bad address",
-	15: "block device required",
-	16: "device busy",
-	17: "file exists",
-	18: "cross-device link",
-	19: "operation not supported by device",
-	20: "not a directory",
-	21: "is a directory",
-	22: "invalid argument",
-	23: "too many open files in system",
-	24: "too many open files",
-	25: "inappropriate ioctl for device",
-	26: "text file busy",
-	27: "file too large",
-	28: "no space left on device",
-	29: "illegal seek",
-	30: "read-only file system",
-	31: "too many links",
-	32: "broken pipe",
-	33: "numerical argument out of domain",
-	34: "result too large or too small",
-	35: "resource temporarily unavailable",
-	36: "operation now in progress",
-	37: "operation already in progress",
-	38: "socket operation on non-socket",
-	39: "destination address required",
-	40: "message too long",
-	41: "protocol wrong type for socket",
-	42: "protocol option not available",
-	43: "protocol not supported",
-	44: "socket type not supported",
-	45: "operation not supported",
-	46: "protocol family not supported",
-	47: "address family not supported by protocol family",
-	48: "address already in use",
-	49: "can't assign requested address",
-	50: "network is down",
-	51: "network is unreachable",
-	52: "network dropped connection on reset",
-	53: "software caused connection abort",
-	54: "connection reset by peer",
-	55: "no buffer space available",
-	56: "socket is already connected",
-	57: "socket is not connected",
-	58: "can't send after socket shutdown",
-	59: "too many references: can't splice",
-	60: "connection timed out",
-	61: "connection refused",
-	62: "too many levels of symbolic links",
-	63: "file name too long",
-	64: "host is down",
-	65: "no route to host",
-	66: "directory not empty",
-	67: "too many processes",
-	68: "too many users",
-	69: "disc quota exceeded",
-	70: "stale NFS file handle",
-	71: "too many levels of remote in path",
-	72: "RPC struct is bad",
-	73: "RPC version wrong",
-	74: "RPC prog. not avail",
-	75: "program version wrong",
-	76: "bad procedure for program",
-	77: "no locks available",
-	78: "function not implemented",
-	79: "inappropriate file type or format",
-	80: "authentication error",
-	81: "need authenticator",
-	82: "identifier removed",
-	83: "no message of desired type",
-	84: "value too large to be stored in data type",
-	85: "illegal byte sequence",
-	86: "not supported",
-	87: "operation Canceled",
-	88: "bad or Corrupt message",
-	89: "no message available",
-	90: "no STREAM resources",
-	91: "not a STREAM",
-	92: "STREAM ioctl timeout",
-	93: "attribute not found",
-	94: "multihop attempted",
-	95: "link has been severed",
-	96: "protocol error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "stopped (signal)",
-	18: "stopped",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-	32: "power fail/restart",
-}


[08/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
deleted file mode 100644
index c28281e..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
+++ /dev/null
@@ -1,1665 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,freebsd
-
-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, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	use(_p0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
-	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-	r = int(r0)
-	w = int(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
-	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
-	_, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
-	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
-	size = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	newoffset = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
deleted file mode 100644
index a18ba5c..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
+++ /dev/null
@@ -1,1665 +0,0 @@
-// mksyscall.pl -l32 -arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build arm,freebsd
-
-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, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	use(_p0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
-	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-	r = int(r0)
-	w = int(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
-	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
-	_, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
-	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
-	size = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
-	newoffset = int64(int64(r1)<<32 | int64(r0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}


[22/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/newt/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
deleted file mode 100644
index 112f05d..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ /dev/null
@@ -1,1917 +0,0 @@
-// mkerrors.sh
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build mips64le,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IB                            = 0x1b
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x29
-	AF_MPLS                          = 0x1c
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_VSOCK                         = 0x28
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_6LOWPAN                   = 0x339
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_MONITOR        = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IP6GRE                    = 0x337
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETLINK                   = 0x338
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x1008
-	B110                             = 0x3
-	B115200                          = 0x1002
-	B1152000                         = 0x1009
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x100a
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x100b
-	B230400                          = 0x1003
-	B2400                            = 0xb
-	B2500000                         = 0x100c
-	B300                             = 0x7
-	B3000000                         = 0x100d
-	B3500000                         = 0x100e
-	B38400                           = 0xf
-	B4000000                         = 0x100f
-	B460800                          = 0x1004
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x1005
-	B57600                           = 0x1001
-	B576000                          = 0x1006
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x1007
-	B9600                            = 0xd
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LL_OFF                       = -0x200000
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MOD                          = 0x90
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_NET_OFF                      = -0x100000
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BPF_XOR                          = 0xa0
-	BRKINT                           = 0x2
-	CFLUSH                           = 0xf
-	CLOCAL                           = 0x800
-	CLOCK_BOOTTIME                   = 0x7
-	CLOCK_BOOTTIME_ALARM             = 0x9
-	CLOCK_DEFAULT                    = 0x0
-	CLOCK_EXT                        = 0x1
-	CLOCK_INT                        = 0x2
-	CLOCK_MONOTONIC                  = 0x1
-	CLOCK_MONOTONIC_COARSE           = 0x6
-	CLOCK_MONOTONIC_RAW              = 0x4
-	CLOCK_PROCESS_CPUTIME_ID         = 0x2
-	CLOCK_REALTIME                   = 0x0
-	CLOCK_REALTIME_ALARM             = 0x8
-	CLOCK_REALTIME_COARSE            = 0x5
-	CLOCK_TAI                        = 0xb
-	CLOCK_THREAD_CPUTIME_ID          = 0x3
-	CLOCK_TXFROMRX                   = 0x4
-	CLOCK_TXINT                      = 0x3
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWCGROUP                  = 0x2000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CREAD                            = 0x80
-	CS5                              = 0x0
-	CS6                              = 0x10
-	CS7                              = 0x20
-	CS8                              = 0x30
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x30
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x40
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x200
-	ECHOE                            = 0x10
-	ECHOK                            = 0x20
-	ECHOKE                           = 0x800
-	ECHONL                           = 0x40
-	ECHOPRT                          = 0x400
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWAKEUP                      = 0x20000000
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_80221                      = 0x8917
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_802_3_MIN                  = 0x600
-	ETH_P_802_EX1                    = 0x88b5
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BATMAN                     = 0x4305
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CANFD                      = 0xd
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_LOOPBACK                   = 0x9000
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_MVRP                       = 0x88f5
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PRP                        = 0x88fb
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_TSN                        = 0x22f0
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	ETH_P_XDSA                       = 0xf8
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FLUSHO                           = 0x2000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0xe
-	F_GETLK64                        = 0xe
-	F_GETOWN                         = 0x17
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OFD_GETLK                      = 0x24
-	F_OFD_SETLK                      = 0x25
-	F_OFD_SETLKW                     = 0x26
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x6
-	F_SETLK64                        = 0x6
-	F_SETLKW                         = 0x7
-	F_SETLKW64                       = 0x7
-	F_SETOWN                         = 0x18
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x400
-	ICANON                           = 0x2
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x100
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_MANAGETEMPADDR             = 0x100
-	IFA_F_MCAUTOJOIN                 = 0x400
-	IFA_F_NODAD                      = 0x2
-	IFA_F_NOPREFIXROUTE              = 0x200
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_STABLE_PRIVACY             = 0x800
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x8
-	IFF_ALLMULTI                     = 0x200
-	IFF_ATTACH_QUEUE                 = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DETACH_QUEUE                 = 0x400
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_ECHO                         = 0x40000
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MASTER                       = 0x400
-	IFF_MULTICAST                    = 0x1000
-	IFF_MULTI_QUEUE                  = 0x100
-	IFF_NOARP                        = 0x80
-	IFF_NOFILTER                     = 0x1000
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_PERSIST                      = 0x800
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_TAP                          = 0x2
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x80
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_BEETPH                   = 0x5e
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MH                       = 0x87
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DONTFRAG                    = 0x3e
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PATHMTU                     = 0x3d
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_INTERFACE          = 0x4
-	IPV6_PMTUDISC_OMIT               = 0x5
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPATHMTU                 = 0x3c
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_CHECKSUM                      = 0x17
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_NODEFRAG                      = 0x16
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_INTERFACE            = 0x4
-	IP_PMTUDISC_OMIT                 = 0x5
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_UNICAST_IF                    = 0x32
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x1
-	ISTRIP                           = 0x20
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x1000
-	IXON                             = 0x400
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DODUMP                      = 0x11
-	MADV_DOFORK                      = 0xb
-	MADV_DONTDUMP                    = 0x10
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x800
-	MAP_ANONYMOUS                    = 0x800
-	MAP_DENYWRITE                    = 0x2000
-	MAP_EXECUTABLE                   = 0x4000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x1000
-	MAP_HUGETLB                      = 0x80000
-	MAP_HUGE_MASK                    = 0x3f
-	MAP_HUGE_SHIFT                   = 0x1a
-	MAP_LOCKED                       = 0x8000
-	MAP_NONBLOCK                     = 0x20000
-	MAP_NORESERVE                    = 0x400
-	MAP_POPULATE                     = 0x10000
-	MAP_PRIVATE                      = 0x2
-	MAP_RENAME                       = 0x800
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x40000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x1
-	MCL_FUTURE                       = 0x2
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_LAZYTIME                      = 0x2000000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x2800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CAP_ACK                  = 0xa
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_LISTEN_ALL_NSID          = 0x8
-	NETLINK_LIST_MEMBERSHIPS         = 0x9
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_RX_RING                  = 0x6
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_SOCK_DIAG                = 0x4
-	NETLINK_TX_RING                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	ONLCR                            = 0x4
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x8
-	O_ASYNC                          = 0x1000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x100
-	O_DIRECT                         = 0x8000
-	O_DIRECTORY                      = 0x10000
-	O_DSYNC                          = 0x10
-	O_EXCL                           = 0x400
-	O_FSYNC                          = 0x4010
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x80
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x800
-	O_NOFOLLOW                       = 0x20000
-	O_NONBLOCK                       = 0x80
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x4010
-	O_SYNC                           = 0x4010
-	O_TMPFILE                        = 0x410000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CBPF               = 0x6
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_DATA               = 0x16
-	PACKET_FANOUT_EBPF               = 0x7
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_FLAG_ROLLOVER      = 0x1000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FANOUT_QM                 = 0x5
-	PACKET_FANOUT_RND                = 0x4
-	PACKET_FANOUT_ROLLOVER           = 0x3
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_KERNEL                    = 0x7
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_QDISC_BYPASS              = 0x14
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_ROLLOVER_STATS            = 0x15
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_HAS_OFF                = 0x13
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_USER                      = 0x6
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x100
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x200
-	PENDIN                           = 0x4000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_CAP_AMBIENT                   = 0x2f
-	PR_CAP_AMBIENT_CLEAR_ALL         = 0x4
-	PR_CAP_AMBIENT_IS_SET            = 0x1
-	PR_CAP_AMBIENT_LOWER             = 0x3
-	PR_CAP_AMBIENT_RAISE             = 0x2
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_FP_MODE_FR                    = 0x1
-	PR_FP_MODE_FRE                   = 0x2
-	PR_GET_CHILD_SUBREAPER           = 0x25
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_FP_MODE                   = 0x2e
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_THP_DISABLE               = 0x2a
-	PR_GET_TID_ADDRESS               = 0x28
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_MPX_DISABLE_MANAGEMENT        = 0x2c
-	PR_MPX_ENABLE_MANAGEMENT         = 0x2b
-	PR_SET_CHILD_SUBREAPER           = 0x24
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_FP_MODE                   = 0x2d
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_ARG_END                = 0x9
-	PR_SET_MM_ARG_START              = 0x8
-	PR_SET_MM_AUXV                   = 0xc
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_ENV_END                = 0xb
-	PR_SET_MM_ENV_START              = 0xa
-	PR_SET_MM_EXE_FILE               = 0xd
-	PR_SET_MM_MAP                    = 0xe
-	PR_SET_MM_MAP_SIZE               = 0xf
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_THP_DISABLE               = 0x29
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETFPREGS                 = 0xe
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETSIGMASK                = 0x420a
-	PTRACE_GET_THREAD_AREA           = 0x19
-	PTRACE_GET_THREAD_AREA_3264      = 0xc4
-	PTRACE_GET_WATCH_REGS            = 0xd0
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_OLDSETOPTIONS             = 0x15
-	PTRACE_O_EXITKILL                = 0x100000
-	PTRACE_O_MASK                    = 0x3000ff
-	PTRACE_O_SUSPEND_SECCOMP         = 0x200000
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKDATA_3264             = 0xc1
-	PTRACE_PEEKSIGINFO               = 0x4209
-	PTRACE_PEEKSIGINFO_SHARED        = 0x1
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKTEXT_3264             = 0xc0
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKEDATA_3264             = 0xc3
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKETEXT_3264             = 0xc2
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SETFPREGS                 = 0xf
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETSIGMASK                = 0x420b
-	PTRACE_SET_THREAD_AREA           = 0x1a
-	PTRACE_SET_WATCH_REGS            = 0xd1
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TRACEME                   = 0x0
-	RLIMIT_AS                        = 0x6
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x5
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CC_ALGO                     = 0x10
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_MASK                = 0xf
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0x10
-	RTAX_MTU                         = 0x2
-	RTAX_QUICKACK                    = 0xf
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x16
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELMDB                       = 0x55
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELNSID                      = 0x59
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMDB                       = 0x56
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETNETCONF                   = 0x52
-	RTM_GETNSID                      = 0x5a
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x5b
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWMDB                       = 0x54
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWNETCONF                   = 0x50
-	RTM_NEWNSID                      = 0x58
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x13
-	RTM_NR_MSGTYPES                  = 0x4c
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_COMPARE_MASK                = 0x11
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_LINKDOWN                  = 0x10
-	RTNH_F_OFFLOAD                   = 0x8
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BABEL                     = 0x2a
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MROUTED                   = 0x11
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SCM_WIFI_STATUS                  = 0x29
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x40047307
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x40047309
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x80047308
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x1
-	SOCK_NONBLOCK                    = 0x80
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x2
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0xffff
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1009
-	SO_ATTACH_BPF                    = 0x32
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BPF_EXTENSIONS                = 0x30
-	SO_BROADCAST                     = 0x20
-	SO_BSDCOMPAT                     = 0xe
-	SO_BUSY_POLL                     = 0x2e
-	SO_DEBUG                         = 0x1
-	SO_DETACH_BPF                    = 0x1b
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x1029
-	SO_DONTROUTE                     = 0x10
-	SO_ERROR                         = 0x1007
-	SO_GET_FILTER                    = 0x1a
-	SO_INCOMING_CPU                  = 0x31
-	SO_KEEPALIVE                     = 0x8
-	SO_LINGER                        = 0x80
-	SO_LOCK_FILTER                   = 0x2c
-	SO_MARK                          = 0x24
-	SO_MAX_PACING_RATE               = 0x2f
-	SO_NOFCS                         = 0x2b
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0x100
-	SO_PASSCRED                      = 0x11
-	SO_PASSSEC                       = 0x22
-	SO_PEEK_OFF                      = 0x2a
-	SO_PEERCRED                      = 0x12
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1e
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x1028
-	SO_RCVBUF                        = 0x1002
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x1004
-	SO_RCVTIMEO                      = 0x1006
-	SO_REUSEADDR                     = 0x4
-	SO_REUSEPORT                     = 0x200
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SELECT_ERR_QUEUE              = 0x2d
-	SO_SNDBUF                        = 0x1001
-	SO_SNDBUFFORCE                   = 0x1f
-	SO_SNDLOWAT                      = 0x1003
-	SO_SNDTIMEO                      = 0x1005
-	SO_STYLE                         = 0x1008
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x1008
-	SO_WIFI_STATUS                   = 0x29
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TCFLSH                           = 0x5407
-	TCIFLUSH                         = 0x0
-	TCIOFLUSH                        = 0x2
-	TCOFLUSH                         = 0x1
-	TCP_CONGESTION                   = 0xd
-	TCP_COOKIE_IN_ALWAYS             = 0x1
-	TCP_COOKIE_MAX                   = 0x10
-	TCP_COOKIE_MIN                   = 0x8
-	TCP_COOKIE_OUT_NEVER             = 0x2
-	TCP_COOKIE_PAIR_SIZE             = 0x20
-	TCP_COOKIE_TRANSACTIONS          = 0xf
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_FASTOPEN                     = 0x17
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_MSS_DEFAULT                  = 0x218
-	TCP_MSS_DESIRED                  = 0x4c4
-	TCP_NODELAY                      = 0x1
-	TCP_QUEUE_SEQ                    = 0x15
-	TCP_QUICKACK                     = 0xc
-	TCP_REPAIR                       = 0x13
-	TCP_REPAIR_OPTIONS               = 0x16
-	TCP_REPAIR_QUEUE                 = 0x14
-	TCP_SYNCNT                       = 0x7
-	TCP_S_DATA_IN                    = 0x4
-	TCP_S_DATA_OUT                   = 0x8
-	TCP_THIN_DUPACK                  = 0x11
-	TCP_THIN_LINEAR_TIMEOUTS         = 0x10
-	TCP_TIMESTAMP                    = 0x18
-	TCP_USER_TIMEOUT                 = 0x12
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x5410
-	TCSBRK                           = 0x5405
-	TCXONC                           = 0x5406
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x80047478
-	TIOCEXCL                         = 0x740d
-	TIOCGDEV                         = 0x40045432
-	TIOCGETD                         = 0x7400
-	TIOCGETP                         = 0x7408
-	TIOCGEXCL                        = 0x40045440
-	TIOCGICOUNT                      = 0x5492
-	TIOCGLCKTRMIOS                   = 0x548b
-	TIOCGLTC                         = 0x7474
-	TIOCGPGRP                        = 0x40047477
-	TIOCGPKT                         = 0x40045438
-	TIOCGPTLCK                       = 0x40045439
-	TIOCGPTN                         = 0x40045430
-	TIOCGRS485                       = 0x4020542e
-	TIOCGSERIAL                      = 0x5484
-	TIOCGSID                         = 0x7416
-	TIOCGSOFTCAR                     = 0x5481
-	TIOCGWINSZ                       = 0x40087468
-	TIOCINQ                          = 0x467f
-	TIOCLINUX                        = 0x5483
-	TIOCMBIC                         = 0x741c
-	TIOCMBIS                         = 0x741b
-	TIOCMGET                         = 0x741d
-	TIOCMIWAIT                       = 0x5491
-	TIOCMSET                         = 0x741a
-	TIOCM_CAR                        = 0x100
-	TIOCM_CD                         = 0x100
-	TIOCM_CTS                        = 0x40
-	TIOCM_DSR                        = 0x400
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_RI                         = 0x200
-	TIOCM_RNG                        = 0x200
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x20
-	TIOCM_ST                         = 0x10
-	TIOCNOTTY                        = 0x5471
-	TIOCNXCL                         = 0x740e
-	TIOCOUTQ                         = 0x7472
-	TIOCPKT                          = 0x5470
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x5480
-	TIOCSERCONFIG                    = 0x5488
-	TIOCSERGETLSR                    = 0x548e
-	TIOCSERGETMULTI                  = 0x548f
-	TIOCSERGSTRUCT                   = 0x548d
-	TIOCSERGWILD                     = 0x5489
-	TIOCSERSETMULTI                  = 0x5490
-	TIOCSERSWILD                     = 0x548a
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETD                         = 0x7401
-	TIOCSETN                         = 0x740a
-	TIOCSETP                         = 0x7409
-	TIOCSIG                          = 0x80045436
-	TIOCSLCKTRMIOS                   = 0x548c
-	TIOCSLTC                         = 0x7475
-	TIOCSPGRP                        = 0x80047476
-	TIOCSPTLCK                       = 0x80045431
-	TIOCSRS485                       = 0xc020542f
-	TIOCSSERIAL                      = 0x5485
-	TIOCSSOFTCAR                     = 0x5482
-	TIOCSTI                          = 0x5472
-	TIOCSWINSZ                       = 0x80087467
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x8000
-	TUNATTACHFILTER                  = 0x801054d5
-	TUNDETACHFILTER                  = 0x801054d6
-	TUNGETFEATURES                   = 0x400454cf
-	TUNGETFILTER                     = 0x401054db
-	TUNGETIFF                        = 0x400454d2
-	TUNGETSNDBUF                     = 0x400454d3
-	TUNGETVNETBE                     = 0x400454df
-	TUNGETVNETHDRSZ                  = 0x400454d7
-	TUNGETVNETLE                     = 0x400454dd
-	TUNSETDEBUG                      = 0x800454c9
-	TUNSETGROUP                      = 0x800454ce
-	TUNSETIFF                        = 0x800454ca
-	TUNSETIFINDEX                    = 0x800454da
-	TUNSETLINK                       = 0x800454cd
-	TUNSETNOCSUM                     = 0x800454c8
-	TUNSETOFFLOAD                    = 0x800454d0
-	TUNSETOWNER                      = 0x800454cc
-	TUNSETPERSIST                    = 0x800454cb
-	TUNSETQUEUE                      = 0x800454d9
-	TUNSETSNDBUF                     = 0x800454d4
-	TUNSETTXFILTER                   = 0x800454d1
-	TUNSETVNETBE                     = 0x800454de
-	TUNSETVNETHDRSZ                  = 0x800454d8
-	TUNSETVNETLE                     = 0x800454dc
-	VDISCARD                         = 0xd
-	VEOF                             = 0x10
-	VEOL                             = 0x11
-	VEOL2                            = 0x6
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x4
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xc
-	VSTART                           = 0x8
-	VSTOP                            = 0x9
-	VSUSP                            = 0xa
-	VSWTC                            = 0x7
-	VSWTCH                           = 0x7
-	VT0                              = 0x0
-	VT1                              = 0x4000
-	VTDLY                            = 0x4000
-	VTIME                            = 0x5
-	VWERASE                          = 0xe
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x7d)
-	EADDRNOTAVAIL   = syscall.Errno(0x7e)
-	EADV            = syscall.Errno(0x44)
-	EAFNOSUPPORT    = syscall.Errno(0x7c)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x95)
-	EBADE           = syscall.Errno(0x32)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x51)
-	EBADMSG         = syscall.Errno(0x4d)
-	EBADR           = syscall.Errno(0x33)
-	EBADRQC         = syscall.Errno(0x36)
-	EBADSLT         = syscall.Errno(0x37)
-	EBFONT          = syscall.Errno(0x3b)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x9e)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x25)
-	ECOMM           = syscall.Errno(0x46)
-	ECONNABORTED    = syscall.Errno(0x82)
-	ECONNREFUSED    = syscall.Errno(0x92)
-	ECONNRESET      = syscall.Errno(0x83)
-	EDEADLK         = syscall.Errno(0x2d)
-	EDEADLOCK       = syscall.Errno(0x38)
-	EDESTADDRREQ    = syscall.Errno(0x60)
-	EDOM            = syscall.Errno(0x21)
-	EDOTDOT         = syscall.Errno(0x49)
-	EDQUOT          = syscall.Errno(0x46d)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x93)
-	EHOSTUNREACH    = syscall.Errno(0x94)
-	EHWPOISON       = syscall.Errno(0xa8)
-	EIDRM           = syscall.Errno(0x24)
-	EILSEQ          = syscall.Errno(0x58)
-	EINIT           = syscall.Errno(0x8d)
-	EINPROGRESS     = syscall.Errno(0x96)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x85)
-	EISDIR          = syscall.Errno(0x15)
-	EISNAM          = syscall.Errno(0x8b)
-	EKEYEXPIRED     = syscall.Errno(0xa2)
-	EKEYREJECTED    = syscall.Errno(0xa4)
-	EKEYREVOKED     = syscall.Errno(0xa3)
-	EL2HLT          = syscall.Errno(0x2c)
-	EL2NSYNC        = syscall.Errno(0x26)
-	EL3HLT          = syscall.Errno(0x27)
-	EL3RST          = syscall.Errno(0x28)
-	ELIBACC         = syscall.Errno(0x53)
-	ELIBBAD         = syscall.Errno(0x54)
-	ELIBEXEC        = syscall.Errno(0x57)
-	ELIBMAX         = syscall.Errno(0x56)
-	ELIBSCN         = syscall.Errno(0x55)
-	ELNRNG          = syscall.Errno(0x29)
-	ELOOP           = syscall.Errno(0x5a)
-	EMEDIUMTYPE     = syscall.Errno(0xa0)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x61)
-	EMULTIHOP       = syscall.Errno(0x4a)
-	ENAMETOOLONG    = syscall.Errno(0x4e)
-	ENAVAIL         = syscall.Errno(0x8a)
-	ENETDOWN        = syscall.Errno(0x7f)
-	ENETRESET       = syscall.Errno(0x81)
-	ENETUNREACH     = syscall.Errno(0x80)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x35)
-	ENOBUFS         = syscall.Errno(0x84)
-	ENOCSI          = syscall.Errno(0x2b)
-	ENODATA         = syscall.Errno(0x3d)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOKEY          = syscall.Errno(0xa1)
-	ENOLCK          = syscall.Errno(0x2e)
-	ENOLINK         = syscall.Errno(0x43)
-	ENOMEDIUM       = syscall.Errno(0x9f)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x23)
-	ENONET          = syscall.Errno(0x40)
-	ENOPKG          = syscall.Errno(0x41)
-	ENOPROTOOPT     = syscall.Errno(0x63)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x3f)
-	ENOSTR          = syscall.Errno(0x3c)
-	ENOSYS          = syscall.Errno(0x59)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x86)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x5d)
-	ENOTNAM         = syscall.Errno(0x89)
-	ENOTRECOVERABLE = syscall.Errno(0xa6)
-	ENOTSOCK        = syscall.Errno(0x5f)
-	ENOTSUP         = syscall.Errno(0x7a)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x50)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x7a)
-	EOVERFLOW       = syscall.Errno(0x4f)
-	EOWNERDEAD      = syscall.Errno(0xa5)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x7b)
-	EPIPE           = syscall.Errno(0x20)
-	EPROTO          = syscall.Errno(0x47)
-	EPROTONOSUPPORT = syscall.Errno(0x78)
-	EPROTOTYPE      = syscall.Errno(0x62)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x52)
-	EREMDEV         = syscall.Errno(0x8e)
-	EREMOTE         = syscall.Errno(0x42)
-	EREMOTEIO       = syscall.Errno(0x8c)
-	ERESTART        = syscall.Errno(0x5b)
-	ERFKILL         = syscall.Errno(0xa7)
-	EROFS           = syscall.Errno(0x1e)
-	ESHUTDOWN       = syscall.Errno(0x8f)
-	ESOCKTNOSUPPORT = syscall.Errno(0x79)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x45)
-	ESTALE          = syscall.Errno(0x97)
-	ESTRPIPE        = syscall.Errno(0x5c)
-	ETIME           = syscall.Errno(0x3e)
-	ETIMEDOUT       = syscall.Errno(0x91)
-	ETOOMANYREFS    = syscall.Errno(0x90)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUCLEAN         = syscall.Errno(0x87)
-	EUNATCH         = syscall.Errno(0x2a)
-	EUSERS          = syscall.Errno(0x5e)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x34)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x12)
-	SIGCLD    = syscall.Signal(0x12)
-	SIGCONT   = syscall.Signal(0x19)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x16)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPOLL   = syscall.Signal(0x16)
-	SIGPROF   = syscall.Signal(0x1d)
-	SIGPWR    = syscall.Signal(0x13)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x17)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x18)
-	SIGTTIN   = syscall.Signal(0x1a)
-	SIGTTOU   = syscall.Signal(0x1b)
-	SIGURG    = syscall.Signal(0x15)
-	SIGUSR1   = syscall.Signal(0x10)
-	SIGUSR2   = syscall.Signal(0x11)
-	SIGVTALRM = syscall.Signal(0x1c)
-	SIGWINCH  = syscall.Signal(0x14)
-	SIGXCPU   = syscall.Signal(0x1e)
-	SIGXFSZ   = syscall.Signal(0x1f)
-)
-
-// Error table
-var errors = [...]string{
-	1:    "operation not permitted",
-	2:    "no such file or directory",
-	3:    "no such process",
-	4:    "interrupted system call",
-	5:    "input/output error",
-	6:    "no such device or address",
-	7:    "argument list too long",
-	8:    "exec format error",
-	9:    "bad file descriptor",
-	10:   "no child processes",
-	11:   "resource temporarily unavailable",
-	12:   "cannot allocate memory",
-	13:   "permission denied",
-	14:   "bad address",
-	15:   "block device required",
-	16:   "device or resource busy",
-	17:   "file exists",
-	18:   "invalid cross-device link",
-	19:   "no such device",
-	20:   "not a directory",
-	21:   "is a directory",
-	22:   "invalid argument",
-	23:   "too many open files in system",
-	24:   "too many open files",
-	25:   "inappropriate ioctl for device",
-	26:   "text file busy",
-	27:   "file too large",
-	28:   "no space left on device",
-	29:   "illegal seek",
-	30:   "read-only file system",
-	31:   "too many links",
-	32:   "broken pipe",
-	33:   "numerical argument out of domain",
-	34:   "numerical result out of range",
-	35:   "no message of desired type",
-	36:   "identifier removed",
-	37:   "channel number out of range",
-	38:   "level 2 not synchronized",
-	39:   "level 3 halted",
-	40:   "level 3 reset",
-	41:   "link number out of range",
-	42:   "protocol driver not attached",
-	43:   "no CSI structure available",
-	44:   "level 2 halted",
-	45:   "resource deadlock avoided",
-	46:   "no locks available",
-	50:   "invalid exchange",
-	51:   "invalid request descriptor",
-	52:   "exchange full",
-	53:   "no anode",
-	54:   "invalid request code",
-	55:   "invalid slot",
-	56:   "file locking deadlock error",
-	59:   "bad font file format",
-	60:   "device not a stream",
-	61:   "no data available",
-	62:   "timer expired",
-	63:   "out of streams resources",
-	64:   "machine is not on the network",
-	65:   "package not installed",
-	66:   "object is remote",
-	67:   "link has been severed",
-	68:   "advertise error",
-	69:   "srmount error",
-	70:   "communication error on send",
-	71:   "protocol error",
-	73:   "RFS specific error",
-	74:   "multihop attempted",
-	77:   "bad message",
-	78:   "file name too long",
-	79:   "value too large for defined data type",
-	80:   "name not unique on network",
-	81:   "file descriptor in bad state",
-	82:   "remote address changed",
-	83:   "can not access a needed shared library",
-	84:   "accessing a corrupted shared library",
-	85:   ".lib section in a.out corrupted",
-	86:   "attempting to link in too many shared libraries",
-	87:   "cannot exec a shared library directly",
-	88:   "invalid or incomplete multibyte or wide character",
-	89:   "function not implemented",
-	90:   "too many levels of symbolic links",
-	91:   "interrupted system call should be restarted",
-	92:   "streams pipe error",
-	93:   "directory not empty",
-	94:   "too many users",
-	95:   "socket operation on non-socket",
-	96:   "destination address required",
-	97:   "message too long",
-	98:   "protocol wrong type for socket",
-	99:   "protocol not available",
-	120:  "protocol not supported",
-	121:  "socket type not supported",
-	122:  "operation not supported",
-	123:  "protocol family not supported",
-	124:  "address family not supported by protocol",
-	125:  "address already in use",
-	126:  "cannot assign requested address",
-	127:  "network is down",
-	128:  "network is unreachable",
-	129:  "network dropped connection on reset",
-	130:  "software caused connection abort",
-	131:  "connection reset by peer",
-	132:  "no buffer space available",
-	133:  "transport endpoint is already connected",
-	134:  "transport endpoint is not connected",
-	135:  "structure needs cleaning",
-	137:  "not a XENIX named type file",
-	138:  "no XENIX semaphores available",
-	139:  "is a named type file",
-	140:  "remote I/O error",
-	141:  "unknown error 141",
-	142:  "unknown error 142",
-	143:  "cannot send after transport endpoint shutdown",
-	144:  "too many references: cannot splice",
-	145:  "connection timed out",
-	146:  "connection refused",
-	147:  "host is down",
-	148:  "no route to host",
-	149:  "operation already in progress",
-	150:  "operation now in progress",
-	151:  "stale file handle",
-	158:  "operation canceled",
-	159:  "no medium found",
-	160:  "wrong medium type",
-	161:  "required key not available",
-	162:  "key has expired",
-	163:  "key has been revoked",
-	164:  "key was rejected by service",
-	165:  "owner died",
-	166:  "state not recoverable",
-	167:  "operation not possible due to RF-kill",
-	168:  "memory page has hardware error",
-	1133: "disk quota exceeded",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "user defined signal 1",
-	17: "user defined signal 2",
-	18: "child exited",
-	19: "power failure",
-	20: "window changed",
-	21: "urgent I/O condition",
-	22: "I/O possible",
-	23: "stopped (signal)",
-	24: "stopped",
-	25: "continued",
-	26: "stopped (tty input)",
-	27: "stopped (tty output)",
-	28: "virtual timer expired",
-	29: "profiling timer expired",
-	30: "CPU time limit exceeded",
-	31: "file size limit exceeded",
-}


[19/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/newt/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
deleted file mode 100644
index 329f25e..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ /dev/null
@@ -1,2027 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build s390x,linux
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_ALG                           = 0x26
-	AF_APPLETALK                     = 0x5
-	AF_ASH                           = 0x12
-	AF_ATMPVC                        = 0x8
-	AF_ATMSVC                        = 0x14
-	AF_AX25                          = 0x3
-	AF_BLUETOOTH                     = 0x1f
-	AF_BRIDGE                        = 0x7
-	AF_CAIF                          = 0x25
-	AF_CAN                           = 0x1d
-	AF_DECnet                        = 0xc
-	AF_ECONET                        = 0x13
-	AF_FILE                          = 0x1
-	AF_IB                            = 0x1b
-	AF_IEEE802154                    = 0x24
-	AF_INET                          = 0x2
-	AF_INET6                         = 0xa
-	AF_IPX                           = 0x4
-	AF_IRDA                          = 0x17
-	AF_ISDN                          = 0x22
-	AF_IUCV                          = 0x20
-	AF_KEY                           = 0xf
-	AF_LLC                           = 0x1a
-	AF_LOCAL                         = 0x1
-	AF_MAX                           = 0x29
-	AF_MPLS                          = 0x1c
-	AF_NETBEUI                       = 0xd
-	AF_NETLINK                       = 0x10
-	AF_NETROM                        = 0x6
-	AF_NFC                           = 0x27
-	AF_PACKET                        = 0x11
-	AF_PHONET                        = 0x23
-	AF_PPPOX                         = 0x18
-	AF_RDS                           = 0x15
-	AF_ROSE                          = 0xb
-	AF_ROUTE                         = 0x10
-	AF_RXRPC                         = 0x21
-	AF_SECURITY                      = 0xe
-	AF_SNA                           = 0x16
-	AF_TIPC                          = 0x1e
-	AF_UNIX                          = 0x1
-	AF_UNSPEC                        = 0x0
-	AF_VSOCK                         = 0x28
-	AF_WANPIPE                       = 0x19
-	AF_X25                           = 0x9
-	ARPHRD_6LOWPAN                   = 0x339
-	ARPHRD_ADAPT                     = 0x108
-	ARPHRD_APPLETLK                  = 0x8
-	ARPHRD_ARCNET                    = 0x7
-	ARPHRD_ASH                       = 0x30d
-	ARPHRD_ATM                       = 0x13
-	ARPHRD_AX25                      = 0x3
-	ARPHRD_BIF                       = 0x307
-	ARPHRD_CAIF                      = 0x336
-	ARPHRD_CAN                       = 0x118
-	ARPHRD_CHAOS                     = 0x5
-	ARPHRD_CISCO                     = 0x201
-	ARPHRD_CSLIP                     = 0x101
-	ARPHRD_CSLIP6                    = 0x103
-	ARPHRD_DDCMP                     = 0x205
-	ARPHRD_DLCI                      = 0xf
-	ARPHRD_ECONET                    = 0x30e
-	ARPHRD_EETHER                    = 0x2
-	ARPHRD_ETHER                     = 0x1
-	ARPHRD_EUI64                     = 0x1b
-	ARPHRD_FCAL                      = 0x311
-	ARPHRD_FCFABRIC                  = 0x313
-	ARPHRD_FCPL                      = 0x312
-	ARPHRD_FCPP                      = 0x310
-	ARPHRD_FDDI                      = 0x306
-	ARPHRD_FRAD                      = 0x302
-	ARPHRD_HDLC                      = 0x201
-	ARPHRD_HIPPI                     = 0x30c
-	ARPHRD_HWX25                     = 0x110
-	ARPHRD_IEEE1394                  = 0x18
-	ARPHRD_IEEE802                   = 0x6
-	ARPHRD_IEEE80211                 = 0x321
-	ARPHRD_IEEE80211_PRISM           = 0x322
-	ARPHRD_IEEE80211_RADIOTAP        = 0x323
-	ARPHRD_IEEE802154                = 0x324
-	ARPHRD_IEEE802154_MONITOR        = 0x325
-	ARPHRD_IEEE802_TR                = 0x320
-	ARPHRD_INFINIBAND                = 0x20
-	ARPHRD_IP6GRE                    = 0x337
-	ARPHRD_IPDDP                     = 0x309
-	ARPHRD_IPGRE                     = 0x30a
-	ARPHRD_IRDA                      = 0x30f
-	ARPHRD_LAPB                      = 0x204
-	ARPHRD_LOCALTLK                  = 0x305
-	ARPHRD_LOOPBACK                  = 0x304
-	ARPHRD_METRICOM                  = 0x17
-	ARPHRD_NETLINK                   = 0x338
-	ARPHRD_NETROM                    = 0x0
-	ARPHRD_NONE                      = 0xfffe
-	ARPHRD_PHONET                    = 0x334
-	ARPHRD_PHONET_PIPE               = 0x335
-	ARPHRD_PIMREG                    = 0x30b
-	ARPHRD_PPP                       = 0x200
-	ARPHRD_PRONET                    = 0x4
-	ARPHRD_RAWHDLC                   = 0x206
-	ARPHRD_ROSE                      = 0x10e
-	ARPHRD_RSRVD                     = 0x104
-	ARPHRD_SIT                       = 0x308
-	ARPHRD_SKIP                      = 0x303
-	ARPHRD_SLIP                      = 0x100
-	ARPHRD_SLIP6                     = 0x102
-	ARPHRD_TUNNEL                    = 0x300
-	ARPHRD_TUNNEL6                   = 0x301
-	ARPHRD_VOID                      = 0xffff
-	ARPHRD_X25                       = 0x10f
-	B0                               = 0x0
-	B1000000                         = 0x1008
-	B110                             = 0x3
-	B115200                          = 0x1002
-	B1152000                         = 0x1009
-	B1200                            = 0x9
-	B134                             = 0x4
-	B150                             = 0x5
-	B1500000                         = 0x100a
-	B1800                            = 0xa
-	B19200                           = 0xe
-	B200                             = 0x6
-	B2000000                         = 0x100b
-	B230400                          = 0x1003
-	B2400                            = 0xb
-	B2500000                         = 0x100c
-	B300                             = 0x7
-	B3000000                         = 0x100d
-	B3500000                         = 0x100e
-	B38400                           = 0xf
-	B4000000                         = 0x100f
-	B460800                          = 0x1004
-	B4800                            = 0xc
-	B50                              = 0x1
-	B500000                          = 0x1005
-	B57600                           = 0x1001
-	B576000                          = 0x1006
-	B600                             = 0x8
-	B75                              = 0x2
-	B921600                          = 0x1007
-	B9600                            = 0xd
-	BOTHER                           = 0x1000
-	BPF_A                            = 0x10
-	BPF_ABS                          = 0x20
-	BPF_ADD                          = 0x0
-	BPF_ALU                          = 0x4
-	BPF_AND                          = 0x50
-	BPF_B                            = 0x10
-	BPF_DIV                          = 0x30
-	BPF_H                            = 0x8
-	BPF_IMM                          = 0x0
-	BPF_IND                          = 0x40
-	BPF_JA                           = 0x0
-	BPF_JEQ                          = 0x10
-	BPF_JGE                          = 0x30
-	BPF_JGT                          = 0x20
-	BPF_JMP                          = 0x5
-	BPF_JSET                         = 0x40
-	BPF_K                            = 0x0
-	BPF_LD                           = 0x0
-	BPF_LDX                          = 0x1
-	BPF_LEN                          = 0x80
-	BPF_LL_OFF                       = -0x200000
-	BPF_LSH                          = 0x60
-	BPF_MAJOR_VERSION                = 0x1
-	BPF_MAXINSNS                     = 0x1000
-	BPF_MEM                          = 0x60
-	BPF_MEMWORDS                     = 0x10
-	BPF_MINOR_VERSION                = 0x1
-	BPF_MISC                         = 0x7
-	BPF_MOD                          = 0x90
-	BPF_MSH                          = 0xa0
-	BPF_MUL                          = 0x20
-	BPF_NEG                          = 0x80
-	BPF_NET_OFF                      = -0x100000
-	BPF_OR                           = 0x40
-	BPF_RET                          = 0x6
-	BPF_RSH                          = 0x70
-	BPF_ST                           = 0x2
-	BPF_STX                          = 0x3
-	BPF_SUB                          = 0x10
-	BPF_TAX                          = 0x0
-	BPF_TXA                          = 0x80
-	BPF_W                            = 0x0
-	BPF_X                            = 0x8
-	BPF_XOR                          = 0xa0
-	BRKINT                           = 0x2
-	BS0                              = 0x0
-	BS1                              = 0x2000
-	BSDLY                            = 0x2000
-	CBAUD                            = 0x100f
-	CBAUDEX                          = 0x1000
-	CFLUSH                           = 0xf
-	CIBAUD                           = 0x100f0000
-	CLOCAL                           = 0x800
-	CLOCK_BOOTTIME                   = 0x7
-	CLOCK_BOOTTIME_ALARM             = 0x9
-	CLOCK_DEFAULT                    = 0x0
-	CLOCK_EXT                        = 0x1
-	CLOCK_INT                        = 0x2
-	CLOCK_MONOTONIC                  = 0x1
-	CLOCK_MONOTONIC_COARSE           = 0x6
-	CLOCK_MONOTONIC_RAW              = 0x4
-	CLOCK_PROCESS_CPUTIME_ID         = 0x2
-	CLOCK_REALTIME                   = 0x0
-	CLOCK_REALTIME_ALARM             = 0x8
-	CLOCK_REALTIME_COARSE            = 0x5
-	CLOCK_TAI                        = 0xb
-	CLOCK_THREAD_CPUTIME_ID          = 0x3
-	CLOCK_TXFROMRX                   = 0x4
-	CLOCK_TXINT                      = 0x3
-	CLONE_CHILD_CLEARTID             = 0x200000
-	CLONE_CHILD_SETTID               = 0x1000000
-	CLONE_DETACHED                   = 0x400000
-	CLONE_FILES                      = 0x400
-	CLONE_FS                         = 0x200
-	CLONE_IO                         = 0x80000000
-	CLONE_NEWCGROUP                  = 0x2000000
-	CLONE_NEWIPC                     = 0x8000000
-	CLONE_NEWNET                     = 0x40000000
-	CLONE_NEWNS                      = 0x20000
-	CLONE_NEWPID                     = 0x20000000
-	CLONE_NEWUSER                    = 0x10000000
-	CLONE_NEWUTS                     = 0x4000000
-	CLONE_PARENT                     = 0x8000
-	CLONE_PARENT_SETTID              = 0x100000
-	CLONE_PTRACE                     = 0x2000
-	CLONE_SETTLS                     = 0x80000
-	CLONE_SIGHAND                    = 0x800
-	CLONE_SYSVSEM                    = 0x40000
-	CLONE_THREAD                     = 0x10000
-	CLONE_UNTRACED                   = 0x800000
-	CLONE_VFORK                      = 0x4000
-	CLONE_VM                         = 0x100
-	CMSPAR                           = 0x40000000
-	CR0                              = 0x0
-	CR1                              = 0x200
-	CR2                              = 0x400
-	CR3                              = 0x600
-	CRDLY                            = 0x600
-	CREAD                            = 0x80
-	CRTSCTS                          = 0x80000000
-	CS5                              = 0x0
-	CS6                              = 0x10
-	CS7                              = 0x20
-	CS8                              = 0x30
-	CSIGNAL                          = 0xff
-	CSIZE                            = 0x30
-	CSTART                           = 0x11
-	CSTATUS                          = 0x0
-	CSTOP                            = 0x13
-	CSTOPB                           = 0x40
-	CSUSP                            = 0x1a
-	DT_BLK                           = 0x6
-	DT_CHR                           = 0x2
-	DT_DIR                           = 0x4
-	DT_FIFO                          = 0x1
-	DT_LNK                           = 0xa
-	DT_REG                           = 0x8
-	DT_SOCK                          = 0xc
-	DT_UNKNOWN                       = 0x0
-	DT_WHT                           = 0xe
-	ECHO                             = 0x8
-	ECHOCTL                          = 0x200
-	ECHOE                            = 0x10
-	ECHOK                            = 0x20
-	ECHOKE                           = 0x800
-	ECHONL                           = 0x40
-	ECHOPRT                          = 0x400
-	ENCODING_DEFAULT                 = 0x0
-	ENCODING_FM_MARK                 = 0x3
-	ENCODING_FM_SPACE                = 0x4
-	ENCODING_MANCHESTER              = 0x5
-	ENCODING_NRZ                     = 0x1
-	ENCODING_NRZI                    = 0x2
-	EPOLLERR                         = 0x8
-	EPOLLET                          = 0x80000000
-	EPOLLHUP                         = 0x10
-	EPOLLIN                          = 0x1
-	EPOLLMSG                         = 0x400
-	EPOLLONESHOT                     = 0x40000000
-	EPOLLOUT                         = 0x4
-	EPOLLPRI                         = 0x2
-	EPOLLRDBAND                      = 0x80
-	EPOLLRDHUP                       = 0x2000
-	EPOLLRDNORM                      = 0x40
-	EPOLLWAKEUP                      = 0x20000000
-	EPOLLWRBAND                      = 0x200
-	EPOLLWRNORM                      = 0x100
-	EPOLL_CLOEXEC                    = 0x80000
-	EPOLL_CTL_ADD                    = 0x1
-	EPOLL_CTL_DEL                    = 0x2
-	EPOLL_CTL_MOD                    = 0x3
-	ETH_P_1588                       = 0x88f7
-	ETH_P_8021AD                     = 0x88a8
-	ETH_P_8021AH                     = 0x88e7
-	ETH_P_8021Q                      = 0x8100
-	ETH_P_80221                      = 0x8917
-	ETH_P_802_2                      = 0x4
-	ETH_P_802_3                      = 0x1
-	ETH_P_802_3_MIN                  = 0x600
-	ETH_P_802_EX1                    = 0x88b5
-	ETH_P_AARP                       = 0x80f3
-	ETH_P_AF_IUCV                    = 0xfbfb
-	ETH_P_ALL                        = 0x3
-	ETH_P_AOE                        = 0x88a2
-	ETH_P_ARCNET                     = 0x1a
-	ETH_P_ARP                        = 0x806
-	ETH_P_ATALK                      = 0x809b
-	ETH_P_ATMFATE                    = 0x8884
-	ETH_P_ATMMPOA                    = 0x884c
-	ETH_P_AX25                       = 0x2
-	ETH_P_BATMAN                     = 0x4305
-	ETH_P_BPQ                        = 0x8ff
-	ETH_P_CAIF                       = 0xf7
-	ETH_P_CAN                        = 0xc
-	ETH_P_CANFD                      = 0xd
-	ETH_P_CONTROL                    = 0x16
-	ETH_P_CUST                       = 0x6006
-	ETH_P_DDCMP                      = 0x6
-	ETH_P_DEC                        = 0x6000
-	ETH_P_DIAG                       = 0x6005
-	ETH_P_DNA_DL                     = 0x6001
-	ETH_P_DNA_RC                     = 0x6002
-	ETH_P_DNA_RT                     = 0x6003
-	ETH_P_DSA                        = 0x1b
-	ETH_P_ECONET                     = 0x18
-	ETH_P_EDSA                       = 0xdada
-	ETH_P_FCOE                       = 0x8906
-	ETH_P_FIP                        = 0x8914
-	ETH_P_HDLC                       = 0x19
-	ETH_P_IEEE802154                 = 0xf6
-	ETH_P_IEEEPUP                    = 0xa00
-	ETH_P_IEEEPUPAT                  = 0xa01
-	ETH_P_IP                         = 0x800
-	ETH_P_IPV6                       = 0x86dd
-	ETH_P_IPX                        = 0x8137
-	ETH_P_IRDA                       = 0x17
-	ETH_P_LAT                        = 0x6004
-	ETH_P_LINK_CTL                   = 0x886c
-	ETH_P_LOCALTALK                  = 0x9
-	ETH_P_LOOP                       = 0x60
-	ETH_P_LOOPBACK                   = 0x9000
-	ETH_P_MOBITEX                    = 0x15
-	ETH_P_MPLS_MC                    = 0x8848
-	ETH_P_MPLS_UC                    = 0x8847
-	ETH_P_MVRP                       = 0x88f5
-	ETH_P_PAE                        = 0x888e
-	ETH_P_PAUSE                      = 0x8808
-	ETH_P_PHONET                     = 0xf5
-	ETH_P_PPPTALK                    = 0x10
-	ETH_P_PPP_DISC                   = 0x8863
-	ETH_P_PPP_MP                     = 0x8
-	ETH_P_PPP_SES                    = 0x8864
-	ETH_P_PRP                        = 0x88fb
-	ETH_P_PUP                        = 0x200
-	ETH_P_PUPAT                      = 0x201
-	ETH_P_QINQ1                      = 0x9100
-	ETH_P_QINQ2                      = 0x9200
-	ETH_P_QINQ3                      = 0x9300
-	ETH_P_RARP                       = 0x8035
-	ETH_P_SCA                        = 0x6007
-	ETH_P_SLOW                       = 0x8809
-	ETH_P_SNAP                       = 0x5
-	ETH_P_TDLS                       = 0x890d
-	ETH_P_TEB                        = 0x6558
-	ETH_P_TIPC                       = 0x88ca
-	ETH_P_TRAILER                    = 0x1c
-	ETH_P_TR_802_2                   = 0x11
-	ETH_P_TSN                        = 0x22f0
-	ETH_P_WAN_PPP                    = 0x7
-	ETH_P_WCCP                       = 0x883e
-	ETH_P_X25                        = 0x805
-	ETH_P_XDSA                       = 0xf8
-	EXTA                             = 0xe
-	EXTB                             = 0xf
-	EXTPROC                          = 0x10000
-	FD_CLOEXEC                       = 0x1
-	FD_SETSIZE                       = 0x400
-	FF0                              = 0x0
-	FF1                              = 0x8000
-	FFDLY                            = 0x8000
-	FLUSHO                           = 0x1000
-	F_DUPFD                          = 0x0
-	F_DUPFD_CLOEXEC                  = 0x406
-	F_EXLCK                          = 0x4
-	F_GETFD                          = 0x1
-	F_GETFL                          = 0x3
-	F_GETLEASE                       = 0x401
-	F_GETLK                          = 0x5
-	F_GETLK64                        = 0x5
-	F_GETOWN                         = 0x9
-	F_GETOWN_EX                      = 0x10
-	F_GETPIPE_SZ                     = 0x408
-	F_GETSIG                         = 0xb
-	F_LOCK                           = 0x1
-	F_NOTIFY                         = 0x402
-	F_OFD_GETLK                      = 0x24
-	F_OFD_SETLK                      = 0x25
-	F_OFD_SETLKW                     = 0x26
-	F_OK                             = 0x0
-	F_RDLCK                          = 0x0
-	F_SETFD                          = 0x2
-	F_SETFL                          = 0x4
-	F_SETLEASE                       = 0x400
-	F_SETLK                          = 0x6
-	F_SETLK64                        = 0x6
-	F_SETLKW                         = 0x7
-	F_SETLKW64                       = 0x7
-	F_SETOWN                         = 0x8
-	F_SETOWN_EX                      = 0xf
-	F_SETPIPE_SZ                     = 0x407
-	F_SETSIG                         = 0xa
-	F_SHLCK                          = 0x8
-	F_TEST                           = 0x3
-	F_TLOCK                          = 0x2
-	F_ULOCK                          = 0x0
-	F_UNLCK                          = 0x2
-	F_WRLCK                          = 0x1
-	HUPCL                            = 0x400
-	IBSHIFT                          = 0x10
-	ICANON                           = 0x2
-	ICMPV6_FILTER                    = 0x1
-	ICRNL                            = 0x100
-	IEXTEN                           = 0x8000
-	IFA_F_DADFAILED                  = 0x8
-	IFA_F_DEPRECATED                 = 0x20
-	IFA_F_HOMEADDRESS                = 0x10
-	IFA_F_MANAGETEMPADDR             = 0x100
-	IFA_F_MCAUTOJOIN                 = 0x400
-	IFA_F_NODAD                      = 0x2
-	IFA_F_NOPREFIXROUTE              = 0x200
-	IFA_F_OPTIMISTIC                 = 0x4
-	IFA_F_PERMANENT                  = 0x80
-	IFA_F_SECONDARY                  = 0x1
-	IFA_F_STABLE_PRIVACY             = 0x800
-	IFA_F_TEMPORARY                  = 0x1
-	IFA_F_TENTATIVE                  = 0x40
-	IFA_MAX                          = 0x8
-	IFF_ALLMULTI                     = 0x200
-	IFF_ATTACH_QUEUE                 = 0x200
-	IFF_AUTOMEDIA                    = 0x4000
-	IFF_BROADCAST                    = 0x2
-	IFF_DEBUG                        = 0x4
-	IFF_DETACH_QUEUE                 = 0x400
-	IFF_DORMANT                      = 0x20000
-	IFF_DYNAMIC                      = 0x8000
-	IFF_ECHO                         = 0x40000
-	IFF_LOOPBACK                     = 0x8
-	IFF_LOWER_UP                     = 0x10000
-	IFF_MASTER                       = 0x400
-	IFF_MULTICAST                    = 0x1000
-	IFF_MULTI_QUEUE                  = 0x100
-	IFF_NOARP                        = 0x80
-	IFF_NOFILTER                     = 0x1000
-	IFF_NOTRAILERS                   = 0x20
-	IFF_NO_PI                        = 0x1000
-	IFF_ONE_QUEUE                    = 0x2000
-	IFF_PERSIST                      = 0x800
-	IFF_POINTOPOINT                  = 0x10
-	IFF_PORTSEL                      = 0x2000
-	IFF_PROMISC                      = 0x100
-	IFF_RUNNING                      = 0x40
-	IFF_SLAVE                        = 0x800
-	IFF_TAP                          = 0x2
-	IFF_TUN                          = 0x1
-	IFF_TUN_EXCL                     = 0x8000
-	IFF_UP                           = 0x1
-	IFF_VNET_HDR                     = 0x4000
-	IFF_VOLATILE                     = 0x70c5a
-	IFNAMSIZ                         = 0x10
-	IGNBRK                           = 0x1
-	IGNCR                            = 0x80
-	IGNPAR                           = 0x4
-	IMAXBEL                          = 0x2000
-	INLCR                            = 0x40
-	INPCK                            = 0x10
-	IN_ACCESS                        = 0x1
-	IN_ALL_EVENTS                    = 0xfff
-	IN_ATTRIB                        = 0x4
-	IN_CLASSA_HOST                   = 0xffffff
-	IN_CLASSA_MAX                    = 0x80
-	IN_CLASSA_NET                    = 0xff000000
-	IN_CLASSA_NSHIFT                 = 0x18
-	IN_CLASSB_HOST                   = 0xffff
-	IN_CLASSB_MAX                    = 0x10000
-	IN_CLASSB_NET                    = 0xffff0000
-	IN_CLASSB_NSHIFT                 = 0x10
-	IN_CLASSC_HOST                   = 0xff
-	IN_CLASSC_NET                    = 0xffffff00
-	IN_CLASSC_NSHIFT                 = 0x8
-	IN_CLOEXEC                       = 0x80000
-	IN_CLOSE                         = 0x18
-	IN_CLOSE_NOWRITE                 = 0x10
-	IN_CLOSE_WRITE                   = 0x8
-	IN_CREATE                        = 0x100
-	IN_DELETE                        = 0x200
-	IN_DELETE_SELF                   = 0x400
-	IN_DONT_FOLLOW                   = 0x2000000
-	IN_EXCL_UNLINK                   = 0x4000000
-	IN_IGNORED                       = 0x8000
-	IN_ISDIR                         = 0x40000000
-	IN_LOOPBACKNET                   = 0x7f
-	IN_MASK_ADD                      = 0x20000000
-	IN_MODIFY                        = 0x2
-	IN_MOVE                          = 0xc0
-	IN_MOVED_FROM                    = 0x40
-	IN_MOVED_TO                      = 0x80
-	IN_MOVE_SELF                     = 0x800
-	IN_NONBLOCK                      = 0x800
-	IN_ONESHOT                       = 0x80000000
-	IN_ONLYDIR                       = 0x1000000
-	IN_OPEN                          = 0x20
-	IN_Q_OVERFLOW                    = 0x4000
-	IN_UNMOUNT                       = 0x2000
-	IPPROTO_AH                       = 0x33
-	IPPROTO_BEETPH                   = 0x5e
-	IPPROTO_COMP                     = 0x6c
-	IPPROTO_DCCP                     = 0x21
-	IPPROTO_DSTOPTS                  = 0x3c
-	IPPROTO_EGP                      = 0x8
-	IPPROTO_ENCAP                    = 0x62
-	IPPROTO_ESP                      = 0x32
-	IPPROTO_FRAGMENT                 = 0x2c
-	IPPROTO_GRE                      = 0x2f
-	IPPROTO_HOPOPTS                  = 0x0
-	IPPROTO_ICMP                     = 0x1
-	IPPROTO_ICMPV6                   = 0x3a
-	IPPROTO_IDP                      = 0x16
-	IPPROTO_IGMP                     = 0x2
-	IPPROTO_IP                       = 0x0
-	IPPROTO_IPIP                     = 0x4
-	IPPROTO_IPV6                     = 0x29
-	IPPROTO_MH                       = 0x87
-	IPPROTO_MPLS                     = 0x89
-	IPPROTO_MTP                      = 0x5c
-	IPPROTO_NONE                     = 0x3b
-	IPPROTO_PIM                      = 0x67
-	IPPROTO_PUP                      = 0xc
-	IPPROTO_RAW                      = 0xff
-	IPPROTO_ROUTING                  = 0x2b
-	IPPROTO_RSVP                     = 0x2e
-	IPPROTO_SCTP                     = 0x84
-	IPPROTO_TCP                      = 0x6
-	IPPROTO_TP                       = 0x1d
-	IPPROTO_UDP                      = 0x11
-	IPPROTO_UDPLITE                  = 0x88
-	IPV6_2292DSTOPTS                 = 0x4
-	IPV6_2292HOPLIMIT                = 0x8
-	IPV6_2292HOPOPTS                 = 0x3
-	IPV6_2292PKTINFO                 = 0x2
-	IPV6_2292PKTOPTIONS              = 0x6
-	IPV6_2292RTHDR                   = 0x5
-	IPV6_ADDRFORM                    = 0x1
-	IPV6_ADD_MEMBERSHIP              = 0x14
-	IPV6_AUTHHDR                     = 0xa
-	IPV6_CHECKSUM                    = 0x7
-	IPV6_DONTFRAG                    = 0x3e
-	IPV6_DROP_MEMBERSHIP             = 0x15
-	IPV6_DSTOPTS                     = 0x3b
-	IPV6_HOPLIMIT                    = 0x34
-	IPV6_HOPOPTS                     = 0x36
-	IPV6_IPSEC_POLICY                = 0x22
-	IPV6_JOIN_ANYCAST                = 0x1b
-	IPV6_JOIN_GROUP                  = 0x14
-	IPV6_LEAVE_ANYCAST               = 0x1c
-	IPV6_LEAVE_GROUP                 = 0x15
-	IPV6_MTU                         = 0x18
-	IPV6_MTU_DISCOVER                = 0x17
-	IPV6_MULTICAST_HOPS              = 0x12
-	IPV6_MULTICAST_IF                = 0x11
-	IPV6_MULTICAST_LOOP              = 0x13
-	IPV6_NEXTHOP                     = 0x9
-	IPV6_PATHMTU                     = 0x3d
-	IPV6_PKTINFO                     = 0x32
-	IPV6_PMTUDISC_DO                 = 0x2
-	IPV6_PMTUDISC_DONT               = 0x0
-	IPV6_PMTUDISC_INTERFACE          = 0x4
-	IPV6_PMTUDISC_OMIT               = 0x5
-	IPV6_PMTUDISC_PROBE              = 0x3
-	IPV6_PMTUDISC_WANT               = 0x1
-	IPV6_RECVDSTOPTS                 = 0x3a
-	IPV6_RECVERR                     = 0x19
-	IPV6_RECVHOPLIMIT                = 0x33
-	IPV6_RECVHOPOPTS                 = 0x35
-	IPV6_RECVPATHMTU                 = 0x3c
-	IPV6_RECVPKTINFO                 = 0x31
-	IPV6_RECVRTHDR                   = 0x38
-	IPV6_RECVTCLASS                  = 0x42
-	IPV6_ROUTER_ALERT                = 0x16
-	IPV6_RTHDR                       = 0x39
-	IPV6_RTHDRDSTOPTS                = 0x37
-	IPV6_RTHDR_LOOSE                 = 0x0
-	IPV6_RTHDR_STRICT                = 0x1
-	IPV6_RTHDR_TYPE_0                = 0x0
-	IPV6_RXDSTOPTS                   = 0x3b
-	IPV6_RXHOPOPTS                   = 0x36
-	IPV6_TCLASS                      = 0x43
-	IPV6_UNICAST_HOPS                = 0x10
-	IPV6_V6ONLY                      = 0x1a
-	IPV6_XFRM_POLICY                 = 0x23
-	IP_ADD_MEMBERSHIP                = 0x23
-	IP_ADD_SOURCE_MEMBERSHIP         = 0x27
-	IP_BIND_ADDRESS_NO_PORT          = 0x18
-	IP_BLOCK_SOURCE                  = 0x26
-	IP_CHECKSUM                      = 0x17
-	IP_DEFAULT_MULTICAST_LOOP        = 0x1
-	IP_DEFAULT_MULTICAST_TTL         = 0x1
-	IP_DF                            = 0x4000
-	IP_DROP_MEMBERSHIP               = 0x24
-	IP_DROP_SOURCE_MEMBERSHIP        = 0x28
-	IP_FREEBIND                      = 0xf
-	IP_HDRINCL                       = 0x3
-	IP_IPSEC_POLICY                  = 0x10
-	IP_MAXPACKET                     = 0xffff
-	IP_MAX_MEMBERSHIPS               = 0x14
-	IP_MF                            = 0x2000
-	IP_MINTTL                        = 0x15
-	IP_MSFILTER                      = 0x29
-	IP_MSS                           = 0x240
-	IP_MTU                           = 0xe
-	IP_MTU_DISCOVER                  = 0xa
-	IP_MULTICAST_ALL                 = 0x31
-	IP_MULTICAST_IF                  = 0x20
-	IP_MULTICAST_LOOP                = 0x22
-	IP_MULTICAST_TTL                 = 0x21
-	IP_NODEFRAG                      = 0x16
-	IP_OFFMASK                       = 0x1fff
-	IP_OPTIONS                       = 0x4
-	IP_ORIGDSTADDR                   = 0x14
-	IP_PASSSEC                       = 0x12
-	IP_PKTINFO                       = 0x8
-	IP_PKTOPTIONS                    = 0x9
-	IP_PMTUDISC                      = 0xa
-	IP_PMTUDISC_DO                   = 0x2
-	IP_PMTUDISC_DONT                 = 0x0
-	IP_PMTUDISC_INTERFACE            = 0x4
-	IP_PMTUDISC_OMIT                 = 0x5
-	IP_PMTUDISC_PROBE                = 0x3
-	IP_PMTUDISC_WANT                 = 0x1
-	IP_RECVERR                       = 0xb
-	IP_RECVOPTS                      = 0x6
-	IP_RECVORIGDSTADDR               = 0x14
-	IP_RECVRETOPTS                   = 0x7
-	IP_RECVTOS                       = 0xd
-	IP_RECVTTL                       = 0xc
-	IP_RETOPTS                       = 0x7
-	IP_RF                            = 0x8000
-	IP_ROUTER_ALERT                  = 0x5
-	IP_TOS                           = 0x1
-	IP_TRANSPARENT                   = 0x13
-	IP_TTL                           = 0x2
-	IP_UNBLOCK_SOURCE                = 0x25
-	IP_UNICAST_IF                    = 0x32
-	IP_XFRM_POLICY                   = 0x11
-	ISIG                             = 0x1
-	ISTRIP                           = 0x20
-	IUCLC                            = 0x200
-	IUTF8                            = 0x4000
-	IXANY                            = 0x800
-	IXOFF                            = 0x1000
-	IXON                             = 0x400
-	LINUX_REBOOT_CMD_CAD_OFF         = 0x0
-	LINUX_REBOOT_CMD_CAD_ON          = 0x89abcdef
-	LINUX_REBOOT_CMD_HALT            = 0xcdef0123
-	LINUX_REBOOT_CMD_KEXEC           = 0x45584543
-	LINUX_REBOOT_CMD_POWER_OFF       = 0x4321fedc
-	LINUX_REBOOT_CMD_RESTART         = 0x1234567
-	LINUX_REBOOT_CMD_RESTART2        = 0xa1b2c3d4
-	LINUX_REBOOT_CMD_SW_SUSPEND      = 0xd000fce2
-	LINUX_REBOOT_MAGIC1              = 0xfee1dead
-	LINUX_REBOOT_MAGIC2              = 0x28121969
-	LOCK_EX                          = 0x2
-	LOCK_NB                          = 0x4
-	LOCK_SH                          = 0x1
-	LOCK_UN                          = 0x8
-	MADV_DODUMP                      = 0x11
-	MADV_DOFORK                      = 0xb
-	MADV_DONTDUMP                    = 0x10
-	MADV_DONTFORK                    = 0xa
-	MADV_DONTNEED                    = 0x4
-	MADV_HUGEPAGE                    = 0xe
-	MADV_HWPOISON                    = 0x64
-	MADV_MERGEABLE                   = 0xc
-	MADV_NOHUGEPAGE                  = 0xf
-	MADV_NORMAL                      = 0x0
-	MADV_RANDOM                      = 0x1
-	MADV_REMOVE                      = 0x9
-	MADV_SEQUENTIAL                  = 0x2
-	MADV_UNMERGEABLE                 = 0xd
-	MADV_WILLNEED                    = 0x3
-	MAP_ANON                         = 0x20
-	MAP_ANONYMOUS                    = 0x20
-	MAP_DENYWRITE                    = 0x800
-	MAP_EXECUTABLE                   = 0x1000
-	MAP_FILE                         = 0x0
-	MAP_FIXED                        = 0x10
-	MAP_GROWSDOWN                    = 0x100
-	MAP_HUGETLB                      = 0x40000
-	MAP_HUGE_MASK                    = 0x3f
-	MAP_HUGE_SHIFT                   = 0x1a
-	MAP_LOCKED                       = 0x2000
-	MAP_NONBLOCK                     = 0x10000
-	MAP_NORESERVE                    = 0x4000
-	MAP_POPULATE                     = 0x8000
-	MAP_PRIVATE                      = 0x2
-	MAP_SHARED                       = 0x1
-	MAP_STACK                        = 0x20000
-	MAP_TYPE                         = 0xf
-	MCL_CURRENT                      = 0x1
-	MCL_FUTURE                       = 0x2
-	MCL_ONFAULT                      = 0x4
-	MNT_DETACH                       = 0x2
-	MNT_EXPIRE                       = 0x4
-	MNT_FORCE                        = 0x1
-	MSG_CMSG_CLOEXEC                 = 0x40000000
-	MSG_CONFIRM                      = 0x800
-	MSG_CTRUNC                       = 0x8
-	MSG_DONTROUTE                    = 0x4
-	MSG_DONTWAIT                     = 0x40
-	MSG_EOR                          = 0x80
-	MSG_ERRQUEUE                     = 0x2000
-	MSG_FASTOPEN                     = 0x20000000
-	MSG_FIN                          = 0x200
-	MSG_MORE                         = 0x8000
-	MSG_NOSIGNAL                     = 0x4000
-	MSG_OOB                          = 0x1
-	MSG_PEEK                         = 0x2
-	MSG_PROXY                        = 0x10
-	MSG_RST                          = 0x1000
-	MSG_SYN                          = 0x400
-	MSG_TRUNC                        = 0x20
-	MSG_TRYHARD                      = 0x4
-	MSG_WAITALL                      = 0x100
-	MSG_WAITFORONE                   = 0x10000
-	MS_ACTIVE                        = 0x40000000
-	MS_ASYNC                         = 0x1
-	MS_BIND                          = 0x1000
-	MS_DIRSYNC                       = 0x80
-	MS_INVALIDATE                    = 0x2
-	MS_I_VERSION                     = 0x800000
-	MS_KERNMOUNT                     = 0x400000
-	MS_LAZYTIME                      = 0x2000000
-	MS_MANDLOCK                      = 0x40
-	MS_MGC_MSK                       = 0xffff0000
-	MS_MGC_VAL                       = 0xc0ed0000
-	MS_MOVE                          = 0x2000
-	MS_NOATIME                       = 0x400
-	MS_NODEV                         = 0x4
-	MS_NODIRATIME                    = 0x800
-	MS_NOEXEC                        = 0x8
-	MS_NOSUID                        = 0x2
-	MS_NOUSER                        = -0x80000000
-	MS_POSIXACL                      = 0x10000
-	MS_PRIVATE                       = 0x40000
-	MS_RDONLY                        = 0x1
-	MS_REC                           = 0x4000
-	MS_RELATIME                      = 0x200000
-	MS_REMOUNT                       = 0x20
-	MS_RMT_MASK                      = 0x2800051
-	MS_SHARED                        = 0x100000
-	MS_SILENT                        = 0x8000
-	MS_SLAVE                         = 0x80000
-	MS_STRICTATIME                   = 0x1000000
-	MS_SYNC                          = 0x4
-	MS_SYNCHRONOUS                   = 0x10
-	MS_UNBINDABLE                    = 0x20000
-	NAME_MAX                         = 0xff
-	NETLINK_ADD_MEMBERSHIP           = 0x1
-	NETLINK_AUDIT                    = 0x9
-	NETLINK_BROADCAST_ERROR          = 0x4
-	NETLINK_CAP_ACK                  = 0xa
-	NETLINK_CONNECTOR                = 0xb
-	NETLINK_CRYPTO                   = 0x15
-	NETLINK_DNRTMSG                  = 0xe
-	NETLINK_DROP_MEMBERSHIP          = 0x2
-	NETLINK_ECRYPTFS                 = 0x13
-	NETLINK_FIB_LOOKUP               = 0xa
-	NETLINK_FIREWALL                 = 0x3
-	NETLINK_GENERIC                  = 0x10
-	NETLINK_INET_DIAG                = 0x4
-	NETLINK_IP6_FW                   = 0xd
-	NETLINK_ISCSI                    = 0x8
-	NETLINK_KOBJECT_UEVENT           = 0xf
-	NETLINK_LISTEN_ALL_NSID          = 0x8
-	NETLINK_LIST_MEMBERSHIPS         = 0x9
-	NETLINK_NETFILTER                = 0xc
-	NETLINK_NFLOG                    = 0x5
-	NETLINK_NO_ENOBUFS               = 0x5
-	NETLINK_PKTINFO                  = 0x3
-	NETLINK_RDMA                     = 0x14
-	NETLINK_ROUTE                    = 0x0
-	NETLINK_RX_RING                  = 0x6
-	NETLINK_SCSITRANSPORT            = 0x12
-	NETLINK_SELINUX                  = 0x7
-	NETLINK_SOCK_DIAG                = 0x4
-	NETLINK_TX_RING                  = 0x7
-	NETLINK_UNUSED                   = 0x1
-	NETLINK_USERSOCK                 = 0x2
-	NETLINK_XFRM                     = 0x6
-	NL0                              = 0x0
-	NL1                              = 0x100
-	NLA_ALIGNTO                      = 0x4
-	NLA_F_NESTED                     = 0x8000
-	NLA_F_NET_BYTEORDER              = 0x4000
-	NLA_HDRLEN                       = 0x4
-	NLDLY                            = 0x100
-	NLMSG_ALIGNTO                    = 0x4
-	NLMSG_DONE                       = 0x3
-	NLMSG_ERROR                      = 0x2
-	NLMSG_HDRLEN                     = 0x10
-	NLMSG_MIN_TYPE                   = 0x10
-	NLMSG_NOOP                       = 0x1
-	NLMSG_OVERRUN                    = 0x4
-	NLM_F_ACK                        = 0x4
-	NLM_F_APPEND                     = 0x800
-	NLM_F_ATOMIC                     = 0x400
-	NLM_F_CREATE                     = 0x400
-	NLM_F_DUMP                       = 0x300
-	NLM_F_DUMP_FILTERED              = 0x20
-	NLM_F_DUMP_INTR                  = 0x10
-	NLM_F_ECHO                       = 0x8
-	NLM_F_EXCL                       = 0x200
-	NLM_F_MATCH                      = 0x200
-	NLM_F_MULTI                      = 0x2
-	NLM_F_REPLACE                    = 0x100
-	NLM_F_REQUEST                    = 0x1
-	NLM_F_ROOT                       = 0x100
-	NOFLSH                           = 0x80
-	OCRNL                            = 0x8
-	OFDEL                            = 0x80
-	OFILL                            = 0x40
-	OLCUC                            = 0x2
-	ONLCR                            = 0x4
-	ONLRET                           = 0x20
-	ONOCR                            = 0x10
-	OPOST                            = 0x1
-	O_ACCMODE                        = 0x3
-	O_APPEND                         = 0x400
-	O_ASYNC                          = 0x2000
-	O_CLOEXEC                        = 0x80000
-	O_CREAT                          = 0x40
-	O_DIRECT                         = 0x4000
-	O_DIRECTORY                      = 0x10000
-	O_DSYNC                          = 0x1000
-	O_EXCL                           = 0x80
-	O_FSYNC                          = 0x101000
-	O_LARGEFILE                      = 0x0
-	O_NDELAY                         = 0x800
-	O_NOATIME                        = 0x40000
-	O_NOCTTY                         = 0x100
-	O_NOFOLLOW                       = 0x20000
-	O_NONBLOCK                       = 0x800
-	O_PATH                           = 0x200000
-	O_RDONLY                         = 0x0
-	O_RDWR                           = 0x2
-	O_RSYNC                          = 0x101000
-	O_SYNC                           = 0x101000
-	O_TMPFILE                        = 0x410000
-	O_TRUNC                          = 0x200
-	O_WRONLY                         = 0x1
-	PACKET_ADD_MEMBERSHIP            = 0x1
-	PACKET_AUXDATA                   = 0x8
-	PACKET_BROADCAST                 = 0x1
-	PACKET_COPY_THRESH               = 0x7
-	PACKET_DROP_MEMBERSHIP           = 0x2
-	PACKET_FANOUT                    = 0x12
-	PACKET_FANOUT_CBPF               = 0x6
-	PACKET_FANOUT_CPU                = 0x2
-	PACKET_FANOUT_DATA               = 0x16
-	PACKET_FANOUT_EBPF               = 0x7
-	PACKET_FANOUT_FLAG_DEFRAG        = 0x8000
-	PACKET_FANOUT_FLAG_ROLLOVER      = 0x1000
-	PACKET_FANOUT_HASH               = 0x0
-	PACKET_FANOUT_LB                 = 0x1
-	PACKET_FANOUT_QM                 = 0x5
-	PACKET_FANOUT_RND                = 0x4
-	PACKET_FANOUT_ROLLOVER           = 0x3
-	PACKET_FASTROUTE                 = 0x6
-	PACKET_HDRLEN                    = 0xb
-	PACKET_HOST                      = 0x0
-	PACKET_KERNEL                    = 0x7
-	PACKET_LOOPBACK                  = 0x5
-	PACKET_LOSS                      = 0xe
-	PACKET_MR_ALLMULTI               = 0x2
-	PACKET_MR_MULTICAST              = 0x0
-	PACKET_MR_PROMISC                = 0x1
-	PACKET_MR_UNICAST                = 0x3
-	PACKET_MULTICAST                 = 0x2
-	PACKET_ORIGDEV                   = 0x9
-	PACKET_OTHERHOST                 = 0x3
-	PACKET_OUTGOING                  = 0x4
-	PACKET_QDISC_BYPASS              = 0x14
-	PACKET_RECV_OUTPUT               = 0x3
-	PACKET_RESERVE                   = 0xc
-	PACKET_ROLLOVER_STATS            = 0x15
-	PACKET_RX_RING                   = 0x5
-	PACKET_STATISTICS                = 0x6
-	PACKET_TIMESTAMP                 = 0x11
-	PACKET_TX_HAS_OFF                = 0x13
-	PACKET_TX_RING                   = 0xd
-	PACKET_TX_TIMESTAMP              = 0x10
-	PACKET_USER                      = 0x6
-	PACKET_VERSION                   = 0xa
-	PACKET_VNET_HDR                  = 0xf
-	PARENB                           = 0x100
-	PARITY_CRC16_PR0                 = 0x2
-	PARITY_CRC16_PR0_CCITT           = 0x4
-	PARITY_CRC16_PR1                 = 0x3
-	PARITY_CRC16_PR1_CCITT           = 0x5
-	PARITY_CRC32_PR0_CCITT           = 0x6
-	PARITY_CRC32_PR1_CCITT           = 0x7
-	PARITY_DEFAULT                   = 0x0
-	PARITY_NONE                      = 0x1
-	PARMRK                           = 0x8
-	PARODD                           = 0x200
-	PENDIN                           = 0x4000
-	PRIO_PGRP                        = 0x1
-	PRIO_PROCESS                     = 0x0
-	PRIO_USER                        = 0x2
-	PROT_EXEC                        = 0x4
-	PROT_GROWSDOWN                   = 0x1000000
-	PROT_GROWSUP                     = 0x2000000
-	PROT_NONE                        = 0x0
-	PROT_READ                        = 0x1
-	PROT_WRITE                       = 0x2
-	PR_CAPBSET_DROP                  = 0x18
-	PR_CAPBSET_READ                  = 0x17
-	PR_CAP_AMBIENT                   = 0x2f
-	PR_CAP_AMBIENT_CLEAR_ALL         = 0x4
-	PR_CAP_AMBIENT_IS_SET            = 0x1
-	PR_CAP_AMBIENT_LOWER             = 0x3
-	PR_CAP_AMBIENT_RAISE             = 0x2
-	PR_ENDIAN_BIG                    = 0x0
-	PR_ENDIAN_LITTLE                 = 0x1
-	PR_ENDIAN_PPC_LITTLE             = 0x2
-	PR_FPEMU_NOPRINT                 = 0x1
-	PR_FPEMU_SIGFPE                  = 0x2
-	PR_FP_EXC_ASYNC                  = 0x2
-	PR_FP_EXC_DISABLED               = 0x0
-	PR_FP_EXC_DIV                    = 0x10000
-	PR_FP_EXC_INV                    = 0x100000
-	PR_FP_EXC_NONRECOV               = 0x1
-	PR_FP_EXC_OVF                    = 0x20000
-	PR_FP_EXC_PRECISE                = 0x3
-	PR_FP_EXC_RES                    = 0x80000
-	PR_FP_EXC_SW_ENABLE              = 0x80
-	PR_FP_EXC_UND                    = 0x40000
-	PR_FP_MODE_FR                    = 0x1
-	PR_FP_MODE_FRE                   = 0x2
-	PR_GET_CHILD_SUBREAPER           = 0x25
-	PR_GET_DUMPABLE                  = 0x3
-	PR_GET_ENDIAN                    = 0x13
-	PR_GET_FPEMU                     = 0x9
-	PR_GET_FPEXC                     = 0xb
-	PR_GET_FP_MODE                   = 0x2e
-	PR_GET_KEEPCAPS                  = 0x7
-	PR_GET_NAME                      = 0x10
-	PR_GET_NO_NEW_PRIVS              = 0x27
-	PR_GET_PDEATHSIG                 = 0x2
-	PR_GET_SECCOMP                   = 0x15
-	PR_GET_SECUREBITS                = 0x1b
-	PR_GET_THP_DISABLE               = 0x2a
-	PR_GET_TID_ADDRESS               = 0x28
-	PR_GET_TIMERSLACK                = 0x1e
-	PR_GET_TIMING                    = 0xd
-	PR_GET_TSC                       = 0x19
-	PR_GET_UNALIGN                   = 0x5
-	PR_MCE_KILL                      = 0x21
-	PR_MCE_KILL_CLEAR                = 0x0
-	PR_MCE_KILL_DEFAULT              = 0x2
-	PR_MCE_KILL_EARLY                = 0x1
-	PR_MCE_KILL_GET                  = 0x22
-	PR_MCE_KILL_LATE                 = 0x0
-	PR_MCE_KILL_SET                  = 0x1
-	PR_MPX_DISABLE_MANAGEMENT        = 0x2c
-	PR_MPX_ENABLE_MANAGEMENT         = 0x2b
-	PR_SET_CHILD_SUBREAPER           = 0x24
-	PR_SET_DUMPABLE                  = 0x4
-	PR_SET_ENDIAN                    = 0x14
-	PR_SET_FPEMU                     = 0xa
-	PR_SET_FPEXC                     = 0xc
-	PR_SET_FP_MODE                   = 0x2d
-	PR_SET_KEEPCAPS                  = 0x8
-	PR_SET_MM                        = 0x23
-	PR_SET_MM_ARG_END                = 0x9
-	PR_SET_MM_ARG_START              = 0x8
-	PR_SET_MM_AUXV                   = 0xc
-	PR_SET_MM_BRK                    = 0x7
-	PR_SET_MM_END_CODE               = 0x2
-	PR_SET_MM_END_DATA               = 0x4
-	PR_SET_MM_ENV_END                = 0xb
-	PR_SET_MM_ENV_START              = 0xa
-	PR_SET_MM_EXE_FILE               = 0xd
-	PR_SET_MM_MAP                    = 0xe
-	PR_SET_MM_MAP_SIZE               = 0xf
-	PR_SET_MM_START_BRK              = 0x6
-	PR_SET_MM_START_CODE             = 0x1
-	PR_SET_MM_START_DATA             = 0x3
-	PR_SET_MM_START_STACK            = 0x5
-	PR_SET_NAME                      = 0xf
-	PR_SET_NO_NEW_PRIVS              = 0x26
-	PR_SET_PDEATHSIG                 = 0x1
-	PR_SET_PTRACER                   = 0x59616d61
-	PR_SET_PTRACER_ANY               = -0x1
-	PR_SET_SECCOMP                   = 0x16
-	PR_SET_SECUREBITS                = 0x1c
-	PR_SET_THP_DISABLE               = 0x29
-	PR_SET_TIMERSLACK                = 0x1d
-	PR_SET_TIMING                    = 0xe
-	PR_SET_TSC                       = 0x1a
-	PR_SET_UNALIGN                   = 0x6
-	PR_TASK_PERF_EVENTS_DISABLE      = 0x1f
-	PR_TASK_PERF_EVENTS_ENABLE       = 0x20
-	PR_TIMING_STATISTICAL            = 0x0
-	PR_TIMING_TIMESTAMP              = 0x1
-	PR_TSC_ENABLE                    = 0x1
-	PR_TSC_SIGSEGV                   = 0x2
-	PR_UNALIGN_NOPRINT               = 0x1
-	PR_UNALIGN_SIGBUS                = 0x2
-	PTRACE_ATTACH                    = 0x10
-	PTRACE_CONT                      = 0x7
-	PTRACE_DETACH                    = 0x11
-	PTRACE_DISABLE_TE                = 0x5010
-	PTRACE_ENABLE_TE                 = 0x5009
-	PTRACE_EVENT_CLONE               = 0x3
-	PTRACE_EVENT_EXEC                = 0x4
-	PTRACE_EVENT_EXIT                = 0x6
-	PTRACE_EVENT_FORK                = 0x1
-	PTRACE_EVENT_SECCOMP             = 0x7
-	PTRACE_EVENT_STOP                = 0x80
-	PTRACE_EVENT_VFORK               = 0x2
-	PTRACE_EVENT_VFORK_DONE          = 0x5
-	PTRACE_GETEVENTMSG               = 0x4201
-	PTRACE_GETREGS                   = 0xc
-	PTRACE_GETREGSET                 = 0x4204
-	PTRACE_GETSIGINFO                = 0x4202
-	PTRACE_GETSIGMASK                = 0x420a
-	PTRACE_GET_LAST_BREAK            = 0x5006
-	PTRACE_INTERRUPT                 = 0x4207
-	PTRACE_KILL                      = 0x8
-	PTRACE_LISTEN                    = 0x4208
-	PTRACE_OLDSETOPTIONS             = 0x15
-	PTRACE_O_EXITKILL                = 0x100000
-	PTRACE_O_MASK                    = 0x3000ff
-	PTRACE_O_SUSPEND_SECCOMP         = 0x200000
-	PTRACE_O_TRACECLONE              = 0x8
-	PTRACE_O_TRACEEXEC               = 0x10
-	PTRACE_O_TRACEEXIT               = 0x40
-	PTRACE_O_TRACEFORK               = 0x2
-	PTRACE_O_TRACESECCOMP            = 0x80
-	PTRACE_O_TRACESYSGOOD            = 0x1
-	PTRACE_O_TRACEVFORK              = 0x4
-	PTRACE_O_TRACEVFORKDONE          = 0x20
-	PTRACE_PEEKDATA                  = 0x2
-	PTRACE_PEEKDATA_AREA             = 0x5003
-	PTRACE_PEEKSIGINFO               = 0x4209
-	PTRACE_PEEKSIGINFO_SHARED        = 0x1
-	PTRACE_PEEKTEXT                  = 0x1
-	PTRACE_PEEKTEXT_AREA             = 0x5002
-	PTRACE_PEEKUSR                   = 0x3
-	PTRACE_PEEKUSR_AREA              = 0x5000
-	PTRACE_PEEK_SYSTEM_CALL          = 0x5007
-	PTRACE_POKEDATA                  = 0x5
-	PTRACE_POKEDATA_AREA             = 0x5005
-	PTRACE_POKETEXT                  = 0x4
-	PTRACE_POKETEXT_AREA             = 0x5004
-	PTRACE_POKEUSR                   = 0x6
-	PTRACE_POKEUSR_AREA              = 0x5001
-	PTRACE_POKE_SYSTEM_CALL          = 0x5008
-	PTRACE_PROT                      = 0x15
-	PTRACE_SECCOMP_GET_FILTER        = 0x420c
-	PTRACE_SEIZE                     = 0x4206
-	PTRACE_SETOPTIONS                = 0x4200
-	PTRACE_SETREGS                   = 0xd
-	PTRACE_SETREGSET                 = 0x4205
-	PTRACE_SETSIGINFO                = 0x4203
-	PTRACE_SETSIGMASK                = 0x420b
-	PTRACE_SINGLEBLOCK               = 0xc
-	PTRACE_SINGLESTEP                = 0x9
-	PTRACE_SYSCALL                   = 0x18
-	PTRACE_TE_ABORT_RAND             = 0x5011
-	PTRACE_TRACEME                   = 0x0
-	PT_ACR0                          = 0x90
-	PT_ACR1                          = 0x94
-	PT_ACR10                         = 0xb8
-	PT_ACR11                         = 0xbc
-	PT_ACR12                         = 0xc0
-	PT_ACR13                         = 0xc4
-	PT_ACR14                         = 0xc8
-	PT_ACR15                         = 0xcc
-	PT_ACR2                          = 0x98
-	PT_ACR3                          = 0x9c
-	PT_ACR4                          = 0xa0
-	PT_ACR5                          = 0xa4
-	PT_ACR6                          = 0xa8
-	PT_ACR7                          = 0xac
-	PT_ACR8                          = 0xb0
-	PT_ACR9                          = 0xb4
-	PT_CR_10                         = 0x168
-	PT_CR_11                         = 0x170
-	PT_CR_9                          = 0x160
-	PT_ENDREGS                       = 0x1af
-	PT_FPC                           = 0xd8
-	PT_FPR0                          = 0xe0
-	PT_FPR1                          = 0xe8
-	PT_FPR10                         = 0x130
-	PT_FPR11                         = 0x138
-	PT_FPR12                         = 0x140
-	PT_FPR13                         = 0x148
-	PT_FPR14                         = 0x150
-	PT_FPR15                         = 0x158
-	PT_FPR2                          = 0xf0
-	PT_FPR3                          = 0xf8
-	PT_FPR4                          = 0x100
-	PT_FPR5                          = 0x108
-	PT_FPR6                          = 0x110
-	PT_FPR7                          = 0x118
-	PT_FPR8                          = 0x120
-	PT_FPR9                          = 0x128
-	PT_GPR0                          = 0x10
-	PT_GPR1                          = 0x18
-	PT_GPR10                         = 0x60
-	PT_GPR11                         = 0x68
-	PT_GPR12                         = 0x70
-	PT_GPR13                         = 0x78
-	PT_GPR14                         = 0x80
-	PT_GPR15                         = 0x88
-	PT_GPR2                          = 0x20
-	PT_GPR3                          = 0x28
-	PT_GPR4                          = 0x30
-	PT_GPR5                          = 0x38
-	PT_GPR6                          = 0x40
-	PT_GPR7                          = 0x48
-	PT_GPR8                          = 0x50
-	PT_GPR9                          = 0x58
-	PT_IEEE_IP                       = 0x1a8
-	PT_LASTOFF                       = 0x1a8
-	PT_ORIGGPR2                      = 0xd0
-	PT_PSWADDR                       = 0x8
-	PT_PSWMASK                       = 0x0
-	RLIMIT_AS                        = 0x9
-	RLIMIT_CORE                      = 0x4
-	RLIMIT_CPU                       = 0x0
-	RLIMIT_DATA                      = 0x2
-	RLIMIT_FSIZE                     = 0x1
-	RLIMIT_NOFILE                    = 0x7
-	RLIMIT_STACK                     = 0x3
-	RLIM_INFINITY                    = -0x1
-	RTAX_ADVMSS                      = 0x8
-	RTAX_CC_ALGO                     = 0x10
-	RTAX_CWND                        = 0x7
-	RTAX_FEATURES                    = 0xc
-	RTAX_FEATURE_ALLFRAG             = 0x8
-	RTAX_FEATURE_ECN                 = 0x1
-	RTAX_FEATURE_MASK                = 0xf
-	RTAX_FEATURE_SACK                = 0x2
-	RTAX_FEATURE_TIMESTAMP           = 0x4
-	RTAX_HOPLIMIT                    = 0xa
-	RTAX_INITCWND                    = 0xb
-	RTAX_INITRWND                    = 0xe
-	RTAX_LOCK                        = 0x1
-	RTAX_MAX                         = 0x10
-	RTAX_MTU                         = 0x2
-	RTAX_QUICKACK                    = 0xf
-	RTAX_REORDERING                  = 0x9
-	RTAX_RTO_MIN                     = 0xd
-	RTAX_RTT                         = 0x4
-	RTAX_RTTVAR                      = 0x5
-	RTAX_SSTHRESH                    = 0x6
-	RTAX_UNSPEC                      = 0x0
-	RTAX_WINDOW                      = 0x3
-	RTA_ALIGNTO                      = 0x4
-	RTA_MAX                          = 0x16
-	RTCF_DIRECTSRC                   = 0x4000000
-	RTCF_DOREDIRECT                  = 0x1000000
-	RTCF_LOG                         = 0x2000000
-	RTCF_MASQ                        = 0x400000
-	RTCF_NAT                         = 0x800000
-	RTCF_VALVE                       = 0x200000
-	RTF_ADDRCLASSMASK                = 0xf8000000
-	RTF_ADDRCONF                     = 0x40000
-	RTF_ALLONLINK                    = 0x20000
-	RTF_BROADCAST                    = 0x10000000
-	RTF_CACHE                        = 0x1000000
-	RTF_DEFAULT                      = 0x10000
-	RTF_DYNAMIC                      = 0x10
-	RTF_FLOW                         = 0x2000000
-	RTF_GATEWAY                      = 0x2
-	RTF_HOST                         = 0x4
-	RTF_INTERFACE                    = 0x40000000
-	RTF_IRTT                         = 0x100
-	RTF_LINKRT                       = 0x100000
-	RTF_LOCAL                        = 0x80000000
-	RTF_MODIFIED                     = 0x20
-	RTF_MSS                          = 0x40
-	RTF_MTU                          = 0x40
-	RTF_MULTICAST                    = 0x20000000
-	RTF_NAT                          = 0x8000000
-	RTF_NOFORWARD                    = 0x1000
-	RTF_NONEXTHOP                    = 0x200000
-	RTF_NOPMTUDISC                   = 0x4000
-	RTF_POLICY                       = 0x4000000
-	RTF_REINSTATE                    = 0x8
-	RTF_REJECT                       = 0x200
-	RTF_STATIC                       = 0x400
-	RTF_THROW                        = 0x2000
-	RTF_UP                           = 0x1
-	RTF_WINDOW                       = 0x80
-	RTF_XRESOLVE                     = 0x800
-	RTM_BASE                         = 0x10
-	RTM_DELACTION                    = 0x31
-	RTM_DELADDR                      = 0x15
-	RTM_DELADDRLABEL                 = 0x49
-	RTM_DELLINK                      = 0x11
-	RTM_DELMDB                       = 0x55
-	RTM_DELNEIGH                     = 0x1d
-	RTM_DELNSID                      = 0x59
-	RTM_DELQDISC                     = 0x25
-	RTM_DELROUTE                     = 0x19
-	RTM_DELRULE                      = 0x21
-	RTM_DELTCLASS                    = 0x29
-	RTM_DELTFILTER                   = 0x2d
-	RTM_F_CLONED                     = 0x200
-	RTM_F_EQUALIZE                   = 0x400
-	RTM_F_LOOKUP_TABLE               = 0x1000
-	RTM_F_NOTIFY                     = 0x100
-	RTM_F_PREFIX                     = 0x800
-	RTM_GETACTION                    = 0x32
-	RTM_GETADDR                      = 0x16
-	RTM_GETADDRLABEL                 = 0x4a
-	RTM_GETANYCAST                   = 0x3e
-	RTM_GETDCB                       = 0x4e
-	RTM_GETLINK                      = 0x12
-	RTM_GETMDB                       = 0x56
-	RTM_GETMULTICAST                 = 0x3a
-	RTM_GETNEIGH                     = 0x1e
-	RTM_GETNEIGHTBL                  = 0x42
-	RTM_GETNETCONF                   = 0x52
-	RTM_GETNSID                      = 0x5a
-	RTM_GETQDISC                     = 0x26
-	RTM_GETROUTE                     = 0x1a
-	RTM_GETRULE                      = 0x22
-	RTM_GETTCLASS                    = 0x2a
-	RTM_GETTFILTER                   = 0x2e
-	RTM_MAX                          = 0x5b
-	RTM_NEWACTION                    = 0x30
-	RTM_NEWADDR                      = 0x14
-	RTM_NEWADDRLABEL                 = 0x48
-	RTM_NEWLINK                      = 0x10
-	RTM_NEWMDB                       = 0x54
-	RTM_NEWNDUSEROPT                 = 0x44
-	RTM_NEWNEIGH                     = 0x1c
-	RTM_NEWNEIGHTBL                  = 0x40
-	RTM_NEWNETCONF                   = 0x50
-	RTM_NEWNSID                      = 0x58
-	RTM_NEWPREFIX                    = 0x34
-	RTM_NEWQDISC                     = 0x24
-	RTM_NEWROUTE                     = 0x18
-	RTM_NEWRULE                      = 0x20
-	RTM_NEWTCLASS                    = 0x28
-	RTM_NEWTFILTER                   = 0x2c
-	RTM_NR_FAMILIES                  = 0x13
-	RTM_NR_MSGTYPES                  = 0x4c
-	RTM_SETDCB                       = 0x4f
-	RTM_SETLINK                      = 0x13
-	RTM_SETNEIGHTBL                  = 0x43
-	RTNH_ALIGNTO                     = 0x4
-	RTNH_COMPARE_MASK                = 0x11
-	RTNH_F_DEAD                      = 0x1
-	RTNH_F_LINKDOWN                  = 0x10
-	RTNH_F_OFFLOAD                   = 0x8
-	RTNH_F_ONLINK                    = 0x4
-	RTNH_F_PERVASIVE                 = 0x2
-	RTN_MAX                          = 0xb
-	RTPROT_BABEL                     = 0x2a
-	RTPROT_BIRD                      = 0xc
-	RTPROT_BOOT                      = 0x3
-	RTPROT_DHCP                      = 0x10
-	RTPROT_DNROUTED                  = 0xd
-	RTPROT_GATED                     = 0x8
-	RTPROT_KERNEL                    = 0x2
-	RTPROT_MROUTED                   = 0x11
-	RTPROT_MRT                       = 0xa
-	RTPROT_NTK                       = 0xf
-	RTPROT_RA                        = 0x9
-	RTPROT_REDIRECT                  = 0x1
-	RTPROT_STATIC                    = 0x4
-	RTPROT_UNSPEC                    = 0x0
-	RTPROT_XORP                      = 0xe
-	RTPROT_ZEBRA                     = 0xb
-	RT_CLASS_DEFAULT                 = 0xfd
-	RT_CLASS_LOCAL                   = 0xff
-	RT_CLASS_MAIN                    = 0xfe
-	RT_CLASS_MAX                     = 0xff
-	RT_CLASS_UNSPEC                  = 0x0
-	RUSAGE_CHILDREN                  = -0x1
-	RUSAGE_SELF                      = 0x0
-	RUSAGE_THREAD                    = 0x1
-	SCM_CREDENTIALS                  = 0x2
-	SCM_RIGHTS                       = 0x1
-	SCM_TIMESTAMP                    = 0x1d
-	SCM_TIMESTAMPING                 = 0x25
-	SCM_TIMESTAMPNS                  = 0x23
-	SCM_WIFI_STATUS                  = 0x29
-	SHUT_RD                          = 0x0
-	SHUT_RDWR                        = 0x2
-	SHUT_WR                          = 0x1
-	SIOCADDDLCI                      = 0x8980
-	SIOCADDMULTI                     = 0x8931
-	SIOCADDRT                        = 0x890b
-	SIOCATMARK                       = 0x8905
-	SIOCDARP                         = 0x8953
-	SIOCDELDLCI                      = 0x8981
-	SIOCDELMULTI                     = 0x8932
-	SIOCDELRT                        = 0x890c
-	SIOCDEVPRIVATE                   = 0x89f0
-	SIOCDIFADDR                      = 0x8936
-	SIOCDRARP                        = 0x8960
-	SIOCGARP                         = 0x8954
-	SIOCGIFADDR                      = 0x8915
-	SIOCGIFBR                        = 0x8940
-	SIOCGIFBRDADDR                   = 0x8919
-	SIOCGIFCONF                      = 0x8912
-	SIOCGIFCOUNT                     = 0x8938
-	SIOCGIFDSTADDR                   = 0x8917
-	SIOCGIFENCAP                     = 0x8925
-	SIOCGIFFLAGS                     = 0x8913
-	SIOCGIFHWADDR                    = 0x8927
-	SIOCGIFINDEX                     = 0x8933
-	SIOCGIFMAP                       = 0x8970
-	SIOCGIFMEM                       = 0x891f
-	SIOCGIFMETRIC                    = 0x891d
-	SIOCGIFMTU                       = 0x8921
-	SIOCGIFNAME                      = 0x8910
-	SIOCGIFNETMASK                   = 0x891b
-	SIOCGIFPFLAGS                    = 0x8935
-	SIOCGIFSLAVE                     = 0x8929
-	SIOCGIFTXQLEN                    = 0x8942
-	SIOCGPGRP                        = 0x8904
-	SIOCGRARP                        = 0x8961
-	SIOCGSTAMP                       = 0x8906
-	SIOCGSTAMPNS                     = 0x8907
-	SIOCPROTOPRIVATE                 = 0x89e0
-	SIOCRTMSG                        = 0x890d
-	SIOCSARP                         = 0x8955
-	SIOCSIFADDR                      = 0x8916
-	SIOCSIFBR                        = 0x8941
-	SIOCSIFBRDADDR                   = 0x891a
-	SIOCSIFDSTADDR                   = 0x8918
-	SIOCSIFENCAP                     = 0x8926
-	SIOCSIFFLAGS                     = 0x8914
-	SIOCSIFHWADDR                    = 0x8924
-	SIOCSIFHWBROADCAST               = 0x8937
-	SIOCSIFLINK                      = 0x8911
-	SIOCSIFMAP                       = 0x8971
-	SIOCSIFMEM                       = 0x8920
-	SIOCSIFMETRIC                    = 0x891e
-	SIOCSIFMTU                       = 0x8922
-	SIOCSIFNAME                      = 0x8923
-	SIOCSIFNETMASK                   = 0x891c
-	SIOCSIFPFLAGS                    = 0x8934
-	SIOCSIFSLAVE                     = 0x8930
-	SIOCSIFTXQLEN                    = 0x8943
-	SIOCSPGRP                        = 0x8902
-	SIOCSRARP                        = 0x8962
-	SOCK_CLOEXEC                     = 0x80000
-	SOCK_DCCP                        = 0x6
-	SOCK_DGRAM                       = 0x2
-	SOCK_NONBLOCK                    = 0x800
-	SOCK_PACKET                      = 0xa
-	SOCK_RAW                         = 0x3
-	SOCK_RDM                         = 0x4
-	SOCK_SEQPACKET                   = 0x5
-	SOCK_STREAM                      = 0x1
-	SOL_AAL                          = 0x109
-	SOL_ATM                          = 0x108
-	SOL_DECNET                       = 0x105
-	SOL_ICMPV6                       = 0x3a
-	SOL_IP                           = 0x0
-	SOL_IPV6                         = 0x29
-	SOL_IRDA                         = 0x10a
-	SOL_PACKET                       = 0x107
-	SOL_RAW                          = 0xff
-	SOL_SOCKET                       = 0x1
-	SOL_TCP                          = 0x6
-	SOL_X25                          = 0x106
-	SOMAXCONN                        = 0x80
-	SO_ACCEPTCONN                    = 0x1e
-	SO_ATTACH_BPF                    = 0x32
-	SO_ATTACH_FILTER                 = 0x1a
-	SO_BINDTODEVICE                  = 0x19
-	SO_BPF_EXTENSIONS                = 0x30
-	SO_BROADCAST                     = 0x6
-	SO_BSDCOMPAT                     = 0xe
-	SO_BUSY_POLL                     = 0x2e
-	SO_DEBUG                         = 0x1
-	SO_DETACH_BPF                    = 0x1b
-	SO_DETACH_FILTER                 = 0x1b
-	SO_DOMAIN                        = 0x27
-	SO_DONTROUTE                     = 0x5
-	SO_ERROR                         = 0x4
-	SO_GET_FILTER                    = 0x1a
-	SO_INCOMING_CPU                  = 0x31
-	SO_KEEPALIVE                     = 0x9
-	SO_LINGER                        = 0xd
-	SO_LOCK_FILTER                   = 0x2c
-	SO_MARK                          = 0x24
-	SO_MAX_PACING_RATE               = 0x2f
-	SO_NOFCS                         = 0x2b
-	SO_NO_CHECK                      = 0xb
-	SO_OOBINLINE                     = 0xa
-	SO_PASSCRED                      = 0x10
-	SO_PASSSEC                       = 0x22
-	SO_PEEK_OFF                      = 0x2a
-	SO_PEERCRED                      = 0x11
-	SO_PEERNAME                      = 0x1c
-	SO_PEERSEC                       = 0x1f
-	SO_PRIORITY                      = 0xc
-	SO_PROTOCOL                      = 0x26
-	SO_RCVBUF                        = 0x8
-	SO_RCVBUFFORCE                   = 0x21
-	SO_RCVLOWAT                      = 0x12
-	SO_RCVTIMEO                      = 0x14
-	SO_REUSEADDR                     = 0x2
-	SO_REUSEPORT                     = 0xf
-	SO_RXQ_OVFL                      = 0x28
-	SO_SECURITY_AUTHENTICATION       = 0x16
-	SO_SECURITY_ENCRYPTION_NETWORK   = 0x18
-	SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
-	SO_SELECT_ERR_QUEUE              = 0x2d
-	SO_SNDBUF                        = 0x7
-	SO_SNDBUFFORCE                   = 0x20
-	SO_SNDLOWAT                      = 0x13
-	SO_SNDTIMEO                      = 0x15
-	SO_TIMESTAMP                     = 0x1d
-	SO_TIMESTAMPING                  = 0x25
-	SO_TIMESTAMPNS                   = 0x23
-	SO_TYPE                          = 0x3
-	SO_WIFI_STATUS                   = 0x29
-	S_BLKSIZE                        = 0x200
-	S_IEXEC                          = 0x40
-	S_IFBLK                          = 0x6000
-	S_IFCHR                          = 0x2000
-	S_IFDIR                          = 0x4000
-	S_IFIFO                          = 0x1000
-	S_IFLNK                          = 0xa000
-	S_IFMT                           = 0xf000
-	S_IFREG                          = 0x8000
-	S_IFSOCK                         = 0xc000
-	S_IREAD                          = 0x100
-	S_IRGRP                          = 0x20
-	S_IROTH                          = 0x4
-	S_IRUSR                          = 0x100
-	S_IRWXG                          = 0x38
-	S_IRWXO                          = 0x7
-	S_IRWXU                          = 0x1c0
-	S_ISGID                          = 0x400
-	S_ISUID                          = 0x800
-	S_ISVTX                          = 0x200
-	S_IWGRP                          = 0x10
-	S_IWOTH                          = 0x2
-	S_IWRITE                         = 0x80
-	S_IWUSR                          = 0x80
-	S_IXGRP                          = 0x8
-	S_IXOTH                          = 0x1
-	S_IXUSR                          = 0x40
-	TAB0                             = 0x0
-	TAB1                             = 0x800
-	TAB2                             = 0x1000
-	TAB3                             = 0x1800
-	TABDLY                           = 0x1800
-	TCFLSH                           = 0x540b
-	TCGETA                           = 0x5405
-	TCGETS                           = 0x5401
-	TCGETS2                          = 0x802c542a
-	TCGETX                           = 0x5432
-	TCIFLUSH                         = 0x0
-	TCIOFF                           = 0x2
-	TCIOFLUSH                        = 0x2
-	TCION                            = 0x3
-	TCOFLUSH                         = 0x1
-	TCOOFF                           = 0x0
-	TCOON                            = 0x1
-	TCP_CC_INFO                      = 0x1a
-	TCP_CONGESTION                   = 0xd
-	TCP_COOKIE_IN_ALWAYS             = 0x1
-	TCP_COOKIE_MAX                   = 0x10
-	TCP_COOKIE_MIN                   = 0x8
-	TCP_COOKIE_OUT_NEVER             = 0x2
-	TCP_COOKIE_PAIR_SIZE             = 0x20
-	TCP_COOKIE_TRANSACTIONS          = 0xf
-	TCP_CORK                         = 0x3
-	TCP_DEFER_ACCEPT                 = 0x9
-	TCP_FASTOPEN                     = 0x17
-	TCP_INFO                         = 0xb
-	TCP_KEEPCNT                      = 0x6
-	TCP_KEEPIDLE                     = 0x4
-	TCP_KEEPINTVL                    = 0x5
-	TCP_LINGER2                      = 0x8
-	TCP_MAXSEG                       = 0x2
-	TCP_MAXWIN                       = 0xffff
-	TCP_MAX_WINSHIFT                 = 0xe
-	TCP_MD5SIG                       = 0xe
-	TCP_MD5SIG_MAXKEYLEN             = 0x50
-	TCP_MSS                          = 0x200
-	TCP_MSS_DEFAULT                  = 0x218
-	TCP_MSS_DESIRED                  = 0x4c4
-	TCP_NODELAY                      = 0x1
-	TCP_NOTSENT_LOWAT                = 0x19
-	TCP_QUEUE_SEQ                    = 0x15
-	TCP_QUICKACK                     = 0xc
-	TCP_REPAIR                       = 0x13
-	TCP_REPAIR_OPTIONS               = 0x16
-	TCP_REPAIR_QUEUE                 = 0x14
-	TCP_SAVED_SYN                    = 0x1c
-	TCP_SAVE_SYN                     = 0x1b
-	TCP_SYNCNT                       = 0x7
-	TCP_S_DATA_IN                    = 0x4
-	TCP_S_DATA_OUT                   = 0x8
-	TCP_THIN_DUPACK                  = 0x11
-	TCP_THIN_LINEAR_TIMEOUTS         = 0x10
-	TCP_TIMESTAMP                    = 0x18
-	TCP_USER_TIMEOUT                 = 0x12
-	TCP_WINDOW_CLAMP                 = 0xa
-	TCSAFLUSH                        = 0x2
-	TCSBRK                           = 0x5409
-	TCSBRKP                          = 0x5425
-	TCSETA                           = 0x5406
-	TCSETAF                          = 0x5408
-	TCSETAW                          = 0x5407
-	TCSETS                           = 0x5402
-	TCSETS2                          = 0x402c542b
-	TCSETSF                          = 0x5404
-	TCSETSF2                         = 0x402c542d
-	TCSETSW                          = 0x5403
-	TCSETSW2                         = 0x402c542c
-	TCSETX                           = 0x5433
-	TCSETXF                          = 0x5434
-	TCSETXW                          = 0x5435
-	TCXONC                           = 0x540a
-	TIOCCBRK                         = 0x5428
-	TIOCCONS                         = 0x541d
-	TIOCEXCL                         = 0x540c
-	TIOCGDEV                         = 0x80045432
-	TIOCGETD                         = 0x5424
-	TIOCGEXCL                        = 0x80045440
-	TIOCGICOUNT                      = 0x545d
-	TIOCGLCKTRMIOS                   = 0x5456
-	TIOCGPGRP                        = 0x540f
-	TIOCGPKT                         = 0x80045438
-	TIOCGPTLCK                       = 0x80045439
-	TIOCGPTN                         = 0x80045430
-	TIOCGRS485                       = 0x542e
-	TIOCGSERIAL                      = 0x541e
-	TIOCGSID                         = 0x5429
-	TIOCGSOFTCAR                     = 0x5419
-	TIOCGWINSZ                       = 0x5413
-	TIOCINQ                          = 0x541b
-	TIOCLINUX                        = 0x541c
-	TIOCMBIC                         = 0x5417
-	TIOCMBIS                         = 0x5416
-	TIOCMGET                         = 0x5415
-	TIOCMIWAIT                       = 0x545c
-	TIOCMSET                         = 0x5418
-	TIOCM_CAR                        = 0x40
-	TIOCM_CD                         = 0x40
-	TIOCM_CTS                        = 0x20
-	TIOCM_DSR                        = 0x100
-	TIOCM_DTR                        = 0x2
-	TIOCM_LE                         = 0x1
-	TIOCM_RI                         = 0x80
-	TIOCM_RNG                        = 0x80
-	TIOCM_RTS                        = 0x4
-	TIOCM_SR                         = 0x10
-	TIOCM_ST                         = 0x8
-	TIOCNOTTY                        = 0x5422
-	TIOCNXCL                         = 0x540d
-	TIOCOUTQ                         = 0x5411
-	TIOCPKT                          = 0x5420
-	TIOCPKT_DATA                     = 0x0
-	TIOCPKT_DOSTOP                   = 0x20
-	TIOCPKT_FLUSHREAD                = 0x1
-	TIOCPKT_FLUSHWRITE               = 0x2
-	TIOCPKT_IOCTL                    = 0x40
-	TIOCPKT_NOSTOP                   = 0x10
-	TIOCPKT_START                    = 0x8
-	TIOCPKT_STOP                     = 0x4
-	TIOCSBRK                         = 0x5427
-	TIOCSCTTY                        = 0x540e
-	TIOCSERCONFIG                    = 0x5453
-	TIOCSERGETLSR                    = 0x5459
-	TIOCSERGETMULTI                  = 0x545a
-	TIOCSERGSTRUCT                   = 0x5458
-	TIOCSERGWILD                     = 0x5454
-	TIOCSERSETMULTI                  = 0x545b
-	TIOCSERSWILD                     = 0x5455
-	TIOCSER_TEMT                     = 0x1
-	TIOCSETD                         = 0x5423
-	TIOCSIG                          = 0x40045436
-	TIOCSLCKTRMIOS                   = 0x5457
-	TIOCSPGRP                        = 0x5410
-	TIOCSPTLCK                       = 0x40045431
-	TIOCSRS485                       = 0x542f
-	TIOCSSERIAL                      = 0x541f
-	TIOCSSOFTCAR                     = 0x541a
-	TIOCSTI                          = 0x5412
-	TIOCSWINSZ                       = 0x5414
-	TIOCVHANGUP                      = 0x5437
-	TOSTOP                           = 0x100
-	TUNATTACHFILTER                  = 0x401054d5
-	TUNDETACHFILTER                  = 0x401054d6
-	TUNGETFEATURES                   = 0x800454cf
-	TUNGETFILTER                     = 0x801054db
-	TUNGETIFF                        = 0x800454d2
-	TUNGETSNDBUF                     = 0x800454d3
-	TUNGETVNETBE                     = 0x800454df
-	TUNGETVNETHDRSZ                  = 0x800454d7
-	TUNGETVNETLE                     = 0x800454dd
-	TUNSETDEBUG                      = 0x400454c9
-	TUNSETGROUP                      = 0x400454ce
-	TUNSETIFF                        = 0x400454ca
-	TUNSETIFINDEX                    = 0x400454da
-	TUNSETLINK                       = 0x400454cd
-	TUNSETNOCSUM                     = 0x400454c8
-	TUNSETOFFLOAD                    = 0x400454d0
-	TUNSETOWNER                      = 0x400454cc
-	TUNSETPERSIST                    = 0x400454cb
-	TUNSETQUEUE                      = 0x400454d9
-	TUNSETSNDBUF                     = 0x400454d4
-	TUNSETTXFILTER                   = 0x400454d1
-	TUNSETVNETBE                     = 0x400454de
-	TUNSETVNETHDRSZ                  = 0x400454d8
-	TUNSETVNETLE                     = 0x400454dc
-	VDISCARD                         = 0xd
-	VEOF                             = 0x4
-	VEOL                             = 0xb
-	VEOL2                            = 0x10
-	VERASE                           = 0x2
-	VINTR                            = 0x0
-	VKILL                            = 0x3
-	VLNEXT                           = 0xf
-	VMIN                             = 0x6
-	VQUIT                            = 0x1
-	VREPRINT                         = 0xc
-	VSTART                           = 0x8
-	VSTOP                            = 0x9
-	VSUSP                            = 0xa
-	VSWTC                            = 0x7
-	VT0                              = 0x0
-	VT1                              = 0x4000
-	VTDLY                            = 0x4000
-	VTIME                            = 0x5
-	VWERASE                          = 0xe
-	WALL                             = 0x40000000
-	WCLONE                           = 0x80000000
-	WCONTINUED                       = 0x8
-	WEXITED                          = 0x4
-	WNOHANG                          = 0x1
-	WNOTHREAD                        = 0x20000000
-	WNOWAIT                          = 0x1000000
-	WORDSIZE                         = 0x40
-	WSTOPPED                         = 0x2
-	WUNTRACED                        = 0x2
-	XCASE                            = 0x4
-	XTABS                            = 0x1800
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x62)
-	EADDRNOTAVAIL   = syscall.Errno(0x63)
-	EADV            = syscall.Errno(0x44)
-	EAFNOSUPPORT    = syscall.Errno(0x61)
-	EAGAIN          = syscall.Errno(0xb)
-	EALREADY        = syscall.Errno(0x72)
-	EBADE           = syscall.Errno(0x34)
-	EBADF           = syscall.Errno(0x9)
-	EBADFD          = syscall.Errno(0x4d)
-	EBADMSG         = syscall.Errno(0x4a)
-	EBADR           = syscall.Errno(0x35)
-	EBADRQC         = syscall.Errno(0x38)
-	EBADSLT         = syscall.Errno(0x39)
-	EBFONT          = syscall.Errno(0x3b)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x7d)
-	ECHILD          = syscall.Errno(0xa)
-	ECHRNG          = syscall.Errno(0x2c)
-	ECOMM           = syscall.Errno(0x46)
-	ECONNABORTED    = syscall.Errno(0x67)
-	ECONNREFUSED    = syscall.Errno(0x6f)
-	ECONNRESET      = syscall.Errno(0x68)
-	EDEADLK         = syscall.Errno(0x23)
-	EDEADLOCK       = syscall.Errno(0x23)
-	EDESTADDRREQ    = syscall.Errno(0x59)
-	EDOM            = syscall.Errno(0x21)
-	EDOTDOT         = syscall.Errno(0x49)
-	EDQUOT          = syscall.Errno(0x7a)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EHOSTDOWN       = syscall.Errno(0x70)
-	EHOSTUNREACH    = syscall.Errno(0x71)
-	EHWPOISON       = syscall.Errno(0x85)
-	EIDRM           = syscall.Errno(0x2b)
-	EILSEQ          = syscall.Errno(0x54)
-	EINPROGRESS     = syscall.Errno(0x73)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x6a)
-	EISDIR          = syscall.Errno(0x15)
-	EISNAM          = syscall.Errno(0x78)
-	EKEYEXPIRED     = syscall.Errno(0x7f)
-	EKEYREJECTED    = syscall.Errno(0x81)
-	EKEYREVOKED     = syscall.Errno(0x80)
-	EL2HLT          = syscall.Errno(0x33)
-	EL2NSYNC        = syscall.Errno(0x2d)
-	EL3HLT          = syscall.Errno(0x2e)
-	EL3RST          = syscall.Errno(0x2f)
-	ELIBACC         = syscall.Errno(0x4f)
-	ELIBBAD         = syscall.Errno(0x50)
-	ELIBEXEC        = syscall.Errno(0x53)
-	ELIBMAX         = syscall.Errno(0x52)
-	ELIBSCN         = syscall.Errno(0x51)
-	ELNRNG          = syscall.Errno(0x30)
-	ELOOP           = syscall.Errno(0x28)
-	EMEDIUMTYPE     = syscall.Errno(0x7c)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x5a)
-	EMULTIHOP       = syscall.Errno(0x48)
-	ENAMETOOLONG    = syscall.Errno(0x24)
-	ENAVAIL         = syscall.Errno(0x77)
-	ENETDOWN        = syscall.Errno(0x64)
-	ENETRESET       = syscall.Errno(0x66)
-	ENETUNREACH     = syscall.Errno(0x65)
-	ENFILE          = syscall.Errno(0x17)
-	ENOANO          = syscall.Errno(0x37)
-	ENOBUFS         = syscall.Errno(0x69)
-	ENOCSI          = syscall.Errno(0x32)
-	ENODATA         = syscall.Errno(0x3d)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOKEY          = syscall.Errno(0x7e)
-	ENOLCK          = syscall.Errno(0x25)
-	ENOLINK         = syscall.Errno(0x43)
-	ENOMEDIUM       = syscall.Errno(0x7b)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x2a)
-	ENONET          = syscall.Errno(0x40)
-	ENOPKG          = syscall.Errno(0x41)
-	ENOPROTOOPT     = syscall.Errno(0x5c)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSR           = syscall.Errno(0x3f)
-	ENOSTR          = syscall.Errno(0x3c)
-	ENOSYS          = syscall.Errno(0x26)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCONN        = syscall.Errno(0x6b)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x27)
-	ENOTNAM         = syscall.Errno(0x76)
-	ENOTRECOVERABLE = syscall.Errno(0x83)
-	ENOTSOCK        = syscall.Errno(0x58)
-	ENOTSUP         = syscall.Errno(0x5f)
-	ENOTTY          = syscall.Errno(0x19)
-	ENOTUNIQ        = syscall.Errno(0x4c)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x5f)
-	EOVERFLOW       = syscall.Errno(0x4b)
-	EOWNERDEAD      = syscall.Errno(0x82)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x60)
-	EPIPE           = syscall.Errno(0x20)
-	EPROTO          = syscall.Errno(0x47)
-	EPROTONOSUPPORT = syscall.Errno(0x5d)
-	EPROTOTYPE      = syscall.Errno(0x5b)
-	ERANGE          = syscall.Errno(0x22)
-	EREMCHG         = syscall.Errno(0x4e)
-	EREMOTE         = syscall.Errno(0x42)
-	EREMOTEIO       = syscall.Errno(0x79)
-	ERESTART        = syscall.Errno(0x55)
-	ERFKILL         = syscall.Errno(0x84)
-	EROFS           = syscall.Errno(0x1e)
-	ESHUTDOWN       = syscall.Errno(0x6c)
-	ESOCKTNOSUPPORT = syscall.Errno(0x5e)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESRMNT          = syscall.Errno(0x45)
-	ESTALE          = syscall.Errno(0x74)
-	ESTRPIPE        = syscall.Errno(0x56)
-	ETIME           = syscall.Errno(0x3e)
-	ETIMEDOUT       = syscall.Errno(0x6e)
-	ETOOMANYREFS    = syscall.Errno(0x6d)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUCLEAN         = syscall.Errno(0x75)
-	EUNATCH         = syscall.Errno(0x31)
-	EUSERS          = syscall.Errno(0x57)
-	EWOULDBLOCK     = syscall.Errno(0xb)
-	EXDEV           = syscall.Errno(0x12)
-	EXFULL          = syscall.Errno(0x36)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0x7)
-	SIGCHLD   = syscall.Signal(0x11)
-	SIGCLD    = syscall.Signal(0x11)
-	SIGCONT   = syscall.Signal(0x12)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x1d)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPOLL   = syscall.Signal(0x1d)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGPWR    = syscall.Signal(0x1e)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTKFLT = syscall.Signal(0x10)
-	SIGSTOP   = syscall.Signal(0x13)
-	SIGSYS    = syscall.Signal(0x1f)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x14)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGUNUSED = syscall.Signal(0x1f)
-	SIGURG    = syscall.Signal(0x17)
-	SIGUSR1   = syscall.Signal(0xa)
-	SIGUSR2   = syscall.Signal(0xc)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:   "operation not permitted",
-	2:   "no such file or directory",
-	3:   "no such process",
-	4:   "interrupted system call",
-	5:   "input/output error",
-	6:   "no such device or address",
-	7:   "argument list too long",
-	8:   "exec format error",
-	9:   "bad file descriptor",
-	10:  "no child processes",
-	11:  "resource temporarily unavailable",
-	12:  "cannot allocate memory",
-	13:  "permission denied",
-	14:  "bad address",
-	15:  "block device required",
-	16:  "device or resource busy",
-	17:  "file exists",
-	18:  "invalid cross-device link",
-	19:  "no such device",
-	20:  "not a directory",
-	21:  "is a directory",
-	22:  "invalid argument",
-	23:  "too many open files in system",
-	24:  "too many open files",
-	25:  "inappropriate ioctl for device",
-	26:  "text file busy",
-	27:  "file too large",
-	28:  "no space left on device",
-	29:  "illegal seek",
-	30:  "read-only file system",
-	31:  "too many links",
-	32:  "broken pipe",
-	33:  "numerical argument out of domain",
-	34:  "numerical result out of range",
-	35:  "resource deadlock avoided",
-	36:  "file name too long",
-	37:  "no locks available",
-	38:  "function not implemented",
-	39:  "directory not empty",
-	40:  "too many levels of symbolic links",
-	42:  "no message of desired type",
-	43:  "identifier removed",
-	44:  "channel number out of range",
-	45:  "level 2 not synchronized",
-	46:  "level 3 halted",
-	47:  "level 3 reset",
-	48:  "link number out of range",
-	49:  "protocol driver not attached",
-	50:  "no CSI structure available",
-	51:  "level 2 halted",
-	52:  "invalid exchange",
-	53:  "invalid request descriptor",
-	54:  "exchange full",
-	55:  "no anode",
-	56:  "invalid request code",
-	57:  "invalid slot",
-	59:  "bad font file format",
-	60:  "device not a stream",
-	61:  "no data available",
-	62:  "timer expired",
-	63:  "out of streams resources",
-	64:  "machine is not on the network",
-	65:  "package not installed",
-	66:  "object is remote",
-	67:  "link has been severed",
-	68:  "advertise error",
-	69:  "srmount error",
-	70:  "communication error on send",
-	71:  "protocol error",
-	72:  "multihop attempted",
-	73:  "RFS specific error",
-	74:  "bad message",
-	75:  "value too large for defined data type",
-	76:  "name not unique on network",
-	77:  "file descriptor in bad state",
-	78:  "remote address changed",
-	79:  "can not access a needed shared library",
-	80:  "accessing a corrupted shared library",
-	81:  ".lib section in a.out corrupted",
-	82:  "attempting to link in too many shared libraries",
-	83:  "cannot exec a shared library directly",
-	84:  "invalid or incomplete multibyte or wide character",
-	85:  "interrupted system call should be restarted",
-	86:  "streams pipe error",
-	87:  "too many users",
-	88:  "socket operation on non-socket",
-	89:  "destination address required",
-	90:  "message too long",
-	91:  "protocol wrong type for socket",
-	92:  "protocol not available",
-	93:  "protocol not supported",
-	94:  "socket type not supported",
-	95:  "operation not supported",
-	96:  "protocol family not supported",
-	97:  "address family not supported by protocol",
-	98:  "address already in use",
-	99:  "cannot assign requested address",
-	100: "network is down",
-	101: "network is unreachable",
-	102: "network dropped connection on reset",
-	103: "software caused connection abort",
-	104: "connection reset by peer",
-	105: "no buffer space available",
-	106: "transport endpoint is already connected",
-	107: "transport endpoint is not connected",
-	108: "cannot send after transport endpoint shutdown",
-	109: "too many references: cannot splice",
-	110: "connection timed out",
-	111: "connection refused",
-	112: "host is down",
-	113: "no route to host",
-	114: "operation already in progress",
-	115: "operation now in progress",
-	116: "stale file handle",
-	117: "structure needs cleaning",
-	118: "not a XENIX named type file",
-	119: "no XENIX semaphores available",
-	120: "is a named type file",
-	121: "remote I/O error",
-	122: "disk quota exceeded",
-	123: "no medium found",
-	124: "wrong medium type",
-	125: "operation canceled",
-	126: "required key not available",
-	127: "key has expired",
-	128: "key has been revoked",
-	129: "key was rejected by service",
-	130: "owner died",
-	131: "state not recoverable",
-	132: "operation not possible due to RF-kill",
-	133: "memory page has hardware error",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/breakpoint trap",
-	6:  "aborted",
-	7:  "bus error",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "user defined signal 1",
-	11: "segmentation fault",
-	12: "user defined signal 2",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "stack fault",
-	17: "child exited",
-	18: "continued",
-	19: "stopped (signal)",
-	20: "stopped",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "urgent I/O condition",
-	24: "CPU time limit exceeded",
-	25: "file size limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window changed",
-	29: "I/O possible",
-	30: "power failure",
-	31: "bad system call",
-}


[61/67] [abbrv] incubator-mynewt-newtmgr git commit: newtmgr - Allow BLE conn prof to specify peer name

Posted by cc...@apache.org.
newtmgr - Allow BLE conn prof to specify peer name

Prior to this commit, the connection profile had to specify the peer's
address type and address.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/commit/3637a5ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/tree/3637a5ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/diff/3637a5ae

Branch: refs/heads/master
Commit: 3637a5ae9473eb27d01162fb1c3190adf01845ef
Parents: 2c153c2
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Mar 27 19:46:09 2017 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Tue Mar 28 15:38:36 2017 -0700

----------------------------------------------------------------------
 newtmgr/config/ble_config.go | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/3637a5ae/newtmgr/config/ble_config.go
----------------------------------------------------------------------
diff --git a/newtmgr/config/ble_config.go b/newtmgr/config/ble_config.go
index dbdf3dc..e614d7a 100644
--- a/newtmgr/config/ble_config.go
+++ b/newtmgr/config/ble_config.go
@@ -33,6 +33,7 @@ import (
 type BleConfig struct {
 	PeerAddrType bledefs.BleAddrType
 	PeerAddr     bledefs.BleAddr
+	PeerName     string
 
 	OwnAddrType bledefs.BleAddrType
 	OwnAddr     bledefs.BleAddr
@@ -77,6 +78,8 @@ func ParseBleConnString(cs string) (*BleConfig, error) {
 				return nil, einvalBleConnString("Invalid peer_addr; %s",
 					err.Error())
 			}
+		case "peer_name":
+			bc.PeerName = v
 		case "own_addr_type":
 			bc.OwnAddrType, err = bledefs.BleAddrTypeFromString(v)
 			if err != nil {
@@ -102,9 +105,12 @@ func ParseBleConnString(cs string) (*BleConfig, error) {
 
 func FillSesnCfg(bc *BleConfig, sc *sesn.SesnCfg) {
 	sc.Ble.OwnAddrType = bc.OwnAddrType
-	sc.Ble.Peer = bledefs.BleDev{
-		AddrType: bc.PeerAddrType,
-		Addr:     bc.PeerAddr,
+	sc.Ble.Peer = bledefs.BlePeerSpec{
+		Dev: bledefs.BleDev{
+			AddrType: bc.PeerAddrType,
+			Addr:     bc.PeerAddr,
+		},
+		Name: bc.PeerName,
 	}
 
 	// We don't need to stick around until a connection closes.


[06/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
deleted file mode 100644
index b34d5c2..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ /dev/null
@@ -1,1865 +0,0 @@
-// mksyscall.pl syscall_linux.go syscall_linux_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,linux
-
-package unix
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlinkat(dirfd int, path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, times *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getcwd(buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(arg)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(source)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	var _p2 *byte
-	_p2, err = BytePtrFromString(fstype)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	use(unsafe.Pointer(_p2))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Acct(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtimex(buf *Timex) (state int, err error) {
-	r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
-	state = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ClockGettime(clockid int32, time *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(oldfd int) (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup3(oldfd int, newfd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate1(flag int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
-	_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
-	_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fdatasync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdents(fd int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettid() (tid int) {
-	r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
-	tid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(dest) > 0 {
-		_p2 = unsafe.Pointer(&dest[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(pathname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
-	use(unsafe.Pointer(_p0))
-	watchdesc = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit1(flags int) (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
-	success = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Klogctl(typ int, buf []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listxattr(path string, dest []byte) (sz int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(dest) > 0 {
-		_p1 = unsafe.Pointer(&dest[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
-	use(unsafe.Pointer(_p0))
-	sz = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdirat(dirfd int, path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func PivotRoot(newroot string, putold string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(newroot)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(putold)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
-	_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Removexattr(path string, attr string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(oldpath)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(newpath)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setdomainname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sethostname(p []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setns(fd int, nstype int) (err error) {
-	_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setxattr(path string, attr string, data []byte, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attr)
-	if err != nil {
-		return
-	}
-	var _p2 unsafe.Pointer
-	if len(data) > 0 {
-		_p2 = unsafe.Pointer(&data[0])
-	} else {
-		_p2 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() {
-	Syscall(SYS_SYNC, 0, 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sysinfo(info *Sysinfo_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
-	_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Times(tms *Tms) (ticks uintptr, err error) {
-	r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
-	ticks = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(mask int) (oldmask int) {
-	r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Uname(buf *Utsname) (err error) {
-	_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(target string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(target)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unshare(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ustat(dev int, ubuf *Ustat_t) (err error) {
-	_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func exitThread(code int) (err error) {
-	_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, p *byte, np int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Madvise(b []byte, advice int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(oldfd int, newfd int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(events) > 0 {
-		_p0 = unsafe.Pointer(&events[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
-	_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (euid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	euid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func InotifyInit() (fd int, err error) {
-	r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ioperm(from int, num int, on int) (err error) {
-	_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Iopl(level int) (err error) {
-	_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, n int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pause() (err error) {
-	_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	off = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
-	r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
-	r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
-	written = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsgid(gid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setfsuid(uid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
-	r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
-	n = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, buf *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
-	_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getgroups(n int, list *_Gid_t) (nn int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	nn = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(n int, list *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
-	xaddr = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Utime(path string, buf *Utimbuf) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe(p *[2]_C_int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe2(p *[2]_C_int, flags int) (err error) {
-	_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}



[66/67] [abbrv] incubator-mynewt-newtmgr git commit: newtmgr - use newtmgr repo, not newt repo.

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_util.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_util.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_util.go
deleted file mode 100644
index 08eb8d9..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_util.go
+++ /dev/null
@@ -1,174 +0,0 @@
-package nmble
-
-import (
-	"fmt"
-	"strconv"
-	"sync/atomic"
-
-	log "github.com/Sirupsen/logrus"
-
-	. "mynewt.apache.org/newt/nmxact/bledefs"
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-)
-
-const NmpPlainSvcUuid = "8D53DC1D-1DB7-4CD3-868B-8A527460AA84"
-const NmpPlainChrUuid = "DA2E7828-FBCE-4E01-AE9E-261174997C48"
-const NmpOicSvcUuid = "ADE3D529-C784-4F63-A987-EB69F70EE816"
-const NmpOicReqChrUuid = "AD7B334F-4637-4B86-90B6-9D787F03D218"
-const NmpOicRspChrUuid = "E9241982-4580-42C4-8831-95048216B256"
-
-const WRITE_CMD_BASE_SZ = 3
-const NOTIFY_CMD_BASE_SZ = 3
-
-var nextSeq uint32
-
-func NextSeq() int {
-	return int(atomic.AddUint32(&nextSeq, 1))
-}
-
-func ParseUuid(uuidStr string) (BleUuid, error) {
-	bu := BleUuid{}
-
-	if len(uuidStr) != 36 {
-		return bu, fmt.Errorf("Invalid UUID: %s", uuidStr)
-	}
-
-	boff := 0
-	for i := 0; i < 36; {
-		switch i {
-		case 8, 13, 18, 23:
-			if uuidStr[i] != '-' {
-				return bu, fmt.Errorf("Invalid UUID: %s", uuidStr)
-			}
-			i++
-
-		default:
-			u64, err := strconv.ParseUint(uuidStr[i:i+2], 16, 8)
-			if err != nil {
-				return bu, fmt.Errorf("Invalid UUID: %s", uuidStr)
-			}
-			bu.Bytes[boff] = byte(u64)
-			i += 2
-			boff++
-		}
-	}
-
-	return bu, nil
-}
-
-func BhdTimeoutError(rspType MsgType) error {
-	str := fmt.Sprintf("Timeout waiting for blehostd to send %s response",
-		MsgTypeToString(rspType))
-
-	log.Debug(str)
-	return nmxutil.NewXportTimeoutError(str)
-}
-
-func StatusError(op MsgOp, msgType MsgType, status int) error {
-	str := fmt.Sprintf("%s %s indicates error: %s (%d)",
-		MsgOpToString(op),
-		MsgTypeToString(msgType),
-		ErrCodeToString(status),
-		status)
-
-	log.Debug(str)
-	return nmxutil.NewBleHostError(status, str)
-}
-
-func NewBleConnectReq() *BleConnectReq {
-	return &BleConnectReq{
-		Op:   MSG_OP_REQ,
-		Type: MSG_TYPE_CONNECT,
-		Seq:  NextSeq(),
-
-		OwnAddrType:  BLE_ADDR_TYPE_PUBLIC,
-		PeerAddrType: BLE_ADDR_TYPE_PUBLIC,
-		PeerAddr:     BleAddr{},
-
-		DurationMs:         30000,
-		ScanItvl:           0x0010,
-		ScanWindow:         0x0010,
-		ItvlMin:            24,
-		ItvlMax:            40,
-		Latency:            0,
-		SupervisionTimeout: 0x0200,
-		MinCeLen:           0x0010,
-		MaxCeLen:           0x0300,
-	}
-}
-
-func NewBleTerminateReq() *BleTerminateReq {
-	return &BleTerminateReq{
-		Op:   MSG_OP_REQ,
-		Type: MSG_TYPE_TERMINATE,
-		Seq:  NextSeq(),
-
-		ConnHandle: 0,
-		HciReason:  0,
-	}
-}
-
-func NewBleConnCancelReq() *BleConnCancelReq {
-	return &BleConnCancelReq{
-		Op:   MSG_OP_REQ,
-		Type: MSG_TYPE_CONN_CANCEL,
-		Seq:  NextSeq(),
-	}
-}
-
-func NewBleDiscSvcUuidReq() *BleDiscSvcUuidReq {
-	return &BleDiscSvcUuidReq{
-		Op:   MSG_OP_REQ,
-		Type: MSG_TYPE_DISC_SVC_UUID,
-		Seq:  NextSeq(),
-
-		ConnHandle: 0,
-		Uuid:       BleUuid{},
-	}
-}
-
-func NewBleDiscAllChrsReq() *BleDiscAllChrsReq {
-	return &BleDiscAllChrsReq{
-		Op:   MSG_OP_REQ,
-		Type: MSG_TYPE_DISC_ALL_CHRS,
-		Seq:  NextSeq(),
-	}
-}
-
-func NewBleExchangeMtuReq() *BleExchangeMtuReq {
-	return &BleExchangeMtuReq{
-		Op:   MSG_OP_REQ,
-		Type: MSG_TYPE_EXCHANGE_MTU,
-		Seq:  NextSeq(),
-
-		ConnHandle: 0,
-	}
-}
-
-func NewBleWriteCmdReq() *BleWriteCmdReq {
-	return &BleWriteCmdReq{
-		Op:   MSG_OP_REQ,
-		Type: MSG_TYPE_WRITE_CMD,
-		Seq:  NextSeq(),
-
-		ConnHandle: 0,
-		AttrHandle: 0,
-		Data:       BleBytes{},
-	}
-}
-
-func NewBleScanReq() *BleScanReq {
-	return &BleScanReq{
-		Op:   MSG_OP_REQ,
-		Type: MSG_TYPE_SCAN,
-		Seq:  NextSeq(),
-	}
-}
-
-func NewBleScanCancelReq() *BleScanCancelReq {
-	return &BleScanCancelReq{
-		Op:   MSG_OP_REQ,
-		Type: MSG_TYPE_SCAN_CANCEL,
-		Seq:  NextSeq(),
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_xport.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_xport.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_xport.go
deleted file mode 100644
index 483bfd1..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/ble_xport.go
+++ /dev/null
@@ -1,319 +0,0 @@
-package nmble
-
-import (
-	"encoding/hex"
-	"encoding/json"
-	"fmt"
-	"sync/atomic"
-	"time"
-
-	log "github.com/Sirupsen/logrus"
-
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-	"mynewt.apache.org/newt/nmxact/sesn"
-	"mynewt.apache.org/newt/util/unixchild"
-)
-
-type XportCfg struct {
-	// Path of Unix domain socket to create and listen on.
-	SockPath string
-
-	// Path of the blehostd executable.
-	BlehostdPath string
-
-	// How long to wait for the blehostd process to connect to the Unix domain
-	// socket.
-	BlehostdAcceptTimeout time.Duration
-
-	// Whether to restart the blehostd process if it terminates.
-	BlehostdRestart bool
-
-	// How long to wait for a JSON response from the blehostd process.
-	BlehostdRspTimeout time.Duration
-
-	// Path of the BLE controller device (e.g., /dev/ttyUSB0).
-	DevPath string
-}
-
-func NewXportCfg() XportCfg {
-	return XportCfg{
-		BlehostdAcceptTimeout: time.Second,
-		BlehostdRestart:       true,
-		BlehostdRspTimeout:    time.Second,
-	}
-}
-
-type BleXportState uint32
-
-const (
-	BLE_XPORT_STATE_STOPPED BleXportState = iota
-	BLE_XPORT_STATE_STARTING
-	BLE_XPORT_STATE_STARTED
-)
-
-// Implements xport.Xport.
-type BleXport struct {
-	Bd     *BleDispatcher
-	client *unixchild.Client
-	state  BleXportState
-
-	syncTimeout time.Duration
-	rspTimeout  time.Duration
-}
-
-func NewBleXport(cfg XportCfg) (*BleXport, error) {
-	config := unixchild.Config{
-		SockPath:      cfg.SockPath,
-		ChildPath:     cfg.BlehostdPath,
-		ChildArgs:     []string{cfg.DevPath, cfg.SockPath},
-		Depth:         10,
-		MaxMsgSz:      10240,
-		AcceptTimeout: cfg.BlehostdAcceptTimeout,
-		Restart:       cfg.BlehostdRestart,
-	}
-
-	c := unixchild.New(config)
-
-	bx := &BleXport{
-		client:      c,
-		Bd:          NewBleDispatcher(),
-		syncTimeout: 10 * time.Second,
-		rspTimeout:  cfg.BlehostdRspTimeout,
-	}
-
-	return bx, nil
-}
-
-func (bx *BleXport) BuildSesn(cfg sesn.SesnCfg) (sesn.Sesn, error) {
-	switch cfg.MgmtProto {
-	case sesn.MGMT_PROTO_NMP:
-		return NewBlePlainSesn(bx, cfg), nil
-	case sesn.MGMT_PROTO_OMP:
-		return NewBleOicSesn(bx, cfg), nil
-	default:
-		return nil, fmt.Errorf(
-			"Invalid management protocol: %d; expected NMP or OMP",
-			cfg.MgmtProto)
-	}
-}
-
-func (bx *BleXport) addSyncListener() (*BleListener, error) {
-	bl := NewBleListener()
-	base := BleMsgBase{
-		Op:         MSG_OP_EVT,
-		Type:       MSG_TYPE_SYNC_EVT,
-		Seq:        -1,
-		ConnHandle: -1,
-	}
-	if err := bx.Bd.AddListener(base, bl); err != nil {
-		return nil, err
-	}
-
-	return bl, nil
-}
-
-func (bx *BleXport) removeSyncListener() {
-	base := BleMsgBase{
-		Op:         MSG_OP_EVT,
-		Type:       MSG_TYPE_SYNC_EVT,
-		Seq:        -1,
-		ConnHandle: -1,
-	}
-	bx.Bd.RemoveListener(base)
-}
-
-func (bx *BleXport) querySyncStatus() (bool, error) {
-	req := &BleSyncReq{
-		Op:   MSG_OP_REQ,
-		Type: MSG_TYPE_SYNC,
-		Seq:  NextSeq(),
-	}
-
-	j, err := json.Marshal(req)
-	if err != nil {
-		return false, err
-	}
-
-	bl := NewBleListener()
-	base := BleMsgBase{
-		Op:         -1,
-		Type:       -1,
-		Seq:        req.Seq,
-		ConnHandle: -1,
-	}
-	if err := bx.Bd.AddListener(base, bl); err != nil {
-		return false, err
-	}
-	defer bx.Bd.RemoveListener(base)
-
-	bx.txNoSync(j)
-	for {
-		select {
-		case err := <-bl.ErrChan:
-			return false, err
-		case bm := <-bl.BleChan:
-			switch msg := bm.(type) {
-			case *BleSyncRsp:
-				return msg.Synced, nil
-			}
-		}
-	}
-}
-
-func (bx *BleXport) initialSyncCheck() (bool, *BleListener, error) {
-	bl, err := bx.addSyncListener()
-	if err != nil {
-		return false, nil, err
-	}
-
-	synced, err := bx.querySyncStatus()
-	if err != nil {
-		bx.removeSyncListener()
-		return false, nil, err
-	}
-
-	return synced, bl, nil
-}
-
-func (bx *BleXport) onError(err error) {
-	if !bx.setStateFrom(BLE_XPORT_STATE_STARTED, BLE_XPORT_STATE_STOPPED) &&
-		!bx.setStateFrom(BLE_XPORT_STATE_STARTING, BLE_XPORT_STATE_STOPPED) {
-
-		// Stop already in progress.
-		return
-	}
-	bx.Bd.ErrorAll(err)
-	if bx.client != nil {
-		bx.client.Stop()
-		bx.client.FromChild <- nil
-	}
-}
-
-func (bx *BleXport) setStateFrom(from BleXportState, to BleXportState) bool {
-	return atomic.CompareAndSwapUint32(
-		(*uint32)(&bx.state), uint32(from), uint32(to))
-}
-
-func (bx *BleXport) getState() BleXportState {
-	u32 := atomic.LoadUint32((*uint32)(&bx.state))
-	return BleXportState(u32)
-}
-
-func (bx *BleXport) Stop() error {
-	bx.onError(nil)
-	return nil
-}
-
-func (bx *BleXport) Start() error {
-	if !bx.setStateFrom(BLE_XPORT_STATE_STOPPED, BLE_XPORT_STATE_STARTING) {
-		return nmxutil.NewXportError("BLE xport started twice")
-	}
-
-	if err := bx.client.Start(); err != nil {
-		return nmxutil.NewXportError(
-			"Failed to start child child process: " + err.Error())
-	}
-
-	go func() {
-		err := <-bx.client.ErrChild
-		if unixchild.IsUcAcceptError(err) {
-			err = fmt.Errorf("blehostd did not connect to socket; " +
-				"controller not attached?")
-		}
-		bx.onError(err)
-		return
-	}()
-
-	go func() {
-		for {
-			if _, err := bx.rx(); err != nil {
-				// The error should have been reported to everyone interested.
-				break
-			}
-		}
-	}()
-
-	synced, bl, err := bx.initialSyncCheck()
-	if err != nil {
-		bx.Stop()
-		return err
-	}
-
-	if !synced {
-		// Not synced yet.  Wait for sync event.
-
-	SyncLoop:
-		for {
-			select {
-			case err := <-bl.ErrChan:
-				return err
-			case bm := <-bl.BleChan:
-				switch msg := bm.(type) {
-				case *BleSyncEvt:
-					if msg.Synced {
-						break SyncLoop
-					}
-				}
-			case <-time.After(bx.syncTimeout):
-				bx.Stop()
-				return nmxutil.NewXportError(
-					"Timeout waiting for host <-> controller sync")
-			}
-		}
-	}
-
-	// Host and controller are synced.  Listen for sync loss in the background.
-	go func() {
-		for {
-			select {
-			case err := <-bl.ErrChan:
-				bx.onError(err)
-				return
-			case bm := <-bl.BleChan:
-				switch msg := bm.(type) {
-				case *BleSyncEvt:
-					if !msg.Synced {
-						bx.onError(nmxutil.NewXportError(
-							"BLE host <-> controller sync lost"))
-						return
-					}
-				}
-			}
-		}
-	}()
-
-	if !bx.setStateFrom(BLE_XPORT_STATE_STARTING, BLE_XPORT_STATE_STARTED) {
-		return nmxutil.NewXportError(
-			"Internal error; BLE transport in unexpected state")
-	}
-
-	return nil
-}
-
-func (bx *BleXport) txNoSync(data []byte) {
-	log.Debugf("Tx to blehostd:\n%s", hex.Dump(data))
-	bx.client.ToChild <- data
-}
-
-func (bx *BleXport) Tx(data []byte) error {
-	if bx.getState() != BLE_XPORT_STATE_STARTED {
-		return nmxutil.NewXportError("Attempt to transmit before BLE xport " +
-			"fully started")
-	}
-
-	bx.txNoSync(data)
-	return nil
-}
-
-func (bx *BleXport) rx() ([]byte, error) {
-	select {
-	case err := <-bx.client.ErrChild:
-		return nil, err
-	case buf := <-bx.client.FromChild:
-		if len(buf) != 0 {
-			log.Debugf("Receive from blehostd:\n%s", hex.Dump(buf))
-			bx.Bd.Dispatch(buf)
-		}
-		return buf, nil
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/dispatch.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/dispatch.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/dispatch.go
deleted file mode 100644
index 546fc11..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmble/dispatch.go
+++ /dev/null
@@ -1,297 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmble
-
-import (
-	"encoding/json"
-	"fmt"
-	"sync"
-	"time"
-
-	log "github.com/Sirupsen/logrus"
-)
-
-type OpTypePair struct {
-	Op   MsgOp
-	Type MsgType
-}
-
-type BleMsgBase struct {
-	// Header
-	Op   MsgOp   `json:"op"`
-	Type MsgType `json:"type"`
-	Seq  int     `json:"seq"`
-
-	// Optional
-	ConnHandle int `json:"conn_handle" json:",omitempty"`
-}
-
-type BleListener struct {
-	BleChan chan BleMsg
-	ErrChan chan error
-	TmoChan chan time.Time
-	Acked   bool
-
-	timer *time.Timer
-}
-
-func NewBleListener() *BleListener {
-	return &BleListener{
-		BleChan: make(chan BleMsg, 16),
-		ErrChan: make(chan error, 4),
-		TmoChan: make(chan time.Time, 1),
-	}
-}
-
-func (bl *BleListener) AfterTimeout(tmo time.Duration) <-chan time.Time {
-	fn := func() {
-		if !bl.Acked {
-			bl.TmoChan <- time.Now()
-		}
-	}
-	bl.timer = time.AfterFunc(tmo, fn)
-	return bl.TmoChan
-}
-
-func (bl *BleListener) Stop() {
-	if bl.timer != nil {
-		bl.timer.Stop()
-	}
-}
-
-type BleDispatcher struct {
-	seqMap  map[int]*BleListener
-	baseMap map[BleMsgBase]*BleListener
-	mutex   sync.Mutex
-}
-
-type msgCtor func() BleMsg
-
-func errRspCtor() BleMsg         { return &BleErrRsp{} }
-func syncRspCtor() BleMsg        { return &BleSyncRsp{} }
-func connectRspCtor() BleMsg     { return &BleConnectRsp{} }
-func terminateRspCtor() BleMsg   { return &BleTerminateRsp{} }
-func discSvcUuidRspCtor() BleMsg { return &BleDiscSvcUuidRsp{} }
-func discAllChrsRspCtor() BleMsg { return &BleDiscAllChrsRsp{} }
-func discChrUuidRspCtor() BleMsg { return &BleDiscChrUuidRsp{} }
-func writeCmdRspCtor() BleMsg    { return &BleWriteCmdRsp{} }
-func exchangeMtuRspCtor() BleMsg { return &BleExchangeMtuRsp{} }
-func connCancelRspCtor() BleMsg  { return &BleConnCancelRsp{} }
-func scanRspCtor() BleMsg        { return &BleScanRsp{} }
-func scanCancelRspCtor() BleMsg  { return &BleScanCancelRsp{} }
-
-func syncEvtCtor() BleMsg       { return &BleSyncEvt{} }
-func connectEvtCtor() BleMsg    { return &BleConnectEvt{} }
-func disconnectEvtCtor() BleMsg { return &BleDisconnectEvt{} }
-func discSvcEvtCtor() BleMsg    { return &BleDiscSvcEvt{} }
-func discChrEvtCtor() BleMsg    { return &BleDiscChrEvt{} }
-func notifyRxEvtCtor() BleMsg   { return &BleNotifyRxEvt{} }
-func mtuChangeEvtCtor() BleMsg  { return &BleMtuChangeEvt{} }
-func scanEvtCtor() BleMsg       { return &BleScanEvt{} }
-
-var msgCtorMap = map[OpTypePair]msgCtor{
-	{MSG_OP_RSP, MSG_TYPE_ERR}:           errRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_SYNC}:          syncRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_CONNECT}:       connectRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_TERMINATE}:     terminateRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_DISC_SVC_UUID}: discSvcUuidRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_DISC_CHR_UUID}: discChrUuidRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_DISC_ALL_CHRS}: discAllChrsRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_WRITE_CMD}:     writeCmdRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_EXCHANGE_MTU}:  exchangeMtuRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_CONN_CANCEL}:   connCancelRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_SCAN}:          scanRspCtor,
-	{MSG_OP_RSP, MSG_TYPE_SCAN_CANCEL}:   scanCancelRspCtor,
-
-	{MSG_OP_EVT, MSG_TYPE_SYNC_EVT}:       syncEvtCtor,
-	{MSG_OP_EVT, MSG_TYPE_CONNECT_EVT}:    connectEvtCtor,
-	{MSG_OP_EVT, MSG_TYPE_DISCONNECT_EVT}: disconnectEvtCtor,
-	{MSG_OP_EVT, MSG_TYPE_DISC_SVC_EVT}:   discSvcEvtCtor,
-	{MSG_OP_EVT, MSG_TYPE_DISC_CHR_EVT}:   discChrEvtCtor,
-	{MSG_OP_EVT, MSG_TYPE_NOTIFY_RX_EVT}:  notifyRxEvtCtor,
-	{MSG_OP_EVT, MSG_TYPE_MTU_CHANGE_EVT}: mtuChangeEvtCtor,
-	{MSG_OP_EVT, MSG_TYPE_SCAN_EVT}:       scanEvtCtor,
-}
-
-func NewBleDispatcher() *BleDispatcher {
-	return &BleDispatcher{
-		seqMap:  map[int]*BleListener{},
-		baseMap: map[BleMsgBase]*BleListener{},
-	}
-}
-
-func (bd *BleDispatcher) findBaseListener(base BleMsgBase) (
-	BleMsgBase, *BleListener) {
-
-	for k, v := range bd.baseMap {
-		if k.Op != -1 && base.Op != -1 && k.Op != base.Op {
-			continue
-		}
-		if k.Type != -1 && base.Type != -1 && k.Type != base.Type {
-			continue
-		}
-		if k.ConnHandle != -1 && base.ConnHandle != -1 &&
-			k.ConnHandle != base.ConnHandle {
-
-			continue
-		}
-
-		return k, v
-	}
-
-	return base, nil
-}
-
-func (bd *BleDispatcher) findDupListener(base BleMsgBase) (
-	BleMsgBase, *BleListener) {
-
-	if base.Seq != -1 {
-		return base, bd.seqMap[base.Seq]
-	}
-
-	return bd.findBaseListener(base)
-}
-
-func (bd *BleDispatcher) findListener(base BleMsgBase) (
-	BleMsgBase, *BleListener) {
-
-	if base.Seq != -1 {
-		if bl := bd.seqMap[base.Seq]; bl != nil {
-			return base, bl
-		}
-	}
-
-	return bd.findBaseListener(base)
-}
-
-func (bd *BleDispatcher) AddListener(base BleMsgBase,
-	listener *BleListener) error {
-
-	bd.mutex.Lock()
-	defer bd.mutex.Unlock()
-
-	if ob, old := bd.findDupListener(base); old != nil {
-		return fmt.Errorf(
-			"Duplicate BLE listener;\n"+
-				"    old=op=%d type=%d seq=%d connHandle=%d\n"+
-				"    new=op=%d type=%d seq=%d connHandle=%d",
-			ob.Op, ob.Type, ob.Seq, ob.ConnHandle,
-			base.Op, base.Type, base.Seq, base.ConnHandle)
-	}
-
-	if base.Seq != -1 {
-		if base.Op != -1 ||
-			base.Type != -1 ||
-			base.ConnHandle != -1 {
-			return fmt.Errorf(
-				"Invalid listener base; non-wild seq with wild fields")
-		}
-
-		bd.seqMap[base.Seq] = listener
-	} else {
-		bd.baseMap[base] = listener
-	}
-
-	return nil
-}
-
-func (bd *BleDispatcher) RemoveListener(base BleMsgBase) *BleListener {
-	bd.mutex.Lock()
-	defer bd.mutex.Unlock()
-
-	base, bl := bd.findListener(base)
-	if bl != nil {
-		bl.Stop()
-		if base.Seq != -1 {
-			delete(bd.seqMap, base.Seq)
-		} else {
-			delete(bd.baseMap, base)
-		}
-	}
-
-	return bl
-}
-
-func decodeBleBase(data []byte) (BleMsgBase, error) {
-	base := BleMsgBase{}
-	if err := json.Unmarshal(data, &base); err != nil {
-		return base, err
-	}
-
-	return base, nil
-}
-
-func decodeBleMsg(data []byte) (BleMsgBase, BleMsg, error) {
-	base, err := decodeBleBase(data)
-	if err != nil {
-		return base, nil, err
-	}
-
-	opTypePair := OpTypePair{base.Op, base.Type}
-	cb := msgCtorMap[opTypePair]
-	if cb == nil {
-		return base, nil, fmt.Errorf(
-			"Unrecognized op+type pair: %s, %s",
-			MsgOpToString(base.Op), MsgTypeToString(base.Type))
-	}
-
-	msg := cb()
-	if err := json.Unmarshal(data, msg); err != nil {
-		return base, nil, err
-	}
-
-	return base, msg, nil
-}
-
-func (bd *BleDispatcher) Dispatch(data []byte) {
-	base, msg, err := decodeBleMsg(data)
-	if err != nil {
-		log.Warnf("BLE dispatch error: %s", err.Error())
-		return
-	}
-
-	_, listener := bd.findListener(base)
-	if listener == nil {
-		log.Debugf(
-			"No BLE listener for op=%d type=%d seq=%d connHandle=%d",
-			base.Op, base.Type, base.Seq, base.ConnHandle)
-		return
-	}
-
-	listener.BleChan <- msg
-}
-
-func (bd *BleDispatcher) ErrorAll(err error) {
-	bd.mutex.Lock()
-
-	listeners := make([]*BleListener, 0, len(bd.seqMap)+len(bd.baseMap))
-	for _, v := range bd.seqMap {
-		listeners = append(listeners, v)
-	}
-	for _, v := range bd.baseMap {
-		listeners = append(listeners, v)
-	}
-
-	bd.mutex.Unlock()
-
-	for _, listener := range listeners {
-		listener.ErrChan <- err
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/config.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/config.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/config.go
deleted file mode 100644
index dc00df5..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/config.go
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-//////////////////////////////////////////////////////////////////////////////
-// $read                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type ConfigReadReq struct {
-	NmpBase `structs:"-"`
-	Name    string `codec:"name"`
-}
-
-type ConfigReadRsp struct {
-	NmpBase
-	Rc  int    `codec:"rc" codec:",omitempty"`
-	Val string `codec:"val"`
-}
-
-func NewConfigReadReq() *ConfigReadReq {
-	r := &ConfigReadReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_CONFIG, NMP_ID_CONFIG_VAL)
-	return r
-}
-
-func (r *ConfigReadReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewConfigReadRsp() *ConfigReadRsp {
-	return &ConfigReadRsp{}
-}
-
-func (r *ConfigReadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $write                                                                   //
-//////////////////////////////////////////////////////////////////////////////
-
-type ConfigWriteReq struct {
-	NmpBase
-	Name string `codec:"name"`
-	Val  string `codec:"val"`
-}
-
-type ConfigWriteRsp struct {
-	NmpBase
-	Rc int `codec:"rc" codec:",omitempty"`
-}
-
-func NewConfigWriteReq() *ConfigWriteReq {
-	r := &ConfigWriteReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_CONFIG, NMP_ID_CONFIG_VAL)
-	return r
-}
-
-func (r *ConfigWriteReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewConfigWriteRsp() *ConfigWriteRsp {
-	return &ConfigWriteRsp{}
-}
-
-func (r *ConfigWriteRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/crash.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/crash.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/crash.go
deleted file mode 100644
index 5711d7f..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/crash.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-type CrashReq struct {
-	NmpBase
-	CrashType string `codec:"t"`
-}
-
-type CrashRsp struct {
-	NmpBase
-	Rc int `codec:"rc" codec:",omitempty"`
-}
-
-func NewCrashReq() *CrashReq {
-	r := &CrashReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_CRASH, NMP_ID_CRASH_TRIGGER)
-	return r
-}
-
-func (r *CrashReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewCrashRsp() *CrashRsp {
-	return &CrashRsp{}
-}
-
-func (r *CrashRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/datetime.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/datetime.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/datetime.go
deleted file mode 100644
index ce52d8b..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/datetime.go
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-///////////////////////////////////////////////////////////////////////////////
-// $read                                                                     //
-///////////////////////////////////////////////////////////////////////////////
-
-type DateTimeReadReq struct {
-	NmpBase
-}
-
-type DateTimeReadRsp struct {
-	NmpBase
-	DateTime string `codec:"datetime"`
-	Rc       int    `codec:"rc" codec:",omitempty"`
-}
-
-func NewDateTimeReadReq() *DateTimeReadReq {
-	r := &DateTimeReadReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_DEFAULT, NMP_ID_DEF_DATETIME_STR)
-	return r
-}
-
-func (r *DateTimeReadReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewDateTimeReadRsp() *DateTimeReadRsp {
-	return &DateTimeReadRsp{}
-}
-
-func (r *DateTimeReadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-///////////////////////////////////////////////////////////////////////////////
-// $write                                                                    //
-///////////////////////////////////////////////////////////////////////////////
-
-type DateTimeWriteReq struct {
-	NmpBase
-	DateTime string `codec:"datetime"`
-}
-
-type DateTimeWriteRsp struct {
-	NmpBase
-	Rc int `codec:"rc" codec:",omitempty"`
-}
-
-func NewDateTimeWriteReq() *DateTimeWriteReq {
-	r := &DateTimeWriteReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_DEFAULT, NMP_ID_DEF_DATETIME_STR)
-	return r
-}
-
-func (r *DateTimeWriteReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewDateTimeWriteRsp() *DateTimeWriteRsp {
-	return &DateTimeWriteRsp{}
-}
-
-func (r *DateTimeWriteRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/decode.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/decode.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/decode.go
deleted file mode 100644
index 748d13d..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/decode.go
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import (
-	"fmt"
-
-	"github.com/ugorji/go/codec"
-)
-
-// These aliases just allow the ctor map to fit within 79 columns.
-const op_wr = NMP_OP_WRITE_RSP
-const op_rr = NMP_OP_READ_RSP
-const gr_def = NMP_GROUP_DEFAULT
-const gr_img = NMP_GROUP_IMAGE
-const gr_sta = NMP_GROUP_STAT
-const gr_cfg = NMP_GROUP_CONFIG
-const gr_log = NMP_GROUP_LOG
-const gr_cra = NMP_GROUP_CRASH
-const gr_run = NMP_GROUP_RUN
-const gr_fil = NMP_GROUP_FS
-
-// Op-Group-Id
-type Ogi struct {
-	Op    uint8
-	Group uint16
-	Id    uint8
-}
-
-type rspCtor func() NmpRsp
-
-func echoRspCtor() NmpRsp          { return NewEchoRsp() }
-func taskStatRspCtor() NmpRsp      { return NewTaskStatRsp() }
-func mpStatRspCtor() NmpRsp        { return NewMempoolStatRsp() }
-func dateTimeReadRspCtor() NmpRsp  { return NewDateTimeReadRsp() }
-func dateTimeWriteRspCtor() NmpRsp { return NewDateTimeWriteRsp() }
-func resetRspCtor() NmpRsp         { return NewResetRsp() }
-func imageUploadRspCtor() NmpRsp   { return NewImageUploadRsp() }
-func imageStateRspCtor() NmpRsp    { return NewImageStateRsp() }
-func coreListRspCtor() NmpRsp      { return NewCoreListRsp() }
-func coreLoadRspCtor() NmpRsp      { return NewCoreLoadRsp() }
-func coreEraseRspCtor() NmpRsp     { return NewCoreEraseRsp() }
-func statReadRspCtor() NmpRsp      { return NewStatReadRsp() }
-func statListRspCtor() NmpRsp      { return NewStatListRsp() }
-func logReadRspCtor() NmpRsp       { return NewLogShowRsp() }
-func logListRspCtor() NmpRsp       { return NewLogListRsp() }
-func logModuleListRspCtor() NmpRsp { return NewLogModuleListRsp() }
-func logLevelListRspCtor() NmpRsp  { return NewLogLevelListRsp() }
-func logClearRspCtor() NmpRsp      { return NewLogClearRsp() }
-func crashRspCtor() NmpRsp         { return NewCrashRsp() }
-func runTestRspCtor() NmpRsp       { return NewRunTestRsp() }
-func runListRspCtor() NmpRsp       { return NewRunListRsp() }
-func fsDownloadRspCtor() NmpRsp    { return NewFsDownloadRsp() }
-func fsUploadRspCtor() NmpRsp      { return NewFsUploadRsp() }
-func configReadRspCtor() NmpRsp    { return NewConfigReadRsp() }
-func configWriteRspCtor() NmpRsp   { return NewConfigWriteRsp() }
-
-var rspCtorMap = map[Ogi]rspCtor{
-	{op_wr, gr_def, NMP_ID_DEF_ECHO}:         echoRspCtor,
-	{op_rr, gr_def, NMP_ID_DEF_TASKSTAT}:     taskStatRspCtor,
-	{op_rr, gr_def, NMP_ID_DEF_MPSTAT}:       mpStatRspCtor,
-	{op_rr, gr_def, NMP_ID_DEF_DATETIME_STR}: dateTimeReadRspCtor,
-	{op_wr, gr_def, NMP_ID_DEF_DATETIME_STR}: dateTimeWriteRspCtor,
-	{op_wr, gr_def, NMP_ID_DEF_RESET}:        resetRspCtor,
-	{op_wr, gr_img, NMP_ID_IMAGE_UPLOAD}:     imageUploadRspCtor,
-	{op_rr, gr_img, NMP_ID_IMAGE_STATE}:      imageStateRspCtor,
-	{op_wr, gr_img, NMP_ID_IMAGE_STATE}:      imageStateRspCtor,
-	{op_rr, gr_img, NMP_ID_IMAGE_CORELIST}:   coreListRspCtor,
-	{op_rr, gr_img, NMP_ID_IMAGE_CORELOAD}:   coreLoadRspCtor,
-	{op_wr, gr_img, NMP_ID_IMAGE_CORELOAD}:   coreEraseRspCtor,
-	{op_rr, gr_sta, NMP_ID_STAT_READ}:        statReadRspCtor,
-	{op_rr, gr_sta, NMP_ID_STAT_LIST}:        statListRspCtor,
-	{op_rr, gr_log, NMP_ID_LOG_SHOW}:         logReadRspCtor,
-	{op_rr, gr_log, NMP_ID_LOG_LIST}:         logListRspCtor,
-	{op_rr, gr_log, NMP_ID_LOG_MODULE_LIST}:  logModuleListRspCtor,
-	{op_rr, gr_log, NMP_ID_LOG_LEVEL_LIST}:   logLevelListRspCtor,
-	{op_wr, gr_log, NMP_ID_LOG_CLEAR}:        logClearRspCtor,
-	{op_wr, gr_cra, NMP_ID_CRASH_TRIGGER}:    crashRspCtor,
-	{op_wr, gr_run, NMP_ID_RUN_TEST}:         runTestRspCtor,
-	{op_rr, gr_run, NMP_ID_RUN_LIST}:         runListRspCtor,
-	{op_rr, gr_fil, NMP_ID_FS_FILE}:          fsDownloadRspCtor,
-	{op_wr, gr_fil, NMP_ID_FS_FILE}:          fsUploadRspCtor,
-	{op_rr, gr_cfg, NMP_ID_CONFIG_VAL}:       configReadRspCtor,
-	{op_wr, gr_cfg, NMP_ID_CONFIG_VAL}:       configWriteRspCtor,
-}
-
-func DecodeRspBody(hdr *NmpHdr, body []byte) (NmpRsp, error) {
-	cb := rspCtorMap[Ogi{hdr.Op, hdr.Group, hdr.Id}]
-	if cb == nil {
-		return nil, fmt.Errorf("Unrecognized NMP op+group+id: %d, %d, %d",
-			hdr.Op, hdr.Group, hdr.Id)
-	}
-
-	r := cb()
-	cborCodec := new(codec.CborHandle)
-	dec := codec.NewDecoderBytes(body, cborCodec)
-
-	if err := dec.Decode(r); err != nil {
-		return nil, fmt.Errorf("Invalid response: %s", err.Error())
-	}
-
-	r.SetHdr(hdr)
-	return r, nil
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/defs.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/defs.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/defs.go
deleted file mode 100644
index d10ffe5..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/defs.go
+++ /dev/null
@@ -1,88 +0,0 @@
-package nmp
-
-const (
-	NMP_OP_READ      = 0
-	NMP_OP_READ_RSP  = 1
-	NMP_OP_WRITE     = 2
-	NMP_OP_WRITE_RSP = 3
-)
-
-const (
-	NMP_ERR_OK       = 0
-	NMP_ERR_EUNKNOWN = 1
-	NMP_ERR_ENOMEM   = 2
-	NMP_ERR_EINVAL   = 3
-	NMP_ERR_ETIMEOUT = 4
-	NMP_ERR_ENOENT   = 5
-)
-
-// First 64 groups are reserved for system level newtmgr commands.
-// Per-user commands are then defined after group 64.
-
-const (
-	NMP_GROUP_DEFAULT = 0
-	NMP_GROUP_IMAGE   = 1
-	NMP_GROUP_STAT    = 2
-	NMP_GROUP_CONFIG  = 3
-	NMP_GROUP_LOG     = 4
-	NMP_GROUP_CRASH   = 5
-	NMP_GROUP_SPLIT   = 6
-	NMP_GROUP_RUN     = 7
-	NMP_GROUP_FS      = 8
-	NMP_GROUP_PERUSER = 64
-)
-
-// Default group (0).
-const (
-	NMP_ID_DEF_ECHO           = 0
-	NMP_ID_DEF_CONS_ECHO_CTRL = 1
-	NMP_ID_DEF_TASKSTAT       = 2
-	NMP_ID_DEF_MPSTAT         = 3
-	NMP_ID_DEF_DATETIME_STR   = 4
-	NMP_ID_DEF_RESET          = 5
-)
-
-// Image group (1).
-const (
-	NMP_ID_IMAGE_STATE    = 0
-	NMP_ID_IMAGE_UPLOAD   = 1
-	NMP_ID_IMAGE_CORELIST = 3
-	NMP_ID_IMAGE_CORELOAD = 4
-)
-
-// Stat group (2).
-const (
-	NMP_ID_STAT_READ = 0
-	NMP_ID_STAT_LIST = 1
-)
-
-// Config group (3).
-const (
-	NMP_ID_CONFIG_VAL = 0
-)
-
-// Log group (4).
-const (
-	NMP_ID_LOG_SHOW        = 0
-	NMP_ID_LOG_CLEAR       = 1
-	NMP_ID_LOG_APPEND      = 2
-	NMP_ID_LOG_MODULE_LIST = 3
-	NMP_ID_LOG_LEVEL_LIST  = 4
-	NMP_ID_LOG_LIST        = 5
-)
-
-// Crash group (5).
-const (
-	NMP_ID_CRASH_TRIGGER = 0
-)
-
-// Run group (7).
-const (
-	NMP_ID_RUN_TEST = 0
-	NMP_ID_RUN_LIST = 1
-)
-
-// File system group (8).
-const (
-	NMP_ID_FS_FILE = 0
-)

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/dispatch.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/dispatch.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/dispatch.go
deleted file mode 100644
index 7b1ad11..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/dispatch.go
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import (
-	"encoding/hex"
-	"fmt"
-	"sync"
-	"time"
-
-	log "github.com/Sirupsen/logrus"
-)
-
-type NmpListener struct {
-	RspChan chan NmpRsp
-	ErrChan chan error
-	tmoChan chan time.Time
-	timer   *time.Timer
-}
-
-func NewNmpListener() *NmpListener {
-	return &NmpListener{
-		RspChan: make(chan NmpRsp, 1),
-		ErrChan: make(chan error, 1),
-	}
-}
-
-func (nl *NmpListener) AfterTimeout(tmo time.Duration) <-chan time.Time {
-	fn := func() {
-		nl.tmoChan <- time.Now()
-	}
-	nl.timer = time.AfterFunc(tmo, fn)
-	return nl.tmoChan
-}
-
-func (nl *NmpListener) Stop() {
-	if nl.timer != nil {
-		nl.timer.Stop()
-	}
-}
-
-type NmpDispatcher struct {
-	seqListenerMap map[uint8]*NmpListener
-	reassembler    *Reassembler
-	mutex          sync.Mutex
-}
-
-func NewNmpDispatcher() *NmpDispatcher {
-	return &NmpDispatcher{
-		seqListenerMap: map[uint8]*NmpListener{},
-		reassembler:    NewReassembler(),
-	}
-}
-
-func (nd *NmpDispatcher) AddListener(seq uint8, nl *NmpListener) error {
-	nd.mutex.Lock()
-	defer nd.mutex.Unlock()
-
-	if _, ok := nd.seqListenerMap[seq]; ok {
-		return fmt.Errorf("Duplicate NMP listener; seq=%d", seq)
-	}
-
-	nd.seqListenerMap[seq] = nl
-	return nil
-}
-
-func (nd *NmpDispatcher) removeListenerNoLock(seq uint8) *NmpListener {
-	nl := nd.seqListenerMap[seq]
-	if nl != nil {
-		nl.Stop()
-		delete(nd.seqListenerMap, seq)
-	}
-	return nl
-}
-
-func (nd *NmpDispatcher) RemoveListener(seq uint8) *NmpListener {
-	nd.mutex.Lock()
-	defer nd.mutex.Unlock()
-
-	return nd.removeListenerNoLock(seq)
-}
-
-func (nd *NmpDispatcher) FakeRxError(seq uint8, err error) error {
-	nd.mutex.Lock()
-	defer nd.mutex.Unlock()
-
-	nl := nd.seqListenerMap[seq]
-	if nl == nil {
-		return fmt.Errorf("No NMP listener for seq %d", seq)
-	}
-
-	nl.ErrChan <- err
-
-	return nil
-}
-
-func decodeRsp(pkt []byte) (NmpRsp, error) {
-	hdr, err := DecodeNmpHdr(pkt)
-	if err != nil {
-		return nil, err
-	}
-
-	// Ignore incoming non-responses.  This is necessary for devices that echo
-	// received requests over serial.
-	if hdr.Op != NMP_OP_READ_RSP && hdr.Op != NMP_OP_WRITE_RSP {
-		return nil, nil
-	}
-
-	body := pkt[NMP_HDR_SIZE:]
-	return DecodeRspBody(hdr, body)
-}
-
-// Returns true if the response was dispatched.
-func (nd *NmpDispatcher) DispatchRsp(r NmpRsp) bool {
-	log.Debugf("Received nmp rsp: %+v", r)
-
-	nl := nd.seqListenerMap[r.Hdr().Seq]
-	if nl == nil {
-		return false
-	}
-
-	nl.RspChan <- r
-
-	return true
-}
-
-// Returns true if the response was dispatched.
-func (nd *NmpDispatcher) Dispatch(data []byte) bool {
-	nd.mutex.Lock()
-	defer nd.mutex.Unlock()
-
-	pkt := nd.reassembler.RxFrag(data)
-	if pkt == nil {
-		return false
-	}
-
-	rsp, err := decodeRsp(pkt)
-	if err != nil {
-		log.Printf("Failure decoding NMP rsp: %s\npacket=\n%s", err.Error(),
-			hex.Dump(data))
-		return false
-	}
-
-	if rsp == nil {
-		// Packet wasn't a response.
-		return false
-	}
-
-	return nd.DispatchRsp(rsp)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/echo.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/echo.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/echo.go
deleted file mode 100644
index e8e334b..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/echo.go
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-type EchoReq struct {
-	NmpBase
-	Payload string `codec:"d"`
-}
-
-type EchoRsp struct {
-	NmpBase
-	Payload string `codec:"r"`
-	Rc      int    `codec:"rc" codec:",omitempty"`
-}
-
-func NewEchoReq() *EchoReq {
-	r := &EchoReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_DEFAULT, NMP_ID_DEF_ECHO)
-	return r
-}
-
-func (r *EchoReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewEchoRsp() *EchoRsp {
-	return &EchoRsp{}
-}
-
-func (r *EchoRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/frag.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/frag.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/frag.go
deleted file mode 100644
index 31ee392..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/frag.go
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import (
-	log "github.com/Sirupsen/logrus"
-)
-
-type Reassembler struct {
-	cur []byte
-}
-
-func NewReassembler() *Reassembler {
-	return &Reassembler{}
-}
-
-func (r *Reassembler) RxFrag(frag []byte) []byte {
-	r.cur = append(r.cur, frag...)
-
-	hdr, err := DecodeNmpHdr(r.cur)
-	if err != nil {
-		// Incomplete header.
-		return nil
-	}
-
-	actualLen := len(r.cur) - NMP_HDR_SIZE
-	if actualLen > int(hdr.Len) {
-		// More data than expected.  Discard packet.
-		log.Debugf("received invalid nmp packet; hdr.len=%d actualLen=%d",
-			hdr.Len, actualLen)
-		r.cur = nil
-		return nil
-	}
-
-	if actualLen < int(hdr.Len) {
-		// More fragments to come.
-		return nil
-	}
-
-	// Packet complete
-	pkt := r.cur
-	r.cur = nil
-	return pkt
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/fs.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/fs.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/fs.go
deleted file mode 100644
index 91083de..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/fs.go
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-//////////////////////////////////////////////////////////////////////////////
-// $download                                                                //
-//////////////////////////////////////////////////////////////////////////////
-
-type FsDownloadReq struct {
-	NmpBase
-	Name string `codec:"name"`
-	Off  uint32 `codec:"off"`
-}
-
-type FsDownloadRsp struct {
-	NmpBase
-	Rc   int    `codec:"rc" codec:",omitempty"`
-	Off  uint32 `codec:"off"`
-	Len  uint32 `codec:"len"`
-	Data []byte `codec:"data"`
-}
-
-func NewFsDownloadReq() *FsDownloadReq {
-	r := &FsDownloadReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_FS, NMP_ID_FS_FILE)
-	return r
-}
-
-func (r *FsDownloadReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewFsDownloadRsp() *FsDownloadRsp {
-	return &FsDownloadRsp{}
-}
-
-func (r *FsDownloadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $upload                                                                  //
-//////////////////////////////////////////////////////////////////////////////
-
-type FsUploadReq struct {
-	NmpBase
-	Name string `codec:"name" codec:",omitempty"`
-	Len  uint32 `codec:"len" codec:",omitempty"`
-	Off  uint32 `codec:"off"`
-	Data []byte `codec:"data"`
-}
-
-type FsUploadRsp struct {
-	NmpBase
-	Rc  int    `codec:"rc" codec:",omitempty"`
-	Off uint32 `codec:"off"`
-}
-
-func NewFsUploadReq() *FsUploadReq {
-	r := &FsUploadReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_FS, NMP_ID_FS_FILE)
-	return r
-}
-
-func (r *FsUploadReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewFsUploadRsp() *FsUploadRsp {
-	return &FsUploadRsp{}
-}
-
-func (r *FsUploadRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/image.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/image.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/image.go
deleted file mode 100644
index ac2d9a0..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/image.go
+++ /dev/null
@@ -1,215 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-//////////////////////////////////////////////////////////////////////////////
-// $upload                                                                  //
-//////////////////////////////////////////////////////////////////////////////
-
-type ImageUploadReq struct {
-	NmpBase
-	Off  uint32 `codec:"off"`
-	Len  uint32 `codec:"len" codec:",omitempty"`
-	Data []byte `codec:"data"`
-}
-
-type ImageUploadRsp struct {
-	NmpBase
-	Rc  int    `codec:"rc" codec:",omitempty"`
-	Off uint32 `codec:"off"`
-}
-
-func NewImageUploadReq() *ImageUploadReq {
-	r := &ImageUploadReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_IMAGE, NMP_ID_IMAGE_UPLOAD)
-	return r
-}
-
-func (r *ImageUploadReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewImageUploadRsp() *ImageUploadRsp {
-	return &ImageUploadRsp{}
-}
-
-func (r *ImageUploadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $state                                                                   //
-//////////////////////////////////////////////////////////////////////////////
-
-type SplitStatus int
-
-const (
-	NOT_APPLICABLE SplitStatus = iota
-	NOT_MATCHING
-	MATCHING
-)
-
-/* returns the enum as a string */
-func (sm SplitStatus) String() string {
-	names := map[SplitStatus]string{
-		NOT_APPLICABLE: "N/A",
-		NOT_MATCHING:   "non-matching",
-		MATCHING:       "matching",
-	}
-
-	str := names[sm]
-	if str == "" {
-		return "Unknown!"
-	}
-	return str
-}
-
-type ImageStateEntry struct {
-	NmpBase
-	Slot      int    `codec:"slot"`
-	Version   string `codec:"version"`
-	Hash      []byte `codec:"hash"`
-	Bootable  bool   `codec:"bootable"`
-	Pending   bool   `codec:"pending"`
-	Confirmed bool   `codec:"confirmed"`
-	Active    bool   `codec:"active"`
-	Permanent bool   `codec:"permanent"`
-}
-
-type ImageStateReadReq struct {
-	NmpBase
-}
-
-type ImageStateWriteReq struct {
-	NmpBase
-	Hash    []byte `codec:"hash"`
-	Confirm bool   `codec:"confirm"`
-}
-
-type ImageStateRsp struct {
-	NmpBase
-	Rc          int               `codec:"rc"`
-	Images      []ImageStateEntry `codec:"images"`
-	SplitStatus SplitStatus       `codec:"splitStatus"`
-}
-
-func NewImageStateReadReq() *ImageStateReadReq {
-	r := &ImageStateReadReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_IMAGE, NMP_ID_IMAGE_STATE)
-	return r
-}
-
-func (r *ImageStateReadReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewImageStateWriteReq() *ImageStateWriteReq {
-	r := &ImageStateWriteReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_IMAGE, NMP_ID_IMAGE_STATE)
-	return r
-}
-
-func (r *ImageStateWriteReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewImageStateRsp() *ImageStateRsp {
-	return &ImageStateRsp{}
-}
-
-func (r *ImageStateRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $corelist                                                                //
-//////////////////////////////////////////////////////////////////////////////
-
-type CoreListReq struct {
-	NmpBase
-}
-
-type CoreListRsp struct {
-	NmpBase
-	Rc int `codec:"rc"`
-}
-
-func NewCoreListReq() *CoreListReq {
-	r := &CoreListReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_IMAGE, NMP_ID_IMAGE_CORELIST)
-	return r
-}
-
-func (r *CoreListReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewCoreListRsp() *CoreListRsp {
-	return &CoreListRsp{}
-}
-
-func (r *CoreListRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $coreload                                                                //
-//////////////////////////////////////////////////////////////////////////////
-
-type CoreLoadReq struct {
-	NmpBase
-	Off uint32 `codec:"off"`
-}
-
-type CoreLoadRsp struct {
-	NmpBase
-	Rc   int    `codec:"rc"`
-	Off  uint32 `codec:"off"`
-	Data []byte `codec:"data"`
-}
-
-func NewCoreLoadReq() *CoreLoadReq {
-	r := &CoreLoadReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_IMAGE, NMP_ID_IMAGE_CORELOAD)
-	return r
-}
-
-func (r *CoreLoadReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewCoreLoadRsp() *CoreLoadRsp {
-	return &CoreLoadRsp{}
-}
-
-func (r *CoreLoadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $coreerase                                                               //
-//////////////////////////////////////////////////////////////////////////////
-
-type CoreEraseReq struct {
-	NmpBase
-}
-
-type CoreEraseRsp struct {
-	NmpBase
-	Rc int `codec:"rc"`
-}
-
-func NewCoreEraseReq() *CoreEraseReq {
-	r := &CoreEraseReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_IMAGE, NMP_ID_IMAGE_CORELOAD)
-	return r
-}
-
-func (r *CoreEraseReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewCoreEraseRsp() *CoreEraseRsp {
-	return &CoreEraseRsp{}
-}
-
-func (r *CoreEraseRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/log.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/log.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/log.go
deleted file mode 100644
index e03376f..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/log.go
+++ /dev/null
@@ -1,260 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-//////////////////////////////////////////////////////////////////////////////
-// $defs                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-const (
-	LEVEL_DEBUG    int = 0
-	LEVEL_INFO         = 1
-	LEVEL_WARN         = 2
-	LEVEL_ERROR        = 3
-	LEVEL_CRITICAL     = 4
-	/* Upto 7 custom loglevels */
-	LEVEL_MAX = 255
-)
-
-const (
-	STREAM_LOG  int = 0
-	MEMORY_LOG      = 1
-	STORAGE_LOG     = 2
-)
-
-const (
-	MODULE_DEFAULT     int = 0
-	MODULE_OS              = 1
-	MODULE_NEWTMGR         = 2
-	MODULE_NIMBLE_CTLR     = 3
-	MODULE_NIMBLE_HOST     = 4
-	MODULE_NFFS            = 5
-	MODULE_REBOOT          = 6
-	MODULE_TEST            = 8
-	MODULE_MAX             = 255
-)
-
-var LogModuleNameMap = map[int]string{
-	MODULE_DEFAULT:     "DEFAULT",
-	MODULE_OS:          "OS",
-	MODULE_NEWTMGR:     "NEWTMGR",
-	MODULE_NIMBLE_CTLR: "NIMBLE_CTLR",
-	MODULE_NIMBLE_HOST: "NIMBLE_HOST",
-	MODULE_NFFS:        "NFFS",
-	MODULE_REBOOT:      "REBOOT",
-	MODULE_TEST:        "TEST",
-}
-
-var LogLevelNameMap = map[int]string{
-	LEVEL_DEBUG:    "DEBUG",
-	LEVEL_INFO:     "INFO",
-	LEVEL_WARN:     "WARN",
-	LEVEL_ERROR:    "ERROR",
-	LEVEL_CRITICAL: "CRITICAL",
-}
-
-var LogTypeNameMap = map[int]string{
-	STREAM_LOG:  "STREAM",
-	MEMORY_LOG:  "MEMORY",
-	STORAGE_LOG: "STORAGE",
-}
-
-func LogModuleToString(lm int) string {
-	name := LogModuleNameMap[lm]
-	if name == "" {
-		name = "CUSTOM"
-	}
-	return name
-}
-
-func LogLevelToString(lm int) string {
-	name := LogLevelNameMap[lm]
-	if name == "" {
-		name = "CUSTOM"
-	}
-	return name
-}
-
-func LogTypeToString(lm int) string {
-	name := LogTypeNameMap[lm]
-	if name == "" {
-		name = "UNDEFINED"
-	}
-	return name
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// $show                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type LogShowReq struct {
-	NmpBase
-	Name      string `codec:"log_name"`
-	Timestamp int64  `codec:"ts"`
-	Index     uint32 `codec:"index"`
-}
-
-type LogEntry struct {
-	Index     uint32 `codec:"index"`
-	Timestamp int64  `codec:"ts"`
-	Module    uint8  `codec:"module"`
-	Level     uint8  `codec:"level"`
-	Msg       string `codec:"msg"`
-}
-
-type LogShowLog struct {
-	Name    string     `codec:"name"`
-	Type    int        `codec:"type"`
-	Entries []LogEntry `codec:"entries"`
-}
-
-type LogShowRsp struct {
-	NmpBase
-	Rc        int          `codec:"rc" codec:",omitempty"`
-	NextIndex uint32       `codec:"next_index"`
-	Logs      []LogShowLog `codec:"logs"`
-}
-
-func NewLogShowReq() *LogShowReq {
-	r := &LogShowReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_LOG, NMP_ID_LOG_SHOW)
-	return r
-}
-
-func (r *LogShowReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewLogShowRsp() *LogShowRsp {
-	return &LogShowRsp{}
-}
-
-func (r *LogShowRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $list                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type LogListReq struct {
-	NmpBase
-}
-
-type LogListRsp struct {
-	NmpBase
-	Rc   int      `codec:"rc" codec:",omitempty"`
-	List []string `codec:"log_list"`
-}
-
-func NewLogListReq() *LogListReq {
-	r := &LogListReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_LOG, NMP_ID_LOG_LIST)
-	return r
-}
-
-func (r *LogListReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewLogListRsp() *LogListRsp {
-	return &LogListRsp{}
-}
-
-func (r *LogListRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $module list                                                             //
-//////////////////////////////////////////////////////////////////////////////
-
-type LogModuleListReq struct {
-	NmpBase
-}
-
-type LogModuleListRsp struct {
-	NmpBase
-	Rc  int            `codec:"rc" codec:",omitempty"`
-	Map map[string]int `codec:"module_map"`
-}
-
-func NewLogModuleListReq() *LogModuleListReq {
-	r := &LogModuleListReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_LOG, NMP_ID_LOG_MODULE_LIST)
-	return r
-}
-
-func (r *LogModuleListReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewLogModuleListRsp() *LogModuleListRsp {
-	return &LogModuleListRsp{}
-}
-
-func (r *LogModuleListRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $level list                                                              //
-//////////////////////////////////////////////////////////////////////////////
-
-type LogLevelListReq struct {
-	NmpBase
-}
-
-type LogLevelListRsp struct {
-	NmpBase
-	Rc  int            `codec:"rc" codec:",omitempty"`
-	Map map[string]int `codec:"module_map"`
-}
-
-func NewLogLevelListReq() *LogLevelListReq {
-	r := &LogLevelListReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_LOG, NMP_ID_LOG_LEVEL_LIST)
-	return r
-}
-
-func (r *LogLevelListReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewLogLevelListRsp() *LogLevelListRsp {
-	return &LogLevelListRsp{}
-}
-
-func (r *LogLevelListRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $clear                                                                   //
-//////////////////////////////////////////////////////////////////////////////
-
-type LogClearReq struct {
-	NmpBase
-}
-
-type LogClearRsp struct {
-	NmpBase
-	Rc int `codec:"rc" codec:",omitempty"`
-}
-
-func NewLogClearReq() *LogClearReq {
-	r := &LogClearReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_LOG, NMP_ID_LOG_CLEAR)
-	return r
-}
-
-func (r *LogClearReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewLogClearRsp() *LogClearRsp {
-	return &LogClearRsp{}
-}
-
-func (r *LogClearRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/mpstat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/mpstat.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/mpstat.go
deleted file mode 100644
index f2313e9..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/mpstat.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-type MempoolStatReq struct {
-	NmpBase
-}
-
-type MempoolStatRsp struct {
-	NmpBase
-	Rc     int                       `codec:"rc"`
-	Mpools map[string]map[string]int `codec:"mpools"`
-}
-
-func NewMempoolStatReq() *MempoolStatReq {
-	r := &MempoolStatReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_DEFAULT, NMP_ID_DEF_MPSTAT)
-	return r
-}
-
-func (r *MempoolStatReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewMempoolStatRsp() *MempoolStatRsp {
-	return &MempoolStatRsp{}
-}
-
-func (r *MempoolStatRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/nmp.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/nmp.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/nmp.go
deleted file mode 100644
index b868e25..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/nmp.go
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import (
-	"encoding/binary"
-	"encoding/hex"
-	"fmt"
-
-	log "github.com/Sirupsen/logrus"
-	"github.com/ugorji/go/codec"
-
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-	"mynewt.apache.org/newt/util"
-)
-
-const NMP_HDR_SIZE = 8
-
-type NmpHdr struct {
-	Op    uint8 /* 3 bits of opcode */
-	Flags uint8
-	Len   uint16
-	Group uint16
-	Seq   uint8
-	Id    uint8
-}
-
-type NmpMsg struct {
-	Hdr  NmpHdr
-	Body interface{}
-}
-
-// Combine req + rsp.
-type NmpReq interface {
-	Hdr() *NmpHdr
-	SetHdr(hdr *NmpHdr)
-
-	Msg() *NmpMsg
-}
-
-type NmpRsp interface {
-	Hdr() *NmpHdr
-	SetHdr(msg *NmpHdr)
-
-	Msg() *NmpMsg
-}
-
-type NmpBase struct {
-	hdr NmpHdr `codec:"-"`
-}
-
-func (b *NmpBase) Hdr() *NmpHdr {
-	return &b.hdr
-}
-
-func (b *NmpBase) SetHdr(h *NmpHdr) {
-	b.hdr = *h
-}
-
-func MsgFromReq(r NmpReq) *NmpMsg {
-	return &NmpMsg{
-		*r.Hdr(),
-		r,
-	}
-}
-
-func NewNmpMsg() *NmpMsg {
-	return &NmpMsg{}
-}
-
-func DecodeNmpHdr(data []byte) (*NmpHdr, error) {
-	if len(data) < NMP_HDR_SIZE {
-		return nil, util.NewNewtError(fmt.Sprintf(
-			"Newtmgr request buffer too small %d bytes", len(data)))
-	}
-
-	hdr := &NmpHdr{}
-
-	hdr.Op = uint8(data[0])
-	hdr.Flags = uint8(data[1])
-	hdr.Len = binary.BigEndian.Uint16(data[2:4])
-	hdr.Group = binary.BigEndian.Uint16(data[4:6])
-	hdr.Seq = uint8(data[6])
-	hdr.Id = uint8(data[7])
-
-	return hdr, nil
-}
-
-func (hdr *NmpHdr) Bytes() []byte {
-	buf := make([]byte, 0, NMP_HDR_SIZE)
-
-	buf = append(buf, byte(hdr.Op))
-	buf = append(buf, byte(hdr.Flags))
-
-	u16b := make([]byte, 2)
-	binary.BigEndian.PutUint16(u16b, hdr.Len)
-	buf = append(buf, u16b...)
-
-	binary.BigEndian.PutUint16(u16b, hdr.Group)
-	buf = append(buf, u16b...)
-
-	buf = append(buf, byte(hdr.Seq))
-	buf = append(buf, byte(hdr.Id))
-
-	return buf
-}
-
-func BodyBytes(body interface{}) ([]byte, error) {
-	data := make([]byte, 0)
-
-	enc := codec.NewEncoderBytes(&data, new(codec.CborHandle))
-	if err := enc.Encode(body); err != nil {
-		return nil, fmt.Errorf("Failed to encode message %s", err.Error())
-	}
-
-	log.Debugf("Encoded %+v to:\n%s", body, hex.Dump(data))
-
-	return data, nil
-}
-
-func EncodeNmpPlain(nmr *NmpMsg) ([]byte, error) {
-	bb, err := BodyBytes(nmr.Body)
-	if err != nil {
-		return nil, err
-	}
-
-	nmr.Hdr.Len = uint16(len(bb))
-
-	hb := nmr.Hdr.Bytes()
-	data := append(hb, bb...)
-
-	log.Debugf("Encoded:\n%s", hex.Dump(data))
-
-	return data, nil
-}
-
-func fillNmpReq(req NmpReq, op uint8, group uint16, id uint8) {
-	hdr := NmpHdr{
-		Op:    op,
-		Flags: 0,
-		Len:   0,
-		Group: group,
-		Seq:   nmxutil.NextNmpSeq(),
-		Id:    id,
-	}
-
-	req.SetHdr(&hdr)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/reset.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/reset.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/reset.go
deleted file mode 100644
index 9b8cbad..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/reset.go
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-type ResetReq struct {
-	NmpBase
-}
-
-type ResetRsp struct {
-	NmpBase
-}
-
-func NewResetReq() *ResetReq {
-	r := &ResetReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_DEFAULT, NMP_ID_DEF_RESET)
-	return r
-}
-
-func (r *ResetReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewResetRsp() *ResetRsp {
-	return &ResetRsp{}
-}
-
-func (r *ResetRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/run.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/run.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/run.go
deleted file mode 100644
index 3672b0f..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/run.go
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-//////////////////////////////////////////////////////////////////////////////
-// $test                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type RunTestReq struct {
-	NmpBase
-	Testname string `codec:"testname"`
-	Token    string `codec:"token"`
-}
-
-type RunTestRsp struct {
-	NmpBase
-	Rc int `codec:"rc" codec:",omitempty"`
-}
-
-func NewRunTestReq() *RunTestReq {
-	r := &RunTestReq{}
-	fillNmpReq(r, NMP_OP_WRITE, NMP_GROUP_RUN, NMP_ID_RUN_TEST)
-	return r
-}
-
-func (r *RunTestReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewRunTestRsp() *RunTestRsp {
-	return &RunTestRsp{}
-}
-
-func (r *RunTestRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $list                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type RunListReq struct {
-	NmpBase
-}
-
-type RunListRsp struct {
-	NmpBase
-	Rc   int      `codec:"rc" codec:",omitempty"`
-	List []string `codec:"run_list"`
-}
-
-func NewRunListReq() *RunListReq {
-	r := &RunListReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_RUN, NMP_ID_RUN_LIST)
-	return r
-}
-
-func (r *RunListReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewRunListRsp() *RunListRsp {
-	return &RunListRsp{}
-}
-
-func (r *RunListRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/stat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/stat.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/stat.go
deleted file mode 100644
index 2839c02..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/stat.go
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-//////////////////////////////////////////////////////////////////////////////
-// $read                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type StatReadReq struct {
-	NmpBase
-	Name string `codec:"name"`
-}
-
-type StatReadRsp struct {
-	NmpBase
-	Rc     int                    `codec:"rc"`
-	Name   string                 `codec:"name"`
-	Group  string                 `codec:"group"`
-	Fields map[string]interface{} `codec:"fields"`
-}
-
-func NewStatReadReq() *StatReadReq {
-	r := &StatReadReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_STAT, NMP_ID_STAT_READ)
-	return r
-}
-
-func (r *StatReadReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewStatReadRsp() *StatReadRsp {
-	return &StatReadRsp{}
-}
-
-func (r *StatReadRsp) Msg() *NmpMsg { return MsgFromReq(r) }
-
-//////////////////////////////////////////////////////////////////////////////
-// $list                                                                    //
-//////////////////////////////////////////////////////////////////////////////
-
-type StatListReq struct {
-	NmpBase
-}
-
-type StatListRsp struct {
-	NmpBase
-	Rc   int      `codec:"rc"`
-	List []string `codec:"stat_list"`
-}
-
-func NewStatListReq() *StatListReq {
-	r := &StatListReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_STAT, NMP_ID_STAT_LIST)
-	return r
-}
-
-func (r *StatListReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewStatListRsp() *StatListRsp {
-	return &StatListRsp{}
-}
-
-func (r *StatListRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/taskstat.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/taskstat.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/taskstat.go
deleted file mode 100644
index 6dda49d..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmp/taskstat.go
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package nmp
-
-import ()
-
-type TaskStatReq struct {
-	NmpBase
-}
-
-type TaskStatRsp struct {
-	NmpBase
-	Rc    int                       `codec:"rc" codec:",omitempty"`
-	Tasks map[string]map[string]int `codec:"tasks"`
-}
-
-func NewTaskStatReq() *TaskStatReq {
-	r := &TaskStatReq{}
-	fillNmpReq(r, NMP_OP_READ, NMP_GROUP_DEFAULT, NMP_ID_DEF_TASKSTAT)
-	return r
-}
-
-func (r *TaskStatReq) Msg() *NmpMsg { return MsgFromReq(r) }
-
-func NewTaskStatRsp() *TaskStatRsp {
-	return &TaskStatRsp{}
-}
-
-func (r *TaskStatRsp) Msg() *NmpMsg { return MsgFromReq(r) }

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/packet.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/packet.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/packet.go
deleted file mode 100644
index e25bc2e..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/packet.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package nmserial
-
-import (
-	"bytes"
-)
-
-type Packet struct {
-	expectedLen uint16
-	buffer      *bytes.Buffer
-}
-
-func NewPacket(expectedLen uint16) (*Packet, error) {
-	pkt := &Packet{
-		expectedLen: expectedLen,
-		buffer:      bytes.NewBuffer([]byte{}),
-	}
-
-	return pkt, nil
-}
-
-func (pkt *Packet) AddBytes(bytes []byte) bool {
-	pkt.buffer.Write(bytes)
-	if pkt.buffer.Len() >= int(pkt.expectedLen) {
-		return true
-	} else {
-		return false
-	}
-}
-
-func (pkt *Packet) GetBytes() []byte {
-	return pkt.buffer.Bytes()
-}
-
-func (pkt *Packet) TrimEnd(count int) {
-
-	if pkt.buffer.Len() < count {
-		count = pkt.buffer.Len()
-	}
-	pkt.buffer.Truncate(pkt.buffer.Len() - count)
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/serial_plain_sesn.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/serial_plain_sesn.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/serial_plain_sesn.go
deleted file mode 100644
index a407a98..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/serial_plain_sesn.go
+++ /dev/null
@@ -1,137 +0,0 @@
-package nmserial
-
-import (
-	"fmt"
-	"sync"
-
-	"mynewt.apache.org/newt/nmxact/nmp"
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-	"mynewt.apache.org/newt/nmxact/sesn"
-)
-
-type SerialPlainSesn struct {
-	sx     *SerialXport
-	nd     *nmp.NmpDispatcher
-	isOpen bool
-
-	// This mutex ensures:
-	//     * each response get matched up with its corresponding request.
-	//     * accesses to isOpen are protected.
-	m sync.Mutex
-}
-
-func NewSerialPlainSesn(sx *SerialXport) *SerialPlainSesn {
-	return &SerialPlainSesn{
-		sx: sx,
-		nd: nmp.NewNmpDispatcher(),
-	}
-}
-
-func (sps *SerialPlainSesn) Open() error {
-	sps.m.Lock()
-	defer sps.m.Unlock()
-
-	if sps.isOpen {
-		return nmxutil.NewSesnAlreadyOpenError(
-			"Attempt to open an already-open serial session")
-	}
-
-	sps.isOpen = true
-	return nil
-}
-
-func (sps *SerialPlainSesn) Close() error {
-	sps.m.Lock()
-	defer sps.m.Unlock()
-
-	if !sps.isOpen {
-		return nmxutil.NewSesnClosedError(
-			"Attempt to close an unopened serial session")
-	}
-	sps.isOpen = false
-	return nil
-}
-
-func (sps *SerialPlainSesn) IsOpen() bool {
-	sps.m.Lock()
-	defer sps.m.Unlock()
-
-	return sps.isOpen
-}
-
-func (sps *SerialPlainSesn) MtuIn() int {
-	return 1024
-}
-
-func (sps *SerialPlainSesn) MtuOut() int {
-	// Mynewt commands have a default chunk buffer size of 512.  Account for
-	// base64 encoding.
-	return 512 * 3 / 4
-}
-
-func (sps *SerialPlainSesn) AbortRx(seq uint8) error {
-	return sps.nd.FakeRxError(seq, fmt.Errorf("Rx aborted"))
-}
-
-func (sps *SerialPlainSesn) addNmpListener(seq uint8) (
-	*nmp.NmpListener, error) {
-
-	nl := nmp.NewNmpListener()
-	if err := sps.nd.AddListener(seq, nl); err != nil {
-		return nil, err
-	}
-
-	return nl, nil
-}
-
-func (sps *SerialPlainSesn) removeNmpListener(seq uint8) {
-	sps.nd.RemoveListener(seq)
-}
-
-func (sps *SerialPlainSesn) EncodeNmpMsg(m *nmp.NmpMsg) ([]byte, error) {
-	return nmp.EncodeNmpPlain(m)
-}
-
-func (sps *SerialPlainSesn) TxNmpOnce(m *nmp.NmpMsg, opt sesn.TxOptions) (
-	nmp.NmpRsp, error) {
-
-	sps.m.Lock()
-	defer sps.m.Unlock()
-
-	if !sps.isOpen {
-		return nil, nmxutil.NewSesnClosedError(
-			"Attempt to transmit over closed serial session")
-	}
-
-	nl, err := sps.addNmpListener(m.Hdr.Seq)
-	if err != nil {
-		return nil, err
-	}
-	defer sps.removeNmpListener(m.Hdr.Seq)
-
-	reqb, err := sps.EncodeNmpMsg(m)
-	if err != nil {
-		return nil, err
-	}
-
-	if err := sps.sx.Tx(reqb); err != nil {
-		return nil, err
-	}
-
-	for {
-		rspb, err := sps.sx.Rx()
-		if err != nil {
-			return nil, err
-		}
-
-		// Now wait for newtmgr response.
-		if sps.nd.Dispatch(rspb) {
-			select {
-			case err := <-nl.ErrChan:
-				return nil, err
-			case rsp := <-nl.RspChan:
-				return rsp, nil
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/serial_xport.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/serial_xport.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/serial_xport.go
deleted file mode 100644
index 6f5aa7c..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmserial/serial_xport.go
+++ /dev/null
@@ -1,217 +0,0 @@
-package nmserial
-
-import (
-	"bufio"
-	"encoding/base64"
-	"encoding/binary"
-	"encoding/hex"
-	"fmt"
-	"time"
-
-	log "github.com/Sirupsen/logrus"
-	"github.com/joaojeronimo/go-crc16"
-	"github.com/tarm/serial"
-
-	"mynewt.apache.org/newt/nmxact/nmxutil"
-	"mynewt.apache.org/newt/nmxact/sesn"
-	"mynewt.apache.org/newt/util"
-)
-
-type XportCfg struct {
-	DevPath     string
-	Baud        int
-	ReadTimeout time.Duration
-}
-
-func NewXportCfg() *XportCfg {
-	return &XportCfg{
-		ReadTimeout: 10 * time.Second,
-	}
-}
-
-type SerialXport struct {
-	cfg     *XportCfg
-	port    *serial.Port
-	scanner *bufio.Scanner
-
-	pkt *Packet
-}
-
-func NewSerialXport(cfg *XportCfg) *SerialXport {
-	return &SerialXport{
-		cfg: cfg,
-	}
-}
-
-func (sx *SerialXport) BuildSesn(cfg sesn.SesnCfg) (sesn.Sesn, error) {
-	switch cfg.MgmtProto {
-	case sesn.MGMT_PROTO_NMP:
-		return NewSerialPlainSesn(sx), nil
-	case sesn.MGMT_PROTO_OMP:
-		return nil, fmt.Errorf("OMP over serial currently unsupported")
-	default:
-		return nil, fmt.Errorf(
-			"Invalid management protocol: %d; expected NMP or OMP",
-			cfg.MgmtProto)
-	}
-}
-
-func (sx *SerialXport) Start() error {
-	c := &serial.Config{
-		Name:        sx.cfg.DevPath,
-		Baud:        sx.cfg.Baud,
-		ReadTimeout: sx.cfg.ReadTimeout,
-	}
-
-	var err error
-	sx.port, err = serial.OpenPort(c)
-	if err != nil {
-		return err
-	}
-
-	// Most of the reading will be done line by line, use the
-	// bufio.Scanner to do this
-	sx.scanner = bufio.NewScanner(sx.port)
-
-	return nil
-}
-
-func (sx *SerialXport) Stop() error {
-	return sx.port.Close()
-}
-
-func (sx *SerialXport) txRaw(bytes []byte) error {
-	log.Debugf("Tx serial\n%s", hex.Dump(bytes))
-
-	_, err := sx.port.Write(bytes)
-	if err != nil {
-		return err
-	}
-
-	return nil
-}
-
-func (sx *SerialXport) Tx(bytes []byte) error {
-	log.Debugf("Base64 encoding request:\n%s", hex.Dump(bytes))
-
-	pktData := make([]byte, 2)
-
-	crc := crc16.Crc16(bytes)
-	binary.BigEndian.PutUint16(pktData, crc)
-	bytes = append(bytes, pktData...)
-
-	dLen := uint16(len(bytes))
-	binary.BigEndian.PutUint16(pktData, dLen)
-	pktData = append(pktData, bytes...)
-
-	base64Data := make([]byte, base64.StdEncoding.EncodedLen(len(pktData)))
-
-	base64.StdEncoding.Encode(base64Data, pktData)
-
-	written := 0
-	totlen := len(base64Data)
-
-	for written < totlen {
-		/* write the packet stat designators. They are
-		 * different whether we are starting a new packet or continuing one */
-		if written == 0 {
-			sx.txRaw([]byte{6, 9})
-		} else {
-			/* slower platforms take some time to process each segment
-			 * and have very small receive buffers.  Give them a bit of
-			 * time here */
-			time.Sleep(20 * time.Millisecond)
-			sx.txRaw([]byte{4, 20})
-		}
-
-		/* ensure that the total frame fits into 128 bytes.
-		 * base 64 is 3 ascii to 4 base 64 byte encoding.  so
-		 * the number below should be a multiple of 4.  Also,
-		 * we need to save room for the header (2 byte) and
-		 * carriage return (and possibly LF 2 bytes), */
-
-		/* all totaled, 124 bytes should work */
-		writeLen := util.Min(124, totlen-written)
-
-		writeBytes := base64Data[written : written+writeLen]
-		sx.txRaw(writeBytes)
-		sx.txRaw([]byte{'\n'})
-
-		written += writeLen
-	}
-
-	return nil
-}
-
-// Blocking receive.
-func (sx *SerialXport) Rx() ([]byte, error) {
-	for sx.scanner.Scan() {
-		line := []byte(sx.scanner.Text())
-
-		for {
-			if len(line) > 1 && line[0] == '\r' {
-				line = line[1:]
-			} else {
-				break
-			}
-		}
-		log.Debugf("Rx serial:\n%s", hex.Dump(line))
-		if len(line) < 2 || ((line[0] != 4 || line[1] != 20) &&
-			(line[0] != 6 || line[1] != 9)) {
-			continue
-		}
-
-		base64Data := string(line[2:])
-
-		data, err := base64.StdEncoding.DecodeString(base64Data)
-		if err != nil {
-			return nil, fmt.Errorf("Couldn't decode base64 string:"+
-				" %s\nPacket hex dump:\n%s",
-				base64Data, hex.Dump(line))
-		}
-
-		if line[0] == 6 && line[1] == 9 {
-			if len(data) < 2 {
-				continue
-			}
-
-			pktLen := binary.BigEndian.Uint16(data[0:2])
-			sx.pkt, err = NewPacket(pktLen)
-			if err != nil {
-				return nil, err
-			}
-			data = data[2:]
-		}
-
-		if sx.pkt == nil {
-			continue
-		}
-
-		full := sx.pkt.AddBytes(data)
-		if full {
-			if crc16.Crc16(sx.pkt.GetBytes()) != 0 {
-				return nil, fmt.Errorf("CRC error")
-			}
-
-			/*
-			 * Trim away the 2 bytes of CRC
-			 */
-			sx.pkt.TrimEnd(2)
-			b := sx.pkt.GetBytes()
-			sx.pkt = nil
-
-			log.Debugf("Decoded input:\n%s", hex.Dump(b))
-			return b, nil
-		}
-	}
-
-	err := sx.scanner.Err()
-	if err == nil {
-		// Scanner hit EOF, so we'll need to create a new one.  This only
-		// happens on timeouts.
-		err = nmxutil.NewXportTimeoutError(
-			"Timeout reading from serial connection")
-		sx.scanner = bufio.NewScanner(sx.port)
-	}
-	return nil, err
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmxutil/nmxerr.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmxutil/nmxerr.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmxutil/nmxerr.go
deleted file mode 100644
index aa9da23..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmxutil/nmxerr.go
+++ /dev/null
@@ -1,160 +0,0 @@
-package nmxutil
-
-import (
-	"fmt"
-)
-
-// Represents an NMP timeout; request sent, but no response received.
-type NmpTimeoutError struct {
-	Text string
-}
-
-func NewNmpTimeoutError(text string) *NmpTimeoutError {
-	return &NmpTimeoutError{
-		Text: text,
-	}
-}
-
-func FmtNmpTimeoutError(format string, args ...interface{}) *NmpTimeoutError {
-	return NewNmpTimeoutError(fmt.Sprintf(format, args...))
-}
-
-func (e *NmpTimeoutError) Error() string {
-	return e.Text
-}
-
-func IsNmpTimeout(err error) bool {
-	_, ok := err.(*NmpTimeoutError)
-	return ok
-}
-
-type BleSesnDisconnectError struct {
-	Text   string
-	Reason int
-}
-
-func NewBleSesnDisconnectError(reason int,
-	text string) *BleSesnDisconnectError {
-
-	return &BleSesnDisconnectError{
-		Reason: reason,
-		Text:   text,
-	}
-}
-
-func (e *BleSesnDisconnectError) Error() string {
-	return e.Text
-}
-
-func IsBleSesnDisconnect(err error) bool {
-	_, ok := err.(*BleSesnDisconnectError)
-	return ok
-}
-
-type SesnAlreadyOpenError struct {
-	Text string
-}
-
-func NewSesnAlreadyOpenError(text string) *SesnAlreadyOpenError {
-	return &SesnAlreadyOpenError{
-		Text: text,
-	}
-}
-
-func (e *SesnAlreadyOpenError) Error() string {
-	return e.Text
-}
-
-func IsSesnAlreadyOpen(err error) bool {
-	_, ok := err.(*SesnAlreadyOpenError)
-	return ok
-}
-
-type SesnClosedError struct {
-	Text string
-}
-
-func NewSesnClosedError(text string) *SesnClosedError {
-	return &SesnClosedError{
-		Text: text,
-	}
-}
-
-func (e *SesnClosedError) Error() string {
-	return e.Text
-}
-
-func IsSesnClosed(err error) bool {
-	_, ok := err.(*SesnClosedError)
-	return ok
-}
-
-// Represents a low-level transport error.
-type XportError struct {
-	Text string
-}
-
-func NewXportError(text string) *XportError {
-	return &XportError{text}
-}
-
-func (e *XportError) Error() string {
-	return e.Text
-}
-
-func IsXport(err error) bool {
-	_, ok := err.(*XportError)
-	return ok
-}
-
-type XportTimeoutError struct {
-	Text string
-}
-
-func NewXportTimeoutError(text string) *XportTimeoutError {
-	return &XportTimeoutError{text}
-}
-
-func (e *XportTimeoutError) Error() string {
-	return e.Text
-}
-
-func IsXportTimeout(err error) bool {
-	_, ok := err.(*XportTimeoutError)
-	return ok
-}
-
-type BleHostError struct {
-	Text   string
-	Status int
-}
-
-func NewBleHostError(status int, text string) *BleHostError {
-	return &BleHostError{
-		Status: status,
-		Text:   text,
-	}
-}
-
-func FmtBleHostError(status int, format string,
-	args ...interface{}) *BleHostError {
-
-	return NewBleHostError(status, fmt.Sprintf(format, args...))
-}
-
-func (e *BleHostError) Error() string {
-	return e.Text
-}
-
-func IsBleHost(err error) bool {
-	_, ok := err.(*BleHostError)
-	return ok
-}
-
-func ToBleHost(err error) *BleHostError {
-	if berr, ok := err.(*BleHostError); ok {
-		return berr
-	} else {
-		return nil
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/15498bdc/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmxutil/nmxutil.go
----------------------------------------------------------------------
diff --git a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmxutil/nmxutil.go b/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmxutil/nmxutil.go
deleted file mode 100644
index ef1ecd4..0000000
--- a/newtmgr/vendor/mynewt.apache.org/newt/nmxact/nmxutil/nmxutil.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package nmxutil
-
-import (
-	"math/rand"
-	"sync"
-)
-
-var nextNmpSeq uint8
-var beenRead bool
-var seqMutex sync.Mutex
-
-func NextNmpSeq() uint8 {
-	seqMutex.Lock()
-	defer seqMutex.Unlock()
-
-	if !beenRead {
-		nextNmpSeq = uint8(rand.Uint32())
-		beenRead = true
-	}
-
-	val := nextNmpSeq
-	nextNmpSeq++
-
-	return val
-}



[29/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
deleted file mode 100644
index e48e779..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go
+++ /dev/null
@@ -1,1748 +0,0 @@
-// mkerrors.sh -m64
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,freebsd
-
-// Created by cgo -godefs - DO NOT EDIT
-// cgo -godefs -- -m64 _const.go
-
-package unix
-
-import "syscall"
-
-const (
-	AF_APPLETALK                      = 0x10
-	AF_ARP                            = 0x23
-	AF_ATM                            = 0x1e
-	AF_BLUETOOTH                      = 0x24
-	AF_CCITT                          = 0xa
-	AF_CHAOS                          = 0x5
-	AF_CNT                            = 0x15
-	AF_COIP                           = 0x14
-	AF_DATAKIT                        = 0x9
-	AF_DECnet                         = 0xc
-	AF_DLI                            = 0xd
-	AF_E164                           = 0x1a
-	AF_ECMA                           = 0x8
-	AF_HYLINK                         = 0xf
-	AF_IEEE80211                      = 0x25
-	AF_IMPLINK                        = 0x3
-	AF_INET                           = 0x2
-	AF_INET6                          = 0x1c
-	AF_INET6_SDP                      = 0x2a
-	AF_INET_SDP                       = 0x28
-	AF_IPX                            = 0x17
-	AF_ISDN                           = 0x1a
-	AF_ISO                            = 0x7
-	AF_LAT                            = 0xe
-	AF_LINK                           = 0x12
-	AF_LOCAL                          = 0x1
-	AF_MAX                            = 0x2a
-	AF_NATM                           = 0x1d
-	AF_NETBIOS                        = 0x6
-	AF_NETGRAPH                       = 0x20
-	AF_OSI                            = 0x7
-	AF_PUP                            = 0x4
-	AF_ROUTE                          = 0x11
-	AF_SCLUSTER                       = 0x22
-	AF_SIP                            = 0x18
-	AF_SLOW                           = 0x21
-	AF_SNA                            = 0xb
-	AF_UNIX                           = 0x1
-	AF_UNSPEC                         = 0x0
-	AF_VENDOR00                       = 0x27
-	AF_VENDOR01                       = 0x29
-	AF_VENDOR02                       = 0x2b
-	AF_VENDOR03                       = 0x2d
-	AF_VENDOR04                       = 0x2f
-	AF_VENDOR05                       = 0x31
-	AF_VENDOR06                       = 0x33
-	AF_VENDOR07                       = 0x35
-	AF_VENDOR08                       = 0x37
-	AF_VENDOR09                       = 0x39
-	AF_VENDOR10                       = 0x3b
-	AF_VENDOR11                       = 0x3d
-	AF_VENDOR12                       = 0x3f
-	AF_VENDOR13                       = 0x41
-	AF_VENDOR14                       = 0x43
-	AF_VENDOR15                       = 0x45
-	AF_VENDOR16                       = 0x47
-	AF_VENDOR17                       = 0x49
-	AF_VENDOR18                       = 0x4b
-	AF_VENDOR19                       = 0x4d
-	AF_VENDOR20                       = 0x4f
-	AF_VENDOR21                       = 0x51
-	AF_VENDOR22                       = 0x53
-	AF_VENDOR23                       = 0x55
-	AF_VENDOR24                       = 0x57
-	AF_VENDOR25                       = 0x59
-	AF_VENDOR26                       = 0x5b
-	AF_VENDOR27                       = 0x5d
-	AF_VENDOR28                       = 0x5f
-	AF_VENDOR29                       = 0x61
-	AF_VENDOR30                       = 0x63
-	AF_VENDOR31                       = 0x65
-	AF_VENDOR32                       = 0x67
-	AF_VENDOR33                       = 0x69
-	AF_VENDOR34                       = 0x6b
-	AF_VENDOR35                       = 0x6d
-	AF_VENDOR36                       = 0x6f
-	AF_VENDOR37                       = 0x71
-	AF_VENDOR38                       = 0x73
-	AF_VENDOR39                       = 0x75
-	AF_VENDOR40                       = 0x77
-	AF_VENDOR41                       = 0x79
-	AF_VENDOR42                       = 0x7b
-	AF_VENDOR43                       = 0x7d
-	AF_VENDOR44                       = 0x7f
-	AF_VENDOR45                       = 0x81
-	AF_VENDOR46                       = 0x83
-	AF_VENDOR47                       = 0x85
-	B0                                = 0x0
-	B110                              = 0x6e
-	B115200                           = 0x1c200
-	B1200                             = 0x4b0
-	B134                              = 0x86
-	B14400                            = 0x3840
-	B150                              = 0x96
-	B1800                             = 0x708
-	B19200                            = 0x4b00
-	B200                              = 0xc8
-	B230400                           = 0x38400
-	B2400                             = 0x960
-	B28800                            = 0x7080
-	B300                              = 0x12c
-	B38400                            = 0x9600
-	B460800                           = 0x70800
-	B4800                             = 0x12c0
-	B50                               = 0x32
-	B57600                            = 0xe100
-	B600                              = 0x258
-	B7200                             = 0x1c20
-	B75                               = 0x4b
-	B76800                            = 0x12c00
-	B921600                           = 0xe1000
-	B9600                             = 0x2580
-	BIOCFEEDBACK                      = 0x8004427c
-	BIOCFLUSH                         = 0x20004268
-	BIOCGBLEN                         = 0x40044266
-	BIOCGDIRECTION                    = 0x40044276
-	BIOCGDLT                          = 0x4004426a
-	BIOCGDLTLIST                      = 0xc0104279
-	BIOCGETBUFMODE                    = 0x4004427d
-	BIOCGETIF                         = 0x4020426b
-	BIOCGETZMAX                       = 0x4008427f
-	BIOCGHDRCMPLT                     = 0x40044274
-	BIOCGRSIG                         = 0x40044272
-	BIOCGRTIMEOUT                     = 0x4010426e
-	BIOCGSEESENT                      = 0x40044276
-	BIOCGSTATS                        = 0x4008426f
-	BIOCGTSTAMP                       = 0x40044283
-	BIOCIMMEDIATE                     = 0x80044270
-	BIOCLOCK                          = 0x2000427a
-	BIOCPROMISC                       = 0x20004269
-	BIOCROTZBUF                       = 0x40184280
-	BIOCSBLEN                         = 0xc0044266
-	BIOCSDIRECTION                    = 0x80044277
-	BIOCSDLT                          = 0x80044278
-	BIOCSETBUFMODE                    = 0x8004427e
-	BIOCSETF                          = 0x80104267
-	BIOCSETFNR                        = 0x80104282
-	BIOCSETIF                         = 0x8020426c
-	BIOCSETWF                         = 0x8010427b
-	BIOCSETZBUF                       = 0x80184281
-	BIOCSHDRCMPLT                     = 0x80044275
-	BIOCSRSIG                         = 0x80044273
-	BIOCSRTIMEOUT                     = 0x8010426d
-	BIOCSSEESENT                      = 0x80044277
-	BIOCSTSTAMP                       = 0x80044284
-	BIOCVERSION                       = 0x40044271
-	BPF_A                             = 0x10
-	BPF_ABS                           = 0x20
-	BPF_ADD                           = 0x0
-	BPF_ALIGNMENT                     = 0x8
-	BPF_ALU                           = 0x4
-	BPF_AND                           = 0x50
-	BPF_B                             = 0x10
-	BPF_BUFMODE_BUFFER                = 0x1
-	BPF_BUFMODE_ZBUF                  = 0x2
-	BPF_DIV                           = 0x30
-	BPF_H                             = 0x8
-	BPF_IMM                           = 0x0
-	BPF_IND                           = 0x40
-	BPF_JA                            = 0x0
-	BPF_JEQ                           = 0x10
-	BPF_JGE                           = 0x30
-	BPF_JGT                           = 0x20
-	BPF_JMP                           = 0x5
-	BPF_JSET                          = 0x40
-	BPF_K                             = 0x0
-	BPF_LD                            = 0x0
-	BPF_LDX                           = 0x1
-	BPF_LEN                           = 0x80
-	BPF_LSH                           = 0x60
-	BPF_MAJOR_VERSION                 = 0x1
-	BPF_MAXBUFSIZE                    = 0x80000
-	BPF_MAXINSNS                      = 0x200
-	BPF_MEM                           = 0x60
-	BPF_MEMWORDS                      = 0x10
-	BPF_MINBUFSIZE                    = 0x20
-	BPF_MINOR_VERSION                 = 0x1
-	BPF_MISC                          = 0x7
-	BPF_MSH                           = 0xa0
-	BPF_MUL                           = 0x20
-	BPF_NEG                           = 0x80
-	BPF_OR                            = 0x40
-	BPF_RELEASE                       = 0x30bb6
-	BPF_RET                           = 0x6
-	BPF_RSH                           = 0x70
-	BPF_ST                            = 0x2
-	BPF_STX                           = 0x3
-	BPF_SUB                           = 0x10
-	BPF_TAX                           = 0x0
-	BPF_TXA                           = 0x80
-	BPF_T_BINTIME                     = 0x2
-	BPF_T_BINTIME_FAST                = 0x102
-	BPF_T_BINTIME_MONOTONIC           = 0x202
-	BPF_T_BINTIME_MONOTONIC_FAST      = 0x302
-	BPF_T_FAST                        = 0x100
-	BPF_T_FLAG_MASK                   = 0x300
-	BPF_T_FORMAT_MASK                 = 0x3
-	BPF_T_MICROTIME                   = 0x0
-	BPF_T_MICROTIME_FAST              = 0x100
-	BPF_T_MICROTIME_MONOTONIC         = 0x200
-	BPF_T_MICROTIME_MONOTONIC_FAST    = 0x300
-	BPF_T_MONOTONIC                   = 0x200
-	BPF_T_MONOTONIC_FAST              = 0x300
-	BPF_T_NANOTIME                    = 0x1
-	BPF_T_NANOTIME_FAST               = 0x101
-	BPF_T_NANOTIME_MONOTONIC          = 0x201
-	BPF_T_NANOTIME_MONOTONIC_FAST     = 0x301
-	BPF_T_NONE                        = 0x3
-	BPF_T_NORMAL                      = 0x0
-	BPF_W                             = 0x0
-	BPF_X                             = 0x8
-	BRKINT                            = 0x2
-	CFLUSH                            = 0xf
-	CLOCAL                            = 0x8000
-	CLOCK_MONOTONIC                   = 0x4
-	CLOCK_MONOTONIC_FAST              = 0xc
-	CLOCK_MONOTONIC_PRECISE           = 0xb
-	CLOCK_PROCESS_CPUTIME_ID          = 0xf
-	CLOCK_PROF                        = 0x2
-	CLOCK_REALTIME                    = 0x0
-	CLOCK_REALTIME_FAST               = 0xa
-	CLOCK_REALTIME_PRECISE            = 0x9
-	CLOCK_SECOND                      = 0xd
-	CLOCK_THREAD_CPUTIME_ID           = 0xe
-	CLOCK_UPTIME                      = 0x5
-	CLOCK_UPTIME_FAST                 = 0x8
-	CLOCK_UPTIME_PRECISE              = 0x7
-	CLOCK_VIRTUAL                     = 0x1
-	CREAD                             = 0x800
-	CS5                               = 0x0
-	CS6                               = 0x100
-	CS7                               = 0x200
-	CS8                               = 0x300
-	CSIZE                             = 0x300
-	CSTART                            = 0x11
-	CSTATUS                           = 0x14
-	CSTOP                             = 0x13
-	CSTOPB                            = 0x400
-	CSUSP                             = 0x1a
-	CTL_MAXNAME                       = 0x18
-	CTL_NET                           = 0x4
-	DLT_A429                          = 0xb8
-	DLT_A653_ICM                      = 0xb9
-	DLT_AIRONET_HEADER                = 0x78
-	DLT_AOS                           = 0xde
-	DLT_APPLE_IP_OVER_IEEE1394        = 0x8a
-	DLT_ARCNET                        = 0x7
-	DLT_ARCNET_LINUX                  = 0x81
-	DLT_ATM_CLIP                      = 0x13
-	DLT_ATM_RFC1483                   = 0xb
-	DLT_AURORA                        = 0x7e
-	DLT_AX25                          = 0x3
-	DLT_AX25_KISS                     = 0xca
-	DLT_BACNET_MS_TP                  = 0xa5
-	DLT_BLUETOOTH_HCI_H4              = 0xbb
-	DLT_BLUETOOTH_HCI_H4_WITH_PHDR    = 0xc9
-	DLT_CAN20B                        = 0xbe
-	DLT_CAN_SOCKETCAN                 = 0xe3
-	DLT_CHAOS                         = 0x5
-	DLT_CHDLC                         = 0x68
-	DLT_CISCO_IOS                     = 0x76
-	DLT_C_HDLC                        = 0x68
-	DLT_C_HDLC_WITH_DIR               = 0xcd
-	DLT_DBUS                          = 0xe7
-	DLT_DECT                          = 0xdd
-	DLT_DOCSIS                        = 0x8f
-	DLT_DVB_CI                        = 0xeb
-	DLT_ECONET                        = 0x73
-	DLT_EN10MB                        = 0x1
-	DLT_EN3MB                         = 0x2
-	DLT_ENC                           = 0x6d
-	DLT_ERF                           = 0xc5
-	DLT_ERF_ETH                       = 0xaf
-	DLT_ERF_POS                       = 0xb0
-	DLT_FC_2                          = 0xe0
-	DLT_FC_2_WITH_FRAME_DELIMS        = 0xe1
-	DLT_FDDI                          = 0xa
-	DLT_FLEXRAY                       = 0xd2
-	DLT_FRELAY                        = 0x6b
-	DLT_FRELAY_WITH_DIR               = 0xce
-	DLT_GCOM_SERIAL                   = 0xad
-	DLT_GCOM_T1E1                     = 0xac
-	DLT_GPF_F                         = 0xab
-	DLT_GPF_T                         = 0xaa
-	DLT_GPRS_LLC                      = 0xa9
-	DLT_GSMTAP_ABIS                   = 0xda
-	DLT_GSMTAP_UM                     = 0xd9
-	DLT_HHDLC                         = 0x79
-	DLT_IBM_SN                        = 0x92
-	DLT_IBM_SP                        = 0x91
-	DLT_IEEE802                       = 0x6
-	DLT_IEEE802_11                    = 0x69
-	DLT_IEEE802_11_RADIO              = 0x7f
-	DLT_IEEE802_11_RADIO_AVS          = 0xa3
-	DLT_IEEE802_15_4                  = 0xc3
-	DLT_IEEE802_15_4_LINUX            = 0xbf
-	DLT_IEEE802_15_4_NOFCS            = 0xe6
-	DLT_IEEE802_15_4_NONASK_PHY       = 0xd7
-	DLT_IEEE802_16_MAC_CPS            = 0xbc
-	DLT_IEEE802_16_MAC_CPS_RADIO      = 0xc1
-	DLT_IPFILTER                      = 0x74
-	DLT_IPMB                          = 0xc7
-	DLT_IPMB_LINUX                    = 0xd1
-	DLT_IPNET                         = 0xe2
-	DLT_IPOIB                         = 0xf2
-	DLT_IPV4                          = 0xe4
-	DLT_IPV6                          = 0xe5
-	DLT_IP_OVER_FC                    = 0x7a
-	DLT_JUNIPER_ATM1                  = 0x89
-	DLT_JUNIPER_ATM2                  = 0x87
-	DLT_JUNIPER_ATM_CEMIC             = 0xee
-	DLT_JUNIPER_CHDLC                 = 0xb5
-	DLT_JUNIPER_ES                    = 0x84
-	DLT_JUNIPER_ETHER                 = 0xb2
-	DLT_JUNIPER_FIBRECHANNEL          = 0xea
-	DLT_JUNIPER_FRELAY                = 0xb4
-	DLT_JUNIPER_GGSN                  = 0x85
-	DLT_JUNIPER_ISM                   = 0xc2
-	DLT_JUNIPER_MFR                   = 0x86
-	DLT_JUNIPER_MLFR                  = 0x83
-	DLT_JUNIPER_MLPPP                 = 0x82
-	DLT_JUNIPER_MONITOR               = 0xa4
-	DLT_JUNIPER_PIC_PEER              = 0xae
-	DLT_JUNIPER_PPP                   = 0xb3
-	DLT_JUNIPER_PPPOE                 = 0xa7
-	DLT_JUNIPER_PPPOE_ATM             = 0xa8
-	DLT_JUNIPER_SERVICES              = 0x88
-	DLT_JUNIPER_SRX_E2E               = 0xe9
-	DLT_JUNIPER_ST                    = 0xc8
-	DLT_JUNIPER_VP                    = 0xb7
-	DLT_JUNIPER_VS                    = 0xe8
-	DLT_LAPB_WITH_DIR                 = 0xcf
-	DLT_LAPD                          = 0xcb
-	DLT_LIN                           = 0xd4
-	DLT_LINUX_EVDEV                   = 0xd8
-	DLT_LINUX_IRDA                    = 0x90
-	DLT_LINUX_LAPD                    = 0xb1
-	DLT_LINUX_PPP_WITHDIRECTION       = 0xa6
-	DLT_LINUX_SLL                     = 0x71
-	DLT_LOOP                          = 0x6c
-	DLT_LTALK                         = 0x72
-	DLT_MATCHING_MAX                  = 0xf6
-	DLT_MATCHING_MIN                  = 0x68
-	DLT_MFR                           = 0xb6
-	DLT_MOST                          = 0xd3
-	DLT_MPEG_2_TS                     = 0xf3
-	DLT_MPLS                          = 0xdb
-	DLT_MTP2                          = 0x8c
-	DLT_MTP2_WITH_PHDR                = 0x8b
-	DLT_MTP3                          = 0x8d
-	DLT_MUX27010                      = 0xec
-	DLT_NETANALYZER                   = 0xf0
-	DLT_NETANALYZER_TRANSPARENT       = 0xf1
-	DLT_NFC_LLCP                      = 0xf5
-	DLT_NFLOG                         = 0xef
-	DLT_NG40                          = 0xf4
-	DLT_NULL                          = 0x0
-	DLT_PCI_EXP                       = 0x7d
-	DLT_PFLOG                         = 0x75
-	DLT_PFSYNC                        = 0x79
-	DLT_PPI                           = 0xc0
-	DLT_PPP                           = 0x9
-	DLT_PPP_BSDOS                     = 0x10
-	DLT_PPP_ETHER                     = 0x33
-	DLT_PPP_PPPD                      = 0xa6
-	DLT_PPP_SERIAL                    = 0x32
-	DLT_PPP_WITH_DIR                  = 0xcc
-	DLT_PPP_WITH_DIRECTION            = 0xa6
-	DLT_PRISM_HEADER                  = 0x77
-	DLT_PRONET                        = 0x4
-	DLT_RAIF1                         = 0xc6
-	DLT_RAW                           = 0xc
-	DLT_RIO                           = 0x7c
-	DLT_SCCP                          = 0x8e
-	DLT_SITA                          = 0xc4
-	DLT_SLIP                          = 0x8
-	DLT_SLIP_BSDOS                    = 0xf
-	DLT_STANAG_5066_D_PDU             = 0xed
-	DLT_SUNATM                        = 0x7b
-	DLT_SYMANTEC_FIREWALL             = 0x63
-	DLT_TZSP                          = 0x80
-	DLT_USB                           = 0xba
-	DLT_USB_LINUX                     = 0xbd
-	DLT_USB_LINUX_MMAPPED             = 0xdc
-	DLT_USER0                         = 0x93
-	DLT_USER1                         = 0x94
-	DLT_USER10                        = 0x9d
-	DLT_USER11                        = 0x9e
-	DLT_USER12                        = 0x9f
-	DLT_USER13                        = 0xa0
-	DLT_USER14                        = 0xa1
-	DLT_USER15                        = 0xa2
-	DLT_USER2                         = 0x95
-	DLT_USER3                         = 0x96
-	DLT_USER4                         = 0x97
-	DLT_USER5                         = 0x98
-	DLT_USER6                         = 0x99
-	DLT_USER7                         = 0x9a
-	DLT_USER8                         = 0x9b
-	DLT_USER9                         = 0x9c
-	DLT_WIHART                        = 0xdf
-	DLT_X2E_SERIAL                    = 0xd5
-	DLT_X2E_XORAYA                    = 0xd6
-	DT_BLK                            = 0x6
-	DT_CHR                            = 0x2
-	DT_DIR                            = 0x4
-	DT_FIFO                           = 0x1
-	DT_LNK                            = 0xa
-	DT_REG                            = 0x8
-	DT_SOCK                           = 0xc
-	DT_UNKNOWN                        = 0x0
-	DT_WHT                            = 0xe
-	ECHO                              = 0x8
-	ECHOCTL                           = 0x40
-	ECHOE                             = 0x2
-	ECHOK                             = 0x4
-	ECHOKE                            = 0x1
-	ECHONL                            = 0x10
-	ECHOPRT                           = 0x20
-	EVFILT_AIO                        = -0x3
-	EVFILT_FS                         = -0x9
-	EVFILT_LIO                        = -0xa
-	EVFILT_PROC                       = -0x5
-	EVFILT_READ                       = -0x1
-	EVFILT_SIGNAL                     = -0x6
-	EVFILT_SYSCOUNT                   = 0xb
-	EVFILT_TIMER                      = -0x7
-	EVFILT_USER                       = -0xb
-	EVFILT_VNODE                      = -0x4
-	EVFILT_WRITE                      = -0x2
-	EV_ADD                            = 0x1
-	EV_CLEAR                          = 0x20
-	EV_DELETE                         = 0x2
-	EV_DISABLE                        = 0x8
-	EV_DISPATCH                       = 0x80
-	EV_DROP                           = 0x1000
-	EV_ENABLE                         = 0x4
-	EV_EOF                            = 0x8000
-	EV_ERROR                          = 0x4000
-	EV_FLAG1                          = 0x2000
-	EV_ONESHOT                        = 0x10
-	EV_RECEIPT                        = 0x40
-	EV_SYSFLAGS                       = 0xf000
-	EXTA                              = 0x4b00
-	EXTATTR_NAMESPACE_EMPTY           = 0x0
-	EXTATTR_NAMESPACE_SYSTEM          = 0x2
-	EXTATTR_NAMESPACE_USER            = 0x1
-	EXTB                              = 0x9600
-	EXTPROC                           = 0x800
-	FD_CLOEXEC                        = 0x1
-	FD_SETSIZE                        = 0x400
-	FLUSHO                            = 0x800000
-	F_CANCEL                          = 0x5
-	F_DUP2FD                          = 0xa
-	F_DUP2FD_CLOEXEC                  = 0x12
-	F_DUPFD                           = 0x0
-	F_DUPFD_CLOEXEC                   = 0x11
-	F_GETFD                           = 0x1
-	F_GETFL                           = 0x3
-	F_GETLK                           = 0xb
-	F_GETOWN                          = 0x5
-	F_OGETLK                          = 0x7
-	F_OK                              = 0x0
-	F_OSETLK                          = 0x8
-	F_OSETLKW                         = 0x9
-	F_RDAHEAD                         = 0x10
-	F_RDLCK                           = 0x1
-	F_READAHEAD                       = 0xf
-	F_SETFD                           = 0x2
-	F_SETFL                           = 0x4
-	F_SETLK                           = 0xc
-	F_SETLKW                          = 0xd
-	F_SETLK_REMOTE                    = 0xe
-	F_SETOWN                          = 0x6
-	F_UNLCK                           = 0x2
-	F_UNLCKSYS                        = 0x4
-	F_WRLCK                           = 0x3
-	HUPCL                             = 0x4000
-	ICANON                            = 0x100
-	ICMP6_FILTER                      = 0x12
-	ICRNL                             = 0x100
-	IEXTEN                            = 0x400
-	IFAN_ARRIVAL                      = 0x0
-	IFAN_DEPARTURE                    = 0x1
-	IFF_ALLMULTI                      = 0x200
-	IFF_ALTPHYS                       = 0x4000
-	IFF_BROADCAST                     = 0x2
-	IFF_CANTCHANGE                    = 0x218f72
-	IFF_CANTCONFIG                    = 0x10000
-	IFF_DEBUG                         = 0x4
-	IFF_DRV_OACTIVE                   = 0x400
-	IFF_DRV_RUNNING                   = 0x40
-	IFF_DYING                         = 0x200000
-	IFF_LINK0                         = 0x1000
-	IFF_LINK1                         = 0x2000
-	IFF_LINK2                         = 0x4000
-	IFF_LOOPBACK                      = 0x8
-	IFF_MONITOR                       = 0x40000
-	IFF_MULTICAST                     = 0x8000
-	IFF_NOARP                         = 0x80
-	IFF_OACTIVE                       = 0x400
-	IFF_POINTOPOINT                   = 0x10
-	IFF_PPROMISC                      = 0x20000
-	IFF_PROMISC                       = 0x100
-	IFF_RENAMING                      = 0x400000
-	IFF_RUNNING                       = 0x40
-	IFF_SIMPLEX                       = 0x800
-	IFF_SMART                         = 0x20
-	IFF_STATICARP                     = 0x80000
-	IFF_UP                            = 0x1
-	IFNAMSIZ                          = 0x10
-	IFT_1822                          = 0x2
-	IFT_A12MPPSWITCH                  = 0x82
-	IFT_AAL2                          = 0xbb
-	IFT_AAL5                          = 0x31
-	IFT_ADSL                          = 0x5e
-	IFT_AFLANE8023                    = 0x3b
-	IFT_AFLANE8025                    = 0x3c
-	IFT_ARAP                          = 0x58
-	IFT_ARCNET                        = 0x23
-	IFT_ARCNETPLUS                    = 0x24
-	IFT_ASYNC                         = 0x54
-	IFT_ATM                           = 0x25
-	IFT_ATMDXI                        = 0x69
-	IFT_ATMFUNI                       = 0x6a
-	IFT_ATMIMA                        = 0x6b
-	IFT_ATMLOGICAL                    = 0x50
-	IFT_ATMRADIO                      = 0xbd
-	IFT_ATMSUBINTERFACE               = 0x86
-	IFT_ATMVCIENDPT                   = 0xc2
-	IFT_ATMVIRTUAL                    = 0x95
-	IFT_BGPPOLICYACCOUNTING           = 0xa2
-	IFT_BRIDGE                        = 0xd1
-	IFT_BSC                           = 0x53
-	IFT_CARP                          = 0xf8
-	IFT_CCTEMUL                       = 0x3d
-	IFT_CEPT                          = 0x13
-	IFT_CES                           = 0x85
-	IFT_CHANNEL                       = 0x46
-	IFT_CNR                           = 0x55
-	IFT_COFFEE                        = 0x84
-	IFT_COMPOSITELINK                 = 0x9b
-	IFT_DCN                           = 0x8d
-	IFT_DIGITALPOWERLINE              = 0x8a
-	IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
-	IFT_DLSW                          = 0x4a
-	IFT_DOCSCABLEDOWNSTREAM           = 0x80
-	IFT_DOCSCABLEMACLAYER             = 0x7f
-	IFT_DOCSCABLEUPSTREAM             = 0x81
-	IFT_DS0                           = 0x51
-	IFT_DS0BUNDLE                     = 0x52
-	IFT_DS1FDL                        = 0xaa
-	IFT_DS3                           = 0x1e
-	IFT_DTM                           = 0x8c
-	IFT_DVBASILN                      = 0xac
-	IFT_DVBASIOUT                     = 0xad
-	IFT_DVBRCCDOWNSTREAM              = 0x93
-	IFT_DVBRCCMACLAYER                = 0x92
-	IFT_DVBRCCUPSTREAM                = 0x94
-	IFT_ENC                           = 0xf4
-	IFT_EON                           = 0x19
-	IFT_EPLRS                         = 0x57
-	IFT_ESCON                         = 0x49
-	IFT_ETHER                         = 0x6
-	IFT_FAITH                         = 0xf2
-	IFT_FAST                          = 0x7d
-	IFT_FASTETHER                     = 0x3e
-	IFT_FASTETHERFX                   = 0x45
-	IFT_FDDI                          = 0xf
-	IFT_FIBRECHANNEL                  = 0x38
-	IFT_FRAMERELAYINTERCONNECT        = 0x3a
-	IFT_FRAMERELAYMPI                 = 0x5c
-	IFT_FRDLCIENDPT                   = 0xc1
-	IFT_FRELAY                        = 0x20
-	IFT_FRELAYDCE                     = 0x2c
-	IFT_FRF16MFRBUNDLE                = 0xa3
-	IFT_FRFORWARD                     = 0x9e
-	IFT_G703AT2MB                     = 0x43
-	IFT_G703AT64K                     = 0x42
-	IFT_GIF                           = 0xf0
-	IFT_GIGABITETHERNET               = 0x75
-	IFT_GR303IDT                      = 0xb2
-	IFT_GR303RDT                      = 0xb1
-	IFT_H323GATEKEEPER                = 0xa4
-	IFT_H323PROXY                     = 0xa5
-	IFT_HDH1822                       = 0x3
-	IFT_HDLC                          = 0x76
-	IFT_HDSL2                         = 0xa8
-	IFT_HIPERLAN2                     = 0xb7
-	IFT_HIPPI                         = 0x2f
-	IFT_HIPPIINTERFACE                = 0x39
-	IFT_HOSTPAD                       = 0x5a
-	IFT_HSSI                          = 0x2e
-	IFT_HY                            = 0xe
-	IFT_IBM370PARCHAN                 = 0x48
-	IFT_IDSL                          = 0x9a
-	IFT_IEEE1394                      = 0x90
-	IFT_IEEE80211                     = 0x47
-	IFT_IEEE80212                     = 0x37
-	IFT_IEEE8023ADLAG                 = 0xa1
-	IFT_IFGSN                         = 0x91
-	IFT_IMT                           = 0xbe
-	IFT_INFINIBAND                    = 0xc7
-	IFT_INTERLEAVE                    = 0x7c
-	IFT_IP                            = 0x7e
-	IFT_IPFORWARD                     = 0x8e
-	IFT_IPOVERATM                     = 0x72
-	IFT_IPOVERCDLC                    = 0x6d
-	IFT_IPOVERCLAW                    = 0x6e
-	IFT_IPSWITCH                      = 0x4e
-	IFT_IPXIP                         = 0xf9
-	IFT_ISDN                          = 0x3f
-	IFT_ISDNBASIC                     = 0x14
-	IFT_ISDNPRIMARY                   = 0x15
-	IFT_ISDNS                         = 0x4b
-	IFT_ISDNU                         = 0x4c
-	IFT_ISO88022LLC                   = 0x29
-	IFT_ISO88023                      = 0x7
-	IFT_ISO88024                      = 0x8
-	IFT_ISO88025                      = 0x9
-	IFT_ISO88025CRFPINT               = 0x62
-	IFT_ISO88025DTR                   = 0x56
-	IFT_ISO88025FIBER                 = 0x73
-	IFT_ISO88026                      = 0xa
-	IFT_ISUP                          = 0xb3
-	IFT_L2VLAN                        = 0x87
-	IFT_L3IPVLAN                      = 0x88
-	IFT_L3IPXVLAN                     = 0x89
-	IFT_LAPB                          = 0x10
-	IFT_LAPD                          = 0x4d
-	IFT_LAPF                          = 0x77
-	IFT_LOCALTALK                     = 0x2a
-	IFT_LOOP                          = 0x18
-	IFT_MEDIAMAILOVERIP               = 0x8b
-	IFT_MFSIGLINK                     = 0xa7
-	IFT_MIOX25                        = 0x26
-	IFT_MODEM                         = 0x30
-	IFT_MPC                           = 0x71
-	IFT_MPLS                          = 0xa6
-	IFT_MPLSTUNNEL                    = 0x96
-	IFT_MSDSL                         = 0x8f
-	IFT_MVL                           = 0xbf
-	IFT_MYRINET                       = 0x63
-	IFT_NFAS                          = 0xaf
-	IFT_NSIP                          = 0x1b
-	IFT_OPTICALCHANNEL                = 0xc3
-	IFT_OPTICALTRANSPORT              = 0xc4
-	IFT_OTHER                         = 0x1
-	IFT_P10                           = 0xc
-	IFT_P80                           = 0xd
-	IFT_PARA                          = 0x22
-	IFT_PFLOG                         = 0xf6
-	IFT_PFSYNC                        = 0xf7
-	IFT_PLC                           = 0xae
-	IFT_POS                           = 0xab
-	IFT_PPP                           = 0x17
-	IFT_PPPMULTILINKBUNDLE            = 0x6c
-	IFT_PROPBWAP2MP                   = 0xb8
-	IFT_PROPCNLS                      = 0x59
-	IFT_PROPDOCSWIRELESSDOWNSTREAM    = 0xb5
-	IFT_PROPDOCSWIRELESSMACLAYER      = 0xb4
-	IFT_PROPDOCSWIRELESSUPSTREAM      = 0xb6
-	IFT_PROPMUX                       = 0x36
-	IFT_PROPVIRTUAL                   = 0x35
-	IFT_PROPWIRELESSP2P               = 0x9d
-	IFT_PTPSERIAL                     = 0x16
-	IFT_PVC                           = 0xf1
-	IFT_QLLC                          = 0x44
-	IFT_RADIOMAC                      = 0xbc
-	IFT_RADSL                         = 0x5f
-	IFT_REACHDSL                      = 0xc0
-	IFT_RFC1483                       = 0x9f
-	IFT_RS232                         = 0x21
-	IFT_RSRB                          = 0x4f
-	IFT_SDLC                          = 0x11
-	IFT_SDSL                          = 0x60
-	IFT_SHDSL                         = 0xa9
-	IFT_SIP                           = 0x1f
-	IFT_SLIP                          = 0x1c
-	IFT_SMDSDXI                       = 0x2b
-	IFT_SMDSICIP                      = 0x34
-	IFT_SONET                         = 0x27
-	IFT_SONETOVERHEADCHANNEL          = 0xb9
-	IFT_SONETPATH                     = 0x32
-	IFT_SONETVT                       = 0x33
-	IFT_SRP                           = 0x97
-	IFT_SS7SIGLINK                    = 0x9c
-	IFT_STACKTOSTACK                  = 0x6f
-	IFT_STARLAN                       = 0xb
-	IFT_STF                           = 0xd7
-	IFT_T1                            = 0x12
-	IFT_TDLC                          = 0x74
-	IFT_TERMPAD                       = 0x5b
-	IFT_TR008                         = 0xb0
-	IFT_TRANSPHDLC                    = 0x7b
-	IFT_TUNNEL                        = 0x83
-	IFT_ULTRA                         = 0x1d
-	IFT_USB                           = 0xa0
-	IFT_V11                           = 0x40
-	IFT_V35                           = 0x2d
-	IFT_V36                           = 0x41
-	IFT_V37                           = 0x78
-	IFT_VDSL                          = 0x61
-	IFT_VIRTUALIPADDRESS              = 0x70
-	IFT_VOICEEM                       = 0x64
-	IFT_VOICEENCAP                    = 0x67
-	IFT_VOICEFXO                      = 0x65
-	IFT_VOICEFXS                      = 0x66
-	IFT_VOICEOVERATM                  = 0x98
-	IFT_VOICEOVERFRAMERELAY           = 0x99
-	IFT_VOICEOVERIP                   = 0x68
-	IFT_X213                          = 0x5d
-	IFT_X25                           = 0x5
-	IFT_X25DDN                        = 0x4
-	IFT_X25HUNTGROUP                  = 0x7a
-	IFT_X25MLP                        = 0x79
-	IFT_X25PLE                        = 0x28
-	IFT_XETHER                        = 0x1a
-	IGNBRK                            = 0x1
-	IGNCR                             = 0x80
-	IGNPAR                            = 0x4
-	IMAXBEL                           = 0x2000
-	INLCR                             = 0x40
-	INPCK                             = 0x10
-	IN_CLASSA_HOST                    = 0xffffff
-	IN_CLASSA_MAX                     = 0x80
-	IN_CLASSA_NET                     = 0xff000000
-	IN_CLASSA_NSHIFT                  = 0x18
-	IN_CLASSB_HOST                    = 0xffff
-	IN_CLASSB_MAX                     = 0x10000
-	IN_CLASSB_NET                     = 0xffff0000
-	IN_CLASSB_NSHIFT                  = 0x10
-	IN_CLASSC_HOST                    = 0xff
-	IN_CLASSC_NET                     = 0xffffff00
-	IN_CLASSC_NSHIFT                  = 0x8
-	IN_CLASSD_HOST                    = 0xfffffff
-	IN_CLASSD_NET                     = 0xf0000000
-	IN_CLASSD_NSHIFT                  = 0x1c
-	IN_LOOPBACKNET                    = 0x7f
-	IN_RFC3021_MASK                   = 0xfffffffe
-	IPPROTO_3PC                       = 0x22
-	IPPROTO_ADFS                      = 0x44
-	IPPROTO_AH                        = 0x33
-	IPPROTO_AHIP                      = 0x3d
-	IPPROTO_APES                      = 0x63
-	IPPROTO_ARGUS                     = 0xd
-	IPPROTO_AX25                      = 0x5d
-	IPPROTO_BHA                       = 0x31
-	IPPROTO_BLT                       = 0x1e
-	IPPROTO_BRSATMON                  = 0x4c
-	IPPROTO_CARP                      = 0x70
-	IPPROTO_CFTP                      = 0x3e
-	IPPROTO_CHAOS                     = 0x10
-	IPPROTO_CMTP                      = 0x26
-	IPPROTO_CPHB                      = 0x49
-	IPPROTO_CPNX                      = 0x48
-	IPPROTO_DDP                       = 0x25
-	IPPROTO_DGP                       = 0x56
-	IPPROTO_DIVERT                    = 0x102
-	IPPROTO_DONE                      = 0x101
-	IPPROTO_DSTOPTS                   = 0x3c
-	IPPROTO_EGP                       = 0x8
-	IPPROTO_EMCON                     = 0xe
-	IPPROTO_ENCAP                     = 0x62
-	IPPROTO_EON                       = 0x50
-	IPPROTO_ESP                       = 0x32
-	IPPROTO_ETHERIP                   = 0x61
-	IPPROTO_FRAGMENT                  = 0x2c
-	IPPROTO_GGP                       = 0x3
-	IPPROTO_GMTP                      = 0x64
-	IPPROTO_GRE                       = 0x2f
-	IPPROTO_HELLO                     = 0x3f
-	IPPROTO_HIP                       = 0x8b
-	IPPROTO_HMP                       = 0x14
-	IPPROTO_HOPOPTS                   = 0x0
-	IPPROTO_ICMP                      = 0x1
-	IPPROTO_ICMPV6                    = 0x3a
-	IPPROTO_IDP                       = 0x16
-	IPPROTO_IDPR                      = 0x23
-	IPPROTO_IDRP                      = 0x2d
-	IPPROTO_IGMP                      = 0x2
-	IPPROTO_IGP                       = 0x55
-	IPPROTO_IGRP                      = 0x58
-	IPPROTO_IL                        = 0x28
-	IPPROTO_INLSP                     = 0x34
-	IPPROTO_INP                       = 0x20
-	IPPROTO_IP                        = 0x0
-	IPPROTO_IPCOMP                    = 0x6c
-	IPPROTO_IPCV                      = 0x47
-	IPPROTO_IPEIP                     = 0x5e
-	IPPROTO_IPIP                      = 0x4
-	IPPROTO_IPPC                      = 0x43
-	IPPROTO_IPV4                      = 0x4
-	IPPROTO_IPV6                      = 0x29
-	IPPROTO_IRTP                      = 0x1c
-	IPPROTO_KRYPTOLAN                 = 0x41
-	IPPROTO_LARP                      = 0x5b
-	IPPROTO_LEAF1                     = 0x19
-	IPPROTO_LEAF2                     = 0x1a
-	IPPROTO_MAX                       = 0x100
-	IPPROTO_MAXID                     = 0x34
-	IPPROTO_MEAS                      = 0x13
-	IPPROTO_MH                        = 0x87
-	IPPROTO_MHRP                      = 0x30
-	IPPROTO_MICP                      = 0x5f
-	IPPROTO_MOBILE                    = 0x37
-	IPPROTO_MPLS                      = 0x89
-	IPPROTO_MTP                       = 0x5c
-	IPPROTO_MUX                       = 0x12
-	IPPROTO_ND                        = 0x4d
-	IPPROTO_NHRP                      = 0x36
-	IPPROTO_NONE                      = 0x3b
-	IPPROTO_NSP                       = 0x1f
-	IPPROTO_NVPII                     = 0xb
-	IPPROTO_OLD_DIVERT                = 0xfe
-	IPPROTO_OSPFIGP                   = 0x59
-	IPPROTO_PFSYNC                    = 0xf0
-	IPPROTO_PGM                       = 0x71
-	IPPROTO_PIGP                      = 0x9
-	IPPROTO_PIM                       = 0x67
-	IPPROTO_PRM                       = 0x15
-	IPPROTO_PUP                       = 0xc
-	IPPROTO_PVP                       = 0x4b
-	IPPROTO_RAW                       = 0xff
-	IPPROTO_RCCMON                    = 0xa
-	IPPROTO_RDP                       = 0x1b
-	IPPROTO_RESERVED_253              = 0xfd
-	IPPROTO_RESERVED_254              = 0xfe
-	IPPROTO_ROUTING                   = 0x2b
-	IPPROTO_RSVP                      = 0x2e
-	IPPROTO_RVD                       = 0x42
-	IPPROTO_SATEXPAK                  = 0x40
-	IPPROTO_SATMON                    = 0x45
-	IPPROTO_SCCSP                     = 0x60
-	IPPROTO_SCTP                      = 0x84
-	IPPROTO_SDRP                      = 0x2a
-	IPPROTO_SEND                      = 0x103
-	IPPROTO_SEP                       = 0x21
-	IPPROTO_SHIM6                     = 0x8c
-	IPPROTO_SKIP                      = 0x39
-	IPPROTO_SPACER                    = 0x7fff
-	IPPROTO_SRPC                      = 0x5a
-	IPPROTO_ST                        = 0x7
-	IPPROTO_SVMTP                     = 0x52
-	IPPROTO_SWIPE                     = 0x35
-	IPPROTO_TCF                       = 0x57
-	IPPROTO_TCP                       = 0x6
-	IPPROTO_TLSP                      = 0x38
-	IPPROTO_TP                        = 0x1d
-	IPPROTO_TPXX                      = 0x27
-	IPPROTO_TRUNK1                    = 0x17
-	IPPROTO_TRUNK2                    = 0x18
-	IPPROTO_TTP                       = 0x54
-	IPPROTO_UDP                       = 0x11
-	IPPROTO_UDPLITE                   = 0x88
-	IPPROTO_VINES                     = 0x53
-	IPPROTO_VISA                      = 0x46
-	IPPROTO_VMTP                      = 0x51
-	IPPROTO_WBEXPAK                   = 0x4f
-	IPPROTO_WBMON                     = 0x4e
-	IPPROTO_WSN                       = 0x4a
-	IPPROTO_XNET                      = 0xf
-	IPPROTO_XTP                       = 0x24
-	IPV6_AUTOFLOWLABEL                = 0x3b
-	IPV6_BINDANY                      = 0x40
-	IPV6_BINDV6ONLY                   = 0x1b
-	IPV6_CHECKSUM                     = 0x1a
-	IPV6_DEFAULT_MULTICAST_HOPS       = 0x1
-	IPV6_DEFAULT_MULTICAST_LOOP       = 0x1
-	IPV6_DEFHLIM                      = 0x40
-	IPV6_DONTFRAG                     = 0x3e
-	IPV6_DSTOPTS                      = 0x32
-	IPV6_FAITH                        = 0x1d
-	IPV6_FLOWINFO_MASK                = 0xffffff0f
-	IPV6_FLOWLABEL_MASK               = 0xffff0f00
-	IPV6_FRAGTTL                      = 0x78
-	IPV6_FW_ADD                       = 0x1e
-	IPV6_FW_DEL                       = 0x1f
-	IPV6_FW_FLUSH                     = 0x20
-	IPV6_FW_GET                       = 0x22
-	IPV6_FW_ZERO                      = 0x21
-	IPV6_HLIMDEC                      = 0x1
-	IPV6_HOPLIMIT                     = 0x2f
-	IPV6_HOPOPTS                      = 0x31
-	IPV6_IPSEC_POLICY                 = 0x1c
-	IPV6_JOIN_GROUP                   = 0xc
-	IPV6_LEAVE_GROUP                  = 0xd
-	IPV6_MAXHLIM                      = 0xff
-	IPV6_MAXOPTHDR                    = 0x800
-	IPV6_MAXPACKET                    = 0xffff
-	IPV6_MAX_GROUP_SRC_FILTER         = 0x200
-	IPV6_MAX_MEMBERSHIPS              = 0xfff
-	IPV6_MAX_SOCK_SRC_FILTER          = 0x80
-	IPV6_MIN_MEMBERSHIPS              = 0x1f
-	IPV6_MMTU                         = 0x500
-	IPV6_MSFILTER                     = 0x4a
-	IPV6_MULTICAST_HOPS               = 0xa
-	IPV6_MULTICAST_IF                 = 0x9
-	IPV6_MULTICAST_LOOP               = 0xb
-	IPV6_NEXTHOP                      = 0x30
-	IPV6_PATHMTU                      = 0x2c
-	IPV6_PKTINFO                      = 0x2e
-	IPV6_PORTRANGE                    = 0xe
-	IPV6_PORTRANGE_DEFAULT            = 0x0
-	IPV6_PORTRANGE_HIGH               = 0x1
-	IPV6_PORTRANGE_LOW                = 0x2
-	IPV6_PREFER_TEMPADDR              = 0x3f
-	IPV6_RECVDSTOPTS                  = 0x28
-	IPV6_RECVHOPLIMIT                 = 0x25
-	IPV6_RECVHOPOPTS                  = 0x27
-	IPV6_RECVPATHMTU                  = 0x2b
-	IPV6_RECVPKTINFO                  = 0x24
-	IPV6_RECVRTHDR                    = 0x26
-	IPV6_RECVTCLASS                   = 0x39
-	IPV6_RTHDR                        = 0x33
-	IPV6_RTHDRDSTOPTS                 = 0x23
-	IPV6_RTHDR_LOOSE                  = 0x0
-	IPV6_RTHDR_STRICT                 = 0x1
-	IPV6_RTHDR_TYPE_0                 = 0x0
-	IPV6_SOCKOPT_RESERVED1            = 0x3
-	IPV6_TCLASS                       = 0x3d
-	IPV6_UNICAST_HOPS                 = 0x4
-	IPV6_USE_MIN_MTU                  = 0x2a
-	IPV6_V6ONLY                       = 0x1b
-	IPV6_VERSION                      = 0x60
-	IPV6_VERSION_MASK                 = 0xf0
-	IP_ADD_MEMBERSHIP                 = 0xc
-	IP_ADD_SOURCE_MEMBERSHIP          = 0x46
-	IP_BINDANY                        = 0x18
-	IP_BLOCK_SOURCE                   = 0x48
-	IP_DEFAULT_MULTICAST_LOOP         = 0x1
-	IP_DEFAULT_MULTICAST_TTL          = 0x1
-	IP_DF                             = 0x4000
-	IP_DONTFRAG                       = 0x43
-	IP_DROP_MEMBERSHIP                = 0xd
-	IP_DROP_SOURCE_MEMBERSHIP         = 0x47
-	IP_DUMMYNET3                      = 0x31
-	IP_DUMMYNET_CONFIGURE             = 0x3c
-	IP_DUMMYNET_DEL                   = 0x3d
-	IP_DUMMYNET_FLUSH                 = 0x3e
-	IP_DUMMYNET_GET                   = 0x40
-	IP_FAITH                          = 0x16
-	IP_FW3                            = 0x30
-	IP_FW_ADD                         = 0x32
-	IP_FW_DEL                         = 0x33
-	IP_FW_FLUSH                       = 0x34
-	IP_FW_GET                         = 0x36
-	IP_FW_NAT_CFG                     = 0x38
-	IP_FW_NAT_DEL                     = 0x39
-	IP_FW_NAT_GET_CONFIG              = 0x3a
-	IP_FW_NAT_GET_LOG                 = 0x3b
-	IP_FW_RESETLOG                    = 0x37
-	IP_FW_TABLE_ADD                   = 0x28
-	IP_FW_TABLE_DEL                   = 0x29
-	IP_FW_TABLE_FLUSH                 = 0x2a
-	IP_FW_TABLE_GETSIZE               = 0x2b
-	IP_FW_TABLE_LIST                  = 0x2c
-	IP_FW_ZERO                        = 0x35
-	IP_HDRINCL                        = 0x2
-	IP_IPSEC_POLICY                   = 0x15
-	IP_MAXPACKET                      = 0xffff
-	IP_MAX_GROUP_SRC_FILTER           = 0x200
-	IP_MAX_MEMBERSHIPS                = 0xfff
-	IP_MAX_SOCK_MUTE_FILTER           = 0x80
-	IP_MAX_SOCK_SRC_FILTER            = 0x80
-	IP_MAX_SOURCE_FILTER              = 0x400
-	IP_MF                             = 0x2000
-	IP_MINTTL                         = 0x42
-	IP_MIN_MEMBERSHIPS                = 0x1f
-	IP_MSFILTER                       = 0x4a
-	IP_MSS                            = 0x240
-	IP_MULTICAST_IF                   = 0x9
-	IP_MULTICAST_LOOP                 = 0xb
-	IP_MULTICAST_TTL                  = 0xa
-	IP_MULTICAST_VIF                  = 0xe
-	IP_OFFMASK                        = 0x1fff
-	IP_ONESBCAST                      = 0x17
-	IP_OPTIONS                        = 0x1
-	IP_PORTRANGE                      = 0x13
-	IP_PORTRANGE_DEFAULT              = 0x0
-	IP_PORTRANGE_HIGH                 = 0x1
-	IP_PORTRANGE_LOW                  = 0x2
-	IP_RECVDSTADDR                    = 0x7
-	IP_RECVIF                         = 0x14
-	IP_RECVOPTS                       = 0x5
-	IP_RECVRETOPTS                    = 0x6
-	IP_RECVTOS                        = 0x44
-	IP_RECVTTL                        = 0x41
-	IP_RETOPTS                        = 0x8
-	IP_RF                             = 0x8000
-	IP_RSVP_OFF                       = 0x10
-	IP_RSVP_ON                        = 0xf
-	IP_RSVP_VIF_OFF                   = 0x12
-	IP_RSVP_VIF_ON                    = 0x11
-	IP_SENDSRCADDR                    = 0x7
-	IP_TOS                            = 0x3
-	IP_TTL                            = 0x4
-	IP_UNBLOCK_SOURCE                 = 0x49
-	ISIG                              = 0x80
-	ISTRIP                            = 0x20
-	IXANY                             = 0x800
-	IXOFF                             = 0x400
-	IXON                              = 0x200
-	LOCK_EX                           = 0x2
-	LOCK_NB                           = 0x4
-	LOCK_SH                           = 0x1
-	LOCK_UN                           = 0x8
-	MADV_AUTOSYNC                     = 0x7
-	MADV_CORE                         = 0x9
-	MADV_DONTNEED                     = 0x4
-	MADV_FREE                         = 0x5
-	MADV_NOCORE                       = 0x8
-	MADV_NORMAL                       = 0x0
-	MADV_NOSYNC                       = 0x6
-	MADV_PROTECT                      = 0xa
-	MADV_RANDOM                       = 0x1
-	MADV_SEQUENTIAL                   = 0x2
-	MADV_WILLNEED                     = 0x3
-	MAP_32BIT                         = 0x80000
-	MAP_ALIGNED_SUPER                 = 0x1000000
-	MAP_ALIGNMENT_MASK                = -0x1000000
-	MAP_ALIGNMENT_SHIFT               = 0x18
-	MAP_ANON                          = 0x1000
-	MAP_ANONYMOUS                     = 0x1000
-	MAP_COPY                          = 0x2
-	MAP_EXCL                          = 0x4000
-	MAP_FILE                          = 0x0
-	MAP_FIXED                         = 0x10
-	MAP_HASSEMAPHORE                  = 0x200
-	MAP_NOCORE                        = 0x20000
-	MAP_NORESERVE                     = 0x40
-	MAP_NOSYNC                        = 0x800
-	MAP_PREFAULT_READ                 = 0x40000
-	MAP_PRIVATE                       = 0x2
-	MAP_RENAME                        = 0x20
-	MAP_RESERVED0080                  = 0x80
-	MAP_RESERVED0100                  = 0x100
-	MAP_SHARED                        = 0x1
-	MAP_STACK                         = 0x400
-	MCL_CURRENT                       = 0x1
-	MCL_FUTURE                        = 0x2
-	MSG_CMSG_CLOEXEC                  = 0x40000
-	MSG_COMPAT                        = 0x8000
-	MSG_CTRUNC                        = 0x20
-	MSG_DONTROUTE                     = 0x4
-	MSG_DONTWAIT                      = 0x80
-	MSG_EOF                           = 0x100
-	MSG_EOR                           = 0x8
-	MSG_NBIO                          = 0x4000
-	MSG_NOSIGNAL                      = 0x20000
-	MSG_NOTIFICATION                  = 0x2000
-	MSG_OOB                           = 0x1
-	MSG_PEEK                          = 0x2
-	MSG_TRUNC                         = 0x10
-	MSG_WAITALL                       = 0x40
-	MS_ASYNC                          = 0x1
-	MS_INVALIDATE                     = 0x2
-	MS_SYNC                           = 0x0
-	NAME_MAX                          = 0xff
-	NET_RT_DUMP                       = 0x1
-	NET_RT_FLAGS                      = 0x2
-	NET_RT_IFLIST                     = 0x3
-	NET_RT_IFLISTL                    = 0x5
-	NET_RT_IFMALIST                   = 0x4
-	NET_RT_MAXID                      = 0x6
-	NOFLSH                            = 0x80000000
-	NOTE_ATTRIB                       = 0x8
-	NOTE_CHILD                        = 0x4
-	NOTE_DELETE                       = 0x1
-	NOTE_EXEC                         = 0x20000000
-	NOTE_EXIT                         = 0x80000000
-	NOTE_EXTEND                       = 0x4
-	NOTE_FFAND                        = 0x40000000
-	NOTE_FFCOPY                       = 0xc0000000
-	NOTE_FFCTRLMASK                   = 0xc0000000
-	NOTE_FFLAGSMASK                   = 0xffffff
-	NOTE_FFNOP                        = 0x0
-	NOTE_FFOR                         = 0x80000000
-	NOTE_FORK                         = 0x40000000
-	NOTE_LINK                         = 0x10
-	NOTE_LOWAT                        = 0x1
-	NOTE_MSECONDS                     = 0x2
-	NOTE_NSECONDS                     = 0x8
-	NOTE_PCTRLMASK                    = 0xf0000000
-	NOTE_PDATAMASK                    = 0xfffff
-	NOTE_RENAME                       = 0x20
-	NOTE_REVOKE                       = 0x40
-	NOTE_SECONDS                      = 0x1
-	NOTE_TRACK                        = 0x1
-	NOTE_TRACKERR                     = 0x2
-	NOTE_TRIGGER                      = 0x1000000
-	NOTE_USECONDS                     = 0x4
-	NOTE_WRITE                        = 0x2
-	OCRNL                             = 0x10
-	ONLCR                             = 0x2
-	ONLRET                            = 0x40
-	ONOCR                             = 0x20
-	ONOEOT                            = 0x8
-	OPOST                             = 0x1
-	O_ACCMODE                         = 0x3
-	O_APPEND                          = 0x8
-	O_ASYNC                           = 0x40
-	O_CLOEXEC                         = 0x100000
-	O_CREAT                           = 0x200
-	O_DIRECT                          = 0x10000
-	O_DIRECTORY                       = 0x20000
-	O_EXCL                            = 0x800
-	O_EXEC                            = 0x40000
-	O_EXLOCK                          = 0x20
-	O_FSYNC                           = 0x80
-	O_NDELAY                          = 0x4
-	O_NOCTTY                          = 0x8000
-	O_NOFOLLOW                        = 0x100
-	O_NONBLOCK                        = 0x4
-	O_RDONLY                          = 0x0
-	O_RDWR                            = 0x2
-	O_SHLOCK                          = 0x10
-	O_SYNC                            = 0x80
-	O_TRUNC                           = 0x400
-	O_TTY_INIT                        = 0x80000
-	O_WRONLY                          = 0x1
-	PARENB                            = 0x1000
-	PARMRK                            = 0x8
-	PARODD                            = 0x2000
-	PENDIN                            = 0x20000000
-	PRIO_PGRP                         = 0x1
-	PRIO_PROCESS                      = 0x0
-	PRIO_USER                         = 0x2
-	PROT_EXEC                         = 0x4
-	PROT_NONE                         = 0x0
-	PROT_READ                         = 0x1
-	PROT_WRITE                        = 0x2
-	RLIMIT_AS                         = 0xa
-	RLIMIT_CORE                       = 0x4
-	RLIMIT_CPU                        = 0x0
-	RLIMIT_DATA                       = 0x2
-	RLIMIT_FSIZE                      = 0x1
-	RLIMIT_NOFILE                     = 0x8
-	RLIMIT_STACK                      = 0x3
-	RLIM_INFINITY                     = 0x7fffffffffffffff
-	RTAX_AUTHOR                       = 0x6
-	RTAX_BRD                          = 0x7
-	RTAX_DST                          = 0x0
-	RTAX_GATEWAY                      = 0x1
-	RTAX_GENMASK                      = 0x3
-	RTAX_IFA                          = 0x5
-	RTAX_IFP                          = 0x4
-	RTAX_MAX                          = 0x8
-	RTAX_NETMASK                      = 0x2
-	RTA_AUTHOR                        = 0x40
-	RTA_BRD                           = 0x80
-	RTA_DST                           = 0x1
-	RTA_GATEWAY                       = 0x2
-	RTA_GENMASK                       = 0x8
-	RTA_IFA                           = 0x20
-	RTA_IFP                           = 0x10
-	RTA_NETMASK                       = 0x4
-	RTF_BLACKHOLE                     = 0x1000
-	RTF_BROADCAST                     = 0x400000
-	RTF_DONE                          = 0x40
-	RTF_DYNAMIC                       = 0x10
-	RTF_FMASK                         = 0x1004d808
-	RTF_GATEWAY                       = 0x2
-	RTF_GWFLAG_COMPAT                 = 0x80000000
-	RTF_HOST                          = 0x4
-	RTF_LLDATA                        = 0x400
-	RTF_LLINFO                        = 0x400
-	RTF_LOCAL                         = 0x200000
-	RTF_MODIFIED                      = 0x20
-	RTF_MULTICAST                     = 0x800000
-	RTF_PINNED                        = 0x100000
-	RTF_PRCLONING                     = 0x10000
-	RTF_PROTO1                        = 0x8000
-	RTF_PROTO2                        = 0x4000
-	RTF_PROTO3                        = 0x40000
-	RTF_REJECT                        = 0x8
-	RTF_RNH_LOCKED                    = 0x40000000
-	RTF_STATIC                        = 0x800
-	RTF_STICKY                        = 0x10000000
-	RTF_UP                            = 0x1
-	RTF_XRESOLVE                      = 0x200
-	RTM_ADD                           = 0x1
-	RTM_CHANGE                        = 0x3
-	RTM_DELADDR                       = 0xd
-	RTM_DELETE                        = 0x2
-	RTM_DELMADDR                      = 0x10
-	RTM_GET                           = 0x4
-	RTM_IEEE80211                     = 0x12
-	RTM_IFANNOUNCE                    = 0x11
-	RTM_IFINFO                        = 0xe
-	RTM_LOCK                          = 0x8
-	RTM_LOSING                        = 0x5
-	RTM_MISS                          = 0x7
-	RTM_NEWADDR                       = 0xc
-	RTM_NEWMADDR                      = 0xf
-	RTM_OLDADD                        = 0x9
-	RTM_OLDDEL                        = 0xa
-	RTM_REDIRECT                      = 0x6
-	RTM_RESOLVE                       = 0xb
-	RTM_RTTUNIT                       = 0xf4240
-	RTM_VERSION                       = 0x5
-	RTV_EXPIRE                        = 0x4
-	RTV_HOPCOUNT                      = 0x2
-	RTV_MTU                           = 0x1
-	RTV_RPIPE                         = 0x8
-	RTV_RTT                           = 0x40
-	RTV_RTTVAR                        = 0x80
-	RTV_SPIPE                         = 0x10
-	RTV_SSTHRESH                      = 0x20
-	RTV_WEIGHT                        = 0x100
-	RT_ALL_FIBS                       = -0x1
-	RT_CACHING_CONTEXT                = 0x1
-	RT_DEFAULT_FIB                    = 0x0
-	RT_NORTREF                        = 0x2
-	RUSAGE_CHILDREN                   = -0x1
-	RUSAGE_SELF                       = 0x0
-	RUSAGE_THREAD                     = 0x1
-	SCM_BINTIME                       = 0x4
-	SCM_CREDS                         = 0x3
-	SCM_RIGHTS                        = 0x1
-	SCM_TIMESTAMP                     = 0x2
-	SHUT_RD                           = 0x0
-	SHUT_RDWR                         = 0x2
-	SHUT_WR                           = 0x1
-	SIOCADDMULTI                      = 0x80206931
-	SIOCADDRT                         = 0x8040720a
-	SIOCAIFADDR                       = 0x8040691a
-	SIOCAIFGROUP                      = 0x80286987
-	SIOCALIFADDR                      = 0x8118691b
-	SIOCATMARK                        = 0x40047307
-	SIOCDELMULTI                      = 0x80206932
-	SIOCDELRT                         = 0x8040720b
-	SIOCDIFADDR                       = 0x80206919
-	SIOCDIFGROUP                      = 0x80286989
-	SIOCDIFPHYADDR                    = 0x80206949
-	SIOCDLIFADDR                      = 0x8118691d
-	SIOCGDRVSPEC                      = 0xc028697b
-	SIOCGETSGCNT                      = 0xc0207210
-	SIOCGETVIFCNT                     = 0xc028720f
-	SIOCGHIWAT                        = 0x40047301
-	SIOCGIFADDR                       = 0xc0206921
-	SIOCGIFBRDADDR                    = 0xc0206923
-	SIOCGIFCAP                        = 0xc020691f
-	SIOCGIFCONF                       = 0xc0106924
-	SIOCGIFDESCR                      = 0xc020692a
-	SIOCGIFDSTADDR                    = 0xc0206922
-	SIOCGIFFIB                        = 0xc020695c
-	SIOCGIFFLAGS                      = 0xc0206911
-	SIOCGIFGENERIC                    = 0xc020693a
-	SIOCGIFGMEMB                      = 0xc028698a
-	SIOCGIFGROUP                      = 0xc0286988
-	SIOCGIFINDEX                      = 0xc0206920
-	SIOCGIFMAC                        = 0xc0206926
-	SIOCGIFMEDIA                      = 0xc0306938
-	SIOCGIFMETRIC                     = 0xc0206917
-	SIOCGIFMTU                        = 0xc0206933
-	SIOCGIFNETMASK                    = 0xc0206925
-	SIOCGIFPDSTADDR                   = 0xc0206948
-	SIOCGIFPHYS                       = 0xc0206935
-	SIOCGIFPSRCADDR                   = 0xc0206947
-	SIOCGIFSTATUS                     = 0xc331693b
-	SIOCGLIFADDR                      = 0xc118691c
-	SIOCGLIFPHYADDR                   = 0xc118694b
-	SIOCGLOWAT                        = 0x40047303
-	SIOCGPGRP                         = 0x40047309
-	SIOCGPRIVATE_0                    = 0xc0206950
-	SIOCGPRIVATE_1                    = 0xc0206951
-	SIOCIFCREATE                      = 0xc020697a
-	SIOCIFCREATE2                     = 0xc020697c
-	SIOCIFDESTROY                     = 0x80206979
-	SIOCIFGCLONERS                    = 0xc0106978
-	SIOCSDRVSPEC                      = 0x8028697b
-	SIOCSHIWAT                        = 0x80047300
-	SIOCSIFADDR                       = 0x8020690c
-	SIOCSIFBRDADDR                    = 0x80206913
-	SIOCSIFCAP                        = 0x8020691e
-	SIOCSIFDESCR                      = 0x80206929
-	SIOCSIFDSTADDR                    = 0x8020690e
-	SIOCSIFFIB                        = 0x8020695d
-	SIOCSIFFLAGS                      = 0x80206910
-	SIOCSIFGENERIC                    = 0x80206939
-	SIOCSIFLLADDR                     = 0x8020693c
-	SIOCSIFMAC                        = 0x80206927
-	SIOCSIFMEDIA                      = 0xc0206937
-	SIOCSIFMETRIC                     = 0x80206918
-	SIOCSIFMTU                        = 0x80206934
-	SIOCSIFNAME                       = 0x80206928
-	SIOCSIFNETMASK                    = 0x80206916
-	SIOCSIFPHYADDR                    = 0x80406946
-	SIOCSIFPHYS                       = 0x80206936
-	SIOCSIFRVNET                      = 0xc020695b
-	SIOCSIFVNET                       = 0xc020695a
-	SIOCSLIFPHYADDR                   = 0x8118694a
-	SIOCSLOWAT                        = 0x80047302
-	SIOCSPGRP                         = 0x80047308
-	SOCK_CLOEXEC                      = 0x10000000
-	SOCK_DGRAM                        = 0x2
-	SOCK_MAXADDRLEN                   = 0xff
-	SOCK_NONBLOCK                     = 0x20000000
-	SOCK_RAW                          = 0x3
-	SOCK_RDM                          = 0x4
-	SOCK_SEQPACKET                    = 0x5
-	SOCK_STREAM                       = 0x1
-	SOL_SOCKET                        = 0xffff
-	SOMAXCONN                         = 0x80
-	SO_ACCEPTCONN                     = 0x2
-	SO_ACCEPTFILTER                   = 0x1000
-	SO_BINTIME                        = 0x2000
-	SO_BROADCAST                      = 0x20
-	SO_DEBUG                          = 0x1
-	SO_DONTROUTE                      = 0x10
-	SO_ERROR                          = 0x1007
-	SO_KEEPALIVE                      = 0x8
-	SO_LABEL                          = 0x1009
-	SO_LINGER                         = 0x80
-	SO_LISTENINCQLEN                  = 0x1013
-	SO_LISTENQLEN                     = 0x1012
-	SO_LISTENQLIMIT                   = 0x1011
-	SO_NOSIGPIPE                      = 0x800
-	SO_NO_DDP                         = 0x8000
-	SO_NO_OFFLOAD                     = 0x4000
-	SO_OOBINLINE                      = 0x100
-	SO_PEERLABEL                      = 0x1010
-	SO_PROTOCOL                       = 0x1016
-	SO_PROTOTYPE                      = 0x1016
-	SO_RCVBUF                         = 0x1002
-	SO_RCVLOWAT                       = 0x1004
-	SO_RCVTIMEO                       = 0x1006
-	SO_REUSEADDR                      = 0x4
-	SO_REUSEPORT                      = 0x200
-	SO_SETFIB                         = 0x1014
-	SO_SNDBUF                         = 0x1001
-	SO_SNDLOWAT                       = 0x1003
-	SO_SNDTIMEO                       = 0x1005
-	SO_TIMESTAMP                      = 0x400
-	SO_TYPE                           = 0x1008
-	SO_USELOOPBACK                    = 0x40
-	SO_USER_COOKIE                    = 0x1015
-	SO_VENDOR                         = 0x80000000
-	TCIFLUSH                          = 0x1
-	TCIOFLUSH                         = 0x3
-	TCOFLUSH                          = 0x2
-	TCP_CA_NAME_MAX                   = 0x10
-	TCP_CONGESTION                    = 0x40
-	TCP_INFO                          = 0x20
-	TCP_KEEPCNT                       = 0x400
-	TCP_KEEPIDLE                      = 0x100
-	TCP_KEEPINIT                      = 0x80
-	TCP_KEEPINTVL                     = 0x200
-	TCP_MAXBURST                      = 0x4
-	TCP_MAXHLEN                       = 0x3c
-	TCP_MAXOLEN                       = 0x28
-	TCP_MAXSEG                        = 0x2
-	TCP_MAXWIN                        = 0xffff
-	TCP_MAX_SACK                      = 0x4
-	TCP_MAX_WINSHIFT                  = 0xe
-	TCP_MD5SIG                        = 0x10
-	TCP_MINMSS                        = 0xd8
-	TCP_MSS                           = 0x218
-	TCP_NODELAY                       = 0x1
-	TCP_NOOPT                         = 0x8
-	TCP_NOPUSH                        = 0x4
-	TCP_VENDOR                        = 0x80000000
-	TCSAFLUSH                         = 0x2
-	TIOCCBRK                          = 0x2000747a
-	TIOCCDTR                          = 0x20007478
-	TIOCCONS                          = 0x80047462
-	TIOCDRAIN                         = 0x2000745e
-	TIOCEXCL                          = 0x2000740d
-	TIOCEXT                           = 0x80047460
-	TIOCFLUSH                         = 0x80047410
-	TIOCGDRAINWAIT                    = 0x40047456
-	TIOCGETA                          = 0x402c7413
-	TIOCGETD                          = 0x4004741a
-	TIOCGPGRP                         = 0x40047477
-	TIOCGPTN                          = 0x4004740f
-	TIOCGSID                          = 0x40047463
-	TIOCGWINSZ                        = 0x40087468
-	TIOCMBIC                          = 0x8004746b
-	TIOCMBIS                          = 0x8004746c
-	TIOCMGDTRWAIT                     = 0x4004745a
-	TIOCMGET                          = 0x4004746a
-	TIOCMSDTRWAIT                     = 0x8004745b
-	TIOCMSET                          = 0x8004746d
-	TIOCM_CAR                         = 0x40
-	TIOCM_CD                          = 0x40
-	TIOCM_CTS                         = 0x20
-	TIOCM_DCD                         = 0x40
-	TIOCM_DSR                         = 0x100
-	TIOCM_DTR                         = 0x2
-	TIOCM_LE                          = 0x1
-	TIOCM_RI                          = 0x80
-	TIOCM_RNG                         = 0x80
-	TIOCM_RTS                         = 0x4
-	TIOCM_SR                          = 0x10
-	TIOCM_ST                          = 0x8
-	TIOCNOTTY                         = 0x20007471
-	TIOCNXCL                          = 0x2000740e
-	TIOCOUTQ                          = 0x40047473
-	TIOCPKT                           = 0x80047470
-	TIOCPKT_DATA                      = 0x0
-	TIOCPKT_DOSTOP                    = 0x20
-	TIOCPKT_FLUSHREAD                 = 0x1
-	TIOCPKT_FLUSHWRITE                = 0x2
-	TIOCPKT_IOCTL                     = 0x40
-	TIOCPKT_NOSTOP                    = 0x10
-	TIOCPKT_START                     = 0x8
-	TIOCPKT_STOP                      = 0x4
-	TIOCPTMASTER                      = 0x2000741c
-	TIOCSBRK                          = 0x2000747b
-	TIOCSCTTY                         = 0x20007461
-	TIOCSDRAINWAIT                    = 0x80047457
-	TIOCSDTR                          = 0x20007479
-	TIOCSETA                          = 0x802c7414
-	TIOCSETAF                         = 0x802c7416
-	TIOCSETAW                         = 0x802c7415
-	TIOCSETD                          = 0x8004741b
-	TIOCSIG                           = 0x2004745f
-	TIOCSPGRP                         = 0x80047476
-	TIOCSTART                         = 0x2000746e
-	TIOCSTAT                          = 0x20007465
-	TIOCSTI                           = 0x80017472
-	TIOCSTOP                          = 0x2000746f
-	TIOCSWINSZ                        = 0x80087467
-	TIOCTIMESTAMP                     = 0x40107459
-	TIOCUCNTL                         = 0x80047466
-	TOSTOP                            = 0x400000
-	VDISCARD                          = 0xf
-	VDSUSP                            = 0xb
-	VEOF                              = 0x0
-	VEOL                              = 0x1
-	VEOL2                             = 0x2
-	VERASE                            = 0x3
-	VERASE2                           = 0x7
-	VINTR                             = 0x8
-	VKILL                             = 0x5
-	VLNEXT                            = 0xe
-	VMIN                              = 0x10
-	VQUIT                             = 0x9
-	VREPRINT                          = 0x6
-	VSTART                            = 0xc
-	VSTATUS                           = 0x12
-	VSTOP                             = 0xd
-	VSUSP                             = 0xa
-	VTIME                             = 0x11
-	VWERASE                           = 0x4
-	WCONTINUED                        = 0x4
-	WCOREFLAG                         = 0x80
-	WEXITED                           = 0x10
-	WLINUXCLONE                       = 0x80000000
-	WNOHANG                           = 0x1
-	WNOWAIT                           = 0x8
-	WSTOPPED                          = 0x2
-	WTRAPPED                          = 0x20
-	WUNTRACED                         = 0x2
-)
-
-// Errors
-const (
-	E2BIG           = syscall.Errno(0x7)
-	EACCES          = syscall.Errno(0xd)
-	EADDRINUSE      = syscall.Errno(0x30)
-	EADDRNOTAVAIL   = syscall.Errno(0x31)
-	EAFNOSUPPORT    = syscall.Errno(0x2f)
-	EAGAIN          = syscall.Errno(0x23)
-	EALREADY        = syscall.Errno(0x25)
-	EAUTH           = syscall.Errno(0x50)
-	EBADF           = syscall.Errno(0x9)
-	EBADMSG         = syscall.Errno(0x59)
-	EBADRPC         = syscall.Errno(0x48)
-	EBUSY           = syscall.Errno(0x10)
-	ECANCELED       = syscall.Errno(0x55)
-	ECAPMODE        = syscall.Errno(0x5e)
-	ECHILD          = syscall.Errno(0xa)
-	ECONNABORTED    = syscall.Errno(0x35)
-	ECONNREFUSED    = syscall.Errno(0x3d)
-	ECONNRESET      = syscall.Errno(0x36)
-	EDEADLK         = syscall.Errno(0xb)
-	EDESTADDRREQ    = syscall.Errno(0x27)
-	EDOM            = syscall.Errno(0x21)
-	EDOOFUS         = syscall.Errno(0x58)
-	EDQUOT          = syscall.Errno(0x45)
-	EEXIST          = syscall.Errno(0x11)
-	EFAULT          = syscall.Errno(0xe)
-	EFBIG           = syscall.Errno(0x1b)
-	EFTYPE          = syscall.Errno(0x4f)
-	EHOSTDOWN       = syscall.Errno(0x40)
-	EHOSTUNREACH    = syscall.Errno(0x41)
-	EIDRM           = syscall.Errno(0x52)
-	EILSEQ          = syscall.Errno(0x56)
-	EINPROGRESS     = syscall.Errno(0x24)
-	EINTR           = syscall.Errno(0x4)
-	EINVAL          = syscall.Errno(0x16)
-	EIO             = syscall.Errno(0x5)
-	EISCONN         = syscall.Errno(0x38)
-	EISDIR          = syscall.Errno(0x15)
-	ELAST           = syscall.Errno(0x60)
-	ELOOP           = syscall.Errno(0x3e)
-	EMFILE          = syscall.Errno(0x18)
-	EMLINK          = syscall.Errno(0x1f)
-	EMSGSIZE        = syscall.Errno(0x28)
-	EMULTIHOP       = syscall.Errno(0x5a)
-	ENAMETOOLONG    = syscall.Errno(0x3f)
-	ENEEDAUTH       = syscall.Errno(0x51)
-	ENETDOWN        = syscall.Errno(0x32)
-	ENETRESET       = syscall.Errno(0x34)
-	ENETUNREACH     = syscall.Errno(0x33)
-	ENFILE          = syscall.Errno(0x17)
-	ENOATTR         = syscall.Errno(0x57)
-	ENOBUFS         = syscall.Errno(0x37)
-	ENODEV          = syscall.Errno(0x13)
-	ENOENT          = syscall.Errno(0x2)
-	ENOEXEC         = syscall.Errno(0x8)
-	ENOLCK          = syscall.Errno(0x4d)
-	ENOLINK         = syscall.Errno(0x5b)
-	ENOMEM          = syscall.Errno(0xc)
-	ENOMSG          = syscall.Errno(0x53)
-	ENOPROTOOPT     = syscall.Errno(0x2a)
-	ENOSPC          = syscall.Errno(0x1c)
-	ENOSYS          = syscall.Errno(0x4e)
-	ENOTBLK         = syscall.Errno(0xf)
-	ENOTCAPABLE     = syscall.Errno(0x5d)
-	ENOTCONN        = syscall.Errno(0x39)
-	ENOTDIR         = syscall.Errno(0x14)
-	ENOTEMPTY       = syscall.Errno(0x42)
-	ENOTRECOVERABLE = syscall.Errno(0x5f)
-	ENOTSOCK        = syscall.Errno(0x26)
-	ENOTSUP         = syscall.Errno(0x2d)
-	ENOTTY          = syscall.Errno(0x19)
-	ENXIO           = syscall.Errno(0x6)
-	EOPNOTSUPP      = syscall.Errno(0x2d)
-	EOVERFLOW       = syscall.Errno(0x54)
-	EOWNERDEAD      = syscall.Errno(0x60)
-	EPERM           = syscall.Errno(0x1)
-	EPFNOSUPPORT    = syscall.Errno(0x2e)
-	EPIPE           = syscall.Errno(0x20)
-	EPROCLIM        = syscall.Errno(0x43)
-	EPROCUNAVAIL    = syscall.Errno(0x4c)
-	EPROGMISMATCH   = syscall.Errno(0x4b)
-	EPROGUNAVAIL    = syscall.Errno(0x4a)
-	EPROTO          = syscall.Errno(0x5c)
-	EPROTONOSUPPORT = syscall.Errno(0x2b)
-	EPROTOTYPE      = syscall.Errno(0x29)
-	ERANGE          = syscall.Errno(0x22)
-	EREMOTE         = syscall.Errno(0x47)
-	EROFS           = syscall.Errno(0x1e)
-	ERPCMISMATCH    = syscall.Errno(0x49)
-	ESHUTDOWN       = syscall.Errno(0x3a)
-	ESOCKTNOSUPPORT = syscall.Errno(0x2c)
-	ESPIPE          = syscall.Errno(0x1d)
-	ESRCH           = syscall.Errno(0x3)
-	ESTALE          = syscall.Errno(0x46)
-	ETIMEDOUT       = syscall.Errno(0x3c)
-	ETOOMANYREFS    = syscall.Errno(0x3b)
-	ETXTBSY         = syscall.Errno(0x1a)
-	EUSERS          = syscall.Errno(0x44)
-	EWOULDBLOCK     = syscall.Errno(0x23)
-	EXDEV           = syscall.Errno(0x12)
-)
-
-// Signals
-const (
-	SIGABRT   = syscall.Signal(0x6)
-	SIGALRM   = syscall.Signal(0xe)
-	SIGBUS    = syscall.Signal(0xa)
-	SIGCHLD   = syscall.Signal(0x14)
-	SIGCONT   = syscall.Signal(0x13)
-	SIGEMT    = syscall.Signal(0x7)
-	SIGFPE    = syscall.Signal(0x8)
-	SIGHUP    = syscall.Signal(0x1)
-	SIGILL    = syscall.Signal(0x4)
-	SIGINFO   = syscall.Signal(0x1d)
-	SIGINT    = syscall.Signal(0x2)
-	SIGIO     = syscall.Signal(0x17)
-	SIGIOT    = syscall.Signal(0x6)
-	SIGKILL   = syscall.Signal(0x9)
-	SIGLIBRT  = syscall.Signal(0x21)
-	SIGLWP    = syscall.Signal(0x20)
-	SIGPIPE   = syscall.Signal(0xd)
-	SIGPROF   = syscall.Signal(0x1b)
-	SIGQUIT   = syscall.Signal(0x3)
-	SIGSEGV   = syscall.Signal(0xb)
-	SIGSTOP   = syscall.Signal(0x11)
-	SIGSYS    = syscall.Signal(0xc)
-	SIGTERM   = syscall.Signal(0xf)
-	SIGTHR    = syscall.Signal(0x20)
-	SIGTRAP   = syscall.Signal(0x5)
-	SIGTSTP   = syscall.Signal(0x12)
-	SIGTTIN   = syscall.Signal(0x15)
-	SIGTTOU   = syscall.Signal(0x16)
-	SIGURG    = syscall.Signal(0x10)
-	SIGUSR1   = syscall.Signal(0x1e)
-	SIGUSR2   = syscall.Signal(0x1f)
-	SIGVTALRM = syscall.Signal(0x1a)
-	SIGWINCH  = syscall.Signal(0x1c)
-	SIGXCPU   = syscall.Signal(0x18)
-	SIGXFSZ   = syscall.Signal(0x19)
-)
-
-// Error table
-var errors = [...]string{
-	1:  "operation not permitted",
-	2:  "no such file or directory",
-	3:  "no such process",
-	4:  "interrupted system call",
-	5:  "input/output error",
-	6:  "device not configured",
-	7:  "argument list too long",
-	8:  "exec format error",
-	9:  "bad file descriptor",
-	10: "no child processes",
-	11: "resource deadlock avoided",
-	12: "cannot allocate memory",
-	13: "permission denied",
-	14: "bad address",
-	15: "block device required",
-	16: "device busy",
-	17: "file exists",
-	18: "cross-device link",
-	19: "operation not supported by device",
-	20: "not a directory",
-	21: "is a directory",
-	22: "invalid argument",
-	23: "too many open files in system",
-	24: "too many open files",
-	25: "inappropriate ioctl for device",
-	26: "text file busy",
-	27: "file too large",
-	28: "no space left on device",
-	29: "illegal seek",
-	30: "read-only file system",
-	31: "too many links",
-	32: "broken pipe",
-	33: "numerical argument out of domain",
-	34: "result too large",
-	35: "resource temporarily unavailable",
-	36: "operation now in progress",
-	37: "operation already in progress",
-	38: "socket operation on non-socket",
-	39: "destination address required",
-	40: "message too long",
-	41: "protocol wrong type for socket",
-	42: "protocol not available",
-	43: "protocol not supported",
-	44: "socket type not supported",
-	45: "operation not supported",
-	46: "protocol family not supported",
-	47: "address family not supported by protocol family",
-	48: "address already in use",
-	49: "can't assign requested address",
-	50: "network is down",
-	51: "network is unreachable",
-	52: "network dropped connection on reset",
-	53: "software caused connection abort",
-	54: "connection reset by peer",
-	55: "no buffer space available",
-	56: "socket is already connected",
-	57: "socket is not connected",
-	58: "can't send after socket shutdown",
-	59: "too many references: can't splice",
-	60: "operation timed out",
-	61: "connection refused",
-	62: "too many levels of symbolic links",
-	63: "file name too long",
-	64: "host is down",
-	65: "no route to host",
-	66: "directory not empty",
-	67: "too many processes",
-	68: "too many users",
-	69: "disc quota exceeded",
-	70: "stale NFS file handle",
-	71: "too many levels of remote in path",
-	72: "RPC struct is bad",
-	73: "RPC version wrong",
-	74: "RPC prog. not avail",
-	75: "program version wrong",
-	76: "bad procedure for program",
-	77: "no locks available",
-	78: "function not implemented",
-	79: "inappropriate file type or format",
-	80: "authentication error",
-	81: "need authenticator",
-	82: "identifier removed",
-	83: "no message of desired type",
-	84: "value too large to be stored in data type",
-	85: "operation canceled",
-	86: "illegal byte sequence",
-	87: "attribute not found",
-	88: "programming error",
-	89: "bad message",
-	90: "multihop attempted",
-	91: "link has been severed",
-	92: "protocol error",
-	93: "capabilities insufficient",
-	94: "not permitted in capability mode",
-	95: "state not recoverable",
-	96: "previous owner died",
-}
-
-// Signal table
-var signals = [...]string{
-	1:  "hangup",
-	2:  "interrupt",
-	3:  "quit",
-	4:  "illegal instruction",
-	5:  "trace/BPT trap",
-	6:  "abort trap",
-	7:  "EMT trap",
-	8:  "floating point exception",
-	9:  "killed",
-	10: "bus error",
-	11: "segmentation fault",
-	12: "bad system call",
-	13: "broken pipe",
-	14: "alarm clock",
-	15: "terminated",
-	16: "urgent I/O condition",
-	17: "suspended (signal)",
-	18: "suspended",
-	19: "continued",
-	20: "child exited",
-	21: "stopped (tty input)",
-	22: "stopped (tty output)",
-	23: "I/O possible",
-	24: "cputime limit exceeded",
-	25: "filesize limit exceeded",
-	26: "virtual timer expired",
-	27: "profiling timer expired",
-	28: "window size changes",
-	29: "information request",
-	30: "user defined signal 1",
-	31: "user defined signal 2",
-	32: "unknown signal",
-	33: "unknown signal",
-}


[11/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
deleted file mode 100644
index 031034a..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
+++ /dev/null
@@ -1,1427 +0,0 @@
-// mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,darwin
-
-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, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	use(_p0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
-	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-	r = int(r0)
-	w = int(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path1)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(path2)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
-	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
-	size = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
-	newoffset = int64(int64(r1)<<32 | int64(r0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) {
-	r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	sec = int32(r0)
-	usec = int32(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
deleted file mode 100644
index ee96f78..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ /dev/null
@@ -1,1443 +0,0 @@
-// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,darwin
-
-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, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	use(_p0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
-	_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
-	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-	r = int(r0)
-	w = int(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func kill(pid int, signum int, posix int) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exchangedata(path1 string, path2 string, options int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path1)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(path2)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
-	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
-	size = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
-	newoffset = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setprivexec(flag int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) {
-	r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	sec = int64(r0)
-	usec = int32(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}


[09/67] [abbrv] [partial] incubator-mynewt-newtmgr git commit: newtmgr - Remove newt code

Posted by cc...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
deleted file mode 100644
index 78de48d..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
+++ /dev/null
@@ -1,1413 +0,0 @@
-// mksyscall.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build amd64,dragonfly
-
-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, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	use(_p0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
-	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-	r = int(r0)
-	w = int(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
-	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
-	size = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
-	newoffset = int64(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newtmgr/blob/e31a7d31/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
----------------------------------------------------------------------
diff --git a/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
deleted file mode 100644
index fade994..0000000
--- a/newt/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
+++ /dev/null
@@ -1,1665 +0,0 @@
-// mksyscall.pl -l32 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go
-// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-
-// +build 386,freebsd
-
-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, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func setgroups(ngid int, gid *_Gid_t) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
-	r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
-	wpid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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) {
-	_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Shutdown(s int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
-	_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	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)
-	}
-	_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
-	use(_p0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func utimes(path string, timeval *[2]Timeval) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func futimes(fd int, timeval *[2]Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func fcntl(fd int, cmd int, arg int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func pipe() (r int, w int, err error) {
-	r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
-	r = int(r0)
-	w = int(r1)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Access(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
-	_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chflags(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chmod(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Chroot(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Close(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup(fd int) (nfd int, err error) {
-	r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Dup2(from int, to int) (err error) {
-	_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Exit(code int) {
-	Syscall(SYS_EXIT, uintptr(code), 0, 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
-	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(file)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(attrname)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
-	use(unsafe.Pointer(_p0))
-	ret = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
-	_, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchdir(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchflags(fd int, flags int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchmod(fd int, mode uint32) (err error) {
-	_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fchown(fd int, uid int, gid int) (err error) {
-	_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Flock(fd int, how int) (err error) {
-	_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fpathconf(fd int, name int) (val int, err error) {
-	r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstat(fd int, stat *Stat_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fstatfs(fd int, stat *Statfs_t) (err error) {
-	_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Fsync(fd int) (err error) {
-	_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Ftruncate(fd int, length int64) (err error) {
-	_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(buf) > 0 {
-		_p0 = unsafe.Pointer(&buf[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getdtablesize() (size int) {
-	r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
-	size = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getegid() (egid int) {
-	r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
-	egid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Geteuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getgid() (gid int) {
-	r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
-	gid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgid(pid int) (pgid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
-	pgid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpgrp() (pgrp int) {
-	r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
-	pgrp = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpid() (pid int) {
-	r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
-	pid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getppid() (ppid int) {
-	r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
-	ppid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getpriority(which int, who int) (prio int, err error) {
-	r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
-	prio = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getrusage(who int, rusage *Rusage) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getsid(pid int) (sid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
-	sid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Gettimeofday(tv *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Getuid() (uid int) {
-	r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
-	uid = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Issetugid() (tainted bool) {
-	r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
-	tainted = bool(r0 != 0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kill(pid int, signum syscall.Signal) (err error) {
-	_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Kqueue() (fd int, err error) {
-	r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lchown(path string, uid int, gid int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Link(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Listen(s int, backlog int) (err error) {
-	_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Lstat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkdir(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mkfifo(path string, mode uint32) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mknod(path string, mode uint32, dev int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mlockall(flags int) (err error) {
-	_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Mprotect(b []byte, prot int) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlock(b []byte) (err error) {
-	var _p0 unsafe.Pointer
-	if len(b) > 0 {
-		_p0 = unsafe.Pointer(&b[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Munlockall() (err error) {
-	_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
-	_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
-	use(unsafe.Pointer(_p0))
-	fd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pathconf(path string, name int) (val int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
-	use(unsafe.Pointer(_p0))
-	val = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func read(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Readlink(path string, buf []byte) (n int, err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 unsafe.Pointer
-	if len(buf) > 0 {
-		_p1 = unsafe.Pointer(&buf[0])
-	} else {
-		_p1 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
-	use(unsafe.Pointer(_p0))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rename(from string, to string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(from)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(to)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Revoke(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Rmdir(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
-	r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
-	newoffset = int64(int64(r1)<<32 | int64(r0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
-	_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setegid(egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Seteuid(euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setgid(gid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setlogin(name string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(name)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpgid(pid int, pgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setpriority(which int, who int, prio int) (err error) {
-	_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setregid(rgid int, egid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setrlimit(which int, lim *Rlimit) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setsid() (pid int, err error) {
-	r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
-	pid = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Settimeofday(tp *Timeval) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setuid(uid int) (err error) {
-	_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Stat(path string, stat *Stat_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Statfs(path string, stat *Statfs_t) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Symlink(path string, link string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	var _p1 *byte
-	_p1, err = BytePtrFromString(link)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
-	use(unsafe.Pointer(_p0))
-	use(unsafe.Pointer(_p1))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Sync() (err error) {
-	_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Truncate(path string, length int64) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Umask(newmask int) (oldmask int) {
-	r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
-	oldmask = int(r0)
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Undelete(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unlink(path string) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Unmount(path string, flags int) (err error) {
-	var _p0 *byte
-	_p0, err = BytePtrFromString(path)
-	if err != nil {
-		return
-	}
-	_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
-	use(unsafe.Pointer(_p0))
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func write(fd int, p []byte) (n int, err error) {
-	var _p0 unsafe.Pointer
-	if len(p) > 0 {
-		_p0 = unsafe.Pointer(&p[0])
-	} else {
-		_p0 = unsafe.Pointer(&_zero)
-	}
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
-	r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
-	ret = uintptr(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func munmap(addr uintptr, length uintptr) (err error) {
-	_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
-	r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
-	n = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
-	r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
-	nfd = int(r0)
-	if e1 != 0 {
-		err = errnoErr(e1)
-	}
-	return
-}