3 ms·
for all addresses, v4 and v6 this is what I used to do 1) convert to a non-space-zeros-compressing hex string 2) sort on the hex string 3) convert back t
by ggm 1y ago
for all addresses, v4 and v6 this is what I used to do
1) convert to a non-space-zeros-compressing hex string
2) sort on the hex string
3) convert back through inet_ntop()
Only a minor variant needed to deal with prefix/len sort order.