- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 55 for ipAddrs (0.13 sec)
-
pilot/pkg/util/network/ip.go
} // CheckIPFamilyTypeForFirstIPs checks the ip family type for the first ip addresses func CheckIPFamilyTypeForFirstIPs(ipAddrs []string) (IPFamilyType, error) { if len(ipAddrs) == 0 { return UNKNOWN, errors.New("the ipAddr slice is empty") } netIP, err := netip.ParseAddr(ipAddrs[0]) if err != nil { return UNKNOWN, err } if netIP.Is6() && !netIP.IsLinkLocalUnicast() { return IPv6, nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Dec 21 21:27:21 UTC 2023 - 6.3K bytes - Viewed (0) -
tools/istio-iptables/pkg/config/config_test.go
"net" "net/netip" "testing" ) var tesrLocalIPAddrs = func(ips []netip.Addr) ([]net.Addr, error) { var IPAddrs []net.Addr for i := 0; i < len(ips); i++ { var ipAddr net.Addr ipNetAddr := &net.IPNet{IP: net.ParseIP(ips[i].String())} ipAddr = ipNetAddr IPAddrs = append(IPAddrs, ipAddr) } return IPAddrs, nil } func TestGetLocalIP(t *testing.T) { tests := []struct { name string
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 30 22:24:38 UTC 2024 - 2.6K bytes - Viewed (0) -
tools/istio-iptables/pkg/config/config.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 30 22:24:38 UTC 2024 - 9.2K bytes - Viewed (0) -
pilot/cmd/pilot-agent/app/cmd.go
var ip net.IP switch v := addr.(type) { case *net.IPNet: ip = v.IP case *net.IPAddr: ip = v.IP default: continue } // handling ipv4 wrapping in ipv6 ipAddr, okay := netip.AddrFromSlice(ip) if !okay { continue } unwrapAddr := ipAddr.Unmap()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 16 22:12:28 UTC 2024 - 11.9K bytes - Viewed (0) -
src/net/lookup_test.go
return strings.HasSuffix(strings.ToLower(s), strings.ToLower(suffix)) } func lookupLocalhost(ctx context.Context, fn func(context.Context, string, string) ([]IPAddr, error), network, host string) ([]IPAddr, error) { switch host { case "localhost": return []IPAddr{ {IP: IPv4(127, 0, 0, 1)}, {IP: IPv6loopback}, }, nil default: return fn(ctx, network, host) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 41.4K bytes - Viewed (0) -
src/net/iprawsock_posix.go
} return syscall.AF_INET6 } func (a *IPAddr) sockaddr(family int) (syscall.Sockaddr, error) { if a == nil { return nil, nil } return ipToSockaddr(family, a.IP, 0, a.Zone) } func (a *IPAddr) toLocal(net string) sockaddr { return &IPAddr{loopbackIP(net), a.Zone} } func (c *IPConn) readFrom(b []byte) (int, *IPAddr, error) { // TODO(cw,rsc): consider using readv if we know the family
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:54:32 UTC 2024 - 3.9K bytes - Viewed (0) -
src/net/iprawsock_test.go
litAddrOrName string addr *IPAddr err error } var resolveIPAddrTests = []resolveIPAddrTest{ {"ip", "127.0.0.1", &IPAddr{IP: IPv4(127, 0, 0, 1)}, nil}, {"ip4", "127.0.0.1", &IPAddr{IP: IPv4(127, 0, 0, 1)}, nil}, {"ip4:icmp", "127.0.0.1", &IPAddr{IP: IPv4(127, 0, 0, 1)}, nil}, {"ip", "::1", &IPAddr{IP: ParseIP("::1")}, nil}, {"ip6", "::1", &IPAddr{IP: ParseIP("::1")}, nil},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 6K bytes - Viewed (0) -
src/net/iprawsock.go
// BUG(mikio): On Windows, the File method of IPConn is not // implemented. // IPAddr represents the address of an IP end point. type IPAddr struct { IP IP Zone string // IPv6 scoped addressing zone } // Network returns the address's network name, "ip". func (a *IPAddr) Network() string { return "ip" } func (a *IPAddr) String() string { if a == nil { return "<nil>" } ip := ipEmptyString(a.IP)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 7.1K bytes - Viewed (0) -
test/escape_slice.go
} func setupTestData() { resolveIPAddrTests = append(resolveIPAddrTests, []resolveIPAddrTest{ // ERROR "\[\]resolveIPAddrTest{...} does not escape" {"ip", "localhost", &IPAddr{IP: IPv4(127, 0, 0, 1)}, // ERROR "&IPAddr{...} escapes to heap" nil}, {"ip4", "localhost", &IPAddr{IP: IPv4(127, 0, 0, 1)}, // ERROR "&IPAddr{...} escapes to heap" nil},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 18:50:24 UTC 2023 - 3.9K bytes - Viewed (0) -
src/net/interface_windows.go
return nil, os.NewSyscallError("sockaddr", err) } switch sa := sa.(type) { case *syscall.SockaddrInet4: ifat = append(ifat, &IPAddr{IP: IPv4(sa.Addr[0], sa.Addr[1], sa.Addr[2], sa.Addr[3])}) case *syscall.SockaddrInet6: ifa := &IPAddr{IP: make(IP, IPv6len)} copy(ifa.IP, sa.Addr[:]) ifat = append(ifat, ifa) } } } } return ifat, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 15 10:25:02 UTC 2024 - 5.5K bytes - Viewed (0)