1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 errMissingAddress = errors.New("missing address")
14 errHeaderTooShort = errors.New("header too short")
15 errInvalidConnType = errors.New("invalid conn type")
16 errOpNoSupport = errors.New("operation not supported")
17 errNoSuchInterface = errors.New("no such interface")
20 func boolint(b bool) int {
27 func netAddrToIP16(a net.Addr) net.IP {
28 switch v := a.(type) {
30 if ip := v.IP.To16(); ip != nil && ip.To4() == nil {
34 if ip := v.IP.To16(); ip != nil && ip.To4() == nil {
41 func opAddr(a net.Addr) net.Addr {