]> git.puffer.fish Git - mirror/frr.git/commit
lib: pretty ip_masklen and masklen2ip
authorDavid Lamparter <equinox@diac24.net>
Tue, 3 Apr 2012 22:14:36 +0000 (00:14 +0200)
committerDavid Lamparter <equinox@diac24.net>
Tue, 3 Apr 2012 22:25:51 +0000 (00:25 +0200)
commite96b312150d8e376c1ef463793d1929eca3618d5
tree33bdbba11475be746d7ebf684fd1441b9db4b929
parenta3537862f3c00b60fc52a67c1cc447c2a65f97bd
lib: pretty ip_masklen and masklen2ip

nonwithstanding any desire for optimisation, these versions are shorter
and more concise.  reading the comments, they might even be easier to
understand.

I've tested them on i686 and x86_64, and checked that correct assembler
code is emitted for ARM, MIPS and PowerPC.

IPv6 is left as an exercise for another day, none of the ideas I had led
to a "yes, this is the one to go with" solution.

Signed-off-by: David Lamparter <equinox@diac24.net>
lib/prefix.c