summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2004-10-222004-10-22 Paul Jakma <paul@dishone.st>paul
* command.h: Cleanup the defines a bit, add helper defines and collapse all defines to use those. Add an attribute field to cmd_element to support, eg hidden or deprecated commands, add defun defines for such. All that's left to do is add logic to command.c to check these attributes... ;)
2004-10-222004-10-22 Paul Jakma <paul@dishone.st>paul
* 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).
2004-10-222004-10-13 Paul Jakma <paul@dishone.st>paul
* sockopt.c: (getsockopt_ipv4_ifindex) no ifindex should be 0, not -1.
2004-10-19Small copyright string and hostname related cleanup.hasso
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-13Make initializing smux connection configurable - "smux peer OID" commandhasso
initializes connection, and "no smux peer" command terminates it. Fixes bugzilla #47 and #112.
2004-10-13Fix critical bugzilla #113. Make CMD_ERR_NOTHING_TODO nonfatal.hasso
2004-10-132004-10-13 Paul Jakma <paul@dishone.st>paul
* (global) more const'ification. * sockunion.c: (sockunion_su2str) buffer should be sized SU_ADDRSTRLEN. (sockunion_log) do not return stack variables, strdup buf before return. * vty.h: Fix up the VTY_GET_INTEGER macros. Testing caller supplied values against ULONG_MAX is daft, when caller probably has passed a type that can not hold ULONG_MAX. use a temporary long instead. Add VTY_GET_LONG, make VTY_GET_INTEGER_RANGE use it, make VTY_GET_INTEGER a define for VTY_GET_INTEGER_RANGE.
2004-10-11Some more const string fixes.hasso
2004-10-112004-10-11 Paul Jakma <paul@dishone.st>paul
* if.h: mtu's should be unsigned. * routemap.{c,h}: const char updates * smux.{c,h}: ditto
2004-10-112004-10-11 Paul Jakma <paul@dishone.st>paul
* thread.c: (funcname_thread_add_timer) (funcname_thread_add_timer_msec) Fix mistakes from last change. Pointed out by Liu Xin in [quagga-dev 1609].
2004-10-102004-10-10 Paul Jakma <paul@dishone.st>paul
* version.h.in: (pid_output*) add const qualifier. * command.h: Change DEFUN func to take const char *[] rather than char **, to begin process of fixing compile warnings in lib/. Nearly all other changes in this commit follow from this change. * buffer.{c,h}: (buffer_write) pointer-arithmetic is gccism, take const void * and cast an automatic const char *p to it. (buffer_putstr) add const * command.c: (zencrypt) const qualifier (cmd_execute_command_real) ditto (cmd_execute_command_strict) ditto (config_log_file) ditto. Fix leak of getcwd() returned string. * memory.{c,h}: Add MTYPE_DISTRIBUTE_IFNAME for struct dist ifname. * distribute.{c,h}: Update with const qualifier. (distribute_free) use MTYPE_DISTRIBUTE_IFNAME (distribute_lookup) Cast to char *, note that it's ok. (distribute_hash_alloc) use MTYPE_DISTRIBUTE_IFNAME. (distribute_get) Cast to char *, note that it's ok. * filter.c: Update with const qualifier. * if.{c,h}: ditto. * if_rmap.{c,h}: ditto. (if_rmap_lookup) Cast to char *, note that it's ok. (if_rmap_get) ditto. * log.{c,h}: Update with const qualifier. * plist.{c,h}: ditto. * routemap.{c,h}: ditto. * smux.{c,h}: ditto. Fix some signed/unsigned comparisons. * sockopt.c: (getsockopt_cmsg_data) add return for error case. * vty.c: Update with const qualifier.
2004-10-102004-10-05 Paul Jakma <paul@dishone.st>paul
* version.h.in: (pid_output*) add const qualifier.
2004-10-08More const strings.hasso
2004-10-082004-10-05 Paul Jakma <paul@dishone.st>paul
* version.h.in: print_version declaration is here, not in autoconf generated version.h.
2004-10-07Even more const strings and fix to bugfix.hasso
2004-10-07Make more strings const.hasso
2004-10-05Number of warnings is down to 3 again in lib directory. A lot of const'shasso
added to strings and a lot of int -> unsigned int changes.
2004-10-052004-10-05 Paul Jakma <paul@dishone.st>paul
* thread.c: (funcname_thread_add_timer_timeval) new function, add timer at specified timeval. (funcname_thread_add_timer) use funcname_thread_add_timer_timeval. (funcname_thread_add_timer_msec) ditto
2004-10-052004-10-05 Paul Jakma <paul@dishone.st>paul
* sockopt.{c,h}: add sockopt_iphdrincl_swab_{htosys,systoh}, functions to change byte order between system IP_HDRINCL order and host order.
2004-10-05Remove dead files.hasso
2004-10-04First small part of lib cleanup. Mainly "constification" of arguments andhasso
adding FIXME's.
2004-10-04Every file includes it and warns about it.hasso
2004-10-03Big vtysh cleanup. See changelogs for details.hasso
2004-10-03Common router id.hasso
2004-09-272004-09-27 Paul Jakma <paul@dishone.st>paul
* zebra.h: Add WANT_OSPF_WRITE_FRAGMENT for ospfd to try to fragment oversized packets. Enabled only for Linux. Add HAVE_IP_HDRINCL_BSD_ORDER to define struct ip byte order, to consolidate various ad-hoc platform defines for same thing.
2004-09-26Compiler warnings fixes.hasso
2004-09-23Remove usage of evil list and listnode typedefs.hasso
2004-09-212004-09-17 Paul Jakma <paul@dishone.st>paul
* sockopt.c: Add missing bracket
2004-09-172004-09-17 Paul Jakma <paul@dishone.st>paul
* 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].
2004-09-132004-09-13 Paul Jakma <paul@dishone.st>paul
* configure.ac: capitalise the package name. autoconf lowercases it for PACKAGE_TARNAME. * lib/command.c: Update the copyright string in the default motd.
2004-09-132004-09-13 Jose Luis Rubio <jrubio@dit.upm.es>paul
(at Technical University of Madrid as part of Euro6ix Project) Enhanced Route Server functionality and Route-Maps: * bgpd/bgpd.h: Modified 'struct peer' and 'struct bgp_filter' to support rs-clients. A 'struct bgp_table *rib' has been added to the first (to mantain a separated RIB for each rs-client) and two new route-maps have been added to the last (for import/export policies). Added the following #defines: RMAP_{IN|OUT|IMPORT|EXPORT|MAX}, PEER_RMAP_TYPE_{IMPORT|EXPORT} and BGP_CLEAR_SOFT_RSCLIENT. * bgpd/bgpd.c: Modified the functions that create/delete/etc peers in order to consider the new fields included in 'struct peer' for supporting rs-clients, i.e. the import/export route-maps and the 'struct bgp_table'. * bgpd/bgp_route.{ch}: Modified several functions related with receiving/sending announces in order to support the new Route Server capabilities. Function 'bgp_process' has been reorganized, creating an auxiliar function for best path selection ('bgp_best_selection'). Modified 'bgp_show' and 'bgp_show_route' for displaying information about any RIB (and not only the main bgp RIB). Added commands for displaying information about RS-clients RIBs: 'show bgp rsclient (A.B.C.D|X:X::X:X)', 'show bgp rsclient (A.B.C.D|X:X::X:X) X:X::X:X/M', etc * bgpd/bgp_table.{ch}: The structure 'struct bgp_table' now has two new fields: type (which can take the values BGP_TABLE_{MAIN|RSCLIENT}) and 'void *owner' which points to 'struct bgp' or 'struct peer' which owns the table. When creating a new bgp_table by default 'type=BGP_TABLE_MAIN' is set. * bgpd/bgp_vty.c: The commands 'neighbor ... route-server-client' and 'no neighbor ... route-server-client' now not only set/unset the flag PEER_FLAG_RSERVER_CLIENT, but they create/destroy the 'struct bgp_table' of the peer. Special actions are taken for peer_groups. Command 'neighbor ... route-map WORD (in|out)' now also supports two new kinds of route-map: 'import' and 'export'. Added commands 'clear bgp * rsclient', etc. These commands allow a new kind of soft_reconfig which affects only the RIB of the specified RS-client. Added commands 'show bgp rsclient summary', etc which display a summary of the rs-clients configured for the corresponding address family. * bgpd/bgp_routemap.c: A new match statement is available, 'match peer (A.B.C.D|X:X::X:X)'. This statement can only be used in import/export route-maps, and it matches when the peer who announces (when used in an import route-map) or is going to receive (when used in an export route-map) the route is the same than the one specified in the statement. For peer-groups the statement matches if the specified peer is member of the peer-group. A special version of the command, 'match peer local', matches with routes originated by the Route Server (defined with 'network ...', redistributed routes and default-originate). * lib/routemap.{ch}: Added a new clause 'call NAME' for use in route-maps. It jumps into the specified route-map and when it returns the first route-map ends if the called RM returns DENY_MATCH, or continues in other case.
2004-08-31Assorted changes from work at BBN. Most are minor, and several are ingdt
support of more significant changes not in this commit. The last item in the ChangeLog below may be needed for p2mp to work correctly. 2004-08-31 David Wiggins <dwiggins@bbn.com> * hash.c (hash_iterate): Save next pointer before calling procedure, so that iteration works even if the called procedure deletes the hash backet. * linklist.h (listtail): new macro, not yet used. 2004-08-31 David Wiggins <dwiggins@bbn.com> * ospf_spf.c (ospf_spf_calculate): Many more comments and debug print statements. New function ospf_vertex_dump used in debugging. 2004-08-31 David Wiggins <dwiggins@bbn.com> * ospf_spf.h (struct vertex): Comments for flags and structure members. 2004-08-31 David Wiggins <dwiggins@bbn.com> * ospf_route.c: When finding an alternate route, log cost as well. 2004-08-31 David Wiggins <dwiggins@bbn.com> * ospf_interface.c (ospf_lookup_if_params): Initialize af in struct prefix allocated on stack. 2004-08-31 David Wiggins <dwiggins@bbn.com> * ospf_packet.c (ospf_ls_ack_send_delayed): In p2mp mode, send acks to AllSPFRouters, rather than All-DR.
2004-08-27Make "terminal length <0-512>" command work in vtysh.hasso
2004-08-26add () on SOPT_SIZE_CMSG_PKTINFO_IPV4() use, to match def.gdt
Thanks to Hasso for code review.
2004-08-262004-08-26 Greg Troxel <gdt@fnord.ir.bbn.com>gdt
* sockopt.h: Define method-independent macro for callers of get_ifindex to use for cmsg length.
2004-08-252004-08-19 Paul Jakma <paul@dishone.st>paul
* zebra.h: add MAX and MIN defines (eg for ospf6d)
2004-08-192004-08-19 Paul Jakma <paul@dishone.st>paul
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.
2004-08-182004-08-18 Paul Jakma <paul@dishone.st>paul
* vty.c: (vty_serv_un) set unix vty socket to nonblocking to prevent inadvertent blocking of daemons by use of vtysh. TODO: disentangle manual paging from the buffer_write path so that unix vty can use this path too and be reliable.
2004-07-23(somewhat unrelated cleanups, but all are very minor)gdt
2004-07-23 Greg Troxel <gdt@poblano.ir.bbn.com> * */Makefile.am: Use ../dir/libfoo.la, rather than "-L../dir -lfoo", to avoid linking against installed libraries from a previous version. * {lib,ospfd,ospfclient}/Makefile.am: explicitly define the shared library version number to be 0.0 * configure.ac: remove spurious , so extract.pl is chmod'd +x. * HACKING: explain shared library versioning rules
2004-07-232004-07-23 Greg Troxel <gdt@poblano.ir.bbn.com>gdt
* sockopt.c (getsockopt_ipv4_pktinfo_ifindex): Make this compile on NetBSD, and add comments to make it less confusing. Change the sense of the SUNOS_5 test to make parallel structure between the variables and the code.
2004-07-232004-07-23 Paul Jakma <paul@dishone.st>paul
* 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
2004-07-222004-07-14 Paul Jakma <paul@dishone.st>paul
* sigevent.c: (quagga_signal_handler) add a global caught flag, set the flags to a constant rather increment to be kinder. (quagga_sigevent_process) new function, to do core of what quagga_signal_timer did. dont block signals at all as sig->caught is volatile sig_atomic_t and should be safe to access from signal and normal contexts. The signal blocking is unneeded paranoia, but is left intact under an ifdef, should some platform require it. Check global caught flag before iterating through array. (quagga_signal_timer) nearly everything moved to quagga_sigevent_process. Left in under ifdef, in case some platform could use a regular timer check for signals. * sigevent.h: quagga_sigevent_process declaration. * thread.c: (thread_fetch) check for signals at beginning of scheduler loop, check for signals if select returns EINTR.
2004-07-172004-07-17 Paul Jakma <paul@dishone.st>paul
* if.c: (if_cmp_func) Add comment suggested by Greg Troxel.
2004-07-132004-07-13 Greg Troxel <gdt@poblano.ir.bbn.com>gdt
* sigevent.c: Don't block SIGTRAP and SIGKILL. Blocking SIGTRAP confuses gdb, at least on NetBSD 2.0_BETA, where the block succeeds.
2004-07-092004-07-09 Paul Jakma <paul@dishone.st>paul
* jhash.{c,h}: New files. Bob Jenkins' public domain hashing function, as implemented in linux kernel by David Miller.
2004-07-092004-07-09 Paul Jakma <paul@dishone.st>paul
* Merge Kunihiro's 'show route-map' change and add compatibility aliases for route-map continue
2004-07-09more cvsignorespaul
2004-07-09Update cvsignore's for *.lo and *.la - libtool filespaul
2004-07-092004-07-09 Juris Kalnins <juris@mt.lv>paul
* if.c: (if_cmp_func) fix for interface names where name is same, but one has no number, eg "devtyp" and "devtyp0".