Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for parseAddrs (0.15 sec)

  1. src/vendor/golang.org/x/net/route/address.go

    		case *DefaultAddr:
    			l, err := a.marshal(b)
    			if err != nil {
    				return 0, err
    			}
    			b = b[l:]
    			attrs |= 1 << uint(i)
    		}
    	}
    	return attrs, nil
    }
    
    func parseAddrs(attrs uint, fn func(int, []byte) (int, Addr, error), b []byte) ([]Addr, error) {
    	var as [syscall.RTAX_MAX]Addr
    	af := int(syscall.AF_UNSPEC)
    	for i := uint(0); i < syscall.RTAX_MAX && len(b) >= roundup(0); i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 9.9K bytes
    - Viewed (0)
  2. pkg/api/service/warnings_test.go

    			},
    		},
    		{
    			name:    "Dual Stack IPv4-IPv6 and IPv4 with leading zeros",
    			service: service([]string{"192.012.2.2", "2001:db8::2"}),
    			want: []string{
    				`spec.clusterIPs[0]: IP address was accepted, but will be invalid in a future Kubernetes release: ParseAddr("192.012.2.2"): IPv4 field has octet with leading zero`,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 26 22:57:57 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  3. src/net/netip/fuzz_test.go

    		f.Add(seed)
    	}
    
    	f.Fuzz(func(t *testing.T, s string) {
    		ip, _ := ParseAddr(s)
    		checkStringParseRoundTrip(t, ip, ParseAddr)
    		checkEncoding(t, ip)
    
    		// Check that we match the net's IP parser, modulo zones.
    		if !strings.Contains(s, "%") {
    			stdip := net.ParseIP(s)
    			if !ip.IsValid() != (stdip == nil) {
    				t.Errorf("ParseAddr zero != net.ParseIP nil: ip=%q stdip=%q", ip, stdip)
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 20 23:46:23 UTC 2021
    - 10.5K bytes
    - Viewed (0)
  4. src/net/netip/netip.go

    }
    
    // MustParseAddr calls [ParseAddr](s) and panics on error.
    // It is intended for use in tests with hard-coded strings.
    func MustParseAddr(s string) Addr {
    	ip, err := ParseAddr(s)
    	if err != nil {
    		panic(err)
    	}
    	return ip
    }
    
    type parseAddrError struct {
    	in  string // the string given to ParseAddr
    	msg string // an explanation of the parse failure
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  5. pilot/pkg/serviceregistry/kube/controller/ambient/workloads.go

    			Waypoint:              waypointAddress,
    			TrustDomain:           pickTrustDomain(meshCfg),
    			Locality:              getWorkloadEntryLocality(&wle.Spec),
    		}
    
    		if addr, err := netip.ParseAddr(wle.Spec.Address); err == nil {
    			w.Addresses = [][]byte{addr.AsSlice()}
    		} else {
    			log.Warnf("skipping workload entry %s/%s; DNS Address resolution is not yet implemented", wle.Namespace, wle.Name)
    		}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 16:51:29 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  6. src/net/ip.go

    // ParseIP returns nil.
    func ParseIP(s string) IP {
    	if addr, valid := parseIP(s); valid {
    		return IP(addr[:])
    	}
    	return nil
    }
    
    func parseIP(s string) ([16]byte, bool) {
    	ip, err := netip.ParseAddr(s)
    	if err != nil || ip.Zone() != "" {
    		return [16]byte{}, false
    	}
    	return ip.As16(), true
    }
    
    // ParseCIDR parses s as a CIDR notation IP address and prefix length,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 03:13:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  7. pkg/controller/servicecidrs/servicecidrs_controller.go

    	managedBy, ok := ip.Labels[networkingapiv1alpha1.LabelManagedBy]
    	if !ok || managedBy != ipallocator.ControllerName {
    		return []string{}
    	}
    
    	address, err := netip.ParseAddr(ip.Name)
    	if err != nil {
    		// This should not happen, the IPAddress object validates
    		// the name is a valid IPAddress
    		return []string{}
    	}
    
    	c.muTree.Lock()
    	defer c.muTree.Unlock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 18K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/apis/kubeadm/validation/validation.go

    // ValidateIPNetFromString validates network portion of ip address
    func ValidateIPNetFromString(subnetStr string, minAddrs int64, fldPath *field.Path) field.ErrorList {
    	allErrs := field.ErrorList{}
    	subnets, err := netutils.ParseCIDRs(strings.Split(subnetStr, ","))
    	if err != nil {
    		allErrs = append(allErrs, field.Invalid(fldPath, subnetStr, "couldn't parse subnet"))
    		return allErrs
    	}
    	switch {
    	// if DualStack only 2 CIDRs allowed
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  9. pilot/cmd/pilot-agent/app/cmd.go

    		proxyArgs.Type = model.NodeType(args[0])
    		if !model.IsApplicationNodeType(proxyArgs.Type) {
    			return fmt.Errorf("Invalid proxy Type: " + string(proxyArgs.Type))
    		}
    	}
    
    	podIP, _ := netip.ParseAddr(options.InstanceIPVar.Get()) // protobuf encoding of IP_ADDRESS type
    	if podIP.IsValid() {
    		// The first one must be the pod ip as we pick the first ip as pod ip in istiod.
    		proxyArgs.IPAddresses = []string{podIP.String()}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 16 22:12:28 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/cel/library/ip.go

    // so that we can share the common logic of rejecting IP addresses
    // that contain zones or are IPv4-mapped IPv6 addresses.
    func parseIPAddr(raw string) (netip.Addr, error) {
    	addr, err := netip.ParseAddr(raw)
    	if err != nil {
    		return netip.Addr{}, fmt.Errorf("IP Address %q parse error during conversion from string: %v", raw, err)
    	}
    
    	if addr.Zone() != "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 11:02:34 UTC 2023
    - 9.8K bytes
    - Viewed (0)
Back to top