code: func NewIAPrefix(preferred time.Duration, valid time.Duration, prefixLength uint8, prefix net.IP, options dhcp6.Options) (*IAPrefix, error) {
  	// Preferred lifetime must always be less than valid lifetime.
  	if preferred > valid {
  		return nil, ErrInvalidLifetimes
  	}
  
  	// From documentation: If ip is not an IPv4 address, To4 returns nil.
  	if prefix.To4() != nil {
  		return nil, ErrInvalidIP
  	}
  
  	// If no options set, make empty map
  	if options == nil {
  		options = make(dhcp6.Options)
  	}
  
  	return &IAPrefix{
  		PreferredLifetime: preferred,
  		ValidLifetime:     valid,
  		PrefixLength:      prefixLength,
  		Prefix:            prefix,
  		Options:           options,
  	}, nil
  }
docs: // NewIAPrefix creates a new IAPrefix from preferred and valid lifetime
  // durations, an IPv6 prefix length, an IPv6 prefix, and an optional Options
  // map.
  //
  // The preferred lifetime duration must be less than the valid lifetime
  // duration.  The IPv6 prefix must be exactly 16 bytes, the correct length
  // for an IPv6 address.  Failure to meet either of these conditions will result
  // in an error.  If an Options map is not specified, a new one will be
  // allocated.