diff options
author | gdt <gdt> | 2004-11-15 18:51:15 +0000 |
---|---|---|
committer | gdt <gdt> | 2004-11-15 18:51:15 +0000 |
commit | 69e1325faf47762fd08917b8f20a20abb59d41e6 (patch) | |
tree | 60d6df8c1d754c84fa3108a5f19bbf91cb084ab1 /lib/sockopt.h | |
parent | fbb6709986ee29b57a8a6103c592de80647ead00 (diff) |
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 */ |