Comment on Is the bitwise AND of subnet masks and IP addresses redundant?

<- View Parent
DmMacniel@feddit.org ⁨1⁩ ⁨week⁩ ago

but rather a raw binary sequence, e.g., the first 24 bits of an IP address, therefore allocating 3 bytes of memory for storing the NID.

That would require dynamic memory allocation, since you can never know what CIDR your stack encounters. It could be a nibble, a byte, a byte and a nibble, …, 4 bytes. So you would allocate a int32/int64 anyway to be on the safe side.

source
Sort:hotnewtop