summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2006-06-27[lib] Remove numeric route-type argument in redistribute arg stringsPaul Jakma
2006-06-27 Paul Jakma <paul.jakma@sun.com> * route_types.awk: Remove setting the 'bare' numeric route type in redist strings.
2006-06-27[lib] Centralise Zserv route type information, auto-generate redist stringsPaul Jakma
2006-05-23 Paul Jakma <paul.jakma@sun.com> * route_types.txt: New file, table of ZEBRA_ROUTE definitions. * route_types.awk: New script, to parse previous and generate (for now) redistribute string defines. * Makefile.am: build route_types.h using previous two, ala memtypes.h, include the script and table file in EXTRA_DIST. * command.h: pull in route_types.h, add a REDIST_STR define.
2006-06-15[zebra] remove internal if_flag_dump, use libzebras version.Paul Jakma
2006-06-15 Paul Jakma <paul.jakma@sun.com> * lib/if.c: (if_flag_dump) remove the whitespace indentation, callers should provide. * zebra/interface.c: (if_flag_dump_vty) redundant code, remove. (if_dump_vty) use libzebra if_flag_dump.
2006-06-15[lib] list_delete shouldn't duplicate list_delete_all_nodePaul Jakma
2006-06-15 Paul Jakma <paul.jakma@sun.com> * linklist.c: (list_delete) call list_delete_all_node, don't duplicate it.
2006-06-15[lib] Experimental: have XFREE NULL out the freed pointerPaul Jakma
2006-06-15 Paul Jakma <paul.jakma@sun.com> * memory.h: Experimental, have XFREE macro NULL out the freed pointer.
2006-06-15[lib] Fix vector leak in error path in command.c, CID #38Paul Jakma
2006-06-15 Paul Jakma <paul.jakma@sun.com> * command.c: (cmd_describe_command_real) Fix leak, CID #38.
2006-05-28[lib] Add support for Sun libc printstack to zlog_backtrace_sigsafePaul Jakma
2006-05-28 Paul Jakma <paul.jakma@sun.com> * configure.ac: Check for Sun libc printstack(), add a general HAVE_STACK_TRACE define for lib/log.c, if any supported stack symbol dumping function is found (glibc backtrace/sun libc printstack). * log.c: (general) Add support for Sun libc printstack(). (hex_append) make the cpp conditional on general HAVE_STACK_TRACE define. (zlog_backtrace_sigsafe) Ditto. Add printstack() version of the the DUMP macro in this function.
2006-05-28[lib] vty_log shouldn't crash if called when vty isn't initiliasedPaul Jakma
2006-05-28 Paul Jakma <paul.jakma@sun.com> * vty.c: (vty_log/vty_log_fixed) dont crash if called when vty hasn't been initiliased.
2006-05-28[lib] malloc.h is deprecated, try not to include it anymorePaul Jakma
2006-05-28 Paul Jakma <paul.jakma@sun.com> * memory.c: malloc.h is deprecated in favour of stdlib.h, however we still need it on GNU Libc for mallinfo().
2006-05-28[lib] include inttypes.h rather than stdint.h, provide defines where missingPaul Jakma
2006-05-28 Paul Jakma <paul.jakma@sun.com> * zebra.h: Include inttypes.h rather than stdint.h, best practice according to the autoconf manual. Add UINT*_MAX defines for older platforms lacking these (FBSD 4)
2006-05-21[interface configuration] Try to avoid losing address info after shutdown.Andrew J. Schorr
2006-05-21 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * if.h: (struct connected) Document the meaning of the ZEBRA_IFC_REAL and ZEBRA_IFC_CONFIGURED flags. * connected.c: (connected_withdraw) Do not delete the connected address if the ZEBRA_IFC_CONFIGURED flag is set. (connected_add_ipv4,connected_add_ipv6) Before calling connected_withdraw, unset the ZEBRA_IFC_CONFIGURED flag on the superseded connected structure.
2006-05-15[lib] Add string mapping table for Zserv commandsPaul Jakma
2006-05-15 Paul Jakma <paul.jakma@sun.com> * log.c: (general) Generalise struct zebra_route_desc into struct zebra_desc_table and, similar to route_types, add a command_types table to describe Zserv protocol commands. (route_types[]) use a macro to use designated initialisers while avoiding tedious duplication. (zserv_command_string) lookup string from zebra_desc_table, similar to zebra_route_string * zebra.h: Add declaration for zserv_command_string, adjust the comments to reflect zebra_desc_table.
2006-05-15[lib] CID #39, Fix the vty completion leak-fix to only free when desiredPaul Jakma
2006-05-13 Paul Jakma <paul.jakma@sun.com> * vty.c: (vty_describe_command) CID #39 fix was too hasty, just cause it /can/ leak doesn't mean it always will have, check first.
2006-05-12[lib] CID #55, fix return of freed pointer, cmd_describe_command_realPaul Jakma
2006-05-12 Paul Jakma <paul.jakma@sun.com> * command.c: (cmd_describe_command_real) Fix return of freed pointer when no-match, CID #55.
2006-05-12[lib] CID #39, fix leak in error path, vty_describe_commandPaul Jakma
2006-05-12 Paul Jakma <paul.jakma@sun.com> * vty.c: (vty_describe_command) fix leak of describe vector in error path, CID #39.
2006-05-12[lib] CID #37, fix error case leak, cmd_complete_command_realPaul Jakma
2006-05-12 Paul Jakma <paul.jakma@sun.com> * command.c: (cmd_complete_command_real) Fix leak of cmd_vector in error case, Coverity CID #37.
2006-05-12[lib] CID #3, fix forward-null errors in vty_prefix_list_uninstallPaul Jakma
2006-05-12 Paul Jakma <paul.jakma@sun.com> * plist.c: (vty_prefix_list_uninstall) Fix potential NULL deref of prefix and typestr strings, Coverity CID #3.
2006-03-30[lib] command.c exports host global, add it to header.Paul Jakma
2006-03-14 Paul Jakma <paul.jakma@sun.com> * privs.c: (zprivs_caps_init) Change user IDs before lowering privileges, while this seems to work on Linux, on Solaris it rightfully refuses due to PRIV_PROC_SETID having been dropped. * command.h: Add the struct host global exported from command.c
2006-03-30[lib] Trivial: fix line lengths of a comment in workqueu.cPaul Jakma
2006-03-30 Paul Jakma <paul.jakma@sun.com> * workqueue.c: (work_queue_run) fix line length of comment
2006-03-30[lib] Mark most arguments in DEFUN_CMD_FUNC_TEXT as potentially unusedPaul Jakma
2006-03-30 Paul Jakma <paul.jakma@sun.com> * command.h: (DEFUN_CMD_FUNC_TEXT) Annotate arguments as potentially being unused.
2006-03-30[lib] fix gensub call in memtypes.awk to pass "g", not g.Paul Jakma
2006-03-27 Paul Jakma <paul.jakma@sun.com> * memtypes.awk: Fix gensub call, g should be a string..
2006-03-30[lib] status field/flags no longer used in struct workqueuePaul Jakma
2006-03-25 Paul Jakma <paul.jakma@sun.com> * workqueue.h: (struct work_queue) Remove status field and state flag, no longer used.
2006-03-30[bgpd] trivial: use a distinct memtype for struct bgp_synchronizePaul Jakma
2006-03-19 Paul Jakma <paul.jakma@sun.com> * memtypes.c: Add MTYPE_BGP_SYNCHRONISE. * bgp_advertise.c: Use a distinct memory type for struct bgp_synchronize.
2006-03-30[lib] fix libtool version argument in Makefile.amPaul Jakma
2006-03-16 Paul Jakma <paul.jakma@sun.com> * Makefile.am: Fix -version-info argument.
2006-03-30[lib/memory] Add mallinfo supportPaul Jakma
2006-02-15 Paul Jakma <paul.jakma@sun.com> * configure.ac: Check for mallinfo, being careful to link test so we can detect things like umem being used (which doesn't provide a mallinfo). * lib/memory.c: (mtype_memstr) new helper function to return human friendly string for a byte count. (mtype_stats_alloc) new function, for users to retrieve number of objects allocated. (show_memory_mallinfo) New function, show mallinfo statistics if available. (show_memory_all_cmd) Call show_memory_mallinfo, if mallinfo is available. * lib/memory.h: Export mtype_memstr and mtype_stats_alloc. Provide a define for a reasonable buffer size for mtype_memstr.
2006-03-30[lib/privs] Changing user IDs should be done before dropping privilegesPaul Jakma
2006-03-14 Paul Jakma <paul.jakma@sun.com> * privs.c: (zprivs_caps_init) Change user IDs before lowering privileges, while this seems to work on Linux, on Solaris it rightfully refuses due to PRIV_PROC_SETID having been dropped.
2006-03-06[lib] export show_address_cmd debug command in if.hPaul Jakma
2006-03-06 Paul Jakma <paul.jakma@sun.com> * if.h: export show_address_cmd, for anyone who wishes to use it.
2006-02-21[lib/sockunion] trivial: use XSTRDUP.Paul Jakma
2006-02-21 Paul Jakma <paul.jakma@sun.com> * sockunion.c: (sockunion_{su2str,log}) Use XSTRDUP. Particularly with _su2str, as that string gets XFREEd, which can be annoying if run debug code in memory.c.
2006-02-02[lib/workqueue] remove the useless 'delay' factor.paul
2006-02-02 Paul Jakma <paul.jakma@sun.com> * workqueue.h: (struct work_queue) Remove the delay field. It served no purpose and just introduced bad behaviour. Should be excised before its allowed to escape into 1.0. This removes need for the 'flood' and runs_since_clear fields. * workqueue.c: (general) excise delay factor between queue runs, hence the 'flood' crap too.. See above. * bgp_route.c: (bgp_{clear_node,process}_queue_init) delay field is removed from workqueue spec.
2006-01-19[lib/stream] small compile fix, use uint64_t, not u_int64_t.paul
2006-01-19 Paul Jakma <paul.jakma@sun.com> * stream.c: (stream_getq_from) should use POSIX uint64_t not u_int64_t. Latter is neither a traditional BSD type, nor a POSIX type.
2006-01-172006-01-17 Vincent Jardin <vincent.jardin@6wind.com>vincent
* md5.c: Don't forget to keep const. * regex.c: Cleanup code and remove warnings.
2006-01-17[lib/zclient] Export zclient_create_headerpaul
2006-01-17 Paul Jakma <paul.jakma@sun.com> * zclient.{c,h}: (zclient_create_header) export this, seems others could use it (in lieu of more complete zserv helpers).
2006-01-17[lib/vty] Add 'no terminal monitor' aliaspaul
2006-01-17 Paul Jakma <paul.jakma@sun.com> * vty.c: (no_terminal_monitor_cmd) New ALIAS for terminal_no_monitor, in the more normal negating format, to be kind to my fingers. (vty_init) install new ALIAS.
2006-01-17[lib/md5] md5_loop should take void pointer for more useful caller warnings.paul
2006-01-17 Paul Jakma <paul.jakma@sun.com> * md5.{c,h}: (md5_loop) Is better off taking a void * and doing cast to byte wise type internally, avoids needs for casts in users.
2006-01-16[zserv] Extend Zserv header with version information and marker fieldpaul
2006-01-16 Paul Jakma <paul.jakma@sun.com> * lib/zclient.h: Update the Zserv protocol header with a version field. Define the old command field to be a 'marker', to allow old Zserv and updated Zserv to be differentiated. Future updates will bump the version field obviously. New command field is made wider. Try to stop using the 'zebra_size_t' typedef in the callbacks. * lib/zclient.c: Update to read/write new format header. * zebra/zserv.c: Ditto
2006-01-11[zserv] Update interface flags to 8 bytes wide.paul
2006-01-11 Paul Jakma <paul.jakma@sun.com> * if.h: (struct interface) expand flags to 8 bytes. * zclient.c: (zebra_interface_{add,state}_read) stream read of interface flags now need to use stream_getq. (zebra_interface_if_set_value) ditto 2006-01-11 Paul Jakma <paul.jakma@sun.com> * zserv.c: (zsend_interface_{add,delete,update}) if flags are 8 bytes now, update to write out with stream_putq.
2006-01-10[stream] Add quad-word support and stream_resizepaul
2006-01-10 Paul Jakma <paul.jakma@sun.com> * stream.c: (stream_new) Allocate stream data as seperate object. (stream_free) free the data. (stream_resize) new function, resize stream to new size. (stream_{get,put}q*) new functions to get/put quad word size types. * stream.h: (struct stream) make data seperate from the stream. Export new stream_resize and quad-word get/put functions.
2005-12-292005-12-29 Greg Troxel <gdt@fnord.ir.bbn.com>gdt
* vty.c (vty_hello): add cast to quiet lint (from David Young) (patch-lint)
2005-11-26[c99] change gcc zero-length array to C99 flexible array declarationpaul
2005-11-26 Paul Jakma <paul.jakma@sun.com> * buffer.c: (struct buffer_data) change gcc zero array declaration to C99 incomplete array. * stream.h: (struct stream) same * ospf_api.c: (struct opaque_lsa) same
2005-11-24[lib/zebra.h] fix Linux compile errorpaul
2005-11-24 Paul Jakma <paul.jakma@sun.com> * zebra.h: s/u_int/unsigned int/, u_int is a BSD type, defining __USE_BSD on Linux pulls in further things from netinet/ip.h which dont preprocess for some reason. There is no C99 shorthand type directly equivalent to u_int afaict, so don't use it.
2005-11-24[privs/solaris] Fix unused variable and incorrect format string.paul
2005-11-24 Paul Jakma <paul.jakma@sun.com> * privs.c: (zcaps2sys/solaris) remove unused variable. (zprivs_state_caps/solaris) Format string missing a specifier.
2005-11-14[workqueue] Update workqueue users callbacks to additional argumentspaul
2005-11-14 Paul Jakma <paul.jakma@sun.com> * (general) pass struct work-queue to callback functions. * workqueue.h: (struct work_queue) move the state flag variables to end. Add an opaque pointer to spec, for user-data global to the queue. Pass reference to work_queue to all callbacks. * workqueue.c: (work_queue_item_remove) pass ref to workqueue to user callbacks. (work_queue_run) ditto.
2005-11-14[bug #231] check and include stdint.h, also add std=c99 to gcc CFLAGSpaul
2005-11-14 Paul Jakma <paul.jakma@sun.com> * configure.ac: Tell gcc we like C99. [bug #231] Check and test for stdint.h. * lib/zebra.h: [bug #231] include stdint, if its there.
2005-11-142005-11-14 Paul Jakma <paul.jakma@sun.com>paul
* (general) Add state to detect queue floods. There's no sense trying to be sparing of CPU resources, if the queue is flooding and using ever more memory resources. we should just get on with clearing the queue. The sense of delay and hold were wrong way around, fix. * workqueue.h: (struct work_queue) Add status bitfield. Add 'flood' integer to workqueue spec. Add runs_since_clear counter to workqueue. * workqueue.c: (work_queue_new) set defaults for delay, hold and flood. (work_queue_add) initial schedule should use delay, not hold. (show_work_queues) Print flood field, conserve whitespace. (work_queue_unplug) use delay, not hold. (work_queue_run) consecutive runs should be seperated by hold time, not delay. Keep track of number of consecutive runs, go into 'overdrive' if queue is being flooded, we can't avoid making heavy use of resources, better to use CPU than ever more RAM.
2005-11-12[lib] 'show route-map' should print call action seperate from exit policypaul
2005-11-12 Paul Jakma <paul.jakma@sun.com> * routemap.c: (vty_show_route_map_entry) call action is seperate from exit action, latter should still be printed regardless of whether a call is specified.
2005-11-032005-11-03 Paul Jakma <paul.jakma@sun.com>paul
* memtypes.h: Update auto-built file.
2005-11-032005-11-03 Paul Jakma <paul.jakma@sun.com>paul
* if.c: (connected_free) use MTYPE for connected label. memtypes.c: Add MTYPE_CONNECTED_LABEL
2005-11-032005-11-03 Paul Jakma <paul.jakma@sun.com>paul
* zebra.h: BSD BYTE_ORDER define isn't available everywhere, define if needs be. * checksum.h: new file. checksum.c exports in_cksum, provide a header for it. * checksum.c: (in_cksum) callers shouldn't have to know it uses a u_short internally, change to void *. * Makefile.am: Add checksum.h * command.h: remove bogus trailling slash. * md5.c: (general) Update it for the twentieth century. ANSI declarations are widely supported now.. Don't include system headers, only include zebra.h. Use POSIX types (the alternative is to define u_int64_t in a portable way - rest of Quagga needs same cleanup). Make endian-conditional code be compiler conditional rather than preprocessor conditional, so that breakage gets noticed quicker. * md5.h: POSIX types. Get rid of the odd __P() non-ANSI capable compiler compatibility hack.
2005-10-262005-10-26 Paul Jakma <paul.jakma@sun.com>paul
* command.c: Use MTYPE_HOST, MTYPE_STRVEC. Some other fixups, including fixing some likely leaks in config_write_file. * vty.c: memory macro usage fixes. (vty_read_config) fix leak where relative config file is specified.
2005-10-262005-10-26 Paul Jakma <paul.jakma@sun.com>paul
* (general) Cleanup a some calls to XFREE,strdup, etc. to use the memory.h macros. * memtypes.c: Add MTYPE_IF_RMAP_NAME, MTYPE_PQUEUE, MTYPE_PQUEUE_DATA and MTYPE_HOST. * memtypes.h: update auto-built file. * if_rmap.c: Use MTYPE_IF_RMAP_NAME. * pqueue.c: Use the two MTYPE_PQUEUE mtypes for allocations.