Age | Commit message (Collapse) | Author |
|
* (general) extern and static'ification of functions in code and
header.
Cleanup any definitions with unspecified arguments.
Add casts for callback assignments where the callback is defined,
typically, as passing void *, but the function being assigned has
some other pointer type defined as its argument, as gcc complains
about casts from void * to X* via function arguments.
Fix some old K&R style function argument definitions.
Add noreturn gcc attribute to some functions, as appropriate.
Add unused gcc attribute to some functions (eg ones meant to help
while debugging)
Add guard defines to headers which were missing them.
* command.c: (install_node) add const qualifier, still doesnt shut
up the warning though, because of the double pointer.
(cmp_node) ditto
* keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived
fromn vty.h ones to fix some of the (long) < 0 warnings.
* thread.c: (various) use thread_empty
(cpu_record_hash_key) should cast to uintptr_t, a stdint.h type
* vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they
removed from ospfd/ospf_vty.h
* zebra.h: Move definition of ZEBRA_PORT to here, to remove
dependence of lib on zebra/zserv.h
|
|
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.
|
|
* sockopt.h: Fix elif that should be an else.
|
|
* sockopt.c: (setsockopt_pktinfo) unexported
* sockopt.h: Cleanup SOCKOPT_CMSG defines a bit. Add a throwaway
define for SOPT_SIZE_CMSG_IFINDEX_IPV4 for systems which have
neither IP_RECVIF nor IP_PKTINFO (eg openbsd).
|
|
* sockopt.{c,h}: add sockopt_iphdrincl_swab_{htosys,systoh},
functions to change byte order between system IP_HDRINCL order
and host order.
|
|
* ripngd/ripngd.c: move setsockopt_so_recvbuf to lib.
* lib/sockopt.{c,h}: Add setsockopt_so_recvbuf, for ripd and ripngd.
* ripd/ripd.c: set receive buffer to a decent size, some systems
have low defaults. Problem noted and fix suggested by Stephan
Schweizer in [zebra 20967].
|
|
Thanks to Hasso for code review.
|
|
* sockopt.h: Define method-independent macro for callers of
get_ifindex to use for cmsg length.
|
|
2004-08-19 Paul Jakma <paul@dishone.st>
* sockopt.c: include sockopt.h
rename some of the _pktinfo_ functions to _ifindex, where that is
their purpose.
(getsockopt_ipv6_pktinfo_ifindex) renamed to
getsockopt_ipv6_ifindex.
(setsockopt_ipv4_pktinfo) renamed to setsockopt_ipv4_ifindex
(setsockopt_pktinfo) update with previous and add comment re
AF_INET portability.
(setsockopt_ifindex) generic ifindex function ala
setsockopt_pktinfo.
(getsockopt_ipv4_pktinfo_ifindex) renamed to
getsockopt_ipv4_ifindex.
(getsockopt_ipv4_ifindex) rejiggling to reduce repeated
ifdef/elses. pktinfo case forgot to set ifindex.
(getsockopt_pktinfo_ifindex) renamed to
getsockopt_ifindex. update some calls to renamed functions.
* sockopt.h: Update renamed exported functions
Rename the CMSG_SIZE macros to IFINDEX.
Guard IPv4 PKTINFO in a conditional define.
|
|
* sockopt.h: Add SOPT_SIZE_CMSG_PKTINFO{_IPV{4,6}} define, for
sizeof pktinfo as appropriate, to be used when allocating msg
buffers. export setsockopt_pktinfo() and
getsockopt_pktinfo_ifindex()
* sockopt.c: (setsockopt_pktinfo_ifindex) new function to portably
set received ifindex sock option.
(getsockopt_pktinfo_ifindex) portably retrieve ifindex.
(getsockopt_cmsg_data) retrieve indicated control info from
message header.
(getsockopt_ipv6_pktinfo_ifindex) ipv6 version of above.
(setsockopt_ipv4_pktinfo) v4 version
(setsockopt_pktinfo) the exported version
(getsockopt_ipv4_pktinfo_ifindex) v4 specific version
(getsockopt_pktinfo_ifindex) the exported version
|
|
|