Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 57 for Ip (0.14 sec)

  1. cni/pkg/ipset/nldeps_linux.go

    		Comment:  comment,
    		IP:       net.IP(ip.AsSlice()),
    		Protocol: &ipProto,
    		Replace:  replace,
    	})
    	if err != nil {
    		return fmt.Errorf("failed to add IP %s with and proto %d to ipset %s: %w", ip, ipProto, name, err)
    	}
    	return nil
    }
    
    func (m *realDeps) deleteIP(name string, ip netip.Addr, ipProto uint8) error {
    	err := netlink.IpsetDel(name, &netlink.IPSetEntry{
    		IP:       net.IP(ip.AsSlice()),
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  2. internal/http/listener_test.go

    	addrs, err := net.InterfaceAddrs()
    	if err != nil {
    		t.Fatalf("%s.  Unable to get IP addresses of this host.", err)
    	}
    
    	for _, addr := range addrs {
    		var ip net.IP
    		switch v := addr.(type) {
    		case *net.IPNet:
    			ip = v.IP
    		case *net.IPAddr:
    			ip = v.IP
    		}
    
    		if ip.To4() != nil {
    			localIP4.Add(ip.String())
    		}
    	}
    
    	// Filter ipList by IPs those do not start with '127.'.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jun 12 16:09:28 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/ztunnel/configdump/connections.go

    	for netIP, s := range d.Services {
    		_, ip, _ := strings.Cut(netIP, "/")
    		serviceNames[ip] = s.Hostname
    	}
    	for netIP, s := range d.Workloads {
    		_, ip, _ := strings.Cut(netIP, "/")
    		workloadNames[ip] = s.Name + "." + s.Namespace
    	}
    	lookupIP := func(addr string) string {
    		if filter.Raw {
    			return addr
    		}
    		ip, port, _ := net.SplitHostPort(addr)
    		if s, f := serviceNames[ip]; f {
    			return net.JoinHostPort(s, port)
    		}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Apr 22 15:39:28 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  4. cni/pkg/ipset/ipset.go

    	ipsetIPHashCreate(name string, v6 bool) error
    	destroySet(name string) error
    	addIP(name string, ip netip.Addr, ipProto uint8, comment string, replace bool) error
    	deleteIP(name string, ip netip.Addr, ipProto uint8) error
    	flush(name string) error
    	clearEntriesWithComment(name string, comment string) error
    	clearEntriesWithIP(name string, ip netip.Addr) error
    	listEntriesByIP(name string) ([]netip.Addr, error)
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  5. cni/pkg/util/podutil.go

    	var podIPs []netip.Addr
    	if len(pod.Status.PodIPs) != 0 {
    		for _, pip := range pod.Status.PodIPs {
    			ip := netip.MustParseAddr(pip.IP)
    			podIPs = append(podIPs, ip)
    		}
    	} else if len(pod.Status.PodIP) != 0 {
    		ip := netip.MustParseAddr(pod.Status.PodIP)
    		podIPs = append(podIPs, ip)
    	}
    	return podIPs
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed May 01 18:04:40 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  6. cmd/net_test.go

    			sortedIPList: []string{"127.0.0.1"},
    		},
    		// Non parsable ip is assumed to be hostame and gets preserved
    		// as the left most elements, regardless of IP based sorting.
    		{
    			ipList:       []string{"hostname", "127.0.0.1", "192.168.1.106"},
    			sortedIPList: []string{"hostname", "192.168.1.106", "127.0.0.1"},
    		},
    		// Non parsable ip is assumed to be hostname, with a mixed input of ip and hostname.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 08:43:09 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  7. internal/config/dns/etcd_dns.go

    	t := time.Now().UTC()
    	for ip := range c.domainIPs {
    		bucketMsg, err := newCoreDNSMsg(ip, c.domainPort, defaultTTL, t)
    		if err != nil {
    			return err
    		}
    		for _, domainName := range c.domainNames {
    			key := msg.Path(fmt.Sprintf("%s.%s", bucket, domainName), c.prefixPath)
    			key = key + etcdPathSeparator + ip
    			ctx, cancel := context.WithTimeout(context.Background(), defaultContextTimeout)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 8.3K bytes
    - Viewed (0)
  8. cni/pkg/ipset/nldeps_unspecified.go

    	return errors.New("not implemented on this platform")
    }
    
    func (m *realDeps) addIP(name string, ip netip.Addr, ipProto uint8, comment string, replace bool) error {
    	return errors.New("not implemented on this platform")
    }
    
    func (m *realDeps) deleteIP(name string, ip netip.Addr, ipProto uint8) error {
    	return errors.New("not implemented on this platform")
    }
    
    func (m *realDeps) flush(name string) error {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  9. istioctl/pkg/writer/ztunnel/configdump/services.go

    	})
    	fmt.Fprintln(w, "NAMESPACE\tSERVICE NAME\tSERVICE VIP\tWAYPOINT")
    
    	for _, svc := range svcs {
    		var ip string
    		if len(svc.Addresses) > 0 {
    			_, ip, _ = strings.Cut(svc.Addresses[0], "/")
    		}
    		waypoint := serviceWaypointName(svc, zDump.Services)
    		fmt.Fprintf(w, "%v\t%v\t%v\t%v\n",
    			svc.Namespace, svc.Name, ip, waypoint)
    	}
    	return w.Flush()
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 23 21:30:30 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  10. cni/pkg/util/podutil_test.go

    			Name:      "test",
    			Namespace: "test",
    		},
    		Spec: corev1.PodSpec{
    			NodeName: "derp",
    		},
    		Status: corev1.PodStatus{
    			PodIP:  "2.2.2.2",
    			PodIPs: []corev1.PodIP{{IP: "2.2.2.2"}, {IP: "3.3.3.3"}},
    		},
    	}
    
    	podIPs := GetPodIPsIfPresent(pod)
    	assert.Equal(t, len(podIPs), 2)
    }
    
    func TestGetPodIPsIfNoPodIPPresent(t *testing.T) {
    	pod := &corev1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed May 01 18:04:40 GMT 2024
    - 5.9K bytes
    - Viewed (0)
Back to top