Update dependencies

This commit is contained in:
Zlatko Čalušić
2017-06-25 12:06:41 +02:00
parent 0c22253d41
commit 4873fd9ffe
47 changed files with 11212 additions and 9462 deletions

View File

@@ -5,10 +5,8 @@
package ipv6
import (
"encoding/binary"
"errors"
"net"
"unsafe"
)
var (
@@ -17,20 +15,8 @@ var (
errInvalidConnType = errors.New("invalid conn type")
errOpNoSupport = errors.New("operation not supported")
errNoSuchInterface = errors.New("no such interface")
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
@@ -51,3 +37,21 @@ func netAddrToIP16(a net.Addr) net.IP {
}
return nil
}
func opAddr(a net.Addr) net.Addr {
switch a.(type) {
case *net.TCPAddr:
if a == nil {
return nil
}
case *net.UDPAddr:
if a == nil {
return nil
}
case *net.IPAddr:
if a == nil {
return nil
}
}
return a
}