update packages

This commit is contained in:
fatedier
2017-06-04 20:47:24 +08:00
parent 84341b7fcc
commit 3a4d769bb3
189 changed files with 6677 additions and 1897 deletions

View File

@@ -1,14 +1,12 @@
// Copyright 2012 The Go Authors. All rights reserved.
// 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.
package ipv4
import (
"encoding/binary"
"errors"
"net"
"unsafe"
)
var (
@@ -23,20 +21,8 @@ var (
// See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html.
freebsdVersion uint32
nativeEndian binary.ByteOrder
)
func init() {
i := uint32(1)
b := (*[4]byte)(unsafe.Pointer(&i))
if b[0] == 1 {
nativeEndian = binary.LittleEndian
} else {
nativeEndian = binary.BigEndian
}
}
func boolint(b bool) int {
if b {
return 1