[quagga-dev 3582] Comments to sockopt.[ch]
hasso at estpak.ee
Tue Aug 16 08:43:40 BST 2005
For various reasons I had to look at code in sockopt.c and now I have some
thoughts ... ;)
1) It would be nice to have getsockopt_cmsg_data exported, many places can
use this to get cmsg data instead of using their own for().
2) getsockopt_cmsg_data is buggy - there is no check if cmsg->cmsg_type ==
type at all.
3) In various places for [gs]etting ip options to socket level IPPROTO_IP
is used. According to man 7 ip on Linux: "The socket option level for IP
is SOL_IP." On NetBSD it's said to be IPPROTO_IP. Linux man needs update?
Yes, I know, both are 0, but still ...
Elion Enterprises Ltd.
More information about the Quagga-dev