- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 72 for ipAddrs (0.16 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) -
pkg/test/echo/server/instance.go
// to be explicit v4, v6 := false, false // Obtain all the IPs from the node ipAddrs, ok := network.GetPrivateIPs(context.Background()) if !ok { return []string{ip} } for _, ip := range ipAddrs { addr, err := netip.ParseAddr(ip) if err != nil { // Should not happen continue } if addr.Is4() { v4 = true } else {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jun 09 07:54:01 UTC 2023 - 7.1K 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_plan9.go
) func (c *IPConn) readFrom(b []byte) (int, *IPAddr, error) { return 0, nil, syscall.EPLAN9 } func (c *IPConn) readMsg(b, oob []byte) (n, oobn, flags int, addr *IPAddr, err error) { return 0, 0, 0, nil, syscall.EPLAN9 } func (c *IPConn) writeTo(b []byte, addr *IPAddr) (int, error) { return 0, syscall.EPLAN9 } func (c *IPConn) writeMsg(b, oob []byte, addr *IPAddr) (n, oobn int, err error) { return 0, 0, syscall.EPLAN9
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 29 23:57:04 UTC 2018 - 874 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/ipsock_test.go
import ( "reflect" "testing" ) var testInetaddr = func(ip IPAddr) Addr { return &TCPAddr{IP: ip.IP, Port: 5682, Zone: ip.Zone} } var addrListTests = []struct { filter func(IPAddr) bool ips []IPAddr inetaddr func(IPAddr) Addr first Addr primaries addrList fallbacks addrList err error }{ { nil, []IPAddr{ {IP: IPv4(127, 0, 0, 1)}, {IP: IPv6loopback}, },
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Apr 15 22:22:09 UTC 2017 - 6.8K 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)