| // 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. |
| errNoSuchInterface = errors.New("no such interface") |
| errNoSuchMulticastInterface = errors.New("no such multicast interface") |
| func boolint(b bool) int { |
| func netAddrToIP4(a net.Addr) net.IP { |
| if ip := v.IP.To4(); ip != nil { |
| if ip := v.IP.To4(); ip != nil { |
| func netIP4ToInterface(ip net.IP) (*net.Interface, error) { |
| ift, err := net.Interfaces() |
| for _, ifi := range ift { |
| for _, ifa := range ifat { |
| return nil, errNoSuchInterface |
| func netInterfaceToIP4(ifi *net.Interface) (net.IP, error) { |
| for _, ifa := range ifat { |
| return nil, errNoSuchInterface |