diff options
author | gdt <gdt> | 2004-11-15 18:51:15 +0000 |
---|---|---|
committer | gdt <gdt> | 2004-11-15 18:51:15 +0000 |
commit | 07d450f34649aebb1885a04c02ff1d87f58fb0c3 (patch) | |
tree | dc8ec06f081b35ad7828d5fa468626cebb8777a1 /lib/sockopt.h | |
parent | 199f21faf9724fe8b19416a4d268c2d158120799 (diff) | |
download | quagga-07d450f34649aebb1885a04c02ff1d87f58fb0c3.tar.bz2 quagga-07d450f34649aebb1885a04c02ff1d87f58fb0c3.tar.xz |
Rationalize CMSG_SPACE usage:
in lib/zebra.h, ensure that RFC3542-required CMSG_SPACE and CMSG_LEN
are defined. Warn if alignment assumptions are made, since they are
i386-centric.
in lib/sockopt.h, declare that sockopt sizes are without
CMSG_SPACE-required padding - just simple sizeof.
in ospfd/ospf_packet.c, simply use CMSG_SPACE
This should remove all instances of CMSG_ALIGN from the source code.
This is a nonstandard, though rational, construct; quagga should use
only those defines in RFC3542.
Diffstat (limited to 'lib/sockopt.h')
-rw-r--r-- | lib/sockopt.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/sockopt.h b/lib/sockopt.h index bec26163..df199c19 100644 --- a/lib/sockopt.h +++ b/lib/sockopt.h @@ -44,7 +44,7 @@ int setsockopt_ipv6_multicast_loop (int, int); * Size defines for control messages used to get ifindex. We define * values for each method, and define a macro that can be used by code * that is unaware of which method is in use. - * XXX Needs to use CMSG_DATA and CMSG_ALIGN. + * These values are without any alignment needed (see CMSG_SPACE in RFC3542). */ #if defined (IP_PKTINFO) /* Linux in_pktinfo. */ @@ -61,8 +61,7 @@ int setsockopt_ipv6_multicast_loop (int, int); #if defined (SUNOS_5) #define SOPT_SIZE_CMSG_RECVIF_IPV4() (sizeof (uint_t)) #else -#define SOPT_SIZE_CMSG_RECVIF_IPV4() \ - __CMSG_ALIGN((sizeof (struct sockaddr_dl))) +#define SOPT_SIZE_CMSG_RECVIF_IPV4() (sizeof (struct sockaddr_dl)) #endif /* SUNOS_5 */ #endif /* IP_RECVIF */ |