diff options
author | paul <paul> | 2004-06-11 11:27:03 +0000 |
---|---|---|
committer | paul <paul> | 2004-06-11 11:27:03 +0000 |
commit | 53f480a818e0bc7ca7dd7fd4c8fcacabad376fd8 (patch) | |
tree | 4aeceddd944099f3623b84ba571fbd9ae8b99c04 /lib/zebra.h | |
parent | 56bc9fc9515b7e64ab3b4cabd5990e69ea80d229 (diff) | |
download | quagga-53f480a818e0bc7ca7dd7fd4c8fcacabad376fd8.tar.bz2 quagga-53f480a818e0bc7ca7dd7fd4c8fcacabad376fd8.tar.xz |
2004-06-11 Sowmini Varadhan <sowmini.varadhan@sun.com>
* filter.c: (access_list_remark_cmd) buffer_putstr doesnt need cast
to u_char. (ipv6_access_list_remark_cmd) ditto.
if.c: ditto
* network.c: (readn/writen) pointer arg should be type u_char.
* plist.c: needs to include stream.h, not declare stream functions
internally.
(various) Add static qualifier to internal functions.
(prefix_list_type_str) extraneous breaks in switch statement.
(ip_prefix_list_description_cmd) buffer_putstr doesnt need cast
* stream.h: depends on plist.h and export stream_put_prefix
* vty.c: (vty_<telnet option build functions>) should use
unsigned char, telnet options are 0 -> 255.
* zclient.c: various u_char<->char type cleanups.
* zebra.h: Having to define CMSG_* can apply to more than just
BSDI_NRL.
* ripd.c: (rip_distribute_update_all) distribute list hook
function pointer prototype requires struct prefix_list * arg.
(rip_distribute_update_all_wrapper) update to pass required arg,
NULL.
Diffstat (limited to 'lib/zebra.h')
-rw-r--r-- | lib/zebra.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/lib/zebra.h b/lib/zebra.h index ed3024db..7ba01d56 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -207,14 +207,29 @@ typedef int socklen_t; #define IN6_ARE_ADDR_EQUAL IN6_IS_ADDR_EQUAL -/* BSD/OS 4.0 has lost belows defines, it should appear at - /usr/include/sys/socket.h. */ -#define CMSG_ALIGN(n) (((n) + 3) & ~3) -#define CMSG_SPACE(l) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(l)) -#define CMSG_LEN(l) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (l)) - #endif /* BSDI_NRL */ +/* + * RFC 2553-bis defines not available on some systems. + */ +#ifndef _CMSG_DATA_ALIGN +#define _CMSG_DATA_ALIGN(n) (((n) + 3) & ~3) +#endif /* _CMSG_DATA_ALIGN */ + +#ifndef _CMSG_HDR_ALIGN +#define _CMSG_HDR_ALIGN(n) (((n) + 3) & ~3) +#endif /* _CMSG_HDR_ALIGN */ + +#ifndef CMSG_SPACE +#define CMSG_SPACE(l) (_CMSG_DATA_ALIGN(sizeof(struct cmsghdr)) + \ + _CMSG_HDR_ALIGN(l)) +#endif /* CMSG_SPACE */ + + +#ifndef CMSG_LEN +#define CMSG_LEN(l) (_CMSG_DATA_ALIGN(sizeof(struct cmsghdr)) + (l)) +#endif /* CMSG_LEN */ + #if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5 #define __attribute__(x) #endif /* !__GNUC__ */ |