On Wed, Aug 07, 2024 at 02:00:24PM -0400, Laine Stump wrote:
On 8/7/24 1:41 PM, Daniel P. Berrangé wrote:
> On Wed, Aug 07, 2024 at 01:15:58PM -0400, Laine Stump wrote:
> > These options are added to network.conf and virNetworkDriverConfig object:
> >
> > autoaddr_start - start of the range of subnets to search (def:
"192.168.122.0")
> > autoaddr_end - end of the range of subnets (def: "192.168.255.0")
> > autoaddr_prefix - prefix of these subnets (def: 24)
>
> So I guess $prefix here is telling us that we need to iterate over
> the octet at the end of $prefix. ie the 3rd digit in these examples.
The code isn't really thinking of it as octets at all, just 32 bits, and the
prefix is telling how many of those bits are the network part of the
address; it just increments the network part by 1 each time (by shifting
right $prefix-32 bits, incrementing by 1, then shifting left $prefix-32
bits).
Ok, I guess that makes sense.
With regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|