setkey(8): extract prefixlen calculation info helper
(cherry picked from commit 2c1296a3c5473651aa87eefea25e7b7475e9e16c)