summaryrefslogtreecommitdiff
path: root/lib/prefix.c
AgeCommit message (Collapse)Author
2010-10-06bgpd, lib: adopt afi_t and safi_t in several placesMichael Lambert
* bgpd/bgp_attr.c, bgpd/bgp_open.h, bgpd/bgp_route.c, lib/prefix.c, lib/prefix.h: Various integer types were being used where, if we had strict type checking, afi_t and safi_t would be required. Signed-off-by: G.Balaji <balajig81@gmail.com> (cherry picked from commit c8af35ffa2dc79ff7d7ff00b1b61f1f50a100ab6)
2009-12-21lib: make some structures constantStephen Hemminger
* isisd/isis_pdu.c * maskbit: this pre-initialized array is not modified * lib/prefix.c * maskbit: idem * lib/command.c * facility_map: idem * itoa64: idem * default_motd: make local var static * facility_name(): update local var accordingly * facility_match(): idem
2009-08-28lib/trivial: str2prefix checks return of inet_pton in fragile wayPaul Jakma
* prefix.c: (str2prefix_ipv6) inet_pton succesful return is presumed to be 1, rather than the "not zero" the man page describes - seemed fragile.
2005-07-262005-07-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* prefix.c: (prefix_ipv4_new, prefix_ipv6_new): Call prefix_new to allocate the memory to make sure that all struct prefix pointers point to objects of the same length (avoids memory overruns on struct prefix assignments). (prefix_ipv4_free, prefix_ipv6_free): Simply call prefix_free. It is interesting to note that these functions are never actually called anywhere in the code. Instead prefix_free was already being called directly, despite the previous MTYPE incompatibility. [backport candidate]
2005-07-262005-07-26 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* prefix.c: (ip_masklen) While loop should test that 'pnt' pointer is in range before dereferencing it. [backport candidate]
2005-05-062005-05-06 Paul Jakma <paul@dishone.st>paul
* (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
2005-04-08 * prefix.[hc]: Pass argument to the inet6_ntoa by value making it morehasso
inet_ntoa alike. * ripngd.[hc], ripng_interface.c, ripng_peer.c: inet6_ntoa() takes argument now by value.
2005-04-05 * lib/prefix.[hc]: inet6_ntoa utility function copied fromhasso
ripngd/ripngd.c (inet6_ntop). * ripngd.[hc]: Remove inet6_ntop() and any usage of it. inet6_ntoa() from lib is used now. * ripng_interface.c: inet6_ntop() -> inet6_ntoa(). * ripng_peer.c: inet6_ntop() -> inet6_ntoa().
2004-12-082004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* prefix.c: (prefix_copy) Error message before abort should have severity LOG_ERR, not LOG_INFO. * memory.c: (mtype_log) Log level should be LOG_DEBUG, not LOG_INFO.
2004-10-19OK. Here it is - PtP patch from Andrew J. Schorr. No problems with ospfd,hasso
ripd might need some more testing though.
2004-10-04First small part of lib cleanup. Mainly "constification" of arguments andhasso
adding FIXME's.
2004-01-13Explain the dual use of struct prefix for CIDR prefixes andgdt
address/netmask pairs, and clarify the two comparison functions.
2002-12-13Initial revisionpaul